Hi everyone,
I've been working on a large scale installation that make use of 80 Vivid Unit.
It's working fine, but I'd like to create a few spare unit just in case.
I'm looking for a way to "clone" a Vivid Unit, so I don't need to re-install and re-configure everything from scratch... Is there a way to do that ?
Thanks in advance!
Vivid Unit stores the system to 7 separated partitions:
GPT part: 0, name: uboot, start:0x4000, size:0x2000 GPT part: 1, name: trust, start:0x6000, size:0x2000 GPT part: 2, name: misc, start:0x8000, size:0x2000 GPT part: 3, name: boot, start:0xa000, size:0x20000 GPT part: 4, name: recovery, start:0x2a000, size:0x40000 GPT part: 5, name: backup, start:0x6a000, size:0x10000 GPT part: 6, name: rootfs, start:0x7a000, size:0x39c3fdf
You can use lsblk command to list them:
vivid@vivid-unit:~$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT mtdblock0 31:0 0 8M 0 disk mmcblk0 179:0 0 29.1G 0 disk ├─mmcblk0p1 179:1 0 4M 0 part ├─mmcblk0p2 179:2 0 4M 0 part ├─mmcblk0p3 179:3 0 4M 0 part ├─mmcblk0p4 179:4 0 64M 0 part ├─mmcblk0p5 179:5 0 128M 0 part ├─mmcblk0p6 179:6 0 32M 0 part └─mmcblk0p7 179:7 0 28.9G 0 part
The partition you are interersted is the last one (rootfs), which stores all files in the Debian based Linux system.
You can backup that partion to an image file (rootfs.img), and then use the rkdeveloptool to flash it into another Vivid Unit (in MaskRom mode) like this:
rkdeveloptool db rkxx_loader_vx.xx.bin rkdeveloptool ul rkxx_loader_vx.xx.bin rkdeveloptool wl 0x7a000 rootfs.img rkdeveloptool rd
This can also be done with RKDevTool, which is the GUI and non-open-source version of rkdeveloptool.
However using these tools are rather complex, and you may not want to use them unless you have to. You may consider synchronizing the data instead of performing real clone. There are tools that can do data synchronization between devices connected to the same network, for example rsync.