Skip to content

Commit

Permalink
arm-trusted-firmware-rockchip: Update to 2.10
Browse files Browse the repository at this point in the history
  • Loading branch information
coolsnowwolf committed Sep 3, 2024
1 parent c330a80 commit e90fe2d
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 30 deletions.
71 changes: 47 additions & 24 deletions package/boot/arm-trusted-firmware-rockchip/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,43 +7,66 @@

include $(TOPDIR)/rules.mk

PKG_NAME:=arm-trusted-firmware-rockchip
PKG_VERSION:=2.8
PKG_VERSION:=2.10
PKG_RELEASE:=1

PKG_SOURCE:=atf-v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/atf-builds/atf/releases/download/v$(PKG_VERSION)/atf-v$(PKG_VERSION).tar.gz?
PKG_HASH:=61df69619fd611da9e43abf66be28d6d59722feef559587fad0ca4cd9e499758

PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=license.md
PKG_HASH:=88215a62291b9ba87da8e50b077741103cdc08fb6c9e1ebd34dfaace746d3201

PKG_MAINTAINER:=Tobias Maedel <openwrt@tbspace.de>

MAKE_PATH:=$(PKG_NAME)

include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/trusted-firmware-a.mk
include $(INCLUDE_DIR)/package.mk

define Package/arm-trusted-firmware-rockchip
SECTION:=boot
CATEGORY:=Boot Loaders
TITLE:=ARM Trusted Firmware for Rockchip
DEPENDS:=@TARGET_rockchip_armv8
define Trusted-Firmware-A/Default
NAME:=Rockchip $(1) SoCs
BUILD_TARGET:=rockchip
endef

define Build/Prepare
$(TAR) -C $(PKG_BUILD_DIR) -xf $(DL_DIR)/$(PKG_SOURCE)
define Trusted-Firmware-A/rk3328
BUILD_SUBTARGET:=armv8
PLAT=rk3328
endef

define Build/Compile
define Trusted-Firmware-A/rk3399
BUILD_SUBTARGET:=armv8
PLAT:=rk3399
endef

define Build/InstallDev
$(INSTALL_DIR) -p $(STAGING_DIR_IMAGE)
$(CP) $(PKG_BUILD_DIR)/rk*.elf $(STAGING_DIR_IMAGE)/
endef
TFA_TARGETS:= \
rk3328 \
rk3399

ifeq ($(BUILD_VARIANT),rk3399)
M0_GCC_NAME:=gcc-arm
M0_GCC_RELEASE:=11.2-2022.02
M0_GCC_VERSION:=$(HOST_ARCH)-arm-none-eabi
M0_GCC_SOURCE:=$(M0_GCC_NAME)-$(M0_GCC_RELEASE)-$(M0_GCC_VERSION).tar.xz

define Download/m0-gcc
FILE:=$(M0_GCC_SOURCE)
URL:=https://developer.arm.com/-/media/Files/downloads/gnu/$(M0_GCC_RELEASE)/binrel
ifeq ($(HOST_ARCH),aarch64)
HASH:=ef1d82e5894e3908cb7ed49c5485b5b95deefa32872f79c2b5f6f5447cabf55f
else
HASH:=8c5acd5ae567c0100245b0556941c237369f210bceb196edfe5a2e7532c60326
endif
endef

define Build/Prepare
$(eval $(call Download,m0-gcc))
$(call Build/Prepare/Default)

xzcat $(DL_DIR)/$(M0_GCC_SOURCE) | $(HOST_TAR) -C $(PKG_BUILD_DIR)/ $(TAR_OPTIONS)
endef

TFA_MAKE_FLAGS+= \
M0_CROSS_COMPILE=$(PKG_BUILD_DIR)/$(M0_GCC_NAME)-$(M0_GCC_RELEASE)-$(M0_GCC_VERSION)/bin/arm-none-eabi-
endif

define Package/arm-trusted-firmware-rockchip/install
define Package/trusted-firmware-a/install
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
$(INSTALL_DATA) $(PKG_BUILD_DIR)/build/$(PLAT)/release/bl31/bl31.elf $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)_bl31.elf
endef

$(eval $(call BuildPackage,arm-trusted-firmware-rockchip))
$(eval $(call BuildPackage/Trusted-Firmware-A))
12 changes: 6 additions & 6 deletions package/boot/uboot-rockchip/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ define U-Boot/guangmiao-g4c-rk3399
NAME:=GuangMiao G4C
BUILD_DEVICES:= \
sharevdi_guangmiao-g4c
DEPENDS:=+PACKAGE_u-boot-guangmiao-g4c-rk3399:arm-trusted-firmware-rockchip
PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip
DEPENDS:=+PACKAGE_u-boot-guangmiao-g4c-rk3399:trusted-firmware-a-rk3399
PKG_BUILD_DEPENDS:=trusted-firmware-a-rk3399
ATF:=rk3399_bl31.elf
endef

Expand Down Expand Up @@ -109,8 +109,8 @@ define U-Boot/rock-pi-4-rk3399
NAME:=Rock Pi 4
BUILD_DEVICES:= \
radxa_rock-pi-4
DEPENDS:=+PACKAGE_u-boot-rock-pi-4-rk3399:arm-trusted-firmware-rockchip
PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip
DEPENDS:=+PACKAGE_u-boot-rock-pi-4-rk3399:trusted-firmware-a-rk3399
PKG_BUILD_DEPENDS:=trusted-firmware-a-rk3399
ATF:=rk3399_bl31.elf
endef

Expand All @@ -119,8 +119,8 @@ define U-Boot/rockpro64-rk3399
NAME:=RockPro64
BUILD_DEVICES:= \
pine64_rockpro64
DEPENDS:=+PACKAGE_u-boot-rockpro64-rk3399:arm-trusted-firmware-rockchip
PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip
DEPENDS:=+PACKAGE_u-boot-rockpro64-rk3399:trusted-firmware-a-rk3399
PKG_BUILD_DEPENDS:=trusted-firmware-a-rk3399
ATF:=rk3399_bl31.elf
endef

Expand Down

0 comments on commit e90fe2d

Please sign in to comment.