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.
Connect your board USB debug port to your development system as always.
- 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
- Reset the ARTIK board, and while it is counting down for the restart, hit any key to go to U-Boot mode.
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.
On the ARTIK board, run
fast 0. A USB device should be detected by the host system.
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.
Open or create this
sudo vi /etc/udev/rules.d/51-android.rules
Insert this line, save, and exit.
Restart your terminal instance to recognize the change.
Install 'fastboot' Tools on Host
Install on Linux host.
- Install the Android
fastboottools 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.
fastboottools from here or search for "ADB fastboot" if the link is broken.
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.
From the U-Boot prompt, run
fast 0on the ARTIK board to let your PC see the board as a 'fastboot' device.
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]).
Change to the image transfer directory.
Linux: Usually your build output directory; see flash_all section.
cd \adbCopy here any images that you plan to transfer.
For each partition to update, on the host system:
fastboot flash, choose a partition, and point to the file to load. Refer to the Partition Details section below for required partition file names.
fastboot rebooton 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:
Moreover, the flash_all… script is generated in that directory as well. To update a module over USB with your newly generated image:
On your development PC, change to the build output directory.
On your ARTIK board terminal, from the U-Boot prompt, enter:
Your image update is underway! Don't forget to take action on the "resize" message displayed when the script finishes.
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.
Create a file
partition.txton the host system containing the line
partition = "rootfs";
Run the following commands.
fastboot flash setenv partition.txt
fastboot flash -S 0 rootfs rootfs.img
ARTIK 530 Partition Information
|Partition Name||File Name|
ARTIK 710 Partition Information
|Partition Name||File Name|