[OpenWrt-Devel] [PATCH] ath79: make UBNT Nano/Loco AC factory images reproducible

Petr Štetiar ynezz at true.cz
Mon Oct 7 04:22:04 EDT 2019


Current factory images are built on top of sysupgrade images which
contains metadata which are causing image reproducibility issues, so
let's build factory images from the scratch. While at it, refactor the
shared vars into common base as well.

Ref: http://lists.infradead.org/pipermail/openwrt-devel/2019-October/019205.html
Reported-by: Paul Spooren <mail at aparcar.org>
Signed-off-by: Petr Štetiar <ynezz at true.cz>
---
 target/linux/ath79/image/generic-ubnt.mk | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk
index 6ae766e29331..9ab11324b411 100644
--- a/target/linux/ath79/image/generic-ubnt.mk
+++ b/target/linux/ath79/image/generic-ubnt.mk
@@ -114,40 +114,40 @@ define Device/ubnt_bullet-m-xw
 endef
 TARGET_DEVICES += ubnt_bullet-m-xw
 
+define Device/ubnt-nano-ac
+  DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct
+  IMAGE_SIZE := 15744k
+  IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
+	append-rootfs | pad-rootfs | mkubntimage-split | \
+	check-size $$$$(IMAGE_SIZE)
+endef
+
 define Device/ubnt_lap-120
   $(Device/ubnt-wa)
   DEVICE_MODEL := LiteAP ac
   DEVICE_VARIANT := LAP-120
-  DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct
-  IMAGE_SIZE := 15744k
-  IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
+  $(Device/ubnt-nano-ac)
 endef
 TARGET_DEVICES += ubnt_lap-120
 
 define Device/ubnt_nanobeam-ac
   $(Device/ubnt-wa)
   DEVICE_MODEL := NanoBeam AC
-  DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct
-  IMAGE_SIZE := 15744k
-  IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
+  $(Device/ubnt-nano-ac)
 endef
 TARGET_DEVICES += ubnt_nanobeam-ac
 
 define Device/ubnt_nanostation-ac
   $(Device/ubnt-wa)
   DEVICE_MODEL := Nanostation AC
-  DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct
-  IMAGE_SIZE := 15744k
-  IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
+  $(Device/ubnt-nano-ac)
 endef
 TARGET_DEVICES += ubnt_nanostation-ac
 
 define Device/ubnt_nanostation-ac-loco
   $(Device/ubnt-wa)
   DEVICE_MODEL := Nanostation AC loco
-  DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct
-  IMAGE_SIZE := 15744k
-  IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
+  $(Device/ubnt-nano-ac)
 endef
 TARGET_DEVICES += ubnt_nanostation-ac-loco
 

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list