maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   [Fremantle] Android inside chroot (https://talk.maemo.org/showthread.php?t=92898)

Alecsandru 2014-03-19 22:31

Re: [Fremantle] Android inside chroot
 
and why the drivers (the camera one and others ) were patched to work in android(jolla) if they share the same kernel , i don°t think they share the same drivers , the layer + adaptation between them we need , there are more chances to make that available to n900 than to run maemo on other hardware , by the way why alien dalvik won°t run on kernels prior to 3.x.x (jolla , leaving qualcomm s**t aside) , from what I remember it was demoed on n900 , that phone was with a updated kernel? or our kernel was patched?

PrisonPlanet 2014-03-20 00:22

Re: [Fremantle] Android inside chroot
 
This is very cool - looking forward to this hack! :D

I'll be glad to test something if you will need more people.

wicket 2014-03-20 02:38

Re: [Fremantle] Android inside chroot
 
Quote:

Originally Posted by marmistrz (Post 1417718)
Can't our Linux kernel take care of whole power management and our Dalvik app just let be controlled?

That's a possibility but I wouldn't worry about that right now. Just get something working first.

Quote:

Originally Posted by lexik (Post 1417725)
Correct me if I'm wrong, but yes, as we are not emulating anything. Drivers are still needed inside (and outside) the LXC, because chrooted system has no knowledge about it's HW.

Spot on.

Quote:

Originally Posted by Android_808 (Post 1417734)
AIUI, LXC containers share the same kernel still - see Oracle documentation on LXC

Correct.

Quote:

Originally Posted by Android_808 (Post 1417734)
In that case your now looking at patching host kernel to enable Android, which I dare say is going to break a few things a long the way.

That was always going to be the situation, even with a normal chroot. It's not possible to run multiple kernels without a hypervisor.

Quote:

Originally Posted by Android_808 (Post 1417734)
If that's the case I'd start looking at a Sailfish approach by running libhybris, if only for the possibility of detaching MCE and co from N900 specifics to allow porting to other devices.

libhybris shouldn't be needed. The kernel and drivers will be running under Maemo with glibc and will continue to talk to the hardware as normal.

Quote:

Originally Posted by Android_808 (Post 1417734)
Problem is how much RAM and performance loss your going to see.

The big advantage of OS-level virtualisation is that there is little or no overhead. It will only use whatever is normally used by Android.

Quote:

Originally Posted by taixzo (Post 1417735)
If the container has the same kernel, does that mean it has to load two sets of drivers for everything? Or are the android drivers only loaded inside the LXC container?

Drivers (kernel modules) are an extension to the kernel hence they will be provided (shared) by the host OS. If there are any userspace drivers they would have to be loaded inside the container.

Quote:

Originally Posted by Alecsandru (Post 1417738)
and why the drivers (the camera one and others ) were patched to work in android(jolla) if they share the same kernel , i don°t think they share the same drivers

I'm not familiar with Android/Jolla patches and without knowing the details I can only speculate but it's possible that they were userspace drivers.

Quote:

Originally Posted by Alecsandru (Post 1417738)
by the way why alien dalvik won°t run on kernels prior to 3.x.x (jolla , leaving qualcomm s**t aside) , from what I remember it was demoed on n900 , that phone was with a updated kernel? or our kernel was patched?

That demo was a long time ago so it would have been based on an older version of Android running a 2.6 kernel, most likely patched.

Hurrian 2014-03-20 05:59

Re: [Fremantle] Android inside chroot
 
Quote:

Originally Posted by reinob (Post 1417667)
Quote from the linked page: "You’ll need a kernel with the Android patches (binder, ashmem, logger etc.)"

[...]

Neither Fremantle will run on Android kernel nor Android will run on Fremantle kernel.

I think that sorta sums it up good enough.

As on Harmattan, the systems runs okay enough even with Android drivers enabled and loaded - no app uses them, so they're left well alone ;)

And the same situation in reverse - on my Android device, I can stop Zygote, take control of the framebuffer, and start Xorg with the GNU Userland from a terminal.

Quote:

Originally Posted by marmistrz (Post 1417718)
Supposed there is static pm missing, what would happen while trying to run an Android app? //edit: Can't our Linux kernel take care of whole power management and our Dalvik app just let be controlled?

Assuming that Android runs inside Maemo via ParallelDroid, and static PM support isn't available, Maemo's (IMO superior) dynamic power control will reign supreme.

Alecsandru 2014-03-20 06:26

Re: [Fremantle] Android inside chroot
 
so , let"s start with kernel , what patches and how to compile them without breaking maemo?

taixzo 2014-03-20 06:41

Re: [Fremantle] Android inside chroot
 
Quote:

Originally Posted by Alecsandru (Post 1417764)
so , let"s start with kernel , what patches and how to compile them without breaking maemo?

Can't Maemo run on the Nitdroid kernel? If so, that would be a good place to look.

foobar 2014-03-20 17:22

Re: [Fremantle] Android inside chroot
 
I'd say help freemangordon, pali, et al. to run maemo on 3.x kernels, then go from there.
Win-win for everyone.

lexik 2014-03-20 18:43

Re: [Fremantle] Android inside chroot
 
Well, I was trying to compile LXC and when generating configure by running ./autogen.sh I'm getting:

aclocal: configure.ac: 205: macro `AM_COND_IF' not found in library
aclocal: configure.ac: 219: macro `AM_COND_IF' not found in library
aclocal: configure.ac: 234: macro `AM_COND_IF' not found in library
aclocal: configure.ac: 252: macro `AM_COND_IF' not found in library
aclocal: configure.ac: 269: macro `AM_COND_IF' not found in library
aclocal: configure.ac: 304: macro `AM_COND_IF' not found in library
aclocal: configure.ac: 315: macro `AM_COND_IF' not found in library
aclocal: configure.ac: 377: macro `AM_COND_IF' not found in library


That's probably related to old version of autoconf used in scratchox. Will update & report.

<- solved by downloading .tar.gz tarball & running configure directly.

Another error log, when running make:

In file included from lxc_attach.c:37:
utils.h:56: error: static declaration of 'setns' follows non-static declaration
/usr/include/bits/sched.h:91: error: previous declaration of 'setns' was here

Ideas? <- caused by broken version of libc6 from previous projects. Reinstalling whole scratchbox, will let you know soon :)

#lexik

marmistrz 2014-03-20 19:35

Re: [Fremantle] Android inside chroot
 
Quote:

Originally Posted by Hurrian (Post 1417761)
Assuming that Android runs inside Maemo via ParallelDroid, and static PM support isn't available, Maemo's (IMO superior) dynamic power control will reign supreme.

So what's this whole kernel discussion for? This would mean we don't need those static PM patches... And lexik, don't get scared by any "It won't work" posts. The same was said about Harmattan, that Harmattan apps won't work on Fremantle (hard/soft float)

Alecsandru 2014-03-20 19:52

Re: [Fremantle] Android inside chroot
 
Quote:

Originally Posted by foobar (Post 1417867)
I'd say help freemangordon, pali, et al. to run maemo on 3.x kernels, then go from there.
Win-win for everyone.

that it°s a longshoot , it should be more easy to apply to our kernel instead of the 3.x.x one due to missing drivers in the last one


All times are GMT. The time now is 00:41.

vBulletin® Version 3.8.8