USB drive upgrade
Overview
The USB drive upgrade writes the system image to a USB drive. On power-on, U-Boot reads the USB drive, flashes the image to the onboard eMMC, and the board reboots into the new system.
Prepare the USB drive once. After that, the same USB drive can be reused, and flashing on the board needs no PC and no XBurn. It is suitable for production-line batch flashing and on-site recovery.
The USB drive upgrade uses img_packages/disk/emmc_disk.simg, the same image that XBurn uses when flashing the emmc region. Only the transport changes from a PC to a USB drive.
| Method | Carrier | Supported operations | Scenario |
|---|---|---|---|
| XBurn | PC + USB | Flash full image / Flash specific regions / Flash specific partition images / Back up specific regions | First-time flash, system recovery, partition-level maintenance |
| USB drive upgrade | USB drive | Flash the complete eMMC region only (emmc_disk.simg) | No PC, batch flashing, on-site recovery |
The USB drive upgrade can only flash a sparse image from the USB drive to the onboard eMMC. It cannot back up or write the onboard eMMC content back to a USB drive. To back up the system, use XBurn backup.
RDK S100 V4.1.0 and later support the USB drive upgrade. Earlier versions ship a U-Boot without this feature, so no upgrade log appears after power-on.
Prerequisites
To complete this procedure, prepare:
- An RDK S100 board that boots from onboard eMMC
- A USB drive: at least 16 GB, USB 3.0 or above
- A debug serial cable for monitoring and verification
- The system image
img_packages/disk/emmc_disk.simg. See Image download. This method does not require XBurn.
Procedure
Step 1: Create the upgrade USB drive
U-Boot only recognizes a sparse image written at the beginning of the USB drive (LBA 0). U-Boot does not recognize a .simg file copied into a FAT or exFAT file system. Write the image to the whole-disk device with dd.
This step erases all data and partitions on the USB drive. Check the device name against the capacity carefully, and never select your PC system disk.
Run the commands in this step from the unzipped product directory; the image is in img_packages/disk/.
-
Insert the USB drive in a Linux or WSL environment and identify the whole-disk device:
lsblkExample output (
sdfis the USB drive in this example; identify yours by capacity):sdf 8:80 1 58.6G 0 disk
└─sdf1 8:81 1 58.6G 0 part -
(Optional) Verify that the image is a sparse image. The sparse image header starts with
3aff 26ed:xxd -l 4 img_packages/disk/emmc_disk.simgExpected output:
00000000: 3aff 26ed -
Erase the partition table and boot record at the beginning of the USB drive:
sudo dd if=/dev/zero of=/dev/sdf bs=512 count=2048Expected output:
2048+0 records in
2048+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied -
Write the image to the whole-disk device:
sudo dd if=img_packages/disk/emmc_disk.simg of=/dev/sdf bs=4M conv=sync status=progressExpected output (byte counts vary by image version):
2150+0 records out
9017753600 bytes (9.0 GB, 8.4 GiB) copied, 449.323 s, 20.1 MB/s -
Flush the cache and eject the USB drive safely:
sync
sudo eject /dev/sdf
conv=sync pads the last partial block to a full 4 MiB block, so the reported byte count is a multiple of 4 MiB and slightly larger than the image file size. This is expected. If dd reports an error, or the byte count is smaller than the image file size, repeat steps 3 and 4.
Step 2: Connect the USB drive and cold boot
- Keep the board powered off and insert the prepared USB drive into a USB 3.0 Type-A port (J19/J20). The USB Type-C port (J16) is device-only and cannot host a USB drive.
- Connect the PC and the debug serial port with a Type-C cable. For serial settings, see Type-C (J16).
- Power off the board and power it on again. The automatic upgrade only runs on a cold boot; a soft reboot such as
rebootskips it.
Step 3: Watch the upgrade
After U-Boot starts, it probes the USB drive first. Example log:
u disk auto upgrade: enabled
u disk upgrade: boot reason=poweroff (0xdead40ff)
...
USB upgrade source: usb 0 Vendor: Kingston Prod: DataTraveler 3.0
USB sparse image found, upgrading...
USB upgrade scratch @ 0x400000000
Do NOT remove the USB disk!!!
simg file bytes: 9015699728, expanded bytes: 24747937792
Flashing Sparse Image
...
upgrade progress: 222261248 / 24747937792 bytes (0%)
...
##################################
# USB disk upgrade to mmc SUCCESS, need reboot system.
##################################
upgrade from USB disk Success, now reboot system
- The first line
u disk auto upgrade: enabledmeans the upgrade is triggered automatically at power-on. S100 has no switch to disable the automatic upgrade. USB sparse image found, upgrading...means the image was found and flashing has started.- Do not remove the USB drive or power off during flashing. The board reboots automatically when progress reaches 100%.
- The time required depends on USB drive and eMMC throughput, typically several minutes.
Verification
-
Success: the serial console shows
# USB disk upgrade to mmc SUCCESS, need reboot system.and the board reboots automatically. -
Remove the USB drive after the reboot and confirm the version matches the USB drive image:
cat /etc/versionThe output is the version carried by the image. You can also run
sudo rdkos_infofor complete system information. See rdkos_info command. -
Failure: the serial console shows
# USB disk upgrade to mmc FAILED.and stops at the U-Boot command line. See FAQ.
Advanced usage
Trigger the upgrade manually
Enter the U-Boot command line (press and hold the spacebar right after power-on) and run:
u_disk_upgrade # automatically select the USB drive whose LBA 0 holds a sparse image
u_disk_upgrade force # skip the cold-boot check and upgrade immediately
FAQ
No upgrade log appears after power-on with the USB drive inserted
Cause: The system version is earlier than V4.1.0, and its U-Boot does not include the feature.
Solution: Run cat /etc/version to check the system version, and upgrade the system first if it is earlier than V4.1.0.
The console shows skip u disk upgrade: not POR
Cause: This boot is a soft reboot rather than a cold boot. The automatic reboot after a successful upgrade also shows this message, which is expected and prevents flashing again.
Solution: Power off and power on again, or enter the U-Boot command line at the prompt and run u_disk_upgrade force.
The console shows skip u disk upgrade: no sparse image on USB storage
Cause: The beginning of the USB drive does not hold a sparse image. This usually happens when the .simg file was copied into a FAT or exFAT file system as an ordinary file.
Solution: Write the image to the whole-disk device with dd as described in Step 1.
The upgrade repeats on the next power-on
Cause: The USB drive is still inserted, so a cold boot triggers the automatic upgrade again.
Solution: Remove the USB drive after the upgrade completes.
The console shows USB disk upgrade to mmc FAILED and stops at the U-Boot command line
Cause: The image write was incomplete or the file is corrupted, or the target eMMC is smaller than the expanded image size.
Solution: Recreate the USB drive and make sure the dd byte count is not smaller than the image file size. Check the eMMC capacity. In the U-Boot command line, run run u_disk_upgrade_cmd to retry.