System image flash onto eMMC via dd or ums

Apalis TK1 Linux Image v2.6.1 Beta 2 references in the related readme file the flash instructions for the TK1. From within u-boot one needs to execute run setupdate and run update (e.g. ~ flash_eth.scr).

run update writes the master boot record (Apalis_TK1_LinuxImageV2.6.1/apalis-tk1/mbr.bin) and the boot partition (Apalis_TK1_LinuxImageV2.6.1/apalis-tk1/boot.vfat) into eMMC partition 0. In addition it writes u-boot (Apalis_TK1_LinuxImageV2.6.1/apalis-tk1/apalis-tk1.img), the kernel (Apalis_TK1_LinuxImageV2.6.1/apalis-tk1/uImage) and the device tree binary (Apalis_TK1_LinuxImageV2.6.1/apalis-tk1/uImage-tegra124-apalis-eval.dtb) into eMMC partition 1.

How do I get a whole system image which can be flashed onto the device eMMC in an atomic step like described here for the bananapi via dd or here via u-boot ums?

You can use the U-boot UMS feature to do this as described here: Create Working System Image on Apalis T30 - #4 by marcel.tx - Technical Support - Toradex Community .

@marcel.tx The partition in which u-boot resides should be cloned as well. Then one needs to run u-boot from ram using the recovery mode, right?

I made the eMMC accessible to the host as usb mass storage device running Apalis TK1 # ums 0 mmc 0 in the u-boot prompt. Then boot and rootfs have been mounted in /media/kromer/boot and /media/kromer/rootfs. But no directory content was visible. I had to unmount and mount boot and rootfs again. Like expected boot contains tegra124-apalis-eval.dtb and uImage. rootfs contains all the file system files.

But how can I clone/restore the whole system image information (including mbr, u-boot, etc.) in one “atomic” step? If I boot into linux on the target I should be able to use dd with ssh to transfer the whole eMMC content (including /dev/mmcblk0/mmcblk0boot1 and …/mmcblk0boot1) to the host over ethernet using something like ubuntu@tegra-ubuntu:~$ dd if=/dev/mmcblk0 | ssh admin@ "dd of=/home/kromer/full_backup.img" backup - Do I have to unmount /dev/mmcblk0 when doing dd over SSH? - Stack Overflow. But my rootfs is not readonly and this could be a problem I guess… Would it make any difference to clone the eMMC by accessing it from the host side (something like kromer@rc-019:~$ dd ssh ubuntu@ubuntu.local "dd if=/dev/mmcblk0" | dd of=home/kromer/full_backup.img)?