From: fuz at fuz.su <fuz@fuz.su>
To: u-boot@lists.denx.de
Subject: [U-Boot] Apparent conflict between CONFIG_BLK and CONFIG_API
Date: Mon, 13 Mar 2017 14:51:54 +0100 [thread overview]
Message-ID: <20170313135154.GA15546@fuz.su> (raw)
In-Reply-To: <CAPnjgZ2PeTPQhjV6E0C7BQLEUCz955UE+LtArp=G=DTPdNaVyg@mail.gmail.com>
Hello Simon,
CONFIG_BLK is set by default for all Rockchip boards. Turning it off was
the first thing I tried, but I actually wasn't able to figure out how to
turn it off at all and was then advised elsewhere that this is probably
not a good idea either.
Yours,
Robert Clausecker
On Mon, Mar 13, 2017 at 06:33:16AM -0600, Simon Glass wrote:
> Hi,
>
> On 7 March 2017 at 14:53, <fuz@fuz.su> wrote:
> > Good evening,
> >
> > I am trying to port FreeBSD to the ASUS Tinker Board, a computer based
> > on the Rockchip 3288 SoC. FreeBSD's boot loader (named loader(8)) needs
> > CONFIG_API to be enabled, but trying to build an U-Boot from trunk with
> > both CONFIG_API and CONFIG_BLK (as required for Rockchip SoC's?) leads
> > to the following build failure:
> >
> > $ CROSS_COMPILE=arm-none-eabi- gmake tinker-rk3288_defconfig all
> > ...
> > CC api/api_storage.o
> > api/api_storage.c: In function 'dev_read_stor':
> > api/api_storage.c:334:9: error: 'struct blk_desc' has no member named 'block_read'
> > if ((dd->block_read) == NULL) {
> > ^~
> > api/api_storage.c:339:11: error: 'struct blk_desc' has no member named 'block_read'
> > return dd->block_read(dd, start, len, buf);
> > ^~
> > api/api_storage.c:340:1: warning: control reaches end of non-void function [-Wreturn-type]
> > }
> > ^
> > gmake[2]: *** [scripts/Makefile.build:281: api/api_storage.o] Fehler 1
> > gmake[1]: *** [Makefile:1229: api] Fehler 2
> > gmake: *** [Makefile:460: __build_one_by_one] Error 2
> >
> > I applied the following fix, but the product doesn't boot. Perhaps
> > that's not a property of the fix though:
> >
> > diff --git a/api/api_storage.c b/api/api_storage.c
> > index e80818df1c..815ed1128d 100644
> > --- a/api/api_storage.c
> > +++ b/api/api_storage.c
> > @@ -331,10 +331,14 @@ lbasize_t dev_read_stor(void *cookie, void *buf, lbasize_t len, lbastart_t start
> > if (!dev_stor_is_valid(type, dd))
> > return 0;
> >
> > +#ifdef CONFIG_BLK
> > + return blk_dread(dd, start, len, buf);
> > +#else
> > if ((dd->block_read) == NULL) {
> > debugf("no block_read() for device 0x%08x\n", cookie);
> > return 0;
> > }
> >
> > return dd->block_read(dd, start, len, buf);
> > +#endif /* defined(CONFIG_BLK) */
>
> This fix looks right to me. There may be something else wrong. I have
> not used API very much but it might be worth checking if the board
> boots OK without CONFIG_BLK?
>
> > }
> >
> > Yours,
> > Robert Clausecker
> >
> > --
> > () ascii ribbon campaign - for an 8-bit clean world
> > /\ - against html email - against proprietary attachments
> > _______________________________________________
> > U-Boot mailing list
> > U-Boot at lists.denx.de
> > https://lists.denx.de/listinfo/u-boot
>
> Regards,
> Simon
--
() ascii ribbon campaign - for an 8-bit clean world
/\ - against html email - against proprietary attachments
next prev parent reply other threads:[~2017-03-13 13:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-07 21:53 [U-Boot] Apparent conflict between CONFIG_BLK and CONFIG_API fuz at fuz.su
2017-03-13 12:33 ` Simon Glass
2017-03-13 13:51 ` fuz at fuz.su [this message]
2017-03-13 20:46 ` Simon Glass
2017-04-09 1:14 ` Tom Rini
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=20170313135154.GA15546@fuz.su \
--to=fuz@fuz.su \
--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