diff options
author | Hannu Nyman <hannu.nyman@iki.fi> | 2018-06-17 22:59:03 +0300 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2018-06-18 21:21:56 +0200 |
commit | b6c134f254fcc60d0474e037af5e62c94931d743 (patch) | |
tree | 92ce344ada647396cc6e776e015dbcbcd53b9c59 /include | |
parent | b85e150182258739a14d3625605766775a939977 (diff) | |
download | upstream-b6c134f254fcc60d0474e037af5e62c94931d743.tar.gz upstream-b6c134f254fcc60d0474e037af5e62c94931d743.tar.bz2 upstream-b6c134f254fcc60d0474e037af5e62c94931d743.zip |
include/image-commands.mk: shorter version in Netgear factory header
Shorten the version string in Netgear factory image header in order
to enable u-boot TFTP recovery flash mode to work again.
Strip 'r7210-14cb05909a' into 'r7210' in the Netgear image header
by removing the hash (anything after "-").
background:
Some Netgear routers have recently been unable to flash Openwrt
factory image with the TFTP recovery flash mode provided by Netgear
u-boot. That is due to over-long Openwrt version string overflowing
into the router type string in u-boot code. Modern git versions
produce 10-digit short hashes for the Openwrt main repo, and that
causes the version string to be too long in the image header,
breaking the image ID verification by the TFTP flash routine.
(Other option could be to force a shorter hash in scripts/getver.sh,
but as the problem only concerns Netgear routers, let's patch just
them.)
More detailed explanations in FS#1583
Tested with WNDR3800
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit dcfe2a461e4b06de6e2b23d29afebbb3c775f647)
Diffstat (limited to 'include')
-rw-r--r-- | include/image-commands.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/image-commands.mk b/include/image-commands.mk index 82ceacd80e..1d8ccedd69 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -60,7 +60,7 @@ endef define Build/netgear-dni $(STAGING_DIR_HOST)/bin/mkdniimg \ - -B $(NETGEAR_BOARD_ID) -v $(VERSION_DIST).$(REVISION) \ + -B $(NETGEAR_BOARD_ID) -v $(VERSION_DIST).$(firstword $(subst -, ,$(REVISION))) \ $(if $(NETGEAR_HW_ID),-H $(NETGEAR_HW_ID)) \ -r "$(1)" \ -i $@ -o $@.new |