mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
uboot-rk35xx: add new package for rk3528
This commit is contained in:
parent
12641b1ce1
commit
fd25a03bef
@ -91,20 +91,12 @@ define Package/trusted-firmware-a/install
|
||||
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
||||
|
||||
$(CP) $(PKG_BUILD_DIR)/bin/$(ATF) $(STAGING_DIR_IMAGE)/
|
||||
$(CP) $(PKG_BUILD_DIR)/bin/$(TPL) $(STAGING_DIR_IMAGE)/
|
||||
ifneq ($(SPL),)
|
||||
$(CP) $(PKG_BUILD_DIR)/tools/loaderimage $(STAGING_DIR_IMAGE)/
|
||||
$(CP) $(PKG_BUILD_DIR)/$(BUILD_VARIANT)-idbloader.bin $(STAGING_DIR_IMAGE)/
|
||||
$(CP) $(PKG_BUILD_DIR)/$(BUILD_VARIANT)-trust.bin $(STAGING_DIR_IMAGE)/
|
||||
else
|
||||
$(CP) $(PKG_BUILD_DIR)/bin/$(DDR) $(STAGING_DIR_IMAGE)/
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/trusted-firmware-a/install
|
||||
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
||||
|
||||
$(CP) $(PKG_BUILD_DIR)/bin/$(ATF) $(STAGING_DIR_IMAGE)/
|
||||
$(CP) $(PKG_BUILD_DIR)/bin/$(TPL) $(STAGING_DIR_IMAGE)/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage/Trusted-Firmware-A))
|
||||
|
72
package/boot/uboot-rk35xx/Makefile
Normal file
72
package/boot/uboot-rk35xx/Makefile
Normal file
@ -0,0 +1,72 @@
|
||||
#
|
||||
# Copyright (C) 2022 ImmortalWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=uboot-rk35xx
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/radxa/u-boot
|
||||
|
||||
PKG_SOURCE_DATE:=2024-03-01
|
||||
PKG_SOURCE_VERSION:=3b2035860d51a75fc70941acf9ae934140991b21
|
||||
PKG_MIRROR_HASH:=4cba13e74fff830f946ee52d55c6a94e2de691d45db6cf69c481f91a8063e23f
|
||||
|
||||
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/evb-rk3528
|
||||
BUILD_SUBTARGET:=armv8
|
||||
NAME:=RK3528 Evaluation
|
||||
BUILD_DEVICES:= \
|
||||
armsom_sige1 \
|
||||
hinlink_opc-h28k \
|
||||
hinlink_opc-ht2 \
|
||||
radxa_e20c \
|
||||
widora_mangopi-m28k \
|
||||
widora_mangopi-m28k-pro
|
||||
DEPENDS:=+PACKAGE_u-boot-evb-rk3528:trusted-firmware-a-rk3528
|
||||
ATF:=rk3528_bl31_v1.17.elf
|
||||
DDR:=rk3528_ddr_1056MHz_v1.09.bin
|
||||
UBOOT_CONFIG:=rk3528
|
||||
SOC:=rk3528
|
||||
endef
|
||||
|
||||
UBOOT_TARGETS := \
|
||||
evb-rk3528
|
||||
|
||||
UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes
|
||||
|
||||
UBOOT_MAKE_FLAGS += \
|
||||
BL31=$(STAGING_DIR_IMAGE)/$(ATF) spl/u-boot-spl.bin u-boot.dtb u-boot.itb
|
||||
|
||||
define Build/Configure
|
||||
$(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)
|
||||
$(PKG_BUILD_DIR)/tools/mkimage -n $(SOC) -T rksd -d \
|
||||
$(STAGING_DIR_IMAGE)/$(DDR):$(PKG_BUILD_DIR)/spl/u-boot-spl.bin $(PKG_BUILD_DIR)/idbloader.img
|
||||
$(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))
|
22
package/boot/uboot-rk35xx/patches/001-cmd-fix_source.patch
Normal file
22
package/boot/uboot-rk35xx/patches/001-cmd-fix_source.patch
Normal file
@ -0,0 +1,22 @@
|
||||
From ea50d7f6921e2c3017258ce8fdfad632d82fbd87 Mon Sep 17 00:00:00 2001
|
||||
From: Stephen <stephen@vamrs.com>
|
||||
Date: Mon, 8 Nov 2021 14:30:00 +0800
|
||||
Subject: [PATCH] cmd: source: fix the error that the command source
|
||||
failed to execute
|
||||
|
||||
Signed-off-by: Stephen <stephen@vamrs.com>
|
||||
---
|
||||
cmd/source.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/cmd/source.c
|
||||
+++ b/cmd/source.c
|
||||
@@ -87,7 +87,7 @@ source (ulong addr, const char *fit_unam
|
||||
* past the zero-terminated sequence of image lengths to get
|
||||
* to the actual image data
|
||||
*/
|
||||
- while (*data++ != IMAGE_PARAM_INVAL);
|
||||
+ while (*data++);
|
||||
break;
|
||||
#endif
|
||||
#if defined(CONFIG_FIT)
|
@ -0,0 +1,16 @@
|
||||
--- a/arch/arm/mach-rockchip/decode_bl31.py
|
||||
+++ b/arch/arm/mach-rockchip/decode_bl31.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python2
|
||||
+#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (C) 2020 Rockchip Electronics Co., Ltd
|
||||
#
|
||||
--- a/arch/arm/mach-rockchip/make_fit_atf.py
|
||||
+++ b/arch/arm/mach-rockchip/make_fit_atf.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python2
|
||||
+#!/usr/bin/env python3
|
||||
"""
|
||||
A script to generate FIT image source for rockchip boards
|
||||
with ARM Trusted Firmware
|
Loading…
Reference in New Issue
Block a user