public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Port old board to Kconfig
@ 2018-12-10  0:13 Tim Godfrey
  2018-12-11  1:02 ` Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Tim Godfrey @ 2018-12-10  0:13 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [U-Boot] Port old board to Kconfig
  2018-12-10  0:13 [U-Boot] Port old board to Kconfig Tim Godfrey
@ 2018-12-11  1:02 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2018-12-11  1:02 UTC (permalink / raw)
  To: u-boot

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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-11  1:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-10  0:13 [U-Boot] Port old board to Kconfig Tim Godfrey
2018-12-11  1:02 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox