PIXNET Logo登入

SilentLain's Blog

跳到主文

SilentLain's Blog

部落格全站分類:心情日記

  • 相簿
  • 部落格
  • 留言
  • 名片
  • 5月 17 週五 201308:11
  • [BeagleBoard] How to do kernel debug in Angstrom? (5)


In the previous post, we’ve successfully launched KGDB on BeagleBoard. Now we need to execute GDB with BeagleBoard’s symbol table and and remote connect to KGDB on BeagleBoard. 1. Go to the folder we built arm-angstrom-linux-gnueabi-gdb and type:
./arm-angstrom-linux-gnueabi-gdb [path to vmlinux file] GDB will launch and you should see:
(繼續閱讀...)
文章標籤

silentlain 發表在 痞客邦 留言(1) 人氣(98)

  • 個人分類:BeagleBoard
▲top
  • 5月 16 週四 201310:06
  • [BeagleBoard] How to do kernel debug in Angstrom? (4)

Now all the files are ready. We need to boot BeagleBoard to KGDB. How? Here’s the flow chart for KGDB:
Since we want to launch KGDB as early as possible, KGDB is executed before the boot process is even completed. Therefore we need to modify the bootargs for Angstrom. We can do this in U-boot. For xM model, another way is to modify the uEnv.txt file. Append the following parameters to optargs: kgdboc=ttyO2,115200n8 kgdbwait
(繼續閱讀...)
文章標籤

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

  • 個人分類:BeagleBoard
▲top
  • 5月 16 週四 201309:29
  • [BeagleBoard] How to do kernel debug in Angstrom? (3)

In this post I will address GDB on the PC side.
GDB comes preinstalled with most Linux distributions. You can definitely find one in your PC. However, these GDBs are not what we need here. We need a GDB that runs on PC (x86, x86-64) but can debug ARM architecture. Therefore we need to build it. Fortunately, OpenEmbedded already has pre-written recipes for it. All we need to do is type the following commands:
source ~/.oe/environment-angstromv2012.05
bitbake gdb-cross
(繼續閱讀...)
文章標籤

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

  • 個人分類:BeagleBoard
▲top
  • 5月 16 週四 201309:06
  • [BeagleBoard] How to do kernel debug in Angstrom? (2)


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
(繼續閱讀...)
文章標籤

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

  • 個人分類:BeagleBoard
▲top
  • 5月 16 週四 201307:52
  • [BeagleBoard] How to do kernel debug in Angstrom? (1)

Generally speaking there are two ways to do kernel debugging in Angstrom:
1. Using KGDB as a remote GDB agent.
2. Using a hardware JTAG to control the processor.
I will focus on KGDB. Here’s how KGDB debugging works:
KGDB debugging will require a BeagleBoard as client and a PC as host. On BeagleBoard it will run KGDB; on PC it will run GDB. GDB on PC will debug BeagleBoard using KGDB through COM port.
(繼續閱讀...)
文章標籤

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

  • 個人分類:BeagleBoard
▲top
  • 12月 18 週二 201211:17
  • [BeagleBoard] How to modify Angstrom kernel and build? Part 2

In the previous post, we successfully built a Angstrom kernel and kept all the source code. In this post we’ll learn how to modify the source code and rebuild it. First we need to locate the source code. Since we’ve commented out INHERIT += "rm_work" in conf/local.conf, it should be kept somewhere on our hard disk. It is located at setup-scripts/build/tmp-angstrom_v2012_05-eglibc/work/beagleboard-angstrom-linux-gnueabi/linux-mainline-3.2.28-r122a/git/ . If you open this folder, you will see the complete kernel source tree here. Let’s try a simple example: 1. Go to source tree folder and use text editor to open /kernel/fork.c.
(繼續閱讀...)
文章標籤

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

  • 個人分類:BeagleBoard
▲top
  • 12月 18 週二 201207:31
  • [BeagleBoard] How to modify Angstrom kernel and build? Part 1

So now we know how to build and run the distribution we made ourselves. But how do we modify it? How do we modify the source code and rebuild it? This serious of posts will guide you through it. This method of kernel modification is based on bitbake scripts from github that described in previous posts. If you haven’t done it, please finish it first. 1. Install necessary packages. Since we’ve already installed a bunch of packages, right now we only need git-core. Simply type “sudo apt-get install git-core” will do the job.
(繼續閱讀...)
文章標籤

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

  • 個人分類:BeagleBoard
▲top
  • 12月 18 週二 201203:10
  • [BeagleBoard] How to put your Angstrom distribution to a new micro SD card and boot from it? Part 2

If you followed the last post and booted the BeagleBoard successfully, congratulations! This post is irrelevant to you. However, if you followed all the instructions and still failed, this is the post you’re looking for. Scenario 1:
Build parameter: systemd-gnome-image
Symptom:
Halt at random point after kernel is loaded.
Solution:
Haven’t found yet.
(繼續閱讀...)
文章標籤

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

  • 個人分類:BeagleBoard
▲top
  • 12月 12 週三 201210:41
  • [BeagleBoard] How to put your Angstrom distribution to a new micro SD card and boot from it? Part 1

After finishing previous post on “How to build your own Angstrom distribution”, now we should have everything ready. We just need to put files to micro SD card and it should boot.
1. Download this file and format microSD using it. The microSD card must be at least 4 GB. This process will PERMANENTLY delete the contents! Please backup your micro SD card first.
1.a: In terminal, type "sudo fdisk -l" to know which sdX is microSD card mounted.
1.b: Unmount the microSD by typing "umount /dev/sdX". If there are multiple partitions, you may need to umount sdX1, sdX2... manually and lastly umount sdX.
1.b: Type "sudo sh mkcard.txt /dev/sdX", where sdX is your microSD card. Check this post if you want to know more about script.
(繼續閱讀...)
文章標籤

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

  • 個人分類:BeagleBoard
▲top
  • 11月 19 週一 201207:08
  • [Study] Something about Linux shell script and source command (Dot)

There are several ways to run a shell script in Linux: directly execute it (./scriptname, assuming it is executable), invoke the script with sh command or with source (dot) command. What’s the difference?
Let’s try the following example:
Open a shell and type
x=10 (Note that there’s no space between each character)
echo $x
This will create a variable x and set its value to 10. Then print out current value of x in current shell.
(繼續閱讀...)
文章標籤

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

  • 個人分類:Study
▲top
12...15»

個人頭像

silentlain
暱稱:
silentlain
分類:
心情日記
好友:
累積中
地區:

aNobii

近期文章

  • [BeagleBoard] How to do kernel debug in Angstrom? (5)
  • [BeagleBoard] How to do kernel debug in Angstrom? (4)
  • [BeagleBoard] How to do kernel debug in Angstrom? (3)
  • [BeagleBoard] How to do kernel debug in Angstrom? (2)
  • [BeagleBoard] How to do kernel debug in Angstrom? (1)
  • [BeagleBoard] How to modify Angstrom kernel and build? Part 2
  • [BeagleBoard] How to modify Angstrom kernel and build? Part 1
  • [BeagleBoard] How to put your Angstrom distribution to a new micro SD card and boot from it? Part 2
  • [BeagleBoard] How to put your Angstrom distribution to a new micro SD card and boot from it? Part 1
  • [Study] Something about Linux shell script and source command (Dot)

熱門文章

  • (21,584)[Books]扶他(ふたなり)作品介紹
  • (291)[ACG][Anime]從攻殼機動隊STAND ALONE COMPLEX探討Stand Alone Complex
  • (1,439)[ACG]新加坡之旅~ACG篇~
  • (7,961)[Study]日本高等教育學制介紹
  • (1,949)[Study]看ACG背GRE單字(一)
  • (527)[Music][音樂欣賞] Evangelion未收錄曲--Everything you've ever dreamed
  • (4,448)[Study] 電話中如何拚出英文字母
  • (32)[BeagleBoard] How to do kernel debug in Angstrom? (3)

文章分類

  • BeagleBoard (13)
  • Study (16)
  • Music (12)
  • Movie (4)
  • Life (29)
  • IT (11)
  • Drama (1)
  • Books (28)
  • BLOG (2)
  • ACG (30)
  • 未分類文章 (1)

部落格文章搜尋

參觀人氣

  • 本日人氣:
  • 累積人氣:

文章彙整