Search code examples
linuxlinux-kernelembedded-linuxbsp

enabling low level debuging in kernel on serial port


I am compiling a linux distribution(openwrt) for beaglebone-black and getting the following o/p on my serial port uncompressing Linux....done,booting the kernel(kernel hangs) in order to trace the error i have enabled CONFIG_DEBUG_LL=y(enables the low level debuging) and CONFIG_DEBUG_INFO=y(enables kernel debug information) but i found CONFIG_DEBUG_LL_UART_NONE=y so if i am correct this means the platform does not support UART debugging(even though kernel is giving the information i might not be seeing that) so is there any other way to debug the kernel or enable the serial port on beagle bone black? if any 1 can guide me through that it would be a great help.....

thanks,


Solution

  • If you have a debugger, then you can certainly debug why your kernel is not booting up.

    Assuming, you have one, do the following:

    1. In Kernel configuration, enable CONFIG_DEBUG_INFO (Kernel Hacking -> Compile-time checks and compiler options)
    2. Compile the kernel
    3. From the debugger software, load the symbols from the elf. The command varies from one debugger to another
    4. Find symbol "log_buf", and chose option to "Display memory as dump"

    There you can see the kernel logs that are not yet printed but stored in the buffer. Hope it helps!