Help How to compile Android X86 kernel

zhengfan2016

New member
VC
6
I am using lineage os 17.1, which uses the 5.8.0 linux kernel, but the kernel I compiled with the surface driver does not boot.
 
I am using lineage os 17.1, which uses the 5.8.0 linux kernel, but the kernel I compiled with the surface driver does not boot.
I know there must have been people who tried it and thought it would be easy but it was hard. You just have to ask HMTheBoy154 to build the kernel because he knows better.
 

AXON

Supreme
Moderator
Blog Author
Your context and title doesn't match.....

Although if you prefer the easy route you can either directly install this gearlock package or compile it from source (source code is available, check resource info)
 

Xtr

Well-known member
I am using lineage os 17.1, which uses the 5.8.0 linux kernel, but the kernel I compiled with the surface driver does not boot.
You cannot use linux kernel config for android, you need to have an android config, grab existing config from booted android with zcat /proc/config.gz > /sdcard/.config
 

TukangM

Member
VC
96
well. no one can make tutorial build androidx86 kernel. so yeah i need customize my own kernel but no one can made for tutorial's
 

Xtr

Well-known member
well. no one can make tutorial build androidx86 kernel. so yeah i need customize my own kernel but no one can made for tutorial's
The process of building a kernel for android x86 is essentially the same as compiling Linux kernel for a GNU/Linux distro, there are lots of tutorials for that. Except you will have to use make android-x86_64_defconfig instead of make defconfig.
Do note that this step will only work with kernels that include Android-x86 patches. Android x86 config in arch/x86/configs/android-x86_64_defconfig
I have compiled kernels 5.15 (LTS), 5.16, 5.18 from source and used them successfully.
 
Last edited:

TukangM

Member
VC
96
ok. I will be confused with tutorials on youtube. compiling regular linux kernels is slightly different from android x86
Post automatically merged:

and yeah i get the config.gz. from android booted and i try some tutorial on youtube and google
1668766477758.png

Post automatically merged:

but i confused. make install? installing to linux distro when after compiling?
Post automatically merged:

1668770765880.png



Code:
[email protected]:~$ cd android-x86
[email protected]:~/android-x86$ cd kernel
[email protected]:~/android-x86/kernel$ cp ~/andrd-x86_64_defconfig ~/android-x86/kernel/arch/x86/configs/\
>
cp: cannot stat '/home/lenovo/andrd-x86_64_defconfig': No such file or directory
[email protected]:~/android-x86/kernel$ cp ~/andrd-x86_64_defconfig ~/android-x86/kernel/arch/x86/configs/
cp: cannot stat '/home/lenovo/andrd-x86_64_defconfig': No such file or directory
[email protected]:~/android-x86/kernel$ cp /home/lenovo/android-x86/kernel/arch/x86/configs android-x86_64_defconfig
cp: -r not specified; omitting directory '/home/lenovo/android-x86/kernel/arch/x86/configs'
[email protected]:~/android-x86/kernel$ cp ~/android-x86_64_defconfig /home/lenovo/android-x86/kernel/arch/x86/conf
igs/
cp: cannot stat '/home/lenovo/android-x86_64_defconfig': No such file or directory
[email protected]:~/android-x86/kernel$

i confused here
cp androidx86_64debconfig
Post automatically merged:

1668781936922.png


OWW yeah. i compiled my own kernel.
Post automatically merged:

and yeah my kernel booted 2 sec and reboot. may some config not support my hardware. AAA FINALY
 
Last edited:
  • Like
Reactions: Xtr

Get Connected

Discord Server

New Threads

Top