Skip to content
This repository was archived by the owner on Apr 13, 2024. It is now read-only.

Commit ab8cab8

Browse files
committed
buildroot: x86: Don't optimize for the corei7 variant
Joel reported in #120 that when passing 'init=/bin/bash' via the kernel cmdline, there is a nice panic that happens on boot due to an invalid opcode. Nick suggested that it was possible that the rootfs was compiled with ISA extensions that aren't supported by QEMU's virtual CPU, which is exactly the case. When I initially created these images for myself, I selected 'CONFIG_BR2_x86_corei7=y' (as that's what I was using at the time), which selects a bunch of ISA extensions[1]: config BR2_x86_corei7 bool "corei7" select BR2_X86_CPU_HAS_MMX select BR2_X86_CPU_HAS_SSE select BR2_X86_CPU_HAS_SSE2 select BR2_X86_CPU_HAS_SSE3 select BR2_X86_CPU_HAS_SSSE3 select BR2_X86_CPU_HAS_SSE4 select BR2_X86_CPU_HAS_SSE42 I have never noticed a problem because I always use the '-cpu host -enable-kvm' options, which makes QEMU's CPU emulate the host's (which supported those extensions). QEMU's default cpu "qemu64" only supports SSE3[2], which Buildroot's default target variant "nocona" supports as well. Use that variant and rebuild the images so there are no more issues with 'init=/bin/bash'. Presubmit: https://travis-ci.com/nathanchance/continuous-integration/builds/99019841 [1]: https://github.com/buildroot/buildroot/blob/master/arch/Config.in.x86 [2]: https://github.com/qemu/qemu/blob/abd5fc4c862d/target/i386/cpu.c#L1488 [skip ci] Closes: #120 Reported-by: Joel Stanley <[email protected]> Suggested-by: Nick Desaulniers <[email protected]> Signed-off-by: Nathan Chancellor <[email protected]>
1 parent 1ffd550 commit ab8cab8

File tree

3 files changed

+0
-1
lines changed

3 files changed

+0
-1
lines changed

buildroot/x86_64.config

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
BR2_x86_64=y
2-
BR2_x86_corei7=y
32
BR2_OPTIMIZE_3=y
43
BR2_KERNEL_HEADERS_4_4=y
54
BR2_BINUTILS_VERSION_2_31_X=y

images/x86_64/rootfs.cpio

0 Bytes
Binary file not shown.

images/x86_64/rootfs.ext4

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)