All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] How to have U-boot loading U-boot
@ 2015-02-04 14:52 Jean-Christophe Lallemand
  2015-02-04 16:44 ` Wolfgang Denk
  2015-02-05 21:19 ` Rob Herring
  0 siblings, 2 replies; 4+ messages in thread
From: Jean-Christophe Lallemand @ 2015-02-04 14:52 UTC (permalink / raw)
  To: u-boot

Dear all,

I have already used u-boot several times on various ARM-based platforms but I need to go to unknown territories this time.
On an ARM-based platform again, we have a u-boot port (v2010.09) available loaded by a ROM bootloader into the internal RAM.
For some reasons, the ROM bootloader limits the size of the loaded code to 128kB which is a bit short for the functionality needed.

What I'd like to do is have the already available u-boot (say Level-1) to load a second u-boot (say Level-2) into DDR where size is not an issue which will then load Linux.

For the Level-1, I haven't changed anything for now. I'm still using the Linux kernel load address.

For the Level-2, I have found the following interesting configuration flags:
CONFIG_SKIP_LOWLEVEL_INIT -> to suppress the CPU & external RAM initialization that is already done by Level-1
CONFIG_SKIP_RELOCATE_UBOOT -> to avoid the relocation that was not looking interesting in the scope of a Level-2 but is that correct?
TEXT_BASE -> modified to match the kernel load address used in Level-1

I have constructed my Level-2 U-boot image using the same kind of commands as for my kernel but specifying Firmware type
./u-boot/tools/mkimage -A arm -O U-boot -T Firmware -C none -a 70008000 -e 70008000 -n 'u-boot L2' -d ./u-boot/u-boot.bin ./u-boot/u-boot.uImage

When I try to run the loaded Level-2, my board freezes.
I've also tried to hack the bootm command so that my Firmware image is seen as a stand-alone application so that it runs it directly without the cleanup stuff but that does not work either.

Before I go on debug this intensively, I just want to make sure I've not missed something very obvious in the process?

Thanks in advance,
JC

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

* [U-Boot] How to have U-boot loading U-boot
  2015-02-04 14:52 [U-Boot] How to have U-boot loading U-boot Jean-Christophe Lallemand
@ 2015-02-04 16:44 ` Wolfgang Denk
       [not found]   ` <9FDDF58442D8154DBF9BB9A68CE7AD9CEC6E3F1A91@CHUCK.dvlt.local>
  2015-02-05 21:19 ` Rob Herring
  1 sibling, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2015-02-04 16:44 UTC (permalink / raw)
  To: u-boot

Dear Jean-Christophe Lallemand,

In message <9FDDF58442D8154DBF9BB9A68CE7AD9CEC6E3F1A8B@CHUCK.dvlt.local> you wrote:
>
> What I'd like to do is have the already available u-boot (say Level-1) to load a second u-boot (say Level-2) into DDR where size is not an issue which will then load Linux.

This is the SPL concept.  Why don't you simply use the SPL on your
board?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Of course life is  bizarre.  The  more  bizarre  it  gets,  the  more
interesting  it  is.  The only way to approach it is to make yourself
some popcorn and enjoy the show.                      - David Gerrold

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

* [U-Boot] How to have U-boot loading U-boot
       [not found]   ` <9FDDF58442D8154DBF9BB9A68CE7AD9CEC6E3F1A91@CHUCK.dvlt.local>
@ 2015-02-04 18:35     ` Wolfgang Denk
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2015-02-04 18:35 UTC (permalink / raw)
  To: u-boot

Dear Jean-Christophe Lallemand,

In message <9FDDF58442D8154DBF9BB9A68CE7AD9CEC6E3F1A91@CHUCK.dvlt.local> you wrote:
> 
> I've stumbled upon SPL in my search for a good solution but my impression was that all the image loading stuff and therefore validation was not in there.

So add it?

> So I thought that would solve half of my problems but create new ones and having a plain u-boot loading another u-boot would perhaps be a better approach.

I doubt that.  You would have to run two different builds and/or
modify the build process; instead you can have it all done in a simgle
build, in a standard and community-supported way.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Ernest asks Frank how long he has been working for the company.
        "Ever since they threatened to fire me."

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

* [U-Boot] How to have U-boot loading U-boot
  2015-02-04 14:52 [U-Boot] How to have U-boot loading U-boot Jean-Christophe Lallemand
  2015-02-04 16:44 ` Wolfgang Denk
@ 2015-02-05 21:19 ` Rob Herring
  1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring @ 2015-02-05 21:19 UTC (permalink / raw)
  To: u-boot

On Wed, Feb 4, 2015 at 8:52 AM, Jean-Christophe Lallemand
<jcl@develtech.com> wrote:
> Dear all,
>
> I have already used u-boot several times on various ARM-based platforms but I need to go to unknown territories this time.
> On an ARM-based platform again, we have a u-boot port (v2010.09) available loaded by a ROM bootloader into the internal RAM.
> For some reasons, the ROM bootloader limits the size of the loaded code to 128kB which is a bit short for the functionality needed.
>
> What I'd like to do is have the already available u-boot (say Level-1) to load a second u-boot (say Level-2) into DDR where size is not an issue which will then load Linux.

FYI, you can do this on highbank with the same binary. It is slightly
different in that RAM is already initialized and we can load the same
binary used for level-1. It's mainly nice for development.

> For the Level-1, I haven't changed anything for now. I'm still using the Linux kernel load address.
>
> For the Level-2, I have found the following interesting configuration flags:
> CONFIG_SKIP_LOWLEVEL_INIT -> to suppress the CPU & external RAM initialization that is already done by Level-1
> CONFIG_SKIP_RELOCATE_UBOOT -> to avoid the relocation that was not looking interesting in the scope of a Level-2 but is that correct?

This should not be necessary.

> TEXT_BASE -> modified to match the kernel load address used in Level-1

You don't really need to align to the kernel load address, but that's
probably not your issue.

> I have constructed my Level-2 U-boot image using the same kind of commands as for my kernel but specifying Firmware type
> ./u-boot/tools/mkimage -A arm -O U-boot -T Firmware -C none -a 70008000 -e 70008000 -n 'u-boot L2' -d ./u-boot/u-boot.bin ./u-boot/u-boot.uImage
>
> When I try to run the loaded Level-2, my board freezes.
> I've also tried to hack the bootm command so that my Firmware image is seen as a stand-alone application so that it runs it directly without the cleanup stuff but that does not work either.

I just load the raw binary to TEXT_BASE and do "go TEXT_BASE".

> Before I go on debug this intensively, I just want to make sure I've not missed something very obvious in the process?

There could be other init that doesn't work if run twice.

Rob

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

end of thread, other threads:[~2015-02-05 21:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-04 14:52 [U-Boot] How to have U-boot loading U-boot Jean-Christophe Lallemand
2015-02-04 16:44 ` Wolfgang Denk
     [not found]   ` <9FDDF58442D8154DBF9BB9A68CE7AD9CEC6E3F1A91@CHUCK.dvlt.local>
2015-02-04 18:35     ` Wolfgang Denk
2015-02-05 21:19 ` Rob Herring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.