Skip to contentSkip to conversation

New options for JFFS2 to support Dataflash

PATCH New Ulf Samuelsson 2 participants 2 messages Jan 23, 2007 – Jan 24, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 New options for JFFS2 to support Dataflash

AT45 SPI Dataflash need special options for mkfs.jffs2, due to their nonstandard page size (528/1056 byte pages)

This allows these options to be configured.

Best Regards
Ulf Samuelsson

-------------- next part --------------
A non-text attachment was scrubbed...
Name: target_jffs2_Config.in_jffs2root.mk.patch
Type: text/x-patch
Size: 2675 bytes
Desc: not available
Url : http://busybox.net/lists/buildroot/attachments/20070123/09541322/attachment.bin

#1 lore raw

PATCH 1/1 New options for JFFS2 to support Dataflash

Quoted 9 lines · Ulf Samuelsson

AT45 SPI Dataflash need special options for mkfs.jffs2, due to their nonstandard page size (528/1056 byte pages)

This allows these options to be configured.

Best Regards
Ulf Samuelsson

Quoted 5 lines

Author: Ulf Samuelsson
Date: 2007-01-23

Log:
Additionals JFFS2 options to support Dataflash

typo: Additional without trailing 's'

Quoted 16 lines

Modified:
target/jffs2/Config.in
target/jffs2/jffs2root.mk
Changeset
Modified: target/jffs2/Config.in
target/jffs2/jffs2root.mk

diff -urN buildroot-0rig/target/jffs2/Config.in buildroot-20070116-RC2/target/jffs2/Config.in

target/jffs2/Config.in +1 -0
@@ -5,6 +5,26 @@
 	help
 	  Build a jffs2 root filesystem
 
+config BR2_TARGET_ROOTFS_JFFS2_DEFAULT_PAGESIZE

target/jffs2/Config.in line 18

Quoted 10 lines
target/jffs2/Config.in +10 -0
+	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)

We use \t\ \ The helptext.
and not \t\t
fixed.

target/jffs2/Config.in line 26

Quoted 8 lines
target/jffs2/Config.in +8 -0
+
+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

ditto

target/jffs2/jffs2root.mk line 7

Quoted 13 lines
target/jffs2/Config.in +1 -0
+

config BR2_TARGET_ROOTFS_JFFS2_EBSIZE
hex "Erase block size"
depends on BR2_TARGET_ROOTFS_JFFS2
diff -urN buildroot-0rig/target/jffs2/jffs2root.mk buildroot-20070116-RC2/target/jffs2/jffs2root.mk

target/jffs2/jffs2root.mk +1 -1
@@ -4,7 +4,7 @@
 #
 #############################################################
 
-JFFS2_OPTS := -e $(strip $(BR2_TARGET_ROOTFS_JFFS2_EBSIZE))
+JFFS2_OPTS:= -e $(strip $(BR2_TARGET_ROOTFS_JFFS2_EBSIZE))

unrelated whitespace. Dropped

Quoted 25 lines
target/jffs2/jffs2root.mk +0 -0
 ifeq ($(strip $(BR2_TARGET_ROOTFS_JFFS2_PAD)),y)
 ifneq ($(strip $(BR2_TARGET_ROOTFS_JFFS2_PADSIZE)),0x0)
@@ -26,8 +26,15 @@

JFFS2_OPTS += -b
endif

target/jffs2/jffs2root.mk +9 -2
-JFFS2_TARGET := $(subst ",,$(BR2_TARGET_ROOTFS_JFFS2_OUTPUT))
-JFFS2_DEVFILE = $(strip $(subst ",,$(BR2_TARGET_ROOTFS_JFFS2_DEVFILE)))
+ifneq ($(strip $(BR2_TARGET_ROOTFS_JFFS2_DEFAULT_PAGESIZE)),y)
+JFFS2_OPTS += -s $(strip $(BR2_TARGET_ROOTFS_JFFS2_PAGESIZE))
+ifeq ($(strip $(BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER)),y)
+JFFS2_OPTS += -n
+endif
+endif
+
+JFFS2_TARGET:= $(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

target/jffs2/jffs2root.mk +0 -0
@@ -68,6 +75,9 @@
 ifneq ($(JFFS2_COPYTO),)
 	@cp -f $(JFFS2_TARGET) $(JFFS2_COPYTO)

endif

target/jffs2/jffs2root.mk

Quoted 2 lines
target/jffs2/jffs2root.mk +2 -0
+	@mkdir -p binaries/$(BOARDNAME)
+	@cp -f $(JFFS2_TARGET) binaries/$(BOARDNAME)

Set JFFS2_COPYTO in your .config instead

Quoted 4 lines

+

jffs2root-source: mtd-host-source

Applied with some additional cleanups while at it. Thanks,