[U-Boot] Port old board to Kconfig

Tim Godfrey timothy.godfrey at gmail.com
Mon Dec 10 00:13:31 UTC 2018


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

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).

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?
 - 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?
 - 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?
 - 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?
 - I have watched Marek Vasut's (thanks Marek!) ELC presentation on board
porting, and been reading README.kconfig, but I still feel like I am
feeling my way forward by trial and error. Are there any other documents or
sources that I should be reading?

All tips, pointers, and help warmly received!

Thanks,
Tim


More information about the U-Boot mailing list