* [PATCH v2] image-board: fix wrong implementation ram disk address setup from cmdline
@ 2021-11-25 3:08 Artem Lapkin
2021-12-07 15:07 ` Simon Glass
2022-01-17 19:47 ` Tom Rini
0 siblings, 2 replies; 6+ messages in thread
From: Artem Lapkin @ 2021-11-25 3:08 UTC (permalink / raw)
To: sjg
Cc: trini, narmstrong, twarren, andre.przywara, u-boot,
u-boot-amlogic, christianshewitt, 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
Signed-off-by: Artem Lapkin <art@khadas.com>
---
V2 changes
_ rebase to master
_ from https://patchwork.ozlabs.org/project/uboot/patch/20211016051915.4157293-1-art@khadas.com/
---
boot/image-board.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/boot/image-board.c b/boot/image-board.c
index bf8817165c..87a8f07432 100644
--- a/boot/image-board.c
+++ b/boot/image-board.c
@@ -334,7 +334,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)) {
/*
@@ -352,13 +352,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] 6+ messages in thread
* Re: [PATCH v2] image-board: fix wrong implementation ram disk address setup from cmdline
2021-11-25 3:08 [PATCH v2] image-board: fix wrong implementation ram disk address setup from cmdline Artem Lapkin
@ 2021-12-07 15:07 ` Simon Glass
2022-01-17 19:47 ` Tom Rini
1 sibling, 0 replies; 6+ messages in thread
From: Simon Glass @ 2021-12-07 15:07 UTC (permalink / raw)
To: Artem Lapkin
Cc: trini, narmstrong, TWarren, andre.przywara, u-boot,
u-boot-amlogic, christianshewitt, art, nick, gouwa
On Wed, 24 Nov 2021 at 20:09, Artem Lapkin <email2tema@gmail.com> wrote:
>
> 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
>
> Signed-off-by: Artem Lapkin <art@khadas.com>
> ---
> V2 changes
> _ rebase to master
> _ from https://patchwork.ozlabs.org/project/uboot/patch/20211016051915.4157293-1-art@khadas.com/
> ---
> boot/image-board.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Fixes: f33a2c1bd0f ("image: Remove #ifdefs from select_ramdisk()")
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] image-board: fix wrong implementation ram disk address setup from cmdline
2021-11-25 3:08 [PATCH v2] image-board: fix wrong implementation ram disk address setup from cmdline Artem Lapkin
2021-12-07 15:07 ` Simon Glass
@ 2022-01-17 19:47 ` Tom Rini
2022-01-18 7:28 ` Art Nikpal
2022-01-23 3:32 ` Art Nikpal
1 sibling, 2 replies; 6+ messages in thread
From: Tom Rini @ 2022-01-17 19:47 UTC (permalink / raw)
To: Artem Lapkin
Cc: sjg, narmstrong, twarren, andre.przywara, u-boot, u-boot-amlogic,
christianshewitt, art, nick, gouwa
[-- Attachment #1: Type: text/plain, Size: 1839 bytes --]
On Thu, Nov 25, 2021 at 11:08:59AM +0800, Artem Lapkin wrote:
> 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
>
> Signed-off-by: Artem Lapkin <art@khadas.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> ---
> V2 changes
> _ rebase to master
> _ from https://patchwork.ozlabs.org/project/uboot/patch/20211016051915.4157293-1-art@khadas.com/
> ---
> boot/image-board.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/boot/image-board.c b/boot/image-board.c
> index bf8817165c..87a8f07432 100644
> --- a/boot/image-board.c
> +++ b/boot/image-board.c
> @@ -334,7 +334,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)) {
> /*
> @@ -352,13 +352,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) {
I think we still need this? Can you please confirm and if so rebase to
master again, sorry, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] image-board: fix wrong implementation ram disk address setup from cmdline
2022-01-17 19:47 ` Tom Rini
@ 2022-01-18 7:28 ` Art Nikpal
2022-01-23 3:32 ` Art Nikpal
1 sibling, 0 replies; 6+ messages in thread
From: Art Nikpal @ 2022-01-18 7:28 UTC (permalink / raw)
To: Tom Rini
Cc: Simon Glass, Neil Armstrong, Tom Warren, Andre Przywara,
U-Boot Mailing List, u-boot-amlogic, Christian Hewitt,
Artem Lapkin, Nick Xie, Gouwa Wang
On Tue, Jan 18, 2022 at 3:47 AM Tom Rini <trini@konsulko.com> wrote:
>
> On Thu, Nov 25, 2021 at 11:08:59AM +0800, Artem Lapkin wrote:
>
> > 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
> >
> > Signed-off-by: Artem Lapkin <art@khadas.com>
> > Reviewed-by: Simon Glass <sjg@chromium.org>
> > ---
> > V2 changes
> > _ rebase to master
> > _ from https://patchwork.ozlabs.org/project/uboot/patch/20211016051915.4157293-1-art@khadas.com/
> > ---
> > boot/image-board.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/boot/image-board.c b/boot/image-board.c
> > index bf8817165c..87a8f07432 100644
> > --- a/boot/image-board.c
> > +++ b/boot/image-board.c
> > @@ -334,7 +334,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)) {
> > /*
> > @@ -352,13 +352,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) {
>
> I think we still need this? Can you please confirm and if so rebase to
> master again, sorry, thanks!
i need to check master and test it again - i'll replay soon tnx
>
> --
> Tom
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] image-board: fix wrong implementation ram disk address setup from cmdline
2022-01-17 19:47 ` Tom Rini
2022-01-18 7:28 ` Art Nikpal
@ 2022-01-23 3:32 ` Art Nikpal
2022-01-24 9:26 ` Neil Armstrong
1 sibling, 1 reply; 6+ messages in thread
From: Art Nikpal @ 2022-01-23 3:32 UTC (permalink / raw)
To: Tom Rini
Cc: Simon Glass, Neil Armstrong, Tom Warren, Andre Przywara,
U-Boot Mailing List, u-boot-amlogic, Christian Hewitt,
Artem Lapkin, Nick Xie, Gouwa Wang
On Tue, Jan 18, 2022 at 3:47 AM Tom Rini <trini@konsulko.com> wrote:
>
> On Thu, Nov 25, 2021 at 11:08:59AM +0800, Artem Lapkin wrote:
>
> > 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
> >
> > Signed-off-by: Artem Lapkin <art@khadas.com>
> > Reviewed-by: Simon Glass <sjg@chromium.org>
> > ---
> > V2 changes
> > _ rebase to master
> > _ from https://patchwork.ozlabs.org/project/uboot/patch/20211016051915.4157293-1-art@khadas.com/
> > ---
> > boot/image-board.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/boot/image-board.c b/boot/image-board.c
> > index bf8817165c..87a8f07432 100644
> > --- a/boot/image-board.c
> > +++ b/boot/image-board.c
> > @@ -334,7 +334,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)) {
> > /*
> > @@ -352,13 +352,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) {
>
> I think we still need this? Can you please confirm and if so rebase to
> master again, sorry, thanks!
i have check master which have new commit
621158d106fe53fbb2d786d9d19dff44ad1baf91
no need for this state !!
Author: Tom Rini <trini@konsulko.com>
Date: Mon Dec 20 09:36:32 2021 -0500
Revert "image: Remove #ifdefs from select_ramdisk()"
This reverts commit f33a2c1bd0fb371511a485cac1f182ba50db51be.
This causes a crash on some platforms as seen here:
https://lore.kernel.org/r/f153017b-c41a-0d32-67b9-f288e695f900@baylibre.com/
Reported-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
PS: about crash problem maybe its same reason may be need try apply my
patch and no need reverts commit
f33a2c1bd0fb371511a485cac1f182ba50db51be.
>
> --
> Tom
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] image-board: fix wrong implementation ram disk address setup from cmdline
2022-01-23 3:32 ` Art Nikpal
@ 2022-01-24 9:26 ` Neil Armstrong
0 siblings, 0 replies; 6+ messages in thread
From: Neil Armstrong @ 2022-01-24 9:26 UTC (permalink / raw)
To: Art Nikpal, Tom Rini
Cc: Simon Glass, Tom Warren, Andre Przywara, U-Boot Mailing List,
u-boot-amlogic, Christian Hewitt, Artem Lapkin, Nick Xie,
Gouwa Wang
Hi,
On 23/01/2022 04:32, Art Nikpal wrote:
> On Tue, Jan 18, 2022 at 3:47 AM Tom Rini <trini@konsulko.com> wrote:
>>
>> On Thu, Nov 25, 2021 at 11:08:59AM +0800, Artem Lapkin wrote:
>>
>>> 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
>>>
>>> Signed-off-by: Artem Lapkin <art@khadas.com>
>>> Reviewed-by: Simon Glass <sjg@chromium.org>
>>> ---
>>> V2 changes
>>> _ rebase to master
>>> _ from https://patchwork.ozlabs.org/project/uboot/patch/20211016051915.4157293-1-art@khadas.com/
>>> ---
>>> boot/image-board.c | 6 +++---
>>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/boot/image-board.c b/boot/image-board.c
>>> index bf8817165c..87a8f07432 100644
>>> --- a/boot/image-board.c
>>> +++ b/boot/image-board.c
>>> @@ -334,7 +334,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)) {
>>> /*
>>> @@ -352,13 +352,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) {
>>
>> I think we still need this? Can you please confirm and if so rebase to
>> master again, sorry, thanks!
>
> i have check master which have new commit
> 621158d106fe53fbb2d786d9d19dff44ad1baf91
>
> no need for this state !!
>
> Author: Tom Rini <trini@konsulko.com>
> Date: Mon Dec 20 09:36:32 2021 -0500
>
> Revert "image: Remove #ifdefs from select_ramdisk()"
>
> This reverts commit f33a2c1bd0fb371511a485cac1f182ba50db51be.
>
> This causes a crash on some platforms as seen here:
> https://lore.kernel.org/r/f153017b-c41a-0d32-67b9-f288e695f900@baylibre.com/
>
> Reported-by: Neil Armstrong <narmstrong@baylibre.com>
> Signed-off-by: Tom Rini <trini@konsulko.com>
>
> PS: about crash problem maybe its same reason may be need try apply my
> patch and no need reverts commit
> f33a2c1bd0fb371511a485cac1f182ba50db51be.
Indeed, I missed this fix completely... anyway having a functional release was the most important at that time.
Re-sending "image: Remove #ifdefs from select_ramdisk()" with this fix squashed would be the time now.
Neil
>>
>> --
>> Tom
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-01-24 9:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-25 3:08 [PATCH v2] image-board: fix wrong implementation ram disk address setup from cmdline Artem Lapkin
2021-12-07 15:07 ` Simon Glass
2022-01-17 19:47 ` Tom Rini
2022-01-18 7:28 ` Art Nikpal
2022-01-23 3:32 ` Art Nikpal
2022-01-24 9:26 ` Neil Armstrong
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.