mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH v1 2/3] lib: bootstrap: detect SD card before mounting
Date: Thu, 3 Jan 2019 06:46:47 +0100	[thread overview]
Message-ID: <20190103054647.GA4625@ravnborg.org> (raw)
In-Reply-To: <CAHQ1cqFcXt7Vg7qJB=o1nwKOzW8FC=s3YNaKTcF8jA1BXC7jxQ@mail.gmail.com>

Hi Andrey.

> > To support bootstrap from SD card run a detect all before
> > mounting the SD card.
> >
> > Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> > ---
> >  lib/bootstrap/disk.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/lib/bootstrap/disk.c b/lib/bootstrap/disk.c
> > index fd016166e..77be95c2f 100644
> > --- a/lib/bootstrap/disk.c
> > +++ b/lib/bootstrap/disk.c
> > @@ -21,6 +21,8 @@ void* bootstrap_read_disk(const char *dev, const char *fstype)
> >         size_t len;
> >         const char *path = "/";
> >
> > +       device_detect_all();
> > +
> 
> Can device_detect_by_name(dev) be used here instead?

dev equals "disk0.0" when we call bootstrap_read_disk().
Calling device_detect_by_name("disk0.0") did not work, and then
the easy solution with device_detect_all() worked.

I could pass the dev name to bootstrap_read_disk() but
this would make the caller less general which is why I ended
up with the more brutal solution.

	Sam

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2019-01-03  5:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-02 20:26 [PATCH v1 0/3] bootstrap support for AT91SAM9263-EK Sam Ravnborg
2019-01-02 20:26 ` [PATCH v1 1/3] arm: at91: fix clock to mci1 for at91sam9263 Sam Ravnborg
2019-01-06 20:39   ` Sam Ravnborg
2019-01-07  7:29   ` Sascha Hauer
2019-01-02 20:26 ` [PATCH v1 2/3] lib: bootstrap: detect SD card before mounting Sam Ravnborg
2019-01-02 23:32   ` Andrey Smirnov
2019-01-03  5:46     ` Sam Ravnborg [this message]
2019-01-03 19:53       ` Sam Ravnborg
2019-01-04  7:46         ` Sascha Hauer
2019-01-06 20:39           ` Sam Ravnborg
2019-01-02 20:26 ` [PATCH v1 3/3] at91sam9263ek: add bootstrap support Sam Ravnborg
2019-01-03  8:16   ` Sascha Hauer
2019-01-03 10:58     ` Sam Ravnborg
2019-01-03 21:00       ` Sam Ravnborg
2019-01-04  7:37         ` Sascha Hauer

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=20190103054647.GA4625@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=andrew.smirnov@gmail.com \
    --cc=barebox@lists.infradead.org \
    /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