linux-mainline-on-arm-chromebooks icon indicating copy to clipboard operation
linux-mainline-on-arm-chromebooks copied to clipboard

arch/arm/kernel/asm-offsets.c:45:2: error: #error Your compiler is too buggy; it is known to miscompile kernels.

Open Marietto2008 opened this issue 1 year ago • 1 comments

Hello to everyone.

I've installed ubuntu 14.04 + kernel 3.13 + kvm on my Samsung Chromebook ARM "SNOW" model XE303C12. Almost everything works (but not the mouse usb). My goal is to upgrade ubuntu (kernel and userland and I want keep enabled kvm). So,I've got a new kernel sources from this link :

https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.4.244.tar.xz

I have unpacked it and I've added at the bottom of the .config file these lines :

CONFIG_HAVE_KVM_IRQCHIP=y
CONFIG_KVM_MMIO=y
CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y
CONFIG_VIRTUALIZATION=y
CONFIG_KVM=y
CONFIG_KVM_ARM_HOST=y
CONFIG_KVM_ARM_MAX_VCPUS=2
CONFIG_KVM_ARM_VGIC=y
CONFIG_KVM_ARM_TIMER=y

I tried to add those lines directly on the .config file editing the file with nano because as soon as I have wrote "make menuconfig",I saw that the KVM entries weren't there,as you can see :

https://ibb.co/WcXPTj5

unfortunately those lines don't stick on the kernel config file. When I save it and I reopen it,I see that the kvm lines have been deleted. (I'm trying to compile the 5.4 kernel directly on the chromebook using an SSH connection). As a second attempt I've used the kernel config file offered by virtual open systems on their guide here :

http://www.virtualopensystems.com/en/solutions/guides/kvm-on-chromebook/

I've added the kvm entries (this time they stuck) and then I tried to recompile it with the command :

ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make uImage dtbs -j2

and also :

make uImage dtbs -j2

but this is what happened :

root@marietto-Z87-HD3:/home/ziomario/Desktop/linux-5.4.244# ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make uImage dtbs -j4

scripts/kconfig/conf  --syncconfig Kconfig
  CC      scripts/mod/empty.o
  CC      scripts/mod/devicetable-offsets.s
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/mod/modpost.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTCC  scripts/mod/file2alias.o
  HOSTLD  scripts/mod/modpost
  CC      kernel/bounds.s
  CALL    scripts/atomic/check-atomics.sh
  CC      arch/arm/kernel/asm-offsets.s
arch/arm/kernel/asm-offsets.c:45:2: error: #error Your compiler is too buggy; it is known to miscompile kernels
 #error Your compiler is too buggy; it is known to miscompile kernels
  ^
arch/arm/kernel/asm-offsets.c:46:2: error: #error and result in filesystem corruption and oopses.
 #error and result in filesystem corruption and oopses.
  ^
make[2]: *** [arch/arm/kernel/asm-offsets.s] Error 1
make[1]: *** [prepare0] Error 2
make: *** [sub-make] Error 2

what you suggest me to do ? thanks.

This is the compiler that I'm using :

gcc --version
gcc (Ubuntu/Linaro 4.8.2-19ubuntu1) 4.8.2 

Marietto2008 avatar Jun 15 '23 10:06 Marietto2008

it may be of use to use a newer compiler, from new ubuntu versions. ubuntu 23.10 just released, so you could try that package.

aneeshlingala avatar Oct 13 '23 01:10 aneeshlingala