summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Marangi2025-10-24 07:49:57 +0000
committerChristian Marangi2025-11-10 16:55:41 +0000
commitfda425adf43acf176e1b23eac563f6a414cc454d (patch)
tree2d7ea190a96702697ccad1444ae9c658073240b2
parent1f7de3311cc6b550d236152134340ee689466466 (diff)
downloadopenwrt-fda425adf43acf176e1b23eac563f6a414cc454d.tar.gz
airoha: an7581: add BL2 and BL31+U-Boot Artifacts for RFB board
Pack the BL2 and BL31+U-Boot artifacts as Airoha AN7581 is currently supported in upstream U-Boot and bootloader files can be used for unfused boards. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> (cherry picked from commit 17cb69fe7f91f5560c793020281b236812b71489)
-rw-r--r--target/linux/airoha/image/an7581.mk20
1 files changed, 20 insertions, 0 deletions
diff --git a/target/linux/airoha/image/an7581.mk b/target/linux/airoha/image/an7581.mk
index 8f187b812c..fcd19e413c 100644
--- a/target/linux/airoha/image/an7581.mk
+++ b/target/linux/airoha/image/an7581.mk
@@ -1,3 +1,17 @@
+define Build/an7581-emmc-bl2-bl31-uboot
+ head -c $$((0x800)) /dev/zero > $@
+ cat $(STAGING_DIR_IMAGE)/an7581_$1-bl2.fip >> $@
+ dd if=$(STAGING_DIR_IMAGE)/an7581_$1-bl31-u-boot.fip of=$@ bs=1 seek=$$((0x20000)) conv=notrunc
+endef
+
+define Build/an7581-preloader
+ cat $(STAGING_DIR_IMAGE)/an7581_$1-bl2.fip >> $@
+endef
+
+define Build/an7581-bl31-uboot
+ cat $(STAGING_DIR_IMAGE)/an7581_$1-bl31-u-boot.fip >> $@
+endef
+
define Device/FitImageLzma
KERNEL_SUFFIX := -uImage.itb
KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb
@@ -13,6 +27,9 @@ define Device/airoha_an7581-evb
DEVICE_DTS_CONFIG := config@1
KERNEL_LOADADDR := 0x80088000
IMAGE/sysupgrade.bin := append-kernel | pad-to 128k | append-rootfs | pad-rootfs | append-metadata
+ ARTIFACT/preloader.bin := an7581-preloader rfb
+ ARTIFACT/bl31-uboot.fip := an7581-bl31-uboot rfb
+ ARTIFACTS := preloader.bin bl31-uboot.fip
endef
TARGET_DEVICES += airoha_an7581-evb
@@ -21,5 +38,8 @@ define Device/airoha_an7581-evb-emmc
DEVICE_MODEL := AN7581 Evaluation Board (EMMC)
DEVICE_DTS := an7581-evb-emmc
DEVICE_PACKAGES := kmod-i2c-an7581
+ ARTIFACT/preloader.bin := an7581-preloader rfb
+ ARTIFACT/bl31-uboot.fip := an7581-bl31-uboot rfb
+ ARTIFACTS := preloader.bin bl31-uboot.fip
endef
TARGET_DEVICES += airoha_an7581-evb-emmc