Dear All,
I'm porting bsp for imx8m-mini based board from Android 10 to Android 14. In minicom, I can see Kernel booting, however after several seconds of running it just hangs. After having exhausted all available options debugging using debug logs, I am now trying to troubleshoot using gdb.
For that purpose, I rebuilt the kernel with the following configs in my kernel defconfig file:
CONFIG_KGDB=y
CONFIG_KGDB_SERIAL_CONSOLE=y
CONFIG_KGDB_KDB=y
CONFIG_FRAME_POINTER=y
CONFIG_KALLSYMS=y
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_KERNEL=y
CONFIG_GDB_SCRIPTS=y
In addition, I added the following line to BoardConfig.mk, as suggested here, expecting the kernel to wait for debugger to attach:
BOARD_KERNEL_CMDLINE += kgdboc=ttymxc2 kgdbwait
Unfortunately, the kernel boots without waiting. Also, my attempts to connect to it using the sequence below, fail. (I get the error "Remote connection closed" once I turn on the board)
sudo gdb vmlinux
target remote /dev/ttyUSB0
Can anyone please suggest what else I can try to troubleshoot the hanging kernel?
Hello,
You don't need to port the android 14 and android 15, because is on the BSP section please check it:
Regards
Thank you for your reply. The board I am porting the bsp for is indeed based on one of the reference boards in the link you had attached, however it contains custom features that need porting.
In the meantime, I was able to find the problematic driver by adding the following line to BoardConfig.mk, tracing the initcall calls and disabling suspicious drivers until finding the erroneous one.
BOARD_KERNEL_CMDLINE += initcall_debug