open-plc-utils: new package
[buildroot-gz.git] / fs / jffs2 / jffs2.mk
blob0232199be56dcf8e3f1aaac05a636e40e538184e
1 ################################################################################
3 # Build the jffs2 root filesystem image
5 ################################################################################
7 JFFS2_OPTS := -e $(BR2_TARGET_ROOTFS_JFFS2_EBSIZE)
8 SUMTOOL_OPTS := $(JFFS2_OPTS)
10 ifeq ($(BR2_TARGET_ROOTFS_JFFS2_PAD),y)
11 ifneq ($(strip $(BR2_TARGET_ROOTFS_JFFS2_PADSIZE)),0x0)
12 JFFS2_OPTS += --pad=$(strip $(BR2_TARGET_ROOTFS_JFFS2_PADSIZE))
13 else
14 JFFS2_OPTS += -p
15 endif
16 SUMTOOL_OPTS += -p
17 endif
19 ifeq ($(BR2_TARGET_ROOTFS_JFFS2_LE),y)
20 JFFS2_OPTS += -l
21 SUMTOOL_OPTS += -l
22 endif
24 ifeq ($(BR2_TARGET_ROOTFS_JFFS2_BE),y)
25 JFFS2_OPTS += -b
26 SUMTOOL_OPTS += -b
27 endif
29 JFFS2_OPTS += -s $(BR2_TARGET_ROOTFS_JFFS2_PAGESIZE)
30 ifeq ($(BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER),y)
31 JFFS2_OPTS += -n
32 SUMTOOL_OPTS += -n
33 endif
35 ROOTFS_JFFS2_DEPENDENCIES = host-mtd
37 ifneq ($(BR2_TARGET_ROOTFS_JFFS2_SUMMARY),)
38 define ROOTFS_JFFS2_CMD
39 $(MKFS_JFFS2) $(JFFS2_OPTS) -d $(TARGET_DIR) -o $@.nosummary && \
40 $(SUMTOOL) $(SUMTOOL_OPTS) -i $@.nosummary -o $@ && \
41 rm $@.nosummary
42 endef
43 else
44 define ROOTFS_JFFS2_CMD
45 $(MKFS_JFFS2) $(JFFS2_OPTS) -d $(TARGET_DIR) -o $@
46 endef
47 endif
49 $(eval $(call ROOTFS_TARGET,jffs2))