|
|
(3 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
| = Yocto =
| | {{PageHeader|DART-6UL - U-Boot features}} {{DocImage|category1=DART-6UL|category2=}} |
| == Documentation ==
| |
| === Morty 2.2.1 ===
| |
| <section begin=YOCTO_DOC_2.2.1/>
| |
| * Yocto Project Core - Morty 2.2.1 (released on 02/24/2017)
| |
| Documentation is available from [https://www.yoctoproject.org/downloads/core/morty221 www.yoctoproject.org]
| |
| <section end=YOCTO_DOC_2.2.1/>
| |
| === FSLC BSP 2.2 ===
| |
| <section begin=YOCTO_DOC_FSLC_BSP_2.2/>
| |
| * FSL Community BSP Release Notes 2.2 documentation
| |
| Documentation is available from [http://freescale.github.io/doc/release-notes/2.2/ http://freescale.github.io]
| |
| <section end=YOCTO_DOC_FSLC_BSP_2.2/>
| |
| === FSL BSP L4.1.15_2.0.0-ga ===
| |
| <section begin=YOCTO_DOC_FSL_BSP_L4.1.15_2.0.0-ga/>
| |
| *Kernel documentation from fsl-yocto-L4.1.15_2.0.0-ga release
| |
| Documentation is available for download from fsl-yocto-imx-4.1.15_2.0.0-docs
| |
| <section end=YOCTO_DOC_FSL_BSP_L4.1.15_2.0.0-ga/>
| |
|
| |
|
| = VAR-SOM-MX6 = | | == Splash Screen == |
| == Build Results ==
| | A splash screen is enabled by default, and is shown on the LVDS LCD.<br> |
| <section begin=VAR-SOM-MX6_BUILD_RESULTS/>
| | To disable the splash screen, enter the following in the U-Boot command line interface: |
| {| class="wikitable"
| |
| |-
| |
| ! scope="col" | Device Tree Name<br/>
| |
| ! scope="col" | SOM type<br/>
| |
| ! scope="col" | Carrier Board type<br/>
| |
| ! scope="col" | LCD Type<br/>
| |
| ! scope="col" | Evaluation Kit name<br/>
| |
| |-
| |
| | style="padding: 5px;"| uImage-imx6q-var-som-cap.dtb
| |
| | style="padding: 5px;"| VAR-SOM-MX6_V2 (Quad / Dual)
| |
| | style="padding: 5px;"| VAR-MX6CustomBoard
| |
| | style="padding: 5px;"| Capacitive touch
| |
| | style="padding: 5px;"| VAR-DVK-MX6_V2-PRO<br>VAR-STK-MX6_V2
| |
| |-
| |
| | style="padding: 5px;"| uImage-imx6q-var-som-res.dtb
| |
| | style="padding: 5px;"| VAR-SOM-MX6_V2 (Quad / Dual)
| |
| | style="padding: 5px;"| VAR-MX6CustomBoard
| |
| | style="padding: 5px;"| Resistive touch
| |
| | style="padding: 5px;"| VAR-DVK-MX6_V2-PRO<br>VAR-STK-MX6_V2
| |
| |-
| |
| | style="padding: 5px;"| uImage-imx6q-var-som-vsc.dtb
| |
| | style="padding: 5px;"| VAR-SOM-MX6_V2 (Quad / Dual)
| |
| | style="padding: 5px;"| VAR-SOLOCustomBoard
| |
| | style="padding: 5px;"| Capacitive LVDS touch
| |
| | style="padding: 5px;"| N/A
| |
| |-
| |
| | style="padding: 5px;"| uImage-imx6dl-var-som-cap.dtb
| |
| | style="padding: 5px;"| VAR-SOM-MX6_V2 (DualLite/ Solo)
| |
| | style="padding: 5px;"| VAR-MX6CustomBoard
| |
| | style="padding: 5px;"| Capacitive touch
| |
| | style="padding: 5px;"| N/A
| |
| |-
| |
| | style="padding: 5px;"| uImage-imx6dl-var-som-res.dtb
| |
| | style="padding: 5px;"| VAR-SOM-MX6_V2 (DualLite/ Solo)
| |
| | style="padding: 5px;"| VAR-MX6CustomBoard
| |
| | style="padding: 5px;"| Resistive touch
| |
| | style="padding: 5px;"| N/A
| |
| |-
| |
| | style="padding: 5px;"| uImage-imx6dl-var-som-vsc.dtb
| |
| | style="padding: 5px;"| VAR-SOM-MX6_V2 (DualLite/ Solo)
| |
| | style="padding: 5px;"| VAR-SOLOCustomBoard
| |
| | style="padding: 5px;"| Capacitive LVDS touch
| |
| | style="padding: 5px;"| N/A
| |
| |-
| |
| | style="padding: 5px;"| uImage-imx6dl-var-som-solo-vsc.dtb
| |
| | style="padding: 5px;"| VAR-SOM-SOLO / VAR-SOM-DUAL
| |
| | style="padding: 5px;"| VAR-SOLOCustomBoard
| |
| | style="padding: 5px;"| Capacitive LVDS touch
| |
| | style="padding: 5px;"| VAR-DVK-SOLO/DUAL<br>VAR-STK-SOLO/DUAL
| |
| |-
| |
| | style="padding: 5px;"| uImage-imx6dl-var-som-solo-cap.dtb
| |
| | style="padding: 5px;"| VAR-SOM-SOLO / VAR-SOM-DUAL
| |
| | style="padding: 5px;"| VAR-MX6CustomBoard
| |
| | style="padding: 5px;"| Capacitive touch
| |
| | style="padding: 5px;"| N/A
| |
| |-
| |
| | style="padding: 5px;"| uImage-imx6dl-var-som-solo-res.dtb
| |
| | style="padding: 5px;"| VAR-SOM-SOLO / VAR-SOM-DUAL
| |
| | style="padding: 5px;"| VAR-MX6CustomBoard
| |
| | style="padding: 5px;"| Resistive touch
| |
| | style="padding: 5px;"| N/A
| |
| |-
| |
| | style="padding: 5px;"| uImage-imx6q-var-dart.dtb
| |
| | style="padding: 5px;"| VAR-SOM-SOLO / VAR-SOM-DUAL
| |
| | style="padding: 5px;"| VAR-DT6CustomBoard
| |
| | style="padding: 5px;"| Capacitive LVDS touch
| |
| | style="padding: 5px;"| VAR-DVK-DT6<br>VAR-STK-DT6
| |
| |-
| |
| |}
| |
| <section end=VAR-SOM-MX6_BUILD_RESULTS/>
| |
|
| |
|
| == Device tree == | | => run disable_splash |
| <section begin=VAR-SOM-MX6_DTB/>
| | => saveenv && reset |
| <pre>
| |
| Build the device tree for Dualite/Solo on VAR-MX6CustomBoard with capacitive touchscreen:
| |
| $ make -j4 imx6dl-var-som-cap.dtb
| |
| | |
| Build the device tree for Dualite/Solo on VAR-MX6CustomBoard with resistive touchscreen:
| |
| $ make -j4 imx6dl-var-som-res.dtb
| |
|
| |
|
| Build the device tree for Dualite/Solo on VAR-SOLOCustomBoard:
| | And to re-enable it: |
| $ make -j4 imx6dl-var-som-vsc.dtb
| |
|
| |
|
| Build the device tree for Quad/Dual on VAR-MX6CustomBoard with capacitive touchscreen:
| | => run enable_splash |
| $ make -j4 imx6q-var-som-cap.dtb
| | => saveenv && reset |
|
| |
|
| Build the device tree for Quad/Dual on VAR-MX6CustomBoard with resistive touchscreen:
| | The splash image is taken from /boot/splash.bmp in the root file system.<br><br> |
| $ make -j4 imx6q-var-som-res.dtb
| |
|
| |
|
| Build the device tree for Quad/Dual on VAR-SOLOCustomBoard:
| | === Automatic Splash source selection === |
| $ make -j4 imx6q-var-som-vsc.dtb
| | The splash image will be taken from whichever rootfs that is going to be mounted later at boot. |
| | To enable the automatic selection (already enabled by default): |
|
| |
|
| Build the device tree for VAR-SOM-SOLO on VAR-MX6CustomBoard with capacitive touchscreen:
| | $ setenv splashsourceauto yes |
| $ make -j4 imx6dl-var-som-solo-cap.dtb | | $ saveenv |
|
| |
|
| Build the device tree for VAR-SOM-SOLO on VAR-MX6CustomBoard with resistive touchscreen:
| | To disable the automatic selection: |
| $ make -j4 imx6dl-var-som-solo-res.dtb
| |
|
| |
|
| Build the device tree for VAR-SOM-SOLO on VAR-SOLOCustomBoard:
| | $ setenv splashsourceauto no |
| $ make -j4 imx6dl-var-som-solo-vsc.dtb | | $ setenv splashsource YOUR_SELECTION |
| | $ saveenv |
|
| |
|
| Build the device tree for DART-MX6:
| | YOUR_SELECTION should be one of {sd, emmc, nand} (nand means UBIFS) |
| $ make -j4 imx6q-var-dart.dtb
| |
| </pre> | | </pre> |
| <section end=VAR-SOM-MX6_DTB/>
| |
|
| |
|
| == SD card image file tree ==
| | Note:<br> |
| <section begin=VAR-SOM-MX6_SD_TREE/>
| | * In case the rootfs is a UBIFS, mounting it in order to load the splash file will add ~1.8 seconds to the boot time. |
| <pre> | | <br> |
| /opt/images/
| |
| └── Yocto
| |
| ├── SPL-nand
| |
| ├── SPL-sd
| |
| ├── imx6dl-var-som-cap.dtb
| |
| ├── imx6dl-var-som-res.dtb
| |
| ├── imx6dl-var-som-solo-cap.dtb
| |
| ├── imx6dl-var-som-solo-res.dtb
| |
| ├── imx6dl-var-som-solo-vsc.dtb
| |
| ├── imx6dl-var-som-vsc.dtb
| |
| ├── imx6q-var-dart.dtb
| |
| ├── imx6q-var-som-cap.dtb
| |
| ├── imx6q-var-som-res.dtb
| |
| ├── imx6q-var-som-vsc.dtb
| |
| ├── rootfs.tar.bz2
| |
| ├── rootfs.ubi
| |
| ├── u-boot.img-nand
| |
| ├── u-boot.img-sd
| |
| └── uImage
| |
| </pre>
| |
| <section end=VAR-SOM-MX6_SD_TREE/> | |
|
| |
|
| == Flash Recovery SD from GUI == | | === Using your own LCD screen === |
| <section begin=VAR-SOM-MX6_FLASH_SD_FROM_GUI/>
| | There is support for the 800x480 LCD screen that Variscite uses.<br> |
| [[File:VAR-SOM-MX6_Krogoth_Recovery.png]]
| | If you want to add support for a different LCD that is not currently supported, you need to edit the <span style="font-family:Consolas;">displays[]</span> array in <span style="font family:Consolas;">board/variscite/mx6ul_var_dart/mx6ul_var_dart.c</span> in the U-Boot source code, according to your LCD parameters.<br> |
| <br><br>
| | <br> |
| Click the appropriate button:
| |
| * Install Yocto SOLOCB NAND: Flash Yocto on NAND flash, on [http://www.variscite.com/products/single-board-computers/var-solocustomboard VAR-SOLOCustomBoard]
| |
| * Install Yocto SOLOCB eMMC: Flash Yocto on eMMC, on [http://www.variscite.com/products/single-board-computers/var-solocustomboard VAR-SOLOCustomBoard]
| |
| * Install Yocto MX6CB Res NAND: Flash Yocto with Resistive touch panel support on NAND flash, on [http://www.variscite.com/products/single-board-computers/var-mx6customboard VAR-MX6CustomBoard]
| |
| * Install Yocto MX6CB Cap NAND: Flash Yocto with Capacitive touch panel support on NAND flash, on [http://www.variscite.com/products/single-board-computers/var-mx6customboard VAR-MX6CustomBoard]
| |
| * Install Yocto MX6CB Res eMMC: Flash Yocto with Resistive touch panel support on eMMC, on [http://www.variscite.com/products/single-board-computers/var-mx6customboard VAR-MX6CustomBoard]
| |
| * Install Yocto MX6CB Cap eMMC: Flash Yocto with Capacitive touch panel support on eMMC, on [http://www.variscite.com/products/single-board-computers/var-mx6customboard VAR-MX6CustomBoard].
| |
| * Install Yocto DART (eMMC): Flash Yocto on eMMC, on [http://www.variscite.com/products/single-board-computers/dt6customboard VAR-DT6CustomBoard]<section end=VAR-SOM-MX6_FLASH_SD_FROM_GUI/>
| |
|
| |
|
| == Setting the Boot Mode == | | == USB ports == |
| <section begin=VAR-SOM-MX6_BOOT_BOARD/>
| | In the DART-6UL U-Boot:<br> |
| Follow the instruction below according to the appropriate carrier board type:
| | USB port 1 (lower type-A receptacle) is defined as USB Host.<br> |
| === MX6CustomBoard ===
| | USB port 0 (micro USB receptacle / upper type-A receptacle) is defined as USB Client. |
| Booting your MX6CustomBoard system from SD card requires pushing the middle button while powering up the system. See picture below.
| |
| [[File:Mx6_boot.jpg|thumb|none|upright=2.0]]
| |
| To boot a board using an 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 the board
| |
| * Release the middle button (Boot Select) after system starts to boot.
| |
| * The board will automatically boot into Linux from the SD card
| |
|
| |
|
| === SoloCustomBoard === | | == USB Mass Storage gadget == |
| Booting your system requires switching the relevant DIP switch to "Boot from MMC". See picture below.
| | You can use the board as a USB Mass Storage device:<br> |
| [[File:Solo_boot.jpg|thumb|none|upright=2.0]]
| | You will be able to access all the partitions of any block device that is on the board or connected to it, from your host PC - You will see them as /dev/sdXX, just like connecting a regular USB storage to your PC, and you'll be able to mount them, and have full read/write access to them. You can even use it to flash a new U-Boot, re-partition the storage, re-format it, etc.<br> |
| | This is especially useful for updating the internal eMMC.<br><br> |
| | To do this you need to connect a USB cable between the USB Client port of the board and a regular USB Host port on your PC, and use U-Boot's ums command.<br><br> |
|
| |
|
| To boot board with SD card, Follow the steps below:<br>
| | General ums usage is: |
| | <pre> |
| | ums <USB_controller> [<devtype>] <devnum> e.g. ums 0 mmc 0 |
| | devtype defaults to mmc |
| | </pre> |
| | devtype can be any block device (e.g. mmc, usb)<br><br> |
|
| |
|
| *Power-off the board.
| | To mount the eMMC:<br> |
| *Insert the SD card into the SD/MMC slot of the carrier board (DVK)
| | <pre> |
| *Switch the relevant DIP switch to "Boot from MMC"
| | => ums 0 mmc 1 |
| *Power-up board
| | </pre> |
| *The board will automatically boot into Linux from SD card
| | To mount an SD card:<br> |
| | <pre> |
| | => ums 0 mmc 0 |
| | </pre> |
| | Depending on your host PC, it may automatically mount it or not. If not, you can use dmesg to see the names of the device and its partitions (it should be in the form of /dev/sdXX) and mount them yourself.<br> |
| | To exit the ums command and disconnect the USB device press ctrl+c.<br><br> |
|
| |
|
| === DT6CustomBoard ===
| | Note: You should use a Linux PC host as Windows can't naturally read ext file systems.<br><br> |
| 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>
| | == USB Ethernet Gadget == |
| | The USB Ethernet gadget allows you to make the board act as a USB Ethernet device when connecting its USB Client port to a host PC using a USB cable.<br> |
| | Basically, it allows for "Ethernet over USB".<br> |
| | This is especially useful if you build a custom board without an Ethernet interface and you want to boot via network using TFTP.<br><br> |
|
| |
|
| *Power-off the board.
| | For this, a new Ethernet interface called <span style="font-family:Consolas;">usb_ether</span> was added to U-Boot.<br><br> |
| *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
| |
| <section end=VAR-SOM-MX6_BOOT_BOARD/> | |
|
| |
|
| = DART-6UL=
| | Before actually using it you should get to know the following environment variables:<br> |
| | | Variables specific to this gadget: |
| == Build Results ==
| | <pre> |
| <section begin=DART-6UL_BUILD_RESULTS/> | | usbnet_devaddr - The virtual MAC address of the device (the board side) - f8:dc:7a:00:00:02 by default. |
| {| class="wikitable"
| | usbnet_hostaddr - The virtual MAC address of the host (the PC side) - f8:dc:7a:00:00:01 by default. |
| |-
| | </pre> |
| ! scope="col" | File Name
| | General network variables: |
| ! scope="col" | Description
| | <pre> |
| |-
| | ethprime - Sets the primary Ethernet interface. This is the interface that will be tried first. |
| | style="padding: 5px;"| zImage-imx6ul-var-dart-emmc_wifi.dtb
| | ethact - Sets the currently active Ethernet interface. Normally, it is modified by the Ethernet driver, but you can change it if you want to override. |
| | style="padding: 5px;"| Device tree blob for DART-6UL with eMMC & WI-FI enabled. (SD card & NAND disabled)
| | ipaddr - IP address of the device - needed for tftp command. |
| |-
| | netmask - Subnet Mask. |
| | style="padding: 5px;"| zImage-imx6ul-var-dart-nand_wifi.dtb
| | serverip - TFTP server IP address - needed for tftp command. |
| | style="padding: 5px;"| Device tree blob for DART-6UL with NAND flash & WI-FI enabled. (SD card & eMMC disabled)
| | </pre> |
| |-
| | So, for example: |
| | style="padding: 5px;"| zImage-imx6ul-var-dart-sd_emmc.dtb
| |
| | style="padding: 5px;"| Device tree blob for DART-6UL with SD card & eMMC enabled (WIFI & NAND disabled)
| |
| |-
| |
| | style="padding: 5px;"| zImage-imx6ul-var-dart-sd_nand.dtb
| |
| | style="padding: 5px;"| Device tree blob for DART-6UL with SD card & NAND flash enabled (WIFI & eMMC disabled)
| |
| |-
| |
| | style="padding: 5px;"| zImage-imx6ull-var-dart-emmc_wifi.dtb
| |
| | style="padding: 5px;"| Device tree blob for DART-6ULL with eMMC & WI-FI enabled. (SD card & NAND disabled)
| |
| |-
| |
| | style="padding: 5px;"| zImage-imx6ull-var-dart-nand_wifi.dtb
| |
| | style="padding: 5px;"| Device tree blob for DART-6ULL with NAND flash & WI-FI enabled. (SD card & eMMC disabled)
| |
| |-
| |
| | style="padding: 5px;"| zImage-imx6ull-var-dart-sd_emmc.dtb
| |
| | style="padding: 5px;"| Device tree blob for DART-6ULL with SD card & eMMC enabled (WIFI & NAND disabled)
| |
| |-
| |
| | style="padding: 5px;"| zImage-imx6ull-var-dart-sd_nand.dtb
| |
| | style="padding: 5px;"| Device tree blob for DART-6ULL with SD card & NAND flash enabled (WIFI & eMMC disabled)
| |
| |-
| |
| |}
| |
| <section end=DART-6UL_BUILD_RESULTS/> | |
| | |
| == Device tree ==
| |
| <section begin=DART-6UL_DTB/>
| |
| <pre> | | <pre> |
| Build only the device tree for DART-6UL with eMMC and WiFi:
| | => setenv ethact usb_ether |
| $ make -j4 imx6ul-var-dart-emmc_wifi.dtb
| | => setenv ipaddr 192.168.0.100 |
| | => setenv netmask 255.255.255.0 |
| | => setenv serverip 192.168.0.101 |
| | </pre> |
| | And now your are ready to use <span style="font-family:Consolas;">tftpboot</span> over the <span style="font-family:Consolas;">usb_ether</span> interface.<br><br> |
|
| |
|
| Build only the device tree for DART-6UL with eMMC and SD card:
| | Notes: |
| $ make -j4 imx6ul-var-dart-sd_emmc.dtb
| | * Once you run a network command, e.g. tftpboot, the gadget will be connected to your host PC and a new network adapter will be added to it, for the duration of the network interaction. |
| | * Note that you may need to configure your host PC to use the new network adapter properly - this configuration is OS dependent.<br><br> |
|
| |
|
| Build only the device tree for DART-6UL with NAND flash and WiFi:
| | = General U-Boot commands = |
| $ make -j4 imx6ul-var-dart-nand_wifi.dtb
| |
|
| |
|
| Build only the device tree for DART-6UL with NAND flash and SD card:
| | == List all supported commands and their description/usage (help command) == |
| $ make -j4 imx6ul-var-dart-sd_nand.dtb
| | List all supported commands with a brief description for each one: |
| | <pre> |
| | => help |
| | </pre> |
| | Print the description and usage of 'command': |
| | <pre> |
| | => help command |
| | </pre><br> |
|
| |
|
| Build only the device tree for DART-6ULL with eMMC and WiFi:
| | == Environment handling commands == |
| $ make -j4 imx6ull-var-dart-emmc_wifi.dtb
| | Print the values of all environment variables: |
| | <pre> |
| | => printenv |
| | </pre> |
| | Print value of environment variable 'name': |
| | <pre> |
| | => printenv name |
| | </pre> |
| | Set environment variable 'name' to 'value ...': |
| | <pre> |
| | => setenv name value ... |
| | </pre> |
| | Delete environment variable 'name': |
| | <pre> |
| | => setenv name |
| | </pre> |
| | Reset default environment: |
| | <pre> |
| | => env default -a |
| | </pre> |
| | Save environment variables to persistent storage: |
| | <pre> |
| | => saveenv |
| | </pre><br> |
|
| |
|
| Build only the device tree for DART-6ULL with eMMC and SD card:
| | == File System access == |
| $ make -j4 imx6ull-var-dart-sd_emmc.dtb
| | List files in a directory (default /): |
| | <pre> |
| | => ls <interface> [<dev[:part]>] [directory] |
| | </pre> |
| | For example: |
| | <pre> |
| | List files in the BOOT partition of our NAND/eMMC Recovery SD card (after booting from it): |
| | => ls mmc 0:1 |
|
| |
|
| Build only the device tree for DART-6ULL with NAND flash and WiFi:
| | List files in directory /opt/images/Yocto in the rootfs partition of our NAND/eMMC Recovery SD card (after booting from it): |
| $ make -j4 imx6ull-var-dart-nand_wifi.dtb
| | => ls mmc 0:2 /opt/images/Yocto |
| | </pre><br> |
|
| |
|
| Build only the device tree for DART-6ULL with NAND flash and SD card:
| | Load binary file 'filename' from a partition to RAM address 'addr': |
| $ make -j4 imx6ull-var-dart-sd_nand.dtb
| | <pre> |
| | => load <interface> [<dev[:part]> [<addr> [<filename> [bytes [pos]]]]] |
| </pre> | | </pre> |
| <section end=DART-6UL_DTB/> | | For example: |
| | <pre> |
| | Load /boot/splash.bmp from the rootfs partition of our NAND/eMMC Recovery SD card (after booting from it) to RAM address 0x18100000: |
| | => load mmc 0:2 0x18100000 /boot/splash.bmp |
| | </pre><br> |
|
| |
|
| == SD card image file tree == | | === UBI File System === |
| <section begin=DART-6UL_SD_TREE/> | | This is the FS we use on our NAND flash.<br> |
| | UBIFS is very different to any traditional file system - it does not work on top of block devices (like hard drives, MMC/SD cards, USB flash drives, SSDs, etc).<br> |
| | UBIFS was designed to work on top of raw flash.<br><br> |
| | The usage is a little different than using FAT/ext.<br> |
| | Before you can access the UBIFS you need to mount it first: |
| | <pre> |
| | => ubi part rootfs |
| | => ubifsmount ubi0:rootfs |
| | </pre> |
| | Now you can access the UBIFS with the regular commands above.<br> |
| | The <interface> in this case is 'ubi', <dev> can be anything (the value is ignored) and part is not necessary.<br> |
| | For example: |
| <pre> | | <pre> |
| /opt/images/ | | List files in directory /home/root on the mounted UBI file system: |
| └── Yocto
| | => ls ubi 0 /home/root |
| ├── imx6ul-var-dart-emmc_wifi.dtb
| |
| ├── imx6ul-var-dart-nand_wifi.dtb
| |
| ├── imx6ul-var-dart-sd_emmc.dtb
| |
| ├── imx6ul-var-dart-sd_nand.dtb
| |
| ├── imx6ull-var-dart-emmc_wifi.dtb
| |
| ├── imx6ull-var-dart-nand_wifi.dtb
| |
| ├── imx6ull-var-dart-sd_emmc.dtb
| |
| ├── imx6ull-var-dart-sd_nand.dtb
| |
| ├── rootfs.tar.bz2
| |
| ├── rootfs.ubi
| |
| ├── SPL-nand
| |
| ├── SPL-sd
| |
| ├── u-boot.img-nand
| |
| ├── u-boot.img-sd
| |
| └── zImage
| |
| </pre> | | </pre> |
| <section end=DART-6UL_SD_TREE/> | | When finished accessing it, unmount the FS: |
| | <pre> |
| | => ubifsumount |
| | </pre><br> |
|
| |
|
| == Flash Recovery SD from GUI == | | == USB sub-system == |
| <section begin=DART-6UL_FLASH_SD_FROM_GUI/> | | To use the USB as host (connect a USB Storage or Ethernet Device to the board), you need to use the usb command.<br> |
| [[File:DART-6UL_Recovery.png]]
| | Usage: |
| <br><br> | | <pre> |
| Touch/Click on the appropriate icon:
| | usb start - start (scan) USB controller |
| * Install Yocto NAND, WiFi: Flash Yocto with WiFi support to NAND flash
| | usb reset - reset (rescan) USB controller |
| * Install Yocto NAND, SD card: Flash Yocto with SD card support to NAND flash
| | usb stop [f] - stop USB [f]=force stop |
| * Install Yocto eMMC (SD/WiFi) : Flash Yocto to eMMC (installs both SD card and WiFi dtbs to the BOOT partition and let U-Boot select between them at boot time)
| | usb tree - show USB device tree |
| <section end=DART-6UL_FLASH_SD_FROM_GUI/>
| | usb info [dev] - show available USB devices |
| | | usb test [dev] [port] [mode] - set USB 2.0 test mode |
| == Setting the Boot Mode ==
| | (specify port 0 to indicate the device's upstream port) |
| <section begin=DART-6UL_BOOT_BOARD/>
| | Available modes: J, K, S[E0_NAK], P[acket], F[orce_Enable] |
| Booting your system from an SD card requires switching the Boot DIP switches. See picture below.
| | usb storage - show details of USB storage devices |
| [[File:Boot_switch_6ul1.jpg|thumb|none|upright=2.0]] | | usb dev [dev] - show or set current USB storage device |
| * "00" The current position in the picture will set the system to boot from SD card.
| | usb part [dev] - print partition table of one or all USB storage devices |
| * "01" Moving the right switch will set the system to boot from eMMC
| | usb read addr blk# cnt - read `cnt' blocks starting at block `blk#' |
| * "10" Moving the left switch will set the system to boot from NAND flash
| | to memory address `addr' |
| * "11" is illegal.
| | usb write addr blk# cnt - write `cnt' blocks starting at block `blk#' |
| {{Note|Be aware that your system has eMMC or NAND but never both.}}
| | from memory address `addr' |
| <section end=DART-6UL_BOOT_BOARD/>
| | </pre> |
| | | First, connect your device to a USB port on the board.<br> |
| == Automatic device Tree selection in U-Boot ==
| | After the device is connected, start the USB controller: |
| <section begin=DART-6UL_U-BOOT_DT_SELECTION/> | |
| Upon reset you will see the U-Boot SPL printouts. It will print also the SOM configuration:
| |
| <br>On-SOM storage: SD only, eMMC, NAND. | |
| <br>WIFI if chip exits.
| |
| <br>For example:
| |
| <pre> | | <pre> |
| U-Boot SPL 2015.10-00532-g482dc88 (Jan 03 2016 - 10:05:42)
| | => usb start |
| i.MX6UL SOC
| |
| Part number: DART-6U-A01
| |
| Assembly: AS11
| |
| Date of production: 2015 Dec 31
| |
| DART-6UL configuration: eMMC WIFI
| |
| Ram size: 512
| |
| Boot Device: SD
| |
| </pre> | | </pre> |
| As explained in the above [[#Build_Results | Build Results]] table we have 4 optional configurations.
| | If you connect/disconnect devices after that, before you can access them you need to rescan the USB controller: |
| <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. | | <pre> |
| | => usb reset |
| | </pre><br> |
|
| |
|
| {| class="wikitable"
| | Known Issue:<br> |
| |-
| | USB Host mode on the OTG port sometimes doesn't work.<br> |
| ! scope="col" | SOM Type<br/>
| | To fix this, you need to disable the D-Cache by adding the following definition to <span style="font-family:Consolas;">include/configs/mx6var_som.h</span> in the U-Boot source code:<br> |
| ! scope="col" | Boot From<br/>
| | CONFIG_SYS_DCACHE_OFF<br><br> |
| ! scope="col" | SOM Internal FLASH<br/>
| |
| ! scope="col" | SOM has WIFI/BT<br/>
| |
| ! scope="col" | Device Tree selected<br/>
| |
| |-
| |
| | DART-6UL
| |
| | SD
| |
| | eMMC
| |
| | Don't Care
| |
| | imx6ul-var-dart-sd_emmc.dtb
| |
| |-
| |
| | DART-6UL
| |
| | SD
| |
| | NAND
| |
| | Don't Care
| |
| | imx6ul-var-dart-sd_nand.dtb
| |
| |-
| |
| | DART-6UL
| |
| | eMMC
| |
| | eMMC
| |
| | Yes
| |
| | imx6ul-var-dart-emmc_wifi.dtb
| |
| |-
| |
| | DART-6UL
| |
| | eMMC
| |
| | eMMC
| |
| | NO
| |
| | imx6ul-var-dart-sd_emmc.dtb
| |
| |-
| |
| | DART-6UL
| |
| | NAND
| |
| | NAND
| |
| | YES
| |
| | imx6ul-var-dart-nand_wifi.dtb
| |
| |-
| |
| | DART-6UL
| |
| | NAND
| |
| | NAND
| |
| | NO
| |
| | imx6ul-var-dart-sd_nand.dtb
| |
| |-
| |
| | DART-6ULL
| |
| | SD
| |
| | eMMC
| |
| | Don't Care
| |
| | imx6ull-var-dart-sd_emmc.dtb
| |
| |-
| |
| | DART-6ULL
| |
| | SD
| |
| | NAND
| |
| | Don't Care
| |
| | imx6ull-var-dart-sd_nand.dtb
| |
| |-
| |
| | DART-6ULL
| |
| | eMMC
| |
| | eMMC
| |
| | Yes
| |
| | imx6ull-var-dart-emmc_wifi.dtb
| |
| |-
| |
| | DART-6ULL
| |
| | eMMC
| |
| | eMMC
| |
| | NO
| |
| | imx6ull-var-dart-sd_emmc.dtb
| |
| |-
| |
| | DART-6ULL
| |
| | NAND
| |
| | NAND
| |
| | YES
| |
| | imx6ull-var-dart-nand_wifi.dtb
| |
| |-
| |
| | DART-6ULL
| |
| | NAND
| |
| | NAND
| |
| | NO
| |
| | imx6ull-var-dart-sd_nand.dtb
| |
| |}
| |
|
| |
|
| <span style="color:red">Note: Boot from SD card eliminates Wifi</span> as the Wifi and SD card are using same SDIO interface.<br>
| | === Using a USB Storage Device === |
| A typical use-case, is to boot from SD card, flash eMMC or NAND flash, and re-boot form eMMC/NAND to have Wi-Fi operational.
| | Once you connected the device and stated the USB controller, you can now use the regular File System commands mentioned [[U-Boot_features#File System access|above]] with it.<br> |
| <section end=DART-6UL_U-BOOT_DT_SELECTION/> | | The <interface> in this case is 'usb'.<br><br> |
|
| |
|
| = VAR-SOM-MX7= | | = Flashing NAND using U-Boot = |
| == Build Results == | | == Flashing U-Boot to NAND == |
| <section begin=VAR-SOM-MX7_BUILD_RESULTS/> | | Assuming you are reading the U-Boot image from our Recovery SD card: |
| {| class="wikitable"
| | <pre> |
| |-
| | => mw.b 0x83100000 0xff 0x200000 # Write 0xFF to RAM in order to pad the image and align it to the NAND erase block size |
| | style="padding: 5px;"| zImage-imx7d-var-som-emmc.dtb
| | => load mmc 0:2 0x83100000 /opt/images/Yocto/u-boot.img # Load the U-Boot image from the SD card to RAM |
| | style="padding: 5px;"| Device tree blob for SOMs with eMMC.
| | => nand erase 0x200000 0x200000 # Erase the part of the NAND saved for the U-Boot image |
| |-
| | => nand write 0x83100000 0x200000 0x200000 # Write the U-Boot image from RAM to NAND |
| | style="padding: 5px;"| zImage-imx7d-var-som-nand.dtb
| | </pre><br> |
| | style="padding: 5px;"| Device tree blob for SOMs with NAND flash.
| |
| |-
| |
| |}
| |
| <section end=VAR-SOM-MX7_BUILD_RESULTS/> | |
|
| |
|
| == Device tree == | | == Flashing the Linux kernel to NAND == |
| <section begin=VAR-SOM-MX7_DTB/>
| | Assuming you are reading the kernel image from our Recovery SD card: |
| <pre> | | <pre> |
| Build only the device tree for VAR-SOM-MX7 with eMMC:
| | => mw.b 0x83100000 0xff 0x7e0000 # Write 0xFF to RAM in order to pad the image and align it to the NAND erase block size |
| $ make -j4 imx7d-var-som-emmc.dtb
| | => load mmc 0:2 0x83100000 /opt/images/Yocto/zImage # Load the Linux kernel image from the SD card to RAM |
| | => nand erase 0x600000 0x7e0000 # Erase the 'kernel' MTD partition |
| | => nand write 0x83100000 0x600000 0x7e0000 # Write the Linux kernel image from RAM to MTD partition 'kernel' |
| | </pre><br> |
|
| |
|
| Build only the device tree for VAR-SOM-MX7 with NAND flash:
| | == Flashing the Linux device tree to NAND == |
| $ make -j4 imx7d-var-som-nand.dtb
| | Assuming you are reading the .dtb file from our Recovery SD card: |
| </pre> | | <pre> |
| <section end=VAR-SOM-MX7_DTB/>
| | => mw.b 0x83100000 0xff 0x20000 # Write 0xFF to RAM in order to pad the image and align it to the NAND erase block size (128KiB) |
| | => load mmc 0:2 0x83100000 /opt/images/Yocto/imx6ul-var-dart-sd_nand.dtb # Load the dtb from the SD card to RAM (choose your desired dtb file) |
| | => nand erase 0xde0000 0x20000 # Erase the part of the NAND saved for the device tree |
| | => nand write 0x83100000 0xde0000 0x20000 # Write the device tree from RAM to NAND |
| | </pre><br> |
| | |
| | == Flashing UBIFS to NAND == |
| | The best way to flash a UBI image is by using ubiformat (which is a part of mtd-utils) under Linux, as it preserves erase counters (our Recovery SD card scripts are using ubiformat).<br> |
| | But if you flash the UBIFS for the first time, then it doesn't matter because there are no erase counters to preserve.<br><br> |
|
| |
|
| == SD card image file tree ==
| | Assuming you are reading the UBI image from our Recovery SD card: |
| <section begin=VAR-SOM-MX7_SD_TREE/>
| |
| <pre> | | <pre> |
| /opt/images/ | | => load mmc 0:2 0x83100000 /opt/images/Yocto/rootfs.ubi # Load the UBI image from the SD card to RAM |
| └── Yocto
| | => nand erase.part rootfs # Erase the 'rootfs' MTD partition |
| ├── imx7d-var-som-emmc.dtb
| | => nand write.trimffs 0x83100000 rootfs $filesize # Write the UBI image from RAM to MTD partition 'rootfs' |
| ├── imx7d-var-som-nand.dtb
| | </pre><br> |
| ├── rootfs.tar.bz2
| |
| ├── rootfs.ubi
| |
| ├── u-boot.imx-nand
| |
| ├── u-boot.imx-sd
| |
| └── zImage
| |
| </pre> | |
| <section end=VAR-SOM-MX7_SD_TREE/> | |
|
| |
|
| == Flash Recovery SD from GUI ==
| | Note:<br> |
| <section begin=VAR-SOM-MX7_FLASH_SD_FROM_GUI/>
| | There is another method to do this using U-Boot, that preserves erase counters, using the higher level ubi command, but you need a UBIFS image for it (which Yocto also creates, but we do not put on our Recovery SD card by default): |
| [[File:VAR-SOM-MX7_Recovery.png]]
| |
| <br><br> | |
| Touch/Click on the appropriate icon:
| |
| * Install Yocto NAND flash: Flash Yocto to NAND flash
| |
| * Install Yocto eMMC: Flash Yocto to eMMC
| |
| <section end=VAR-SOM-MX7_FLASH_SD_FROM_GUI/>
| |
| | |
| == Setting the Boot Mode ==
| |
| <section begin=VAR-SOM-MX7_BOOT_BOARD/>
| |
| Make sure the BOOT SELECT DIP switches on the carrier board are set correctly before you power on the board.
| |
| <pre> | | <pre> |
| SW1-SW2
| | => load mmc 0:2 0x83100000 /opt/images/Yocto/rootfs.ubifs # Load the UBIFS image from an SD card to RAM |
| 0 - 0 : Boot from SD card
| | => ubi part rootfs # Set current MTD partition to 'rootfs' |
| 1 - 0 : Boot from eMMC
| | => ubi remove rootfs # Remove the 'rootfs' UBI volume (if already exists) |
| 0 - 1 : Boot from NAND flash
| | => ubi create rootfs # Create a new dynamic UBI volume (read/write) with max size, and name it 'rootfs' |
| 1 - 1 : Illegal
| | => ubi write 0x83100000 rootfs $filesize # Write the volume from RAM |
| </pre> | | </pre> |
| {{Note|The VAR-SOM-MX7 SOM comes with either NAND or eMMC, but not both.}}
| |
| <section end=VAR-SOM-MX7_BOOT_BOARD/>
| |
|
| |
| =Platform Customizations=
| |
| == VAR-SOM-MX6 ==
| |
| <section begin=RELEASE_MORTY_BETA_VAR-SOM-MX6/>
| |
| {{#vardefine:HARDWARE_NAME|VAR-SOM-MX6}} <!--
| |
| -->{{#vardefine:RELEASE_NAME|morty-fslc-4.1.15-mx6-v1.0-beta}} <!--
| |
| -->{{#vardefine:RELEASE_LINK|RELEASE_MORTY_BETA_VAR-SOM-MX6}} <!--
| |
| -->{{#vardefine:RELEASE_NOTES_LINK|https://docs.google.com/spreadsheets/d/1WN-kGn3r9mcJh0EdSE3wZNBmhw5g5A95facy6gSIFn4/pubhtml}} <!--
| |
| -->{{#vardefine:YOCTO_NAME|Morty}} <!--
| |
| -->{{#vardefine:YOCTO_VERSION|2.2.1}} <!--
| |
| -->{{#vardefine:FSLC_BSP_VERSION|2.2}} <!--
| |
| -->{{#vardefine:FSL_BSP_VERSION|L4.1.15_2.0.0-ga}} <!--
| |
| -->{{#vardefine:GSTREAMER_SUPPORT|yes}} <!-- This parameter enables support for GSTREMAER
| |
| -->{{#vardefine:TOOLCHAIN_INSTALL_X11_NAME|fslc-x11-glibc-x86_64-meta-toolchain-armv7at2hf-neon-toolchain-2.2.1.sh}} <!--
| |
| -->{{#vardefine:TOOLCHAIN_INSTALL_QT5_NAME|fslc-x11-glibc-x86_64-meta-toolchain-qt5-armv7at2hf-neon-toolchain-2.2.1.sh}} <!--
| |
| -->{{#vardefine:TOOLCHAIN_ROOT_LOCATION|/opt/fsl-imx-x11/4.1.15-2.0.1}} <!--
| |
| -->{{#vardefine:TOOLCHAIN_LOCATION|{{#var:TOOLCHAIN_ROOT_LOCATION}}/environment-setup-cortexa7hf-neon-poky-linux-gnueabi}} <!--
| |
| -->{{#vardefine:BUILD_FOLDER|~/var-fslc-yocto}} <!--
| |
| -->{{#vardefine:BUILD_FOLDER_ABSOLUTE_PATH|/home/<uname>/var-fslc-yocto}} <!--
| |
| -->{{#vardefine:BUILD_DISTRO|fslc-x11}} <!--
| |
| -->{{#vardefine:BUILD_DISTRO_FB|fslc-framebuffer}} <!--
| |
| -->{{#vardefine:BUILD_FOLDER_FB|build_fb}} <!--
| |
| -->{{#vardefine:BUILD_SCRIPT|. setup-environment}} <!--
| |
| -->{{#vardefine:BUILD_FOLDER_X11|build_x11}} <!--
| |
| -->{{#vardefine:MACHINE_NAME|var-som-mx6}} <!--
| |
| -->{{#vardefine:KERNEL_GIT|https://github.com/varigit/linux-2.6-imx.git}} <!--
| |
| -->{{#vardefine:KERNEL_BRANCH|imx-rel_imx_4.1.15_2.0.0_ga-var02}} <!--
| |
| -->{{#vardefine:KERNEL_IMAGE|uImage}} <!--
| |
| -->{{#vardefine:KERNEL_DEFCONFIG|imx_v7_var_defconfig}} <!--
| |
| -->{{#vardefine:U-BOOT_GIT|https://github.com/varigit/uboot-imx.git}} <!--
| |
| -->{{#vardefine:U-BOOT_BRANCH|imx_v2015.04_4.1.15_1.1.0_ga_var01}} <!--
| |
| -->{{#vardefine:U-BOOT_SD_DEFCONFIG|mx6var_som_sd_defconfig}} <!--
| |
| -->{{#vardefine:U-BOOT_NAND_DEFCONFIG|mx6var_som_nand_defconfig}} <!--
| |
| -->{{#vardefine:U-BOOT_SD_IMAGE_NAME|u-boot.img-sd}} <!--
| |
| -->{{#vardefine:U-BOOT_NAND_IMAGE_NAME|u-boot.img-nand}} <!--
| |
| -->{{#vardefine:SPL_SD_IMAGE_NAME|SPL-sd}} <!--
| |
| -->{{#vardefine:SPL_NAND_IMAGE_NAME|SPL-nand}} <!--
| |
| -->{{#vardefine:RECOVERY_SD_NAME|{{#var:RELEASE_NAME}}.img.gz}} <!--
| |
| -->{{#vardefine:RECOVERY_SD_URL|ftp://customerv:Variscite1@ftp.variscite.com/VAR-SOM-MX6/Software/fslc}} <!--
| |
| -->{{#vardefine:KERNEL_DTB_SECTION|VAR-SOM-MX6_DTB}} <!--
| |
| -->{{#vardefine:SD_TREE_SECTION|VAR-SOM-MX6_SD_TREE}} <!--
| |
| -->{{#vardefine:YOCTO_GIT|https://github.com/varigit/variscite-bsp-platform.git}} <!--
| |
| -->{{#vardefine:YOCTO_BUILD_RESULTS_SECTION|VAR-SOM-MX6_BUILD_RESULTS}} <!--
| |
| -->{{#vardefine:YOCTO_BOOT_BOARD_SECTION|VAR-SOM-MX6_BOOT_BOARD}} <!--
| |
| -->{{#vardefine:YOCTO_FLASH_SD_FROM_GUI_SECTION|VAR-SOM-MX6_FLASH_SD_FROM_GUI}} <!--
| |
| -->{{#vardefine:EMMC_FAT_PARTITION_NAME|BOOT-VARMX6}} <!--
| |
| -->{{#vardefine:EMMC_ROOTFS_DEV|mmcblk0}} <!--
| |
| -->{{#vardefine:EMMC_ROOTFS_PARTITION_NUM|p1}} <!--
| |
| -->{{#vardefine:NAND_ROOTFS_DEV|mtd3}} <!--
| |
| -->{{#vardefine:QT_PLATFORM_PLUGIN|eglfs}} <!--
| |
| -->{{#vardefine:RAM_LOAD_ADDRESS|0x18100000}} <!--
| |
| -->{{#vardefine:YOCTO_BRANCH|morty}} <section end=RELEASE_MORTY_BETA_VAR-SOM-MX6/>
| |
| *RELEASE_NAME = '''{{#var:RELEASE_NAME}}'''
| |
| *RELEASE_LINK = '''{{#var:RELEASE_LINK}}'''
| |
| *YOCTO_NAME = '''{{#var:YOCTO_NAME}}'''
| |
| *YOCTO_VERSION = '''{{#var:YOCTO_VERSION}}'''
| |
| *FSLC_BSP_VERSION = '''{{#var:FSLC_BSP_VERSION}}'''
| |
| *FSL_BSP_VERSION = '''{{#var:FSL_BSP_VERSION}}'''
| |
| *RECOVERY_SD_NAME = '''{{#var:RECOVERY_SD_NAME}}'''
| |
| *RECOVERY_SD_URL = '''{{#var:RECOVERY_SD_URL}}'''
| |
| *RELEASE_NOTES_LINK = '''{{#var:RELEASE_NOTES_LINK}}'''
| |
| *MACHINE_NAME = '''{{#var:MACHINE_NAME}}'''
| |
| *KERNEL_GIT = '''{{#var:KERNEL_GIT}}'''
| |
| *KERNEL_BRANCH = '''{{#var:KERNEL_BRANCH}}'''
| |
| *KERNEL_IMAGE = '''{{#var:KERNEL_IMAGE}}'''
| |
| *KERNEL_DEFCONFIG = '''{{#var:KERNEL_DEFCONFIG}}'''
| |
| *U-BOOT_GIT = '''{{#var:U-BOOT_GIT}}'''
| |
| *U-BOOT_BRANCH = '''{{#var:U-BOOT_BRANCH}}'''
| |
| *U-BOOT_SD_DEFCONFIG = '''{{#var:U-BOOT_SD_DEFCONFIG}}'''
| |
| *U-BOOT_NAND_DEFCONFIG = '''{{#var:U-BOOT_NAND_DEFCONFIG}}'''
| |
| *U-BOOT_SD_IMAGE_NAME = '''{{#var:U-BOOT_SD_IMAGE_NAME}}'''
| |
| *U-BOOT_NAND_IMAGE_NAME = '''{{#var:U-BOOT_NAND_IMAGE_NAME}}'''
| |
| *SPL_SD_IMAGE_NAME = '''{{#var:SPL_SD_IMAGE_NAME}}'''
| |
| *SPL_NAND_IMAGE_NAME = '''{{#var:SPL_NAND_IMAGE_NAME}}'''
| |
| *YOCTO_GIT = '''{{#var:YOCTO_GIT}}'''
| |
| *YOCTO_META_GIT = '''{{#var:YOCTO_META_GIT}}'''
| |
| *YOCTO_BRANCH = '''{{#var:YOCTO_BRANCH}}'''
| |
| *YOCTO_BUILD_RESULTS_SECTION = '''{{#var:YOCTO_BUILD_RESULTS_SECTION}}'''
| |
| *YOCTO_BOOT_BOARD_SECTION = '''{{#var:YOCTO_BOOT_BOARD_SECTION}}'''
| |
| *KERNEL_DTB_SECTION = '''{{#var:KERNEL_DTB_SECTION}}'''
| |
| *SD_TREE_SECTION = '''{{#var:SD_TREE_SECTION}}'''
| |
| *YOCTO_FLASH_SD_FROM_GUI_SECTION = '''{{#var:YOCTO_FLASH_SD_FROM_GUI_SECTION}}'''
| |
| *EMMC_FAT_PARTITION_NAME = '''{{#var:EMMC_FAT_PARTITION_NAME}}'''
| |
| *EMMC_ROOTFS_DEV = '''{{#var:EMMC_ROOTFS_DEV}}'''
| |
| *EMMC_ROOTFS_PARTITION_NUM = '''{{#var:EMMC_ROOTFS_PARTITION_NUM}}'''
| |
| *NAND_ROOTFS_DEV = '''{{#var:NAND_ROOTFS_DEV}}'''
| |
| *QT_PLATFORM_PLUGIN = '''{{#var:QT_PLATFORM_PLUGIN}}'''
| |
| *RAM_LOAD_ADDRESS = '''{{#var:RAM_LOAD_ADDRESS}}'''
| |
|
| |
| == DART-6UL ==
| |
| <section begin=RELEASE_MORTY_BETA_DART-6UL/> {{#vardefine:HARDWARE_NAME|DART-6UL}} <!--
| |
| -->{{#vardefine:RELEASE_NAME|morty-fslc-4.1.15-mx6ul-v1.0-beta}} <!--
| |
| -->{{#vardefine:RELEASE_LINK|RELEASE_MORTY_BETA_DART-6UL}} <!--
| |
| -->{{#vardefine:RELEASE_NOTES_LINK|https://docs.google.com/spreadsheets/d/1SznePOwPHdnxkbqpmP_1u6v6gXSceIHrRVPLFPB7qHE/pubhtml}} <!--
| |
| -->{{#vardefine:YOCTO_NAME|Morty}} <!--
| |
| -->{{#vardefine:YOCTO_VERSION|2.2.1}} <!--
| |
| -->{{#vardefine:FSLC_BSP_VERSION|2.2}} <!--
| |
| -->{{#vardefine:FSL_BSP_VERSION|L4.1.15_2.0.0-ga}} <!--
| |
| -->{{#vardefine:TOOLCHAIN_INSTALL_X11_NAME|fslc-x11-glibc-x86_64-meta-toolchain-armv7at2hf-neon-toolchain-2.2.1.sh}} <!--
| |
| -->{{#vardefine:TOOLCHAIN_INSTALL_QT5_NAME|fslc-x11-glibc-x86_64-meta-toolchain-qt5-armv7at2hf-neon-toolchain-2.2.1.sh}} <!--
| |
| -->{{#vardefine:TOOLCHAIN_ROOT_LOCATION|/opt/fsl-imx-x11/4.1.15-2.0.1}} <!--
| |
| -->{{#vardefine:TOOLCHAIN_LOCATION|{{#var:TOOLCHAIN_ROOT_LOCATION}}/environment-setup-cortexa7hf-neon-poky-linux-gnueabi}} <!--
| |
| -->{{#vardefine:BUILD_FOLDER|~/var-fslc-yocto}} <!--
| |
| -->{{#vardefine:BUILD_FOLDER_ABSOLUTE_PATH|/home/<uname>/var-fslc-yocto}} <!--
| |
| -->{{#vardefine:BUILD_DISTRO|fslc-x11}} <!--
| |
| -->{{#vardefine:BUILD_DISTRO_FB|fslc-framebuffer}} <!--
| |
| -->{{#vardefine:BUILD_FOLDER_FB|build_fb}} <!--
| |
| -->{{#vardefine:BUILD_SCRIPT|. setup-environment}} <!--
| |
| -->{{#vardefine:BUILD_FOLDER_X11|build_x11}} <!--
| |
| -->{{#vardefine:MACHINE_NAME|imx6ul-var-dart}} <!--
| |
| -->{{#vardefine:KERNEL_GIT|https://github.com/varigit/linux-2.6-imx.git}} <!--
| |
| -->{{#vardefine:KERNEL_BRANCH|imx-rel_imx_4.1.15_2.0.0_ga-var02}} <!--
| |
| -->{{#vardefine:KERNEL_IMAGE|zImage}} <!--
| |
| -->{{#vardefine:KERNEL_DEFCONFIG|imx6ul-var-dart_defconfig}} <!--
| |
| -->{{#vardefine:U-BOOT_GIT|https://github.com/varigit/uboot-imx.git}} <!--
| |
| -->{{#vardefine:U-BOOT_BRANCH|imx_v2015.10_dart_6ul_var1}} <!--
| |
| -->{{#vardefine:U-BOOT_SD_DEFCONFIG|mx6ul_var_dart_mmc_defconfig}} <!--
| |
| -->{{#vardefine:U-BOOT_NAND_DEFCONFIG|mx6ul_var_dart_nand_defconfig}} <!--
| |
| -->{{#vardefine:U-BOOT_SD_IMAGE_NAME|u-boot.img-sd}} <!--
| |
| -->{{#vardefine:U-BOOT_NAND_IMAGE_NAME|u-boot.img-nand}} <!--
| |
| -->{{#vardefine:SPL_SD_IMAGE_NAME|SPL-sd}} <!--
| |
| -->{{#vardefine:SPL_NAND_IMAGE_NAME|SPL-nand}} <!--
| |
| -->{{#vardefine:RECOVERY_SD_NAME|{{#var:RELEASE_NAME}}.img.gz}} <!--
| |
| -->{{#vardefine:RECOVERY_SD_URL|ftp://customerv:Variscite1@ftp.variscite.com/DART-6UL/Software/fslc}} <!--
| |
| -->{{#vardefine:KERNEL_DTB_SECTION|DART-6UL_DTB}} <!--
| |
| -->{{#vardefine:SD_TREE_SECTION|DART-6UL_SD_TREE}} <!--
| |
| -->{{#vardefine:YOCTO_GIT|https://github.com/varigit/variscite-bsp-platform.git}} <!--
| |
| -->{{#vardefine:YOCTO_BUILD_RESULTS_SECTION|DART-6UL_BUILD_RESULTS}} <!--
| |
| -->{{#vardefine:YOCTO_BOOT_BOARD_SECTION|DART-6UL_BOOT_BOARD}} <!--
| |
| -->{{#vardefine:YOCTO_FLASH_SD_FROM_GUI_SECTION|DART-6UL_FLASH_SD_FROM_GUI}} <!--
| |
| -->{{#vardefine:EMMC_FAT_PARTITION_NAME|BOOT-VAR6UL}} <!--
| |
| -->{{#vardefine:EMMC_ROOTFS_DEV|mmcblk1}} <!--
| |
| -->{{#vardefine:EMMC_ROOTFS_PARTITION_NUM|p2}} <!--
| |
| -->{{#vardefine:NAND_ROOTFS_DEV|mtd4}} <!--
| |
| -->{{#vardefine:QT_PLATFORM_PLUGIN|linuxfb}} <!--
| |
| -->{{#vardefine:RAM_LOAD_ADDRESS|0x83100000}} <!--
| |
| -->{{#vardefine:YOCTO_BRANCH|morty}} <section end=RELEASE_MORTY_BETA_DART-6UL/>
| |
| *RELEASE_NAME = '''{{#var:RELEASE_NAME}}'''
| |
| *RELEASE_LINK = '''{{#var:RELEASE_LINK}}'''
| |
| *YOCTO_NAME = '''{{#var:YOCTO_NAME}}'''
| |
| *YOCTO_VERSION = '''{{#var:YOCTO_VERSION}}'''
| |
| *FSLC_BSP_VERSION = '''{{#var:FSLC_BSP_VERSION}}'''
| |
| *FSL_BSP_VERSION = '''{{#var:FSL_BSP_VERSION}}'''
| |
| *RECOVERY_SD_NAME = '''{{#var:RECOVERY_SD_NAME}}'''
| |
| *RECOVERY_SD_URL = '''{{#var:RECOVERY_SD_URL}}'''
| |
| *RELEASE_NOTES_LINK = '''{{#var:RELEASE_NOTES_LINK}}'''
| |
| *MACHINE_NAME = '''{{#var:MACHINE_NAME}}'''
| |
| *KERNEL_GIT = '''{{#var:KERNEL_GIT}}'''
| |
| *KERNEL_BRANCH = '''{{#var:KERNEL_BRANCH}}'''
| |
| *KERNEL_IMAGE = '''{{#var:KERNEL_IMAGE}}'''
| |
| *KERNEL_DEFCONFIG = '''{{#var:KERNEL_DEFCONFIG}}'''
| |
| *U-BOOT_GIT = '''{{#var:U-BOOT_GIT}}'''
| |
| *U-BOOT_BRANCH = '''{{#var:U-BOOT_BRANCH}}'''
| |
| *U-BOOT_SD_DEFCONFIG = '''{{#var:U-BOOT_SD_DEFCONFIG}}'''
| |
| *U-BOOT_NAND_DEFCONFIG = '''{{#var:U-BOOT_NAND_DEFCONFIG}}'''
| |
| *U-BOOT_SD_IMAGE_NAME = '''{{#var:U-BOOT_SD_IMAGE_NAME}}'''
| |
| *U-BOOT_NAND_IMAGE_NAME = '''{{#var:U-BOOT_NAND_IMAGE_NAME}}'''
| |
| *SPL_SD_IMAGE_NAME = '''{{#var:SPL_SD_IMAGE_NAME}}'''
| |
| *SPL_NAND_IMAGE_NAME = '''{{#var:SPL_NAND_IMAGE_NAME}}'''
| |
| *YOCTO_GIT = '''{{#var:YOCTO_GIT}}'''
| |
| *YOCTO_META_GIT = '''{{#var:YOCTO_META_GIT}}'''
| |
| *YOCTO_BRANCH = '''{{#var:YOCTO_BRANCH}}'''
| |
| *YOCTO_BUILD_RESULTS_SECTION = '''{{#var:YOCTO_BUILD_RESULTS_SECTION}}'''
| |
| *YOCTO_BOOT_BOARD_SECTION = '''{{#var:YOCTO_BOOT_BOARD_SECTION}}'''
| |
| *KERNEL_DTB_SECTION = '''{{#var:KERNEL_DTB_SECTION}}'''
| |
| *SD_TREE_SECTION = '''{{#var:SD_TREE_SECTION}}'''
| |
| *EMMC_FAT_PARTITION_NAME = '''{{#var:EMMC_FAT_PARTITION_NAME}}'''
| |
| *EMMC_ROOTFS_DEV = '''{{#var:EMMC_ROOTFS_DEV}}'''
| |
| *EMMC_ROOTFS_PARTITION_NUM = '''{{#var:EMMC_ROOTFS_PARTITION_NUM}}'''
| |
| *NAND_ROOTFS_DEV = '''{{#var:NAND_ROOTFS_DEV}}'''
| |
| *QT_PLATFORM_PLUGIN = '''{{#var:QT_PLATFORM_PLUGIN}}'''
| |
| *RAM_LOAD_ADDRESS = '''{{#RAM_LOAD_ADDRESS}}'''
| |
|
| |
| == VAR-SOM-MX7 ==
| |
| <section begin=RELEASE_MORTY_BETA_VAR-SOM-MX7/> {{#vardefine:HARDWARE_NAME|VAR-SOM-MX7}} <!--
| |
| -->{{#vardefine:RELEASE_NAME|morty-fslc-4.1.15-mx7-v1.0-beta}} <!--
| |
| -->{{#vardefine:RELEASE_LINK|RELEASE_MORTY_BETA_VAR-SOM-MX7}} <!--
| |
| -->{{#vardefine:RELEASE_NOTES_LINK|https://docs.google.com/spreadsheets/d/1UqpIu3ztSIbsXqV52QFLjz-jhTXLfUtsX9-HQUy6tsQ/pubhtml}} <!--
| |
| -->{{#vardefine:YOCTO_NAME|Morty}} <!--
| |
| -->{{#vardefine:YOCTO_VERSION|2.2.1}} <!--
| |
| -->{{#vardefine:FSLC_BSP_VERSION|2.2}} <!--
| |
| -->{{#vardefine:FSL_BSP_VERSION|L4.1.15_2.0.0-ga}} <!--
| |
| -->{{#vardefine:TOOLCHAIN_INSTALL_X11_NAME|fslc-x11-glibc-x86_64-meta-toolchain-armv7at2hf-neon-toolchain-2.2.1.sh}} <!--
| |
| -->{{#vardefine:TOOLCHAIN_INSTALL_QT5_NAME|fslc-x11-glibc-x86_64-meta-toolchain-qt5-armv7at2hf-neon-toolchain-2.2.1.sh}} <!--
| |
| -->{{#vardefine:TOOLCHAIN_ROOT_LOCATION|/opt/fsl-imx-x11/4.1.15-2.0.1}} <!--
| |
| -->{{#vardefine:TOOLCHAIN_LOCATION|{{#var:TOOLCHAIN_ROOT_LOCATION}}/environment-setup-cortexa7hf-neon-poky-linux-gnueabi}} <!--
| |
| -->{{#vardefine:BUILD_FOLDER|~/var-fslc-yocto}} <!--
| |
| -->{{#vardefine:BUILD_DISTRO|fslc-x11}} <!--
| |
| -->{{#vardefine:BUILD_DISTRO_FB|fslc-framebuffer}} <!--
| |
| -->{{#vardefine:BUILD_FOLDER_FB|build_fb}} <!--
| |
| -->{{#vardefine:BUILD_SCRIPT|. setup-environment}} <!--
| |
| -->{{#vardefine:BUILD_FOLDER_X11|build_x11}} <!--
| |
| -->{{#vardefine:MACHINE_NAME|imx7-var-som}} <!--
| |
| -->{{#vardefine:KERNEL_GIT|https://github.com/varigit/linux-2.6-imx.git}} <!--
| |
| -->{{#vardefine:KERNEL_BRANCH|imx-rel_imx_4.1.15_2.0.0_ga-var02}} <!--
| |
| -->{{#vardefine:KERNEL_IMAGE|zImage}} <!--
| |
| -->{{#vardefine:KERNEL_DEFCONFIG|imx7-var-som_defconfig}} <!--
| |
| -->{{#vardefine:U-BOOT_GIT|https://github.com/varigit/uboot-imx.git}} <!--
| |
| -->{{#vardefine:U-BOOT_BRANCH|imx_v2015.04_4.1.15_1.1.0_ga_var02}} <!--
| |
| -->{{#vardefine:U-BOOT_SD_DEFCONFIG|mx7dvar_som_defconfig}} <!--
| |
| -->{{#vardefine:U-BOOT_NAND_DEFCONFIG|mx7dvar_som_nand_defconfig}} <!--
| |
| -->{{#vardefine:U-BOOT_SD_IMAGE_NAME|u-boot.imx-sd}} <!--
| |
| -->{{#vardefine:U-BOOT_NAND_IMAGE_NAME|u-boot.imx-nand}} <!--
| |
| -->{{#vardefine:RECOVERY_SD_NAME|{{#var:RELEASE_NAME}}.img.gz}} <!--
| |
| -->{{#vardefine:RECOVERY_SD_URL|ftp://customerv:Variscite1@ftp.variscite.com/VAR-SOM-MX7/Software/fslc}} <!--
| |
| -->{{#vardefine:KERNEL_DTB_SECTION|VAR-SOM-MX7_DTB}} <!--
| |
| -->{{#vardefine:SD_TREE_SECTION|VAR-SOM-MX7_SD_TREE}} <!--
| |
| -->{{#vardefine:YOCTO_GIT|https://github.com/varigit/variscite-bsp-platform.git}} <!--
| |
| -->{{#vardefine:YOCTO_BUILD_RESULTS_SECTION|VAR-SOM-MX7_BUILD_RESULTS}} <!--
| |
| -->{{#vardefine:YOCTO_BOOT_BOARD_SECTION|VAR-SOM-MX7_BOOT_BOARD}} <!--
| |
| -->{{#vardefine:YOCTO_FLASH_SD_FROM_GUI_SECTION|VAR-SOM-MX7_FLASH_SD_FROM_GUI}} <!--
| |
| -->{{#vardefine:EMMC_FAT_PARTITION_NAME|BOOT-VARMX7}} <!--
| |
| -->{{#vardefine:EMMC_ROOTFS_DEV|mmcblk2}} <!--
| |
| -->{{#vardefine:EMMC_ROOTFS_PARTITION_NUM|p2}} <!--
| |
| -->{{#vardefine:NAND_ROOTFS_DEV|mtd4}} <!--
| |
| -->{{#vardefine:READ_ONLY_ROOTFS|yes}} <!--
| |
| -->{{#vardefine:QT_PLATFORM_PLUGIN|linuxfb}} <!--
| |
| -->{{#vardefine:RAM_LOAD_ADDRESS|0x83100000}} <!--
| |
| -->{{#vardefine:YOCTO_BRANCH|morty}} <section end=RELEASE_MORTY_BETA_VAR-SOM-MX7/>
| |
|
| |
| *RELEASE_NAME = '''{{#var:RELEASE_NAME}}'''
| |
| *RELEASE_LINK = '''{{#var:RELEASE_LINK}}'''
| |
| *YOCTO_NAME = '''{{#var:YOCTO_NAME}}'''
| |
| *YOCTO_VERSION = '''{{#var:YOCTO_VERSION}}'''
| |
| *FSLC_BSP_VERSION = '''{{#var:FSLC_BSP_VERSION}}'''
| |
| *FSL_BSP_VERSION = '''{{#var:FSL_BSP_VERSION}}'''
| |
| *RECOVERY_SD_NAME = '''{{#var:RECOVERY_SD_NAME}}'''
| |
| *RECOVERY_SD_URL = '''{{#var:RECOVERY_SD_URL}}'''
| |
| *RELEASE_NOTES_LINK = '''{{#var:RELEASE_NOTES_LINK}}'''
| |
| *MACHINE_NAME = '''{{#var:MACHINE_NAME}}'''
| |
| *KERNEL_GIT = '''{{#var:KERNEL_GIT}}'''
| |
| *KERNEL_BRANCH = '''{{#var:KERNEL_BRANCH}}'''
| |
| *KERNEL_IMAGE = '''{{#var:KERNEL_IMAGE}}'''
| |
| *KERNEL_DEFCONFIG = '''{{#var:KERNEL_DEFCONFIG}}'''
| |
| *U-BOOT_GIT = '''{{#var:U-BOOT_GIT}}'''
| |
| *U-BOOT_BRANCH = '''{{#var:U-BOOT_BRANCH}}'''
| |
| *U-BOOT_SD_DEFCONFIG = '''{{#var:U-BOOT_SD_DEFCONFIG}}'''
| |
| *U-BOOT_NAND_DEFCONFIG = '''{{#var:U-BOOT_NAND_DEFCONFIG}}'''
| |
| *U-BOOT_SD_IMAGE_NAME = '''{{#var:U-BOOT_SD_IMAGE_NAME}}'''
| |
| *U-BOOT_NAND_IMAGE_NAME = '''{{#var:U-BOOT_NAND_IMAGE_NAME}}'''
| |
| *SPL_SD_IMAGE_NAME = '''{{#var:SPL_SD_IMAGE_NAME}}'''
| |
| *SPL_NAND_IMAGE_NAME = '''{{#var:SPL_NAND_IMAGE_NAME}}'''
| |
| *YOCTO_GIT = '''{{#var:YOCTO_GIT}}'''
| |
| *YOCTO_META_GIT = '''{{#var:YOCTO_META_GIT}}'''
| |
| *YOCTO_BRANCH = '''{{#var:YOCTO_BRANCH}}'''
| |
| *YOCTO_BUILD_RESULTS_SECTION = '''{{#var:YOCTO_BUILD_RESULTS_SECTION}}'''
| |
| *YOCTO_BOOT_BOARD_SECTION = '''{{#var:YOCTO_BOOT_BOARD_SECTION}}'''
| |
| *KERNEL_DTB_SECTION = '''{{#var:KERNEL_DTB_SECTION}}'''
| |
| *SD_TREE_SECTION = '''{{#var:SD_TREE_SECTION}}'''
| |
| *YOCTO_FLASH_SD_FROM_GUI_SECTION = '''{{#var:YOCTO_FLASH_SD_FROM_GUI_SECTION}}'''
| |
| *READ_ONLY_ROOTFS = '''{{#var:yes}}'''
| |
| *EMMC_FAT_PARTITION_NAME = '''{{#var:EMMC_FAT_PARTITION_NAME}}'''
| |
| *EMMC_ROOTFS_DEV = '''{{#var:EMMC_ROOTFS_DEV}}'''
| |
| *EMMC_ROOTFS_PARTITION_NUM = '''{{#var:EMMC_ROOTFS_PARTITION_NUM}}'''
| |
| *NAND_ROOTFS_DEV = '''{{#var:NAND_ROOTFS_DEV}}'''
| |
| *QT_PLATFORM_PLUGIN = '''{{#var:QT_PLATFORM_PLUGIN}}'''
| |
| *RAM_LOAD_ADDRESS = '''{{#RAM_LOAD_ADDRESS}}'''
| |
DART-6UL - U-Boot features
Splash Screen
A splash screen is enabled by default, and is shown on the LVDS LCD.
To disable the splash screen, enter the following in the U-Boot command line interface:
=> run disable_splash
=> saveenv && reset
And to re-enable it:
=> run enable_splash
=> saveenv && reset
The splash image is taken from /boot/splash.bmp in the root file system.
Automatic Splash source selection
The splash image will be taken from whichever rootfs that is going to be mounted later at boot.
To enable the automatic selection (already enabled by default):
$ setenv splashsourceauto yes
$ saveenv
To disable the automatic selection:
$ setenv splashsourceauto no
$ setenv splashsource YOUR_SELECTION
$ saveenv
YOUR_SELECTION should be one of {sd, emmc, nand} (nand means UBIFS)
Note:
- In case the rootfs is a UBIFS, mounting it in order to load the splash file will add ~1.8 seconds to the boot time.
Using your own LCD screen
There is support for the 800x480 LCD screen that Variscite uses.
If you want to add support for a different LCD that is not currently supported, you need to edit the displays[] array in board/variscite/mx6ul_var_dart/mx6ul_var_dart.c in the U-Boot source code, according to your LCD parameters.
USB ports
In the DART-6UL U-Boot:
USB port 1 (lower type-A receptacle) is defined as USB Host.
USB port 0 (micro USB receptacle / upper type-A receptacle) is defined as USB Client.
USB Mass Storage gadget
You can use the board as a USB Mass Storage device:
You will be able to access all the partitions of any block device that is on the board or connected to it, from your host PC - You will see them as /dev/sdXX, just like connecting a regular USB storage to your PC, and you'll be able to mount them, and have full read/write access to them. You can even use it to flash a new U-Boot, re-partition the storage, re-format it, etc.
This is especially useful for updating the internal eMMC.
To do this you need to connect a USB cable between the USB Client port of the board and a regular USB Host port on your PC, and use U-Boot's ums command.
General ums usage is:
ums <USB_controller> [<devtype>] <devnum> e.g. ums 0 mmc 0
devtype defaults to mmc
devtype can be any block device (e.g. mmc, usb)
To mount the eMMC:
=> ums 0 mmc 1
To mount an SD card:
=> ums 0 mmc 0
Depending on your host PC, it may automatically mount it or not. If not, you can use dmesg to see the names of the device and its partitions (it should be in the form of /dev/sdXX) and mount them yourself.
To exit the ums command and disconnect the USB device press ctrl+c.
Note: You should use a Linux PC host as Windows can't naturally read ext file systems.
USB Ethernet Gadget
The USB Ethernet gadget allows you to make the board act as a USB Ethernet device when connecting its USB Client port to a host PC using a USB cable.
Basically, it allows for "Ethernet over USB".
This is especially useful if you build a custom board without an Ethernet interface and you want to boot via network using TFTP.
For this, a new Ethernet interface called usb_ether was added to U-Boot.
Before actually using it you should get to know the following environment variables:
Variables specific to this gadget:
usbnet_devaddr - The virtual MAC address of the device (the board side) - f8:dc:7a:00:00:02 by default.
usbnet_hostaddr - The virtual MAC address of the host (the PC side) - f8:dc:7a:00:00:01 by default.
General network variables:
ethprime - Sets the primary Ethernet interface. This is the interface that will be tried first.
ethact - Sets the currently active Ethernet interface. Normally, it is modified by the Ethernet driver, but you can change it if you want to override.
ipaddr - IP address of the device - needed for tftp command.
netmask - Subnet Mask.
serverip - TFTP server IP address - needed for tftp command.
So, for example:
=> setenv ethact usb_ether
=> setenv ipaddr 192.168.0.100
=> setenv netmask 255.255.255.0
=> setenv serverip 192.168.0.101
And now your are ready to use tftpboot over the usb_ether interface.
Notes:
- Once you run a network command, e.g. tftpboot, the gadget will be connected to your host PC and a new network adapter will be added to it, for the duration of the network interaction.
- Note that you may need to configure your host PC to use the new network adapter properly - this configuration is OS dependent.
General U-Boot commands
List all supported commands and their description/usage (help command)
List all supported commands with a brief description for each one:
=> help
Print the description and usage of 'command':
=> help command
Environment handling commands
Print the values of all environment variables:
=> printenv
Print value of environment variable 'name':
=> printenv name
Set environment variable 'name' to 'value ...':
=> setenv name value ...
Delete environment variable 'name':
=> setenv name
Reset default environment:
=> env default -a
Save environment variables to persistent storage:
=> saveenv
File System access
List files in a directory (default /):
=> ls <interface> [<dev[:part]>] [directory]
For example:
List files in the BOOT partition of our NAND/eMMC Recovery SD card (after booting from it):
=> ls mmc 0:1
List files in directory /opt/images/Yocto in the rootfs partition of our NAND/eMMC Recovery SD card (after booting from it):
=> ls mmc 0:2 /opt/images/Yocto
Load binary file 'filename' from a partition to RAM address 'addr':
=> load <interface> [<dev[:part]> [<addr> [<filename> [bytes [pos]]]]]
For example:
Load /boot/splash.bmp from the rootfs partition of our NAND/eMMC Recovery SD card (after booting from it) to RAM address 0x18100000:
=> load mmc 0:2 0x18100000 /boot/splash.bmp
UBI File System
This is the FS we use on our NAND flash.
UBIFS is very different to any traditional file system - it does not work on top of block devices (like hard drives, MMC/SD cards, USB flash drives, SSDs, etc).
UBIFS was designed to work on top of raw flash.
The usage is a little different than using FAT/ext.
Before you can access the UBIFS you need to mount it first:
=> ubi part rootfs
=> ubifsmount ubi0:rootfs
Now you can access the UBIFS with the regular commands above.
The <interface> in this case is 'ubi', <dev> can be anything (the value is ignored) and part is not necessary.
For example:
List files in directory /home/root on the mounted UBI file system:
=> ls ubi 0 /home/root
When finished accessing it, unmount the FS:
=> ubifsumount
USB sub-system
To use the USB as host (connect a USB Storage or Ethernet Device to the board), you need to use the usb command.
Usage:
usb start - start (scan) USB controller
usb reset - reset (rescan) USB controller
usb stop [f] - stop USB [f]=force stop
usb tree - show USB device tree
usb info [dev] - show available USB devices
usb test [dev] [port] [mode] - set USB 2.0 test mode
(specify port 0 to indicate the device's upstream port)
Available modes: J, K, S[E0_NAK], P[acket], F[orce_Enable]
usb storage - show details of USB storage devices
usb dev [dev] - show or set current USB storage device
usb part [dev] - print partition table of one or all USB storage devices
usb read addr blk# cnt - read `cnt' blocks starting at block `blk#'
to memory address `addr'
usb write addr blk# cnt - write `cnt' blocks starting at block `blk#'
from memory address `addr'
First, connect your device to a USB port on the board.
After the device is connected, start the USB controller:
=> usb start
If you connect/disconnect devices after that, before you can access them you need to rescan the USB controller:
=> usb reset
Known Issue:
USB Host mode on the OTG port sometimes doesn't work.
To fix this, you need to disable the D-Cache by adding the following definition to include/configs/mx6var_som.h in the U-Boot source code:
CONFIG_SYS_DCACHE_OFF
Using a USB Storage Device
Once you connected the device and stated the USB controller, you can now use the regular File System commands mentioned above with it.
The <interface> in this case is 'usb'.
Flashing NAND using U-Boot
Flashing U-Boot to NAND
Assuming you are reading the U-Boot image from our Recovery SD card:
=> mw.b 0x83100000 0xff 0x200000 # Write 0xFF to RAM in order to pad the image and align it to the NAND erase block size
=> load mmc 0:2 0x83100000 /opt/images/Yocto/u-boot.img # Load the U-Boot image from the SD card to RAM
=> nand erase 0x200000 0x200000 # Erase the part of the NAND saved for the U-Boot image
=> nand write 0x83100000 0x200000 0x200000 # Write the U-Boot image from RAM to NAND
Flashing the Linux kernel to NAND
Assuming you are reading the kernel image from our Recovery SD card:
=> mw.b 0x83100000 0xff 0x7e0000 # Write 0xFF to RAM in order to pad the image and align it to the NAND erase block size
=> load mmc 0:2 0x83100000 /opt/images/Yocto/zImage # Load the Linux kernel image from the SD card to RAM
=> nand erase 0x600000 0x7e0000 # Erase the 'kernel' MTD partition
=> nand write 0x83100000 0x600000 0x7e0000 # Write the Linux kernel image from RAM to MTD partition 'kernel'
Flashing the Linux device tree to NAND
Assuming you are reading the .dtb file from our Recovery SD card:
=> mw.b 0x83100000 0xff 0x20000 # Write 0xFF to RAM in order to pad the image and align it to the NAND erase block size (128KiB)
=> load mmc 0:2 0x83100000 /opt/images/Yocto/imx6ul-var-dart-sd_nand.dtb # Load the dtb from the SD card to RAM (choose your desired dtb file)
=> nand erase 0xde0000 0x20000 # Erase the part of the NAND saved for the device tree
=> nand write 0x83100000 0xde0000 0x20000 # Write the device tree from RAM to NAND
Flashing UBIFS to NAND
The best way to flash a UBI image is by using ubiformat (which is a part of mtd-utils) under Linux, as it preserves erase counters (our Recovery SD card scripts are using ubiformat).
But if you flash the UBIFS for the first time, then it doesn't matter because there are no erase counters to preserve.
Assuming you are reading the UBI image from our Recovery SD card:
=> load mmc 0:2 0x83100000 /opt/images/Yocto/rootfs.ubi # Load the UBI image from the SD card to RAM
=> nand erase.part rootfs # Erase the 'rootfs' MTD partition
=> nand write.trimffs 0x83100000 rootfs $filesize # Write the UBI image from RAM to MTD partition 'rootfs'
Note:
There is another method to do this using U-Boot, that preserves erase counters, using the higher level ubi command, but you need a UBIFS image for it (which Yocto also creates, but we do not put on our Recovery SD card by default):
=> load mmc 0:2 0x83100000 /opt/images/Yocto/rootfs.ubifs # Load the UBIFS image from an SD card to RAM
=> ubi part rootfs # Set current MTD partition to 'rootfs'
=> ubi remove rootfs # Remove the 'rootfs' UBI volume (if already exists)
=> ubi create rootfs # Create a new dynamic UBI volume (read/write) with max size, and name it 'rootfs'
=> ubi write 0x83100000 rootfs $filesize # Write the volume from RAM