Linux Tegra architecture development
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Peter Geis <pgwipeout@gmail.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>,
	U-Boot Mailing List <u-boot@lists.denx.de>,
	linux-tegra@vger.kernel.org, Simon Glass <sjg@chromium.org>,
	Dmitry Osipenko <digetx@gmail.com>
Subject: Re: Chainloading U-Boot from Fastboot on Tegra30
Date: Fri, 21 Aug 2020 17:04:51 -0400	[thread overview]
Message-ID: <20200821210451.GE20605@bill-the-cat> (raw)
In-Reply-To: <CAMdYzYrm9v6LWrG0PKkepouJyBXUmg7VxNh96bMp03VavYGuXQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3597 bytes --]

On Fri, Aug 21, 2020 at 04:17:24PM -0400, Peter Geis wrote:
> On Mon, Jul 6, 2020 at 3:48 PM Peter Geis <pgwipeout@gmail.com> wrote:
> >
> > On Mon, Jul 6, 2020 at 1:04 PM Stephen Warren <swarren@wwwdotorg.org> wrote:
> > >
> > > On 7/3/20 6:32 AM, Peter Geis wrote:
> > > > Good Morning,
> > > >
> > > > I am attempting to expand on the work for chainloading U-Boot on the
> > > > nyan-big in order to chainload U-Boot on the Ouya Tegra30 device from fastboot.
> > > > I have so far been unsuccessful at getting any output from U-Boot
> > > > through this method.
> > >
> > > I assume that fastboot executes the loaded code on the main CPU not on
> > > the boot CPU (AVP). U-Boot SPL on Tegra30 expects to start running on
> > > the AVP though; you would have to disable SPL to make this all work, and
> > > perhaps fix U-Boot to work without SPL present. I'm not sure what, if
> > > any, changes would be required to support that.
> > >
> > > For background, see:
> > > https://http.download.nvidia.com/tegra-public-appnotes/index.html
> >
> > Apologies for the resend, I realized I didn't reply to the list.
> >
> > I admit I'm still extremely new to U-Boot, but this is the way I
> > understand the boot flow.
> > ROM does extremely low level init, then loads U-boot SPL.
> > U-Boot SPL does basic init, ram, cpu and required peripherals, then
> > loads U-Boot.bin.
> > U-Boot.bin is U-Boot proper, with the full interface.
> >
> > By loading U-Boot.bin as the nyan instructions indicated, I'm
> > bypassing the SPL code as if it was already complete.
> > The issue I have is I'm not sure what modifications were done to the
> > T124 code to allow nyan to do this.
> > I've compared the nyan configs to the cardhu configs and I don't see
> > anything that sticks out to me.
> > I've also dug through the nyan git log and I don't see anything that
> > was specifically changed to allow chainloading on T124.
> >
> > I also am unsure of where fastboot is loading the kernel in order to
> > set the text base correctly.
> 
> For anyone interested, I succeeded at chainloading u-boot on the Ouya.

Nice work.

> The Linux Kernel with low level debugging enabled in the decompressor
> will print the load address.
> 
> Jumping to kernel at:4861 ms
> 
> C:0x80A000C0-0x8112BA40->0x8152C700-0x81C58080
> Uncompressing Linux...
> 
> So by setting the u-boot text base to 0x80A00000 u-boot now executes,
> but it would then immediately silently reboot.
> Turns out I needed to define the console in the device-tree, which
> isn't defined in the u-boot tegra30-cardhu.dts.
> It would then freeze at relocation time, as it was trying to overwrite
> the trustzone ram space.
> #define CONFIG_PRAM 2048 solves that issue.
> 
> I'd like to know if u-boot can read the reserved-memory device-tree
> node and use it instead of CONFIG_PRAM?

Honestly, this is what CONFIG_PRAM is for.  We could possibly add
something to get this from device-tree, but we might need to do that
early enough that it becomes a tricky thing to do.

> Otherwise the only issue it seems to have it is does not read the
> nvidia proprietary partition table.
> Is there a way to force u-boot to read the backup gpt table similar to
> the android kernel's method?

Some tangential experiments the other day and I saw that U-Boot would
read the backup GPT if it's at the expected place.  But that might be
only after you do something like "part list mmc 0", so there might in
turn be places that we need to be a bit more robust in our checking.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2020-08-21 21:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-03 12:32 Chainloading U-Boot from Fastboot on Tegra30 Peter Geis
     [not found] ` <CAMdYzYo1je6cjSEm4i0pbNYfq1L549--n_SZDq19Xy35_y4Kkw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-07-04 19:53   ` Simon Glass
     [not found]     ` <CAPnjgZ2NxmsXUSNQtaLFxp3Qnx2O1ZqtQGQ5-9-z6vbb8ykW0g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-07-05 11:33       ` Peter Geis
     [not found]         ` <CAMdYzYraKVxsE0NLvqRXXfP=oxw+fGZrrJC2aFQ4hp4hfAkrqQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-07-05 15:35           ` Simon Glass
     [not found]             ` <CAPnjgZ3S+sic-FcHU=1jW-9A=W-+HjjJ_UF50j9khvm5CUxGRA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-07-06 11:52               ` Peter Geis
     [not found]                 ` <CAMdYzYrEZfSD4m1iJY0duTp37WUCW9kbbAt3mM8HQSuWGBh91w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-07-06 16:43                   ` Simon Glass
2020-07-06 17:04 ` Stephen Warren
     [not found]   ` <dda406a7-8199-f2ad-b64a-35791aa1033b-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2020-07-06 19:48     ` Peter Geis
2020-08-21 20:17       ` Peter Geis
2020-08-21 21:04         ` Tom Rini [this message]
2020-08-21 21:30           ` Peter Geis
2020-08-21 21:39             ` Tom Rini
2020-08-21 22:40               ` Stephen Warren
2020-08-21 23:30                 ` Peter Geis
2020-08-22 17:15                   ` Peter Geis

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=20200821210451.GE20605@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=digetx@gmail.com \
    --cc=linux-tegra@vger.kernel.org \
    --cc=pgwipeout@gmail.com \
    --cc=sjg@chromium.org \
    --cc=swarren@wwwdotorg.org \
    --cc=u-boot@lists.denx.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox