public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Felix Moessbauer <felix.moessbauer@siemens.com>
To: isar-users@googlegroups.com
Cc: florian.bezdeka@siemens.com, jan.kiszka@siemens.com,
	Felix Moessbauer <felix.moessbauer@siemens.com>
Subject: [PATCH 1/4] fix(u-boot-script): use correct ramdisk size
Date: Tue,  1 Aug 2023 09:37:03 +0000	[thread overview]
Message-ID: <20230801093706.1347928-2-felix.moessbauer@siemens.com> (raw)
In-Reply-To: <20230801093706.1347928-1-felix.moessbauer@siemens.com>

When booting the kernel via a boot* command, the ramdisk is passed as
address : size. However, the size pointed to the temporary variable
filesize, which denotes the filesize of the last load. When combining
with DT overlays, the overlays are loaded later and by that overwrite
the filesize variable, resulting in a partially passed initrd.

To fix this, we assign the size immediately after loading it to an env
variable and use that when booting.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 meta/recipes-bsp/u-boot-script/files/update-u-boot-script | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-bsp/u-boot-script/files/update-u-boot-script b/meta/recipes-bsp/u-boot-script/files/update-u-boot-script
index 39b9fa0f..e9ace15e 100755
--- a/meta/recipes-bsp/u-boot-script/files/update-u-boot-script
+++ b/meta/recipes-bsp/u-boot-script/files/update-u-boot-script
@@ -50,7 +50,8 @@ yes|1)
 	echo "load \${devtype} \${devnum}:\${distro_bootpart}" \
 	     "\${ramdisk_addr_r} /boot/initrd.img-${KERNEL_VERSION}" \
 	     >> ${BOOT_CMD}
-	INITRD_ADDR="\${ramdisk_addr_r}:\${filesize}"
+	echo "setenv ramdisk_size \${filesize}" >> ${BOOT_CMD}
+	INITRD_ADDR="\${ramdisk_addr_r}:\${ramdisk_size}"
 esac
 
 if [ -n "${OVERLAYS}" ]; then
-- 
2.34.1


  reply	other threads:[~2023-08-01  9:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-01  9:37 [PATCH 0/4] Rework and extend u-boot-script for DT overlays Felix Moessbauer
2023-08-01  9:37 ` Felix Moessbauer [this message]
2023-08-03 10:22   ` [PATCH 1/4] fix(u-boot-script): use correct ramdisk size Gylstorff Quirin
2023-08-01  9:37 ` [PATCH 2/4] refactor loading of DT overlays in uboot Felix Moessbauer
2023-08-08  8:48   ` Jan Kiszka
2023-08-31  4:56     ` MOESSBAUER, Felix
2023-08-01  9:37 ` [PATCH 3/4] u-boot-script: add support to use builtin dt Felix Moessbauer
2023-08-01  9:37 ` [PATCH 4/4] use builtin DT for nanopi-neo target Felix Moessbauer
2023-08-08  8:48   ` Jan Kiszka
2023-08-31  5:34     ` MOESSBAUER, Felix
2023-08-31  7:01       ` Jan Kiszka
2023-08-31  7:07         ` MOESSBAUER, Felix
2023-08-08  7:05 ` [PATCH 0/4] Rework and extend u-boot-script for DT overlays Uladzimir Bely
2023-08-08 10:24   ` Jan Kiszka
2023-08-09  5:40     ` Uladzimir Bely
2023-08-09  7:43       ` Baurzhan Ismagulov

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=20230801093706.1347928-2-felix.moessbauer@siemens.com \
    --to=felix.moessbauer@siemens.com \
    --cc=florian.bezdeka@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.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