Search by Tags

Flashing Methods in U-Boot

 

Subscribe for this article updates

Flashing Methods

Currently the following methods/mediums are supported for flashing or updating the image on the modules.

  • SD Card
  • USB Storage
  • Ethernet (using TFTP)
  • DFU
  • USB

The following table shows flashing mediums which are applicable for the respective modules.

Module SD Card USB Storage Ethernet DFU USB
Colibri T20 Not Supported Not Supported Not Supported Not Supported Supported
Colibri T30 Supported Not Available by Default Supported Not Supported Not Supported
Apalis T30 Supported Not Available by Default Supported Not Supported Not Supported
Colibri VFxx Supported Supported Supported Supported Not Supported
Colibri i.MX6 Supported Not Available by Default Supported Not Supported Not Supported
Apalis i.MX6 Supported Not Available by Default Supported Not Supported Not Supported

Colibri T20

Colibri T20 Release Notes

USB

Initial Preparation:

  • Download and extract Colibri_T20_LinuxImageVx.yz.tar.bz2 package with root permissions

EvalBoard V3.1a

  • Connect USB B (X29) or USB micro A/B (X30) to development workstation using regular or micro USB cable
  • The jumper JP2 must be open
  • Press and hold recovery mode switch (SW9) during power up

Iris V1.1a

  • Connect USB micro A/B (X12) to development workstation using regular micro USB cable
  • Short pin 1-2 of JP1 on Iris for recovery
  • Make sure that the carrier board supports USB high speed. Iris & EvalBoard V3.1a OK, for other carrier boards see here
  • Apply power or reset
    • Run update.sh script
    • Use -r 512 option for 512 MB RAM modules
    • Use -v V1_1 option for V1.1b or V1.1c modules

Colibri T30

Colibri T30 Release Notes

SD Card

Initial Preparation:

  • Download and extract Colibri_T30_LinuxImageVx.yz.tar.bz2 package with root permissions
  • Use any VFAT formatted SD resp. micro D card with at least 1000 MB of free space
  • Run update.sh script with optional -o argument pointing to mount point of above mentioned card

EvalBoard V3.1a:

  • Connect serial debug console to UARTA aka FFUART (lower X25) resp. X27 using null modem RS-232 or regular USB cable
  • Insert above prepared SD card into SD/MMC socket (X15)

Iris V1.1a:

  • Connect serial debug console to UARTA aka FFUART X13 using null modem RS-232 cable and a 10 pin IDC to 9 pin D-sub male connector. (DTK or Intel standard)
  • Insert above prepared micro SD card into micro SD card socket (X10)
  • Boot to U-Boot prompt and start the update:
    • Apply power or reset
    • Hit any key to stop auto booting
    • If you update from a previous image use the following U-Boot commands:
      • setenv drive 1
      • setenv setupdate 'mmc dev ${drive}; fatload mmc ${drive}:1 ${loadaddr} flash_mmc.img; source ${loadaddr}'
      • save
    • Use 'run setupdate' U-Boot command and then
    • Use 'run update' U-Boot command
  • If you updated from an older image:
    • Power cycle or reset as requested and hit any key to stop auto booting
    • Use 'run setupdate' U-Boot command and then
    • Use 'run migrate_v2.3b1' U-Boot command

Ethernet

Please note that for this method to work, a working tftp setup is required. You may copy these required files by running ./update.sh -o /srv/tftp, where /srv/tftp is the directory from where the files will be served by tftp server. The serverip and ipaddr u-boot environment variables need to be correctly set as per one's TFTP setup.

From the uboot prompt execute the following commands

usb start
tftp ${loadaddr} flash_eth.img && source ${loadaddr}
run update

Note: In case you are updating from older images, please follow the commands in the above section as applicable.

Apalis T30

Apalis T30 Release Notes

SD Card

Initial Preparation:

  • Download and extract Apalis_T30_LinuxImageVx.yz.tar.bz2 package with root permissions
  • Use any VFAT formatted SD resp. micro D card with at least 1000 MB of free space
  • Run update.sh script with optional -o argument pointing to mount point of above mentioned card

EvalBoard V1.0a:

  • Connect serial debug console to lower X28 or X29 using null modem RS-232 or regular USB cable
  • Insert above prepared SD card into SD/MMC 8bit (X18) or SD/MMC 4bit (X19) socket

Ixora V1.0a:

  • Connect serial debug console to X22 using null modem RS-232 cable and a 10 pin IDC to 9 pin D-sub male connector. (DTK or Intel standard)
  • Insert above prepared micro SD card into micro SD card socket (X10)
  • Boot to U-Boot prompt and start the update:
    • Apply power or reset
    • Hit any key to stop auto booting
    • If you update from a previous image use the following U-Boot commands:
    • Using SD/MMC 8bit (X18) socket on EvalBoard:
      • setenv drive 1
      • setenv setupdate 'mmc dev ${drive}; fatload mmc ${drive}:1 ${loadaddr} flash_mmc.img; source ${loadaddr}'
      • save
    • Using SD/MMC 4bit (X19) socket on EvalBoard or micro SD card socket (X10) on Ixora:
      • setenv drive 2
      • setenv setupdate 'mmc dev ${drive}; fatload mmc ${drive}:1 ${loadaddr} flash_mmc.img; source ${loadaddr}'
      • save
    • Use 'run setupdate' U-Boot command and then
    • Use 'run update' U-Boot command
  • If you updated from an older image:
    • Power cycle or reset as requested and hit any key to stop auto booting
    • Use 'run setupdate' U-Boot command and then
    • Use 'run migrate_v2.3b2' U-Boot command

Ethernet

Please note that for this method to work, a working tftp setup is required. You may copy these required files by running ./update.sh -o /srv/tftp, where /srv/tftp is the directory from where the files will be served by tftp server. The serverip and ipaddr u-boot environment variables need to be correctly set as per one's TFTP setup.

From the uboot prompt execute the following commands

tftp ${loadaddr} flash_eth.img && source ${loadaddr}
run update

Note: In case you are updating from older images, please follow the commands in the above section as applicable.

Vybrid

Vybrid Release Notes

SD card/USB Storage

Initial Preparation:

  • Download and extract Colibri_VF_LinuxImageVx.yz.tar.bz2 package with root permissions
  • Use any VFAT formatted SD, uSD card or USB flash drive with at least 100 MB of free space
  • Optionally format the SD, uSD card or USB flash drive using the format_sd.sh script (warning: everything on the SD card/USB drive will be erased!)
  • Run update.sh script with optional -o argument pointing to mount point of above mentioned SD card or USB flash drive
  • Insert prepared SD card into SD card/MMC SDIO-socket (X15/X10 on Iris) or USB flash drive in USB host port

EvalBoard V3.1a:

  • 115200 baud serial debug console on UART_A (lower X25 resp. X27 depending on JP17/19) without any handshake

Iris V1.1a:

  • 115200 baud serial debug console on UART_A (X13) without any handshake
  • Apply power or reset
  • Hit any key to stop auto booting
    • Use 'run setupdate' commands
    • Use 'run update' command

Note: For old u-boot versions, execute 'mmc part 0 ; fatload mmc 0:1 $loadaddr flash_mmc.img ;source $loadaddr'. USB is not supported on old u-boot versions viz. images prior to v2.3 Beta 5.

DFU

Device Firmware Upgrade (DFU) facility is available for the Vybrids. This utilises the USB client functionality of the Vybrids and is available starting with v2.3 Beta5 images. On the host PC, dfu-util and mtd-utils package should be installed.

Evaluation Board v3.1a:

Connect a USB cable with standard B plug end to connector X29 on evaluation board and the standard A plug end to host PC.

Iris Carrier Board:

Connect a USB cable with micro-B plug end to X12 and standard A plug end to host PC.

Download and extract Colibri_VF_LinuxImageVx.yz.tar.bz2 package with root permissions. Go to the extracted image archive directory and run the following command

sudo vf_flash/mkfs.ubifs --space-fixup -c 8112 -e 124KiB -m 2KiB -o colibri-vf_bin/ubidfu.img -r rootfs/ -v 

In the colibri-vf_bin directory of our release images or OpenEmbedded generated images, create a ubinize.cfg file as follows:

[ubifs]
mode=ubi
image=ubidfu.img
vol_id=0
vol_size=200MiB
vol_type=dynamic
vol_name=rootfs
vol_flags=autoresize

Create a ubi.img file by running

sudo ubinize -o colibri-vf_bin/ubi.img -m 2048 -p 128KiB colibri-vf_bin/ubinize.cfg

Go to the u-boot prompt at the serial debug console.

To update rootfs

From u-boot run

nand erase.part ubi
dfu 0 nand 4

After executing the dfu command at the u-boot prompt, on host PC lsusb should have an output like below with product and vendor ID's as shown:

Bus 001 Device 006: ID 1b67:0017  

From the host PC run

sudo dfu-util -D colibri-vf_bin/ubi.img -a ubi

To update u-boot

From u-boot run

nand erase.part u-boot
dfu 0 nand 2

From the host PC run

sudo dfu-util -D colibri-vf_bin/u-boot-nand.imx -a u-boot

Sample Output

On u-boot prompt:

Colibri VFxx # nand erase.part ubi

NAND erase.part: device 0 offset 0x200000, size 0x3fe00000
Skipping bad block at  0x13540000                                          
Skipping bad block at  0x16aa0000                                          
Skipping bad block at  0x1c4c0000                                          
Skipping bad block at  0x33780000                                          
Skipping bad block at  0x3ff80000                                          
Skipping bad block at  0x3ffa0000                                          
Skipping bad block at  0x3ffc0000                                          
Skipping bad block at  0x3ffe0000                                          

OK
Colibri VFxx # dfu 0 nand 4
using id 'nand0,0'
using id 'nand0,1'
using id 'nand0,3'
##########################################################################################################DOWNLOAD ... OK
Ctrl+C to exit ...
Colibri VFxx # 

On host PC:

[host@hostpc-Arch Colibri_VF_LinuxImageV2.3]$ sudo dfu-util -D colibri-vf_bin/ubi.img -a ubi
[sudo] password for host: 
dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 1b67:0017
Run-time device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Setting #2 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 0110
Device returned transfer size 4096
Copying data from PC to DFU device
Download    [=========================] 100%    110624768 bytes
Download done.
state(7) = dfuMANIFEST, status(0) = No error condition is present
state(2) = dfuIDLE, status(0) = No error condition is present
Done!

Ethernet

Please note that for this method to work, a working tftp setup is required. You may copy these required files by running ./update.sh -o /srv/tftp, where /srv/tftp is the directory from where the files will be served by tftp server. The serverip and ipaddr u-boot environment variables need to be correctly set as per one's TFTP setup.

From the uboot prompt execute the following commands

tftp ${loadaddr} flash_eth.img && source ${loadaddr}
run update

Colibri iMX6

Colibri i.MX6 Release Notes

SD Card

Initial Preparation:

  • Download and extract Colibri_iMX6_LinuxImageVx.yz.tar.bz2 package with root permissions
  • Use any VFAT formatted SD resp. micro D card with at least 1000 MB of free space
  • Run update.sh script with optional -o argument pointing to mount point of above mentioned card

EvalBoard V3.1a:

  • Connect serial debug console to UARTA aka FFUART (lower X25) resp. X27 using null modem RS-232 or regular USB cable
  • Insert above prepared SD card into SD/MMC socket (X15)

Iris V1.1a:

  • Connect serial debug console to UARTA aka FFUART X13 using null modem RS-232 cable and a 10 pin IDC to 9 pin D-sub male connector. (DTK or Intel standard)
  • Insert above prepared micro SD card into micro SD card socket (X10)
  • Boot to U-Boot prompt and start the update:
    • Apply power or reset
    • Hit any key to stop auto booting
    • Use 'run setupdate' U-Boot command and then
    • Use 'run update' U-Boot command
  • Update a single component
    • U-Boot
      • Use 'run setupdate' and then 'run update_uboot'
      • Use 'patch_ddr_size' to set the memory configuration depending on module type. (i.e the Colibri iMX6 DL will use only half of the available RAM)
    • Kernel or Linux Device Tree
      • Use 'run setupdate' and then 'run update_kernel' or 'run update_fdt' respectively

Ethernet

Please note that for this method to work, a working tftp setup is required. You may copy these required files by running ./update.sh -o /srv/tftp, where /srv/tftp is the directory from where the files will be served by tftp server. In the /srv/tftp directory, run split -a 1 -b expr 64 \* 1024 \* 1024 -d root.ext3 root.ext3-. The serverip and ipaddr u-boot environment variables need to be correctly set as per one's TFTP setup.

From the uboot prompt execute the following commands

tftp ${loadaddr} flash_eth.img && source ${loadaddr}
run update

Apalis iMX6

Apalis i.MX6 Release Notes

SD Card

Note: Recompile U-Boot with apalis_imx6q2g config for Apalis iMX6Q 2GB IT V1.1a

Initial Preparation:

  • Download and extract Apalis_iMX6_LinuxImageVx.yz.tar.bz2 package with root permissions
  • Use any VFAT formatted SD resp. micro D card with at least 1000 MB of free space
  • Run update.sh script with optional -o argument pointing to mount point of above mentioned card

EvalBoard V1.0a:

  • Connect serial debug console to lower X28 or X29 using null modem RS-232 or regular USB cable
  • Insert above prepared SD card into SD/MMC 8bit (X18) or SD/MMC 4bit (X19) socket

Ixora V1.0a:

  • Connect serial debug console to X22 using null modem RS-232 cable and a 10 pin IDC to 9 pin D-sub male connector. (DTK or Intel standard)
  • Insert above prepared micro SD card into SD card socket (X10)
  • If you update from a V2.2 image either use an EvalBoard for update or use on Ixora the U-Boot command:
    • setenv drive 2
    • setenv setupdate 'fatload mmc ${drive}:1 ${loadaddr} flash_mmc.img; source ${loadaddr}'
    • save
  • Boot to U-Boot prompt and start the update:
    • Apply power or reset
    • Hit any key to stop auto booting
    • Use 'run setupdate' U-Boot command and then
    • Use 'run update' U-Boot command for "Apalis iMX6Q 2GB IT V1.1a" use 'run update_it' instead
  • If you updated from an older image. (without a device tree)
    • Power cycle or reset and hit any key to stop auto booting
    • Use 'printenv' to get your current u-boot environment
    • Use 'env default -a' to set the u-boot environment to its default value
    • Optionally change the environment to your needs
    • Use 'saveenv' to make the changes permanent
  • Update a single component
    • U-Boot
      • Use 'run setupdate' and then 'run update_uboot' for "Apalis iMX6Q 2GB IT V1.1a" use 'run update_uboot_it' instead
    • Kernel or Linux Device Tree
      • Use 'run setupdate' and then 'run update_kernel' or 'run update_fdt' respectively

Ethernet

Please note that for this method to work, a working tftp setup is required. You may copy these required files by running ./update.sh -o /srv/tftp, where /srv/tftp is the directory from where the files will be served by tftp server. In the /srv/tftp directory, run split -a 1 -b expr 256 \* 1024 \* 1024 -d root.ext3 root.ext3-. The serverip and ipaddr u-boot environment variables need to be correctly set as per one's TFTP setup.

From the uboot prompt execute the following commands

tftp ${loadaddr} flash_eth.img && source ${loadaddr}
run update