roms: Allow the EFIROM variable to be overridden
PATCH 1/1 roms: Allow the EFIROM variable to be overridden
Since commit f590a812c210 we build the EfiRom utility unconditionally. This has been tested on all the Linux distribution providing continuous integration (namely Debian and Fedora). Not all distributions are able to build the EfiRom without specific patches (In particular SUSE which enforces the PIE protection, see [*]). Restore the possibility to other distributions to override the EFIROM variable.
[*] https://lists.opensuse.org/opensuse-factory/2017-06/msg00403.html
--- roms/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
roms/Makefile +4 -1
@@ -47,7 +47,7 @@ SEABIOS_EXTRAVERSION="-prebuilt.qemu.org" # We need that to combine multiple images (legacy bios, # efi ia32, efi x64) into a single rom binary. # -EFIROM = edk2/BaseTools/Source/C/bin/EfiRom +EFIROM ?= edk2/BaseTools/Source/C/bin/EfiRom default: @echo "nothing is build by default"
@@ -120,8 +120,11 @@ build-efi-roms: build-pxe-roms $(patsubst %,bin-i386-efi/%.efidrv,$(pxerom_targets)) \ $(patsubst %,bin-x86_64-efi/%.efidrv,$(pxerom_targets)) +# Do not compile $(EFIROM) if the variable is overridden +ifeq "$(origin EFIROM)" "file" $(EFIROM): $(MAKE) -C edk2/BaseTools +endif slof: $(MAKE) -C SLOF CROSS=$(powerpc64_cross_prefix) qemu
Signature · 1 line
2.20.1
Am Fri, 5 Apr 2019 13:55:29 +0200
schrieb Philippe Mathieu-Daudé <[email protected]>:
Quoted 1 line
+EFIROM ?= edk2/BaseTools/Source/C/bin/EfiRom
This name is too generic and will conflict with ipxe.git if any of "bios seavgabios pxerom" is used for 'make -C roms'.
Olaf
Quoted 6 lines · Olaf Hering
Am Fri, 5 Apr 2019 13:55:29 +0200
schrieb Philippe Mathieu-Daudé <[email protected]>:Quoted 1 line
+EFIROM ?= edk2/BaseTools/Source/C/bin/EfiRom
This name is too generic and will conflict with ipxe.git if any of "bios seavgabios pxerom" is used for 'make -C roms'.
This is similar to commit c9d18c1c150c84e where you said "it used to work", what is the difference?
IPXE override the EFIROM variable, so there is no change there.
How can I trigger a SUSE package build with this patch?
Thanks,
Phil.
Am Fri, 5 Apr 2019 14:59:16 +0200
schrieb Philippe Mathieu-Daudé <[email protected]>:
Quoted 10 lines · Olaf Hering
Quoted 6 lines
Am Fri, 5 Apr 2019 13:55:29 +0200
schrieb Philippe Mathieu-Daudé <[email protected]>:Quoted 1 line
+EFIROM ?= edk2/BaseTools/Source/C/bin/EfiRom
This name is too generic and will conflict with ipxe.git if any of "bios seavgabios pxerom" is used for 'make -C roms'.
This is similar to commit
c9d18c1c150c84ewhere you said "it used to work", what is the difference?
Before there was no need to pass EFIROM= to make, so ipxe.git was happy. Now it is required, and ipxe.git gets an unexpected value.
Quoted 1 line
IPXE override the EFIROM variable, so there is no change there.
For me ipxe tries to rm $(type -P EfiRom). Let me double check.
Quoted 1 line
How can I trigger a SUSE package build with this patch?
Not so easy without a VM.
Olaf
Quoted 13 lines · Olaf Hering
Am Fri, 5 Apr 2019 14:59:16 +0200
schrieb Philippe Mathieu-Daudé <[email protected]>:Quoted 10 lines · Olaf Hering
Quoted 6 lines
Am Fri, 5 Apr 2019 13:55:29 +0200
schrieb Philippe Mathieu-Daudé <[email protected]>:Quoted 1 line
+EFIROM ?= edk2/BaseTools/Source/C/bin/EfiRom
This name is too generic and will conflict with ipxe.git if any of "bios seavgabios pxerom" is used for 'make -C roms'.
This is similar to commit
c9d18c1c150c84ewhere you said "it used to work", what is the difference?
Quoted 6 lines
Before there was no need to pass EFIROM= to make, so ipxe.git was happy. Now it is required, and ipxe.git gets an unexpected value.
Quoted 1 line
IPXE override the EFIROM variable, so there is no change there.
For me ipxe tries to rm $(type -P EfiRom). Let me double check.
Eh you are right...
$ make -C roms EFIROM=/bin/true clean
[...]
make -C ipxe/src veryclean
make[1]: Entering directory '/home/phil/source/qemu/roms/ipxe/src'
rm -f bin{,-*}/*.* bin{,-*}/.certificate.* bin{,-*}/.certificates.*
bin{,-*}/.private_key.* bin{,-*}/errors bin{,-*}/NIC ./util/zbin
./util/elf2efi32 ./util/elf2efi64 /bin/true ./util/efifatbin
./util/iccfix ./util/einfo TAGS bin{,-*}/symtab
rm: cannot remove '/bin/true': Permission denied
make[1]: *** [Makefile.housekeeping:1564: clean] Error 1This seems to be a pre-existent IPXE bug:
$ git checkout c9d18c1c150c84e7a976df989ad04ddf01083f46 $ make -C roms EFIROM=/bin/true clean [...] rm: cannot remove '/bin/true': Permission denied make[1]: *** [Makefile.housekeeping:1564: clean] Error 1
Quoted 3 lines
Quoted 1 line
How can I trigger a SUSE package build with this patch?
Not so easy without a VM.
Oh, unfortunate :(
Quoted 3 lines
Olaf
Quoted 42 lines · Philippe Mathieu-Daudé
Quoted 13 lines · Olaf Hering
Am Fri, 5 Apr 2019 14:59:16 +0200
schrieb Philippe Mathieu-Daudé <[email protected]>:Quoted 10 lines · Olaf Hering
Quoted 6 lines
Am Fri, 5 Apr 2019 13:55:29 +0200
schrieb Philippe Mathieu-Daudé <[email protected]>:Quoted 1 line
+EFIROM ?= edk2/BaseTools/Source/C/bin/EfiRom
This name is too generic and will conflict with ipxe.git if any of "bios seavgabios pxerom" is used for 'make -C roms'.
This is similar to commit
c9d18c1c150c84ewhere you said "it used to work", what is the difference?Quoted 6 lines
Before there was no need to pass EFIROM= to make, so ipxe.git was happy. Now it is required, and ipxe.git gets an unexpected value.
Quoted 1 line
IPXE override the EFIROM variable, so there is no change there.
For me ipxe tries to rm $(type -P EfiRom). Let me double check.
Eh you are right...
$ make -C roms EFIROM=/bin/true clean [...] make -C ipxe/src veryclean make[1]: Entering directory '/home/phil/source/qemu/roms/ipxe/src' rm -f bin{,-*}/*.* bin{,-*}/.certificate.* bin{,-*}/.certificates.* bin{,-*}/.private_key.* bin{,-*}/errors bin{,-*}/NIC ./util/zbin ./util/elf2efi32 ./util/elf2efi64 /bin/true ./util/efifatbin ./util/iccfix ./util/einfo TAGS bin{,-*}/symtab rm: cannot remove '/bin/true': Permission denied make[1]: *** [Makefile.housekeeping:1564: clean] Error 1This seems to be a pre-existent IPXE bug:
$ git checkout c9d18c1c150c84e7a976df989ad04ddf01083f46 $ make -C roms EFIROM=/bin/true clean [...] rm: cannot remove '/bin/true': Permission denied make[1]: *** [Makefile.housekeeping:1564: clean] Error 1
Quoted 10 lines
Quoted 3 lines
Quoted 1 line
How can I trigger a SUSE package build with this patch?
Not so easy without a VM.
Oh, unfortunate :(
Quoted 3 lines
Olaf
Let's keep it simple: set a config variable, then
check it here.
Signature · 1 line
MST
Am Fri, 5 Apr 2019 19:17:35 -0400
schrieb "Michael S. Tsirkin" <[email protected]>:
Quoted 1 line
Let's keep it simple: set a config variable, then check it here.
Better revert f590a812c21074e82228de3e1dfb57b75fc02b62 and 23858f4092fc9ebf9e7a5e5110e44abef6fc6643 for the time being. It looks like a no-op right now. How did people get away without the system-wide EfiRom until now? It is certainly only a very small inconvenience to build a private EfiRom for those who can not possibly receive it from the vendor.
Also roms/ seems to be unable to receive configure options.
Olaf
Quoted 6 lines · Olaf Hering
Am Fri, 5 Apr 2019 19:17:35 -0400
schrieb "Michael S. Tsirkin" <[email protected]>:Quoted 1 line
Let's keep it simple: set a config variable, then check it here.
Better revert
f590a812c21074e82228de3e1dfb57b75fc02b62and23858f4092fc9ebf9e7a5e5110e44abef6fc6643for the time being. It looks like a no-op right now. How did people get away without the system-wide EfiRom until now? It is certainly only a very small inconvenience to build a private EfiRom for those who can not possibly receive it from the vendor.
But f590a812c210 and 23858f4092fc are used for ACPI UEFI testing, what about the v2 which looks "simple" to me:
https://lists.gnu.org/archive/html/qemu-devel/2019-04/msg01033.html
Quoted 4 lines
Also roms/ seems to be unable to receive configure options.
Olaf