aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/uboot-rockchip
diff options
context:
space:
mode:
authorTobias Mädel <t.maedel@alfeld.de>2020-04-12 13:53:56 +0200
committerPetr Štetiar <ynezz@true.cz>2020-04-20 16:37:56 +0200
commit797506011695d2dacba74bec717fbf88a7729ace (patch)
treee4e77c17695acaa46c45191c88391fb8d81d57cc /package/boot/uboot-rockchip
parent79d7109225bc44dc527216565b5d0ffff45018e4 (diff)
downloadupstream-797506011695d2dacba74bec717fbf88a7729ace.tar.gz
upstream-797506011695d2dacba74bec717fbf88a7729ace.tar.bz2
upstream-797506011695d2dacba74bec717fbf88a7729ace.zip
uboot-rockchip: add new package
This package is needed for the rockchip target. Signed-off-by: Tobias Mädel <t.maedel@alfeld.de> Tested-by: Tobias Schramm <t.schramm@manjaro.org>
Diffstat (limited to 'package/boot/uboot-rockchip')
-rw-r--r--package/boot/uboot-rockchip/Makefile57
1 files changed, 57 insertions, 0 deletions
diff --git a/package/boot/uboot-rockchip/Makefile b/package/boot/uboot-rockchip/Makefile
new file mode 100644
index 0000000000..fa6bbe15fa
--- /dev/null
+++ b/package/boot/uboot-rockchip/Makefile
@@ -0,0 +1,57 @@
+#
+# 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
+
+PKG_VERSION:=2020.04
+
+PKG_HASH:=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372
+
+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
+
+define U-Boot/rockpro64-rk3399
+ BUILD_SUBTARGET:=armv8
+ NAME:=RockPro64
+ BUILD_DEVICES:= \
+ pine64_rockpro64
+ DEPENDS:=+PACKAGE_u-boot-rockpro64-rk3399:arm-trusted-firmware-rockchip
+ PKG_BUILD_DEPENDS:=arm-trusted-firmware-rockchip
+endef
+
+UBOOT_TARGETS := \
+ rockpro64-rk3399
+
+UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes
+
+UBOOT_MAKE_FLAGS += \
+ BL31=$(STAGING_DIR_IMAGE)/bl31.elf
+
+define Build/Configure
+ $(SED) s/subdir.*pylibfdt//g $(PKG_BUILD_DIR)/scripts/dtc/Makefile
+ $(call Build/Configure/U-Boot)
+
+ $(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
+
+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))