Skip to contentSkip to conversation

Running vanilla u-boot v2012.10 on Guruplug

U-Boot Dirk Heinrichs 7 participants 11 messages Jan 12, 2013 – Jan 13, 2013

lore
Share & tools
lore
#0 lore raw

Hello,

I have compiled u-boot v2012.10 for my Guruplug and would like to test it from RAM before I write it to flash. So following instructions I found via internet search I load the u-boot.kwb from SATA disk into RAM at address 0x800000 (ext2load ide 0:1 0x800000 u-boot.kwb) and then start it with "go 0x800200".

Unfortunately, this only restarts the running u-boot (v2012.04.01 from Debian) instead of starting the new one.

So my questions are:

1) Does running from RAM this way work at all?
2) If I can't test it from RAM, is it save to write it to flash anyway?

Thanks...

Dirk

Signature · 10 lines
Dirk Heinrichs <[email protected]>
Tel: +49 (0)2471 209385 | Mobil: +49 (0)176 34473913
GPG Public Key C2E467BB | Jabber: dirk.heinrichs at altum.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130112/6d55d8c4/attachment.pgp>
#1 lore raw

Dear Dirk Heinrichs,

Quoted 3 lines · In message <1457183.WG9k8kxG45@moria> you wrote:

1) Does running from RAM this way work at all?
2) If I can't test it from RAM, is it save to write it to flash anyway?

Did you read the FAQ? Especially
http://www.denx.de/wiki/view/DULG/CanUBootBeConfiguredSuchThatItCanBeStartedInRAM
?

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
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
Life would be so much easier if everyone read the manual.
#2 lore raw

Am Samstag 12 Januar 2013, 16:51:51 schrieb Wolfgang Denk:

Quoted 3 lines

Did you read the FAQ? Especially
http://www.denx.de/wiki/view/DULG/CanUBootBeConfiguredSuchThatItCanBeStarted
InRAM ?

Now I did :) Thanx a lot.

Interesting that [1] states it's possible, though...

Bye...

Dirk

[1]: https://doukki.net/doku.php?id=wiki:tutoriels:uboot.howto

Signature · 10 lines
Dirk Heinrichs <[email protected]>
Tel: +49 (0)2471 209385 | Mobil: +49 (0)176 34473913
GPG Public Key C2E467BB | Jabber: dirk.heinrichs at altum.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130112/06a15f01/attachment.pgp>
#3 lore raw
Quoted 9 lines · Dirk Heinrichs

Am Samstag 12 Januar 2013, 16:51:51 schrieb Wolfgang Denk:

Quoted 3 lines

Did you read the FAQ? Especially
http://www.denx.de/wiki/view/DULG/CanUBootBeConfiguredSuchThatItCanBeStarted
InRAM ?

Now I did :) Thanx a lot.

Interesting that [1] states it's possible, though...

With the dreamplug, I often load u-boot into RAM via the JTAG (0x0600000 and 0x0800000), and then 'resume 0x0600000'. Then use the u-boot running from 0x0600000 to burn the image to SPI flash from 0x0800000. But that's loaded via the JTAG, not from a running u-boot.

I think I posted instructions to this mailinglist a while ago about this. If you have the JTAG (it's only $35US), I would advise trying that.

thx,

Jason.

#4 lore raw
Quoted 9 lines · Jason
Quoted 8 lines · Dirk Heinrichs

Am Samstag 12 Januar 2013, 16:51:51 schrieb Wolfgang Denk:

Quoted 3 lines

Did you read the FAQ? Especially
http://www.denx.de/wiki/view/DULG/CanUBootBeConfiguredSuchThatItCanBeStarted
InRAM ?

Now I did :) Thanx a lot.

Interesting that [1] states it's possible, though...

Quoted 9 lines

With the dreamplug, I often load u-boot into RAM via the JTAG (0x0600000 and 0x0800000), and then 'resume 0x0600000'. Then use the u-boot running from 0x0600000 to burn the image to SPI flash from 0x0800000. But that's loaded via the JTAG, not from a running u-boot.

I think I posted instructions to this mailinglist a while ago about this. If you have the JTAG (it's only $35US), I would advise trying that.

For what is worth, I can confirm above for the dreamplug.. I wrote this down a once...:

cd /where/uboot_is
sudo openocd -f /usr/share/openocd/scripts/board/sheevaplug.cfg

# other console
telnet localhost 4444
sheevaplug_init
load_image u-boot
load_image u-boot.kwb 0x0800000

resume 0x0600000

# and hit stop in the serial terminal

no Idea about the guruplug though..

Regards,
Jeroen

#5 lore raw
Quoted 25 lines · Jeroen Hofstee
Quoted 9 lines · Jason
Quoted 8 lines · Dirk Heinrichs

Am Samstag 12 Januar 2013, 16:51:51 schrieb Wolfgang Denk:

Quoted 3 lines

Did you read the FAQ? Especially
http://www.denx.de/wiki/view/DULG/CanUBootBeConfiguredSuchThatItCanBeStarted
InRAM ?

Now I did :) Thanx a lot.

Interesting that [1] states it's possible, though...

Quoted 9 lines

With the dreamplug, I often load u-boot into RAM via the JTAG (0x0600000 and 0x0800000), and then 'resume 0x0600000'. Then use the u-boot running from 0x0600000 to burn the image to SPI flash from 0x0800000. But that's loaded via the JTAG, not from a running u-boot.

I think I posted instructions to this mailinglist a while ago about this. If you have the JTAG (it's only $35US), I would advise trying that.

For what is worth, I can confirm above for the dreamplug.. I wrote this down a once...:

cd /where/uboot_is
sudo openocd -f /usr/share/openocd/scripts/board/sheevaplug.cfg

Quoted 8 lines
# other console
telnet localhost 4444
sheevaplug_init
load_image u-boot
load_image u-boot.kwb 0x0800000

resume 0x0600000

# and hit stop in the serial terminal

Yep, this is exactly what I have.

Quoted 1 line

no Idea about the guruplug though..

It should work fine (unless you broke something, but that's the whole point of this exercise, isn't it ;-) ). If you get a u-boot command prompt in your serial window after 'resume 0x0600000', then you just successfully tested your u-boot.

hth,

Jason.

#6 lore raw
In reply to Jeroen Hofstee
Quoted 25 lines · Jeroen Hofstee
Quoted 9 lines · Jason
Quoted 8 lines · Dirk Heinrichs

Am Samstag 12 Januar 2013, 16:51:51 schrieb Wolfgang Denk:

Quoted 3 lines

Did you read the FAQ? Especially
http://www.denx.de/wiki/view/DULG/CanUBootBeConfiguredSuchThatItCanBeStarted
InRAM ?

Now I did :) Thanx a lot.

Interesting that [1] states it's possible, though...

Quoted 9 lines

With the dreamplug, I often load u-boot into RAM via the JTAG (0x0600000 and 0x0800000), and then 'resume 0x0600000'. Then use the u-boot running from 0x0600000 to burn the image to SPI flash from 0x0800000. But that's loaded via the JTAG, not from a running u-boot.

I think I posted instructions to this mailinglist a while ago about this. If you have the JTAG (it's only $35US), I would advise trying that.

For what is worth, I can confirm above for the dreamplug.. I wrote this down a once...:

cd /where/uboot_is
sudo openocd -f /usr/share/openocd/scripts/board/sheevaplug.cfg

Quoted 8 lines
# other console
telnet localhost 4444
sheevaplug_init
load_image u-boot
load_image u-boot.kwb 0x0800000

resume 0x0600000

# and hit stop in the serial terminal

Yep, this is exactly what I have.

Quoted 1 line

no Idea about the guruplug though..

It should work fine (unless you broke something, but that's the whole point of this exercise, isn't it ;-) ). If you get a u-boot command prompt in your serial window after 'resume 0x0600000', then you just successfully tested your u-boot.

hth,

Jason.

#7 lore raw
In reply to Jason

Am Samstag 12 Januar 2013, 15:41:54 schrieb Jason:

Quoted 6 lines
Quoted 1 line

Interesting that [1] states it's possible, though...

With the dreamplug, I often load u-boot into RAM via the JTAG (0x0600000 and 0x0800000), and then 'resume 0x0600000'. Then use the u-boot running from 0x0600000 to burn the image to SPI flash from 0x0800000. But that's loaded via the JTAG, not from a running u-boot.

Yes, I do have a JTAG. And I have used openocd in the past to recover the plug, so I will try that method.

Quoted 3 lines

I think I posted instructions to this mailinglist a while ago about this. If you have the JTAG (it's only $35US), I would advise trying that.

Yes, I've seen that, too. However, I've also seen the instructions for doing it from within u-boot in the link I posted. Since they didn't work I thought it might be bug. Never thought that it wasn't supported and not supposed to work at all :)

Bye...

Dirk

Signature · 10 lines
Dirk Heinrichs <[email protected]>
Tel: +49 (0)2471 209385 | Mobil: +49 (0)176 34473913
GPG Public Key C2E467BB | Jabber: dirk.heinrichs at altum.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130113/1b7e4832/attachment.pgp>
#8 lore raw
In reply to Dirk Heinrichs

Hi Dirk,

Quoted 6 lines · Dirk Heinrichs

Am Samstag 12 Januar 2013, 16:51:51 schrieb Wolfgang Denk:

Quoted 3 lines

Did you read the FAQ? Especially
http://www.denx.de/wiki/view/DULG/CanUBootBeConfiguredSuchThatItCanBeStarted
InRAM ?

Quoted 7 lines

Now I did :) Thanx a lot.

Interesting that [1] states it's possible, though...

Bye...

Dirk

My experience with starting U-Boot from RAM is that it's usually impossible when U-Boot is meant to start directly from FLASH, mostly (but not only) because the code at some point will rely on being able to keep on running even through access to DRAM is not possible.

Now, starting U-Boot *may* be possible when U-Boot is loaded in DRAM before starting it, but is a very tricky and undependable process. For instance, on the Wireless Space target I am maintaining, and which is supposed to be preloaded from FLASH into DRAM by a ROM monitor, if I start the OpenOCD server, then in the console, do a break and / or a reset halt, I won't be able to load_image u-boot; whereas if I do the same actions as -c options when launching OpenOCD. And I have checked countless times that the DRAM init sequence in the config file is bit-for-bit identical to that used by the KWB which wraps the U-Boot image, and which boots fine on its own.

Amicalement,

Signature · 1 line
Albert.
#9 lore raw

Hi Dirk,

Am 13.01.2013 10:25, schrieb Albert ARIBAUD:

Quoted 11 lines
Quoted 9 lines · Dirk Heinrichs

Am Samstag 12 Januar 2013, 16:51:51 schrieb Wolfgang Denk:

Quoted 3 lines

Did you read the FAQ? Especially
http://www.denx.de/wiki/view/DULG/CanUBootBeConfiguredSuchThatItCanBeStarted
InRAM ?

Now I did :) Thanx a lot.

Interesting that [1] states it's possible, though...

Quoted 7 lines
Quoted 3 lines

Bye...

Dirk

My experience with starting U-Boot from RAM is that it's usually impossible when U-Boot is meant to start directly from FLASH, mostly (but not only) because the code at some point will rely on being able to keep on running even through access to DRAM is not possible.

You can use the kwboot tool from the tools directory to boot a Marvell Kirkwood SoC via UART0.

Kind regards,
Stefan

#10 lore raw
In reply to Dirk Heinrichs

Hello,

thanks a lot for all your helpful replies. I have tested v2012.10 succesfully using the OpenOCD method and wrote it to nand from within itself afterwards.

I wasn't sure where Debians 2012.04.01 came from (Denx or Marvell), so I needed the test. Now that I'm confident that vanilla versions will work w/o problems, I will flash future versions directly from the running Linux system again.

Bye...

Dirk

Signature · 10 lines
Dirk Heinrichs <[email protected]>
Tel: +49 (0)2471 209385 | Mobil: +49 (0)176 34473913
GPG Public Key C2E467BB | Jabber: dirk.heinrichs at altum.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130113/8a2d1dea/attachment.pgp>