h1. GalaxyNexusSerialConsole * http://redmine.replicant.us/projects/replicant/wiki/S5PC110Bootloader works as a serial cable. When you connect the cable you get the FIQ debugger, but what if you want kgdb instead: * apply that patch:
diff --git a/arch/arm/mach-omap2/board-tuna.c b/arch/arm/mach-omap2/board-tuna.c
index a022a43..7098227 100644
--- a/arch/arm/mach-omap2/board-tuna.c
+++ b/arch/arm/mach-omap2/board-tuna.c
@@ -1001,6 +1001,8 @@ static inline void __init board_serial_init(void)
        omap_serial_init_port_pads(0, uart1_pads, uart1_pads_sz, NULL);
        omap_serial_init_port_pads(1, tuna_uart2_pads,
                ARRAY_SIZE(tuna_uart2_pads), &tuna_uart2_info);
+       omap_serial_init_port_pads(2,tuna_uart3_pads,
+               ARRAY_SIZE(tuna_uart3_pads), NULL);
        omap_serial_init_port_pads(3, tuna_uart4_pads,
                                   ARRAY_SIZE(tuna_uart4_pads), NULL);
 }
* remove the FIQ debugger in the kernel configuration. * change the CMDLINE trough the kernel configuration: Use:
CONFIG_CMDLINE="console=ttyO2 androidboot.console=ttyO2 [...]"
Instead of:
CONFIG_CMDLINE="console=ttyFIQ0 androidboot.console=ttyFIQ0 [...]"
* Verify that you get the kernel messages. * Then change the cmdline for kgdb
CONFIG_CMDLINE="kgdboc=ttyO2,115200 console=ttyO2 androidboot.console=ttyO2 [...]"
Don't add kgdbwait tough because it result in that:
(gdb) set remotebaud 115200
(gdb) target remote /dev/ttyUSB0
/dev/ttyUSB0: Device or resource busy.
(gdb) target remote /dev/ttyUSB0
Remote debugging using /dev/ttyUSB0
kgdb_breakpoint ()
    at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/kernel/debug/debug_core.c:954
954		arch_kgdb_breakpoint();
(gdb) c
Continuing.

Program received signal SIGSEGV, Segmentation fault.
__raw_spin_lock_irqsave (lock=0x288)
    at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/kernel/spinlock.c:112
112	BUILD_LOCK_OPS(spin, raw_spinlock);
(gdb) bt
#0  __raw_spin_lock_irqsave (lock=0x288)
    at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/kernel/spinlock.c:112
#1  0xc061aecc in _raw_spin_lock_irqsave (lock=0x288)
    at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/kernel/spinlock.c:145
#2  0xc0098620 in try_to_wake_up (p=0x0, state=1611595795, wake_flags=1)
    at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/kernel/sched.c:2681
#3  0xc009897c in wake_up_process (p=0x288)
    at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/kernel/sched.c:2785
#4  0xc00e2090 in proc_dohung_task_timeout_secs (table=, write=, 
    buffer=, lenp=, ppos=0xc782bf70)
    at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/kernel/hung_task.c:190
#5  0xc0174178 in proc_sys_call_handler (filp=, buf=0x24808, count=1, ppos=0xc782bf70, 
    write=1) at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/fs/proc/proc_sysctl.c:158
#6  0xc01741b0 in proc_sys_write (filp=0x288, buf=0x600f0013 
, count=1, ppos=0xc782a000) at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/fs/proc/proc_sysctl.c:176 #7 0xc0126420 in vfs_write (file=0xc73be500, buf=0x24808 "0", count=, pos=0xc782bf70) at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/fs/read_write.c:377 #8 0xc0126590 in sys_write (fd=, buf=0x24808 "0", count=1) at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/fs/read_write.c:429 #9 0xc0055a00 in ?? () Cannot access memory at address 0x0 #10 0xc0055a00 in ?? () Cannot access memory at address 0x0 Backtrace stopped: previous frame identical to this frame (corrupt stack?)