From 4df23e58a460cf246f9e76f79d572182d9d0f9bd Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 2 Dec 2019 10:52:31 -0500 Subject: blk: Make use of CONFIG_HAVE_BLOCK_DEVICE more When we do not have CONFIG_BLK (or SPL/TPL) enabled there are very few cases where we need the blk_legacy code linked in. To catch these, build when we have CONFIG_HAVE_BLOCK_DEVICE set. In addition, we only need cmd/blk_common.o to be linked in when we have CONFIG_HAVE_BLOCK_DEVICE set, so make use of that directly. Signed-off-by: Tom Rini --- cmd/Makefile | 2 +- cmd/blk_common.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'cmd') diff --git a/cmd/Makefile b/cmd/Makefile index 2d723ea0f07..f823d16755e 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -15,7 +15,7 @@ obj-$(CONFIG_CMD_AES) += aes.o obj-$(CONFIG_CMD_AB_SELECT) += ab_select.o obj-$(CONFIG_CMD_ADC) += adc.o obj-$(CONFIG_CMD_ARMFLASH) += armflash.o -obj-y += blk_common.o +obj-$(CONFIG_HAVE_BLOCK_DEVICE) += blk_common.o obj-$(CONFIG_CMD_SOURCE) += source.o obj-$(CONFIG_CMD_BCB) += bcb.o obj-$(CONFIG_CMD_BDI) += bdinfo.o diff --git a/cmd/blk_common.c b/cmd/blk_common.c index cee25a0d410..c5514cf8f8e 100644 --- a/cmd/blk_common.c +++ b/cmd/blk_common.c @@ -11,7 +11,6 @@ #include #include -#ifdef CONFIG_HAVE_BLOCK_DEVICE int blk_common_cmd(int argc, char * const argv[], enum if_type if_type, int *cur_devnump) { @@ -96,4 +95,3 @@ int blk_common_cmd(int argc, char * const argv[], enum if_type if_type, } } } -#endif -- cgit v1.3.1 From ca326781b4e91ba0a4beaacc6c86b1e1236d7628 Mon Sep 17 00:00:00 2001 From: Abhishek Shah Date: Mon, 18 Nov 2019 16:41:49 -0800 Subject: cmd: pxe: Fix bootm argument count pxe command parses the init ramfs address(through initrd lable in pxe config file), but is not passing it to bootm command as argument as bootm_argc count is not increased. Signed-off-by: Abhishek Shah Signed-off-by: Vladimir Olovyannikov Reviewed-by: Simon Glass --- cmd/pxe.c | 1 + 1 file changed, 1 insertion(+) (limited to 'cmd') diff --git a/cmd/pxe.c b/cmd/pxe.c index 20599754462..768e50aba61 100644 --- a/cmd/pxe.c +++ b/cmd/pxe.c @@ -663,6 +663,7 @@ static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label) strncpy(bootm_argv[2], env_get("ramdisk_addr_r"), 18); strcat(bootm_argv[2], ":"); strncat(bootm_argv[2], env_get("filesize"), 9); + bootm_argc = 3; } if (get_relfile_envaddr(cmdtp, label->kernel, "kernel_addr_r") < 0) { -- cgit v1.3.1