diff options
-rw-r--r-- | Makefile | 11 | ||||
-rw-r--r-- | drivers/block/sandbox.c | 8 |
2 files changed, 11 insertions, 8 deletions
@@ -635,8 +635,9 @@ ifeq ($(config-targets),1) # Read arch specific Makefile to set KBUILD_DEFCONFIG as needed. # KBUILD_DEFCONFIG may point out an alternative default configuration # used for 'make defconfig' -# Modified for U-Boot --include arch/$(SRCARCH)/Makefile +# Modified for U-Boot: we don't include arch/$(SRCARCH)/Makefile for config +# targets, which is useless since U-Boot has no architecture defining its own +# KBUILD_{DEF,K}CONFIG, or CROSS_COMPILE. export KBUILD_DEFCONFIG KBUILD_KCONFIG CC_VERSION_TEXT config: scripts_basic outputmakefile FORCE @@ -724,8 +725,10 @@ endif ARCH_CPPFLAGS := ARCH_AFLAGS := ARCH_CFLAGS := -# Modified for U-Boot --include arch/$(SRCARCH)/Makefile +# Modified for U-Boot: we put off the include of arch/$(SRCARCH)/Makefile until +# making sure include/config/auto.conf is up-to-date and include of config.mk, +# because the architecture-specific Makefile may make use of variables defined +# in config.mk. See also the comment about autoconf_is_old. ifeq ($(dot-config),1) ifeq ($(may-sync-config),1) diff --git a/drivers/block/sandbox.c b/drivers/block/sandbox.c index 6c74d66037e..9cb27561a97 100644 --- a/drivers/block/sandbox.c +++ b/drivers/block/sandbox.c @@ -18,7 +18,7 @@ DECLARE_GLOBAL_DATA_PTR; static unsigned long host_block_read(struct udevice *dev, - unsigned long start, lbaint_t blkcnt, + lbaint_t start, lbaint_t blkcnt, void *buffer) { struct blk_desc *desc = dev_get_uclass_plat(dev); @@ -26,7 +26,7 @@ static unsigned long host_block_read(struct udevice *dev, struct host_sb_plat *plat = dev_get_plat(host_dev); if (os_lseek(plat->fd, start * desc->blksz, OS_SEEK_SET) < 0) { - printf("ERROR: Invalid block %lx\n", start); + printf("ERROR: Invalid block " LBAF "\n", start); return -1; } ssize_t len = os_read(plat->fd, buffer, blkcnt * desc->blksz); @@ -37,7 +37,7 @@ static unsigned long host_block_read(struct udevice *dev, } static unsigned long host_block_write(struct udevice *dev, - unsigned long start, lbaint_t blkcnt, + lbaint_t start, lbaint_t blkcnt, const void *buffer) { struct blk_desc *desc = dev_get_uclass_plat(dev); @@ -45,7 +45,7 @@ static unsigned long host_block_write(struct udevice *dev, struct host_sb_plat *plat = dev_get_plat(host_dev); if (os_lseek(plat->fd, start * desc->blksz, OS_SEEK_SET) < 0) { - printf("ERROR: Invalid block %lx\n", start); + printf("ERROR: Invalid block " LBAF "\n", start); return -1; } ssize_t len = os_write(plat->fd, buffer, blkcnt * desc->blksz); |