VAR-SOM-MX6 Ubuntu Flash Ubuntu Alip to eMMC: Difference between revisions
(18 intermediate revisions by the same user not shown) | |||
Line 21: | Line 21: | ||
# Deploy the Wi-Fi modules and firmware | # Deploy the Wi-Fi modules and firmware | ||
= Copy required file to your | = Copy required file to your SDCARD = | ||
{{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> | <pre> | ||
Plug-In the bootable SDCARD | |||
$ cd ~/var-som-mx6-alip/ | $ cd ~/var-som-mx6-alip/ | ||
$ sudo cp uboot-imx/SPL rootfs/ | $ sudo mkdir -p /media/rootfs/opt/images/Alip | ||
$ sudo cp uboot-imx/u-boot.img rootfs/ | $ sudo cp uboot-imx/SPL /media/rootfs/opt/images/Alip | ||
$ sudo cp linux-2.6-imx/arch/arm/boot/uImage rootfs/ | $ sudo cp uboot-imx/u-boot.img /media/rootfs/opt/images/Alip | ||
$ sudo cp linux-2.6-imx/arch/arm/boot/dts/*var*.dtb rootfs/ | $ 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 ~ | $ sudo cp ~/Downloads/linaro-alip-20151215-v3.tar.bz2 /media/rootfs/opt/images/Alip | ||
$ sudo umount /media/BOT-VARSOM | |||
$ sudo umount /media/rootfs | |||
</pre> | </pre> | ||
= Boot your target from SDCARD = | |||
Booting your specific Developer Kit: Select the one you are using. | |||
== MX6CustomBoard == | |||
Booting your MX6CustomBoard system from SDCARD requires while powering up the system. See picture below. | |||
[[File:Mx6_boot.jpg|thumb|none|upright=2.0]] | |||
To boot board with SD-Card, Follow the steps below:<br> | |||
*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 | |||
== SoloCustomBoard == | |||
Booting your system requires switching the relevant dip-switch to "Boot from MMC". See picture below. | |||
[[File:Solo_boot.jpg|thumb|none|upright=2.0]] | |||
To boot board with SD-Card, Follow the steps below:<br> | |||
*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 | |||
== DT6CustomBoard == | |||
Booting your system requires switching the relevant dip-switch to "Boot from SD-Card". See picture below. | |||
[[File:Dart_boot.jpg|thumb|none|upright=2.0]] | |||
To boot board with SD-Card, Follow the steps below:<br> | |||
*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 | |||
== 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: | |||
<pre> | |||
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... | |||
</pre> | |||
As explained in the above [[VAR-SOM-MX6 Yocto Fido R2 Build Yocto release#Build_Results| Build Results]] table we have 6 optional configurations. | |||
<br>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. | |||
<br>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. | |||
<br> | |||
The table below list the possible options: | |||
{| class="wikitable" | |||
! scope="col" | SOM type<br/> | |||
! scope="col" | Carrier Board type<br/> | |||
! scope="col" | LCD Type<br/> | |||
! scope="col" | Evaluation Kit name<br/> | |||
! scope="col" | Device Tree Name<br/> | |||
! scope="col" | Screen Alternate<br/> | |||
|- | |||
| VAR-SOM-MX6_V2 (Quad / Dual) | |||
| VAR-MX6CustomBoard | |||
| Capacitive touch | |||
| VAR-DVK-MX6_V2-PRO<br/>VAR-STK-MX6_V2 | |||
| imx6q-var-som.dtb | |||
| Yes | |||
|- | |||
| VAR-SOM-MX6_V2 (Quad / Dual) | |||
| VAR-MX6CustomBoard | |||
| Resistive touch | |||
| VAR-DVK-MX6_V2-PRO<br/>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 | |||
|- | |||
|} | |||
== Disable Automatic Device Tree selection == | |||
To disable the automatic device tree selection in u-boot: | |||
<pre> | |||
$ setenv var_auto_fdt_file=N | |||
$ saveenv | |||
</pre> | |||
Now you can set the device tree to meet your requirments. For example: | |||
<pre> | |||
$ setenv fdt_file=imx6q-var-som.dtb | |||
$ screen_alternate=yes | |||
$ saveenv | |||
</pre> | |||
Will select device tree that has i.MX6 Quad/Dual running on MX6CustomBoard. | |||
{{note|Comment:<br/>Make sure you don't set am illegal value like "imx6q-var-som.dtb" in a QUAD that is running on SoloCustomBoard.|info}} | |||
= Format and partition the target eMMC = | = Format and partition the target eMMC = | ||
Boot your target and: | Boot your target and: | ||
Line 50: | Line 194: | ||
= Install U-Boot and Linux Kernel images = | = Install U-Boot and Linux Kernel images = | ||
{{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>$ cd /opt/images/Alip | ||
$ flash_erase /dev/mtd0 0 0 | |||
$ 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 | ||
Line 64: | Line 209: | ||
<pre>$ mkdir tmp | <pre>$ mkdir tmp | ||
$ mount /dev/mmcblk1p1 tmp/ | $ mount /dev/mmcblk1p1 tmp/ | ||
$ tar xf linaro-alip-20151215- | $ tar xf linaro-alip-20151215-v3.tar.bz2 -C tmp/ | ||
$ rm -rf tmp/lib/modules/* | |||
$ tar xvf alip_modules.tar.bz2 -C tmp/ | |||
$ umount tmp | $ umount tmp | ||
$ rm -rf tmp | $ rm -rf tmp | ||
Line 71: | Line 218: | ||
= Deploy the kernel modules = | = Deploy the kernel modules = | ||
<pre> | <pre> | ||
</pre> | </pre> | ||
= Deploy the Wi-Fi modules and firmware = | = Deploy the Wi-Fi modules and firmware = | ||
<pre> | <pre> | ||
</pre> | </pre> | ||
= u-boot paramters = | |||
To use Yocto eMMC file system stop at u-boot and change boot arguments to : | |||
<pre> | <pre> | ||
$ | $ setenv bootargs console=ttymxc0,115200 video=mxcfb1:off root=/dev/mmcblk1p1 rootwait rw | ||
$ saveenv | |||
$ | |||
</pre> | </pre> | ||
Latest revision as of 06:47, 19 January 2016
Under construction!!! Under construction!!! Under construction!!!
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
Copy required file to your SDCARD
Make sure you built U-Boot for NAND.
Plug-In the bootable SDCARD $ cd ~/var-som-mx6-alip/ $ sudo 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-v3.tar.bz2 /media/rootfs/opt/images/Alip $ sudo umount /media/BOT-VARSOM $ sudo umount /media/rootfs
Boot your target from SDCARD
Booting your specific Developer Kit: Select the one you are using.
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
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
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
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 |
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.
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
Install U-Boot and Linux Kernel images
Make sure you built U-Boot for NAND.
$ cd /opt/images/Alip $ flash_erase /dev/mtd0 0 0 $ 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
Install the root file system
$ mkdir tmp $ mount /dev/mmcblk1p1 tmp/ $ tar xf linaro-alip-20151215-v3.tar.bz2 -C tmp/ $ rm -rf tmp/lib/modules/* $ tar xvf alip_modules.tar.bz2 -C tmp/ $ umount tmp $ rm -rf tmp
Deploy the kernel modules
Deploy the Wi-Fi modules and firmware
u-boot paramters
To use Yocto eMMC file system stop at u-boot and change boot arguments to :
$ setenv bootargs console=ttymxc0,115200 video=mxcfb1:off root=/dev/mmcblk1p1 rootwait rw $ saveenv