Lollipop? How to?

343 views
Skip to first unread message

marshel

unread,
Nov 18, 2014, 6:26:49 AM11/18/14
to renesas-...@googlegroups.com
Hi, another version of Android dame into town, is there a way to port it?

ffxx68, could you help, showing us what are the steps you made to port to JB? ex.: 1st: set the hardware on kernel. 2nd: compile kernel. 3rd... etc etc ?
Do you see any dificulties in this port?

that way I want to try and see if I am able to do it.


Best regards,

marshel

ffxx68

unread,
Nov 19, 2014, 10:45:03 AM11/19/14
to renesas-...@googlegroups.com
Hi Marshel,

if I had time... I would try to use JB kernel. Hopefully, no extra-new kernel feature is used by L.
Migrating our kernel to 3.x is a major task, which would make porting much more complex (for a kernel noob like me, at least).
For the migration to JB, I back-ported to our kernel just a few minor changes, which I had identified by a lot of Googling for the errors I got during boot up.

With respect to Android, I would download a new L AOSP locally. Then go through all the commits in our own GIT repo https://github.com/Renesas-EMEV2, one by one, and merge them into the corresponding L project.
For each of them, I would create a new local git branch first (e.g. "emev-L").
I would start from our older commits you can find in git, as newer ones were relatively "minor" fixes.
The aim is to bring up as soon as possible a build that boots up successfully, even though not 100% complete (e.g. no WiFI, no SGX, no 3G, etc), just to verify if the kernel is ok.

I'd be glad to help with suggestions, but cannot do it myself, as I'm really short of spare time.

Enjoy!
Fabio

ffxx68

unread,
Nov 19, 2014, 11:05:54 AM11/19/14
to renesas-...@googlegroups.com
After initial AOSP download and a test build (it'll take hours, the first time), I'd start porting these commits to it:

https://github.com/Renesas-EMEV2?page=2

(except "Renesas-BootSD "; consider only those made by ffxx68)

as well as this one:

https://github.com/Renesas-EMEV2/Renesas-device_emev/commit/3ab8df663683f061060ea6c4d664386a93f3fc0b



On Tuesday, 18 November 2014 12:26:49 UTC+1, marshel wrote:

marshel

unread,
Nov 24, 2014, 7:44:14 AM11/24/14
to renesas-...@googlegroups.com
Thank you Fabio, very much!!!

I'll Try it on my spare time.
 
I'll branch and share the repo for everyone here.



Marcel

marshel

unread,
Nov 24, 2014, 7:52:25 AM11/24/14
to renesas-...@googlegroups.com
Sorry, I'd mean fork, get a new branch and share.

ffxx68

unread,
Nov 24, 2014, 10:23:27 AM11/24/14
to renesas-...@googlegroups.com
I can give you Developer or Admin role in our git too...


On Tuesday, 18 November 2014 12:26:49 UTC+1, marshel wrote:

marshel

unread,
Nov 24, 2014, 11:11:06 PM11/24/14
to renesas-...@googlegroups.com
let me try locally first, if it works I will commit :)

I found a nice tutorial on compilling LP.

http://forum.xda-developers.com/chef-central/android/tutorial-compile-lollipop-ubuntu-t2929410

Let's see if I can make it till next week ;)

ffxx68

unread,
Nov 25, 2014, 6:25:42 AM11/25/14
to renesas-...@googlegroups.com
Nice and clean tutorial indeed. Very useful for an environment setup from scratch.
Something we miss in our platform is the "./extract-files.sh"and our flashing procedure is a bit different too.


On Tuesday, 18 November 2014 12:26:49 UTC+1, marshel wrote:

ffxx68

unread,
Dec 5, 2014, 8:51:59 AM12/5/14
to renesas-...@googlegroups.com
Hi Marshel, any progress? I'm curious...


On Tuesday, 18 November 2014 12:26:49 UTC+1, marshel wrote:

marshel

unread,
Dec 15, 2014, 5:36:58 AM12/15/14
to renesas-...@googlegroups.com
Sorry by my late response, I got no build yet. I set up the enviroment And started to get the sources but the 5.0.1 went out and with my post-grad thesys on the run I got no time.

I will try on the hollydays.

best regards

Fabio Fumi

unread,
Dec 15, 2014, 5:39:35 AM12/15/14
to Renesas Emma EV2 Android Open Source Project on behalf of marshel
good luck with the thesys !

--
You received this message because you are subscribed to a topic in the Google Groups "Renesas Emma EV2 Android Open Source Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/renesas-emev-osp/eM6VK4upN5Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to renesas-emev-o...@googlegroups.com.
To post to this group, send email to renesas-...@googlegroups.com.
Visit this group at http://groups.google.com/group/renesas-emev-osp.
For more options, visit https://groups.google.com/d/optout.

ffxx68

unread,
Feb 16, 2015, 4:33:55 AM2/16/15
to renesas-...@googlegroups.com
Hi Marshel ... any luck with the 5 build, by chance?
Any blocker (apart from time...)?


On Tuesday, 18 November 2014 12:26:49 UTC+1, marshel wrote:

marshel

unread,
Feb 18, 2015, 10:19:32 AM2/18/15
to renesas-...@googlegroups.com
Sorry but no, I installed the Dev ambient, got the sources, but I am not smart enough :(

And more than that, I disasembled my Rena and the flat cable of the Touchscreen was damaged probably because on Assembly line it got folded , now I finally could understand why the touch sometimes work and sometimes not. (now is always not working) :(

When I get some time to spare I will try to solder it or put some carbon in order to try to fix the screen and also try to connect some mouse/keyboard and try again.

I got a good grade on my pre-thesys, now I have to write it till april the 5th, after that I will be on vacations... then lets try again.

best regards,

Fabio Fumi

unread,
Feb 19, 2015, 4:43:32 AM2/19/15
to Renesas Emma EV2 Android Open Source Project on behalf of marshel
the flat cable from touch is the most delicate part of this assembly - I broke mine once too !

--

ffxx68

unread,
Feb 27, 2015, 6:09:56 AM2/27/15
to renesas-...@googlegroups.com
Not "smart" why ?? I wouldn't say that !
Where have you found blockers?


On Thursday, 19 February 2015 10:43:32 UTC+1, ffxx68 wrote:
the flat cable from touch is the most delicate part of this assembly - I broke mine once too !
On Wed, Feb 18, 2015 at 4:19 PM, marshel via Renesas Emma EV2 Android Open Source Project <renesas-emev-osp+APn2wQcSIPjCbrJA2UDrlu9XIlyWpds-N3UdD5_uBypyfCl@googlegroups.com> wrote:
Sorry but no, I installed the Dev ambient, got the sources, but I am not smart enough :(

And more than that, I disasembled my Rena and the flat cable of the Touchscreen was damaged probably because on Assembly line it got folded , now I finally could understand why the touch sometimes work and sometimes not. (now is always not working) :(

When I get some time to spare I will try to solder it or put some carbon in order to try to fix the screen and also try to connect some mouse/keyboard and try again.

I got a good grade on my pre-thesys, now I have to write it till april the 5th, after that I will be on vacations... then lets try again.

best regards,


On Monday, February 16, 2015 at 7:33:55 AM UTC-2, ffxx68 wrote:
Hi Marshel ... any luck with the 5 build, by chance?
Any blocker (apart from time...)?

On Tuesday, 18 November 2014 12:26:49 UTC+1, marshel wrote:
Hi, another version of Android dame into town, is there a way to port it?

ffxx68, could you help, showing us what are the steps you made to port to JB? ex.: 1st: set the hardware on kernel. 2nd: compile kernel. 3rd... etc etc ?
Do you see any dificulties in this port?

that way I want to try and see if I am able to do it.


Best regards,

marshel

--
You received this message because you are subscribed to a topic in the Google Groups "Renesas Emma EV2 Android Open Source Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/renesas-emev-osp/eM6VK4upN5Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to renesas-emev-osp+unsubscribe@googlegroups.com.
To post to this group, send email to renesas-emev-osp@googlegroups.com.

ffxx68

unread,
Mar 25, 2015, 6:38:26 AM3/25/15
to renesas-...@googlegroups.com
I've started this exercise myself... I'd like to verify if with existing kernel LP can boot at all.

So, I've dowloaded LP sources, built the x86_64 emulator (ok, just to verify env is complete), then added a basic device configuration copying from JB device/renesas/emev. I only included these custom HW libs:

libgralloc
liblights
libsensors
libstagefright

and our custom kernel headers into

libc/kernel/uapi/linux/ave_common_info.h
libc/kernel/uapi/linux/buslim.h
libc/kernel/uapi/linux/emxx_mem.h
libc/kernel/uapi/linux/fbcommon.h
libc/kernel/uapi/linux/inter_dsp_ioctl.h
libc/kernel/uapi/linux/videodev2.h

Build starts and goes on for some time, but than it fails for

--------------
target thumb C++: recovery <= bootable/recovery/bootloader.cpp
target thumb C++: recovery <= bootable/recovery/install.cpp
target thumb C++: recovery <= bootable/recovery/roots.cpp
bootable/recovery/roots.cpp:35:21: fatal error: cryptfs.h: No such file or directory
 #include "cryptfs.h"
                     ^
compilation terminated.
--------------

I don't understand why it's building recovery image even though I set

TARGET_NO_RECOVERY := true

in BoardConfig.mk.

Also, I don't understand why it's not finding cryptfs.h, which is present in system/vold.

Any idea???


On Tuesday, 18 November 2014 12:26:49 UTC+1, marshel wrote:

marshel

unread,
Mar 26, 2015, 10:07:13 AM3/26/15
to renesas-...@googlegroups.com

ffxx68

unread,
Mar 27, 2015, 11:14:18 AM3/27/15
to renesas-...@googlegroups.com
New approach - copied ALL of device/renesas/emev from JB.

Also added the SELinux policy files found under device/asus/grouper/sepolicy - thanks Marshel!

Seems like we need to enable SELINUX in Kernel...

 https://source.android.com/devices/tech/security/selinux/index.html

Will not boot at first, maybe (and I would need help there, to enable SELinux in kernel!), but I'd like to to build LP including at least our custom graphics libraries.

I had to exclude camera and sensor for the moment... seems like it's going now (will take some time to complete)


On Tuesday, 18 November 2014 12:26:49 UTC+1, marshel wrote:

shield.liu

unread,
Apr 4, 2015, 12:29:45 AM4/4/15
to renesas-...@googlegroups.com
In my understanding, it's difficult to support Lollipop, because the kernel version's tooooo old.
Kernel version is 2.6.35, it lack of lots of features needed by Lollipop.
But porting to a new version cost too much work.




在 2015年3月27日星期五 UTC+8下午11:14:18,ffxx68写道:

ffxx68

unread,
Apr 4, 2015, 6:18:41 AM4/4/15
to renesas-...@googlegroups.com
Hi Liu, 
I suspected our kernel was too old for LP... but, maybe not... Do you know what are the kernel features Lollipop needs? 
SELinux is supported in 2.6.x
What else?


On Tuesday, 18 November 2014 12:26:49 UTC+1, marshel wrote:

shield.liu

unread,
Apr 5, 2015, 9:58:45 AM4/5/15
to renesas-...@googlegroups.com
Sorry, I know little about LP, for my recent work is not on Android...
I've heard that from JB, a lot of new features requested, but not sure.
Even LP can work on EV2 platform, the RAM size is so limited for daily use.


在 2015年4月4日星期六 UTC+8下午6:18:41,ffxx68写道:

ffxx68

unread,
Apr 13, 2015, 7:06:39 AM4/13/15
to renesas-...@googlegroups.com
Result achieved so far (after recompiling Kernel with SELinux options on and LP as just said:

...
VFS: Mounted root (ext3 filesystem) on device 179:5.
Freeing init memory: 168K
init: skipping insecure file '/default.prop'
init: skipping insecure file '/init.trace.rc'
init: could not import file '/init.trace.rc' from '/init.rc'
init: skipping insecure file '/ueventd.rc'
init: /dev/hw_random not found
init: /dev/hw_random not found

[hang]

(kernel startup log taken on serial console) ...


On Tuesday, 18 November 2014 12:26:49 UTC+1, marshel wrote:

ffxx68

unread,
Apr 14, 2015, 4:00:04 AM4/14/15
to renesas-...@googlegroups.com
Ok, The "hw_random" is just a warning.

After fixing the packaging script (pack.sh), to set 644 privileges to some files, I got rid of the "insecure file" errors, but now I'm stuck with this other init error message:

init: starting 'adbd'
init: waitpid returned pid 107, status = 00000100
init: process 'adbd', pid 107 exited
init: process 'adbd' killing any children in process group

Any idea here?


On Tuesday, 18 November 2014 12:26:49 UTC+1, marshel wrote:

ffxx68

unread,
Apr 17, 2015, 6:41:49 AM4/17/15
to renesas-...@googlegroups.com
After fixing init.rc (having it structured like other devices on LP AOSP), I managed to get it booted up !

I could also manage to get it connected trhough adb and see logcat that failed with:

D/libEGL  ( 7682): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX530_120.so
W/linker  ( 7682): libpvrANDROID_WSEGL.so: unused DT entry: type 0xf arg 0x124
W/libEGL  ( 7682): eglInitialize(0x1) failed (EGL_BAD_ALLOC)
W/linker  ( 7682): gralloc.emxx.so: unused DT entry: type 0xf arg 0x4e8
W/linker  ( 7682): libpvr2d.so: unused DT entry: type 0xf arg 0x779
W/linker  ( 7682): hwcomposer.emxx.so: unused DT entry: type 0xf arg 0xeb
E/HAL     ( 7682): load: module=/vendor/lib/hw/hwcomposer.emxx.so
E/HAL     ( 7682): dlopen failed: cannot locate symbol "SGX_DBG" referenced by "hwcomposer.emxx.so"...
E/SurfaceFlinger( 7682): hwcomposer module not found
E/SurfaceFlinger( 7682): ERROR: failed to open framebuffer (Not a typewriter), aborting
F/libc    ( 7682): Fatal signal 6 (SIGABRT), code -6 in tid 7682 (surfaceflinger)
...

The

Also, trying to start the 'pvrsrvctl' service, I get an error:

root@android:/ # pvrsrvctl                                                    
error: only position independent executables (PIE) are supported.

This points to the need to rebuild the SGX KM and UM modules, using using latest LP toolchain, I think...

Also, binaries should be built probably setting the -fPIE and -pie compiler flags (after a brief search on Google...).

Issue is that I'm having troubles re-compiling SGX modules now... I used to do that in the past, but now I'm getting an error.

Liu, could you get in touch, so we could try to discuss this?

thanks
Fabio

ffxx68

unread,
Apr 22, 2015, 7:57:24 AM4/22/15
to renesas-...@googlegroups.com
Even after recompiling SGX libs and pvrsrvct with -fPIE flag and pushing to device, I don't get the PIE-relatet error anymore, but I still get a segmentation fault:

root@android:/vendor/bin # ./pvrsrvctl                                        
WARNING: linker: ./pvrsrvctl: unused DT entry: type 0xf arg 0x145
WARNING: linker: libsrv_init.so: unused DT entry: type 0xf arg 0x1c2
WARNING: linker: libsrv_um.so: unused DT entry: type 0xf arg 0xb31
WARNING: linker: ./pvrsrvctl has text relocations. This is wasting memory and prevents security hardening. Please fix.
Segmentation fault

With this error, I think I give up with the upgrade to 5 ...

Seems like migration to AOSP 5.x requires major changes in SGX libraries.




On Tuesday, 18 November 2014 12:26:49 UTC+1, marshel wrote:

ffxx68

unread,
Mar 29, 2016, 7:01:25 AM3/29/16
to Renesas Emma EV2 Android Open Source Project
Just for the records ... 
Message "has text relocations. This is wasting memory and prevents security hardening." *could* be fixed by making the code position-independent, adding the -fpic or -fPIC flags too. Not sure if it works... but worth trying.
Also, I Googled a bit about the "unused DT entry: type 0xf" warning and looks like it's 0xf is DT_RPATH and it is not supported by android linker (the corresponding ld option is -rpath). 
Not sure if either they're just warnings, or truely blocking issues though.

On Tuesday, 18 November 2014 12:26:49 UTC+1, marshel wrote:
Reply all
Reply to author
Forward
0 new messages