u-boot-amlogic.groups.io archive mirror
 help / color / mirror / Atom feed
From: Art Nikpal <email2tema@gmail.com>
To: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Tom Warren <TWarren@nvidia.com>,
	Andre Przywara <andre.przywara@arm.com>,
	U-Boot Mailing List <u-boot@lists.denx.de>,
	u-boot-amlogic@groups.io, Artem Lapkin <art@khadas.com>,
	Nick Xie <nick@khadas.com>, Gouwa Wang <gouwa@khadas.com>
Subject: Re: [PATCH] image-board: fix wrong implementation ram disk address setup from cmdline
Date: Mon, 1 Nov 2021 14:52:20 +0800	[thread overview]
Message-ID: <CAKaHn9+vAobcypVrBrG5t1gppFDLsSbWrzogdW_t305P5EbJxQ@mail.gmail.com> (raw)
In-Reply-To: <ADMAagBDICVLCaddIATUA4rw.9.1635724039413.Hmail.art@khadas.com>

hi Simon

> Fixes: f33a2c1bd0f ("image: Remove #ifdefs from select_ramdisk()")
> (I believe, can you confirm?)

confirm f33a2c1bd0f has wrong implementation logic for raw ramdisk image
sure i have tested it ...

On Mon, Nov 1, 2021 at 7:47 AM Simon Glass <sjg@chromium.org> wrote:
>
> Hi Artem,
>
> On Fri, 15 Oct 2021 at 23:19, 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
> >
> > 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(-)
>
> Fixes: f33a2c1bd0f ("image: Remove #ifdefs from select_ramdisk()")
>
> (I believe, can you confirm?)
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
>
>
> >
> > 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
> >

      parent reply	other threads:[~2021-11-01  6:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20211016051915.4157293-1-art@khadas.com>
2021-10-31 23:47 ` [PATCH] image-board: fix wrong implementation ram disk address setup from cmdline Simon Glass
     [not found] ` <ADMAagBDICVLCaddIATUA4rw.9.1635724039413.Hmail.art@khadas.com>
2021-11-01  6:52   ` Art Nikpal [this message]

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=CAKaHn9+vAobcypVrBrG5t1gppFDLsSbWrzogdW_t305P5EbJxQ@mail.gmail.com \
    --to=email2tema@gmail.com \
    --cc=TWarren@nvidia.com \
    --cc=andre.przywara@arm.com \
    --cc=art@khadas.com \
    --cc=gouwa@khadas.com \
    --cc=narmstrong@baylibre.com \
    --cc=nick@khadas.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot-amlogic@groups.io \
    --cc=u-boot@lists.denx.de \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).