Batch Production Deployment. Cloning NAND Image

Hi,
I’m interested in use ROCKPI S in production enviroment and I would like to know if there is any possiblity to clone actual and running OS in ROCKPI S, extract the image and put it in new units as show it in “Install on SD NAND Flash”.

Alejandro

Hi, have a look at this backup script:

Hi, thank you for the backup script.
Maybe I’m not doing something right. When I have the img backup file, how we can restore it? I’ve tried with rkdeveloptool wl 0 /path/to/backup.img but doesn’t works .

Thank you,

Hi, Hello, I use the Debian system of rockpis. I use the script recommended above in Debian system to backup the current system, which can successfully complete the backup. Now I’ll tell you how I operate it. I hope it can help you!

  1. Download the Debian firmware to Rockpis:
    (1) Start Rockpis to MaskROM;
    (2) In the shell of PC, as follow:
$ rkdeveloptool ld
DevNo=1	Vid=0x2207,Pid=0x330e,LocationID=101	Maskrom

$ rkdeveloptool db rk3308_loader_uart0_m0_emmc_port_support_sd_20190717.bin
Downloading bootloader succeeded.

$ rkdeveloptool wl 0 rockpis_debian_buster_minimal_arm64_20200315_1123-gpt.img
Write LBA from file (100%)

$ rkdeveloptool rd
Reset Device OK.
  1. Enter the system and upload the script(rockpi-backup.sh):
    (1) In the shell of rockpis, as follow:
rock@rockpis:~$ scp xxx@192.168.xxx.xxx:/xxx/rockpi-toolkit/rockpi-backup.sh .
rock@rockpis:~$ sudo vim /etc/apt/sources.list.d/apt-radxa-com.list

deb http://apt.radxa.com/buster-stable/ buster main
deb http://apt.radxa.com/buster-testing/ buster main

rock@rockpis:~$ sudo apt-get update
rock@rockpis:~$ mount /dev/mmcblk0p1 /mnt	#This is my SD card
rock@rockpis:~$ sudo ./rockpi-backup.sh -m rockpis -o /mnt/rockpis-backup.img
...			
Do you want to apt-get install the packages? [Y/n] y
Do you want to continue? [Y/n] y
...
Backup done, the file is /mnt/rockpis-backup.img
			
rock@rockpis:~$ls /mnt
lost+found  rockpis-backup.img
  1. Download backup image to rockpis:
    (1) Pull the backup file from SD card to PC;
    (2) Start Rockpis to MaskROM;
    (3) In the shell of PC, as follow:
$ rkdeveloptool ld
DevNo=1	Vid=0x2207,Pid=0x330e,LocationID=101	Maskrom
		
$ rkdeveloptool db xxx/rk3308_loader_uart0_m0_emmc_port_support_sd_20190717.bin
Downloading bootloader succeeded.

$ rkdeveloptool wl 0 xxx/rockpis-backup.img
Write LBA from file (100%)
		
$ rkdeveloptool rd
Reset Device OK.

(4) In the shell of rockpis, as follow:

Debian GNU/Linux 10 rockpis ttyFIQ0
rockpis login:
Password: 
Last login: Sat Jun 13 08:36:33 UTC 2020 on ttyFIQ0
Linux rockpis 4.4.143-39-rockchip-gdaf243b9655a #1 SMP PREEMPT Thu Mar 12 07:51:00 UTC 2020 aarch64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
rock@rockpis:~$ ls 
rockpi-backup.sh
rock@rockpis:~$ 
  1. done.

Thank you for your help.
I’ve already tried this solution. It works perfectly when I don’t install many packages in the distro.
I have seen that when the NAND memory is almost full, writing the cloned image into new boards gives errors.