Recompiling 9.0 using 5.8 Kernel

430 views
Skip to first unread message

BrokenE39

unread,
Nov 22, 2020, 3:26:05 PM11/22/20
to Android-x86
Total newbie in this area as some of you already know. But I see oujia and others have successfully build a custom image using the newer 5.8 kernel. I'm curious in trying this out but not exactly sure of the process. Questions as below:
  • I know 5.8 is not a Android Common Kernel
  • I assume straight replacing the kernel folder with 5.8 source will not work
  • What about GCC and Clang?
  • What about the build config files in the kernel folder? I assume these aren't automatically generated but placed there as tell the compiler how to build the kernel depending on the device config selected
I been searching using Google but couldn't exactly find the answer I'm looking for. If you have any suggested readings on this topic, please let me know.

Thanks!

Mauro Rossi

unread,
Nov 22, 2020, 6:13:17 PM11/22/20
to Android-x86
On Sunday, November 22, 2020 at 9:26:05 PM UTC+1 BrokenE39 wrote:
Total newbie in this area as some of you already know. But I see oujia and others have successfully build a custom image using the newer 5.8 kernel. I'm curious in trying this out but not exactly sure of the process. Questions as below:
  • I know 5.8 is not a Android Common Kernel

cd ~/pie-x86/kernel
git remote add maurossi https://github.com/maurossi/linux
git fetch maurossi kernel-5.8_si_next
git checkout FETCH_HEAD

 
  • I assume straight replacing the kernel folder with 5.8 source will not work

cd ~/pie-x86/external/kernel-drivers
git fetch maurossi kernel-5.6
git checkout FETCH_HEAD

NOTE: if that does not work

git fetch maurossi kernel-5.9
git checkout FETCH_HEAD


  • What about GCC and Clang?
No need for changes for kernel-5.8_si_next 
  • What about the build config files in the kernel folder? I assume these aren't automatically generated but placed there as tell the compiler how to build the kernel depending on the device config selected
android_x86_defconfig and android_x86_64_defconfig files are updated,
except for CONFIG_DRM_AMD_DC_SI (AMD DC support for SI) which has been kept disabled

If you do not want amdgpu forced on SI and CIK, you need to revert following commit:

On Intel Atom you don't need to change anything

crw

unread,
Nov 24, 2020, 11:10:42 PM11/24/20
to Android-x86
I took kernel 5.8 modules,firmare and the kernel file from the pre-built bliss os 12 iso files and put into android 9, it works nice for new Intel kaby lake chipset

BrokenE39

unread,
Dec 19, 2020, 8:20:31 PM12/19/20
to Android-x86
Well I manage to compile it with no errors after a few tries but the problem is now my touch screen and rotation is broken despite keeping the same iio setting as the old 9.0 r2 4.19 init.sh. Any suggestions?

BrokenE39

unread,
Dec 23, 2020, 11:56:29 PM12/23/20
to Android-x86
From Internet searches, it seems there's some kind of regression with the touchscreen driver. I'm trying to compile again using kernel 5.9 but I ran into an error. Now it's complaining the compiler is too old. When I checked the gcc version, it say it's 7.5 and I can't update it any further using apt install build essential.

In file included from /home/daniel/Android9/kernel/include/linux/compiler_types.h:74:0,
                 from <command-line>:0:
/home/daniel/Android9/kernel/include/linux/compiler-gcc.h:15:3: error: #error Sorry, your compiler is too old - please upgrade it.
/home/daniel/Android9/kernel/scripts/Makefile.build:283: recipe for target 'scripts/mod/empty.o' failed
make[2]: *** [scripts/mod/empty.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/daniel/Android9/kernel/Makefile:1197: recipe for target 'prepare0' failed
make[1]: *** [prepare0] Error 2
make[1]: Leaving directory '/home/daniel/Android9/out/target/product/x86_64/obj/kernel'
Makefile:185: recipe for target '__sub-make' failed
make: *** [__sub-make] Error 2

BrokenE39

unread,
Jan 5, 2021, 3:02:04 AM1/5/21
to Android-x86
Thread bump. Anyone seen this before? I already installed GCC version 10 and it's still complaining the compiler is too old. Verified using gcc --version in terminal and it's saying 10.1.0. Same error as this person:

Huy Minh Bui

unread,
Jan 5, 2021, 9:22:29 AM1/5/21
to Android-x86
If you use nougat source, go to build/core/tasks/kernel.mk

or if you use pie source, go to device/generic/common/build/core/tasks/kernel.mk

find this line

ifeq ($(TARGET_KERNEL_ARCH),x86_64)
CROSS_COMPILE ?= $(abspath prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/bin)/x86_64-linux-
else
CROSS_COMPILE ?= $(abspath $(TARGET_TOOLS_PREFIX))
endif

Edit it :
ifeq ($(TARGET_KERNEL_ARCH),x86_64)
CROSS_COMPILE ?=
else
CROSS_COMPILE ?= $(abspath $(TARGET_TOOLS_PREFIX))
endif

then try to compile
Vào lúc 15:02:04 UTC+7 ngày Thứ Ba, 5 tháng 1, 2021, BrokenE39 đã viết:

Daniel Cheung

unread,
Jan 9, 2021, 2:06:12 PM1/9/21
to andro...@googlegroups.com
Hi Huy Minh Bui,

Thanks for the advice, it worked! I knew it was something to do with the compiling process referring to the prebuilt GCC which was an earlier version and just didn't know where it was being referred to. Completed compiling of Pie with 5.9 so I'm off to test it, if that works then I'm going to try adding the Intel HW codec from another thread.




--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-x86/e909687f-8569-4955-a0e5-cb8fd9e13f20n%40googlegroups.com.

Daniel Cheung

unread,
Jan 10, 2021, 1:13:27 AM1/10/21
to andro...@googlegroups.com
Hmm this is funny. The screen rotation doesn't work correctly if I just use iio.accel.order 102, need to add a few opt_scale -1 to all 3 axis to get it to rotate correctly. However, I notice the touch points are all reversed. Touch top = down, touch right = left. So to show more app icons, instead of the usual swap up from bottom, I have to swap down from top. Follow this instruction, just the tscal directory part, but it end up breaking my touch points completely. Any suggestions?

Reply all
Reply to author
Forward
0 new messages