aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMichal Cieslakiewicz <michal.cieslakiewicz@wp.pl>2019-10-11 10:52:39 +0200
committerJohn Crispin <john@phrozen.org>2019-10-21 13:27:12 +0200
commitf46a4a92934dc65ce6f1d68126f5e1664339d178 (patch)
treeaf2eaccf3909d48d6fdf38de814c93fbcf9d3baa /include
parent380cf82f994b796dd42568c080654cb2ab149bf4 (diff)
downloadupstream-f46a4a92934dc65ce6f1d68126f5e1664339d178.tar.gz
upstream-f46a4a92934dc65ce6f1d68126f5e1664339d178.tar.bz2
upstream-f46a4a92934dc65ce6f1d68126f5e1664339d178.zip
image: add magic number option for append-uImage-fakehdr
'append-uImage-fakehdr' can now accept magic number as a second, optional parameter (passed directly to 'mkimage' command with '-M' option). This enables construction of proper Netgear-specific fake rootfs images (required for flashing WNDR4300 for example). Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
Diffstat (limited to 'include')
-rw-r--r--include/image-commands.mk7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/image-commands.mk b/include/image-commands.mk
index 1d0aed1918..5dfd6a2c2f 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -109,10 +109,13 @@ endef
# append a fake/empty uImage header, to fool bootloaders rootfs integrity check
# for example
define Build/append-uImage-fakehdr
+ $(eval type=$(word 1,$(1)))
+ $(eval magic=$(word 2,$(1)))
touch $@.fakehdr
$(STAGING_DIR_HOST)/bin/mkimage \
- -A $(LINUX_KARCH) -O linux -T $(1) -C none \
- -n '$(VERSION_DIST) fake $(1)' \
+ -A $(LINUX_KARCH) -O linux -T $(type) -C none \
+ -n '$(VERSION_DIST) fake $(type)' \
+ $(if $(magic),-M $(magic)) \
-d $@.fakehdr \
-s \
$@.fakehdr