2013-06-06 23:54:13 +02:00
|
|
|
################################################################################
|
2003-01-17 05:31:36 +01:00
|
|
|
#
|
2005-01-23 12:16:11 +01:00
|
|
|
# Build the jffs2 root filesystem image
|
2003-01-17 05:31:36 +01:00
|
|
|
#
|
2013-06-06 23:54:13 +02:00
|
|
|
################################################################################
|
2003-01-17 05:31:36 +01:00
|
|
|
|
2008-12-08 09:15:58 +01:00
|
|
|
JFFS2_OPTS := -e $(BR2_TARGET_ROOTFS_JFFS2_EBSIZE)
|
2008-02-12 06:39:32 +01:00
|
|
|
SUMTOOL_OPTS := $(JFFS2_OPTS)
|
2003-01-17 05:31:36 +01:00
|
|
|
|
2008-12-08 09:15:58 +01:00
|
|
|
ifeq ($(BR2_TARGET_ROOTFS_JFFS2_PAD),y)
|
2005-01-23 12:16:11 +01:00
|
|
|
ifneq ($(strip $(BR2_TARGET_ROOTFS_JFFS2_PADSIZE)),0x0)
|
2006-08-22 10:03:19 +02:00
|
|
|
JFFS2_OPTS += --pad=$(strip $(BR2_TARGET_ROOTFS_JFFS2_PADSIZE))
|
|
|
|
else
|
|
|
|
JFFS2_OPTS += -p
|
2005-01-23 12:16:11 +01:00
|
|
|
endif
|
2008-02-12 06:50:26 +01:00
|
|
|
SUMTOOL_OPTS += -p
|
2005-01-23 12:16:11 +01:00
|
|
|
endif
|
2003-01-17 05:31:36 +01:00
|
|
|
|
2007-01-25 00:18:08 +01:00
|
|
|
ifeq ($(BR2_TARGET_ROOTFS_JFFS2_LE),y)
|
2005-01-23 12:16:11 +01:00
|
|
|
JFFS2_OPTS += -l
|
2008-02-12 06:50:26 +01:00
|
|
|
SUMTOOL_OPTS += -l
|
2005-01-23 12:16:11 +01:00
|
|
|
endif
|
2003-01-17 05:31:36 +01:00
|
|
|
|
2007-01-25 00:18:08 +01:00
|
|
|
ifeq ($(BR2_TARGET_ROOTFS_JFFS2_BE),y)
|
2005-01-23 12:16:11 +01:00
|
|
|
JFFS2_OPTS += -b
|
2008-02-12 06:39:32 +01:00
|
|
|
SUMTOOL_OPTS += -b
|
2005-01-23 12:16:11 +01:00
|
|
|
endif
|
2003-01-17 05:31:36 +01:00
|
|
|
|
2015-05-19 20:26:30 +02:00
|
|
|
ifeq ($(BR2_TARGET_ROOTFS_JFFS2_USE_CUSTOM_PAGESIZE),y)
|
|
|
|
JFFS2_OPTS += -s $(BR2_TARGET_ROOTFS_JFFS2_CUSTOM_PAGESIZE)
|
|
|
|
endif
|
|
|
|
|
2007-01-25 00:18:08 +01:00
|
|
|
ifeq ($(BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER),y)
|
|
|
|
JFFS2_OPTS += -n
|
2008-02-12 06:39:32 +01:00
|
|
|
SUMTOOL_OPTS += -n
|
2007-01-25 00:18:08 +01:00
|
|
|
endif
|
|
|
|
|
2010-03-10 00:16:01 +01:00
|
|
|
ROOTFS_JFFS2_DEPENDENCIES = host-mtd
|
2003-01-17 05:31:36 +01:00
|
|
|
|
2008-02-12 06:39:32 +01:00
|
|
|
ifneq ($(BR2_TARGET_ROOTFS_JFFS2_SUMMARY),)
|
2010-03-10 00:16:01 +01:00
|
|
|
define ROOTFS_JFFS2_CMD
|
2013-01-20 15:03:13 +01:00
|
|
|
$(MKFS_JFFS2) $(JFFS2_OPTS) -d $(TARGET_DIR) -o $@.nosummary && \
|
|
|
|
$(SUMTOOL) $(SUMTOOL_OPTS) -i $@.nosummary -o $@ && \
|
|
|
|
rm $@.nosummary
|
2010-03-10 00:16:01 +01:00
|
|
|
endef
|
2008-02-12 06:39:32 +01:00
|
|
|
else
|
2010-03-10 00:16:01 +01:00
|
|
|
define ROOTFS_JFFS2_CMD
|
2013-01-20 15:03:13 +01:00
|
|
|
$(MKFS_JFFS2) $(JFFS2_OPTS) -d $(TARGET_DIR) -o $@
|
2010-03-10 00:16:01 +01:00
|
|
|
endef
|
2007-03-26 12:31:56 +02:00
|
|
|
endif
|
2005-01-23 12:16:11 +01:00
|
|
|
|
2011-01-14 11:16:09 +01:00
|
|
|
$(eval $(call ROOTFS_TARGET,jffs2))
|