I have done this earlier directly with qemu-kvm.

I used to launch the QEMU with the  commandline:-
qemu-kvm -hda MyImage.raw -m 128 -redir tcp:12345::22 -nographic -s -S

and then gdb using
$ gdb <path-to-vmlinux>
target remote:1234

Not sure if this is useful to you, but the above combination worked for me.
Is the same gcc cross compiler (arm-eabi-gdb) being used to build the
kernel ?

--
Regards,
Karthik Poduval


On Tue, Mar 24, 2015 at 6:16 PM, Emeric VIGIER <emeric.vig...@gmail.com>
wrote:

> Try enabling EARLY_PRINTK for your platform. This may or not may not be
> supported. If it is, add the proper command line argument to enable this,
> visit those:
>
>
> http://smackerelofopinion.blogspot.ca/2009/11/kernel-early-printk-messages.html?m=1
>
> http://elinux.org/Debugging_by_printing#Debugging_early_boot_problems
>
> What version of Linux did you compile? What toolchain did you use?
>
> Emeric
> Le 11 févr. 2015 1:11 PM, "Chris Furlough" <chrisfurlo...@gmail.com> a
> écrit :
>
>> Hey Guys.
>>
>> I'm trying to do some custom kernel development under the goldfish
>> emulator.  I've compiled my own kernel (using the goldfish config), and
>> gdb.  I'm having some problems that I hope you guys can help with.  (I've
>> exhausted my google searches and online tutorials).
>>
>> I'm using Android Studio to launch the emulator with the following
>> command line:
>> /home/android/Android/Sdk/tools/emulator -avd Nexus_10_API_19 -netspeed
>> full -netdelay none -show-kernel -qemu -s -S -kernel
>> /home/android/goldfish/arch/arm/boot/zImage
>>
>> This loads, and stops as you'd expect.  I launch gdb in a different
>> window:
>> ~/WholeTree/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin$ ./arm-eabi-gdb
>> ~/goldfish/vmlinux
>>
>> I then do this:
>> (gdb) target remote :1234
>> Remote debugging using :1234
>> 0x00000000 in ?? ()
>>
>> Obviously that 0x00000000 is a problem.  *The kernel versions match.
>> Why is this?*
>>
>> I'm working with the early boot stuff inside the Linux kernel.
>>
>> When I launch the kernel, via:
>>
>> (gdb) cont
>> Continuing.
>>
>> I get this:
>>
>> serial0 console
>> Uncompressing Linux... done, booting the kernel.
>>
>>
>> And then it hangs.
>>
>> When I ctrl-c it, I get:
>>
>> ^C
>> Program received signal SIGINT, Interrupt.
>> 0x0044f82c in ?? ()
>>
>>
>> *I'm not asking for help with my CODE, only my debugging.  Any ideas what
>> my GDB problem is here?*
>>
>> --
>> --
>> unsubscribe: android-kernel+unsubscr...@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-kernel+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>  --
> --
> unsubscribe: android-kernel+unsubscr...@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-kernel+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Regards,
Karthik Poduval

-- 
-- 
unsubscribe: android-kernel+unsubscr...@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-kernel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to