Porting board from FSL to mainline U-Boot
A message that is not in the archive (sent off-list or not yet received): [email protected]
Am 08/01/2012 08:15, schrieb Dirk Behme:
Quoted 2 lines
Hi Jason and Stefano,
is
I Dirk,
I posted your answer to the ML, too. I think your questions are of gerneral interest ;-)
Quoted 8 lines
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.
Quoted 7 lines
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 ;-)
Quoted 11 lines
This prevents the usage of the board specific
lowlevel_init.S.Now, I wonder where to put the content from the
FSL->lowlevel_init.Swhile 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.
Quoted 2 lines
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.
Quoted 3 lines
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.
Quoted 2 lines
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
Signature · 5 lines
===================================================================== 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 =====================================================================