Attaching to Android 14 Kernel using gdb

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Attaching to Android 14 Kernel using gdb

647件の閲覧回数
Dmitri
Contributor II

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?

ラベル(2)
0 件の賞賛
返信
2 返答(返信)

597件の閲覧回数
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

You don't need to port the android 14 and android 15, because is on the BSP section please check it:

https://www.nxp.com/design/design-center/software/embedded-software/i-mx-software/android-os-for-i-m...

 

Regards

 

0 件の賞賛
返信

591件の閲覧回数
Dmitri
Contributor II

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