diff mbox

[u-boot,11/12] bootm: fix ramdisk relocation

Message ID 1475789205-19618-12-git-send-email-clg@kaod.org
State Accepted, archived
Headers show

Commit Message

Cédric Le Goater Oct. 6, 2016, 9:26 p.m. UTC
We are working on bringing to mainline a set of changes adding support
for the Aspeed SoC and we have a couple of work around we are trying
to elimitate first. This is one of them. The ramdisk is not relocated
and Linux fails to boot. The current port does not use a device tree
(yet) so that might be the most obvious culprit.

Thanks

Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 cmd/bootm.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Joel Stanley Oct. 10, 2016, 6:23 a.m. UTC | #1
On Fri, Oct 7, 2016 at 8:26 AM, Cédric Le Goater <clg@kaod.org> wrote:
> We are working on bringing to mainline a set of changes adding support
> for the Aspeed SoC and we have a couple of work around we are trying
> to elimitate first. This is one of them. The ramdisk is not relocated
> and Linux fails to boot. The current port does not use a device tree
> (yet) so that might be the most obvious culprit.
>
> Thanks
>
> Signed-off-by: Cédric Le Goater <clg@kaod.org>

I see you're chatting with upstream about this one.

Do you want me to include this in our tree for now, or wait for the
outcome of those discussions?

Cheers,

Joel
Cédric Le Goater Oct. 10, 2016, 7:41 a.m. UTC | #2
On 10/10/2016 08:23 AM, Joel Stanley wrote:
> On Fri, Oct 7, 2016 at 8:26 AM, Cédric Le Goater <clg@kaod.org> wrote:
>> We are working on bringing to mainline a set of changes adding support
>> for the Aspeed SoC and we have a couple of work around we are trying
>> to elimitate first. This is one of them. The ramdisk is not relocated
>> and Linux fails to boot. The current port does not use a device tree
>> (yet) so that might be the most obvious culprit.
>>
>> Thanks
>>
>> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> 
> I see you're chatting with upstream about this one.
> 
> Do you want me to include this in our tree for now, or wait for the
> outcome of those discussions?

Let's wait. The current hack does exactly what Linux needs, which 
is to load the ramdisk at the load address of the ramdisk image. 

This patch enables loading but on some occasion, the ramdisk can be 
loaded in conflicting memblocks for Linux, which then disables 
INITRD ... So we need to do better than that.


C.
diff mbox

Patch

diff --git a/cmd/bootm.c b/cmd/bootm.c
index e02a1c54b70c..9184fd379f95 100644
--- a/cmd/bootm.c
+++ b/cmd/bootm.c
@@ -126,6 +126,9 @@  int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return do_bootm_states(cmdtp, flag, argc, argv, BOOTM_STATE_START |
 		BOOTM_STATE_FINDOS | BOOTM_STATE_FINDOTHER |
 		BOOTM_STATE_LOADOS |
+#ifdef CONFIG_SYS_BOOT_RAMDISK_HIGH
+		BOOTM_STATE_RAMDISK |
+#endif
 #if defined(CONFIG_PPC) || defined(CONFIG_MIPS)
 		BOOTM_STATE_OS_CMDLINE |
 #endif