Skip to contentSkip to conversation

Fast rollout process on jffs2?

DISCUSSION Robert Schwebel 7 participants 12 messages May 26, 2005 – May 29, 2005 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Hi,

Is there a method for faster rollout of an embedded root filesystem on jffs2? I'm currently first erase the chip from u-boot, then copy the image created with mkfs.jffs2 into the empty flash. On first startup it seems to detect that the partition is larger than the actual image and it takes quite some time before the / mount is finished.

Does anybody know a faster variant?

Robert

Signature · 5 lines
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
     Hannoversche Str. 2, 31134 Hildesheim, Germany
   Phone: +49-5121-206917-0 |  Fax: +49-5121-206917-9
#1 lore raw
Quoted 8 lines · Robert Schwebel

Is there a method for faster rollout of an embedded root filesystem on jffs2? I'm currently first erase the chip from u-boot, then copy the image created with mkfs.jffs2 into the empty flash. On first startup it seems to detect that the partition is larger than the actual image and it takes quite some time before the / mount is finished.

Does anybody know a faster variant?

You can pad the JFFS2 image with the --pad option to mkfs.jffs2.

David Vrabel

Signature · 4 lines
David Vrabel, Design Engineer

Arcom, Clifton Road           Tel: +44 (0)1223 411200 ext. 3233
Cambridge CB1 7EA, UK         Web: http://www.arcom.com/
#2 lore raw
Quoted 8 lines · David Vrabel
Quoted 6 lines · Robert Schwebel

Is there a method for faster rollout of an embedded root filesystem on jffs2? I'm currently first erase the chip from u-boot, then copy the image created with mkfs.jffs2 into the empty flash. On first startup it seems to detect that the partition is larger than the actual image and it takes quite some time before the / mount is finished.

Quoted 4 lines
Quoted 1 line

Does anybody know a faster variant?

You can pad the JFFS2 image with the --pad option to mkfs.jffs2.

But isn't it padded with 0xFF only?

Or will it place the magic "1985 2003" as well?

--
Steven

#3 lore raw
Quoted 6 lines · Steven Scholz
Quoted 1 line · David Vrabel

You can pad the JFFS2 image with the --pad option to mkfs.jffs2.

But isn't it padded with 0xFF only?

Or will it place the magic "1985 2003" as well?

Since I happened to have an image lying around I checked and it does place the clean markers at the start of every erase zone.

David Vrabel

Signature · 4 lines
David Vrabel, Design Engineer

Arcom, Clifton Road           Tel: +44 (0)1223 411200 ext. 3233
Cambridge CB1 7EA, UK         Web: http://www.arcom.com/
#4 lore raw
Quoted 2 lines · David Vrabel

Since I happened to have an image lying around I checked and it does place the clean markers at the start of every erase zone.

Hmm, sounds good, but that probably means that the jffs2 images have to be the full flash size (which is 32 MB in my case) compared to about 8 MB at the moment?

Robert

Signature · 5 lines
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
     Hannoversche Str. 2, 31134 Hildesheim, Germany
   Phone: +49-5121-206917-0 |  Fax: +49-5121-206917-9
#5 lore raw
Quoted 9 lines · Robert Schwebel
Quoted 2 lines · David Vrabel

Since I happened to have an image lying around I checked and it does place the clean markers at the start of every erase zone.

Hmm, sounds good, but that probably means that the jffs2 images have to be the full flash size (which is 32 MB in my case) compared to about 8 MB at the moment?

You could {g,b}zip it. The many 0xFF should compress quite nice... ;-)

--
Steven

#6 lore raw
Quoted 1 line · Steven Scholz

You could {g,b}zip it. The many 0xFF should compress quite nice... ;-)

Yes, but is there a way to decompress gzip/bzip in u-boot?

Robert

Signature · 5 lines
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
     Hannoversche Str. 2, 31134 Hildesheim, Germany
   Phone: +49-5121-206917-0 |  Fax: +49-5121-206917-9
#7 lore raw
Quoted 6 lines · Robert Schwebel
Quoted 1 line · Steven Scholz

You could {g,b}zip it. The many 0xFF should compress quite nice... ;-)

Yes, but is there a way to decompress gzip/bzip in u-boot?

Sure.
But maybe not yet as a user command. But the code is there. I use it to unzip boot logos at start up.

--
Steven

#9 lore raw
In reply to Robert Schwebel
Quoted 3 lines · Robert Schwebel

Hmm, sounds good, but that probably means that the jffs2 images have to be the full flash size (which is 32 MB in my case) compared to about 8 MB at the moment?

You don't have to pad the image. If you use the '-j' argument to RedBoot's 'fis create' command, it'll erase the extra space and write cleanmarkers for you.

Signature · 1 line
dwmw2
#10 lore raw
Quoted 8 lines · David Woodhouse
Quoted 3 lines · Robert Schwebel

Hmm, sounds good, but that probably means that the jffs2 images have to be the full flash size (which is 32 MB in my case) compared to about 8 MB at the moment?

You don't have to pad the image. If you use the '-j' argument to RedBoot's 'fis create' command, it'll erase the extra space and write cleanmarkers for you.

That doesn't seem to be in upstream CVS, is it very new or unmerged?

Ian.

Signature · 4 lines
Ian Campbell, Senior Design Engineer
                                        Web: http://www.arcom.com
Arcom, Clifton Road,                    Direct: +44 (0)1223 403 465
Cambridge CB1 7EA, United Kingdom       Phone:  +44 (0)1223 411 200
#11 lore raw
Quoted 1 line · Ian Campbell

That doesn't seem to be in upstream CVS, is it very new or unmerged?

Er, it's certainly not new. It must be unmerged. I'm trying to remember where I was using it now -- perhaps on the Symbol2800 port? That's the project which funded JFFS2 in the first place.

Signature · 1 line
dwmw2
#8 lore raw
In reply to Steven Scholz
Quoted 8 lines · In message <[email protected]> you wrote:
Quoted 4 lines
Quoted 2 lines

You could {g,b}zip it. The many 0xFF should compress quite nice... ;-)

Yes, but is there a way to decompress gzip/bzip in u-boot?

Sure.
But maybe not yet as a user command. But the code is there. I use it to unzip boot logos at start up.

Sometimes it helps to read the FAQ:
http://www.denx.de/twiki/bin/view/DULG/HowCanILoadAndUncompressACompressedImage

Best regards,

Wolfgang Denk

Signature · 5 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
The joys of love made her human and the  agonies  of  love  destroyed
her.
	-- Spock, "Requiem for Methuselah", stardate 5842.8