[ELDK] [PATCH][RFSB] Expand mkfs.jffs2 options

Ron Madrid ron_madrid at sbcglobal.net
Fri Jun 25 01:47:36 CEST 2010


This patch will add the options for page size, image padding, clean markers,
and clean marker size.

Signed-off-by: Ron Madrid <ron_madrid at sbcglobal.net>
---
 Config.in |   35 +++++++++++++++++++++++++++++++++++
 Makefile  |   12 ++++++++++++
 2 files changed, 47 insertions(+), 0 deletions(-)

diff --git a/Config.in b/Config.in
index 39c965b..7086fb8 100644
--- a/Config.in
+++ b/Config.in
@@ -135,6 +135,41 @@ config JFFS2_ERASE_BLOCKSIZE
          going to be used on.  On NOR flashes nowadays this is usally
          greater than 64k, whereas NAND usually has 16k today.
 
+config JFFS2_PAGE_SIZE
+       depends IMAGE_JFFS2
+       int "Page size to use for image"
+       default 4096
+       help
+         This has to match the page size of the chip the image is going to
+	 be used on.  For large page NAND flash this is usally 2 KiB and
+	 for small page NAND FLASH this is usually 512 bytes.
+
+config JFFS2_PAD_IMAGE
+       depends IMAGE_JFFS2
+       bool "Pad the JFFS2 image"
+       default y
+       help
+         This will pad the resultant JFFS2 image to the next eraseblocksize
+	 boundary.
+
+config JFFS2_CLEANMARKER
+       depends IMAGE_JFFS2
+       bool "Apply CLEANMARKER nodes to JFFS2 image"
+       default n
+       help
+         Write 'CLEANMARKER' nodes to the beginning of each erase block. This
+	 option can be useful for creating JFFS2 images for use on NAND flash,
+	 and for creating images which are to be used on a variety of hardware
+	 with differing eraseblock sizes.
+
+config JFFS2_CLEANMARKER_SIZE
+       depends JFFS2_CLEANMARKER
+       int "CLEANMARKER size"
+       default 12
+       help
+         Write 'CLEANMARKER' nodes with the size specified. It is not normally
+	 appropriate to specify a size other than the default 12 bytes.
+
 config IMAGE_UBIFS
        bool "Create UBIFS image"
        default n
diff --git a/Makefile b/Makefile
index 2ccc845..7ca48bc 100644
--- a/Makefile
+++ b/Makefile
@@ -129,6 +129,18 @@ else
 JFFS2_FLAGS=-l
 CRAMFS_FLAGS=-l
 endif
+
+ifeq ($(strip $(JFFS2_PAD_IMAGE)),y)
+JFFS2_FLAGS+=--pad
+endif
+
+ifeq ($(strip $(JFFS2_CLEANMARKER)),y)
+JFFS2_FLAGS+=--cleanmarker=$(strip $(JFFS2_CLEANMARKER_SIZE))
+else
+JFFS2_FLAGS+=-n
+endif
+
+JFFS2_FLAGS+=-s $(strip $(JFFS2_PAGE_SIZE))
 SQUASHFS_FLAGS=
 
 all:   $(image_targets)
-- 
1.7.0.4



More information about the eldk mailing list