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
|
|
|
|
|
2021-08-09 23:05:50 +00:00
|
|
|
PKG_VERSION:=2021.07
|
2023-05-17 13:08:40 +00:00
|
|
|
PKG_RELEASE:=5
|
2020-04-12 11:53:56 +00:00
|
|
|
|
2021-08-09 23:05:50 +00:00
|
|
|
PKG_HASH:=312b7eeae44581d1362c3a3f02c28d806647756c82ba8c72241c7cdbe68ba77e
|
2020-04-12 11:53:56 +00:00
|
|
|
|
|
|
|
PKG_MAINTAINER:=Tobias Maedel <openwrt@tbspace.de>
|
|
|
|
|
|
|
|
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-05-13 04:16:21 +00:00
|
|
|
DEPENDS:=+PACKAGE_u-boot-$(1):arm-trusted-firmware-rockchip
|
|
|
|
ATF:=rk3328_bl31.elf
|
|
|
|
OF_PLATDATA:=$(1)
|
|
|
|
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
|
|
|
|
|
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-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
|
|
|
|
|
|
|
# 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-05-13 04:16:21 +00:00
|
|
|
DEPENDS:=+PACKAGE_u-boot-$(1):arm-trusted-firmware-rockchip
|
|
|
|
ATF:=rk3399_bl31.elf
|
|
|
|
endef
|
|
|
|
|
|
|
|
define U-Boot/nanopi-r4s-rk3399
|
|
|
|
$(U-Boot/rk3399/Default)
|
2021-05-13 13:49:59 +00:00
|
|
|
NAME:=NanoPi R4S
|
|
|
|
BUILD_DEVICES:= \
|
|
|
|
friendlyarm_nanopi-r4s
|
|
|
|
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
|
|
|
|
|
|
|
|
UBOOT_TARGETS := \
|
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 \
|
2023-04-07 15:46:43 +00:00
|
|
|
nanopi-r2s-rk3328 \
|
2023-05-30 04:59:07 +00:00
|
|
|
orangepi-r1-plus-rk3328 \
|
2023-04-07 15:46:43 +00:00
|
|
|
roc-cc-rk3328
|
2020-04-12 11:53:56 +00:00
|
|
|
|
|
|
|
UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes
|
|
|
|
|
|
|
|
UBOOT_MAKE_FLAGS += \
|
2020-07-10 15:38:36 +00:00
|
|
|
BL31=$(STAGING_DIR_IMAGE)/$(ATF)
|
2020-04-12 11:53:56 +00:00
|
|
|
|
|
|
|
define Build/Configure
|
|
|
|
$(call Build/Configure/U-Boot)
|
|
|
|
|
2020-07-10 15:38:36 +00:00
|
|
|
ifneq ($(OF_PLATDATA),)
|
|
|
|
mkdir -p $(PKG_BUILD_DIR)/tpl/dts
|
|
|
|
mkdir -p $(PKG_BUILD_DIR)/include/generated
|
|
|
|
|
2021-04-12 22:28:12 +00:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/of-platdata/$(OF_PLATDATA)/dt-plat.c $(PKG_BUILD_DIR)/tpl/dts/dt-plat.c
|
2020-07-10 15:38:36 +00:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/of-platdata/$(OF_PLATDATA)/dt-structs-gen.h $(PKG_BUILD_DIR)/include/generated/dt-structs-gen.h
|
2021-08-09 23:05:50 +00:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/of-platdata/$(OF_PLATDATA)/dt-decl.h $(PKG_BUILD_DIR)/include/generated/dt-decl.h
|
2020-07-10 15:38:36 +00:00
|
|
|
endif
|
|
|
|
|
2020-04-12 11:53:56 +00:00
|
|
|
$(SED) 's#CONFIG_MKIMAGE_DTC_PATH=.*#CONFIG_MKIMAGE_DTC_PATH="$(PKG_BUILD_DIR)/scripts/dtc/dtc"#g' $(PKG_BUILD_DIR)/.config
|
|
|
|
endef
|
|
|
|
|
|
|
|
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))
|