ar71xx: Generate sysupgrade images for OpenMesh devices
authorSven Eckelmann <sven.eckelmann@open-mesh.com>
Thu, 19 May 2016 18:20:44 +0000 (20:20 +0200)
committerSven Eckelmann <sven@narfation.org>
Wed, 21 Sep 2016 16:16:54 +0000 (18:16 +0200)
Some OpenWrt based firmwares like Gluon expect that a sysupgrade image
exists when a device firmware can be updated via sysupgrade. This image
wasn't created until now because OpenMesh devices use the same image for
factory and sysupgrade flash. Copying the image from *factory.bin to
*sysupgrade.bin is therefore enough to make the sysupgrade functionality
visible.

Reported-by: Matthias Schiffer <mschiffer@universe-factory.net>
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
target/linux/ar71xx/image/Makefile

index 9a7acbd..5b0a4ec 100644 (file)
@@ -1847,6 +1847,9 @@ define Image/Build/OpenMesh
                "$(BUILD_DIR)/fwupgrade.cfg-$(4)" "fwupgrade.cfg" \
                "$(KDIR_TMP)/vmlinux-$(2).uImage" "kernel" \
                "$(KDIR)/root.$(1)" "rootfs"
+       if [ -e "$(call factoryname,$(1),$(2))" ]; then \
+               cp "$(call factoryname,$(1),$(2))" "$(call sysupname,$(1),$(2))"; \
+       fi
 endef