diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-11-07 12:51:31 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-11-07 12:51:31 +0000 |
commit | 46f6626052e9a4da474db530f41508ef41915767 (patch) | |
tree | 3bdf1db8ebc1eeb7e2f5b067c75089d6758cdcf8 /include | |
parent | 141793c96cb9fb39f8848961bf0738976d9805ad (diff) | |
download | mtk-20170518-46f6626052e9a4da474db530f41508ef41915767.zip mtk-20170518-46f6626052e9a4da474db530f41508ef41915767.tar.gz mtk-20170518-46f6626052e9a4da474db530f41508ef41915767.tar.bz2 |
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 <benjamin@sipsolutions.net>
SVN-Revision: 47404
Diffstat (limited to 'include')
-rw-r--r-- | include/image.mk | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/image.mk b/include/image.mk index 5cd0d23..a6ea8e5 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 $^ $@ |