Filter results by

Image Update by Partition over USB

This procedure makes use of the integrated USB interface (in addition to the debug USB port) to update any chosen partition of the ARTIK image.

To use this feature, you must have previously set up a build environment that allows you to create the partitions, or you must have obtained a pre-built partition (such as a custom dtb block) from a third party.

Board Preparation

  1. Connect your board USB debug port to your development system as always.

  2. Attach a USB cable to the integrated USB device port (Dev or OTG) of the ARTIK board using the appropriate cable.
    • standard type A for ARTIK 10 USB Host/Dev
    • mini type B for ARTIK 520 USB Dev
    • micro USB for ARTIK 530/710 USB OTG

    Attach the other end (usually standard type A) to your host PC.

    ARTIK 520
    ARTIK 530
    ARTIK 710
    ARTIK 1020
  3. Reset the ARTIK board, and while it is counting down for the restart, hit any key to go to U-Boot mode.

Installation

Set Up Drivers

You may have to set up drivers twice – once under Windows and again for Linux running in VirtualBox under Windows.

Windows PC. If you are using a Windows PC, follow this procedure to install the base USB driver.

  1. On the ARTIK board, run fast 0. A USB device should be detected by the host system.

  2. Wait for the USB driver installation to complete successfully.

Note: During operation, if it gets stuck at "waiting for device", there may be a driver issue – check Device Manager and upgrade the driver if necessary.

Linux host. This procedure applies for both a native Linux host and a Linux installation running under VirtualBox.

  1. Open or create this udev rules file:
    sudo vi /etc/udev/rules.d/51-android.rules

  2. Insert this line, save, and exit.
    SUBSYSTEM=="usb",ATTR{idVendor}=="18d1",MODE="0666"

  3. Restart your terminal instance to recognize the change.

Install 'fastboot' Tools on Host

Install on Linux host.

  1. Install the Android fastboot tools on your development system.
    sudo apt install android-tools-fastboot

Install on Windows host. You don't need to do this if you are running Linux under VirtualBox on a Windows PC.

  1. Download fastboot tools from here or search for "ADB fastboot" if the link is broken.

  2. Follow the instructions to install the tools to your Windows host PC.

Using 'fastboot' to Update Partitions

This procedure works from both Windows and Linux command windows.

  1. From the U-Boot prompt, run fast 0 on the ARTIK board to let your PC see the board as a 'fastboot' device.

  2. Open a terminal window to send 'fastboot' commands.

    • Linux (native or in VirtualBox): Open a terminal window.

    • Windows only (not using VirtualBox): Open a command prompt window
      (hit Start, type "cmd" [Enter]).

  3. Change to the image transfer directory.

    • Linux: Usually your build output directory; see flash_all section.

    • Windows: cd \adb    Copy here any images that you plan to transfer.

  4. For each partition to update, on the host system:
    Enter fastboot flash, choose a partition, and point to the file to load. Refer to the Partition Details section below for required partition file names.

  5. Run fastboot reboot on the PC when finished.

Below is an example of the kernel, dtb, and modules being updated.

Using 'flash_all…' to Update Full Image

When you follow the normal build process in your Linux development environment, you will find that all necessary partition maps and partition images are generated automatically in the output directory of your build. For example:

build-artik/output/images/artik530s/1.0/20171115.19/partmap_emmc.txt

Moreover, the flash_all… script is generated in that directory as well. To update a module over USB with your newly generated image:

  1. On your development PC, change to the build output directory.

  2. Enter:
    ./flash_all_by_fastboot.sh

  3. On your ARTIK board terminal, from the U-Boot prompt, enter:
    fast 0

Your image update is underway! Don't forget to take action on the "resize" message displayed when the script finishes.

Partition Details

The steps here are taken care of by the ./flash_all_by_fastboot.sh script. Refer to the text of that script while reviewing the details provided here.

The partitions listed below comprise the complete image. To restore all, as you would for USB recovery, you start by loading the partition map:

fastboot flash partmap partmap_emmc.txt

and then flash the rest of the partitions.

fastboot flash 2ndboot bl1-emmcboot.img
...

Large partitions are handled as a special case when the file is larger than module RAM. For example, if you get to the rootfs partition and find it is too large to fit into the available RAM, use this approach.

  1. Create a file partition.txt on the host system containing the line
    partition = "rootfs";

  2. Run the following commands.
    fastboot flash setenv partition.txt
    fastboot flash -S 0 rootfs rootfs.img

ARTIK 530 Partition Information

Partition Name File Name
2ndboot bl1-emmcboot.img
blmon bl_mon.img
boot boot.img
bootloader bootloader.img
env params.bin
loader loader-emmcboot.img
modules modules.img
rootfs rootfs.img
secure secureos.img

ARTIK 710 Partition Information

Partition Name File Name
2ndboot bl1-emmcboot.img
fip-loader fip-loader-emmc.img
fip-secure fip-secure.img
fip-nonsecure fip-nonsecure.img
env params_mmcboot.bin
boot boot.img
modules modules.img
rootfs rootfs.img
Last updated on: