In this post I will show how to enable KGDB in Angstrom.

In order to enable KGDB, we need to modify kernel configurations and rebuild the kernel. For desktop Linux distributions, we can do this by make menuconfig. In Angstrom, it’s similar. We only need to replace the make command by bitbake command and setup its environment. Here are the steps:
1. source ~/.oe/environment-angstromv2012.05
2. bitbake virtual/kernel -c menuconfig
After this you should see an interactive menu popped up in a new terminal. Here you can modify all kinds of kernel setting. For KGDB, please select Kernel Features

Here you will see a bunch of settings. Go to Kernel hacking:

Enable KGDB: kernel debugger and enter its sub menu. By default it should be enabled.

Enable KGDB: use kgdb over the serial console

We’re done with the settings. Now we can exit. Before we exit, be sure to save.

3. Rebuild the kernel.

 

Problem 1:
When entering bitbake command, you may see the following error message:
ERROR: No valid terminal found, unable to open devshell
ERROR: Function failed: do_menuconfig

If you check the log file you will see:
DEBUG: Attempting to spawn terminal "gnome"
DEBUG: Attempting to spawn terminal "konsole"
DEBUG: Attempting to spawn terminal "xfce"
DEBUG: Attempting to spawn terminal "rxvt"
DEBUG: Attempting to spawn terminal "xterm"
DEBUG: Attempting to spawn terminal "screen"
ERROR: No valid terminal found, unable to open devshell
ERROR: Function failed: do_menuconfig

This is because menuconfig was trying to open a new terminal. However, on your system none of these terminals is installed. It can be solved by installing anyone of the terminals.

Problem 2:
When entering bitbake command, instead of showing the menu, a terminal popped up and closed immediately.
This is because menuconfig uses libncurses for interactive menu. If libncurses is not installed on the system (newer versions of Ubuntu do not have this). You need to install it:
sudo apt-get install ncurses-base

 

References:
https://groups.google.com/forum/?fromgroups=#!topic/beagleboard/xGJtod0yz90
https://groups.google.com/forum/?hl=en&fromgroups=#!searchin/beagleboard/menuconfig/beagleboard/oMQ_fzK_-EY/i1QLg_iGVHEJ

silentlain 發表在 痞客邦 PIXNET 留言(0) 人氣()