Difference between revisions of "VAR-SOM-MX6 Ubuntu Flash Ubuntu Alip to eMMC"
Line 193: | Line 193: | ||
{{note|Note:<br/>Make sure you built U-Boot for NAND.|info}} | {{note|Note:<br/>Make sure you built U-Boot for NAND.|info}} | ||
<pre>$ flash_erase /dev/mtd0 0 0 | <pre>$ flash_erase /dev/mtd0 0 0 | ||
+ | $ cd /opt/images/ | ||
$ kobs-ng init -x SPL --search_exponent=1 -v > /dev/null | $ kobs-ng init -x SPL --search_exponent=1 -v > /dev/null | ||
$ flash_erase /dev/mtd1 0 0 | $ flash_erase /dev/mtd1 0 0 |
Revision as of 09:47, 7 January 2016
Under construction!!! Under construction!!! Under construction!!!
1 Overview
Ubuntu Linaro Alip is pre built file system. For more information Ubuntu based Rootfs provided by Linaro. Variscite used linaro-vivid-alip-20151215-714 image added Vivante Graphic acceleration and compile the GStreamer with i.MX6 support.
Create Ubuntu Alip SDCARD is prerequisite step. Please make sure you run it and have a bootable Ubuntu SDCARD as described in the linked WIKI.
The steps require to build an Bootable SDCARD:
- Build Ubuntu Alip NFS. Build Ubuntu Alip NFS
- Created Ubuntu Alip bootable SDCARD. Create Ubuntu Alip SDCARD
- Copy required file to your SDCARD
- Boot your target from SDCARD
- Format and partition the target eMMC
- Install U-Boot and Linux Kernel images
- Install the root file system
- Deploy the kernel modules
- Deploy the Wi-Fi modules and firmware
2 Copy required file to your SDCARD
Make sure you built U-Boot for NAND.
Plug-In the bootable SDCARD $ cd ~/var-som-mx6-alip/ $ mkdir -p /media/rootfs/opt/images/Alip $ sudo cp uboot-imx/SPL /media/rootfs/opt/images/Alip $ sudo cp uboot-imx/u-boot.img /media/rootfs/opt/images/Alip $ sudo cp linux-2.6-imx/arch/arm/boot/uImage /media/rootfs/opt/images/Alip $ sudo cp linux-2.6-imx/arch/arm/boot/dts/*var*.dtb /media/rootfs/opt/images/Alip $ sudo cp ~/Downloads/linaro-alip-20151215-v1.tar.bz2 /media/rootfs/opt/images/Alip
3 Boot your target from SDCARD
Booting your specific Developer Kit: Select the one you are using.
3.1 MX6CustomBoard
Booting your MX6CustomBoard system from SDCARD requires while powering up the system. See picture below.
To boot board with SD-Card, Follow the steps below:
- Power-off the board.
- Insert the SD card into the SD/MMC slot of the carrier board (DVK)
- Push the middle button (Boot Select) and hold
- Power-up board
- Release the middle button (Boot Select) after system starts to boot.
- The board will automatically boot into Linux from SD-Card
3.2 SoloCustomBoard
Booting your system requires switching the relevant dip-switch to "Boot from MMC". See picture below.
To boot board with SD-Card, Follow the steps below:
- Power-off the board.
- Insert the SD card into the SD/MMC slot of the carrier board (DVK)
- Switch the relevant dip-switch to "Boot from MMC"
- Power-up board
- The board will automatically boot into Linux from SD-Card
3.3 DT6CustomBoard
Booting your system requires switching the relevant dip-switch to "Boot from SD-Card". See picture below.
To boot board with SD-Card, Follow the steps below:
- Power-off the board.
- Insert the SD card into the SD/MMC slot of the carrier board (DVK)
- Switch the relevant dip-switch to "Boot from SD-Card"
- Power-up board
- The board will automatically boot into Linux from SD-Card
3.4 Automatic device Tree selection in U-Boot
Upon reset you will see the U-BOOT-SPL printouts. It will print the SOM configuration:
- Boot Device MMC or NAND
- Ram size
- Production information
For example:
U-Boot SPL 2013.10-00108-ga2bb081 (Dec 06 2015 - 10:06:45) i.MX6Q SOC P-STD DDR EEPROM configuration Part number: VSM-MX6-C01 Assembly: AS15 Date of production: 2015 Nov 02 Ram size 1024 Boot Device : MMC1 Load image from RAW...
As explained in the above Build Results table we have 6 optional configurations.
We implemented in U-BOOT and automatic device tree selection, so when kernel boots, the u-boot will load the corresponding device tree according to On-SOM configuration. This is only valid for booting from SDCARD.
Based on the hardware we will set 2 environment variables in U-Boot.
- fdt_file - Will be set to reflect SOM/CustomBoard pair.
- screen_alternate=yes - Will be appended to all relevant bootargs in case that you are using capacitive display.
The table below list the possible options:
SOM type |
Carrier Board type |
LCD Type |
Evaluation Kit name |
Device Tree Name |
Screen Alternate |
---|---|---|---|---|---|
VAR-SOM-MX6_V2 (Quad / Dual) | VAR-MX6CustomBoard | Capacitive touch | VAR-DVK-MX6_V2-PRO VAR-STK-MX6_V2 |
imx6q-var-som.dtb | Yes |
VAR-SOM-MX6_V2 (Quad / Dual) | VAR-MX6CustomBoard | Resistive touch | VAR-DVK-MX6_V2-PRO VAR-STK-MX6_V2 |
imx6q-var-som.dtb | No |
VAR-SOM-MX6_V2 (Quad / Dual) | VAR-SOLOCustomBoard | Capacitive LVDS touch | N/A | imx6q-var-som-vsc.dtb | N/A |
VAR-SOM-MX6_V2 (DualLite/ Solo) | VAR-MX6CustomBoard | Capacitive touch | N/A | imx6dl-var-som.dtb | Yes |
VAR-SOM-MX6_V2 (DualLite/ Solo) | VAR-MX6CustomBoard | Resistive touch | N/A | imx6dl-var-som.dtb | No |
VAR-SOM-SOLO / VAR-SOM-DUAL | VAR-SOLOCustomBoard | Capacitive LVDS touch | VAR-DVK-SOLO/DUAL VAR-STK-SOLO/DUAL | imx6dl-var-som-solo-vsc.dtb | N/A |
VAR-SOM-SOLO / VAR-SOM-DUAL | VAR-MX6CustomBoard | Capacitive/Resistive touch | N/A | imx6dl-var-som-solo.dtb | N/A |
VAR-SOM-SOLO / VAR-SOM-DUAL | VAR-DT6CustomBoard | Capacitive LVDS touch | VAR-STK-DT6.VAR-DVK-DT6 | imx6q-var-dart.dtb | N/A |
3.5 Disable Automatic Device Tree selection
To disable the automatic device tree selection in u-boot:
$ setenv var_auto_fdt_file=N $ saveenv
Now you can set the device tree to meet your requirments. For example:
$ setenv fdt_file=imx6q-var-som.dtb $ screen_alternate=yes $ saveenv
Will select device tree that has i.MX6 Quad/Dual running on MX6CustomBoard.
Make sure you don't set am illegal value like "imx6q-var-som.dtb" in a QUAD that is running on SoloCustomBoard.
4 Format and partition the target eMMC
Boot your target and:
$ fdisk /dev/mmcblk1 n p 1 <enter for default> <enter for default> t 83 w $ mkfs.ext4 /dev/mmcblk1p1 -Lrootfs
5 Install U-Boot and Linux Kernel images
Make sure you built U-Boot for NAND.
$ flash_erase /dev/mtd0 0 0 $ cd /opt/images/ $ kobs-ng init -x SPL --search_exponent=1 -v > /dev/null $ flash_erase /dev/mtd1 0 0 $ nandwrite -p /dev/mtd1 u-boot.img $ $ flash_erase /dev/mtd2 0 0 $ nandwrite -p /dev/mtd2 uImage $ nandwrite -p /dev/mtd1 -s 0x1e0000 imx6q-var-som.dtb $ sync
6 Install the root file system
$ mkdir tmp $ mount /dev/mmcblk1p1 tmp/ $ tar xf linaro-alip-20151215-v1.tar.bz2 -C tmp/ $ umount tmp $ rm -rf tmp
7 Deploy the kernel modules
$ cd ~/var-som-mx6-alip/linux-2.6-imx $ sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules_install INSTALL_MOD_PATH=/media/rootfs/
8 Deploy the Wi-Fi modules and firmware
$ cd ~/var-som-mx6-alip/build-utilites $ gedit setup-env set: export ROOTFS=/media/rootfs
$ ./sudo_build_wl18xx.sh modules $ ./sudo_build_wl18xx.sh firmware $ ./sudo_build_wl18xx.sh bt-firmware $ sudo umount /dev/sdxxx*
9 u-boot paramters
echo "Please stop at u-boot and set enviroment" echo "setenv bootargs console=ttymxc0,115200 video=mxcfb1:off root=/dev/mmcblk1p1 rootwait rw" echo "saveenv"