summaryrefslogtreecommitdiffstats
path: root/common/image.c
diff options
context:
space:
mode:
authorRick Altherr <raltherr@google.com>2016-12-07 10:06:35 -0800
committerJoel Stanley <joel@jms.id.au>2016-12-08 10:17:25 +1100
commit6b26bf14ae6eb982203b9e6491e8a630a690d963 (patch)
tree656c1d70aee8782b1d8b5eda35fbe3eaa9824330 /common/image.c
parent207efe13a7e6eb52faf33efc52a4650a10afa27d (diff)
downloadtalos-obmc-uboot-6b26bf14ae6eb982203b9e6491e8a630a690d963.tar.gz
talos-obmc-uboot-6b26bf14ae6eb982203b9e6491e8a630a690d963.zip
bootm: relocate ramdisk if CONFIG_SYS_BOOT_RAMDISK_HIGH set
In 35fc84f, bootm was refactored so plain 'bootm' and 'bootm <subcommand>' shared a common implementation. The 'bootm ramdisk' command implementation is now part of the common implementation but not invoke by plain 'bootm' since the original implementation never did ramdisk relocation. Instead, ramdisk relocation happened in image_setup_linux() which is typically called during the OS portion of 'bootm'. On ARM, parameters to the Linux kernel can either be passed by FDT or ATAGS. When using FDT, image_setup_linux() is called which also triggers ramdisk relocation. When using ATAGS, image_setup_linux() is _not_ called because it mostly does FDT setup. Instead of calling image_setup_linux() in both FDT and ATAGS cases, include BOOTM_STATE_RAMDISK in the requested states during a plain 'bootm' if CONFIG_SYS_BOOT_RAMDISK_HIGH is set and remove the ramdisk relocation from image_setup_linux(). This causes ramdisk relocation to happen on any system where CONFIG_SYS_BOOT_RAMDISK_HIGH regardless of the OS being booted. Also remove IMAGE_ENABLE_RAMDISK_HIGH as it was only used by the now-removed code from image_setup_linux(). Signed-off-by: Rick Altherr <raltherr@google.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'common/image.c')
-rw-r--r--common/image.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/common/image.c b/common/image.c
index 0be09e5c63..f9ee9d5fec 100644
--- a/common/image.c
+++ b/common/image.c
@@ -1453,10 +1453,7 @@ int image_setup_linux(bootm_headers_t *images)
{
ulong of_size = images->ft_len;
char **of_flat_tree = &images->ft_addr;
- ulong *initrd_start = &images->initrd_start;
- ulong *initrd_end = &images->initrd_end;
struct lmb *lmb = &images->lmb;
- ulong rd_len;
int ret;
if (IMAGE_ENABLE_OF_LIBFDT)
@@ -1470,13 +1467,6 @@ int image_setup_linux(bootm_headers_t *images)
return ret;
}
}
- if (IMAGE_ENABLE_RAMDISK_HIGH) {
- rd_len = images->rd_end - images->rd_start;
- ret = boot_ramdisk_high(lmb, images->rd_start, rd_len,
- initrd_start, initrd_end);
- if (ret)
- return ret;
- }
if (IMAGE_ENABLE_OF_LIBFDT) {
ret = boot_relocate_fdt(lmb, of_flat_tree, &of_size);
OpenPOWER on IntegriCloud