Updating Files

Note

You have different options updating files on the module’s partition(s).

USB Mass Storage

You can use the ums command in U-Boot to turn the module into a USB mass storage device and copy the file on the host PC into the mounted, e.g. boot partition of the module.

ums 0 mmc 0

On your host computer:

sudo mount /dev/disk/by-partlabel/boot /mnt
sudo cp a-nice-devicetree.dtb /mnt
sudo umount /mnt

Don’t forget to unmount it before terminating the ‘ums’ command.

<CTRL-C>

Serial Port

You may also use the loady command in U-Boot to transfer a file via serial port.

loady ${fdtaddr}

Now start the [xyz]modem download from your terminal program.

When the file is transferred, you can save it:

save mmc 0 ${loadaddr} /${fdt_file} ${filesize}

UUU way

You can also use UUU - Universal Update Utility to install individual files on the module with the following commands in your uuu script file:

1[...]
2FB: ucmd setenv fastboot_buffer ${loadaddr}
3FB: download -f a-nice-devicetree.dtb
4FB: ucmd save mmc 0 ${fastboot_buffer} a-nice-devicetree.dtb ${fastboot_bytes}