嵌入式Linux系統開發教程(2016年電子工業出版社出版的圖書)

嵌入式Linux系統開發教程(2016年電子工業出版社出版的圖書)

本詞條是多義詞,共2個義項
更多義項 ▼ 收起列表 ▲

《嵌入式Linux系統開發教程》是2016年電子工業出版社出版的圖書,作者是華清遠見嵌入式學院、姜先剛、袁祖剛 。

基本介紹

  • 中文名:嵌入式Linux系統開發教程
  • 作者:華清遠見嵌入式學院,姜先剛,袁祖剛
  • 出版社:電子工業出版社
  • 出版時間:2016年
  • 頁數:333 頁
  • 定價:59 元
  • 開本:16 開 
  • ISBN:9787121293733
內容簡介,目錄,

內容簡介

本書結合大量實例,在基於ARM Cortex-A9 四核處理器的硬體教學平台上,全面詳細地講解了ARM處理器及在其上的嵌入式Linux 系統開發。本書主要內容包括ARM 處理器及常用指令介紹,Linux 編程環境,交叉開發環境,Boot Loader 介紹U-Boot 啟動過程及移植,Linux 核心配置、編譯及Qt 移植等。其中移植相關的內容不僅給出了移植的方法和步驟,還講解了為什麼要這么做。重視實踐,實用是本書的最大特點,同時,本書配合大量的習題,讀者能快速地掌握嵌入式Linux 系統開發的要點。本書可作為大學院校電子、通信、計算機、自動化等專業的“嵌入式Linux 系統開發”課程的教材,也可作為嵌入式開發人員的參考用書。

目錄

第1 章 嵌入式系統概述 ·············································································· 1
1.1 嵌入式系統 ....................................................................................................... 2
1.2 嵌入式作業系統................................................................................................ 3
1.3 嵌入式Linux 歷史 ............................................................................................ 5
1.4 嵌入式Linux 開發環境 .................................................................................... 6
1.5 嵌入式Linux 系統開發要點 ............................................................................ 8
第2 章 ARM處理 ······················································································ 9
2.1 ARM 處理器簡介 ........................................................................................... 10
2.1.1 ARM 公司簡介 .................................................................................... 11
2.1.2 ARM 處理器體系結構 ........................................................................ 12
2.1.3 Linux 與ARM 處理器 ........................................................................ 17
2.2 ARM 指令集 ................................................................................................... 18
2.2.1 ARM 微處理器的指令集概述 ............................................................ 18
2.2.2 ARM 指令定址方式 ............................................................................ 19
2.2.3 Thumb 指令 ......................................................................................... 21
2.2.4 Thumb-2 指令 ...................................................................................... 22
2.2.5 ThumbEE 指令 .................................................................................... 22
2.3 典型ARM 處理器簡介 .................................................................................. 22
2.3.1 Atmel AT91RM9200 ........................................................................... 22
2.3.2 Samsung S3C2410 ............................................................................... 23
2.3.3 TI OMAP5 系列 ................................................................................... 25
2.3.4 Freescale i.Max6 .................................................................................. 26
2.3.5 Intel Xscale PXA 系列 ......................................................................... 27
2.3.6 Cortex-A 系列的Exynos4412 ............................................................. 29
2.4 華清遠見 FS4412 開發板 .............................................................................. 30
2.4.1 華清遠見 FS4412 開發板介紹 ........................................................... 30
2.4.2 眾多的開發板供應商 .......................................................................... 34
2.5 習題 ................................................................................................................. 34
第3 章 Linux 編程環境 ··············································································· 35
3.1 Linux 常用工具 ............................................................................................... 36
3.1.1 Shell 簡介 ............................................................................................. 36
3.1.2 常用的Shell 命令 ................................................................................ 38
3.1.3 編寫Shell 腳本 .................................................................................... 46
3.1.4 正則表達式 .......................................................................................... 50
3.1.5 程式編輯器 .......................................................................................... 53
3.2 Makefile ........................................................................................................... 57
3.2.1 GNU make............................................................................................ 57
3.2.2 Makefile 規則語法 .............................................................................. 59
3.2.3 Makefile 檔案中變數的使用 ............................................................... 60
3.3 二進制代碼工具的使用 .................................................................................. 62
3.3.1 GNU Binutils 工具介紹 ....................................................................... 62
3.3.2 Binutils 工具軟體使用 ........................................................................ 63
3.4 GCC 編譯器的使用 ........................................................................................ 64
3.4.1 GCC 編譯器簡介 ................................................................................. 64
3.4.2 GCC 編譯選項解析 ............................................................................. 66
3.5 調試器GDB 的使用技巧 ............................................................................... 70
3.5.1 GDB 調試器介紹 ................................................................................ 70
3.5.2 GDB 調試命令 .................................................................................... 71
3.6 Linux 編程庫 ................................................................................................... 75
3.6.1 Linux 編程庫介紹 ............................................................................... 75
3.6.2 Linux 系統調用 ................................................................................... 76
3.6.3 Linux 執行緒庫 ....................................................................................... 78
3.7 習題 ................................................................................................................. 81
第4 章 交叉開發環境 ················································································ 82
4.1 交叉開發環境介紹 .......................................................................................... 83
4.1.1 交叉開發概念模型 .............................................................................. 83
4.1.2 目標板與主機之間的連線 .................................................................. 84
4.1.3 檔案傳輸 .............................................................................................. 86
4.1.4 網路檔案系統 ...................................................................................... 87
4.2 安裝交叉編譯工具 .......................................................................................... 87
4.2.1 獲取交叉開發工具鏈 .......................................................................... 87
4.2.2 主機安裝工具鏈 .................................................................................. 88
4.3 主機開發環境配置 .......................................................................................... 88
4.3.1 主機環境配置 ...................................................................................... 88
4.3.2 串口控制台工具 .................................................................................. 89
4.3.3 TFTP 服務............................................................................................ 93
4.3.4 NFS 服務 ............................................................................................. 93
4.4 啟動目標板 ..................................................................................................... 95
4.4.1 系統引導過程 ...................................................................................... 95
4.4.2 核心解壓啟動 ...................................................................................... 96
4.4.3 掛接根檔案系統 .................................................................................. 98
4.5 應用程式的遠程交叉調試 .............................................................................. 99
4.5.1 交叉調試的模型 .................................................................................. 99
4.5.2 交叉調試程式實例 ............................................................................ 100
4.6 實例:FS4412 嵌入式開發環境搭建 .......................................................... 102
4.6.1 開發主機安裝 .................................................................................... 102
4.6.2 聯調測試 ............................................................................................ 110
4.7 習題 ............................................................................................................... 113
第5 章 Bootloader ·················································································· 114
5.1 Bootloader 簡介 ............................................................................................ 115
5.1.1 Bootloader 介紹 ................................................................................. 115
5.1.2 Bootloader 的啟動 ............................................................................. 115
5.1.3 Bootloader 的種類 ............................................................................. 118
5.2 U-Boot 簡介 .................................................................................................. 120
5.2.1 U-Boot 介紹 ....................................................................................... 120
5.2.2 U-Boot 的常用命令 ........................................................................... 120
5.2.3 U-Boot 的環境變數 ........................................................................... 124
5.2.4 U-Boot 源碼結構 ............................................................................... 126
5.3 U-Boot 源碼分析 ........................................................................................... 127
5.3.1 配置編譯 ............................................................................................ 127
5.3.2 U-Boot 啟動過程 ............................................................................... 132
5.3.3 U-Boot 與核心的關係 ....................................................................... 136
5.4 U-Boot 移植實例 ........................................................................................... 138
5.4.1 收集移植相關資源 ............................................................................ 138
5.4.2 選擇U-Boot 源碼版本 ..................................................................... 139
5.4.3 u-Boot 配置編譯 ............................................................................... 139
5.4.4 串口能輸出信息 ................................................................................ 140
5.4.5 移植網卡實現Ping 和TFTP 的功能 ............................................... 145
5.5 習題 ............................................................................................................... 151
第6 章 配置編譯核心 ·············································································· 153
6.1 Linux 核心特點 ............................................................................................. 154
6.1.1 Linux 核心版本介紹 ......................................................................... 154
6.1.2 Linux 核心特點 ................................................................................. 155
6.2 配置編譯核心源碼 ........................................................................................ 156
6.2.1 核心源碼的下載方法和結構 ............................................................ 157
6.2.2 核心配置系統 .................................................................................... 160
6.2.3 Kbuild Makefiles ................................................................................ 167
6.2.4 核心編譯 ............................................................................................ 178
6.2.5 核心編譯結果 .................................................................................... 185
6.3 核心配置選項 ............................................................................................... 187
6.3.1 使用配置選單 .................................................................................... 187
6.3.2 基本配置選項 .................................................................................... 189
6.3.3 驅動程式配置選項 ............................................................................ 191
6.4 習題 ............................................................................................................... 192
第7 章 核心移植基礎 ·············································································· 193
7.1 移植核心源碼 ............................................................................................... 194
7.1.1 移植的基本工作 ................................................................................ 194
7.1.2 移植後的工作 .................................................................................... 196
7.2 Linux 設備樹 ................................................................................................. 197
7.2.1 Linux 設備樹的由來 ......................................................................... 197
7.2.2 Linux 設備樹的目的 ......................................................................... 197
7.2.3 Linux 設備樹的使用 ......................................................................... 199
7.3 Linux 核心啟動過程分析 ............................................................................. 206
7.3.1 核心啟動流程介紹 ............................................................................ 206
7.3.2 核心啟動載入程式 ............................................................................ 209
7.3.3 核心主體程式入口 ............................................................................ 215
7.3.4 Linux 系統初始化 ............................................................................. 218
7.3.5 初始化驅動模型 ................................................................................ 224
7.3.6 掛載根檔案系統 ................................................................................ 225
7.4 習題 ............................................................................................................... 227
第8 章 核心移植實例 ·············································································· 229
8.1 基本核心移植 ............................................................................................... 230
8.2 網卡驅動移植 ............................................................................................... 234
8.2.1 網卡原理圖分析 ................................................................................ 234
8.2.2 網卡驅動移植 .................................................................................... 235
8.2.3 以NFS 掛載根檔案系統 ................................................................... 237
8.3 SD/eMMC 驅動移植 ..................................................................................... 238
8.4 USB 主機控制器驅動移植 ........................................................................... 240
8.5 LCD 驅動移植............................................................................................... 244
8.6 習題 ............................................................................................................... 249
第9 章 核心調試技術 ·············································································· 250
9.1 核心調試方法 ............................................................................................... 251
9.1.1 核心調試介紹 .................................................................................... 251
9.1.2 學會分析核心源程式 ........................................................................ 252
9.1.3 調試方法介紹 .................................................................................... 252
9.2 核心列印函式 ............................................................................................... 255
9.2.1 核心映像解壓前的串口輸出函式 .................................................... 255
9.2.2 核心映像解壓後的串口輸出函式 .................................................... 257
9.2.3 printk .................................................................................................. 258
9.3 獲取核心信息 ............................................................................................... 263
9.3.1 系統請求鍵 ........................................................................................ 263
9.3.2 通過/proc 接口 ................................................................................... 264
9.3.3 通過/sys 接口 ..................................................................................... 265
9.4 處理出錯信息 ............................................................................................... 268
9.4.1 oops 信息 ........................................................................................... 268
9.4.2 panic ................................................................................................... 269
9.4.3 通過ioctl 方法 ................................................................................... 271
9.5 核心原始碼調試............................................................................................ 272
9.6 習題 ............................................................................................................... 275
第10 章 製作Linux 根檔案系統 ································································· 276
10.1 根檔案系統目錄結構 .................................................................................. 277
10.2 init 系統初始化過程 ................................................................................... 280
10.2.1 inittab 檔案 ....................................................................................... 281
10.2.2 System V init 啟動過程 ................................................................... 284
10.2.3 Busybox init 啟動過程分析 ............................................................ 285
10.3 製作根檔案系統 .......................................................................................... 287
10.3.1 配置並編譯Busybox ....................................................................... 287
10.3.2 添加共享庫檔案和核心模組 .......................................................... 289
10.3.3 添加其他目錄和檔案 ...................................................................... 290
10.4 固化根檔案系統 .......................................................................................... 293
10.4.1 製作image 格式的initrd 根檔案系統鏡像 .................................... 293
10.4.2 固化ext2 格式的根檔案系統 ......................................................... 295
10.5 習題 ............................................................................................................. 297
第11 章 Qt 移植 ····················································································· 299
11.1 Qt 源碼配置、編譯及安裝 ......................................................................... 300
11.2 在根檔案系統中添加Qt ............................................................................. 309
11.3 安裝Qt 集成開發環境 ................................................................................ 309
11.4 添加ARM 平台的構建環境 ....................................................................... 313
11.5 編寫並運行Qt 測試程式 ............................................................................ 316
11.6 習題 ............................................................................................................. 320
參考文獻 ································································································· 322
附錄 習題答案 ························································································ 323

相關詞條

熱門詞條

聯絡我們