Skip to content

Commit 0290be2

Browse files
committed
helios64: u-boot: bump v2026.01 → v2026.04
Self-contained board_helios64/ overlay bumped to v2026.04 from v2026.01. The overlay is a pristine copy of v2026.01 plus the minimum set of v2026.04-mandated changes and new cherry-picks: - board/Kconfig: ENV_OFFSET 0x460000 → 0x3F8000 Required by the v2026.04 SPI NOR environment layout. - 1001-fdt_fixup_ethernet-add-logs.patch.disabled Cherry-pick of Ricardo Pardini's fdt_fixup_ethernet logging patch. Shipped disabled; preserved for debugging MAC propagation issues. - cmd-fileenv-read-string-from-file-into-env.patch Cherry-pick of the Home Assistant 2018 vendor patch (rebased by rpardini) adapting 'fileenv' u-boot command for v2026.04. config/boards/helios64.conf: BOOTBRANCH / BOOTPATCHDIR → v2026.04. No behaviour changes beyond what the u-boot version bump itself requires; pre-existing code paths (sys_otp.c, helios64.c) are left exactly as they were in v2026.01. Defensive code-style fixes on top of this baseline are a separate follow-up commit. Assisted-by: Claude:claude-opus-4-7
1 parent 3697435 commit 0290be2

17 files changed

Lines changed: 2592 additions & 2 deletions

config/boards/helios64.conf

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ BOARDFAMILY="rockchip64" # Used to be rk3399
55
BOARD_MAINTAINER="prahal"
66
INTRODUCED="2020"
77
BOOTCONFIG="helios64-rk3399_defconfig"
8-
BOOTBRANCH="tag:v2026.01"
9-
BOOTPATCHDIR="v2026.01/board_helios64"
8+
BOOTBRANCH="tag:v2026.04"
9+
BOOTPATCHDIR="v2026.04/board_helios64"
1010
BOOT_SCENARIO="binman-atf-mainline"
1111
DDR_BLOB="rk33/rk3399_ddr_933MHz_v1.25.bin"
1212
KERNEL_TARGET="current,edge"
@@ -25,6 +25,11 @@ if [[ "$ROOTFS_TYPE" =~ f2fs|nilfs2|nfs|xfs ]]; then
2525
BOOTPART_REQUIRED=${BOOTPART_REQUIRED:-yes}
2626
fi
2727

28+
function post_config_uboot_target__helios64_enable_fileenv() {
29+
display_alert "u-boot for ${BOARD}" "enable CONFIG_CMD_FILEENV" "info"
30+
run_host_command_logged scripts/config --enable CONFIG_CMD_FILEENV # added via cmd-fileenv-read-string-from-file-into-env.patch
31+
}
32+
2833
function post_family_tweaks__helios64_enable_heartbeat() {
2934
display_alert "$BOARD" "Installing board tweaks" "info"
3035

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
config:
2+
3+
# Board-specific overlays live inside this directory to keep Helios64
4+
# patches self contained.
5+
overlay-directories:
6+
- { source: "defconfig", target: "configs" }
7+
- { source: "dt_upstream_rockchip", target: "dts/upstream/src/arm64/rockchip" }
8+
- { source: "dt_uboot", target: "arch/arm/dts" }
9+
- { source: "board", target: "board/kobol/helios64" }
10+
- { source: "include_configs", target: "include/configs" }
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Igor Velkov <325961+iav@users.noreply.github.com>
3+
Date: Thu, 25 Dec 2025 01:30:00 +0000
4+
Subject: [PATCH] exception: include string.h for strlen/strncmp
5+
6+
Fix implicit declarations in cmd/arm/exception64 by pulling in the
7+
standard string helpers.
8+
9+
---
10+
include/exception.h | 1 +
11+
1 file changed, 1 insertion(+)
12+
13+
diff --git a/include/exception.h b/include/exception.h
14+
index 0d27152ffa..e32eb833af 100644
15+
--- a/include/exception.h
16+
+++ b/include/exception.h
17+
@@ -7,6 +7,7 @@
18+
* Copyright (c) 2018, Heinrich Schuchardt <xypron.glpk@gmx.de>
19+
*/
20+
21+
#include <command.h>
22+
+#include <string.h>
23+
24+
static int do_exception(struct cmd_tbl *cmdtp, int flag, int argc,
25+
char *const argv[])
Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Ricardo Pardini <ricardo@pardini.net>
3+
Date: Mon, 12 Jan 2026 18:26:25 +0100
4+
Subject: fdt_fixup_ethernet: add logs
5+
6+
---
7+
boot/fdt_support.c | 56 +++++++---
8+
boot/image-fdt.c | 18 +++
9+
2 files changed, 59 insertions(+), 15 deletions(-)
10+
11+
diff --git a/boot/fdt_support.c b/boot/fdt_support.c
12+
index 111111111111..222222222222 100644
13+
--- a/boot/fdt_support.c
14+
+++ b/boot/fdt_support.c
15+
@@ -632,27 +632,31 @@ int fdt_fixup_memory(void *blob, u64 start, u64 size)
16+
17+
void fdt_fixup_ethernet(void *fdt)
18+
{
19+
+ log_info("[fdt_fixup_ethernet] called\n");
20+
int i = 0, j, prop;
21+
char *tmp, *end;
22+
char mac[16];
23+
const char *path;
24+
unsigned char mac_addr[ARP_HLEN];
25+
int offset;
26+
+ int total_aliases = 0, total_attempted = 0, total_skipped = 0, total_patched = 0;
27+
#ifdef FDT_SEQ_MACADDR_FROM_ENV
28+
int nodeoff;
29+
const struct fdt_property *fdt_prop;
30+
#endif
31+
32+
- if (fdt_path_offset(fdt, "/aliases") < 0)
33+
+ int aliases_off = fdt_path_offset(fdt, "/aliases");
34+
+ if (aliases_off < 0) {
35+
+ log_info("[fdt_fixup_ethernet] /aliases node not found\n");
36+
return;
37+
+ }
38+
39+
/* Cycle through all aliases */
40+
for (prop = 0; ; prop++) {
41+
const char *name;
42+
43+
/* FDT might have been edited, recompute the offset */
44+
- offset = fdt_first_property_offset(fdt,
45+
- fdt_path_offset(fdt, "/aliases"));
46+
+ offset = fdt_first_property_offset(fdt, aliases_off);
47+
/* Select property number 'prop' */
48+
for (j = 0; j < prop; j++)
49+
offset = fdt_next_property_offset(fdt, offset);
50+
@@ -660,7 +664,10 @@ void fdt_fixup_ethernet(void *fdt)
51+
if (offset < 0)
52+
break;
53+
54+
+ total_aliases++;
55+
path = fdt_getprop_by_offset(fdt, offset, &name, NULL);
56+
+ log_info("[fdt_fixup_ethernet] alias #%d: name='%s', path='%s'\n", prop, name, path ? path : "<null>");
57+
+
58+
if (!strncmp(name, "ethernet", 8)) {
59+
/* Treat plain "ethernet" same as "ethernet0". */
60+
if (!strcmp(name, "ethernet")
61+
@@ -679,33 +686,54 @@ void fdt_fixup_ethernet(void *fdt)
62+
else
63+
sprintf(mac, "eth%daddr", i);
64+
} else {
65+
+ log_info("[fdt_fixup_ethernet] Skipping alias '%s' (invalid index)\n", name);
66+
+ total_skipped++;
67+
continue;
68+
}
69+
#ifdef FDT_SEQ_MACADDR_FROM_ENV
70+
nodeoff = fdt_path_offset(fdt, path);
71+
- fdt_prop = fdt_get_property(fdt, nodeoff, "status",
72+
- NULL);
73+
- if (fdt_prop && !strcmp(fdt_prop->data, "disabled"))
74+
+ fdt_prop = fdt_get_property(fdt, nodeoff, "status", NULL);
75+
+ if (fdt_prop && !strcmp(fdt_prop->data, "disabled")) {
76+
+ log_info("[fdt_fixup_ethernet] Node '%s' is disabled, skipping\n", path);
77+
+ total_skipped++;
78+
continue;
79+
+ }
80+
i++;
81+
#endif
82+
+ total_attempted++;
83+
tmp = env_get(mac);
84+
- if (!tmp)
85+
+ log_info("[fdt_fixup_ethernet] env var for alias '%s' is '%s', value='%s'\n", name, mac, tmp ? tmp : "<not set>");
86+
+ if (!tmp) {
87+
+ log_info("[fdt_fixup_ethernet] env var '%s' not set, skipping\n", mac);
88+
+ total_skipped++;
89+
continue;
90+
-
91+
+ }
92+
+#ifndef FDT_SEQ_MACADDR_FROM_ENV
93+
+ int nodeoff = fdt_path_offset(fdt, path);
94+
+#endif
95+
+ if (nodeoff < 0) {
96+
+ log_info("[fdt_fixup_ethernet] Node path '%s' not found, skipping\n", path);
97+
+ total_skipped++;
98+
+ continue;
99+
+ }
100+
+ const struct fdt_property *status_prop = fdt_get_property(fdt, nodeoff, "status", NULL);
101+
+ if (status_prop && strcmp((const char *)status_prop->data, "okay")) {
102+
+ log_info("[fdt_fixup_ethernet] Node '%s' status is '%s', skipping\n", path, (const char *)status_prop->data);
103+
+ total_skipped++;
104+
+ continue;
105+
+ }
106+
for (j = 0; j < 6; j++) {
107+
- mac_addr[j] = tmp ?
108+
- hextoul(tmp, &end) : 0;
109+
+ mac_addr[j] = tmp ? hextoul(tmp, &end) : 0;
110+
if (tmp)
111+
tmp = (*end) ? end + 1 : end;
112+
}
113+
-
114+
- do_fixup_by_path(fdt, path, "mac-address",
115+
- &mac_addr, 6, 0);
116+
- do_fixup_by_path(fdt, path, "local-mac-address",
117+
- &mac_addr, 6, 1);
118+
+ log_info("[fdt_fixup_ethernet] Patching node '%s' (offset %d) with MAC %02x:%02x:%02x:%02x:%02x:%02x\n", path, nodeoff, mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3], mac_addr[4], mac_addr[5]);
119+
+ do_fixup_by_path(fdt, path, "mac-address", &mac_addr, 6, 0);
120+
+ do_fixup_by_path(fdt, path, "local-mac-address", &mac_addr, 6, 1);
121+
+ total_patched++;
122+
}
123+
}
124+
+ log_info("[fdt_fixup_ethernet] SUMMARY: aliases found=%d, attempted=%d, skipped=%d, patched=%d\n", total_aliases, total_attempted, total_skipped, total_patched);
125+
}
126+
127+
int fdt_record_loadable(void *blob, u32 index, const char *name,
128+
diff --git a/boot/image-fdt.c b/boot/image-fdt.c
129+
index 111111111111..222222222222 100644
130+
--- a/boot/image-fdt.c
131+
+++ b/boot/image-fdt.c
132+
@@ -1,3 +1,4 @@
133+
+#warning "Building image-fdt.c: fdt fixup call chain instrumented for MAC debugging."
134+
// SPDX-License-Identifier: GPL-2.0+
135+
/*
136+
* Copyright (c) 2013, Google Inc.
137+
@@ -586,11 +587,25 @@ __weak int ft_verify_fdt(void *fdt)
138+
139+
__weak int arch_fixup_fdt(void *blob)
140+
{
141+
+ log_info("[arch_fixup_fdt] called (weak stub)\n");
142+
+ return 0;
143+
+}
144+
+
145+
+__weak int ft_board_setup(void *blob, struct bd_info *bd)
146+
+{
147+
+ log_info("[ft_board_setup] called (weak stub)\n");
148+
+ return 0;
149+
+}
150+
+
151+
+__weak int ft_system_setup(void *blob, struct bd_info *bd)
152+
+{
153+
+ log_info("[ft_system_setup] called (weak stub)\n");
154+
return 0;
155+
}
156+
157+
int image_setup_libfdt(struct bootm_headers *images, void *blob, bool lmb)
158+
{
159+
+ log_info("[image_setup_libfdt] called\n");
160+
ulong *initrd_start = &images->initrd_start;
161+
ulong *initrd_end = &images->initrd_end;
162+
bool skip_board_fixup = false;
163+
@@ -638,6 +653,7 @@ int image_setup_libfdt(struct bootm_headers *images, void *blob, bool lmb)
164+
strlen(images->fit_uname_cfg) + 1, 1);
165+
166+
/* Update ethernet nodes */
167+
+ log_info("[image_setup_libfdt] calling fdt_fixup_ethernet\n");
168+
fdt_fixup_ethernet(blob);
169+
#if IS_ENABLED(CONFIG_CMD_PSTORE)
170+
/* Append PStore configuration */
171+
@@ -651,6 +667,7 @@ int image_setup_libfdt(struct bootm_headers *images, void *blob, bool lmb)
172+
}
173+
174+
if (IS_ENABLED(CONFIG_OF_BOARD_SETUP) && !skip_board_fixup) {
175+
+ log_info("[image_setup_libfdt] calling ft_board_setup\n");
176+
fdt_ret = ft_board_setup(blob, gd->bd);
177+
if (fdt_ret) {
178+
printf("ERROR: board-specific fdt fixup failed: %s\n",
179+
@@ -659,6 +676,7 @@ int image_setup_libfdt(struct bootm_headers *images, void *blob, bool lmb)
180+
}
181+
}
182+
if (IS_ENABLED(CONFIG_OF_SYSTEM_SETUP)) {
183+
+ log_info("[image_setup_libfdt] calling ft_system_setup\n");
184+
fdt_ret = ft_system_setup(blob, gd->bd);
185+
if (fdt_ret) {
186+
printf("ERROR: system-specific fdt fixup failed: %s\n",
187+
--
188+
Armbian
189+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Igor Velkov <325961+iav@users.noreply.github.com>
3+
Date: Thu, 25 Dec 2025 01:30:00 +0000
4+
Subject: [PATCH] rk3399: add Helios64 target
5+
6+
Wire Helios64 into the rk3399 board menu and source tree so its defconfig
7+
builds again on v2026.01-rc5. Based on work Aditya Prayoga <aditya@kobol.io>
8+
Tue, 15 Sep 2020 18:41:54 +0700
9+
10+
---
11+
arch/arm/mach-rockchip/rk3399/Kconfig | 14 ++++++++++++++
12+
1 file changed, 14 insertions(+)
13+
14+
diff --git a/arch/arm/mach-rockchip/rk3399/Kconfig b/arch/arm/mach-rockchip/rk3399/Kconfig
15+
index 39e5b0548d..2b5e169acd 100644
16+
--- a/arch/arm/mach-rockchip/rk3399/Kconfig
17+
+++ b/arch/arm/mach-rockchip/rk3399/Kconfig
18+
@@ -130,6 +130,13 @@
19+
* wide voltage input(5V-15V), dual cell battery
20+
* Wifi/BT accessible via expansion board M.2
21+
22+
+config TARGET_HELIOS64
23+
+ bool "Kobol Helios64"
24+
+ help
25+
+ Helios64 is a RK3399-based NAS board with a JMB585 SATA HBA,
26+
+ USB-C (DP Alt), USB3 hub, dual Ethernet (1G + 2.5G), eMMC and
27+
+ LPDDR4 memory.
28+
+
29+
endchoice
30+
31+
config ROCKCHIP_BOOT_MODE_REG
32+
@@ -163,6 +170,7 @@ endif # BOOTCOUNT_LIMIT
33+
34+
source "board/firefly/roc-pc-rk3399/Kconfig"
35+
source "board/google/gru/Kconfig"
36+
+source "board/kobol/helios64/Kconfig"
37+
source "board/pine64/pinebook-pro-rk3399/Kconfig"
38+
source "board/pine64/pinephone-pro-rk3399/Kconfig"
39+
source "board/pine64/rockpro64_rk3399/Kconfig"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
if TARGET_HELIOS64
2+
3+
config SYS_BOARD
4+
default "helios64"
5+
6+
config SYS_VENDOR
7+
default "kobol"
8+
9+
config SYS_CONFIG_NAME
10+
default "helios64"
11+
12+
config BOARD_SPECIFIC_OPTIONS # dummy
13+
def_bool y
14+
15+
config ENV_SECT_SIZE
16+
default 0x1000 if ENV_IS_IN_SPI_FLASH
17+
18+
config ENV_SIZE
19+
default 0x8000
20+
21+
config ENV_OFFSET
22+
default 0x3F8000 if ENV_IS_IN_SPI_FLASH
23+
24+
endif
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
HELIOS64 BOARD
2+
M: Aditya Prayoga <aditya@kobol.io>
3+
S: Maintained
4+
F: board/kobol/helios64/
5+
F: include/configs/helios64.h
6+
F: configs/helios64-rk3399_defconfig
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# SPDX-License-Identifier: GPL-2.0+
2+
#
3+
# Copyright (C) 2020 Aditya Prayoga <aditya@kobol.io>
4+
5+
obj-y := helios64.o sys_otp.o

0 commit comments

Comments
 (0)