public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [RFC PATCH] bootm: fix ramdisk relocation
@ 2016-10-06 21:08 Cédric Le Goater
  2016-10-08 13:44 ` Tom Rini
  0 siblings, 1 reply; 3+ messages in thread
From: Cédric Le Goater @ 2016-10-06 21:08 UTC (permalink / raw)
  To: u-boot

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(+)

Index: u-boot-v2016.09-aspeed-openbmc.git/cmd/bootm.c
===================================================================
--- u-boot-v2016.09-aspeed-openbmc.git.orig/cmd/bootm.c
+++ u-boot-v2016.09-aspeed-openbmc.git/cmd/bootm.c
@@ -126,6 +126,9 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag,
 	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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [RFC PATCH] bootm: fix ramdisk relocation
  2016-10-06 21:08 [U-Boot] [RFC PATCH] bootm: fix ramdisk relocation Cédric Le Goater
@ 2016-10-08 13:44 ` Tom Rini
  2016-10-09 22:03   ` Cédric Le Goater
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Rini @ 2016-10-08 13:44 UTC (permalink / raw)
  To: u-boot

On Thu, Oct 06, 2016 at 11:08:55PM +0200, C?dric Le Goater 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 suspect that you want to have bootm_size set in your environment so
that all relocations happen within that value and will remain visible to
the kernel.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161008/41d5fb0c/attachment.sig>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [RFC PATCH] bootm: fix ramdisk relocation
  2016-10-08 13:44 ` Tom Rini
@ 2016-10-09 22:03   ` Cédric Le Goater
  0 siblings, 0 replies; 3+ messages in thread
From: Cédric Le Goater @ 2016-10-09 22:03 UTC (permalink / raw)
  To: u-boot

Hello,

On 10/08/2016 03:44 PM, Tom Rini wrote:
> On Thu, Oct 06, 2016 at 11:08:55PM +0200, C?dric Le Goater 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 suspect that you want to have bootm_size set in your environment so
> that all relocations happen within that value and will remain visible to
> the kernel.

Well, I am discovering the code so I might be wrong in the way it should 
be used. 

boot_ramdisk_high() does the copy to ram and relocation but it is not 
called as we are booting using ATAGS and a legacy image. This patch 
enables the copy but even in that case the load address of the image is 
not used, which can be a problem for the linux memblocks after boot. 

So I am wondering if we should put some effort to fix this scenario. 
Or is it totally wrong and in that case, should we be using some other 
mechanism ?

Thanks,

C.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-09 22:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-06 21:08 [U-Boot] [RFC PATCH] bootm: fix ramdisk relocation Cédric Le Goater
2016-10-08 13:44 ` Tom Rini
2016-10-09 22:03   ` Cédric Le Goater

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox