[U-Boot] [PATCH 1/1] x86: provide CONFIG_BUILD_ROM
Bin Meng
bmeng.cn at gmail.com
Tue Sep 19 05:54:30 UTC 2017
Hi Heinrich,
On Sun, Sep 17, 2017 at 7:57 PM, 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.
>
> This option depends on CONFIG_X86 and is selected in qemu-x86_defconfig.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
> Kconfig | 10 ++++++++++
> Makefile | 2 +-
> configs/qemu-x86_defconfig | 1 +
> doc/README.x86 | 2 +-
> 4 files changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/Kconfig b/Kconfig
> index 238fa3e1ed..7b782298bf 100644
> --- a/Kconfig
> +++ b/Kconfig
> @@ -158,6 +158,16 @@ 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"
nits: U-Boot
> + depends on X86
> + default n
nits: this is not needed as 'n' is the default one.
> + help
> + This option allows to BUILD a ROM version of U-BOOT.
nits: 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 detials.
> +
> 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_defconfig b/configs/qemu-x86_defconfig
> index d84e1d7dc9..60c2e3c404 100644
> --- a/configs/qemu-x86_defconfig
> +++ b/configs/qemu-x86_defconfig
We should also enable this on qemu-x86_64_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 c542a6965c..4971f4b95e 100644
> --- a/doc/README.x86
> +++ b/doc/README.x86
> @@ -81,7 +81,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
>
> This tells the Makefile to build u-boot.rom as a target.
>
> --
For non-QEMU targets, this requires an additional step after we do
'make xxx_defconfig', I am not sure if that's convenient.
Simon, what do you think about this patch?
Regards,
Bin
More information about the U-Boot
mailing list