diff --git a/package/boot/uboot-airoha/Makefile b/package/boot/uboot-airoha/Makefile index b3577e1eaa..98419e3c66 100644 --- a/package/boot/uboot-airoha/Makefile +++ b/package/boot/uboot-airoha/Makefile @@ -14,6 +14,7 @@ include $(INCLUDE_DIR)/host-build.mk define U-Boot/Default BUILD_TARGET:=airoha LZMA_COMPRESS:=1 + HIDDEN:=1 endef define U-Boot/an7581_gemtek_w1700k @@ -21,7 +22,6 @@ define U-Boot/an7581_gemtek_w1700k UBOOT_CONFIG:=an7581_w1700k BUILD_DEVICES:=gemtek_w1700k-ubi BUILD_SUBTARGET:=an7581 - UBOOT_IMAGE:=u-boot.bin endef define U-Boot/an7581_nokia_valyrian @@ -29,7 +29,6 @@ define U-Boot/an7581_nokia_valyrian UBOOT_CONFIG:=an7581_nokia_valyrian BUILD_DEVICES:=nokia_valyrian BUILD_SUBTARGET:=an7581 - UBOOT_IMAGE:=u-boot.fip BL2_IMAGE:=an7581-bl2.bin BL31_IMAGE:=an7581-bl31.bin endef @@ -39,7 +38,6 @@ define U-Boot/an7581_nokia_xg-040g-md UBOOT_CONFIG:=an7581_nokia_xg-040g-md BUILD_DEVICES:=nokia_xg-040g-md-ubi BUILD_SUBTARGET:=an7581 - UBOOT_IMAGE:=u-boot.fip BL2_IMAGE:=an7581-bl2.bin BL31_IMAGE:=an7581-bl31.bin endef @@ -47,21 +45,21 @@ endef define U-Boot/an7581_rfb NAME:=AN7581 Reference Board UBOOT_CONFIG:=an7581_evb - BUILD_DEVICES:=airoha_an7581-evb + BUILD_DEVICES:=airoha_an7581-evb airoha_an7581-evb-emmc-eagle airoha_an7581-evb-emmc-kite BUILD_SUBTARGET:=an7581 - UBOOT_IMAGE:=u-boot.fip BL2_IMAGE:=an7581-bl2.bin BL31_IMAGE:=an7581-bl31.bin + DEPENDS:=+trusted-firmware-a-an7581-bl31 endef define U-Boot/an7583_rfb NAME:=AN7583 Reference Board UBOOT_CONFIG:=an7583_evb - BUILD_DEVICES:=airoha_an7583-evb + BUILD_DEVICES:=airoha_an7583-evb airoha_an7583-evb-emmc BUILD_SUBTARGET:=an7583 - UBOOT_IMAGE:=u-boot.fip BL2_IMAGE:=an7583-bl2.bin BL31_IMAGE:=an7583-bl31.bin + DEPENDS:=+trusted-firmware-a-an7583-bl31 endef define U-Boot/en7523_rfb @@ -69,7 +67,6 @@ define U-Boot/en7523_rfb UBOOT_CONFIG:=en7523_evb BUILD_DEVICES:=airoha_en7523-evb BUILD_SUBTARGET:=en7523 - UBOOT_IMAGE:=u-boot.fip BL2_IMAGE:=en7523-bl2.bin BL31_IMAGE:=en7523-bl31.bin endef @@ -89,22 +86,6 @@ UBOOT_CUSTOMIZE_CONFIG := \ --enable SERIAL_RX_BUFFER \ --set-val SERIAL_RX_BUFFER_SIZE 256 -define Build/fip-image-bl2 - $(STAGING_DIR_HOST)/bin/fiptool create \ - --tb-fw files/$(BL2_IMAGE) \ - $(PKG_BUILD_DIR)/bl2.fip -endef - -define Build/fip-image - $(if $(LZMA_COMPRESS), $(STAGING_DIR_HOST)/bin/lzma e \ - files/$(BL31_IMAGE) \ - $(PKG_BUILD_DIR)/bl31.bin.lzma) - $(STAGING_DIR_HOST)/bin/fiptool create \ - --soc-fw $(PKG_BUILD_DIR)/bl31.bin$(if $(LZMA_COMPRESS),.lzma) \ - --nt-fw $(PKG_BUILD_DIR)/u-boot.bin$(if $(LZMA_COMPRESS),.lzma) \ - $(PKG_BUILD_DIR)/u-boot.fip -endef - define Build/Configure $(call Build/Configure/U-Boot) sed -i 's/CONFIG_TOOLS_LIBCRYPTO=y/# CONFIG_TOOLS_LIBCRYPTO is not set/' $(PKG_BUILD_DIR)/.config @@ -114,11 +95,7 @@ define Build/Compile $(call Build/Compile/U-Boot) $(if $(LZMA_COMPRESS), $(STAGING_DIR_HOST)/bin/lzma e \ $(PKG_BUILD_DIR)/u-boot.bin \ - $(PKG_BUILD_DIR)/u-boot.bin.lzma) -ifeq ($(UBOOT_IMAGE),u-boot.fip) - $(call Build/fip-image-bl2) - $(call Build/fip-image) -endif + $(PKG_BUILD_DIR)/u-boot.lzma) endef # don't stage files to bindir, let target/linux/airoha/image/*.mk do that @@ -127,15 +104,10 @@ endef define Build/InstallDev $(INSTALL_DIR) $(STAGING_DIR_IMAGE) -ifeq ($(UBOOT_IMAGE),u-boot.fip) - $(INSTALL_DATA) $(PKG_BUILD_DIR)/bl2.fip $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-bl2.fip - $(INSTALL_DATA) $(PKG_BUILD_DIR)/u-boot.fip $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-bl31-u-boot.fip -else - $(INSTALL_DATA) $(PKG_BUILD_DIR)/u-boot.bin$(if $(LZMA_COMPRESS),.lzma) \ - $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-u-boot.bin$(if $(LZMA_COMPRESS),.lzma) + $(INSTALL_DATA) $(PKG_BUILD_DIR)/u-boot.$(if $(LZMA_COMPRESS),lzma,bin) \ + $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-u-boot.$(if $(LZMA_COMPRESS),lzma,bin) $(INSTALL_DATA) $(PKG_BUILD_DIR)/u-boot.dtb \ $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-u-boot.dtb -endif endef $(eval $(call BuildPackage/U-Boot)) diff --git a/package/boot/uboot-airoha/files/an7581-bl2.bin b/package/boot/uboot-airoha/files/an7581-bl2.bin deleted file mode 100644 index a500445bfe..0000000000 Binary files a/package/boot/uboot-airoha/files/an7581-bl2.bin and /dev/null differ diff --git a/package/boot/uboot-airoha/files/an7581-bl31.bin b/package/boot/uboot-airoha/files/an7581-bl31.bin deleted file mode 100644 index f57a37717c..0000000000 Binary files a/package/boot/uboot-airoha/files/an7581-bl31.bin and /dev/null differ diff --git a/package/boot/uboot-airoha/files/an7583-bl2.bin b/package/boot/uboot-airoha/files/an7583-bl2.bin deleted file mode 100644 index b7c3604e0c..0000000000 Binary files a/package/boot/uboot-airoha/files/an7583-bl2.bin and /dev/null differ diff --git a/package/boot/uboot-airoha/files/an7583-bl31.bin b/package/boot/uboot-airoha/files/an7583-bl31.bin deleted file mode 100644 index 016a2382f9..0000000000 Binary files a/package/boot/uboot-airoha/files/an7583-bl31.bin and /dev/null differ diff --git a/target/linux/airoha/image/an7581.mk b/target/linux/airoha/image/an7581.mk index ba38318edd..c33949a67a 100644 --- a/target/linux/airoha/image/an7581.mk +++ b/target/linux/airoha/image/an7581.mk @@ -5,10 +5,17 @@ define Build/an7581-emmc-bl2-bl31-uboot endef define Build/an7581-preloader + $(STAGING_DIR_HOST)/bin/fiptool create \ + --tb-fw $(STAGING_DIR_IMAGE)/an7581-bl2.bin \ + $(STAGING_DIR_IMAGE)/an7581_$1-bl2.fip cat $(STAGING_DIR_IMAGE)/an7581_$1-bl2.fip >> $@ endef define Build/an7581-bl31-uboot + $(STAGING_DIR_HOST)/bin/fiptool create \ + --soc-fw $(STAGING_DIR_IMAGE)/an7581-bl31.lzma \ + --nt-fw $(STAGING_DIR_IMAGE)/an7581_$1-u-boot.lzma \ + $(STAGING_DIR_IMAGE)/an7581_$1-bl31-u-boot.fip cat $(STAGING_DIR_IMAGE)/an7581_$1-bl31-u-boot.fip >> $@ endef @@ -65,8 +72,8 @@ define Device/airoha_an7581-evb-emmc-eagle DEVICE_DTS := an7581-evb-emmc-eagle DEVICE_PACKAGES := airoha-en7581-mt7996-npu-firmware \ kmod-mt7996-firmware wpad-basic-mbedtls - ARTIFACT/preloader.bin := an7581-preloader rfb - ARTIFACT/bl31-uboot.fip := an7581-bl31-uboot rfb + ARTIFACT/preloader.bin := an7581-preloader rfb-emmc-eagle + ARTIFACT/bl31-uboot.fip := an7581-bl31-uboot rfb-emmc-eagle ARTIFACTS := preloader.bin bl31-uboot.fip endef TARGET_DEVICES += airoha_an7581-evb-emmc-eagle @@ -77,8 +84,8 @@ define Device/airoha_an7581-evb-emmc-kite DEVICE_DTS := an7581-evb-emmc-kite DEVICE_PACKAGES := airoha-en7581-npu-firmware \ kmod-mt7992-firmware wpad-basic-mbedtls - ARTIFACT/preloader.bin := an7581-preloader rfb - ARTIFACT/bl31-uboot.fip := an7581-bl31-uboot rfb + ARTIFACT/preloader.bin := an7581-preloader rfb-emmc-kite + ARTIFACT/bl31-uboot.fip := an7581-bl31-uboot rfb-emmc-kite ARTIFACTS := preloader.bin bl31-uboot.fip endef TARGET_DEVICES += airoha_an7581-evb-emmc-kite diff --git a/target/linux/airoha/image/an7583.mk b/target/linux/airoha/image/an7583.mk index e8533269d5..fe9dc092b3 100644 --- a/target/linux/airoha/image/an7583.mk +++ b/target/linux/airoha/image/an7583.mk @@ -1,8 +1,15 @@ define Build/an7583-preloader + $(STAGING_DIR_HOST)/bin/fiptool create \ + --tb-fw $(STAGING_DIR_IMAGE)/an7583-bl2.bin \ + $(STAGING_DIR_IMAGE)/an7583_$1-bl2.fip cat $(STAGING_DIR_IMAGE)/an7583_$1-bl2.fip >> $@ endef define Build/an7583-bl31-uboot + $(STAGING_DIR_HOST)/bin/fiptool create \ + --soc-fw $(STAGING_DIR_IMAGE)/an7583-bl31.lzma \ + --nt-fw $(STAGING_DIR_IMAGE)/an7583_$1-u-boot.lzma \ + $(STAGING_DIR_IMAGE)/an7583_$1-bl31-u-boot.fip cat $(STAGING_DIR_IMAGE)/an7583_$1-bl31-u-boot.fip >> $@ endef