1. Boot Ubuntu Image from SD Card
Ensure that the target development board has an SD card with the Ubuntu operating system inserted, and boot the system from the SD card.
2. Check SPI NAND FLASH Size
Code: Select all
pico@luckfox:~$ cat /proc/mtd
dev: size erasesize name
mtd0: 10000000 00020000 "spi-nand0"
The size of the device is 0x10000000, in bytes, equivalent to 256 MB. The size of each block (erasesize) is 0x00020000, in bytes, equivalent to 128 KB. Thus, the total number of blocks is 2048.
3. Clone SPI NAND FLASH Image
Execute the following command in Ubuntu system to clone the image from SPI NAND FLASH:
Code: Select all
sudo dd if=/dev/mtdblock0 of=luckfox.img count=2048 bs=128k conv=sync
This command clones the first 2048 blocks of SPI NAND FLASH, each block with a size of 128 KB, into a file named luckfox.img.
4. Clone Image to Another Development Board
Insert the SD card into another development board, ensure that the board has booted, and execute the following command to clone the luckfox.img image to the SPI NAND FLASH:
Code: Select all
sudo dd if=luckfox.img of=/dev/mtdblock0 bs=128k status=progress
This command writes the data from the luckfox.img file into the SPI NAND FLASH of the target development board in 128 KB blocks.
Repeat Step 4 to Clone the Image to Other Development Boards.