atf-rockchip: update to 2.3
[openwrt/openwrt.git] / package / boot / uboot-rockchip / Makefile
1 #
2 # This is free software, licensed under the GNU General Public License v2.
3 # See /LICENSE for more information.
4 #
5 include $(TOPDIR)/rules.mk
6 include $(INCLUDE_DIR)/kernel.mk
7
8 PKG_VERSION:=2020.04
9
10 PKG_HASH:=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372
11
12 PKG_MAINTAINER:=Tobias Maedel <openwrt@tbspace.de>
13
14 include $(INCLUDE_DIR)/u-boot.mk
15 include $(INCLUDE_DIR)/package.mk
16
17 define U-Boot/Default
18 BUILD_TARGET:=rockchip
19 UENV:=default
20 HIDDEN:=1
21 endef
22
23 define U-Boot/rockpro64-rk3399
24 BUILD_SUBTARGET:=armv8
25 NAME:=RockPro64
26 BUILD_DEVICES:= \
27 pine64_rockpro64
28 DEPENDS:=+PACKAGE_u-boot-rockpro64-rk3399:arm-trusted-firmware-rockchip
29 PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip
30 endef
31
32 UBOOT_TARGETS := \
33 rockpro64-rk3399
34
35 UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes
36
37 UBOOT_MAKE_FLAGS += \
38 BL31=$(STAGING_DIR_IMAGE)/rk3399_bl31.elf
39
40 define Build/Configure
41 $(SED) s/subdir.*pylibfdt//g $(PKG_BUILD_DIR)/scripts/dtc/Makefile
42 $(call Build/Configure/U-Boot)
43
44 $(SED) 's#CONFIG_MKIMAGE_DTC_PATH=.*#CONFIG_MKIMAGE_DTC_PATH="$(PKG_BUILD_DIR)/scripts/dtc/dtc"#g' $(PKG_BUILD_DIR)/.config
45 echo 'CONFIG_IDENT_STRING=" OpenWrt"' >> $(PKG_BUILD_DIR)/.config
46 endef
47
48 define Build/InstallDev
49 $(INSTALL_DIR) $(STAGING_DIR_IMAGE)
50 $(CP) $(PKG_BUILD_DIR)/idbloader.img $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-idbloader.img
51 $(CP) $(PKG_BUILD_DIR)/u-boot.itb $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-u-boot.itb
52 endef
53
54 define Package/u-boot/install/default
55 endef
56
57 $(eval $(call BuildPackage/U-Boot))