summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-12-06 09:00:45 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2011-12-15 11:07:15 +0100
commite90f67881e2fcebf4b030b5a96f92d1e5efe5559 (patch)
tree81eda46c65c720649e93401d26becdf174e7bb2f /commands
parent1d1618a11b33f3c88b5e9f52b3b4c38199eedec0 (diff)
downloadbarebox-e90f67881e2fcebf4b030b5a96f92d1e5efe5559.tar.gz
barebox-e90f67881e2fcebf4b030b5a96f92d1e5efe5559.tar.xz
remove now obsolete iminfo command
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r--commands/Kconfig6
-rw-r--r--commands/Makefile1
-rw-r--r--commands/iminfo.c71
3 files changed, 0 insertions, 78 deletions
diff --git a/commands/Kconfig b/commands/Kconfig
index fc37971288..6d5959106b 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -332,12 +332,6 @@ config CMD_BOOTM_OFTREE_UIMAGE
Support using oftree uImages. Without this only raw oftree
blobs can be used.
-config CMD_IMINFO
- bool
- prompt "iminfo"
- help
- Show information about uImages
-
config CMD_UIMAGE
tristate
prompt "uimage"
diff --git a/commands/Makefile b/commands/Makefile
index 01cd1a2e74..24753be80d 100644
--- a/commands/Makefile
+++ b/commands/Makefile
@@ -1,5 +1,4 @@
obj-$(CONFIG_CMD_BOOTM) += bootm.o
-obj-$(CONFIG_CMD_IMINFO) += iminfo.o
obj-$(CONFIG_CMD_UIMAGE) += uimage.o
obj-$(CONFIG_CMD_LINUX16) += linux16.o
obj-$(CONFIG_CMD_LOADB) += loadb.o xyzModem.o
diff --git a/commands/iminfo.c b/commands/iminfo.c
deleted file mode 100644
index 2fde9bc09c..0000000000
--- a/commands/iminfo.c
+++ /dev/null
@@ -1,71 +0,0 @@
-#include <common.h>
-#include <command.h>
-#include <image.h>
-#include <fs.h>
-#include <malloc.h>
-#include <fcntl.h>
-#include <errno.h>
-
-static int image_info(image_header_t *hdr)
-{
- u32 len, checksum;
-
- if (image_get_magic(hdr) != IH_MAGIC) {
- puts (" Bad Magic Number\n");
- return 1;
- }
-
- len = image_get_header_size();
-
- checksum = image_get_hcrc(hdr);
- hdr->ih_hcrc = 0;
-
- if (crc32 (0, hdr, len) != checksum) {
- puts (" Bad Header Checksum\n");
- return 1;
- }
-
- image_print_contents(hdr, NULL);
-
- return 0;
-}
-
-static int do_iminfo(struct command *cmdtp, int argc, char *argv[])
-{
- int rcode = 1;
- int fd;
- int ret;
- image_header_t hdr;
-
- if (argc != 2)
- return COMMAND_ERROR_USAGE;
-
- fd = open(argv[1], O_RDONLY);
- if (fd < 0) {
- perror("open");
- return 1;
- }
-
- ret = read(fd, &hdr, sizeof(image_header_t));
- if (ret != sizeof(image_header_t))
- goto err_out;
-
- printf("Image at %s:\n", argv[1]);
- image_info(&hdr);
-
-err_out:
- close(fd);
-
- return rcode;
-}
-
-BAREBOX_CMD_HELP_START(iminfo)
-BAREBOX_CMD_HELP_USAGE("iminfo\n")
-BAREBOX_CMD_HELP_SHORT("Print header information for an application image.\n")
-BAREBOX_CMD_HELP_END
-
-BAREBOX_CMD_START(iminfo)
- .cmd = do_iminfo,
- .usage = "print header information for an application image",
- BAREBOX_CMD_HELP(cmd_iminfo_help)
-BAREBOX_CMD_END