[U-Boot] Porting board from FSL to mainline U-Boot
stefano babic
sbabic at denx.de
Sun Jan 8 14:00:07 CET 2012
Am 08/01/2012 08:15, schrieb Dirk Behme:
> Hi Jason and Stefano,
> is
I Dirk,
I posted your answer to the ML, too. I think your questions are of
gerneral interest ;-)
> I have to port the support for a custom board from Freescale to mainline
> U-Boot. As you are the experts for this, I have two questions:
>
>
> 1. In the old FSL U-Boot, *each* board has a board specific
> lowlevel_init.S. E.g.:
>
> board/freescale/mx6q_sabrelite/lowlevel_init.S
Yes, I know. This is not only for i.MX, but you can see the same for
other SOCs, too. (MX5 / MX35 / ..). However, if you check exactly these
files, you see only a few differences, and sometimes there are not
differences at all. We tried to factorize so much code as we could in
U-Boot mainline, and I prefer to move these differences in the board
related code, such as in board_early_init() function.
A not written rule is to have the SOC initialization (not board
specific) in the lowlevel_inbit.S, and this code must work for all
boards having the same SOC.
>
> http://opensource.freescale.com/git?p=imx/uboot-imx.git;a=blob;f=board/freescale/mx6q_arm2/lowlevel_init.S;h=882f62aec538122b633d018eb99fd7dc48243049;hb=refs/heads/imx_v2009.08_11.11.01
>
>
> Now, in the mainline there is only one (empty) *central* lowlevel_init.S:
>
> arch/arm/cpu/armv7/mx6/lowlevel_init.S
This file was left only to get the possibility (as last chance) to add
very specific code. I am happy it is empty ;-)
>
> http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=arch/arm/cpu/armv7/mx6/lowlevel_init.S;h=1864356d0bf7b54265a42442f74a3baf756028f2;hb=refs/heads/master
>
>
> This prevents the usage of the board specific lowlevel_init.S.
>
> http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=tree;f=board/freescale/mx6qarm2;h=d0d08dbc68387c9bdee5db6ff71656ebae1edfb1;hb=refs/heads/master
>
>
> Now, I wonder where to put the content from the FSL->lowlevel_init.S
> while porting it to mainline? It seems you dropped it, e.g. for the ARM2?
i.MX6 reuses code from armv7 architecture, that means some code is
shared with OMAP3/4/5 and with other SOCs of the same family. This must
be taken into account when some changes are required, because we cannot
broken other SOCs. Some parts you see in Freescale's lowlevel_init.S are
in start.S. Specific code for i.MX6 was recoded in C-language, such as
in arch/arm/cpu/armv7/mx6/soc.c.
Do not forget also thet Freescale's code is based on U-Boot 2009.08 -
that means before the ARM relocation was introduced.
> 2. Does the imximage in mainline support to create a header for the
> i.MX6 NOR boot?
I have not yet seen manuals for i.MX6, so I cannot answer this question.
> This document mentions only
>
> nand/spi/sd/onenand
I wrote this README for i.MX5, but imximage was updated by Jason to
support i.MX53 and i.MX6. They require version 2 of the imximage header.
>
> Can I use imximage to create i.MX6 NOR images/headers, too?
I do not know if NOR requires a different header, but if imximage does
not support it now, the way is to modify mkimage to add NOR, too.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
More information about the U-Boot
mailing list