[U-Boot] How to create a JFFS2 image to use with U-Boot

Giuseppe Modugno g.modugno at elettronika.it
Wed Jan 14 12:12:19 CET 2009


Dear all,

I have a board running U-Boot and Linux. The root filesystem for 
Linux is in a NOR Flash memory and it is seen as /dev/mtd4 device by 
MTD driver.

I want to create an image file of the root filesystem so I'll be able 
to copy it into another board.

I think to use:
  dd if=/dev/mtd4 of=/rootfs_jffs2.img
After that, I can download this file from U-Boot running on the new 
board (by tftp or similar), erase the Flash sectors and copy the file 
to Flash (cp.b command).

It this procedure correct? I read somewhere 
(http://wiki.davincidsp.com/index.php?title=Create_a_JFFS2_Target_Imag
e) that U-Boot, in certain cases, isn't able to write JFFS2 image 
files to Flash and could appear errors like:
  "Empty flash at 0xXXXXXXXX ends at 0xXXXXXXXX"

Which could be the right method to copy an entire root filesystem 
residing on a JFFS2 partition to a new board?
I can use Linux running on the source board to save the root 
filesystem, but I'd like to use only U-Boot running on the new board 
to copy the filesystem.

Regards,
  Giuseppe Modugno


More information about the U-Boot mailing list