Skip to contentSkip to conversation

image: fix select_ramdisk for raw initrd

PATCH In review Artem Lapkin 2 participants 3 messages Oct 15, 2021 – Nov 1, 2021 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 image: fix select_ramdisk for raw initrd

Problem

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

Solution: setup rd_datap value from select

---
 common/image-board.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/image-board.c +1 -1
index e7660352e9..e3c6ea806a 100644
@@ -439,7 +439,7 @@ static int select_ramdisk(bootm_headers_t *images, const char *select, u8 arch,
 				end = strchr(select, ':');
 			if (end) {
 				*rd_lenp = hextoul(++end, NULL);
-				*rd_datap = rd_addr;
+				*rd_datap = hextoul(select, NULL);
 				processed = true;
 			}
 		}
Signature · 1 line
2.25.1
#1 lore raw

Hi Artem,

Quoted 6 lines · Artem Lapkin

Problem

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

Quoted 6 lines

Solution: setup rd_datap value from select

---
 common/image-board.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Do we need this patch as well as the other one? If so, can you combine them?

Also, is it possible to drop the assignment to rd_addr at the top of the function?

Quoted 15 lines
common/image-board.c +1 -2
index e7660352e9..e3c6ea806a 100644
@@ -439,7 +439,7 @@ static int select_ramdisk(bootm_headers_t *images, const char *select, u8 arch,
                                end = strchr(select, ':');
                        if (end) {
                                *rd_lenp = hextoul(++end, NULL);
-                               *rd_datap = rd_addr;
+                               *rd_datap = hextoul(select, NULL);
                                processed = true;
                        }
                }
--
Quoted 2 lines

2.25.1

Regards,
Simon

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#3 lore raw

Hi Simon, Tom , and ...

Quoted 2 lines

Do we need this patch as well as the other one? If so, can you combine them? Also, is it possible to drop the assignment to rd_addr at the top of

the function?

this patch must be replaced by another one
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
( last patch will be enough alone)

Quoted 42 lines · Simon Glass

Hi Artem,

Quoted 6 lines · Artem Lapkin

Problem

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

Quoted 6 lines

Solution: setup rd_datap value from select

---
 common/image-board.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Do we need this patch as well as the other one? If so, can you combine them?

Also, is it possible to drop the assignment to rd_addr at the top of the function?

Quoted 15 lines
common/image-board.c +1 -2
index e7660352e9..e3c6ea806a 100644
@@ -439,7 +439,7 @@ static int select_ramdisk(bootm_headers_t *images, const char *select, u8 arch,
                                end = strchr(select, ':');
                        if (end) {
                                *rd_lenp = hextoul(++end, NULL);
-                               *rd_datap = rd_addr;
+                               *rd_datap = hextoul(select, NULL);
                                processed = true;
                        }
                }
--
Quoted 2 lines

2.25.1

Regards,
Simon