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) 人氣(316)

  • 個人分類: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) 人氣(58)

  • 個人分類: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) 人氣(52)

  • 個人分類: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) 人氣(105)

  • 個人分類: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) 人氣(76)

  • 個人分類: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/11/23] 英文編修潤稿 於文章「[Study] 新加坡之旅~Confer...」留言:
    如何為論文定合適的標題? 歡迎訂閱Uni-edit學術論文寫...
  • [20/05/22] 百合 於文章「[Study] 新加坡之旅~Confer...」留言:
    Uni-edit 論文英文編修服務,將分享更多客戶使用的經驗...
  • [20/03/18] Uni-edit Taiwan 於文章「[Study] 新加坡之旅~Confer...」留言:
    Uni-edit的客戶回饋: 我的第一篇由Uni-edit...
  • [18/08/09] Uni-edit 於文章「[Study] 新加坡之旅~Confer...」留言:
    針對大學生、碩士生、博士生、博士後研究人員、研究學者及科學家...
  • [18/06/21] v216913 於文章「[BeagleBoard] How to...」留言:
    b2JLSWKrl3I奢侈品仿牌,保固說到做到,誠信經營,走...
  • [18/02/12] Golden Editing 於文章「[Study] 新加坡之旅~Confer...」留言:
    Golden English editing 全新線上全英...
  • [17/09/07] 訪客 於文章「[Books][言情小說]絕代有佳人 貂...」留言:
    你人太好了,評論的這麼客氣, 要我說,我真的不知作者是哪來的...
  • [16/12/12] realsteel787@yahoo.com 於文章「[Life]Discuss the ad...」留言:
    Before we discuss Immortality,...
  • [16/01/12] 小鼓 於文章「[Study] 新加坡之旅~Confer...」留言:
    能在Conference 發表paper 總是難得的經驗,以...
  • [13/01/13] 路人 於文章「[Books][懸疑小說] Anothe...」留言:
    喔喔~~OK OK  謝謝唷:))))...

熱門文章

  • (21,596)[Books]扶他(ふたなり)作品介紹
  • (1,443)[ACG]新加坡之旅~ACG篇~
  • (440)[ACG][Anime]阿倍野橋魔法商店街心得
  • (385)[Bools][輕小說]螺旋迴轉的世界He said "LOVE U 4EVER"
  • (358)[Books][輕小說]憐Ren 01~時間利刃與藍色未來~
  • (318)[Movie]銀翼殺手觀看後有感...
  • (291)[ACG][Anime]從攻殼機動隊STAND ALONE COMPLEX探討Stand Alone Complex
  • (195)[Music][ED]讓我感動的動畫ED Series Part 2
  • (138)[Life]新加坡之旅~序章~
  • (55)[Life]A dream about my Grandma.....

文章分類

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

部落格文章搜尋

參觀人氣

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

文章彙整