* barebox for a ti am335x based board
@ 2018-02-13 22:12 Giorgio Dal Molin
2018-02-14 5:11 ` Alexander Shiyan
2018-02-16 7:51 ` Sascha Hauer
0 siblings, 2 replies; 5+ messages in thread
From: Giorgio Dal Molin @ 2018-02-13 22:12 UTC (permalink / raw)
To: barebox
[-- Attachment #1.1.1: Type: text/plain, Size: 609 bytes --]
Hi all,
I'm trying to add board code for an am335x based HW project.
I had a look at similar boards like 'boards/phytec-som-am335x'
or 'boards/beaglebone'.
I understand that I need two images: the (little) MLO and the
(bigger) barebox.
What it's not really clear is how the MLO loads and starts the
barebox.
Moreover I saw there's always a call to:
am33xx_save_bootinfo((void *)bootinfo);
in the MLO lowlevel entry function; I suspect the argument
'bootinfo' is the register r0 left by the function __barebox_arm_head()
but I cannot really understand the logic behind it.
giorgio
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 898 bytes --]
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: barebox for a ti am335x based board
2018-02-13 22:12 barebox for a ti am335x based board Giorgio Dal Molin
@ 2018-02-14 5:11 ` Alexander Shiyan
2018-02-16 7:51 ` Sascha Hauer
1 sibling, 0 replies; 5+ messages in thread
From: Alexander Shiyan @ 2018-02-14 5:11 UTC (permalink / raw)
To: Giorgio Dal Molin; +Cc: barebox
>Среда, 14 февраля 2018, 1:13 +03:00 от Giorgio Dal Molin <giorgio.nicole@arcor.de>:
>
>Hi all,
>
>I'm trying to add board code for an am335x based HW project.
>I had a look at similar boards like 'boards/phytec-som-am335x'
>or 'boards/beaglebone'.
>I understand that I need two images: the (little) MLO and the
>(bigger) barebox.
>
>What it's not really clear is how the MLO loads and starts the
>barebox.
>
>Moreover I saw there's always a call to:
>
> am33xx_save_bootinfo((void *)bootinfo);
>
>in the MLO lowlevel entry function; I suspect the argument
>'bootinfo' is the register r0 left by the function __barebox_arm_head()
>but I cannot really understand the logic behind it.
Hello.
You can try to reuse my implementation AM335X code and change it
for your hardware.
https://github.com/shcgit/barebox-github/tree/am335x
---
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: barebox for a ti am335x based board
2018-02-13 22:12 barebox for a ti am335x based board Giorgio Dal Molin
2018-02-14 5:11 ` Alexander Shiyan
@ 2018-02-16 7:51 ` Sascha Hauer
2018-02-16 9:15 ` Giorgio Dal Molin
1 sibling, 1 reply; 5+ messages in thread
From: Sascha Hauer @ 2018-02-16 7:51 UTC (permalink / raw)
To: Giorgio Dal Molin; +Cc: barebox
Hi Giorgio,
On Tue, Feb 13, 2018 at 11:12:54PM +0100, Giorgio Dal Molin wrote:
> Hi all,
>
> I'm trying to add board code for an am335x based HW project.
> I had a look at similar boards like 'boards/phytec-som-am335x'
> or 'boards/beaglebone'.
> I understand that I need two images: the (little) MLO and the
> (bigger) barebox.
>
> What it's not really clear is how the MLO loads and starts the
> barebox.
See arch/arm/mach-omap/xload.c. It is compiled when no shell is enabled
(I think at least for clarity there should be a separate Kconfig
symbol). In this file omap_xload() detects where the SoC has booted from
and loads the full barebox from the same source.
>
> Moreover I saw there's always a call to:
>
> am33xx_save_bootinfo((void *)bootinfo);
>
> in the MLO lowlevel entry function; I suspect the argument
> 'bootinfo' is the register r0 left by the function __barebox_arm_head()
> but I cannot really understand the logic behind it.
When the am335x ROM passes control to the bootloader then it passes in
R0 a pointer to the bootinfo. This is a three word structure which has
informations where the SoC has booted from. In am33xx_save_bootinfo() we
copy the information to a known place where we can pick it up later, see
am33xx_bootsource().
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: barebox for a ti am335x based board
2018-02-16 7:51 ` Sascha Hauer
@ 2018-02-16 9:15 ` Giorgio Dal Molin
2018-02-19 6:28 ` Sascha Hauer
0 siblings, 1 reply; 5+ messages in thread
From: Giorgio Dal Molin @ 2018-02-16 9:15 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
Hi,
thank you for the answer, meanwhile I also found the bootinfo
details in the ~5000 pages am335x datasheet.
Starting the second stage bootloader (barebox.bin file on the mmc)
from the MLO also works ('out of the box' actually).
giorgio
> On February 16, 2018 at 8:51 AM Sascha Hauer <s.hauer@pengutronix.de> wrote:
>
>
> Hi Giorgio,
>
> On Tue, Feb 13, 2018 at 11:12:54PM +0100, Giorgio Dal Molin wrote:
> > Hi all,
> >
> > I'm trying to add board code for an am335x based HW project.
> > I had a look at similar boards like 'boards/phytec-som-am335x'
> > or 'boards/beaglebone'.
> > I understand that I need two images: the (little) MLO and the
> > (bigger) barebox.
> >
> > What it's not really clear is how the MLO loads and starts the
> > barebox.
>
> See arch/arm/mach-omap/xload.c. It is compiled when no shell is enabled
> (I think at least for clarity there should be a separate Kconfig
> symbol). In this file omap_xload() detects where the SoC has booted from
> and loads the full barebox from the same source.
>
> >
> > Moreover I saw there's always a call to:
> >
> > am33xx_save_bootinfo((void *)bootinfo);
> >
> > in the MLO lowlevel entry function; I suspect the argument
> > 'bootinfo' is the register r0 left by the function __barebox_arm_head()
> > but I cannot really understand the logic behind it.
>
> When the am335x ROM passes control to the bootloader then it passes in
> R0 a pointer to the bootinfo. This is a three word structure which has
> informations where the SoC has booted from. In am33xx_save_bootinfo() we
> copy the information to a known place where we can pick it up later, see
> am33xx_bootsource().
>
> Sascha
>
>
> --
> Pengutronix e.K. | |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: barebox for a ti am335x based board
2018-02-16 9:15 ` Giorgio Dal Molin
@ 2018-02-19 6:28 ` Sascha Hauer
0 siblings, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2018-02-19 6:28 UTC (permalink / raw)
To: Giorgio Dal Molin; +Cc: barebox
On Fri, Feb 16, 2018 at 10:15:37AM +0100, Giorgio Dal Molin wrote:
> Hi,
>
> thank you for the answer, meanwhile I also found the bootinfo
> details in the ~5000 pages am335x datasheet.
>
> Starting the second stage bootloader (barebox.bin file on the mmc)
> from the MLO also works ('out of the box' actually).
Nice ;) That's the way it should be.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-02-19 6:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-13 22:12 barebox for a ti am335x based board Giorgio Dal Molin
2018-02-14 5:11 ` Alexander Shiyan
2018-02-16 7:51 ` Sascha Hauer
2018-02-16 9:15 ` Giorgio Dal Molin
2018-02-19 6:28 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox