aboutsummaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorfuz@fuz.su2017-03-07 15:53:17 -0600
committerTom Rini2017-04-08 08:26:48 -0500
commitf2288c5a5b2aa6ce8453725e81ce20361cee854e (patch)
treea1023f7d208ff3b4333b3e71d44769d6f3ba3b5e /api
parent411278b858732ccc12ae48715b3934514c904bd4 (diff)
downloadu-boot-f2288c5a5b2aa6ce8453725e81ce20361cee854e.tar.gz
u-boot-f2288c5a5b2aa6ce8453725e81ce20361cee854e.tar.xz
u-boot-f2288c5a5b2aa6ce8453725e81ce20361cee854e.zip
Apparent conflict between CONFIG_BLK and CONFIG_API
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: Yours, Robert Clausecker
Diffstat (limited to 'api')
-rw-r--r--api/api_storage.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/api/api_storage.c b/api/api_storage.c
index e80818df1c..a5357bc9cf 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
331 if (!dev_stor_is_valid(type, dd)) 331 if (!dev_stor_is_valid(type, dd))
332 return 0; 332 return 0;
333 333
334#ifdef CONFIG_BLK
335 return blk_dread(dd, start, len, buf);
336#else
334 if ((dd->block_read) == NULL) { 337 if ((dd->block_read) == NULL) {
335 debugf("no block_read() for device 0x%08x\n", cookie); 338 debugf("no block_read() for device 0x%08x\n", cookie);
336 return 0; 339 return 0;
337 } 340 }
338 341
339 return dd->block_read(dd, start, len, buf); 342 return dd->block_read(dd, start, len, buf);
343#endif /* defined(CONFIG_BLK) */
340} 344}