Hi. I’ve just started working with the hikey960. I’m trying to achieve kernel debugging with an aosp kernel. I’m close but my issue is that the board reboots (possibly a watchdog in the bootloader, maybe???). I’m using the uart daughter board https://www.seeedstudio.com/96Boards-UART-p-2525.html for my serial connection
Here are my steps
- Following directions on aosp site for buiding with the hikey for kernel version 4.9
- Built modified kernel v4.9 for hikey with kgdb enabled in the .config
- Copy .dtb and image files to hikey-kernel in aosp and build
- Modified the boot args to add “kgdboc=ttyFIQ0,115200 kgdbretry=4”
- Flash images to board with fastboot
- Through the serial connection on my host (/dev/ttyUSB0), I can see all the bootup messages
- adb shell to my device, run su and then echo -n g > /proc/sysrq-trigger
- I see in my serial output “sysrq: SysRq : DEBUG” and “KGDB: Entering KGDB”
- Wait about 10 secs and the board reboots into fastboot mode
Do I need to disable a timer somewhere???
Note: If I’m fast enough, I can connect with gdb and set breakpoints and call “info reg” and “where” commands. But eventually, the board hangs and gdb no longer gets responses to commands. I have to power cycle the board if I had attached gdb. If I hadn’t attached gdb, the board just reboots into fastboot.
Thanks for your help