start android on top of moblin/ubuntu

36 views
Skip to first unread message

gowtham gowda

unread,
Apr 18, 2009, 7:40:53 PM4/18/09
to android-porting
is it possible to start android on top of moblin or ubuntu installed
on a laptop or netbook?

David Turner

unread,
Apr 19, 2009, 6:27:43 AM4/19/09
to android...@googlegroups.com
in short, no, Android requires its own init system, specific kernel drivers that are probably not in the moblin/ubuntu one, etc...

there are probably some hacks that could make the two systems co-exist (e.g. like running Debian in a chroot under Android), but they probably require a few non-trivial steps that might be hard to automate right now.

gowtham gowda

unread,
Apr 19, 2009, 9:43:15 AM4/19/09
to android-porting
the reason i am asking this is, i have a prototype board with a 7"
capacitive multi touch screen, this board uses efi boot. And boots
into a basic text mode. I want to load android on it. I have very
little experience with efi boot. So i want to use the basic os on the
device to launch Android on top of it. Any ideas?

Thanks,
Gowtham

gowtham gowda

unread,
Apr 19, 2009, 9:49:07 AM4/19/09
to android-porting
This is on intel atom board.

gowtham gowda

unread,
Apr 19, 2009, 9:54:08 AM4/19/09
to android-porting
I have the ability to replace the moblin kernel, if i replace it with
the kernel i compiled for android. will it work?

Thanks for replying,
Gowtham

On Apr 19, 6:27 am, David Turner <di...@android.com> wrote:
> in short, no, Android requires its own init system, specific kernel drivers
> that are probably not in the moblin/ubuntu one, etc...
>
> there are probably some hacks that could make the two systems co-exist (e.g.
> like running Debian in a chroot under Android), but they probably require a
> few non-trivial steps that might be hard to automate right now.
>

Sean McNeil

unread,
Apr 19, 2009, 10:52:50 AM4/19/09
to android...@googlegroups.com
I used to run Android from chroot under a minimal filesystem all the
time. It helps to debug the init process.

gowtham gowda

unread,
Apr 19, 2009, 11:55:23 AM4/19/09
to android-porting
If you can give me a how to run android from chroot, it will be very
helpful.

Thanks,
Gowtham

On Apr 19, 10:52 am, Sean McNeil <seanmcne...@gmail.com> wrote:
> I used to run Android from chroot under a minimal filesystem all the
> time. It helps to debug the init process.
>
> David Turner wrote:
> > in short, no, Android requires its own init system, specific kernel
> > drivers that are probably not in the moblin/ubuntu one, etc...
>
> > there are probably some hacks that could make the two systems co-exist
> > (e.g. like running Debian in a chroot under Android), but they
> > probably require a few non-trivial steps that might be hard to
> > automate right now.
>

Yi Sun

unread,
Apr 19, 2009, 3:14:29 PM4/19/09
to android...@googlegroups.com, android...@googlegroups.com
Interesting idea,worth to try it out

Chen Yang

unread,
Apr 19, 2009, 7:01:02 PM4/19/09
to android...@googlegroups.com
You can copy all the out/target/product/eee_701/root directory to one
directory, say /home/android
cp -raf out/target/product/eee_701/root /home/android
cp -raf out/target/product/eee_701/system /home/android
cp -raf out/target/product/eee_701/data /home/android
before chroot, try to add chmod -R o+r /home/android
Meanwhile, you may need to modify the init.rc to remove those
system,data related mounting, as well as those kernel modules.

then: chroot /home/android /init

Hope it helps!
--
Chen

gowtham gowda

unread,
Apr 19, 2009, 8:42:38 PM4/19/09
to android-porting
i am getting the following error:
[ 1342.051355] Bulk In Failed. Status=-71, BIIdx=0x4, BIRIdx=0x4,
actual_length= 0x0
[ 1399.669726] init[10339]: segfault at 00000020 eip 0804be00 esp
bfdc0c90 error 6
[ 1402.741197] init[11162]: segfault at 00000020 eip 0804be00 esp
bfe234f0 error 6


On Apr 19, 7:01 pm, Chen Yang <sunsety...@gmail.com> wrote:
> You can copy all the out/target/product/eee_701/root directory to one
> directory, say /home/android
> cp -raf out/target/product/eee_701/root /home/android
> cp -raf out/target/product/eee_701/system /home/android
> cp -raf out/target/product/eee_701/data /home/android
> before chroot, try to add chmod -R o+r  /home/android
> Meanwhile, you may need to modify the init.rc to remove those
> system,data related mounting, as well as those   kernel modules.
>
> then: chroot /home/android /init
>
> Hope it helps!
> --
>  Chen
>

gowtham gowda

unread,
Apr 19, 2009, 8:50:54 PM4/19/09
to android-porting
# chroot /mnt/android /init
Segmentation fault

Chen Yang

unread,
Apr 19, 2009, 10:00:32 PM4/19/09
to android...@googlegroups.com
have you used the android kernel on your host?
--
Chen

gowtham gowda

unread,
Apr 20, 2009, 4:11:26 PM4/20/09
to android-porting
1st time i used the moblin kernel, but when i use the android kernel i
am getting the "segmentation fault". The dmesg output is

[ 165.505690] init: /init.rc: 183: invalid option 'enabled'
[ 167.114261] init[1230]: segfault at 00000020 eip 0804be00 esp
bffde7c0 error 6


On Apr 19, 10:00 pm, Chen Yang <sunsety...@gmail.com> wrote:
> have you used the android kernel on your host?
> --
>  Chen
>

Chen Yang

unread,
Apr 20, 2009, 8:39:06 PM4/20/09
to android...@googlegroups.com
Your init.rc seems to have problem at lne 183, i don't know whether it
may cause the segfault.
--
Chen

Yi Sun

unread,
Apr 20, 2009, 8:46:05 PM4/20/09
to android...@googlegroups.com
If he is using the old patch, then there maybe a typo in the init.rc
added by me under the line for adbd. If that is the case, just remove
the enabled. But it is unlikely to cause the segfault.
Yi

gowtham gowda

unread,
Apr 20, 2009, 9:47:17 PM4/20/09
to android-porting
i am not getting the init.rc error anymore, but i still get the
segmentation fault. looks like this wont work, i need to work on
making a bootable usb drive. I am able to make a efi bootable usb for
moblin. I really want to make one for android. Can some one help me?

Gowtham


> If he is using the old patch, then there maybe a typo in the init.rc
> added by me under the line for adbd. If that is the case, just remove
> the enabled. But it is unlikely to cause the segfault.
> Yi
>
> On Tue, 2009-04-21 at 08:39 +0800, Chen Yang wrote:
> > Your init.rc seems to have problem at lne 183, i don't know whether it
> > may cause the segfault.
> > --
> > Chen
>

Chen Yang

unread,
Apr 20, 2009, 10:17:57 PM4/20/09
to android...@googlegroups.com
Maybe you may need to locate the fauty function to the segfault issue.
It won't be very difficult.
0804be00, try to objdump the init program to see what function it
belongs to then try to locate the issue.
--
Chen

Yi Sun

unread,
Apr 20, 2009, 10:47:09 PM4/20/09
to android...@googlegroups.com
Can you at least put a gdb there to get a back trace or something?

gowtham gowda

unread,
Apr 21, 2009, 12:07:00 AM4/21/09
to android-porting
i have installed gdb on objdump on the machine. How do i use them?

Thanks,
Gowtham

Yi Sun

unread,
Apr 21, 2009, 1:11:01 AM4/21/09
to android...@googlegroups.com
gdb ./init
(gdb) run

and then wait it to crash. After that run "bt" or "where" to find where
it crashs.
And then ..... dump point value, dump register, .......

gowtham gowda

unread,
Apr 21, 2009, 9:46:49 AM4/21/09
to android-porting
this is the gdb output

# gdb ./init
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/
gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show
copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) run
Starting program: /init

Program received signal SIGSEGV, Segmentation fault.
property_set (name=0x806b69c "ro.secure", value=0x806b6a6 "0") at
system/core/init/property_service.c:287
287 pi->serial = (valuelen << 24);

Yi Sun

unread,
Apr 21, 2009, 10:50:37 AM4/21/09
to android...@googlegroups.com, android-porting
Check if u have /dev/ashmem node

Yi Sun

unread,
Apr 21, 2009, 6:49:06 PM4/21/09
to android...@googlegroups.com
Your kernel is wrong for sure. I have installed Android kernel with my
ubuntu, the Android runs until it hits on the frame buffer (I don't have
fb at all in my ubuntu)

gowtham gowda

unread,
Apr 21, 2009, 10:11:39 PM4/21/09
to android-porting
looks like this has everything to do with the efi boot. the efi
partition has a vmlinux file. and looks like that is getting loaded

this is the sum0 file for efi boot

0
acpi=force console=ttyS0,115200 root=/dev/sda2 rootdelay=7
20bf2b64f486b1807bd59dd3299b10f8 vmlinux


What can i do now?

Thanks for all the help,
Gowtham

Yi Sun

unread,
Apr 22, 2009, 12:49:24 AM4/22/09
to android...@googlegroups.com
I have never used efi so I can not give you much of suggestion. YOU need
to find a manual from somewhere that can tell you how to solve the
issue.
Reply all
Reply to author
Forward
0 new messages