Update firmware from TFTP

U-Boot bootloader allows you to update the firmware of your ConnectCore 6 device over Ethernet. U-Boot uses the TFTP protocol to get the firmware images from a TFTP server running on your computer and program them into the eMMC of the device.

This update process requires a TFTP server running on your computer with a configured exposed folder. The devices look for the firmware files in this folder when performing the update.

These instructions do not include setting up a TFTP server on your computer. You must have already installed and configured a TFTP server.

Once you have the TFTP server running on your computer, you can start the update process:

  1. Copy the Yocto firmware files (previously downloaded or compiled) in your TFTP server's exposed folder (typically /tftpboot):
    • <u-boot-file>.imx
    • <boot-file>.vfat
    • <recovery-file>.vfat
    • <rootfs-file>.ext4

    After building the Yocto firmware, you can find the image files inside the project directory at:

    <project>/tmp/deploy/images/ccimx6sbc

  1. Connect the board to your host computer. See Step 2: Set up the hardware for instructions.
  2. Open a serial connection to the serial port to which the ConnectCore 6 is connected. Use the following settings:
    • Port: Serial port where your ConnectCore 6 board is attached
    • Baud rate: 115200
    • Data Bits: 8
    • Parity: None
    • Stop Bits: 1
    • Flow control: None
  3. Reset the device (press the Reset button on the board) and immediately press a key in the serial terminal to stop the auto-boot process. You will be stopped at the U-Boot bootloader prompt:
  4. U-Boot 2015.04.1.1 (Dec 18 2015 - 10:22:02), Build: jenkins-uboot_release-45
     
    CPU:   Freescale i.MX6Q rev1.5 1200 MHz (running at 792 MHz)
    CPU:   Extended Commercial temperature grade (-20C to 105C) at 47C
    Reset cause: POR
    I2C:   ready
    DRAM:  1 GiB
    MMC:   FSL_SDHC: 0 (eMMC), FSL_SDHC: 1
    In:    serial
    Out:   serial
    Err:   serial
    Board: ConnectCore 6 SBC v1
    Variant: 0x02 - Consumer quad-core 1.2GHz, 4GB eMMC, 1GB DDR3, -20/+70C, Wireless, Bluetooth, Kinetis
    Boot device: MMC4
    PMIC:  DA9063, Device: 0x61, Variant: 0x50, Customer: 0x00, Config: 0x56
    Net:   FEC [PRIME]
    Normal Boot
    Hit any key to stop autoboot:  0
    =>
  1. Configure the network settings of the ConnectCore 6 device by doing one of the following:
    • Get a dynamic IP address from a DHCP server by running the following commands:

      => setenv autoload no
      => dhcp
    • Configure a static IP address, where a.b.c.d is the IP address of your device:
      => setenv ipaddr a.b.c.d
  2. Configure the IP address of the machine where the TFTP server is running and save the configuration as follows, where w.x.y.z is your machine IP address where the TFTP server is running:
    => setenv serverip w.x.y.z
    => saveenv
  3. Update the U-Boot image (optional):
    1. Execute the following command to update the U-Boot image:
      => update uboot tftp <u-boot-file>.imx
    2. Reset the board to boot into the recently updated U-Boot, and press any key to stop the autoboot process.
    3. Reset the U-Boot environment to default values (this will not reset protected variables like the MAC address). To do so, issue this command:
      => env default -a
    4. Configure the network and TFTP settings on your ConnectCore 6 device again and save the configuration. (See step 5 and step 6.)
  1. Configure the partition of the eMMC for holding Yocto images by running these commands:
    => setenv mmcdev 0
    => run partition_mmc_linux
  1. Update the boot image by executing this command:
    => update linux tftp <boot-file>.vfat
  1. Update the root file system image by issuing this command:
    => update rootfs tftp <rootfs-file>.ext4
  1. Update the recovery image by executing this command:

    => update recovery tftp <recovery-file>.vfat
  1. You can format the update partition or directly boot the new firmware:

    • To format the update partition, run the following commands. They boot in recovery mode to format the partition and then boots the device normally with the new firmware:
  2. => setenv recovery_command wipe_update
    => saveenv
    => run recoverycmd
    • If the update partition is already formatted or you want to preserve its contents, boot the device with the firmware you have just programmed:
    => boot