summaryrefslogtreecommitdiffstats
path: root/commands
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 /commands
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 'commands')
-rw-r--r--commands/Kconfig86
-rw-r--r--commands/bootm.c12
2 files changed, 8 insertions, 90 deletions
diff --git a/commands/Kconfig b/commands/Kconfig
index 80df4ddec2..64c4fb1608 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -293,7 +293,7 @@ config CMD_BOOT_ORDER
config CMD_BOOT
tristate
- select BOOTM
+ depends on BOOTM
prompt "boot"
help
Select this for booting based on scripts. Unlike the bootm command which
@@ -326,11 +326,10 @@ config CMD_BOOT
-o DTS specify open firmware device tree
-v verbose
-
config CMD_BOOTM
tristate
default y
- select BOOTM
+ depends on BOOTM
select CRC32
select UIMAGE
select UNCOMPRESS
@@ -349,87 +348,6 @@ config CMD_BOOTM
-e OFFS entry point to the image relative to start (0)
-o DTS specify device tree
-
-config CMD_BOOTM_SHOW_TYPE
- bool
- depends on CMD_BOOTM
- prompt "show image information"
- help
- Displays some tags from the uImage:
-
- - OS type
- - architecture,
- - type
- - compression method.
-
-config CMD_BOOTM_VERBOSE
- bool
- prompt "verbose support"
- depends on CMD_BOOTM
- help
- Adds the verbose (-v switch) command line option.
-
-config CMD_BOOTM_INITRD
- bool
- prompt "initial RAM disk (initrd) support"
- depends on CMD_BOOTM
- help
- Adds support for initial RAM disk and this two command line options:
-
- -r INITRD specify an initrd image
- -L ADDR specify initrd load address
-
-config CMD_BOOTM_OFTREE
- bool
- depends on CMD_BOOTM
- select OFTREE
- prompt "device tree (oftree) support"
- help
- Add support to pass a device tree (a.k.a Open Firmware Tree, oftree). Adds
- this command line option:
-
- -o DTS specify device tree
-
-config CMD_BOOTM_OFTREE_UIMAGE
- bool
- prompt "support passing device tree (oftree) uImages"
- depends on CMD_BOOTM_OFTREE
- help
- Support using oftree uImages. Without this only raw oftree
- blobs can be used.
-
-config CMD_BOOTM_AIMAGE
- bool
- prompt "Android image support"
- depends on CMD_BOOTM && ARM
- help
- Support using Android Images.
-
-config CMD_BOOTM_FITIMAGE
- bool
- prompt "FIT image support"
- select FITIMAGE
- depends on CMD_BOOTM && ARM
- help
- Support using Flattened Image Tree (FIT) Images. FIT is an image
- format introduced by U-Boot. A FIT image contains one or multiple
- kernels, device trees and initrds. The FIT image itself is a flattened
- device tree binary. Have a look at the u-boot source tree
- in the "doc/uImage.FIT" folder for more information:
- http://git.denx.de/?p=u-boot.git;a=tree;f=doc/uImage.FIT
-
-config CMD_BOOTM_FITIMAGE_SIGNATURE
- bool
- prompt "support verifying signed FIT images"
- depends on CMD_BOOTM_FITIMAGE
- select FITIMAGE_SIGNATURE
- help
- Support verifying signed FIT images. This requires FIT images
- as described in:
- http://git.denx.de/?p=u-boot.git;a=blob;f=doc/uImage.FIT/signature.txt
- Additionally the barebox device tree needs a /signature node with the
- public key with which the image has been signed.
-
config CMD_BOOTU
tristate
default y
diff --git a/commands/bootm.c b/commands/bootm.c
index bfec62c98b..a46faae3b4 100644
--- a/commands/bootm.c
+++ b/commands/bootm.c
@@ -48,7 +48,7 @@
#define BOOTM_OPTS_COMMON "sca:e:vo:fd"
-#ifdef CONFIG_CMD_BOOTM_INITRD
+#ifdef CONFIG_BOOTM_INITRD
#define BOOTM_OPTS BOOTM_OPTS_COMMON "L:r:"
#else
#define BOOTM_OPTS BOOTM_OPTS_COMMON
@@ -71,7 +71,7 @@ static int do_bootm(int argc, char *argv[])
case 's':
data.verify = BOOTM_VERIFY_SIGNATURE;
break;
-#ifdef CONFIG_CMD_BOOTM_INITRD
+#ifdef CONFIG_BOOTM_INITRD
case 'L':
data.initrd_address = simple_strtoul(optarg, NULL, 0);
break;
@@ -126,7 +126,7 @@ BAREBOX_CMD_HELP_OPT ("-c\t", "hash check image integrity")
BAREBOX_CMD_HELP_OPT ("-s\t", "check signature of image")
BAREBOX_CMD_HELP_OPT ("-d\t", "dry run: check data, but do not run")
BAREBOX_CMD_HELP_OPT ("-f\t", "load images even if type is undetectable")
-#ifdef CONFIG_CMD_BOOTM_INITRD
+#ifdef CONFIG_BOOTM_INITRD
BAREBOX_CMD_HELP_OPT ("-r INITRD","specify an initrd image")
BAREBOX_CMD_HELP_OPT ("-L ADDR\t","specify initrd load address")
#endif
@@ -135,7 +135,7 @@ BAREBOX_CMD_HELP_OPT ("-e OFFS\t","entry point to the image relative to start (0
#ifdef CONFIG_OFTREE
BAREBOX_CMD_HELP_OPT ("-o DTB\t","specify open firmware device tree")
#endif
-#ifdef CONFIG_CMD_BOOTM_VERBOSE
+#ifdef CONFIG_BOOTM_VERBOSE
BAREBOX_CMD_HELP_OPT ("-v\t","verbose")
#endif
BAREBOX_CMD_HELP_END
@@ -144,14 +144,14 @@ BAREBOX_CMD_START(bootm)
.cmd = do_bootm,
BAREBOX_CMD_DESC("boot an application image")
BAREBOX_CMD_OPTS("[-cdf"
-#ifdef CONFIG_CMD_BOOTM_INITRD
+#ifdef CONFIG_BOOTM_INITRD
"rL"
#endif
"ae"
#ifdef CONFIG_OFTREE
"o"
#endif
-#ifdef CONFIG_CMD_BOOTM_VERBOSE
+#ifdef CONFIG_BOOTM_VERBOSE
"v"
#endif
"] IMAGE")