mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
Radxa Zero 3: Switch to U-Boot v2025.10-rc2
Switch to newer U-Boot since it works reliably and provides upstream improvements. Add patch/u-boot/v2025.10 and the generic patch, as BOOTPATCHDIR cannot be unset (fallback to legacy fails). BOOT_SCENARIO="binman-atf-mainline" cannot be set here since it applies globally to the CSC file and would break branch=vendor. Users who want it can enable it manually.
This commit is contained in:
committed by
Rolf Leggewie
parent
79fd84f812
commit
a841c8da09
@@ -56,20 +56,24 @@ function post_family_tweaks__enable_aic8800_bluetooth_service() {
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
function post_family_config__use_mainline_uboot_except_vendor() {
|
||||
# use mainline u-boot for _current_ and _edge_
|
||||
if [[ "$BRANCH" != "current" && "$BRANCH" != "edge" ]]; then
|
||||
return 0
|
||||
return 0
|
||||
fi
|
||||
unset BOOT_FDT_FILE # boot.scr will use whatever u-boot detects and sets 'fdtfile' to
|
||||
unset BOOTFS_TYPE # mainline u-boot can boot ext4 directly
|
||||
BOOTCONFIG="radxa-zero-3-rk3566_defconfig"
|
||||
BOOTSOURCE="https://github.com/u-boot/u-boot"
|
||||
BOOTBRANCH="tag:v2025.04"
|
||||
BOOTPATCHDIR="v2025.04"
|
||||
BOOTBRANCH="tag:v2025.10-rc2"
|
||||
BOOTPATCHDIR="v2025.10"
|
||||
|
||||
UBOOT_TARGET_MAP="BL31=$RKBIN_DIR/$BL31_BLOB ROCKCHIP_TPL=$RKBIN_DIR/$DDR_BLOB;;u-boot-rockchip.bin"
|
||||
## For binman-atf-mainline: setting BOOT_SCENARIO at the top would break branch=vendor, so we don't enable it globally.
|
||||
# We cannot set BOOT_SOC=rk3566 due to side effects in Armbian scripts; ATF_TARGET_MAP is the safer override.
|
||||
# ATF does not currently separate rk3566 from rk3568.
|
||||
#ATF_TARGET_MAP="M0_CROSS_COMPILE=arm-linux-gnueabi- PLAT=rk3568 bl31;;build/rk3568/release/bl31/bl31.elf:bl31.elf"
|
||||
#UBOOT_TARGET_MAP="BL31=bl31.elf ROCKCHIP_TPL=$RKBIN_DIR/$DDR_BLOB;;u-boot-rockchip.bin"
|
||||
|
||||
unset uboot_custom_postprocess write_uboot_platform write_uboot_platform_mtd
|
||||
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ricardo Pardini <ricardo@pardini.net>
|
||||
Date: Fri, 31 Jan 2025 15:52:03 +0100
|
||||
Subject: cmd: fileenv: read string from file into env
|
||||
|
||||
- rpardini: adapted from vendor/legacy patch from 2018
|
||||
|
||||
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
|
||||
---
|
||||
cmd/Kconfig | 5 +
|
||||
cmd/Makefile | 1 +
|
||||
cmd/fileenv.c | 46 ++++++++++
|
||||
3 files changed, 52 insertions(+)
|
||||
|
||||
diff --git a/cmd/Kconfig b/cmd/Kconfig
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/cmd/Kconfig
|
||||
+++ b/cmd/Kconfig
|
||||
@@ -1825,6 +1825,11 @@ config CMD_XXD
|
||||
help
|
||||
Print file as hexdump to standard output
|
||||
|
||||
+config CMD_FILEENV
|
||||
+ bool "fileenv"
|
||||
+ help
|
||||
+ Read a file into memory and store it to env.
|
||||
+
|
||||
endmenu
|
||||
|
||||
if NET || NET_LWIP
|
||||
diff --git a/cmd/Makefile b/cmd/Makefile
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/cmd/Makefile
|
||||
+++ b/cmd/Makefile
|
||||
@@ -173,6 +173,7 @@ obj-$(CONFIG_CMD_SHA1SUM) += sha1sum.o
|
||||
obj-$(CONFIG_CMD_SEAMA) += seama.o
|
||||
obj-$(CONFIG_CMD_SETEXPR) += setexpr.o
|
||||
obj-$(CONFIG_CMD_SETEXPR_FMT) += printf.o
|
||||
+obj-$(CONFIG_CMD_FILEENV) += fileenv.o
|
||||
obj-$(CONFIG_CMD_SPI) += spi.o
|
||||
obj-$(CONFIG_CMD_STRINGS) += strings.o
|
||||
obj-$(CONFIG_CMD_SMBIOS) += smbios.o
|
||||
diff --git a/cmd/fileenv.c b/cmd/fileenv.c
|
||||
new file mode 100644
|
||||
index 000000000000..111111111111
|
||||
--- /dev/null
|
||||
+++ b/cmd/fileenv.c
|
||||
@@ -0,0 +1,46 @@
|
||||
+#include <config.h>
|
||||
+#include <command.h>
|
||||
+#include <fs.h>
|
||||
+#include <linux/ctype.h>
|
||||
+#include <vsprintf.h>
|
||||
+
|
||||
+static char *fs_argv[5];
|
||||
+
|
||||
+int do_fileenv(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[])
|
||||
+{
|
||||
+ if (argc < 6)
|
||||
+ return CMD_RET_USAGE;
|
||||
+
|
||||
+ fs_argv[0] = "fatload";
|
||||
+ fs_argv[1] = argv[1];
|
||||
+ fs_argv[2] = argv[2];
|
||||
+ fs_argv[3] = argv[3];
|
||||
+ fs_argv[4] = argv[4];
|
||||
+
|
||||
+ if (do_fat_fsload(cmdtp, 0, 5, fs_argv) != 0)
|
||||
+ return 1;
|
||||
+
|
||||
+ char *addr = (char *)simple_strtoul(argv[3], NULL, 16);
|
||||
+ size_t size = env_get_hex("filesize", 0);
|
||||
+
|
||||
+ // Prepare string
|
||||
+ addr[size] = 0x00;
|
||||
+ char *s = addr;
|
||||
+ while(*s != 0x00) {
|
||||
+ if (isprint(*s)) {
|
||||
+ s++;
|
||||
+ }
|
||||
+ else {
|
||||
+ *s = 0x00;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return env_set(argv[5], addr);
|
||||
+}
|
||||
+
|
||||
+U_BOOT_CMD(
|
||||
+ fileenv, 6, 0, do_fileenv,
|
||||
+ "Read file and store it into env.",
|
||||
+ "<interface> <dev:part> <addr> <filename> <envname>\n"
|
||||
+ " - Read file from fat32 and store it as env."
|
||||
+);
|
||||
--
|
||||
Armbian
|
||||
|
||||
Reference in New Issue
Block a user