hexdump0815 / linux-mainline-on-arm-chromebooks

running linux mainline on arm chromebooks - for example: samsung xe303c12 and xe503c12 (snow and peach), acer c100, c101 and c201 (veyron speedy, minnie etc. and gru bob and kevin), medion s2013 and s2015 (veyron jaq, mighty etc.), acer cb5 311 (nyan big), lenovo n23, acer r13 (oak elm and hana), lenovo duet (kukui krane) and most probably many many more over time ...
144 stars 10 forks source link

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

Open Marietto2008 opened 1 year ago

Marietto2008 commented 1 year ago

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 
aneeshlingala commented 9 months ago

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.