diff options
author | Felix Fietkau <nbd@openwrt.org> | 2007-07-16 22:06:45 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2007-07-16 22:06:45 +0000 |
commit | 67b10c9ee3e3044a38c09780f1095df70d55221c (patch) | |
tree | f9afc6488b1e2663dbc7fad5d55f58b56a01baaf /include | |
parent | b3956724d11b333c6fdc88eeea24d23d138ca7e1 (diff) | |
download | upstream-67b10c9ee3e3044a38c09780f1095df70d55221c.tar.gz upstream-67b10c9ee3e3044a38c09780f1095df70d55221c.tar.bz2 upstream-67b10c9ee3e3044a38c09780f1095df70d55221c.zip |
better support for handling various jffs2 eraseblock sizes
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8011 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include')
-rw-r--r-- | include/image.mk | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/include/image.mk b/include/image.mk index 84549c5543..5fc87efa1d 100644 --- a/include/image.mk +++ b/include/image.mk @@ -18,6 +18,8 @@ JFFS2OPTS := --pad --big-endian --squash SQUASHFS_OPTS := -be endif +JFFS2_BLOCKSIZE ?= 64k 128k + define add_jffs2_mark echo -ne '\xde\xad\xc0\xde' >> $(1) endef @@ -36,19 +38,11 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) define Image/mkfs/jffs2 rm -rf $(BUILD_DIR)/root/jffs - $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x10000 -o $(KDIR)/root.jffs2-64k -d $(BUILD_DIR)/root - $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x20000 -o $(KDIR)/root.jffs2-128k -d $(BUILD_DIR)/root - $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x40000 -o $(KDIR)/root.jffs2-256k -d $(BUILD_DIR)/root - - - # add End-of-Filesystem markers - $(call add_jffs2_mark,$(KDIR)/root.jffs2-64k) - $(call add_jffs2_mark,$(KDIR)/root.jffs2-128k) - $(call add_jffs2_mark,$(KDIR)/root.jffs2-256k) - - $(call Image/Build,jffs2-64k) - $(call Image/Build,jffs2-128k) - $(call Image/Build,jffs2-256k) + $(foreach SZ,$(JFFS2_BLOCKSIZE),\ + $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e $(patsubst %k,%KiB,$(SZ)) -o $(KDIR)/root.jffs2-$(SZ) -d $(BUILD_DIR)/root; \ + $(call add_jffs2_mark,$(KDIR)/root.jffs2-$(SZ)); \ + $(call Image/Build,jffs2-$(SZ)) \ + ) endef endif |