diff mbox

[U-Boot,v1,2/6] ARM: bootm: Try to use relocated ramdisk

Message ID 1451893823-20309-3-git-send-email-jeffy.chen@rock-chips.com
State Superseded
Delegated to: Simon Glass
Headers show

Commit Message

Jeffy Chen Jan. 4, 2016, 7:50 a.m. UTC
After boot_ramdisk_high(), ramdisk would be relocated to
initrd_start & initrd_end, so use them instead of rd_start & rd_end.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---

 arch/arm/lib/bootm.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Simon Glass Jan. 8, 2016, 3:34 a.m. UTC | #1
Hi Jeffy,

On 4 January 2016 at 00:50, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
> After boot_ramdisk_high(), ramdisk would be relocated to
> initrd_start & initrd_end, so use them instead of rd_start & rd_end.
>
> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
> ---
>
>  arch/arm/lib/bootm.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
> index a477cae..ac94995 100644
> --- a/arch/arm/lib/bootm.c
> +++ b/arch/arm/lib/bootm.c
> @@ -225,7 +225,10 @@ static void boot_prep_linux(bootm_headers_t *images)
>                 if (BOOTM_ENABLE_MEMORY_TAGS)
>                         setup_memory_tags(gd->bd);
>                 if (BOOTM_ENABLE_INITRD_TAG) {
> -                       if (images->rd_start && images->rd_end) {
> +                       if (images->initrd_start && images->initrd_end) {
> +                               setup_initrd_tag(gd->bd, images->initrd_start,
> +                                                images->initrd_end);
> +                       } else if (images->rd_start && images->rd_end) {

Can you please add comments to these members (initrd_start/end) in
image.h? At present it is not clear what they are, compared to
rd_start/end.

>                                 setup_initrd_tag(gd->bd, images->rd_start,
>                                                  images->rd_end);
>                         }
> --
> 2.1.4
>
>

Regards,
Simon
diff mbox

Patch

diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index a477cae..ac94995 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -225,7 +225,10 @@  static void boot_prep_linux(bootm_headers_t *images)
 		if (BOOTM_ENABLE_MEMORY_TAGS)
 			setup_memory_tags(gd->bd);
 		if (BOOTM_ENABLE_INITRD_TAG) {
-			if (images->rd_start && images->rd_end) {
+			if (images->initrd_start && images->initrd_end) {
+				setup_initrd_tag(gd->bd, images->initrd_start,
+						 images->initrd_end);
+			} else if (images->rd_start && images->rd_end) {
 				setup_initrd_tag(gd->bd, images->rd_start,
 						 images->rd_end);
 			}