Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Angelo Compagnucci <angelo.compagnucci@gmail.com>
To: buildroot@buildroot.org
Cc: Biagio Montaruli <biagio.hkr@gmail.com>,
	Edgar Bonet <bonet@grenoble.cnrs.fr>,
	Ludovic Desroches <ludovic.desroches@microchip.com>,
	Simon Dawson <spdawson@gmail.com>,
	Angelo Compagnucci <angelo.compagnucci@gmail.com>
Subject: [Buildroot] [PATCH v2 5/6] boot/at91bootstrap3: find the memory@ node of Linux device trees
Date: Wed, 11 Nov 2026 16:45:51 +0100	[thread overview]
Message-ID: <20261111154553.673632-5-angelo.compagnucci@gmail.com> (raw)
In-Reply-To: <20261111154553.673632-1-angelo.compagnucci@gmail.com>

Before booting Linux, at91bootstrap 3.x sets the memory node of its
device tree, which it looks for by the name "memory": the Linux device
trees name it memory@<address> (e.g. memory@20000000 in
at91-ariettag25.dts), and at91bootstrap stops before booting:

  DT: doesn't support add node (memory)
  SD/MMC: Failed to load image

Backport the fix of the 4.x series.

Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
---
Changes v1 -> v2:
  - new patch
---
 ...w-name-of-memory-node-in-device-tree.patch | 31 +++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 boot/at91bootstrap3/v3.10.4/0002-lib-fdt-adapt-new-name-of-memory-node-in-device-tree.patch

diff --git a/boot/at91bootstrap3/v3.10.4/0002-lib-fdt-adapt-new-name-of-memory-node-in-device-tree.patch b/boot/at91bootstrap3/v3.10.4/0002-lib-fdt-adapt-new-name-of-memory-node-in-device-tree.patch
new file mode 100644
index 0000000000..ef6f5e14b3
--- /dev/null
+++ b/boot/at91bootstrap3/v3.10.4/0002-lib-fdt-adapt-new-name-of-memory-node-in-device-tree.patch
@@ -0,0 +1,31 @@
+From 72da9d23ed07bbfc793d767dc5a4044cc0a95706 Mon Sep 17 00:00:00 2001
+From: Xing Chen <xing.chen@microchip.com>
+Date: Fri, 24 Sep 2021 10:47:35 +0800
+Subject: [PATCH] lib: fdt: adapt new name of memory node in device tree file
+
+The name of memory node was changed from 'memory' to 'memory@address'
+in device tree files in Linux. For example, 'memory@20000000' .
+This commit checks if the memory node is named 'memory' or it has a trailing
+'@' .
+
+Signed-off-by: Xing Chen <xing.chen@microchip.com>
+Upstream: https://github.com/linux4sam/at91bootstrap/commit/72da9d23ed07bbfc793d767dc5a4044cc0a95706
+Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
+---
+ lib/fdt.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/lib/fdt.c b/lib/fdt.c
+index 8d1fdfdc5..aa20426c9 100644
+--- a/lib/fdt.c
++++ b/lib/fdt.c
+@@ -254,7 +254,8 @@ static int of_get_node_offset(void *blob, const char *name, int *offset)
+ 
+ 		nodename = (char *)of_dt_struct_offset(blob,(nodeoffset + 4));
+ 		if ((memcmp(nodename, name, namelen) == 0)
+-			&& (nodename[namelen] == '\0'))
++			&& ((nodename[namelen] == '\0')
++				|| (nodename[namelen] == '@')))
+ 			break;
+ 
+ 		start_offset = nextoffset;
-- 
2.53.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2026-11-11 15:46 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10 21:55 [Buildroot] [PATCH 0/5] at91bootstrap3: bump to 3.10.4, re-add the Arietta G25 defconfigs Angelo Compagnucci
2026-11-10 21:55 ` [Buildroot] [PATCH 1/5] boot/at91bootstrap3: bump 3.x series to 3.10.4 Angelo Compagnucci
2026-11-11 11:55   ` Edgar Bonet via buildroot
2026-11-10 21:55 ` [Buildroot] [PATCH 2/5] configs/acmesystems_acqua_a5_*: bump AT91Bootstrap " Angelo Compagnucci
2026-11-11 11:55   ` Edgar Bonet via buildroot
2026-11-10 21:55 ` [Buildroot] [PATCH 3/5] configs/at91sam9x5ek*: " Angelo Compagnucci
2026-11-10 21:55 ` [Buildroot] [PATCH 4/5] boot/at91bootstrap3: drop the patch for 3.10.3 Angelo Compagnucci
2026-11-10 21:55 ` [Buildroot] [PATCH 5/5] configs/acmesystems_arietta_g25_{128mb, 256mb}_defconfig: re-add defconfigs Angelo Compagnucci
2026-11-11 15:45 ` [Buildroot] [PATCH v2 1/6] boot/at91bootstrap3: bump 3.x series to 3.10.4 Angelo Compagnucci
2026-11-11 15:45   ` [Buildroot] [PATCH v2 2/6] configs/acmesystems_acqua_a5_*: bump AT91Bootstrap " Angelo Compagnucci
2026-11-11 15:45   ` [Buildroot] [PATCH v2 3/6] configs/at91sam9x5ek*: " Angelo Compagnucci
2026-11-11 15:45   ` [Buildroot] [PATCH v2 4/6] boot/at91bootstrap3: drop the patch for 3.10.3 Angelo Compagnucci
2026-11-11 15:45   ` Angelo Compagnucci [this message]
2026-11-11 18:13     ` [Buildroot] [PATCH v2 5/6] boot/at91bootstrap3: find the memory@ node of Linux device trees Edgar Bonet via buildroot
2026-11-11 18:50       ` Angelo Compagnucci
2026-11-11 15:45   ` [Buildroot] [PATCH v2 6/6] configs/acmesystems_arietta_g25_{128mb, 256mb}_defconfig: re-add defconfigs Angelo Compagnucci
2026-11-11 18:37   ` [Buildroot] [PATCH v3 1/7] boot/at91bootstrap3: bump 3.x series to 3.10.4 Angelo Compagnucci
2026-11-11 18:37     ` [Buildroot] [PATCH v3 2/7] configs/acmesystems_acqua_a5_*: bump AT91Bootstrap " Angelo Compagnucci
2026-11-11 18:37     ` [Buildroot] [PATCH v3 3/7] configs/at91sam9x5ek*: " Angelo Compagnucci
2026-11-11 18:37     ` [Buildroot] [PATCH v3 4/7] boot/at91bootstrap3: drop the patch for 3.10.3 Angelo Compagnucci
2026-11-11 18:37     ` [Buildroot] [PATCH v3 5/7] boot/at91bootstrap3: find the memory@ node of Linux device trees Angelo Compagnucci
2026-11-11 18:37     ` [Buildroot] [PATCH v3 6/7] configs/acmesystems_arietta_g25_{128mb, 256mb}_defconfig: re-add defconfigs Angelo Compagnucci
2026-11-11 18:37     ` [Buildroot] [PATCH v3 7/7] DEVELOPERS: remove Biagio Montaruli Angelo Compagnucci

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261111154553.673632-5-angelo.compagnucci@gmail.com \
    --to=angelo.compagnucci@gmail.com \
    --cc=biagio.hkr@gmail.com \
    --cc=bonet@grenoble.cnrs.fr \
    --cc=buildroot@buildroot.org \
    --cc=ludovic.desroches@microchip.com \
    --cc=spdawson@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox