From: Adrian Schmutzler Date: Sun, 26 Sep 2021 14:07:44 +0000 (+0200) Subject: ath79: add recipe for common setup with loader-okli-compile X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2d977eb3d53a9fb442bc8847f41b88c5c4128c8a;p=openwrt%2Fstaging%2Fxback.git ath79: add recipe for common setup with loader-okli-compile These instructions are repeated for a few devices now, let's move them to shared definition so we do not repeat ourselves too often. Signed-off-by: Adrian Schmutzler --- diff --git a/target/linux/ath79/image/Makefile b/target/linux/ath79/image/Makefile index aee4ddf963..38c623bf27 100644 --- a/target/linux/ath79/image/Makefile +++ b/target/linux/ath79/image/Makefile @@ -84,6 +84,14 @@ define Device/Default append-rootfs | pad-rootfs | check-size | append-metadata endef +define Device/loader-okli-uimage + LOADER_TYPE := bin + COMPILE := loader-$(1).bin loader-$(1).uImage + COMPILE/loader-$(1).bin := loader-okli-compile + COMPILE/loader-$(1).uImage := append-loader-okli $(1) | pad-to 64k | \ + lzma | uImage lzma +endef + include $(SUBTARGET).mk ifeq ($(SUBTARGET),generic) diff --git a/target/linux/ath79/image/common-senao.mk b/target/linux/ath79/image/common-senao.mk index 6784cf9aae..c9c14944c4 100644 --- a/target/linux/ath79/image/common-senao.mk +++ b/target/linux/ath79/image/common-senao.mk @@ -26,13 +26,9 @@ define Build/senao-tar-gz endef define Device/senao_loader_okli + $(Device/loader-okli-uimage) KERNEL := kernel-bin | append-dtb | lzma | uImage lzma -M 0x73714f4b LOADER_KERNEL_MAGIC := 0x73714f4b - LOADER_TYPE := bin - COMPILE := loader-$(1).bin loader-$(1).uImage - COMPILE/loader-$(1).bin := loader-okli-compile - COMPILE/loader-$(1).uImage := append-loader-okli $(1) | pad-to 64k | lzma | \ - uImage lzma IMAGES += factory.bin IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | \ check-size | senao-tar-gz $$$$(SENAO_IMGNAME) diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index d8db054312..3d404d1c81 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -331,19 +331,15 @@ endef TARGET_DEVICES += aruba_ap-105 define Device/atheros_db120 + $(Device/loader-okli-uimage) SOC := ar9344 DEVICE_VENDOR := Atheros DEVICE_MODEL := DB120 DEVICE_PACKAGES := kmod-usb2 IMAGE_SIZE := 7808k SUPPORTED_DEVICES += db120 - LOADER_TYPE := bin LOADER_FLASH_OFFS := 0x50000 KERNEL := kernel-bin | append-dtb | lzma | uImage lzma -M 0x4f4b4c49 - COMPILE := loader-$(1).bin loader-$(1).uImage - COMPILE/loader-$(1).bin := loader-okli-compile - COMPILE/loader-$(1).uImage := append-loader-okli $(1) | pad-to 64k | lzma | \ - uImage lzma IMAGES += factory.bin IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \ append-rootfs | pad-rootfs | check-size | pad-to 6336k | \ @@ -410,17 +406,13 @@ endef TARGET_DEVICES += avm_fritzdvbc define Device/belkin_f9x-v2 + $(Device/loader-okli-uimage) SOC := qca9558 DEVICE_VENDOR := Belkin IMAGE_SIZE := 14464k DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct kmod-usb2 \ kmod-usb3 kmod-usb-ledtrig-usbport - LOADER_TYPE := bin LOADER_FLASH_OFFS := 0x50000 - COMPILE := loader-$(1).bin loader-$(1).uImage - COMPILE/loader-$(1).bin := loader-okli-compile - COMPILE/loader-$(1).uImage := append-loader-okli $(1) | pad-to 64k | \ - lzma | uImage lzma KERNEL := kernel-bin | append-dtb | lzma | uImage lzma -M 0x4f4b4c49 IMAGES += factory.bin IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \ @@ -1945,17 +1937,13 @@ endef TARGET_DEVICES += pisen_ts-d084 define Device/pisen_wmb001n + $(Device/loader-okli-uimage) SOC := ar9341 DEVICE_VENDOR := PISEN DEVICE_MODEL := WMB001N IMAGE_SIZE := 14080k DEVICE_PACKAGES := kmod-i2c-gpio kmod-usb2 - LOADER_TYPE := bin LOADER_FLASH_OFFS := 0x20000 - COMPILE := loader-$(1).bin loader-$(1).uImage - COMPILE/loader-$(1).bin := loader-okli-compile - COMPILE/loader-$(1).uImage := append-loader-okli $(1) | pad-to 64k | lzma | \ - uImage lzma KERNEL := kernel-bin | append-dtb | lzma | uImage lzma -M 0x4f4b4c49 IMAGES += factory.bin IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | pisen_wmb001n-factory $(1) @@ -1996,18 +1984,14 @@ endef TARGET_DEVICES += plasmacloud_pa300e define Device/qca_ap143 + $(Device/loader-okli-uimage) SOC := qca9533 DEVICE_VENDOR := Qualcomm Atheros DEVICE_MODEL := AP143 DEVICE_PACKAGES := kmod-usb2 SUPPORTED_DEVICES += ap143 - LOADER_TYPE := bin LOADER_FLASH_OFFS := 0x50000 KERNEL := kernel-bin | append-dtb | lzma | uImage lzma -M 0x4f4b4c49 - COMPILE := loader-$(1).bin loader-$(1).uImage - COMPILE/loader-$(1).bin := loader-okli-compile - COMPILE/loader-$(1).uImage := append-loader-okli $(1) | pad-to 64k | lzma | \ - uImage lzma endef define Device/qca_ap143-8m