summaryrefslogtreecommitdiffstats
path: root/package/boot
diff options
context:
space:
mode:
authorTianling Shen <cnsztl@immortalwrt.org>2023-06-26 00:37:28 +0800
committerHauke Mehrtens <hauke@hauke-m.de>2023-11-26 19:44:56 +0100
commitb061e2d890bc47fe9ae352a4700f094cf2aea7b1 (patch)
tree11da8d25193840b85f6d8bedb85ccda94f100dae /package/boot
parent548ab9d7ada9812000d5fe8c4ee0aca637b45edf (diff)
downloadopenwrt-b061e2d890bc47fe9ae352a4700f094cf2aea7b1.tar.gz
openwrt-b061e2d890bc47fe9ae352a4700f094cf2aea7b1.tar.bz2
openwrt-b061e2d890bc47fe9ae352a4700f094cf2aea7b1.zip
rkbin: add new TF-A package for rk35xx
Currently there's no usable mainline (open source) TF-A implementation for rk35xx SoCs, so pack the prebuilt firmware from the vendor. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Diffstat (limited to 'package/boot')
-rw-r--r--package/boot/rkbin/Makefile47
1 files changed, 47 insertions, 0 deletions
diff --git a/package/boot/rkbin/Makefile b/package/boot/rkbin/Makefile
new file mode 100644
index 0000000000..affdd7b4e1
--- /dev/null
+++ b/package/boot/rkbin/Makefile
@@ -0,0 +1,47 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Copyright (C) 2021-2023 ImmortalWrt.org
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=rkbin
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL=https://github.com/rockchip-linux/rkbin.git
+PKG_SOURCE_DATE:=2023-07-26
+PKG_SOURCE_VERSION:=b4558da0860ca48bf1a571dd33ccba580b9abe23
+PKG_MIRROR_HASH:=5842fbcb7e217c336235573e431e427f2f745390d989f6765a6c258a5bdf1b6e
+
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
+
+include $(INCLUDE_DIR)/kernel.mk
+include $(INCLUDE_DIR)/trusted-firmware-a.mk
+include $(INCLUDE_DIR)/package.mk
+
+define Trusted-Firmware-A/Default
+ NAME:=Rockchip $(1) SoCs
+ BUILD_TARGET:=rockchip
+endef
+
+define Trusted-Firmware-A/rk3568
+ BUILD_SUBTARGET:=armv8
+ ATF:=rk35/rk3568_bl31_v1.43.elf
+ TPL:=rk35/rk3568_ddr_1560MHz_v1.18.bin
+endef
+
+TFA_TARGETS:= \
+ rk3568
+
+define Build/Compile
+endef
+
+define Package/trusted-firmware-a/install
+ $(INSTALL_DIR) $(STAGING_DIR_IMAGE)
+
+ $(CP) $(PKG_BUILD_DIR)/bin/$(ATF) $(STAGING_DIR_IMAGE)/
+ $(CP) $(PKG_BUILD_DIR)/bin/$(TPL) $(STAGING_DIR_IMAGE)/
+endef
+
+$(eval $(call BuildPackage/Trusted-Firmware-A))