- Additional JFFS2 options to support Dataflash (Ulf Samuelsson)
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Wed, 24 Jan 2007 23:18:08 +0000 (23:18 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Wed, 24 Jan 2007 23:18:08 +0000 (23:18 -0000)
- cleanup a bit while at it

target/jffs2/Config.in
target/jffs2/jffs2root.mk

index 7ee0b7051bb9a6ae3dbd4b20862999626c08c7ec..a16848ef5860cb781770a70a6171f56d7d4bae09 100644 (file)
@@ -5,6 +5,26 @@ config BR2_TARGET_ROOTFS_JFFS2
        help
          Build a jffs2 root filesystem
 
+config BR2_TARGET_ROOTFS_JFFS2_DEFAULT_PAGESIZE
+       bool "Use default 4 kB pagesize"
+       depends on BR2_TARGET_ROOTFS_JFFS2
+       default y                       
+
+config BR2_TARGET_ROOTFS_JFFS2_PAGESIZE
+       hex "Page Size (0x0 = Use default 4 kB)"
+       depends on !BR2_TARGET_ROOTFS_JFFS2_DEFAULT_PAGESIZE
+       default 0x420
+       help
+         Set to pagesize of memory (Dataflash is 0x210 or 0x420)
+
+config BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER
+       bool    "Do not use Cleanmarker"
+       depends on !BR2_TARGET_ROOTFS_JFFS2_DEFAULT_PAGESIZE
+       default y
+       help
+         Do not use cleanmarkers if using NAND flash or Dataflash where
+         the pagesize is not a power of 2
+
 config BR2_TARGET_ROOTFS_JFFS2_EBSIZE
        hex "Erase block size"
        depends on BR2_TARGET_ROOTFS_JFFS2
@@ -19,7 +39,7 @@ config BR2_TARGET_ROOTFS_JFFS2_PADSIZE
        depends on BR2_TARGET_ROOTFS_JFFS2_PAD
        default 0x0
        help
-               Set to 0x0 to pad to end of erase block.
+         Set to 0x0 to pad to end of erase block.
 
 choice
        prompt "Endianess"
@@ -50,6 +70,5 @@ config BR2_TARGET_ROOTFS_JFFS2_COPYTO
        depends on      BR2_TARGET_ROOTFS_JFFS2
        default ""
        help
-               Copies the resulting image to a secondary location.
-
+         Copies the resulting image to a secondary location.
 
index f5622a8fb120585a2d5aa7d39f32680c978578a9..db0489d9a4b2a7176244911acb387c1a7c0280bd 100644 (file)
@@ -14,20 +14,29 @@ JFFS2_OPTS += -p
 endif
 endif
 
-ifeq ($(strip $(BR2_TARGET_ROOTFS_JFFS2_SQUASH)),y)
+ifeq ($(BR2_TARGET_ROOTFS_JFFS2_SQUASH),y)
 JFFS2_OPTS += -q
 endif
 
-ifeq ($(strip $(BR2_TARGET_ROOTFS_JFFS2_LE)),y)
+ifeq ($(BR2_TARGET_ROOTFS_JFFS2_LE),y)
 JFFS2_OPTS += -l
 endif
 
-ifeq ($(strip $(BR2_TARGET_ROOTFS_JFFS2_BE)),y)
+ifeq ($(BR2_TARGET_ROOTFS_JFFS2_BE),y)
 JFFS2_OPTS += -b
 endif
 
-JFFS2_TARGET := $(subst ",,$(BR2_TARGET_ROOTFS_JFFS2_OUTPUT))
+ifneq ($(BR2_TARGET_ROOTFS_JFFS2_DEFAULT_PAGESIZE),y)
+JFFS2_OPTS += -s $(BR2_TARGET_ROOTFS_JFFS2_PAGESIZE)
+ifeq ($(BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER),y)
+JFFS2_OPTS += -n
+endif
+endif
+
+JFFS2_TARGET := $(strip $(subst ",,$(BR2_TARGET_ROOTFS_JFFS2_OUTPUT)))
+#"))
 JFFS2_DEVFILE = $(strip $(subst ",,$(BR2_TARGET_ROOTFS_JFFS2_DEVFILE)))
+#"))
 ifneq ($(JFFS2_DEVFILE),)
 JFFS2_OPTS += -D $(TARGET_DEVICE_TABLE)
 endif
@@ -62,7 +71,7 @@ $(JFFS2_TARGET): host-fakeroot makedevs mtd-host
        @ls -l $(JFFS2_TARGET)
 
 JFFS2_COPYTO := $(strip $(subst ",,$(BR2_TARGET_ROOTFS_JFFS2_COPYTO)))
-# " stupid syntax highlighting does not like unmatched quote from above line
+#"))
 
 jffs2root: $(JFFS2_TARGET)
 ifneq ($(JFFS2_COPYTO),)