All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: "Robert P. J. Day" <rpjday@crashcourse.ca>,
	Chris Hallinan <challinan@gmail.com>
Cc: Yocto discussion list <yocto@yoctoproject.org>
Subject: Re: how to tftp download a newer u-boot into RAM and simply execute it?
Date: Thu, 7 Jul 2016 08:48:16 +0200	[thread overview]
Message-ID: <577DFB30.8050208@denx.de> (raw)
In-Reply-To: <alpine.LFD.2.20.1607061508290.3259@localhost.localdomain>

Hi Robert,

On 06/07/2016 21:14, Robert P. J. Day wrote:
> On Wed, 6 Jul 2016, Chris Hallinan wrote:
> 
>> Hi Robert,
>> That's not old, that's ancient in dog^HU-Boot years - LOL!
>>
>> It's been quite a while since I looked at a PPC U-Boot, but at a
>> minimum, you will need to link U-Boot to a RAM'able address.  By
>> default, I'm sure the recipe links it for the NOR addresses.  When
>> it boots from NOR it immediately relocates itself to a RAM address
>> from NOR, if memory serves.  Notice it's crashing right away, on the
>> second instruction.
> 
>   i came to that conclusion ... i looked at the u-boot.srec file that
> was generated and, sure enough:
> 
> S00E0000752D626F6F742E73726563C0
> S315FE00000042424242424242420606060606060606AC
> S315FE00001000000000000000000000000000000000DC
> S315FE000020A0A0A0A0A0A0A0A06060606060606060CC
> ... snip ...
> 
> so definitely linked for flashing to beginning of NOR flash at
> 0xFE000000. so i suspect i could just flash it and reset and it would
> work just fine. and never mind, i found the answer i was after:
> 

U-Boot is linked at the address set with CONFIG_SYS_TEXT_BASE in
include/configs/MPC8315ERDB.h. You can try to change this.

It is not only a problem of the linker address. U-Boot sets the RAM
controller and this should be skipped with some other basic part (PLL,
and so on) if you run from RAM.

However, I see the board has already a setup.

#if CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE && \
        !defined(CONFIG_NAND_SPL)
#define CONFIG_SYS_RAMBOOT
#else
#undef CONFIG_SYS_RAMBOOT
#endif

You could set CONFIG_SYS_MONITOR_BASE in RAM and SYS_RAMBOOT should be
automatically set. This change the bootloader and the RAM controller is
not set up again.

However, as mentioned in the website, you are not exactly testing the
new boot loader, you are testing another bootloader. If the new
bootloader has issues by setting the RAM controller, for example, it
runs when you load from RAM and it will not run later...


> http://www.denx.de/wiki/view/DULG/CanUBootBeConfiguredSuchThatItCanBeStartedInRAM
> 
> i was hoodwinked into thinking it would be easy because i found this
> page:
> 
> https://blackfin.uclinux.org/doku.php?id=bootloaders:u-boot:tftp_loading_files
> 
> of course, that page is for the blackfin, precisely one of the
> platforms the denx page says it *can* work for. grrrrrrrrr.
> 
>   so, before i commit myself to this, who's the PPC/MPC8315E-RDB
> expert on this list who can confirm a stock u-boot should flash to NOR
> and just plain run?

I have not the board and I cannot test it - if you have a JTAG debugger,
you are always able to restore the board in case something goes wrong.

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================


      parent reply	other threads:[~2016-07-07  6:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-06 18:18 how to tftp download a newer u-boot into RAM and simply execute it? Robert P. J. Day
2016-07-06 18:53 ` Chris Hallinan
2016-07-06 19:14   ` Robert P. J. Day
2016-07-06 19:37     ` Bruce Ashfield
2016-07-07  8:29       ` Kevin Hao
2016-07-07  6:48     ` Stefano Babic [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=577DFB30.8050208@denx.de \
    --to=sbabic@denx.de \
    --cc=challinan@gmail.com \
    --cc=rpjday@crashcourse.ca \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.