how to do clone nand flas luckfox pico max

  • Can you be clearer? Are you trying to create a backup of your configured system?
  • 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
  • Using an SD card to back up the image is relatively simpler, while backing up the image to SPI FLASH requires further testing.
  • 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.
  • 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.
  • ok I hope to receive your news immediately.
    I need to install my project on many Luckfox boards
  • 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.
  • 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
    Attachments
    Schermata del 2024-01-31 19-20-10.png
  • 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.