Find the answer to your Linux question:
Results 1 to 3 of 3
hi, So i have been cross compiling a Linux kernel with a busy box file system and testing it with qemu. i am also building my own gcc cross compiler. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2012
    Posts
    3

    help with kernel panic in qemu (arm)


    hi,

    So i have been cross compiling a Linux kernel with a busy box file system and testing it with qemu. i am also building my own gcc cross compiler. here are the tools and Linux kernel used:

    gmp-5.0.1.tar.bz2
    binutils-2.21.1.tar.bz2
    linux-3.0.36.tar.bz2
    uClibc-0.9.31.tar.bz2
    busybox-1.20.2.tar.bz2
    gcc-4.7.0.tar.bz2
    mpc-0.9.tar.gz
    mpfr-3.0.0.tar.bz2

    the target arm is a cortex a9 so the Linux kernel was configured with the vexpress_defconfig. busybox was configured with just defconfig and as a static binary. when qemu boots with this

    qemu-system-arm -m 1024 -M vexpress-a9 -serial stdio -kernel zImage -initrd rootfs.img.gz -append "root=/dev/ram console=ttyAMA0 rdinit=/sbin/init user_debug=31"

    this is what i get back where the panic occurred

    Freeing init memory: 164K
    pgd = bf8c0000
    [00116004] *pgd=9f3da831, *pte=00000000, *ppte=00000000

    Pid: 1, comm: init
    CPU: 0 Not tainted (3.0.36 #13)
    PC is at 0xd8c50
    LR is at 0xd8bb0
    pc : [<000d8c50>] lr : [<000d8bb0>] psr: 60000010
    sp : 7eb68d08 ip : 00117000 fp : fffff000
    r10: 00001000 r9 : 00116000 r8 : 0011493c
    r7 : 00000000 r6 : 00001000 r5 : 00000018 r4 : 00114908
    r3 : 00116000 r2 : 00001000 r1 : 00117000 r0 : 00000001
    Flags: nZCv IRQs on FIQs on Mode USER_32 ISA ARM Segment user
    Control: 10c53c7d Table: 9f8c006a DAC: 00000015
    input: AT Raw Set 2 keyboard as /devices/mb:kmi0/serio0/input/input0
    Kernel panic - not syncing: Attempted to kill init!
    [<8003d55c>] (unwind_backtrace+0x0/0xf from [<80345ea4>] (panic+0x5c/0x17
    [<80345ea4>] (panic+0x5c/0x17 from [<80055628>] (do_exit+0x658/0x70c)
    [<80055628>] (do_exit+0x658/0x70c) from [<8005595c>] (do_group_exit+0x3c/0xcc)
    [<8005595c>] (do_group_exit+0x3c/0xcc) from [<800607e8>] (get_signal_to_deliver+0x160/0x40c)
    [<800607e8>] (get_signal_to_deliver+0x160/0x40c) from [<80039b1c>] (do_signal+0x64/0x534)
    [<80039b1c>] (do_signal+0x64/0x534) from [<8003a588>] (do_notify_resume+0x38/0x44)
    [<8003a588>] (do_notify_resume+0x38/0x44) from [<80036fd8>] (work_pending+0x24/0x2


    I have have been trying to find some solution to this, but to no avail. any ideas are welcome.

    thanks.

  2. #2
    Just Joined!
    Join Date
    Aug 2012
    Posts
    1
    I ran into a similar problem recently. From what I could tell, init is dying as the platform is not recognizing the instructions in the binary. I hand-built my own init which avoided this problem. Refer to this URL for building such an init:

    balau82.wordpress.com slash 2012 slash 03 slash 31 slash compile-linux-kernel-3-2-for-arm-and-emulate-with-qemu

    [I had to put in "slash" instead of / as for some stupid reason, I am not allowed to provide direct links until I have made 15 posts ]


    I then picked up initrd and Rootfs from these sites, which avoided the reported problem.

    people.debian.org slash ~aurel32 slash qemu slash armel slash initrd.img-2.6.32-5-versatile
    people.debian.org slash ~aurel32 slash qemu slash armel slash debian_lenny_armel_standard.qcow2

    Hope this helps!
    vatsa

  3. #3
    Just Joined!
    Join Date
    Jul 2012
    Posts
    3
    thanks,


    I'll give that a try. I was some what afraid th\at the kernel had some bad option in it that would cause this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •