diff mbox series

[12/17] x86: coreboot: Use vendor in the Kconfig

Message ID 20210407163159.12.Ic028f6df43c9740024371590bbe8ea1be27ec45f@changeid
State Superseded
Delegated to: Bin Meng
Headers show
Series misc: Some more misc patches | expand

Commit Message

Simon Glass April 7, 2021, 4:32 a.m. UTC
Use VENDOR_COREBOOT instead of TARGET_COREBOOT so we can have multiple
coreboot boards, sharing options. Only SYS_CONFIG_NAME needs to be
defined TARGET_COREBOOT.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 arch/x86/cpu/coreboot/Kconfig   |  2 +-
 board/coreboot/coreboot/Kconfig | 12 ++++++++----
 2 files changed, 9 insertions(+), 5 deletions(-)

Comments

Bin Meng April 8, 2021, 2:59 a.m. UTC | #1
Hi Simon,

On Wed, Apr 7, 2021 at 12:33 PM Simon Glass <sjg@chromium.org> wrote:
>
> Use VENDOR_COREBOOT instead of TARGET_COREBOOT so we can have multiple
> coreboot boards, sharing options. Only SYS_CONFIG_NAME needs to be
> defined TARGET_COREBOOT.
>

I am not sure what use case this is? This change makes no difference
when U-Boot is built as a coreboot payload.

> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  arch/x86/cpu/coreboot/Kconfig   |  2 +-
>  board/coreboot/coreboot/Kconfig | 12 ++++++++----
>  2 files changed, 9 insertions(+), 5 deletions(-)
>

Regards,
Bin
Simon Glass April 24, 2021, 4:56 a.m. UTC | #2
Hi Bin,

On Thu, 8 Apr 2021 at 14:59, Bin Meng <bmeng.cn@gmail.com> wrote:
>
> Hi Simon,
>
> On Wed, Apr 7, 2021 at 12:33 PM Simon Glass <sjg@chromium.org> wrote:
> >
> > Use VENDOR_COREBOOT instead of TARGET_COREBOOT so we can have multiple
> > coreboot boards, sharing options. Only SYS_CONFIG_NAME needs to be
> > defined TARGET_COREBOOT.
> >
>
> I am not sure what use case this is? This change makes no difference
> when U-Boot is built as a coreboot payload.

This is because I want to add another coreboot board, called
'chromeos_coreboot'. So in that case it will have VENDOR_COREBOOT
enabled, but not TARGET_COREBOOT.

>
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> >  arch/x86/cpu/coreboot/Kconfig   |  2 +-
> >  board/coreboot/coreboot/Kconfig | 12 ++++++++----
> >  2 files changed, 9 insertions(+), 5 deletions(-)
> >
>
> Regards,
> Bin

Depending on a particular TARGET Kconfig is not a good idea, IMO.

Regards,
Simon
diff mbox series

Patch

diff --git a/arch/x86/cpu/coreboot/Kconfig b/arch/x86/cpu/coreboot/Kconfig
index 497d6284ac1..b97c2779041 100644
--- a/arch/x86/cpu/coreboot/Kconfig
+++ b/arch/x86/cpu/coreboot/Kconfig
@@ -1,4 +1,4 @@ 
-if TARGET_COREBOOT
+if VENDOR_COREBOOT
 
 config SYS_COREBOOT
 	bool
diff --git a/board/coreboot/coreboot/Kconfig b/board/coreboot/coreboot/Kconfig
index 5bd6465d989..05e9b3b6f75 100644
--- a/board/coreboot/coreboot/Kconfig
+++ b/board/coreboot/coreboot/Kconfig
@@ -1,4 +1,4 @@ 
-if TARGET_COREBOOT
+if VENDOR_COREBOOT
 
 config SYS_BOARD
 	default "coreboot"
@@ -9,9 +9,6 @@  config SYS_VENDOR
 config SYS_SOC
 	default "coreboot"
 
-config SYS_CONFIG_NAME
-	default "coreboot"
-
 config SYS_TEXT_BASE
 	default 0x01110000
 
@@ -31,4 +28,11 @@  config SYS_CAR_SIZE
 	help
 	  This option specifies the board specific Cache-As-RAM (CAR) size.
 
+endif  # CONFIG_VENDOR_COREBOOT
+
+if TARGET_COREBOOT
+
+config SYS_CONFIG_NAME
+	default "coreboot"
+
 endif