summaryrefslogtreecommitdiffstats
path: root/common/bootm.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-05-10 14:51:55 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-05-10 14:51:58 +0200
commit7839011f61c02b42b44e540dfb18464f4bb79fba (patch)
treee80f59c4ca1d7a7ee9b9a24941212ef4375bcbd1 /common/bootm.c
parentece204a8acea2ae5f4343fef28e9e987a133e9ea (diff)
downloadbarebox-7839011f61c02b42b44e540dfb18464f4bb79fba.tar.gz
barebox-7839011f61c02b42b44e540dfb18464f4bb79fba.tar.xz
bootm: Move bootm options to common/Kconfig
bootm has a C API, so the bootm options have to depend on the option providing the bootm code (CONFIG_BOOTM), not on the option providing the command (CONFIG_CMD_BOOTM). Fixing the dependencies makes it possible to fully use bootm from C without enabling the bootm command support. This also removes the CMD_ prefix from the options which means we have to update the defconfigs aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/bootm.c')
-rw-r--r--common/bootm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/bootm.c b/common/bootm.c
index cad8c73efe..b74b922aaa 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -142,7 +142,7 @@ int bootm_load_os(struct image_data *data, unsigned long load_address)
bool bootm_has_initrd(struct image_data *data)
{
- if (!IS_ENABLED(CONFIG_CMD_BOOTM_INITRD))
+ if (!IS_ENABLED(CONFIG_BOOTM_INITRD))
return false;
if (data->os_fit && data->os_fit->initrd)
@@ -196,7 +196,7 @@ int bootm_load_initrd(struct image_data *data, unsigned long load_address)
enum filetype type;
int ret;
- if (!IS_ENABLED(CONFIG_CMD_BOOTM_INITRD))
+ if (!IS_ENABLED(CONFIG_BOOTM_INITRD))
return -ENOSYS;
if (!bootm_has_initrd(data))
@@ -274,7 +274,7 @@ static int bootm_open_oftree_uimage(struct image_data *data, size_t *size,
printf("Loading devicetree from '%s'@%d\n", oftree, num);
- if (!IS_ENABLED(CONFIG_CMD_BOOTM_OFTREE_UIMAGE))
+ if (!IS_ENABLED(CONFIG_BOOTM_OFTREE_UIMAGE))
return -EINVAL;
if (!strcmp(data->os_file, oftree)) {
@@ -651,7 +651,7 @@ static int bootm_init(void)
globalvar_add_simple("bootm.image.loadaddr", NULL);
globalvar_add_simple("bootm.oftree", NULL);
globalvar_add_simple_bool("bootm.appendroot", &bootm_appendroot);
- if (IS_ENABLED(CONFIG_CMD_BOOTM_INITRD)) {
+ if (IS_ENABLED(CONFIG_BOOTM_INITRD)) {
globalvar_add_simple("bootm.initrd", NULL);
globalvar_add_simple("bootm.initrd.loadaddr", NULL);
}