0045-ar71xx-Generate-sysupgrade-images-for-OpenMesh-devices.patch 1.2 KB

123456789101112131415161718192021222324252627282930
  1. From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
  2. Date: Tue, 17 May 2016 16:38:29 +0200
  3. Subject: ar71xx: Generate sysupgrade images for OpenMesh devices
  4. Some OpenWrt based firmwares like Gluon expect that a sysupgrade image
  5. exists when a device firmware can be updated via sysupgrade. This image
  6. wasn't created until now because OpenMesh devices use the same image for
  7. factory and sysupgrade flash. Copying the image from *factory.bin to
  8. *sysupgrade.bin is therefore enough to make the sysupgrade functionality
  9. visible.
  10. Reported-by: Matthias Schiffer <mschiffer@universe-factory.net>
  11. Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
  12. Forwarded: https://patchwork.ozlabs.org/patch/624172/
  13. diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
  14. index 58118f2..7aee0c8 100644
  15. --- a/target/linux/ar71xx/image/Makefile
  16. +++ b/target/linux/ar71xx/image/Makefile
  17. @@ -1877,6 +1877,9 @@ define Image/Build/OpenMesh
  18. "$(BUILD_DIR)/fwupgrade.cfg-$(4)" "fwupgrade.cfg" \
  19. "$(KDIR_TMP)/vmlinux-$(2).uImage" "kernel" \
  20. "$(KDIR)/root.$(1)" "rootfs"
  21. + if [ -e "$(call factoryname,$(1),$(2))" ]; then \
  22. + cp "$(call factoryname,$(1),$(2))" "$(call sysupname,$(1),$(2))"; \
  23. + fi
  24. endef