summaryrefslogtreecommitdiffstats
path: root/arch/arm/lib/armlinux.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/lib/armlinux.c')
-rw-r--r--arch/arm/lib/armlinux.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/arch/arm/lib/armlinux.c b/arch/arm/lib/armlinux.c
index 040fd346bf..7c2cbf95ea 100644
--- a/arch/arm/lib/armlinux.c
+++ b/arch/arm/lib/armlinux.c
@@ -212,7 +212,7 @@ int do_bootm_linux(struct image_data *data)
void (*theKernel)(int zero, int arch, void *params);
image_header_t *os_header = &data->os->header;
- if (os_header->ih_type == IH_TYPE_MULTI) {
+ if (image_check_type(os_header, IH_TYPE_MULTI)) {
printf("Multifile images not handled at the moment\n");
return -1;
}
@@ -227,14 +227,14 @@ int do_bootm_linux(struct image_data *data)
return -1;
}
- theKernel = (void *)ntohl(os_header->ih_ep);
+ theKernel = (void *)image_get_ep(os_header);
debug("## Transferring control to Linux (at address 0x%p) ...\n",
theKernel);
setup_tags();
- if (relocate_image(data->os, (void *)ntohl(os_header->ih_load)))
+ if (relocate_image(data->os, (void *)image_get_load(os_header)))
return -1;
/* we assume that the kernel is in place */
@@ -249,19 +249,29 @@ int do_bootm_linux(struct image_data *data)
static int image_handle_cmdline_parse(struct image_data *data, int opt,
char *optarg)
{
+ int ret = 1;
+
switch (opt) {
case 'a':
armlinux_architecture = simple_strtoul(optarg, NULL, 0);
- return 0;
+ ret = 0;
+ break;
+ case 'R':
+ system_rev = simple_strtoul(optarg, NULL, 0);
+ ret = 0;
+ break;
default:
- return 1;
+ break;
}
+
+ return ret;
}
static struct image_handler handler = {
- .cmdline_options = "a:",
+ .cmdline_options = "a:R:",
.cmdline_parse = image_handle_cmdline_parse,
- .help_string = " -a <arch> use architecture number <arch>",
+ .help_string = " -a <arch> use architecture number <arch>\n"
+ " -R <system_rev> use system revison <system_rev>\n",
.bootm = do_bootm_linux,
.image_type = IH_OS_LINUX,