summaryrefslogtreecommitdiffstats
path: root/target/linux/image/jffs2.mk
blob: dd5edd01c0f62267c07c0af41274d60d4a4ffe97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
ifneq ($(CONFIG_BIG_ENDIAN),y)
JFFS2OPTS :=  --pad --little-endian --squash
else
JFFS2OPTS :=  --pad --big-endian --squash
endif

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

	$(call Image/Build,jffs2-64k)
	$(call Image/Build,jffs2-128k)
endef

$(STAGING_DIR)/bin/mkfs.jffs2:
	$(MAKE) -C $(TOPDIR)/target/linux/image/jffs2 compile

jffs2-clean: FORCE
	$(MAKE) -C $(TOPDIR)/target/linux/image/jffs2 clean
	rm -f $(KDIR)/root.jffs2*

compile-targets: $(STAGING_DIR)/bin/mkfs.jffs2
clean-targets: jffs2-clean