* [Buildroot] [Bug 8106] New: mkfs.jffs2 uses the --pagesize parameter incorrectly
@ 2015-05-15 6:24 bugzilla at busybox.net
2015-05-15 13:41 ` [Buildroot] [Bug 8106] " bugzilla at busybox.net
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: bugzilla at busybox.net @ 2015-05-15 6:24 UTC (permalink / raw)
To: buildroot
https://bugs.busybox.net/show_bug.cgi?id=8106
Summary: mkfs.jffs2 uses the --pagesize parameter incorrectly
Product: buildroot
Version: 2015.02
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P5
Component: Other
AssignedTo: unassigned at buildroot.uclibc.org
ReportedBy: mlesniew at gmail.com
CC: buildroot at uclibc.org
Estimated Hours: 0.0
Buildbot is able to generate the output image in different formats, one of them
is JFFS2. The image is created as usual using the mkfs.jffs2 tool. As the
JFFS2 system is intended for use with mtd devices, the tool allows specifying
the parameters of the flash memory, to which the image will be written.
Now in buildroot's config one can choose the type of flash, for which the JFFS2
image will be generated. This are the BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_*
configuration variables. Selecting one of them sets
BR2_TARGET_ROOTFS_JFFS2_EBSIZE and BR2_TARGET_ROOTFS_JFFS2_PAGESIZE values.
BR2_TARGET_ROOTFS_JFFS2_EBSIZE is the erase block size. It should match the
erase block size of the flash memory that will store the image. This value is
later used as a parameter to mkfs.jffs2 (the --eraseblock option). This one is
used correctly.
The BR2_TARGET_ROOTFS_JFFS2_PAGESIZE variable is set to the flash memory page
size. During the build it is used as the value of the --pagesize parameter for
mkfs.jffs2.
It turns out, that the --pagesize parameter of mkfs.jffs2 has nothing to do
with the NAND page size. It should be set to the virtual memory management
page size of the target system. In most cases this should be set to 4K, which
is the default value used if --pagesize is not supplied.
Please consult the mkfs.jffs2 manual page (and the --help output) for details.
--
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [Bug 8106] mkfs.jffs2 uses the --pagesize parameter incorrectly
2015-05-15 6:24 [Buildroot] [Bug 8106] New: mkfs.jffs2 uses the --pagesize parameter incorrectly bugzilla at busybox.net
@ 2015-05-15 13:41 ` bugzilla at busybox.net
2015-05-22 7:45 ` bugzilla at busybox.net
2015-05-22 9:37 ` bugzilla at busybox.net
2 siblings, 0 replies; 4+ messages in thread
From: bugzilla at busybox.net @ 2015-05-15 13:41 UTC (permalink / raw)
To: buildroot
https://bugs.busybox.net/show_bug.cgi?id=8106
--- Comment #1 from Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 2015-05-15 13:41:38 UTC ---
Wow, thanks for this bug report! It seems you are absolutely correct, and I
actually learned with your bug report that the --pagesize option is for the
virtual memory page size, not the NAND page size.
Do you think you can cook a patch to address this problem?
One issue is that Buildroot has no idea what is the virtual memory page size on
the target system. I would suggest to just not pass any --pagesize option, and
leave the default of 4 KB, since this is what the vast majority of systems are
using.
And I'm pretty sure that if you use --pagesize 4K on a system that uses 8 KB or
64 KB pages, it will continue to work fine.
--
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [Bug 8106] mkfs.jffs2 uses the --pagesize parameter incorrectly
2015-05-15 6:24 [Buildroot] [Bug 8106] New: mkfs.jffs2 uses the --pagesize parameter incorrectly bugzilla at busybox.net
2015-05-15 13:41 ` [Buildroot] [Bug 8106] " bugzilla at busybox.net
@ 2015-05-22 7:45 ` bugzilla at busybox.net
2015-05-22 9:37 ` bugzilla at busybox.net
2 siblings, 0 replies; 4+ messages in thread
From: bugzilla at busybox.net @ 2015-05-22 7:45 UTC (permalink / raw)
To: buildroot
https://bugs.busybox.net/show_bug.cgi?id=8106
--- Comment #2 from Micha? Le?niewski <mlesniew@gmail.com> 2015-05-22 07:45:33 UTC ---
I read a bit about the JFFS2 file system and looked at the JFFS2 code in the
Linux kernel. It looks like setting the --pagesize parameter value to the
exact size of the virtual memory page would give the best results (best
compression ratio). However, setting a smaller --pagesize value should work
fine, just as you wrote before.
Anyway, I prepared a patch and sent it to the mailing list
(http://lists.busybox.net/pipermail/buildroot/2015-May/128576.html).
--
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [Bug 8106] mkfs.jffs2 uses the --pagesize parameter incorrectly
2015-05-15 6:24 [Buildroot] [Bug 8106] New: mkfs.jffs2 uses the --pagesize parameter incorrectly bugzilla at busybox.net
2015-05-15 13:41 ` [Buildroot] [Bug 8106] " bugzilla at busybox.net
2015-05-22 7:45 ` bugzilla at busybox.net
@ 2015-05-22 9:37 ` bugzilla at busybox.net
2 siblings, 0 replies; 4+ messages in thread
From: bugzilla at busybox.net @ 2015-05-22 9:37 UTC (permalink / raw)
To: buildroot
https://bugs.busybox.net/show_bug.cgi?id=8106
Peter Korsgaard <jacmet@uclibc.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #3 from Peter Korsgaard <jacmet@uclibc.org> 2015-05-22 09:37:18 UTC ---
Committed as e3904a890de2a74c290675fdb90324a6ed83e633, thanks!
--
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-05-22 9:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-15 6:24 [Buildroot] [Bug 8106] New: mkfs.jffs2 uses the --pagesize parameter incorrectly bugzilla at busybox.net
2015-05-15 13:41 ` [Buildroot] [Bug 8106] " bugzilla at busybox.net
2015-05-22 7:45 ` bugzilla at busybox.net
2015-05-22 9:37 ` bugzilla at busybox.net
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox