All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] image-board: fix wrong implementation ram disk address setup from cmdline
@ 2021-10-16  5:19 Artem Lapkin
  2021-10-31 23:47 ` Simon Glass
       [not found] ` <ADMAagBDICVLCaddIATUA4rw.9.1635724039413.Hmail.art@khadas.com>
  0 siblings, 2 replies; 4+ messages in thread
From: Artem Lapkin @ 2021-10-16  5:19 UTC (permalink / raw)
  To: sjg
  Cc: trini, narmstrong, twarren, andre.przywara, u-boot,
	u-boot-amlogic, art, nick, gouwa

Problem

Wrong implementation logic: ramdisk cmdline image address always ignored!
Next block { rd_addr = hextoul(select, NULL) } unusable for raw initrd.

We have unbootable raw initrd images because, select_ramdisk for raw
initrd images ignore submited select addr and setup rd_datap value to 0

Come-from: https://patchwork.ozlabs.org/project/uboot/patch/20211015101501.4091141-1-art@khadas.com/

Signed-off-by: Artem Lapkin <art@khadas.com>
---
 common/image-board.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/common/image-board.c b/common/image-board.c
index e7660352e9..e7063016ef 100644
--- a/common/image-board.c
+++ b/common/image-board.c
@@ -333,7 +333,7 @@ static int select_ramdisk(bootm_headers_t *images, const char *select, u8 arch,
 
 	if (select) {
 		ulong default_addr;
-		bool done = true;
+		bool done = false;
 
 		if (CONFIG_IS_ENABLED(FIT)) {
 			/*
@@ -351,13 +351,13 @@ static int select_ramdisk(bootm_headers_t *images, const char *select, u8 arch,
 					   &fit_uname_config)) {
 				debug("*  ramdisk: config '%s' from image at 0x%08lx\n",
 				      fit_uname_config, rd_addr);
+				done = true;
 			} else if (fit_parse_subimage(select, default_addr,
 						      &rd_addr,
 						      &fit_uname_ramdisk)) {
 				debug("*  ramdisk: subimage '%s' from image at 0x%08lx\n",
 				      fit_uname_ramdisk, rd_addr);
-			} else {
-				done = false;
+				done = true;
 			}
 		}
 		if (!done) {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-11-05  2:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-16  5:19 [PATCH] image-board: fix wrong implementation ram disk address setup from cmdline Artem Lapkin
2021-10-31 23:47 ` Simon Glass
     [not found] ` <ADMAagBDICVLCaddIATUA4rw.9.1635724039413.Hmail.art@khadas.com>
2021-11-01  6:52   ` Art Nikpal
2021-11-05  2:02     ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.