[llvmlinux] rpi, serial and kgdb
Sedat Dilek
sedat.dilek at gmail.com
Mon Jan 21 23:37:29 UTC 2013
On Tue, Jan 22, 2013 at 12:28 AM, Tinti <viniciustinti at gmail.com> wrote:
> Thank you so much!
>
> It is working like a charm. As you said on #llvmlinux:
>
>> CONFIG_HAVE_ARCH_KGDB=y
>> CONFIG_KGDB=y
>> CONFIG_KGDB_SERIAL_CONSOLE=y
>
Yupp, KGDB is cool - I went through hell when trying to catch a VFS
issue with systemd [1].
The whole world recommended a netconsole setup which required two machines.
With KGBD I could interactively see the early boot-logs and call-traces.
So, I could grab some screenshots for the experts.
[1] also list some kernel-config options.
Unsure, if they are still correct.
Damn, I made so much (early-)testing, no silver medal for me, tststs.
- Sedat -
[1] http://lists.freedesktop.org/archives/systemd-devel/2010-December/000894.html
>
> Tinti
>
>
> On Mon, Jan 21, 2013 at 3:37 PM, Jan-Simon Möller <dl9pf at gmx.de> wrote:
>>
>> Hi all!
>>
>> Here's a short documentation on how to use the serial port on the rpi with
>> console and gdb:
>>
>>
>> * Build your kernel with debugging symbols and kgdb (over serial) enabled.
>>
>>
>> * Deploy it, boot it.
>>
>>
>> * Change the kernel cmdline and add:
>>
>> console=ttyAMA0,115200 kgdboc=ttyAMA0,115200
>>
>> 1st is the serial console, 2nd is the gdb connection.
>>
>>
>> * download and build agent-proxy
>> git clone http://git.kernel.org/pub/scm/utils/kernel/kgdb/agent-proxy.git
>> cd agent-proxy
>> make
>> ./agent-proxy 5550^5551 0 /dev/ttyUSB0,115200
>>
>>
>> Now we have console on port 5550 and gdb on port 5551.
>> Boot the board and ...
>>
>> a) telnet 127.0.0.1:5550 -> console
>> b) gdb:
>>
>> gdb vmlinux
>> - set remotebaud 115200
>> - target remote 127.0.0.1:5551
>>
>> Et voila!
>>
>> Best,
>> JS
>>
>> --
>>
>> Dipl.-Ing.
>> Jan-Simon Möller
>>
>> jansimon.moeller at gmx.de
>> _______________________________________________
>> LLVMLinux mailing list
>> LLVMLinux at lists.linuxfoundation.org
>> https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux
>
>
>
>
> --
> Vinicius Tinti
> mail => {viniciustinti at gmail.com, tinti at comp.eng.br}
> skype => {viniciustinti}
>
> _______________________________________________
> LLVMLinux mailing list
> LLVMLinux at lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux
More information about the LLVMLinux
mailing list