[U-Boot] Port old board to Kconfig

Tom Rini trini at konsulko.com
Tue Dec 11 01:02:38 UTC 2018


On Mon, Dec 10, 2018 at 11:13:31AM +1100, Tim Godfrey wrote:

> Hello!
> 
> I am working with a VAR-SOM-AM43 dev board from a company called Variscite.
> The company doesn't support u-boot builds for this board after the
> migration to Kconfig (maintenance happens on a 2014.07 branch), and I would
> like to port the board to more recent u-boot sources.
> 
> The SoC on the dev board is a Texas Instruments AM4738 ARM processor. My
> understanding of the abstraction layers is
>  - Architecture: ARM
>  - CPU: armv7
>  - SoC: AM33xx
>  - Board: varsomam43
>  - target build configurations

That sounds right, yes.

> The vendor supplied Yocto layer includes the board support source files
> (board.*, mux.c, etc), so my plan had been to build u-boot with the board
> (and config, based on the old boards.cfg entry) being varsomam43:
>  - CONFIG_VARSOMAM43 (board)
> - CONFIG_TARGET_VARSOMAM43 (target)
> 
> Once I had these legacy configurations working with the new source tree I
> was planning to migrate the code to the Kconfig way of doing things (which
> I'm still learning about).

You might want to look at board/compulab/ as there's a number of am33xx
and am43xx boards there that aren't the TI reference platforms.  There's
others too of course.

> That is my plan, but there are a few things that are unclear to me or that
> I am unsure of.
>  - Is my plan a sensible approach?

Yes.

>  - Do I understand the board/config layer division correctly? It is not
> clear to me that I shouldn't build my board with the AM43XX board
> definition (that is what the Variscite sources are based on anyway), with
> the dev board I am using defined as a target of that board. Should it be
> Soc:AM33XX, Board:AM43XX, Target:varsomam43; or SoC:AM33XX,
> Board:varsomam43, Target:varsomam43, or some combination thereof?

That sounds about right.

>  - Why do the AM43XX evm boards use the AM33XX SoC definition, even though
> they are a part of the AM43XX soc series (on chip peripherals), and the
> external differences (external peripherals, pin mux configurations) are
> configured in the evm definitions?

So, the am33xx line is really the 3rd generation platform from the
ti81xx line (that had gen 1/2).  And am43xx is the 4th generation.  For
historical reasons however, am33xx was the first one fully upstreamed
and so everyone else in the family keys off of that.

>  - In the current ti-u-boot source tree in am43xx_evm_defconfig
> CONFIG_AM43XX=y is defined, but not CONFIG_TARGET_AM43XX_EVM, and the
> Kconfig options in the board source file are conditional upon that symbol
> ("if TARGET_AM43XX_EVM"). How are the Kconfig defaults configured, and
> am43xx_evm.h selected for the AM43XX_EVM target?

You should just look at the main u-boot tree itself.  And note that the
defconfig files under configs/ contain only symbols that aren't deduced
when running "oldconfig" on top of it.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181210/e22a1163/attachment.sig>


More information about the U-Boot mailing list