From 46f6626052e9a4da474db530f41508ef41915767 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 7 Nov 2015 12:51:31 +0000 Subject: include/image.mk: Introduce generic option to wrap kernel into JFFS2 Some devices require the kernel to be in a JFFS2 file system. Make the support for this more generic so that it can be used by other devices. Signed-off-by: Benjamin Berg SVN-Revision: 47404 --- include/image.mk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include/image.mk') diff --git a/include/image.mk b/include/image.mk index 5cd0d2302b..a6ea8e5452 100644 --- a/include/image.mk +++ b/include/image.mk @@ -347,6 +347,21 @@ define Build/gzip @mv $@.new $@ endef +define Build/jffs2 + rm -rf $(KDIR_TMP)/$(DEVICE_NAME)/jffs2 && \ + mkdir -p $(KDIR_TMP)/$(DEVICE_NAME)/jffs2/$$(dirname $(1)) && \ + cp $@ $(KDIR_TMP)/$(DEVICE_NAME)/jffs2/$(1) && \ + $(STAGING_DIR_HOST)/bin/mkfs.jffs2 --pad \ + $(if $(CONFIG_BIG_ENDIAN),--big-endian,--little-endian) \ + --squash-uids -v -e $(patsubst %k,%KiB,$(BLOCKSIZE)) \ + -o $@.new \ + -d $(KDIR_TMP)/$(DEVICE_NAME)/jffs2 \ + 2>&1 1>/dev/null | awk '/^.+$$$$/' && \ + $(STAGING_DIR_HOST)/bin/padjffs2 $@.new -J $(patsubst %k,,$(BLOCKSIZE)) + -rm -rf $(KDIR_TMP)/$(DEVICE_NAME)/jffs2/ + @mv $@.new $@ +endef + define Build/kernel-bin rm -f $@ cp $^ $@ -- cgit v1.2.3