diff mbox

[U-Boot,v2,06/12] x86: coreboot: Move coreboot specific defines from coreboot.h to Kconfig

Message ID 1420471690-13541-7-git-send-email-bmeng.cn@gmail.com
State Superseded
Delegated to: Simon Glass
Headers show

Commit Message

Bin Meng Jan. 5, 2015, 3:28 p.m. UTC
There are many places in the U-Boot source tree which refer to
CONFIG_SYS_COREBOOT, CONFIG_CBMEM_CONSOLE and CONFIG_VIDEO_COREBOOT
that is currently defined in coreboot.h.

Move them to arch/x86/cpu/coreboot/Kconfig so that we can switch
to board configuration file to build U-Boot later.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>

---

Changes in v2:
- New patch to move coreboot specific defines from coreboot.h to Kconfig

 arch/x86/Kconfig              |  2 ++
 arch/x86/cpu/coreboot/Kconfig | 11 +++++++++++
 2 files changed, 13 insertions(+)
 create mode 100644 arch/x86/cpu/coreboot/Kconfig

\ No newline at end of file

Comments

Simon Glass Jan. 6, 2015, 1:50 a.m. UTC | #1
Hi Bin,

On 5 January 2015 at 08:28, Bin Meng <bmeng.cn@gmail.com> wrote:

nit: coreboot-specific defines

> There are many places in the U-Boot source tree which refer to
> CONFIG_SYS_COREBOOT, CONFIG_CBMEM_CONSOLE and CONFIG_VIDEO_COREBOOT
> that is currently defined in coreboot.h.
>
> Move them to arch/x86/cpu/coreboot/Kconfig so that we can switch
> to board configuration file to build U-Boot later.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>
> ---
>
> Changes in v2:
> - New patch to move coreboot specific defines from coreboot.h to Kconfig
>
>  arch/x86/Kconfig              |  2 ++
>  arch/x86/cpu/coreboot/Kconfig | 11 +++++++++++
>  2 files changed, 13 insertions(+)
>  create mode 100644 arch/x86/cpu/coreboot/Kconfig
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 1fabcce..01943e8 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -347,6 +347,8 @@ config TSC_FREQ_IN_MHZ
>         help
>           The running frequency in MHz of Time-Stamp Counter (TSC).
>
> +source "arch/x86/cpu/coreboot/Kconfig"
> +
>  source "arch/x86/cpu/ivybridge/Kconfig"
>
>  source "arch/x86/cpu/queensbay/Kconfig"
> diff --git a/arch/x86/cpu/coreboot/Kconfig b/arch/x86/cpu/coreboot/Kconfig
> new file mode 100644
> index 0000000..d1454c5
> --- /dev/null
> +++ b/arch/x86/cpu/coreboot/Kconfig
> @@ -0,0 +1,11 @@

I think you need

if TARGET_COREBOOT
...
endif

around this. We don't wan to use coreboot for chromebook_link, for example.

> +config SYS_COREBOOT
> +       bool
> +       default y
> +
> +config CBMEM_CONSOLE
> +       bool
> +       default y
> +
> +config VIDEO_COREBOOT
> +       bool
> +       default y
> \ No newline at end of file
> --
> 1.8.2.1
>

Also you should remove these options from include/configs/coreboot.h
to avoid build errors.

Regards,
Simon
Bin Meng Jan. 6, 2015, 2:14 a.m. UTC | #2
Hi Simon,

On Tue, Jan 6, 2015 at 9:50 AM, Simon Glass <sjg@chromium.org> wrote:
> Hi Bin,
>
> On 5 January 2015 at 08:28, Bin Meng <bmeng.cn@gmail.com> wrote:
>
> nit: coreboot-specific defines

OK.

>> There are many places in the U-Boot source tree which refer to
>> CONFIG_SYS_COREBOOT, CONFIG_CBMEM_CONSOLE and CONFIG_VIDEO_COREBOOT
>> that is currently defined in coreboot.h.
>>
>> Move them to arch/x86/cpu/coreboot/Kconfig so that we can switch
>> to board configuration file to build U-Boot later.
>>
>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>>
>> ---
>>
>> Changes in v2:
>> - New patch to move coreboot specific defines from coreboot.h to Kconfig
>>
>>  arch/x86/Kconfig              |  2 ++
>>  arch/x86/cpu/coreboot/Kconfig | 11 +++++++++++
>>  2 files changed, 13 insertions(+)
>>  create mode 100644 arch/x86/cpu/coreboot/Kconfig
>>
>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
>> index 1fabcce..01943e8 100644
>> --- a/arch/x86/Kconfig
>> +++ b/arch/x86/Kconfig
>> @@ -347,6 +347,8 @@ config TSC_FREQ_IN_MHZ
>>         help
>>           The running frequency in MHz of Time-Stamp Counter (TSC).
>>
>> +source "arch/x86/cpu/coreboot/Kconfig"
>> +
>>  source "arch/x86/cpu/ivybridge/Kconfig"
>>
>>  source "arch/x86/cpu/queensbay/Kconfig"
>> diff --git a/arch/x86/cpu/coreboot/Kconfig b/arch/x86/cpu/coreboot/Kconfig
>> new file mode 100644
>> index 0000000..d1454c5
>> --- /dev/null
>> +++ b/arch/x86/cpu/coreboot/Kconfig
>> @@ -0,0 +1,11 @@
>
> I think you need
>
> if TARGET_COREBOOT
> ...
> endif
> around this. We don't wan to use coreboot for chromebook_link, for example.
>

Yes, will fix.

>> +config SYS_COREBOOT
>> +       bool
>> +       default y
>> +
>> +config CBMEM_CONSOLE
>> +       bool
>> +       default y
>> +
>> +config VIDEO_COREBOOT
>> +       bool
>> +       default y
>> \ No newline at end of file
>> --
>> 1.8.2.1
>>
>
> Also you should remove these options from include/configs/coreboot.h
> to avoid build errors.

The coreboot.h is removed in the follow-up patch in this series.

Regards,
Bin
Simon Glass Jan. 6, 2015, 2:38 a.m. UTC | #3
Hi Bin,

On 5 January 2015 at 19:14, Bin Meng <bmeng.cn@gmail.com> wrote:
> Hi Simon,
>
> On Tue, Jan 6, 2015 at 9:50 AM, Simon Glass <sjg@chromium.org> wrote:
>> Hi Bin,
>>
>> On 5 January 2015 at 08:28, Bin Meng <bmeng.cn@gmail.com> wrote:
>>
>> nit: coreboot-specific defines
>
> OK.
>
>>> There are many places in the U-Boot source tree which refer to
>>> CONFIG_SYS_COREBOOT, CONFIG_CBMEM_CONSOLE and CONFIG_VIDEO_COREBOOT
>>> that is currently defined in coreboot.h.
>>>
>>> Move them to arch/x86/cpu/coreboot/Kconfig so that we can switch
>>> to board configuration file to build U-Boot later.
>>>
>>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>>>
>>> ---
>>>
>>> Changes in v2:
>>> - New patch to move coreboot specific defines from coreboot.h to Kconfig
>>>
>>>  arch/x86/Kconfig              |  2 ++
>>>  arch/x86/cpu/coreboot/Kconfig | 11 +++++++++++
>>>  2 files changed, 13 insertions(+)
>>>  create mode 100644 arch/x86/cpu/coreboot/Kconfig
>>>
>>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
>>> index 1fabcce..01943e8 100644
>>> --- a/arch/x86/Kconfig
>>> +++ b/arch/x86/Kconfig
>>> @@ -347,6 +347,8 @@ config TSC_FREQ_IN_MHZ
>>>         help
>>>           The running frequency in MHz of Time-Stamp Counter (TSC).
>>>
>>> +source "arch/x86/cpu/coreboot/Kconfig"
>>> +
>>>  source "arch/x86/cpu/ivybridge/Kconfig"
>>>
>>>  source "arch/x86/cpu/queensbay/Kconfig"
>>> diff --git a/arch/x86/cpu/coreboot/Kconfig b/arch/x86/cpu/coreboot/Kconfig
>>> new file mode 100644
>>> index 0000000..d1454c5
>>> --- /dev/null
>>> +++ b/arch/x86/cpu/coreboot/Kconfig
>>> @@ -0,0 +1,11 @@
>>
>> I think you need
>>
>> if TARGET_COREBOOT
>> ...
>> endif
>> around this. We don't wan to use coreboot for chromebook_link, for example.
>>
>
> Yes, will fix.
>
>>> +config SYS_COREBOOT
>>> +       bool
>>> +       default y
>>> +
>>> +config CBMEM_CONSOLE
>>> +       bool
>>> +       default y
>>> +
>>> +config VIDEO_COREBOOT
>>> +       bool
>>> +       default y
>>> \ No newline at end of file
>>> --
>>> 1.8.2.1
>>>
>>
>> Also you should remove these options from include/configs/coreboot.h
>> to avoid build errors.
>
> The coreboot.h is removed in the follow-up patch in this series.

Yes I see that, but then this patch will break the build - we do try
to keep things bisectable, so that you can check out any commit and
build it (in extremis it is OK if it doesn't actually work fully
though).

Regards,
Simon
Bin Meng Jan. 6, 2015, 2:59 a.m. UTC | #4
Hi Simon,

On Tue, Jan 6, 2015 at 10:38 AM, Simon Glass <sjg@chromium.org> wrote:
> Hi Bin,
>
> On 5 January 2015 at 19:14, Bin Meng <bmeng.cn@gmail.com> wrote:
>> Hi Simon,
>>
>> On Tue, Jan 6, 2015 at 9:50 AM, Simon Glass <sjg@chromium.org> wrote:
>>> Hi Bin,
>>>
>>> On 5 January 2015 at 08:28, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>
>>> nit: coreboot-specific defines
>>
>> OK.
>>
>>>> There are many places in the U-Boot source tree which refer to
>>>> CONFIG_SYS_COREBOOT, CONFIG_CBMEM_CONSOLE and CONFIG_VIDEO_COREBOOT
>>>> that is currently defined in coreboot.h.
>>>>
>>>> Move them to arch/x86/cpu/coreboot/Kconfig so that we can switch
>>>> to board configuration file to build U-Boot later.
>>>>
>>>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>>>>
>>>> ---
>>>>
>>>> Changes in v2:
>>>> - New patch to move coreboot specific defines from coreboot.h to Kconfig
>>>>
>>>>  arch/x86/Kconfig              |  2 ++
>>>>  arch/x86/cpu/coreboot/Kconfig | 11 +++++++++++
>>>>  2 files changed, 13 insertions(+)
>>>>  create mode 100644 arch/x86/cpu/coreboot/Kconfig
>>>>
>>>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
>>>> index 1fabcce..01943e8 100644
>>>> --- a/arch/x86/Kconfig
>>>> +++ b/arch/x86/Kconfig
>>>> @@ -347,6 +347,8 @@ config TSC_FREQ_IN_MHZ
>>>>         help
>>>>           The running frequency in MHz of Time-Stamp Counter (TSC).
>>>>
>>>> +source "arch/x86/cpu/coreboot/Kconfig"
>>>> +
>>>>  source "arch/x86/cpu/ivybridge/Kconfig"
>>>>
>>>>  source "arch/x86/cpu/queensbay/Kconfig"
>>>> diff --git a/arch/x86/cpu/coreboot/Kconfig b/arch/x86/cpu/coreboot/Kconfig
>>>> new file mode 100644
>>>> index 0000000..d1454c5
>>>> --- /dev/null
>>>> +++ b/arch/x86/cpu/coreboot/Kconfig
>>>> @@ -0,0 +1,11 @@
>>>
>>> I think you need
>>>
>>> if TARGET_COREBOOT
>>> ...
>>> endif
>>> around this. We don't wan to use coreboot for chromebook_link, for example.
>>>
>>
>> Yes, will fix.
>>
>>>> +config SYS_COREBOOT
>>>> +       bool
>>>> +       default y
>>>> +
>>>> +config CBMEM_CONSOLE
>>>> +       bool
>>>> +       default y
>>>> +
>>>> +config VIDEO_COREBOOT
>>>> +       bool
>>>> +       default y
>>>> \ No newline at end of file
>>>> --
>>>> 1.8.2.1
>>>>
>>>
>>> Also you should remove these options from include/configs/coreboot.h
>>> to avoid build errors.
>>
>> The coreboot.h is removed in the follow-up patch in this series.
>
> Yes I see that, but then this patch will break the build - we do try
> to keep things bisectable, so that you can check out any commit and
> build it (in extremis it is OK if it doesn't actually work fully
> though).
>

Understood, will fix.

Regards,
Bin
diff mbox

Patch

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 1fabcce..01943e8 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -347,6 +347,8 @@  config TSC_FREQ_IN_MHZ
 	help
 	  The running frequency in MHz of Time-Stamp Counter (TSC).
 
+source "arch/x86/cpu/coreboot/Kconfig"
+
 source "arch/x86/cpu/ivybridge/Kconfig"
 
 source "arch/x86/cpu/queensbay/Kconfig"
diff --git a/arch/x86/cpu/coreboot/Kconfig b/arch/x86/cpu/coreboot/Kconfig
new file mode 100644
index 0000000..d1454c5
--- /dev/null
+++ b/arch/x86/cpu/coreboot/Kconfig
@@ -0,0 +1,11 @@ 
+config SYS_COREBOOT
+	bool
+	default y
+
+config CBMEM_CONSOLE
+	bool
+	default y
+
+config VIDEO_COREBOOT
+	bool
+	default y