Message ID | 20171014071015.15359-1-xypron.glpk@gmx.de |
---|---|
State | Superseded |
Delegated to: | Bin Meng |
Headers | show |
Series | [U-Boot,v3,1/1] x86: provide CONFIG_BUILD_ROM | expand |
Hi Heinrich, On Sat, Oct 14, 2017 at 3:10 PM, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote: > Up to now we depended on an exported variable to build u-boot.rom. > We should be able to specify it in the configuration file, too. > > With this patch this becomes possible using the new Kconfig option > CONFIG_BUILD_ROM. > > This option depends on CONFIG_X86 and is selected in > qemu-x86_defconfig and qemu-x86_64_defconfig. > > Cc: Simon Glass <sjg@chromium.org> > Cc: Bin Meng <bmeng.cn@gmail.com> > Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> > --- > v3 > Rework the documentation. Simon suggested not to deprecate > the export variable. > v2 > Enable CONFIG_BUILD_ROM for qemu-x86_64_defconfig > as suggested by Bin. > Fix typos. > --- > Kconfig | 10 ++++++++++ > Makefile | 2 +- > configs/qemu-x86_64_defconfig | 1 + > configs/qemu-x86_defconfig | 1 + > doc/README.x86 | 10 +++++++--- > 5 files changed, 20 insertions(+), 4 deletions(-) > > diff --git a/Kconfig b/Kconfig > index d951e9f804..70508591fd 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" > + 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. > + 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 888486b296..f26ab77f6a 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 071dca6eee..c3a97cbdda 100644 > --- a/configs/qemu-x86_64_defconfig > +++ b/configs/qemu-x86_64_defconfig > @@ -1,4 +1,5 @@ > CONFIG_X86=y > +CONFIG_BUILD_ROM=y nits: the insert position is not correct > 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 cdbc5c4a6e..e4a3e31ad5 100644 > --- a/configs/qemu-x86_defconfig > +++ b/configs/qemu-x86_defconfig > @@ -1,4 +1,5 @@ > CONFIG_X86=y > +CONFIG_BUILD_ROM=y ditto. > 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..1e3af5af90 100644 > --- a/doc/README.x86 > +++ b/doc/README.x86 > @@ -80,11 +80,15 @@ Building a ROM version of U-Boot (hereafter referred to as u-boot.rom) is a > little bit tricky, as generally it requires several binary blobs which are not > 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: > +on by enabling the ROM build either via an environment variable > > -$ export BUILD_ROM=y > + $ export BUILD_ROM=y > > -This tells the Makefile to build u-boot.rom as a target. > +or via configuration > + > + CONFIG_BUILD_ROM=y > + > +Both tell the Makefile to build u-boot.rom as a target. > > --- > Other than above, Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> Regards, Bin
On 10/14/2017 02:31 PM, Bin Meng wrote: > Hi Heinrich, > > On Sat, Oct 14, 2017 at 3:10 PM, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote: >> Up to now we depended on an exported variable to build u-boot.rom. >> We should be able to specify it in the configuration file, too. >> >> With this patch this becomes possible using the new Kconfig option >> CONFIG_BUILD_ROM. >> >> This option depends on CONFIG_X86 and is selected in >> qemu-x86_defconfig and qemu-x86_64_defconfig. >> >> Cc: Simon Glass <sjg@chromium.org> >> Cc: Bin Meng <bmeng.cn@gmail.com> >> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> >> --- >> v3 >> Rework the documentation. Simon suggested not to deprecate >> the export variable. >> v2 >> Enable CONFIG_BUILD_ROM for qemu-x86_64_defconfig >> as suggested by Bin. >> Fix typos. >> --- >> Kconfig | 10 ++++++++++ >> Makefile | 2 +- >> configs/qemu-x86_64_defconfig | 1 + >> configs/qemu-x86_defconfig | 1 + >> doc/README.x86 | 10 +++++++--- >> 5 files changed, 20 insertions(+), 4 deletions(-) >> >> diff --git a/Kconfig b/Kconfig >> index d951e9f804..70508591fd 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" >> + 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. >> + 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 888486b296..f26ab77f6a 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 071dca6eee..c3a97cbdda 100644 >> --- a/configs/qemu-x86_64_defconfig >> +++ b/configs/qemu-x86_64_defconfig >> @@ -1,4 +1,5 @@ >> CONFIG_X86=y >> +CONFIG_BUILD_ROM=y > > nits: the insert position is not correct I could not find any sorting pattern in the file. As the Konfig option determines the target I moved it up. Where do you expect the line? Regards Heinrich > >> 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 cdbc5c4a6e..e4a3e31ad5 100644 >> --- a/configs/qemu-x86_defconfig >> +++ b/configs/qemu-x86_defconfig >> @@ -1,4 +1,5 @@ >> CONFIG_X86=y >> +CONFIG_BUILD_ROM=y > > ditto. > >> 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..1e3af5af90 100644 >> --- a/doc/README.x86 >> +++ b/doc/README.x86 >> @@ -80,11 +80,15 @@ Building a ROM version of U-Boot (hereafter referred to as u-boot.rom) is a >> little bit tricky, as generally it requires several binary blobs which are not >> 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: >> +on by enabling the ROM build either via an environment variable >> >> -$ export BUILD_ROM=y >> + $ export BUILD_ROM=y >> >> -This tells the Makefile to build u-boot.rom as a target. >> +or via configuration >> + >> + CONFIG_BUILD_ROM=y >> + >> +Both tell the Makefile to build u-boot.rom as a target. >> >> --- >> > > Other than above, > Reviewed-by: Bin Meng <bmeng.cn@gmail.com> > Tested-by: Bin Meng <bmeng.cn@gmail.com> > > Regards, > Bin >
Hi Heinrich, On Sun, Oct 15, 2017 at 5:10 PM, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote: > On 10/14/2017 02:31 PM, Bin Meng wrote: >> Hi Heinrich, >> >> On Sat, Oct 14, 2017 at 3:10 PM, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote: >>> Up to now we depended on an exported variable to build u-boot.rom. >>> We should be able to specify it in the configuration file, too. >>> >>> With this patch this becomes possible using the new Kconfig option >>> CONFIG_BUILD_ROM. >>> >>> This option depends on CONFIG_X86 and is selected in >>> qemu-x86_defconfig and qemu-x86_64_defconfig. >>> >>> Cc: Simon Glass <sjg@chromium.org> >>> Cc: Bin Meng <bmeng.cn@gmail.com> >>> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> >>> --- >>> v3 >>> Rework the documentation. Simon suggested not to deprecate >>> the export variable. >>> v2 >>> Enable CONFIG_BUILD_ROM for qemu-x86_64_defconfig >>> as suggested by Bin. >>> Fix typos. >>> --- >>> Kconfig | 10 ++++++++++ >>> Makefile | 2 +- >>> configs/qemu-x86_64_defconfig | 1 + >>> configs/qemu-x86_defconfig | 1 + >>> doc/README.x86 | 10 +++++++--- >>> 5 files changed, 20 insertions(+), 4 deletions(-) >>> >>> diff --git a/Kconfig b/Kconfig >>> index d951e9f804..70508591fd 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" >>> + 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. >>> + 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 888486b296..f26ab77f6a 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 071dca6eee..c3a97cbdda 100644 >>> --- a/configs/qemu-x86_64_defconfig >>> +++ b/configs/qemu-x86_64_defconfig >>> @@ -1,4 +1,5 @@ >>> CONFIG_X86=y >>> +CONFIG_BUILD_ROM=y >> >> nits: the insert position is not correct > > I could not find any sorting pattern in the file. > As the Konfig option determines the target I moved it up. > Where do you expect the line? > Normally I do it like this: $ make qemu-x86_defconfig $ make savedefconfig The generated defconfig file is the sorted one. You can check the difference between defconfig and qemu-x86_defconfig. Regards, Bin
diff --git a/Kconfig b/Kconfig index d951e9f804..70508591fd 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" + depends on X86 + default n + 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 888486b296..f26ab77f6a 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 071dca6eee..c3a97cbdda 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 cdbc5c4a6e..e4a3e31ad5 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..1e3af5af90 100644 --- a/doc/README.x86 +++ b/doc/README.x86 @@ -80,11 +80,15 @@ Building a ROM version of U-Boot (hereafter referred to as u-boot.rom) is a little bit tricky, as generally it requires several binary blobs which are not 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: +on by enabling the ROM build either via an environment variable -$ export BUILD_ROM=y + $ export BUILD_ROM=y -This tells the Makefile to build u-boot.rom as a target. +or via configuration + + CONFIG_BUILD_ROM=y + +Both tell the Makefile to build u-boot.rom as a target. ---
Up to now we depended on an exported variable to build u-boot.rom. We should be able to specify it in the configuration file, too. With this patch this becomes possible using the new Kconfig option CONFIG_BUILD_ROM. This option depends on CONFIG_X86 and is selected in qemu-x86_defconfig and qemu-x86_64_defconfig. Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> --- v3 Rework the documentation. Simon suggested not to deprecate the export variable. v2 Enable CONFIG_BUILD_ROM for qemu-x86_64_defconfig as suggested by Bin. Fix typos. --- Kconfig | 10 ++++++++++ Makefile | 2 +- configs/qemu-x86_64_defconfig | 1 + configs/qemu-x86_defconfig | 1 + doc/README.x86 | 10 +++++++--- 5 files changed, 20 insertions(+), 4 deletions(-)