2020-04-12 11:53:56 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
|
|
|
|
2024-01-10 09:12:46 +00:00
|
|
|
PKG_VERSION:=2024.01
|
2023-06-25 16:37:27 +00:00
|
|
|
PKG_RELEASE:=1
|
2024-01-10 09:12:46 +00:00
|
|
|
PKG_HASH:=b99611f1ed237bf3541bdc8434b68c96a6e05967061f992443cb30aabebef5b3
|
2020-04-12 11:53:56 +00:00
|
|
|
|
|
|
|
PKG_MAINTAINER:=Tobias Maedel <openwrt@tbspace.de>
|
|
|
|
|
2023-06-25 16:37:27 +00:00
|
|
|
UBOOT_USE_BINMAN:=1
|
|
|
|
UBOOT_USE_INTREE_DTC:=1
|
|
|
|
|
2020-04-12 11:53:56 +00:00
|
|
|
include $(INCLUDE_DIR)/u-boot.mk
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define U-Boot/Default
|
|
|
|
BUILD_TARGET:=rockchip
|
|
|
|
UENV:=default
|
|
|
|
HIDDEN:=1
|
|
|
|
endef
|
|
|
|
|
2020-07-10 15:38:36 +00:00
|
|
|
|
|
|
|
# RK3328 boards
|
|
|
|
|
2023-05-13 04:16:21 +00:00
|
|
|
define U-Boot/rk3328/Default
|
2020-07-10 15:38:36 +00:00
|
|
|
BUILD_SUBTARGET:=armv8
|
2023-06-20 06:29:57 +00:00
|
|
|
DEPENDS:=+PACKAGE_u-boot-$(1):trusted-firmware-a-rk3328
|
2023-05-13 04:16:21 +00:00
|
|
|
ATF:=rk3328_bl31.elf
|
|
|
|
endef
|
|
|
|
|
2023-05-13 05:54:38 +00:00
|
|
|
define U-Boot/nanopi-r2c-rk3328
|
|
|
|
$(U-Boot/rk3328/Default)
|
|
|
|
NAME:=NanoPi R2C
|
|
|
|
BUILD_DEVICES:= \
|
|
|
|
friendlyarm_nanopi-r2c
|
|
|
|
endef
|
|
|
|
|
2024-02-16 06:33:49 +00:00
|
|
|
define U-Boot/nanopi-r2c-plus-rk3328
|
|
|
|
$(U-Boot/rk3328/Default)
|
|
|
|
NAME:=NanoPi R2C Plus
|
|
|
|
BUILD_DEVICES:= \
|
|
|
|
friendlyarm_nanopi-r2c-plus
|
|
|
|
endef
|
|
|
|
|
2023-05-13 04:16:21 +00:00
|
|
|
define U-Boot/nanopi-r2s-rk3328
|
|
|
|
$(U-Boot/rk3328/Default)
|
2020-07-10 15:38:36 +00:00
|
|
|
NAME:=NanoPi R2S
|
|
|
|
BUILD_DEVICES:= \
|
|
|
|
friendlyarm_nanopi-r2s
|
|
|
|
endef
|
|
|
|
|
2023-05-30 04:59:07 +00:00
|
|
|
define U-Boot/orangepi-r1-plus-rk3328
|
|
|
|
$(U-Boot/rk3328/Default)
|
|
|
|
NAME:=Orange Pi R1 Plus
|
|
|
|
BUILD_DEVICES:= \
|
|
|
|
xunlong_orangepi-r1-plus
|
|
|
|
endef
|
|
|
|
|
2023-05-30 04:59:07 +00:00
|
|
|
define U-Boot/orangepi-r1-plus-lts-rk3328
|
|
|
|
$(U-Boot/rk3328/Default)
|
|
|
|
NAME:=Orange Pi R1 Plus LTS
|
|
|
|
BUILD_DEVICES:= \
|
|
|
|
xunlong_orangepi-r1-plus-lts
|
|
|
|
endef
|
|
|
|
|
2023-04-07 15:46:43 +00:00
|
|
|
define U-Boot/roc-cc-rk3328
|
2023-05-13 04:16:21 +00:00
|
|
|
$(U-Boot/rk3328/Default)
|
2023-04-07 15:46:43 +00:00
|
|
|
NAME:=ROC-RK3328-CC
|
|
|
|
BUILD_DEVICES:= \
|
|
|
|
firefly_roc-rk3328-cc
|
|
|
|
endef
|
2020-07-10 15:38:36 +00:00
|
|
|
|
2023-07-08 17:26:31 +00:00
|
|
|
define U-Boot/rock64-rk3328
|
|
|
|
$(U-Boot/rk3328/Default)
|
|
|
|
NAME:=Rock64
|
|
|
|
BUILD_DEVICES:= \
|
|
|
|
pine64_rock64
|
|
|
|
endef
|
|
|
|
|
2023-08-29 15:12:28 +00:00
|
|
|
define U-Boot/rock-pi-e-rk3328
|
|
|
|
$(U-Boot/rk3328/Default)
|
|
|
|
NAME:=ROCK Pi E
|
|
|
|
BUILD_DEVICES:= \
|
|
|
|
radxa_rock-pi-e
|
|
|
|
endef
|
|
|
|
|
2020-07-10 15:38:36 +00:00
|
|
|
# RK3399 boards
|
|
|
|
|
2023-05-13 04:16:21 +00:00
|
|
|
define U-Boot/rk3399/Default
|
2021-05-13 13:49:59 +00:00
|
|
|
BUILD_SUBTARGET:=armv8
|
2023-06-20 06:29:57 +00:00
|
|
|
DEPENDS:=+PACKAGE_u-boot-$(1):trusted-firmware-a-rk3399
|
2023-05-13 04:16:21 +00:00
|
|
|
ATF:=rk3399_bl31.elf
|
|
|
|
endef
|
|
|
|
|
2023-07-24 07:22:42 +00:00
|
|
|
define U-Boot/nanopc-t4-rk3399
|
|
|
|
$(U-Boot/rk3399/Default)
|
|
|
|
NAME:=NanoPC T4
|
|
|
|
BUILD_DEVICES:= \
|
|
|
|
friendlyarm_nanopc-t4
|
|
|
|
endef
|
|
|
|
|
2023-05-13 04:16:21 +00:00
|
|
|
define U-Boot/nanopi-r4s-rk3399
|
|
|
|
$(U-Boot/rk3399/Default)
|
2021-05-13 13:49:59 +00:00
|
|
|
NAME:=NanoPi R4S
|
|
|
|
BUILD_DEVICES:= \
|
2024-02-17 05:54:36 +00:00
|
|
|
friendlyarm_nanopi-r4s \
|
|
|
|
friendlyarm_nanopi-r4s-enterprise
|
2021-05-13 13:49:59 +00:00
|
|
|
endef
|
|
|
|
|
2020-10-01 07:04:48 +00:00
|
|
|
define U-Boot/rock-pi-4-rk3399
|
2023-05-13 04:16:21 +00:00
|
|
|
$(U-Boot/rk3399/Default)
|
2020-10-01 07:04:48 +00:00
|
|
|
NAME:=Rock Pi 4
|
|
|
|
BUILD_DEVICES:= \
|
2021-10-02 15:36:48 +00:00
|
|
|
radxa_rock-pi-4a
|
2020-10-01 07:04:48 +00:00
|
|
|
endef
|
|
|
|
|
2020-04-12 11:53:56 +00:00
|
|
|
define U-Boot/rockpro64-rk3399
|
2023-05-13 04:16:21 +00:00
|
|
|
$(U-Boot/rk3399/Default)
|
2020-04-12 11:53:56 +00:00
|
|
|
NAME:=RockPro64
|
|
|
|
BUILD_DEVICES:= \
|
|
|
|
pine64_rockpro64
|
|
|
|
endef
|
|
|
|
|
2023-06-25 16:37:30 +00:00
|
|
|
|
2024-02-20 14:33:11 +00:00
|
|
|
# RK3566 boards
|
|
|
|
|
|
|
|
define U-Boot/rk3566/Default
|
|
|
|
BUILD_SUBTARGET:=armv8
|
|
|
|
DEPENDS:=+PACKAGE_u-boot-$(1):trusted-firmware-a-rk3566
|
|
|
|
ATF:=rk3568_bl31_v1.43.elf
|
|
|
|
TPL:=rk3566_ddr_1056MHz_v1.18.bin
|
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/radxa-cm3-io-rk3566
|
|
|
|
$(U-Boot/rk3566/Default)
|
|
|
|
NAME:=CM3 IO
|
|
|
|
BUILD_DEVICES:= \
|
|
|
|
radxa_cm3-io
|
|
|
|
endef
|
|
|
|
|
2023-06-25 16:37:30 +00:00
|
|
|
# RK3568 boards
|
|
|
|
|
|
|
|
define U-Boot/rk3568/Default
|
|
|
|
BUILD_SUBTARGET:=armv8
|
|
|
|
DEPENDS:=+PACKAGE_u-boot-$(1):trusted-firmware-a-rk3568
|
|
|
|
ATF:=rk3568_bl31_v1.43.elf
|
|
|
|
TPL:=rk3568_ddr_1560MHz_v1.18.bin
|
|
|
|
endef
|
|
|
|
|
2023-06-25 16:37:30 +00:00
|
|
|
define U-Boot/nanopi-r5c-rk3568
|
|
|
|
$(U-Boot/rk3568/Default)
|
|
|
|
NAME:=NanoPi R5C
|
|
|
|
BUILD_DEVICES:= \
|
|
|
|
friendlyarm_nanopi-r5c
|
|
|
|
endef
|
|
|
|
|
2023-06-25 16:37:30 +00:00
|
|
|
define U-Boot/nanopi-r5s-rk3568
|
|
|
|
$(U-Boot/rk3568/Default)
|
|
|
|
NAME:=NanoPi R5S
|
|
|
|
BUILD_DEVICES:= \
|
|
|
|
friendlyarm_nanopi-r5s
|
|
|
|
endef
|
|
|
|
|
2020-04-12 11:53:56 +00:00
|
|
|
UBOOT_TARGETS := \
|
2023-07-24 07:22:42 +00:00
|
|
|
nanopc-t4-rk3399 \
|
2021-05-13 13:49:59 +00:00
|
|
|
nanopi-r4s-rk3399 \
|
2020-10-01 07:04:48 +00:00
|
|
|
rock-pi-4-rk3399 \
|
2020-07-10 15:38:36 +00:00
|
|
|
rockpro64-rk3399 \
|
2023-05-13 05:54:38 +00:00
|
|
|
nanopi-r2c-rk3328 \
|
2024-02-16 06:33:49 +00:00
|
|
|
nanopi-r2c-plus-rk3328 \
|
2023-04-07 15:46:43 +00:00
|
|
|
nanopi-r2s-rk3328 \
|
2023-05-30 04:59:07 +00:00
|
|
|
orangepi-r1-plus-rk3328 \
|
2023-05-30 04:59:07 +00:00
|
|
|
orangepi-r1-plus-lts-rk3328 \
|
2023-07-08 17:26:31 +00:00
|
|
|
roc-cc-rk3328 \
|
2023-08-29 15:12:28 +00:00
|
|
|
rock64-rk3328 \
|
2023-06-25 16:37:30 +00:00
|
|
|
rock-pi-e-rk3328 \
|
2024-02-20 14:33:11 +00:00
|
|
|
radxa-cm3-io-rk3566 \
|
2023-06-25 16:37:30 +00:00
|
|
|
nanopi-r5c-rk3568 \
|
2023-06-25 16:37:30 +00:00
|
|
|
nanopi-r5s-rk3568
|
2020-04-12 11:53:56 +00:00
|
|
|
|
|
|
|
UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes
|
|
|
|
|
2023-06-25 16:37:27 +00:00
|
|
|
UBOOT_CUSTOMIZE_CONFIG := \
|
|
|
|
--disable SPL_FIT_SIGNATURE \
|
|
|
|
--disable TOOLS_MKEFICAPSULE \
|
|
|
|
--set-str MKIMAGE_DTC_PATH $(PKG_BUILD_DIR)/scripts/dtc/dtc
|
|
|
|
|
2020-04-12 11:53:56 +00:00
|
|
|
UBOOT_MAKE_FLAGS += \
|
2023-06-25 16:37:30 +00:00
|
|
|
BL31=$(STAGING_DIR_IMAGE)/$(ATF) \
|
|
|
|
$(if $(TPL),ROCKCHIP_TPL=$(STAGING_DIR_IMAGE)/$(TPL))
|
2020-04-12 11:53:56 +00:00
|
|
|
|
|
|
|
define Build/InstallDev
|
|
|
|
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/idbloader.img $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-idbloader.img
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/u-boot.itb $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-u-boot.itb
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/u-boot/install/default
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage/U-Boot))
|