Porting Android on VersatilePB

212 views
Skip to first unread message

madhu

unread,
Nov 18, 2014, 1:49:32 AM11/18/14
to android...@googlegroups.com
I'm trying to port Android on VersatilePB using [Android Goldfish 3.10 kernel](https://android.googlesource.com/kernel/goldfish/+/android-goldfish-3.10).
First, I configured kernel for `versatile_defconfig` and I successfully built it. I got `.config` file, renamed it as `versatile_config` and added Android base configuration to that using the following command

    ARCH=arm scripts/kconfig/merge_config.sh versatile_config android/configs/android-base.cfg

Again, I built the kernel successfully. After that, I built the Android Google source code and I have taken `ramdisk.img` from `google_src_v4.4/out/target/product/generic`. After that, I tested using following command,

    qemu-system-arm -M versatilepb -kernel ./arch/arm/boot/zImage -initrd ramdisk.img -append "console=ttyAMA0 root=/dev/ram0 rw" -serial stdio

but I'm getting the following error.

    Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
   
    CPU: 0 PID: 1 Comm: init Not tainted 3.10.0 #12
    [<c001271c>] (unwind_backtrace+0x0/0xe8) from [<c001129c>] (show_stack+0x10/0x14)
    [<c001129c>] (show_stack+0x10/0x14) from [<c03682c0>] (panic+0x8c/0x1d4)
    [<c03682c0>] (panic+0x8c/0x1d4) from [<c001fe94>] (do_exit+0x7f8/0x8d8)
    [<c001fe94>] (do_exit+0x7f8/0x8d8) from [<c001ffe0>] (do_group_exit+0x40/0xd4)
    [<c001ffe0>] (do_group_exit+0x40/0xd4) from [<c002a75c>] (get_signal_to_deliver+0x178/0x5c4)
    [<c002a75c>] (get_signal_to_deliver+0x178/0x5c4) from [<c00109a4>] (do_signal+0xd0/0x434)
    [<c00109a4>] (do_signal+0xd0/0x434) from [<c0010ea4>] (do_work_pending+0xa8/0xb8)
    [<c0010ea4>] (do_work_pending+0xa8/0xb8) from [<c000e19c>] (work_pending+0xc/0x20)

How to fix it?

Peter Teoh

unread,
Dec 4, 2014, 8:59:37 PM12/4/14
to android...@googlegroups.com
somehow related to the "init()" function, where kernel is trying to create the very first process (in userspace) for the first time - this is also where LInux and Android differs.    So did you use the QEMU from Android?:


And see the discussion here:

  
there are some hints here:



How to fix it?

--
--
unsubscribe: android-kerne...@googlegroups.com
website: http://groups.google.com/group/android-kernel
---
You received this message because you are subscribed to the Google Groups "Android Linux Kernel Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-kerne...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Regards,
Peter Teoh

Peter Teoh

unread,
Dec 4, 2014, 10:12:45 PM12/4/14
to android...@googlegroups.com
On Fri, Dec 5, 2014 at 9:58 AM, Peter Teoh <htmlde...@gmail.com> wrote:


On Tue, Nov 18, 2014 at 2:49 PM, madhu <madh...@gmail.com> wrote:
I'm trying to port Android on VersatilePB using [Android Goldfish 3.10 kernel](https://android.googlesource.com/kernel/goldfish/+/android-goldfish-3.10).
First, I configured kernel for `versatile_defconfig` and I successfully built it. I got `.config` file, renamed it as `versatile_config` and added Android base configuration to that using the following command

    ARCH=arm scripts/kconfig/merge_config.sh versatile_config android/configs/android-base.cfg

Again, I built the kernel successfully. After that, I built the Android Google source code and I have taken `ramdisk.img` from `google_src_v4.4/out/target/product/generic`. After that, I tested using following command,

    qemu-system-arm -M versatilepb -kernel ./arch/arm/boot/zImage -initrd ramdisk.img -append "console=ttyAMA0 root=/dev/ram0 rw" -serial stdio

but I'm getting the following error.

    Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
   
    CPU: 0 PID: 1 Comm: init Not tainted 3.10.0 #12
    [<c001271c>] (unwind_backtrace+0x0/0xe8) from [<c001129c>] (show_stack+0x10/0x14)
    [<c001129c>] (show_stack+0x10/0x14) from [<c03682c0>] (panic+0x8c/0x1d4)
    [<c03682c0>] (panic+0x8c/0x1d4) from [<c001fe94>] (do_exit+0x7f8/0x8d8)
    [<c001fe94>] (do_exit+0x7f8/0x8d8) from [<c001ffe0>] (do_group_exit+0x40/0xd4)
    [<c001ffe0>] (do_group_exit+0x40/0xd4) from [<c002a75c>] (get_signal_to_deliver+0x178/0x5c4)
    [<c002a75c>] (get_signal_to_deliver+0x178/0x5c4) from [<c00109a4>] (do_signal+0xd0/0x434)
    [<c00109a4>] (do_signal+0xd0/0x434) from [<c0010ea4>] (do_work_pending+0xa8/0xb8)
    [<c0010ea4>] (do_work_pending+0xa8/0xb8) from [<c000e19c>] (work_pending+0xc/0x20)


somehow related to the "init()" function, where kernel is trying to create the very first process (in userspace) for the first time - this is also where LInux and Android differs.    So did you use the QEMU from Android?:


And see the discussion here:

  
there are some hints here:





Here is the commandline for emulating Android images (note that the rootfs structure has to follow that of Android, :


--
Regards,
Peter Teoh

arch...@gmail.com

unread,
Sep 24, 2015, 5:53:36 PM9/24/15
to Android Linux Kernel Development
I have met this issue. My reason is the busybox compiled by the latest arm-none-linux-gnueabi which use armv7 instruction, but VersatilePB's architecture is armv5t, After I changed board type to vexpress-a9, this issue never happen. Hope to help.


在 2014年11月18日星期二 UTC+8下午2:49:32,madhu写道:
Reply all
Reply to author
Forward
0 new messages