diff options
author | Wolfgang Denk <wd@denx.de> | 2007-08-14 17:38:34 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2007-08-14 17:38:34 +0200 |
commit | 71d67f43dabe8dd8adbe594b6c61944a2d106efa (patch) | |
tree | 1bde64a114fcf249ab7f699bd75d9cd1e7b8bd37 | |
parent | 4ef35e53c693556c54b0c22d6f873de87bade253 (diff) | |
parent | 073e1b509980cefe6f53c2d7fbbcd135df1e3924 (diff) |
Merge with /home/wd/git/u-boot/work
-rw-r--r-- | common/cmd_bootm.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index e19f83e48a..8249dceb4e 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -924,6 +924,15 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag, initrd_end = 0; } +#ifdef CFG_BOOTMAPSZ + /* + * The blob must be within CFG_BOOTMAPSZ, + * so we flag it to be copied if it is + */ + if (of_flat_tree >= (char *)CFG_BOOTMAPSZ) + of_data = of_flat_tree; +#endif + #if defined(CONFIG_OF_LIBFDT) /* move of_flat_tree if needed */ if (of_data) { @@ -931,11 +940,9 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag, ulong of_start, of_len; of_len = be32_to_cpu(fdt_totalsize(of_data)); - /* position on a 4K boundary before the initrd/kbd */ - if (initrd_start) - of_start = initrd_start - of_len; - else - of_start = (ulong)kbd - of_len; + + /* position on a 4K boundary before the kbd */ + of_start = (ulong)kbd - of_len; of_start &= ~(4096 - 1); /* align on page */ debug ("## device tree at 0x%08lX ... 0x%08lX (len=%ld=0x%lX)\n", of_data, of_data + of_len - 1, of_len, of_len); @@ -983,11 +990,9 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag, if (of_data) { ulong of_start, of_len; of_len = ((struct boot_param_header *)of_data)->totalsize; + /* provide extra 8k pad */ - if (initrd_start) - of_start = initrd_start - of_len - 8192; - else - of_start = (ulong)kbd - of_len - 8192; + of_start = (ulong)kbd - of_len - 8192; of_start &= ~(4096 - 1); /* align on page */ debug ("## device tree at 0x%08lX ... 0x%08lX (len=%ld=0x%lX)\n", of_data, of_data + of_len - 1, of_len, of_len); |