All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.m@jp.panasonic.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH 04/17] kconfig: add defconfig files for all boards
Date: Thu, 20 Mar 2014 09:11:43 +0900	[thread overview]
Message-ID: <20140320091142.01ED.AA925319@jp.panasonic.com> (raw)
In-Reply-To: <CACUy__Uc8-xDMRiJm7SM1UfF_hVAdHKN9_MZC5FV0D=zDrAPeA@mail.gmail.com>

Hi Daniel,


> agree. But at first we should introduce Kconfig files in all arch,
> CPU, SOC, SOC common, board vendor, board and driver directories where
> we put all CONFIG_SYS_ symbols. We also need to convert the current
> config options for CPU, SOC, vendor and board. For example:
> 
> CONFIG_SYS_CPU="armv7"
> CONFIG_SOC_DIR=y
> CONFIG_SYS_SOC="tegra30"
> CONFIG_SYS_BOARD="beaver"
> CONFIG_VENDOR_DIR=y
> CONFIG_SYS_VENDOR="nvidia"
> CONFIG_SYS_CONFIG_NAME="beaver"
> 
> should be converted to something like this:
> 
> CONFIG_CPU_ARMV7=y
> CONFIG_SOC_TEGRA30=y
> CONFIG_VENDOR_NVIDIA=y
> CONFIG_BOARD_BEAVER=y
> 
> Then we can use the Kconfig symbol dependencies to create a minimal
> working board config. For example:
> 
> board/nvidia/beaver/Kconfig:
> config BOARD_BEAVER
>     bool "board description"
>     select VENDOR_NVIDIA
>     select SOC_TEGRA30
>     select SPL
>     ...
> 
> arch/arm/cpu/armv7/tegra30/Kconfig:
> config SOC_TEGRA30
>     bool
>     select ARMV7
>     ...
> 
> The beaver_defconfig file could reduced then to
> "CONFIG_BOARD_BEAVER=y" and some default user-editable options.


Basicly I think it's a good idea, but I am afraid there are some
problems.

[1]
First, in this case, how can we select the target board?

Like this?

choice
        prompt "Board select"
        default BOARD_SANDBOX

config BOARD_VEXPRESS_AEMV8A
        bool "vexpress_aemv8a board"

config BOARD_ARCANGEL4
        bool "arcangel4 board"

    [ Snip: a thousand of boards ]

endchoice

If we run "make config", a bunch of board choices
would be displayed and be gone away quickly.
For "make menuconfig", it would be hard to select the board
you are aiming at.


Maybe we should choose it in the top-down order?
Like this?

(1) 1st Level : Architecture select

choice
        prompt "Architecture select"

config ARM
        bool "ARM architecture"

   .....

(2) 2rd Level: CPU select
choice
        prompt "CPU select"
        depends on ARM

config CPU_ARMV7
        bool "ARM v7"
 
     ....

(3) 3rd level: SoC select

choice
        prompt "SoC select"
        depends on CPU_ARMV7

config SOC_TEGRA
        bool "Tegra SoC"

   .....

(4) 4th level: Board select

choice
        prompt "Board select"
        depends on SOC_TEGRA

config BOARD_BEAVER
        bool "Tegra SoC"


[2]
CONFIG_CPU_
CONFIG_SOC_
CONFIG_VENDOR_
CONFIG_BOARD_
are systematic prefixes and easy to understand.

But there are already some macros bound to
specific CPUs, SoCs.

For example,
CONFIG_SOC_TEGRA30 would be the same as
existing CONFIG_TEGRA30.

We will have to merge macros with the same meaning.

[3]
How to select board directoy by using boolean macros.

If we try to emulate arch/arm/Makefile of Linux,

board-$(CONFIG_BOARD_VEXPRESS_AEMV8A)   := vexpress_aemv8a
board-$(CONFIG_BOARD_AXS101)                     := axs101
board-$(CONFIG_BOARD_ARCANGEL4)               := arcangel4

Like this?



Best Regards
Masahiro Yamada

  parent reply	other threads:[~2014-03-20  0:11 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-17  8:52 [U-Boot] [RFC PATCH 0/17] Version 0 of Kconfig for U-Boot Masahiro Yamada
2014-03-17  8:52 ` [U-Boot] [RFC PATCH 01/17] kconfig: import Kconfig files from Linux v3.13 tag Masahiro Yamada
2014-03-17  8:52 ` [U-Boot] [RFC PATCH 02/17] kconfig: add basic Kconfig files Masahiro Yamada
2014-03-17  8:52 ` [U-Boot] [RFC PATCH 03/17] Do not apply: tools: add gendefconfigs Masahiro Yamada
2014-03-17  8:52 ` [U-Boot] [RFC PATCH 04/17] kconfig: add defconfig files for all boards Masahiro Yamada
2014-03-18  3:08   ` Stephen Warren
2014-03-19  3:16     ` Masahiro Yamada
2014-03-19  3:39       ` Stephen Warren
2014-03-19  4:50         ` Masahiro Yamada
2014-03-19  9:56           ` Wolfgang Denk
2014-03-19 10:51             ` Masahiro Yamada
2014-03-19 12:37               ` Daniel Schwierzeck
2014-03-19 14:20                 ` Wolfgang Denk
2014-03-19 16:06                   ` Tom Rini
2014-03-19 23:48                     ` Masahiro Yamada
2014-03-21 13:41                       ` Tom Rini
2014-03-20  0:11                 ` Masahiro Yamada [this message]
2014-03-20 13:17                   ` Daniel Schwierzeck
2014-03-21 18:05                     ` Tom Rini
2014-03-22 17:14                       ` Daniel Schwierzeck
2014-03-24  6:35                         ` Masahiro Yamada
2014-03-24 20:35                           ` Daniel Schwierzeck
2014-03-28  2:25                             ` Masahiro Yamada
2014-03-28 20:35                               ` Daniel Schwierzeck
2014-03-31  8:56                                 ` Masahiro Yamada
2014-03-19 19:58           ` Stephen Warren
2014-03-19 12:54   ` Tom Rini
2014-03-19 22:58     ` Masahiro Yamada
2014-03-17  8:53 ` [U-Boot] [RFC PATCH 05/17] include: define CONFIG_SPL and CONFIG_TPL as 1 Masahiro Yamada
2014-03-17  8:53 ` [U-Boot] [RFC PATCH 06/17] m68k: define processor family CONFIGs " Masahiro Yamada
2014-03-17  8:53 ` [U-Boot] [RFC PATCH 07/17] kconfig: switch over to Kconfig Masahiro Yamada
2014-03-17  8:53 ` [U-Boot] [RFC PATCH 08/17] MAKEALL: adjust for Kconfig Masahiro Yamada
2014-03-17  8:53 ` [U-Boot] [RFC PATCH 09/17] buildman: " Masahiro Yamada
2014-03-17  8:53 ` [U-Boot] [RFC PATCH 10/17] kconfig: delete redundant CONFIG_${ARCH} definition Masahiro Yamada
2014-03-17  8:53 ` [U-Boot] [RFC PATCH 11/17] sh: remove redundant CPU family definition Masahiro Yamada
2014-03-17  8:53 ` [U-Boot] [RFC PATCH 12/17] sparc: " Masahiro Yamada
2014-03-17  8:53 ` [U-Boot] [RFC PATCH 13/17] m68k: " Masahiro Yamada
2014-03-17  8:53 ` [U-Boot] [RFC PATCH 14/17] powerpc: " Masahiro Yamada
2014-03-17  8:53 ` [U-Boot] [RFC PATCH 15/17] kbuild: remove CONFIG_SPL/CONFIG_TPL definition in config headers Masahiro Yamada
2014-03-17  8:53 ` [U-Boot] [RFC PATCH 16/17] kconfig: remove old script Masahiro Yamada
2014-03-17  8:53 ` [U-Boot] [RFC PATCH 17/17] kconfig: add CONFIG_CROSS_COMPILE Masahiro Yamada
2014-03-21  2:15 ` [U-Boot] [RFC PATCH 0/17] Version 0 of Kconfig for U-Boot Simon Glass
2014-03-24  5:58   ` Masahiro Yamada
2014-03-24  7:30     ` Wolfgang Denk
2014-03-24  7:52       ` Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140320091142.01ED.AA925319@jp.panasonic.com \
    --to=yamada.m@jp.panasonic.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.