aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/cmd_bootm.c11
-rw-r--r--include/image.h4
-rw-r--r--lib_m68k/bootm.c2
-rw-r--r--lib_ppc/bootm.c2
-rw-r--r--lib_sparc/bootm.c2
5 files changed, 10 insertions, 11 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 022cef8460a..dc88e6307b6 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -168,20 +168,17 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
phys_size_t mem_size;
int ret;
- struct lmb lmb;
-
memset ((void *)&images, 0, sizeof (images));
images.verify = getenv_yesno ("verify");
- images.lmb = &lmb;
- lmb_init(&lmb);
+ lmb_init(&images.lmb);
mem_start = getenv_bootm_low();
mem_size = getenv_bootm_size();
- lmb_add(&lmb, (phys_addr_t)mem_start, mem_size);
+ lmb_add(&images.lmb, (phys_addr_t)mem_start, mem_size);
- board_lmb_reserve(&lmb);
+ board_lmb_reserve(&images.lmb);
/* get kernel image header, start address and length */
os_hdr = boot_get_kernel (cmdtp, flag, argc, argv,
@@ -387,7 +384,7 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
show_boot_progress (8);
- lmb_reserve(&lmb, load_start, (load_end - load_start));
+ lmb_reserve(&images.lmb, load_start, (load_end - load_start));
switch (os) {
default: /* handled by (original) Linux case */
diff --git a/include/image.h b/include/image.h
index 653cbc6ce37..c1acd7b822f 100644
--- a/include/image.h
+++ b/include/image.h
@@ -229,7 +229,9 @@ typedef struct bootm_headers {
ulong ft_len; /* length of flat device tree */
int verify; /* getenv("verify")[0] != 'n' */
- struct lmb *lmb; /* for memory mgmt */
+#ifndef USE_HOSTCC
+ struct lmb lmb; /* for memory mgmt */
+#endif
} bootm_headers_t;
/*
diff --git a/lib_m68k/bootm.c b/lib_m68k/bootm.c
index 241721dad76..1c3b9c92192 100644
--- a/lib_m68k/bootm.c
+++ b/lib_m68k/bootm.c
@@ -58,7 +58,7 @@ void do_bootm_linux(cmd_tbl_t * cmdtp, int flag,
ulong bootmap_base;
bd_t *kbd;
void (*kernel) (bd_t *, ulong, ulong, ulong, ulong);
- struct lmb *lmb = images->lmb;
+ struct lmb *lmb = &images->lmb;
bootmap_base = getenv_bootm_low();
diff --git a/lib_ppc/bootm.c b/lib_ppc/bootm.c
index a3e632f12fe..b86169a93ba 100644
--- a/lib_ppc/bootm.c
+++ b/lib_ppc/bootm.c
@@ -73,7 +73,7 @@ do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
ulong r7, ulong r8, ulong r9);
int ret;
ulong of_size = images->ft_len;
- struct lmb *lmb = images->lmb;
+ struct lmb *lmb = &images->lmb;
#if defined(CONFIG_OF_LIBFDT)
char *of_flat_tree = images->ft_addr;
diff --git a/lib_sparc/bootm.c b/lib_sparc/bootm.c
index 71d34baaddf..aac05e4b264 100644
--- a/lib_sparc/bootm.c
+++ b/lib_sparc/bootm.c
@@ -93,7 +93,7 @@ void do_bootm_linux(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
unsigned int data, len, checksum;
unsigned int initrd_addr, kernend;
void (*kernel) (struct linux_romvec *, void *);
- struct lmb *lmb = images->lmb;
+ struct lmb *lmb = &images->lmb;
int ret;
if (images->legacy_hdr_valid) {