To fix lollipop-x86 64-bit target

979 views
Skip to first unread message

Chih-Wei Huang

unread,
Feb 26, 2015, 2:04:28 AM2/26/15
to Android-x86
Hi Mauro & devs,
I'm slowly fixing the lollipop-x86 64-bit target issues.
Could you remind me the current status?
Except the mesa/drm parts (which I have worked out),
is there any other changes needed?

I thought you have posted some test 64-bit images before,
but I can't find them now since too many posts recently.
Please share the link again so I can compare with my build.
Thank you!


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

Peter Yoon

unread,
Feb 26, 2015, 9:01:13 AM2/26/15
to andro...@googlegroups.com
Hi,

I managed to run lollipop 64bit on intel box.
Patch against aosp is here : https://github.com/peyo-hd/local_manifests

And, my target device is Intel E8400 + Q45 motherboard.

Chih-Wei Huang

unread,
Feb 27, 2015, 2:59:06 AM2/27/15
to Android-x86
Ah, very interesting.
The first time I heard another individual porting
for android-x86.
I'll take a look.
Thanks a lot!

Mauro Rossi

unread,
Feb 27, 2015, 3:48:45 AM2/27/15
to andro...@googlegroups.com
Hi,

Summary of issues status:

external/ffmpeg: IIRC you said that ffmpeg is not much used in lollipop - but it is almost effortless to add the new file and be able to build multiarch

Copied /external/ffmpeg/android/config-x86.mak to /external/ffmpeg/android/config-x86_64.mak
and added this line
...
 ARCH_X86_32:=yes
+ARCH_X86_64:=yes
 !HAVE_ARMV5TE:=yes
...

external/mesa:  OK - Just a check about ASM optimizations.

I kept building but with ASM optimization disabled, because I had build errors with 64bit ASM code - Did you overcome this problem with your Android.mk files "magic"?


external/drm: OK problem was solved in lollipop-x86 branch


external/libpciaccess: OK, it was added to lollipop-x86 branch


hardware/drm_gralloc: OK as in lollipop-x86 branch


bluetooth share crashing: OK as in lollipop-x86 branch


972 error at app install:  Problem assessed EXT4 needed.

Problem should be solved by bringing EXT4 support with Gabriel's patch to installer - It could solve some problems in formatting ETX3 too, if I'm not wrong.


system.img+ too large when building with gapps: to be solved in lollipop-x86 branch.
 
Solution: Edit /home/utente/lollipop-x86/device/generic/common/BoardConfig.mk
BOARD_SYSTEMIMAGE_PARTITION_SIZE = $(if $(MKSQUASHFS),0,1207959552) #was 1073741824


wifi authentication problem: It was solved at some point, but I don't remember exactly when.


sign-in crashing due to OpenGL sync queries:  Patch available.




Feasible alignments to kitkat-x86:

kernel: just a check-  is kernel already 3.18.x for lollipop-x86 branch? 

enable nouveau: enable nouveau in device/generic/common/BoardConfig.mk and update init.sh - init_hal_gralloc() to detect 0*nouveaufb|0*svgadrmfb

That should be all.


For the details, I have kept track on the attached file about all the changes up to Dec 28th, but there were not much changes after.



Mauro


PS: as an off-topic I am advancing in the build of mesa-git to keep the Android.mk files up to date.


I almost completed mesa 10.6.0-devel build for x86 - just i965_dri has building errors now.
I am far from being the "oibaf" for Android-x86 - always having the mesa-git build up and running - but this will become useful for new mesa releases integration (at the time when needed).
I have a problem with a dependency - I'll write you and pstglia a PM about this.

As an objective I'd like to write a little vademecum (me as first user needing it) for porting native C/C++ projects to Android-x86, trying to cover all scenarios with generated sources and "How to create/update an Android.mk looking at existing makefile.am"

Wolfram Webers

unread,
Feb 27, 2015, 7:46:16 AM2/27/15
to andro...@googlegroups.com
Hi,

I'm trying to port lollipop-x86 for my tiny Gigabyte BRIX with its N2807.
However, I have problems compiling the source mainly because of MESA:

target C: libglapi_32 <= external/mesa/src/mapi/entry.c
In file included from external/mesa/src/mapi/entry.c:68:0:
external/mesa/src/mapi/mapi_tmp.h:47:25: fatal error: shared-glapi/glapi_mapi_tmp.h: No such file or directory
#include MAPI_ABI_HEADER

How did you fix this MESA error?

Will also true Peters version.

Mauro Rossi

unread,
Feb 28, 2015, 4:04:21 AM2/28/15
to andro...@googlegroups.com
Hi Wolfram,

you can find the solution in the my post above post.
The issue detail file on mediafire describes that problem and it is related to generated sources that for multiarch

the use of variable (but the name is not important, the call is important):

generated-sources := $(call local-generated-sources-dir)

instead of

intermediates := $(call local-intermediates-dir)

the latter does not work for multiarch builds.

I'd suggest you to checkout the mesa project of kitkat-x86 branch, which is updated to  mesa 10.4.2,

That should do it, with the "workaround" of having ASM optimizations disabled, I was not able to solve a problem with assembling 64 bit .s files :-) but, with my disgraced skills, it was anyway a breakthrough :-)

If you encounter further errors they are tracked in section 4 of the detail issues file and if you have problems, send me a PM.
Mauro

Wolfram Webers

unread,
Feb 28, 2015, 1:15:57 PM2/28/15
to andro...@googlegroups.com
Awesome. I'll try that

Thanks Mauro. Mille gracie.

Mario Holzinger

unread,
Mar 4, 2015, 5:50:39 PM3/4/15
to andro...@googlegroups.com
Hello Mauro!

I tried to implement your changes tu my sourcecod but building still fails.

preparing StaticLib: libc++ [including  out/target/product/x86_64/obj/STATIC_LIBRARIES/libc++abi_intermediates/libc++abi.a]
Install: out/target/product/x86_64/system/lib64/libclcore_debug.bc
Install: out/target/product/x86_64/system/lib64/libclcore_x86.bc
make: *** No rule to make target 'out/target/product/x86_64/gen/STATIC_LIBRARIES/libmesa_glsl_intermediates/builtin_function.cpp', needed by 'out/target/product/x86_64/obj/STATIC_LIBRARIES/libmesa_glsl_intermediates/builtin_function.cpp'.  Schluss.
make: *** Warte auf noch nicht beendete Prozesse...
preparing StaticLib: libc++ [including  out/target/product/x86_64/obj/STATIC_LIBRARIES/libcompiler_rt_intermediates/libcompiler_rt.a]
target StaticLib: libc++ (out/target/product/x86_64/obj/STATIC_LIBRARIES/libc++_intermediates/libc++.a)
sandman01@Surface-Pro-2:~/android-x86_3.18$


any hint how to fix this?

Mario Holzinger

unread,
Mar 4, 2015, 6:17:27 PM3/4/15
to andro...@googlegroups.com
I think I found the solution by myself.

in the current sources there are 2 more lines that needs to be changed in the same way for

/external/mesa/src/glsl/Android.gen.mk

:-)

Mauro Rossi

unread,
Mar 4, 2015, 8:47:04 PM3/4/15
to andro...@googlegroups.com
Hi,

I was trying to re-build lollipop x86_64 target, to see if I would have found the problem you mentioned and give you feedback,
but I haven't seen that problem. 

You are on the right path, it must be some missing update in glsl's Android.gen.mk

I had just one last building error related to format_srgb.c generated source in external/mesa/src/util/Android.mk, previously solve with an ugly workaround
Now thanks to the recent optimizations of Chih-Wei using the $(transform-generated-source) call, I was finally able to complete the x86_64 ISO multiarch build without errors.

If you find those format_srbg.c errors, you just need to do the same corrections
generated-sources := $(call local-generated-sources-dir)

to external/mesa/src/util/Android.mk

Here is the now complete set of mesa 10.4.2 commits to build x86_64 target: https://github.com/maurossi/mesa/commits/lollipop-x86_multiarch
If you find errors with hardware/drm_gralloc you can look here:  https://github.com/maurossi/hardware_drm_gralloc/commits/android_x86_64_v3

NOTE: I have still disabled the ASM optimizations, but mesa will work fine. I'm stuck any help is appreciated.
Now for me it's time to go to bed

Mauro

Mario Holzinger

unread,
Mar 5, 2015, 3:42:51 PM3/5/15
to andro...@googlegroups.com
Hi Mauro!

may I ask an additional question

after applying all changes correctly I can not get past one confucing error

external/mesa/src/gallium/auxiliary/os/os_mman.h:71: error: undefined reference to '__mmap2'
collect2: error: ld returned 1 exit status

in os_mman.h its the return value that makes the problem
71:    return __mmap2(addr, length, prot, flags, fd, (size_t) (offset >> 12));

but a few lines on top it was declarated:
61: extern void *__mmap2(void *, size_t, int, int, int, size_t);

also 
45:#  include <sys/mman.h> is there

?!?


Mauro Rossi

unread,
Mar 5, 2015, 9:21:04 PM3/5/15
to andro...@googlegroups.com
>I'd suggest you to checkout the mesa project of kitkat-x86 branch, which is updated to  mesa 10.4.2,

Hi Mario,
in the aforementioned commit there are changes in the following files, that need to be applied:
src/gallium/auxiliary/os/os_mman.h
src/gallium/state_trackers/egl/android/native_android.cpp
src/gallium/state_trackers/egl/common/egl_g3d_api.c
M.
Reply all
Reply to author
Forward
0 new messages