lantiq: switch to kernel 4.14
[openwrt/staging/wigyori.git] / include / image-commands.mk
index 9ec3a84884ba4b6266ee04e96f310ebd9a4bcce8..a8486553998e882ec46ce1434003fece3ce6118c 100644 (file)
@@ -77,16 +77,17 @@ define Build/append-squashfs-fakeroot-be
        cat $@.fakesquashfs >> $@
 endef
 
-# append a fake/empty rootfs uImage header, to fool the bootloaders
-# rootfs integrity check
-define Build/append-uImage-fakeroot-hdr
-       rm -f $@.fakeroot
+# append a fake/empty uImage header, to fool bootloaders rootfs integrity check
+# for example
+define Build/append-uImage-fakehdr
+       touch $@.fakehdr
        $(STAGING_DIR_HOST)/bin/mkimage \
-               -A $(LINUX_KARCH) -O linux -T filesystem -C none \
-               -n '$(call toupper,$(LINUX_KARCH)) $(VERSION_DIST) fakeroot' \
+               -A $(LINUX_KARCH) -O linux -T $(1) -C none \
+               -n '$(VERSION_DIST) fake $(1)' \
+               -d $@.fakehdr \
                -s \
-               $@.fakeroot
-       cat $@.fakeroot >> $@
+               $@.fakehdr
+       cat $@.fakehdr >> $@
 endef
 
 define Build/tplink-safeloader
@@ -118,6 +119,7 @@ define Build/fit
                -D $(DEVICE_NAME) -o $@.its -k $@ \
                $(if $(word 2,$(1)),-d $(word 2,$(1))) -C $(word 1,$(1)) \
                -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
+               -c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config@1") \
                -A $(LINUX_KARCH) -v $(LINUX_VERSION)
        PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new
        @mv $@.new $@