[U-Boot] [PATCH v2 1/1] x86: provide CONFIG_BUILD_ROM
Bin Meng
bmeng.cn at gmail.com
Sat Oct 7 03:53:41 UTC 2017
Hi Heinrich,
On Mon, Sep 25, 2017 at 10:13 AM, Simon Glass <sjg at chromium.org> wrote:
> Hi Heinrich,
>
> On 19 September 2017 at 11:44, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>> Up to now we depended on an exported variable to build u-boot.rom.
>> What we build should be specified by the configuration file.
>>
>> With this patch the export variable is deprecated and replaced by the
>> Kconfig option CONFIG_BUILD_ROM. To make the change as smooth as
>> possible 'export BUILD_ROM' is still usable but removed from the
>> documentation.
>
> I don' think you cancan deprecate that, since we need it for the build
> system to control what is built. Most people won't have the binary
> blobs available, and buildman needs to succeed for all boards.
>
> So I think you are adding an option which can never be enabled in
> mainline except for qemu. I think you should change the wording here.
>
>>
>> This option depends on CONFIG_X86 and is selected in
>> qemu-x86_defconfig and qemu-x86_64_defconfig.
>>
>> Cc: Bin Meng <bmeng.cn at gmail.com>
>> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
>> ---
>> v2
>> Enable CONFIG_BUILD_ROM for qemu-x86_64_defconfig
>> as suggested by Bin.
>> Fix typos.
>> Remove 'default n'
>> ---
>> Kconfig | 10 ++++++++++
>> Makefile | 2 +-
>> configs/qemu-x86_64_defconfig | 1 +
>> configs/qemu-x86_defconfig | 1 +
>> doc/README.x86 | 2 +-
>> 5 files changed, 14 insertions(+), 2 deletions(-)
>>
>> diff --git a/Kconfig b/Kconfig
>> index 238fa3e1ed..989d81c04c 100644
>> --- a/Kconfig
>> +++ b/Kconfig
>> @@ -158,6 +158,15 @@ config PHYS_64BIT
>> This can be used not only for 64bit SoCs, but also for
>> large physical address extention on 32bit SoCs.
>>
>> +config BUILD_ROM
>> + bool "Build U-Boot as BIOS replacement"
>> + depends on X86
>> + help
>> + This option allows to build a ROM version of U-Boot.
>> + The build process generally requires several binary blobs
>> + which are not shipped in the U-Boot source tree.
>> + Please, see doc/README.x86 for details.
>> +
>> endmenu # General setup
>>
>> menu "Boot images"
>> diff --git a/Makefile b/Makefile
>> index 8250b3409a..50fe0003f5 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -796,7 +796,7 @@ ALL-$(CONFIG_REMAKE_ELF) += u-boot.elf
>> ALL-$(CONFIG_EFI_APP) += u-boot-app.efi
>> ALL-$(CONFIG_EFI_STUB) += u-boot-payload.efi
>>
>> -ifneq ($(BUILD_ROM),)
>> +ifneq ($(BUILD_ROM)$(CONFIG_BUILD_ROM),)
>> ALL-$(CONFIG_X86_RESET_VECTOR) += u-boot.rom
>> endif
>>
>> diff --git a/configs/qemu-x86_64_defconfig b/configs/qemu-x86_64_defconfig
>> index 67e9a45fbc..a6a14a8de9 100644
>> --- a/configs/qemu-x86_64_defconfig
>> +++ b/configs/qemu-x86_64_defconfig
>> @@ -1,4 +1,5 @@
>> CONFIG_X86=y
>> +CONFIG_BUILD_ROM=y
>> CONFIG_SPL_LIBCOMMON_SUPPORT=y
>> CONFIG_SPL_LIBGENERIC_SUPPORT=y
>> CONFIG_SYS_MALLOC_F_LEN=0x1000
>> diff --git a/configs/qemu-x86_defconfig b/configs/qemu-x86_defconfig
>> index 7ce97ff091..346abf621d 100644
>> --- a/configs/qemu-x86_defconfig
>> +++ b/configs/qemu-x86_defconfig
>> @@ -1,4 +1,5 @@
>> CONFIG_X86=y
>> +CONFIG_BUILD_ROM=y
>> CONFIG_MAX_CPUS=2
>> CONFIG_DEFAULT_DEVICE_TREE="qemu-x86_i440fx"
>> CONFIG_SMP=y
>> diff --git a/doc/README.x86 b/doc/README.x86
>> index c96a22cb08..226c9af281 100644
>> --- a/doc/README.x86
>> +++ b/doc/README.x86
>> @@ -82,7 +82,7 @@ shipped in the U-Boot source tree. Due to this reason, the u-boot.rom build is
>> not turned on by default in the U-Boot source tree. Firstly, you need turn it
>> on by enabling the ROM build:
>>
>> -$ export BUILD_ROM=y
>> +CONFIG_BUILD_ROM=y
>
> I think we should keep this documentation and show both options.
>
Can you please respin to address Simon's comments if you would like to
get this mainline?
Regards,
Bin
More information about the U-Boot
mailing list