How to build marshmallow-x86 with oreo-x86's kernel

339 views
Skip to first unread message

吴锴

unread,
Dec 6, 2018, 4:39:54 AM12/6/18
to Android-x86
hi, everyone:

    My problem is, i need the newer drivers from android-x86 8.0 oreo for my new devices but i don't want to upgrade the whole system for some reasons.
    I think maybe i can build marshmallow-x86 with oreo-x86's kernel to achieve the goal,but I have no idea how to do that.

    Can anyone help me with this, or another approach to resolve my problem.  
    Sorry for my poor english and any suggestion will be appreciated.

Chih-Wei Huang

unread,
Dec 6, 2018, 5:11:05 AM12/6/18
to Android-x86
吴锴 <scut...@gmail.com> 於 2018年12月6日 週四 下午5:39寫道:
> hi, everyone:
>
> My problem is, i need the newer drivers from android-x86 8.0 oreo for my new devices but i don't want to upgrade the whole system for some reasons.
> I think maybe i can build marshmallow-x86 with oreo-x86's kernel to achieve the goal,but I have no idea how to do that.
> Can anyone help me with this, or another approach to resolve my problem.

Just fetch the branch you want, and build it:

cd kernel
git fetch x86 kernel-4.19
git checkout FETCH_HEAD
cd ..
make iso_img

吴锴

unread,
Dec 6, 2018, 5:54:50 AM12/6/18
to Android-x86
thx @Chih-Wei Huang 

I do exactly you say,but the build failed,the message is:

make: Entering directory `/home/wk/Documents/androidx86_60'
Copying: out/target/product/x86_64/obj/NOTICE_FILES/src/kernel.txt
make[1]: Entering directory `/home/wk/Documents/androidx86_60/kernel'
build/tools/generate-notice-files.py  out/target/product/x86_64/obj/NOTICE.txt  out/target/product/x86_64/obj/NOTICE.html "Notices for files contained in the filesystem images in this directory:" out/target/product/x86_64/obj/NOTICE_FILES/src
make[2]: Entering directory `/home/wk/Documents/androidx86_60/out/target/product/x86_64/obj/kernel'
  GEN     ./Makefile
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  YACC    scripts/kconfig/zconf.tab.c
  LEX     scripts/kconfig/zconf.lex.c
bison: external/bison/data/m4sugar/m4sugar.m4: cannot open: No such file or directory
make[3]: *** [scripts/kconfig/zconf.tab.c] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [oldnoconfig] Error 2
make[2]: Leaving directory `/home/wk/Documents/androidx86_60/out/target/product/x86_64/obj/kernel'
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/wk/Documents/androidx86_60/kernel'
make: *** [/home/wk/Documents/androidx86_60/out/target/product/x86_64/obj/kernel/.config] Error 2
make: *** Deleting file `/home/wk/Documents/androidx86_60/out/target/product/x86_64/obj/kernel/.config'
make: *** Waiting for unfinished jobs....
Combining NOTICE files into HTML
Combining NOTICE files into text
make: Leaving directory `/home/wk/Documents/androidx86_60'

#### make failed to build some targets (02:03 (mm:ss)) ####

any ideas?  thanks again.

在 2018年12月6日星期四 UTC+8下午6:11:05,Chih-Wei Huang写道:

youling 257

unread,
Dec 6, 2018, 5:58:13 AM12/6/18
to Android-x86
just talk about your kernel-4.19 branch at here.

then, stop use less Hans'patch from maurossi kernel-4.19, https://github.com/jwrdegoede/linux-sunxi/commits/v4.19-footrail is very best choose.


在 2018年12月6日星期四 UTC+8下午6:11:05,Chih-Wei Huang写道:
吴锴 <scut...@gmail.com> 於 2018年12月6日 週四 下午5:39寫道:

吴锴

unread,
Dec 6, 2018, 7:40:39 AM12/6/18
to Android-x86
ok, after doing make clean, the building process running for quite a while but finally failed again :( 

host Executable: conscrypt_generate_constants (out/host/linux-x86/obj/EXECUTABLES/conscrypt_generate_constants_intermediates/conscrypt_generate_constants)
Install: out/host/linux-x86/lib64/libssl-host.so
host SharedLib: libart (out/host/linux-x86/obj/lib/libart.so)
host SharedLib: libbacktrace_32 (out/host/linux-x86/obj32/lib/libbacktrace.so)
host SharedLib: libziparchive-host_32 (out/host/linux-x86/obj32/lib/libziparchive-host.so)
Install: out/host/linux-x86/lib/libbase.so
Install: out/host/linux-x86/lib/libvixl.so
Install: out/host/linux-x86/lib64/libbacktrace.so
host SharedLib: libartd (out/host/linux-x86/obj/lib/libartd.so)
  SYSTBL  arch/x86/include/generated/asm/syscalls_32.h
  SYSHDR  arch/x86/include/generated/asm/unistd_32_ia32.h
  SYSHDR  arch/x86/include/generated/asm/unistd_64_x32.h
  SYSTBL  arch/x86/include/generated/asm/syscalls_64.h
  SYSHDR  arch/x86/include/generated/uapi/asm/unistd_32.h
  SYSHDR  arch/x86/include/generated/uapi/asm/unistd_64.h
  SYSHDR  arch/x86/include/generated/uapi/asm/unistd_x32.h
warning: string 'gsm_alphabet_default_charset' has no default translation.
host SharedLib: libartd_32 (out/host/linux-x86/obj32/lib/libartd.so)
  GEN     ./Makefile
  WRAP    arch/x86/include/generated/uapi/asm/bpf_perf_event.h
  WRAP    arch/x86/include/generated/uapi/asm/poll.h
  UPD     include/generated/uapi/linux/version.h
Install: out/host/linux-x86/lib64/libartd.so
Install: out/host/linux-x86/framework/jsilver.jar
host Java: jarjar (out/host/common/obj/JAVA_LIBRARIES/jarjar_intermediates/classes)
  UPD     include/config/kernel.release
Copying: out/target/common/obj/JAVA_LIBRARIES/analytics-utils_intermediates/classes-jarjar.jar
Install: out/host/linux-x86/framework/rmtypedefs.jar
target Strip: libdl (out/target/product/x86_64/obj/lib/libdl.so)
target Strip: libexpat (out/target/product/x86_64/obj/lib/libexpat.so)
Updated header file out/target/product/x86_64/gen/SHARED_LIBRARIES/libGLES_trace_intermediates/proto/frameworks/native/opengl/libs/GLES_trace/proto/gltrace.pb.h.
target Strip: libcrypto (out/target/product/x86_64/obj/lib/libcrypto.so)
Device TableGen (gen-asm-matcher): libLLVMX86CodeGen <= external/llvm/lib/Target/X86/X86.td
Device TableGen (gen-asm-writer): libLLVMX86CodeGen <= external/llvm/lib/Target/X86/X86.td
Device TableGen (gen-asm-writer -asmwriternum=1): libLLVMX86CodeGen <= external/llvm/lib/Target/X86/X86.td
Device TableGen (gen-disassembler): libLLVMX86CodeGen <= external/llvm/lib/Target/X86/X86.td
Device TableGen (gen-register-info): libLLVMX86CodeGen <= external/llvm/lib/Target/X86/X86.td
Device TableGen (gen-instr-info): libLLVMX86CodeGen <= external/llvm/lib/Target/X86/X86.td
Device TableGen (gen-dag-isel): libLLVMX86CodeGen <= external/llvm/lib/Target/X86/X86.td
  HOSTCC  arch/x86/tools/relocs_32.o
Device TableGen (gen-fast-isel): libLLVMX86CodeGen <= external/llvm/lib/Target/X86/X86.td
  HOSTCC  arch/x86/tools/relocs_64.o
  HOSTCC  arch/x86/tools/relocs_common.o
  Using /home/wk/Documents/androidx86_60/kernel as source for kernel
  WRAP    arch/x86/include/generated/asm/dma-contiguous.h
  WRAP    arch/x86/include/generated/asm/early_ioremap.h
  WRAP    arch/x86/include/generated/asm/export.h
  HOSTLD  arch/x86/tools/relocs
  WRAP    arch/x86/include/generated/asm/mcs_spinlock.h
  WRAP    arch/x86/include/generated/asm/mm-arch-hooks.h
Device TableGen (gen-subtarget): libLLVMX86CodeGen <= external/llvm/lib/Target/X86/X86.td
  UPD     include/generated/utsrelease.h
Device TableGen (gen-callingconv): libLLVMX86CodeGen <= external/llvm/lib/Target/X86/X86.td
  HOSTCC  scripts/genksyms/genksyms.o
  YACC    scripts/genksyms/parse.tab.c
Device TableGen (gen-intrinsic): libLLVMX86CodeGen <= external/llvm/lib/Transforms/Hello/../../../include/llvm/IR/Intrinsics.td
make[4]: *** [scripts/genksyms/parse.tab.c] Error 1
make[3]: *** [scripts/genksyms] Error 2
make[2]: *** [scripts] Error 2
make[2]: Leaving directory `/home/wk/Documents/androidx86_60/out/target/product/x86_64/obj/kernel'
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/wk/Documents/androidx86_60/kernel'
make: *** [out/target/product/x86_64/kernel] Error 2
make: *** Waiting for unfinished jobs....

#### make failed to build some targets (51:45 (mm:ss)) ####

it seems like there are some problems while generating kernel symbols. 

在 2018年12月6日星期四 UTC+8下午6:54:50,吴锴写道:

Mauro Rossi

unread,
Dec 6, 2018, 9:33:29 AM12/6/18
to Android-x86

Chih-Wei Huang

unread,
Dec 6, 2018, 10:19:41 AM12/6/18
to Android-x86
Mauro Rossi <issor...@gmail.com> 於 2018年12月6日 週四 下午10:33寫道:
> in marshmallow-x86 the new symbolic links to avoid bison m4 error were not backported
>
> The following commit:
> http://git.osdn.net/view?p=android-x86/device-generic-common.git;a=commitdiff;h=938b3496cbe5a2ecde2e508a924de62fbc677221;hp=5cfaa3b012fcff04896ddbc8f12f2ff498c04f94
>
> may need to be ported in core/tasks/kernel.mk of marshamallow-x86

Right.
I've pushed the back-ported patches.
Please do 'repo sync' to get it.

>>> Just fetch the branch you want, and build it:
>>>
>>> cd kernel
>>> git fetch x86 kernel-4.19
>>> git checkout FETCH_HEAD
>>> cd ..
>>> make iso_img


--
Chih-Wei
Android-x86 project
http://www.android-x86.org

吴锴

unread,
Dec 6, 2018, 12:23:48 PM12/6/18
to Android-x86
I will try it tomorrow, thank you very much and @Mauro Rossi as well. 
so the YACC error which is mentioned in my prev post, was it caused by bison too?  since i just noticed that YACC should be bison actually.

在 2018年12月6日星期四 UTC+8下午11:19:41,Chih-Wei Huang写道:

吴锴

unread,
Dec 6, 2018, 8:49:15 PM12/6/18
to Android-x86
hi, Chih-Wei Huang 

I do repo sync and make clean and rebuild, the bison(YACC) issue seems to be fixed, thx again. but unfortunately there is new error found: 

  CC      arch/x86/kernel/SSEPlus_float_REF.o
/home/wk/Documents/androidx86_60/kernel/arch/x86/kernel/SSEPlus_float_REF.c:1:0: error: -mpreferred-stack-boundary=3 is not between 4 and 12
 #include <linux/kernel.h>
 ^
  CC      kernel/time/clockevents.o
make[4]: *** [arch/x86/kernel/SSEPlus_float_REF.o] Error 1
make[3]: *** [arch/x86/kernel] Error 2
make[2]: *** [arch/x86] Error 2
make[2]: *** Waiting for unfinished jobs....

then i check the Makefile in /kernel/arch/x86, i found this section

#
# Prevent GCC from generating any FP code by mistake.
#
# This must happen before we try the -mpreferred-stack-boundary, see:
#
#
KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
KBUILD_CFLAGS += $(call cc-option,-mno-avx,)

seems like the preferred-stack-boundary issue has been already considered, but i don't know why this still happen.
I tried to figure out what was wrong by myself but the build system is still too complicated for me, so any advices ?


在 2018年12月6日星期四 UTC+8下午11:19:41,Chih-Wei Huang写道:
Mauro Rossi <issor...@gmail.com> 於 2018年12月6日 週四 下午10:33寫道:

Chih-Wei Huang

unread,
Dec 6, 2018, 10:48:05 PM12/6/18
to Android-x86
吴锴 <scut...@gmail.com> 於 2018年12月7日 週五 上午9:49寫道:
>
> hi, Chih-Wei Huang
> I do repo sync and make clean and rebuild, the bison(YACC) issue seems to be fixed, thx again. but unfortunately there is new error found:

It needs more fixes.
Please sync again.

吴锴

unread,
Dec 7, 2018, 3:13:45 AM12/7/18
to Android-x86
hi, Chih-Wei Huang:

finally i got the gcc4.6 toolchains after repo sync to resolve the preferred-stack-boundary issue, thanks a lot as usual.

and btw, i also found a patch from @Mauro Rossi for the ThinkPad devices with kernel >= 4.15 which will break the build without it.
of cause i can apply the patch by my self but maybe you would like to port it  back  : )

best regards


commit e0854547dfc34d9ce1348eff447cc950b9f8a4cb
Author: Mauro Rossi <issor...@gmail.com>
Date:   Wed Nov 29 01:04:17 2017 +0100

    tp_smapi/hdaps: use timer_setup() with kernel 4.15 and later

    Fixes the following building error happening with kernel 4.15:

      CC [M]  .../out/target/product/x86/obj/kmodule/tp_smapi/hdaps.o
    .../out/target/product/x86/obj/kmodule/tp_smapi/hdaps.c: In function 'hdaps_init':
    .../out/target/product/x86/obj/kmodule/tp_smapi/hdaps.c:782:2:
    error: implicit declaration of function 'init_timer' [-Werror=implicit-function-declaration]
      init_timer(&hdaps_timer);
      ^
    .../out/target/product/x86/obj/kmodule/tp_smapi/hdaps.c:783:23:
    warning: assignment from incompatible pointer type
      hdaps_timer.function = hdaps_mousedev_poll;
                           ^
    cc1: some warnings being treated as errors


在 2018年12月7日星期五 UTC+8上午11:48:05,Chih-Wei Huang写道:

吴锴

unread,
Dec 7, 2018, 5:00:37 AM12/7/18
to Android-x86

hi, Chih-Wei Huang


thanks for your help , i successfully build the iso_img of marshmallow-x86 with oreo-x86's kernel, but the android can't boot because the zygote process keep crashing.

i only have screen shots since i don't know how to get a log file in this situation.

would you plz have a look at it and maybe you can tell me what to do, thank you.



在 2018年12月7日星期五 UTC+8上午11:48:05,Chih-Wei Huang写道:
吴锴 <scut...@gmail.com> 於 2018年12月7日 週五 上午9:49寫道:
IMG_6220.jpeg
IMG_4948.jpeg
IMG_0691.jpeg

Chih-Wei Huang

unread,
Dec 7, 2018, 6:25:29 AM12/7/18
to Android-x86
It probably needs a fix of libart for new kernel but I can't recall it now. You may search it from our repo.


吴锴 <scut...@gmail.com> 於 2018年12月7日週五 下午6:00寫道:
--
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 post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.

吴锴

unread,
Dec 7, 2018, 7:10:58 AM12/7/18
to Android-x86
That's ok, i will do the research work, thanks for your patience


在 2018年12月7日星期五 UTC+8下午7:25:29,Chih-Wei Huang写道:

Mauro Rossi

unread,
Dec 7, 2018, 6:32:36 PM12/7/18
to Android-x86
Hi,


On Friday, December 7, 2018 at 1:10:58 PM UTC+1, Kai Wu wrote:
That's ok, i will do the research work, thanks for your patience

I recently saw this problem also on nougat-x86, the following commit may be required:


Mauro

Kai Wu

unread,
Dec 7, 2018, 10:30:50 PM12/7/18
to Android-x86
hi, Mauro

that's awesome, you really save me, i will try it as soon as possible, thx a lot.

在 2018年12月8日星期六 UTC+8上午7:32:36,Mauro Rossi写道:

Kai Wu

unread,
Dec 8, 2018, 10:52:39 AM12/8/18
to Android-x86
hi, Mauro:

the art patch for new kernel does fix the zygote crashing issue and finally the marshmallow-x86 can boot up with kernel 4.19.
everything works perfectly in the VirtualBox vm, but in my pc the amdgpu driver loads failed and then a kernel panic will causes the system reboot in few seconds.
my graphic card is RX 560 and i have tried the official Oreo-x86 r2 iso which's kernel version is 4.18. It is weird that 4.18 works but 4.19 doesn't. 



在 2018年12月8日星期六 UTC+8上午7:32:36,Mauro Rossi写道:
Hi,

Chih-Wei Huang

unread,
Dec 8, 2018, 11:35:46 PM12/8/18
to Android-x86
You also need to update Mesa, and possibly LLVM. That's a more harder challenge.


Kai Wu <scut...@gmail.com> 於 2018年12月8日週六 下午11:52寫道:

Kai Wu

unread,
Dec 9, 2018, 12:24:01 AM12/9/18
to Android-x86
hi, Chih-Wei Huang

you are right. there is still a lot of work to do. 
maybe I should try Mauro's guide for updating mesa in this discussion first.




在 2018年12月9日星期日 UTC+8下午12:35:46,Chih-Wei Huang写道:

Mauro Rossi

unread,
Dec 9, 2018, 5:52:12 AM12/9/18
to Android-x86
Hi,


On Sunday, December 9, 2018 at 6:24:01 AM UTC+1, Kai Wu wrote:
hi, Chih-Wei Huang

you are right. there is still a lot of work to do. 
maybe I should try Mauro's guide for updating mesa in this discussion first.

If you need radeonsi amdgpu drivers in marshmallow-x86 
with new mesa you need to add external/llvm70 with Android.mk (because Android.bp not supported)

This branch has not the Android.bp new blueprint building rules:

If you are not interested in those drivers, or you want to postpone this part,
you can disable radeonsi in BoardConfig.mk

swrast has to be disabled in BoardConfig.mk

Kai Wu

unread,
Dec 9, 2018, 7:09:06 AM12/9/18
to Android-x86
Hi, Mauro

thanks for the tips. 

btw. which branch of firmware should i use for kernel 4.19, since i only found oreo-x86 branch but it is for 4.18


在 2018年12月9日星期日 UTC+8下午6:52:12,Mauro Rossi写道:

Mauro Rossi

unread,
Dec 9, 2018, 10:24:41 AM12/9/18
to Android-x86
If you move to nougat-x86 you would avoid yourself a lot of pains
as if you try to update branches not in development you will find issue over issue.

On Sunday, December 9, 2018 at 1:09:06 PM UTC+1, Kai Wu wrote:
Hi, Mauro

thanks for the tips. 

btw. which branch of firmware should i use for kernel 4.19, since i only found oreo-x86 branch but it is for 4.18

Coming to your question, you can simply guess the procedure by following this sequence of steps:

1. Is there device/generic/firmware project in marshmallow-x86 ? [Y/N]
2. In case of affirmative response you could checkout the oreo-x86 branch of the same project

cd device/generic/firmware
git fetch x86 oreo
-x86
git checkout FETCH_HEAD

Kai Wu

unread,
Dec 9, 2018, 12:27:51 PM12/9/18
to Android-x86
Hi, Mauro:

thanks a lot for the details and your patience.
sorry for my stupid questions and bad english.
I will consider your advice seriously.

Reply all
Reply to author
Forward
0 new messages