File tree Expand file tree Collapse file tree 1 file changed +47
-7
lines changed
Expand file tree Collapse file tree 1 file changed +47
-7
lines changed Original file line number Diff line number Diff line change @@ -9,12 +9,14 @@ category:
99tags : [LinuxLab, IMX6ULL, linux, kernel]
1010---
1111
12- ## 切换到ebf -imx6ull
12+ ## 切换到 ebf -imx6ull
1313
1414``` bash
1515make BOARD=arm/ebf-imx6ull
1616git branch
1717# * next
18+ . tools/helper/complete.sh
19+ make [TAB]
1820```
1921
2022## 修改内核
@@ -45,26 +47,26 @@ index e083fac08aed..c8041fa17d6c 100644
4547 if (!ret)
4648```
4749
48- 编译安装
50+ ### 编译安装
4951
5052``` bash
5153$ make kernel-build
5254$ make modules-install
5355```
5456
55- 上传
57+ ### 上传
5658
5759``` bash
5860make kernel-upload
5961```
6062
61- 启动新 Image
63+ ### 启动新 Image
6264
6365``` bash
6466make boot
6567```
6668
67- 查看启动日志
69+ ### 查看启动日志
6870
6971``` bash
7072debian@npi:~ $ dmesg | grep from
@@ -81,11 +83,49 @@ debian@npi:~$ dmesg | grep from
8183
8284![ kernel] ( /assets/images/LinuxLab/IMX6ULL/kernel.png )
8385
84- 查看一下内核信息:
86+ ### 查看一下内核信息:
8587
8688``` bash
8789debian@npi:~ $ uname -a
8890Linux npi 4.19.35+ # 2 SMP PREEMPT Wed Dec 30 17:33:39 CST 2020 armv7l GNU/Linux
8991```
9092
91- 是刚才编译的,说明我们修改的内核确实起作用了。
93+ 是刚才编译的,说明我们修改的内核确实起作用了。
94+
95+ ## 调试 Linux 内核
96+
97+ ### 虚拟开发板内核自动化调试
98+
99+ ``` bash
100+ make feature feature=debug
101+ make kernel-olddefconfig
102+ make kernel
103+ make kernel-debug
104+ ```
105+
106+ 使用 WebVNC, 会自动打开两个窗口,一个显示原有内核,如果使用 bash,需要打开 2 个终端,一个做服务端,一个为客户端,详情请查阅文档。
107+
108+ 默认设置了一些断点,可以通过以下命令查看:
109+
110+ ``` bash
111+ cat ./gdb/kernel.default
112+ ```
113+
114+ 自己随便玩。
115+
116+ * r: run 运行到断点
117+ * n: next 到下一条语句
118+ * s: step 单步执行
119+ * b: breakpoint 下断点
120+ * l: list 查看源码
121+
122+ ### 真板启动调试
123+
124+ ``` bash
125+ $ make kernel-debug
126+ LOG: This feature is not implemented for real boards.
127+ ```
128+
129+ > 真板还没加,这个不太好弄,可以试试 kgdb over serial。
130+
131+ 我还是先熟悉虚拟开发板的内核调试吧。
You can’t perform that action at this time.
0 commit comments