Page 1 of 2

how to do clone nand flas luckfox pico max

Posted: 2024-01-25 11:01
by cttelegram
Hi everyone.
Luckfox Pico card max
Is there a way to create a SPI NAND FLASH clone to install the.img file on a new luckfox pico max?

Re: how to do clone nand flas luckfox pico max

Posted: 2024-01-25 12:43
by Luckfox Taylor
Can you be clearer? Are you trying to create a backup of your configured system?

Re: how to do clone nand flas luckfox pico max

Posted: 2024-01-25 14:07
by cttelegram
Yes please. Please make a backup of my system and then install Luckfox pico max on other cards.
I would like to do a series project on identical Luckfox pico max cards

Re: how to do clone nand flas luckfox pico max

Posted: 2024-01-27 3:47
by Luckfox Taylor
Using an SD card to back up the image is relatively simpler, while backing up the image to SPI FLASH requires further testing.

Re: how to do clone nand flas luckfox pico max

Posted: 2024-01-27 21:44
by cttelegram
Example
https://github.com/radxa/backup-sh

I need a script to backup the nand.
then I have to install the backup on twin cards.

Re: how to do clone nand flas luckfox pico max

Posted: 2024-01-29 4:01
by Luckfox Taylor
Yes, if you want to back up the image of SPI NAND FLASH, you need to boot from the SD card and then read it. We also have a similar tutorial (https://wiki.luckfox.com/Core3566/Core3 ... tem-backup), but it has not been tested on the Luckfox Pico series. We still need to add the lsblk command into it. Once it's tested and verified, we will send it to you promptly.

Re: how to do clone nand flas luckfox pico max

Posted: 2024-01-30 18:44
by cttelegram
ok I hope to receive your news immediately.
I need to install my project on many Luckfox boards

Re: how to do clone nand flas luckfox pico max

Posted: 2024-01-31 9:14
by Eng38
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.

Re: how to do clone nand flas luckfox pico max

Posted: 2024-01-31 18:23
by cttelegram
Eng38 wrote: 2024-01-31 9:14 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.


Hi, thank you for your precious help
but I have a doubt
in the manual to boot the card from the sd card I have to delete the nand memory?
https://wiki.luckfox.com/Luckfox-Pico/L ... burn-image

Erasing SPI NAND Flash
For Luckfox Pico Pro/Max, if you want to boot from an SD card, you need to erase the SPI FLASH first. The method for flashing the SD card is the same as for LuckFox Pico. The erasing process is as follows:
a. Load firmware and select advanced functions.
b. Download the DownloadBin.
c. Click "Erase All".

is there an updated guide for linux user to boot the card from sdcard without erasing the nand memory?
thank you so much for your help

Re: how to do clone nand flas luckfox pico max

Posted: 2024-02-01 1:13
by Eng38
Hello,

There's no need to erase the SPI NAND FLASH memory. During the boot sequence, the system will first prioritize detecting the TF card and then proceed to check the SPI NAND FLASH.