aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/uboot-rockchip/Makefile
diff options
context:
space:
mode:
authorDavid Bauer <mail@david-bauer.net>2020-07-10 17:38:36 +0200
committerDavid Bauer <mail@david-bauer.net>2020-07-28 15:52:44 +0200
commit04f06787f1c0f1d89f6b8c71430d0d0bbb62ffa5 (patch)
tree27b246e3ca941dab01d39c700fb9d7f40f852fb1 /package/boot/uboot-rockchip/Makefile
parent65ac670b792481d921f3aaba685d4c9910e1ad04 (diff)
downloadupstream-04f06787f1c0f1d89f6b8c71430d0d0bbb62ffa5.tar.gz
upstream-04f06787f1c0f1d89f6b8c71430d0d0bbb62ffa5.tar.bz2
upstream-04f06787f1c0f1d89f6b8c71430d0d0bbb62ffa5.zip
uboot-rockchip: add NanoPi R2S support
Add support for the FriendlyARM NanoPi R2S. Signed-off-by: David Bauer <mail@david-bauer.net>
Diffstat (limited to 'package/boot/uboot-rockchip/Makefile')
-rw-r--r--package/boot/uboot-rockchip/Makefile31
1 files changed, 29 insertions, 2 deletions
diff --git a/package/boot/uboot-rockchip/Makefile b/package/boot/uboot-rockchip/Makefile
index 97f651fbbf..e5c49d00bb 100644
--- a/package/boot/uboot-rockchip/Makefile
+++ b/package/boot/uboot-rockchip/Makefile
@@ -20,6 +20,23 @@ define U-Boot/Default
HIDDEN:=1
endef
+
+# RK3328 boards
+
+define U-Boot/nanopi-r2s-rk3328
+ BUILD_SUBTARGET:=armv8
+ NAME:=NanoPi R2S
+ BUILD_DEVICES:= \
+ friendlyarm_nanopi-r2s
+ DEPENDS:=+PACKAGE_u-boot-nanopi-r2s-rk3328:arm-trusted-firmware-rockchip
+ PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip
+ ATF:=rk3328_bl31.elf
+ OF_PLATDATA:=$(1)
+endef
+
+
+# RK3399 boards
+
define U-Boot/rockpro64-rk3399
BUILD_SUBTARGET:=armv8
NAME:=RockPro64
@@ -27,19 +44,29 @@ define U-Boot/rockpro64-rk3399
pine64_rockpro64
DEPENDS:=+PACKAGE_u-boot-rockpro64-rk3399:arm-trusted-firmware-rockchip
PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip
+ ATF:=rk3399_bl31.elf
endef
UBOOT_TARGETS := \
- rockpro64-rk3399
+ rockpro64-rk3399 \
+ nanopi-r2s-rk3328
UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes
UBOOT_MAKE_FLAGS += \
- BL31=$(STAGING_DIR_IMAGE)/rk3399_bl31.elf
+ BL31=$(STAGING_DIR_IMAGE)/$(ATF)
define Build/Configure
$(call Build/Configure/U-Boot)
+ifneq ($(OF_PLATDATA),)
+ mkdir -p $(PKG_BUILD_DIR)/tpl/dts
+ mkdir -p $(PKG_BUILD_DIR)/include/generated
+
+ $(CP) $(PKG_BUILD_DIR)/of-platdata/$(OF_PLATDATA)/dt-platdata.c $(PKG_BUILD_DIR)/tpl/dts/dt-platdata.c
+ $(CP) $(PKG_BUILD_DIR)/of-platdata/$(OF_PLATDATA)/dt-structs-gen.h $(PKG_BUILD_DIR)/include/generated/dt-structs-gen.h
+endif
+
$(SED) 's#CONFIG_MKIMAGE_DTC_PATH=.*#CONFIG_MKIMAGE_DTC_PATH="$(PKG_BUILD_DIR)/scripts/dtc/dtc"#g' $(PKG_BUILD_DIR)/.config
echo 'CONFIG_IDENT_STRING=" OpenWrt"' >> $(PKG_BUILD_DIR)/.config
endef