Disable systemd-boot from building with x32 IA Machine
cover Disable systemd-boot from building with x32 IA Machine
systemd-boot has to be build for the native IA instruction set size, this patch series is needed to disable it from building or being depended on by WIC when building x32 as DEFAULTTUNE and not just as multilib.
Sau!
Saul Wold (3):
arch-x86: Add x86-x32 to MACHINEOVERRIDES
wic: remove systemd-boot for x32
systemd-boot: Should not build x32
meta/classes/image_types_wic.bbclass | 1 + meta/conf/machine/include/x86/arch-x86.inc | 1 + meta/recipes-core/meta/wic-tools.bb | 1 + meta/recipes-core/systemd/systemd-boot_234.bb | 1 + 4 files changed, 4 insertions(+)
Signature · 1 line
2.11.0
PATCH 1/3 arch-x86: Add x86-x32 to MACHINEOVERRIDES
This is needed as an x32 more generic x32 override later in the OVERRIDES, currently linux-gnux32 is the first override, but we need a stronger (later in the list) x32 override to deal with some needed x32 dependency overrides.
--- meta/conf/machine/include/x86/arch-x86.inc | 1 + 1 file changed, 1 insertion(+)
meta/conf/machine/include/x86/arch-x86.inc +1 -0
@@ -26,6 +26,7 @@ TUNE_LDARGS += "${@bb.utils.contains('TUNE_FEATURES', 'mx32', '-m elf32_x86_64', TUNE_ASARGS += "${@bb.utils.contains('TUNE_FEATURES', 'mx32', '-x32', '', d)}" # user mode qemu doesn't support x32 MACHINE_FEATURES_BACKFILL_CONSIDERED_append = " ${@bb.utils.contains('TUNE_FEATURES', 'mx32', 'qemu-usermode', '', d)}" +MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'mx32', 'x86_x32:', '' ,d)}" # ELF64 ABI TUNEVALID[m64] = "IA32e (x86_64) ELF64 standard ABI"
Signature · 1 line
2.11.0
Re: [PATCH 1/3] arch-x86: Add x86-x32 to MACHINEOVERRIDES
Quoted 16 lines · Saul Wold
This is needed as an x32 more generic x32 override later in the OVERRIDES, currently linux-gnux32 is the first override, but we need a stronger (later in the list) x32 override to deal with some needed x32 dependency overrides.
Signed-off-by Saul Wold <[email protected]>---
meta/conf/machine/include/x86/arch-x86.inc | 1 +1 file changed, 1 insertion(+)meta/conf/machine/include/x86/arch-x86.inc +0
-0@@ -26,6 +26,7 @@ TUNE_LDARGS += "${@bb.utils.contains('TUNE_FEATURES', 'mx32', '-m elf32_x86_64',TUNE_ASARGS += "${@bb.utils.contains('TUNE_FEATURES', 'mx32', '-x32', '', d)}"
Quoted 6 lines
# user mode qemu doesn't support x32
MACHINE_FEATURES_BACKFILL_CONSIDERED_append = " ${@bb.utils.contains('TUNE_FEATURES', 'mx32', 'qemu-usermode', '', d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'mx32', 'x86_x32:', '' ,d)}"
# ELF64 ABI
TUNEVALID[m64] = "IA32e (x86_64) ELF64 standard ABI"I was ok with this until I realised the patch does not do what it says in the commit message, it adds "x86_x32", not "x86-x32". Since "_" is the override modifier, I worry about how this reacts with the rest of the system and I suspect its a bad idea. Is there a reason you didn't use "x86-x32" (following the example of x86-64)?
Cheers,
Richard
Re: [PATCH 1/3] arch-x86: Add x86-x32 to MACHINEOVERRIDES
Quoted 26 lines · Richard Purdie
Quoted 25 lines · Saul Wold
This is needed as an x32 more generic x32 override later in the OVERRIDES, currently linux-gnux32 is the first override, but we need a stronger (later in the list) x32 override to deal with some needed x32 dependency overrides.
Signed-off-by Saul Wold <[email protected]>--- meta/conf/machine/include/x86/arch-x86.inc | 1 + 1 file changed, 1 insertion(+)meta/conf/machine/include/x86/arch-x86.inc +0
-0@@ -26,6 +26,7 @@ TUNE_LDARGS += "${@bb.utils.contains('TUNE_FEATUR ES', 'mx32', '-m elf32_x86_64', TUNE_ASARGS += "${@bb.utils.contains('TUNE_FEATURES', 'mx32', '-x32', '', d)}"
# user mode qemu doesn't support x32 MACHINE_FEATURES_BACKFILL_CONSIDERED_append = " ${@bb.utils.contai ns('TUNE_FEATURES', 'mx32', 'qemu-usermode', '', d)}" +MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'mx32', 'x86_x32:', '' ,d)}"
Quoted 10 lines
Quoted 2 lines
# ELF64 ABI
TUNEVALID[m64] = "IA32e (x86_64) ELF64 standard ABI"I was ok with this until I realised the patch does not do what it says
in the commit message, it adds "x86_x32", not "x86-x32". Since "_" is the override modifier, I worry about how this reacts with the rest of the system and I suspect its a bad idea. Is there a reason you didn't use "x86-x32" (following the example of x86-64)?
Typo, possibly or had not considered the override issue.
v2 in flight shortly.
Sau!
Quoted 3 lines
Cheers,
Richard
PATCH 2/3 wic: remove systemd-boot for x32
In reply to Saul WoldCurrently systemd-boot actually incorporates libgcc, since the systemd-boot needs to be built with 64bit instructions it can not use the x32 based libgcc.
Use the new override to ensure it gets overriden, linux-gnux32 could not be used because x86-64 has higher priority.
--- meta/classes/image_types_wic.bbclass | 1 + meta/recipes-core/meta/wic-tools.bb | 1 + 2 files changed, 2 insertions(+)
meta/classes/image_types_wic.bbclass +1 -0
@@ -45,6 +45,7 @@ WKS_FILE_DEPENDS_DEFAULT = "syslinux-native bmap-tools-native cdrtools-native bt WKS_FILE_DEPENDS_BOOTLOADERS = "" WKS_FILE_DEPENDS_BOOTLOADERS_x86 = "syslinux grub-efi systemd-boot" WKS_FILE_DEPENDS_BOOTLOADERS_x86-64 = "syslinux grub-efi systemd-boot" +WKS_FILE_DEPENDS_BOOTLOADERS_x86_x32 = "syslinux grub-efi" WKS_FILE_DEPENDS ??= "${WKS_FILE_DEPENDS_DEFAULT} ${WKS_FILE_DEPENDS_BOOTLOADERS}"
meta/recipes-core/meta/wic-tools.bb +1 -0
@@ -10,6 +10,7 @@ DEPENDS = "\ " DEPENDS_append_x86 = " syslinux grub-efi systemd-boot" DEPENDS_append_x86-64 = " syslinux grub-efi systemd-boot" +DEPENDS_append_x86-x32 = " syslinux grub-efi" INHIBIT_DEFAULT_DEPS = "1"
Signature · 1 line
2.11.0
Re: [PATCH 2/3] wic: remove systemd-boot for x32
Quoted 3 lines · Saul Wold
Currently systemd-boot actually incorporates libgcc, since the systemd-boot needs to be built with 64bit instructions it can not use the x32 based libgcc.
I'm a little confused by this since the point of x32 is that it uses all the 64 bit instructions with a 32 bit address space?
Cheers,
Richard
Re: [PATCH 2/3] wic: remove systemd-boot for x32
In reply to Saul WoldQuoted 18 lines · Saul Wold
Currently systemd-boot actually incorporates libgcc, since the systemd-boot needs to be built with 64bit instructions it can not use the x32 based libgcc.
Use the new override to ensure it gets overriden, linux-gnux32 could not be used because x86-64 has higher priority.
Signed-off-by Saul Wold <[email protected]>--- meta/classes/image_types_wic.bbclass | 1 + meta/recipes-core/meta/wic-tools.bb | 1 + 2 files changed, 2 insertions(+)meta/classes/image_types_wic.bbclass +0
-0
meta/classes/image_types_wic.bbclass WKS_FILE_DEPENDS_DEFAULT = "syslinux-native bmap-tools-native cdrtools-native bt · line 48
Quoted 4 lines
meta/classes/image_types_wic.bbclass +1
-0@@ -45,6 +45,7 @@ WKS_FILE_DEPENDS_DEFAULT = "syslinux-native bmap-tools-native cdrtools-native bt WKS_FILE_DEPENDS_BOOTLOADERS = "" WKS_FILE_DEPENDS_BOOTLOADERS_x86 = "syslinux grub-efi systemd-boot" WKS_FILE_DEPENDS_BOOTLOADERS_x86-64 = "syslinux grub-efi systemd-boot" +WKS_FILE_DEPENDS_BOOTLOADERS_x86_x32 = "syslinux grub-efi"
this will confuse with x86 ovrride. shouldnt this be x86-32 ?
Quoted 23 lines
meta/classes/image_types_wic.bbclass +0
-0WKS_FILE_DEPENDS ??= "${WKS_FILE_DEPENDS_DEFAULT} ${WKS_FILE_DEPENDS_BOOTLOADERS}"meta/recipes-core/meta/wic-tools.bb +1
-1@@ -10,6 +10,7 @@ DEPENDS = "\ " DEPENDS_append_x86 = " syslinux grub-efi systemd-boot" DEPENDS_append_x86-64 = " syslinux grub-efi systemd-boot" +DEPENDS_append_x86-x32 = " syslinux grub-efi" INHIBIT_DEFAULT_DEPS = "1" --2.11.0
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
PATCH 3/3 systemd-boot: Should not build x32
In reply to Saul WoldSince systemd-boot is a bootloader, it needs to be built for the native IA instruction set size and x32 is not valid.
--- meta/recipes-core/systemd/systemd-boot_234.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-core/systemd/systemd-boot_234.bb +1 -0
@@ -21,6 +21,7 @@ EXTRA_OECONF = " --enable-gnuefi \ # Imported from the old gummiboot recipe TUNE_CCARGS_remove = "-mfpmath=sse" COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux" +COMPATIBLE_HOST_linux-gnux32 = "null" do_compile() { SYSTEMD_BOOT_EFI_ARCH="ia32"
Signature · 1 line
2.11.0