-O linux -T kernel \
-C $(1) -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
-n '$(if $(UIMAGE_NAME),$(UIMAGE_NAME),$(call toupper,$(LINUX_KARCH)) LEDE Linux-$(LINUX_VERSION))' -d $@ $@.new
- @mv $@.new $@
+ mv $@.new $@
endef
define Build/buffalo-enc
-o $@.new \
-k $@ \
-b $(NETGEAR_BOARD_ID) \
- -r $(NETGEAR_REGION)
+ $(if $(NETGEAR_REGION),-r $(NETGEAR_REGION),)
mv $@.new $@
endef
mv $@.new $@
endef
+# append a fake/empty rootfs uImage header, to fool the bootloaders
+# rootfs integrity check
+define Build/append-uImage-fakeroot-hdr
+ rm -f $@.fakeroot
+ $(STAGING_DIR_HOST)/bin/mkimage \
+ -A $(LINUX_KARCH) -O linux -T filesystem -C none \
+ -n '$(call toupper,$(LINUX_KARCH)) LEDE fakeroot' \
+ -s \
+ $@.fakeroot
+ cat $@.fakeroot >> $@
+endef
+
define Build/tplink-safeloader
-$(STAGING_DIR_HOST)/bin/tplink-safeloader \
-B $(TPLINK_BOARD_NAME) \
dd if=$(IMAGE_ROOTFS) >> $@
endef
-define Build/append-file
- cat "$(1)" >> "$@"
-endef
-
define Build/append-ubi
sh $(TOPDIR)/scripts/ubinize-image.sh \
$(if $(UBOOTENV_IN_UBI),--uboot-env) \