LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices

Reply
 
LinkBack Search this Thread
Old 03-23-2011, 12:06 PM   #1
njozwiak
LQ Newbie
 
Registered: Jul 2008
Location: Manchester, NH
Distribution: Fedora Core
Posts: 22

Rep: Reputation: 1
Padding jffs2 rootfs image


Hi all,

I'm working on an embedded system with 64MB of Flash on it. I currently have the kernel, u-boot, and the device tree stored at the end of Flash and am trying to build a rootfs image to put at the beginning of Flash.

I am using JFFS2 and without any padding my image size is 5MB. I am trying to allocate extra space, and since I have plenty, I would like to pad it up to 32MB.

The image was originally built by ltib and so I copied the command that ltib was doing and made my own script to do it. The command I am executing is the following:

Code:
mkfs.jffs2 -n -p -D $DEVICETABLE -U -b -e 256 -d $ROOTFS -o /tftpboot/rootfs.jffs2
According to the man page for mkfs.jffs2:

Quote:
Options that take SIZE arguments can be specified as either decimal (e.g., 65536), octal (0200000), or hexidecimal (0x1000).
-p, --pad[=SIZE]
Pad output to SIZE bytes with 0xFF. If SIZE is not specified, the output is padded to the end of the final erase block.
I have tried everything I can think of to pad this to 32MB. I have done "-p 28311552", "-p 0x1B00000", etc. But not only does it not pad to 32MB. The file size never goes above the original 5MB.

Any ideas?

Thanks
 
Old 03-23-2011, 01:55 PM   #2
njozwiak
LQ Newbie
 
Registered: Jul 2008
Location: Manchester, NH
Distribution: Fedora Core
Posts: 22

Original Poster
Rep: Reputation: 1
Issue resolved. The correct syntax is:

Code:
mkfs.jffs2 -n --pad=0x2000000 -D $DEVICETABLE -U -b -e 256 -d $ROOTFS -o /tftpboot/rootfs.jffs2
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Merging kernel image and rootfs jaepi Linux - Embedded & Single-board computer 3 03-22-2011 10:29 AM
Convert jffs2 image to C source code whiskybolt Linux - Software 3 02-18-2011 09:59 AM
How to reduce size of rootfs.jffs2 sumiram Linux - Software 0 01-28-2011 05:18 AM
tool to write JFFS2 image on CF newbieMhke Linux - Software 1 07-25-2006 09:03 AM
How do I create a jffs2 loopback image? rjlee Linux - General 0 04-22-2006 12:02 PM


All times are GMT -5. The time now is 11:12 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration