cmd: Make bootvx independent of bootelf
There are lots of usecases for running baremetal ELF binaries via bootelf but if you enable bootelf you get bootvx as well and you probably don't want or need it. Hide bootvx behind it's own configuration option. Signed-off-by: Daniel Palmer <daniel@0x0f.com>
This commit is contained in:
11
cmd/Kconfig
11
cmd/Kconfig
@@ -498,11 +498,18 @@ config CMD_CEDIT
|
|||||||
loading and saving of configuration as well as showing an editor.
|
loading and saving of configuration as well as showing an editor.
|
||||||
|
|
||||||
config CMD_ELF
|
config CMD_ELF
|
||||||
bool "bootelf, bootvx"
|
bool "bootelf"
|
||||||
default y
|
default y
|
||||||
select LIB_ELF
|
select LIB_ELF
|
||||||
help
|
help
|
||||||
Boot an ELF/vxWorks image from the memory.
|
Boot an ELF image from memory.
|
||||||
|
|
||||||
|
config CMD_ELF_BOOTVX
|
||||||
|
bool "bootvx"
|
||||||
|
default y
|
||||||
|
depends on CMD_ELF
|
||||||
|
help
|
||||||
|
Boot a vxWorks image from memory
|
||||||
|
|
||||||
config CMD_ELF_FDT_SETUP
|
config CMD_ELF_FDT_SETUP
|
||||||
bool "Flattened Device Tree setup in bootelf cmd"
|
bool "Flattened Device Tree setup in bootelf cmd"
|
||||||
|
@@ -10,8 +10,10 @@
|
|||||||
#include <env.h>
|
#include <env.h>
|
||||||
#include <image.h>
|
#include <image.h>
|
||||||
#include <log.h>
|
#include <log.h>
|
||||||
|
#ifdef CONFIG_CMD_ELF_BOOTVX
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
#include <vxworks.h>
|
#include <vxworks.h>
|
||||||
|
#endif
|
||||||
#ifdef CONFIG_X86
|
#ifdef CONFIG_X86
|
||||||
#include <vesa.h>
|
#include <vesa.h>
|
||||||
#include <asm/cache.h>
|
#include <asm/cache.h>
|
||||||
@@ -100,6 +102,7 @@ int do_bootelf(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
|||||||
return rcode;
|
return rcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_CMD_ELF_BOOTVX
|
||||||
/*
|
/*
|
||||||
* Interpreter command to boot VxWorks from a memory image. The image can
|
* Interpreter command to boot VxWorks from a memory image. The image can
|
||||||
* be either an ELF image or a raw binary. Will attempt to setup the
|
* be either an ELF image or a raw binary. Will attempt to setup the
|
||||||
@@ -307,6 +310,7 @@ int do_bootvx(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
|||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
U_BOOT_CMD(
|
U_BOOT_CMD(
|
||||||
bootelf, CONFIG_SYS_MAXARGS, 0, do_bootelf,
|
bootelf, CONFIG_SYS_MAXARGS, 0, do_bootelf,
|
||||||
@@ -323,8 +327,10 @@ U_BOOT_CMD(
|
|||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#ifdef CONFIG_CMD_ELF_BOOTVX
|
||||||
U_BOOT_CMD(
|
U_BOOT_CMD(
|
||||||
bootvx, 2, 0, do_bootvx,
|
bootvx, 2, 0, do_bootvx,
|
||||||
"Boot vxWorks from an ELF image",
|
"Boot vxWorks from an ELF image",
|
||||||
" [address] - load address of vxWorks ELF image."
|
" [address] - load address of vxWorks ELF image."
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
Reference in New Issue
Block a user