Basic tutorial for Embedded Linux (version 2nd)

Source: Internet
Author: User
Tags intel pentium

Basic tutorial for Embedded Linux (version 2nd)

 

Edit recommendations

Authoritative book on Embedded Linux
Amazon five-star rating
Comprehensive Analysis of Embedded Linux development, revealing a large number of technical Insiders

 

 

 

Basic Information
  • Original Title: Embedded Linux Primer: A Practical real-world approach, Second Edition
  • Author:(US) Christopher hallinan
  • Translator: Zhou Peng
  • Series Name:Turing programming Series
  • Press: People's post and telecommunications Press
  • ISBN:9787115278272
  • Mounting time:
  • Published on: February 1, May 2012
  • Page number: 449
  • Pricing: ¥89.00
  • Ordinary Member: ¥66.75 (off)
  • 1-3 star member: ¥64.97 (off)
  • 4-5 star members: $62.30 (off)
  • Campus discount price: ¥64.97 (off)

Http://product.china-pub.com/199313&cnblogs


 


Introduction Books
Computer books
Basic tutorial for Embedded Linux (version 2nd) is a classic tutorial for Embedded Linux. It introduces boot loader, system initialization, file system, flash and kernel, and application Debugging techniques, it also describes how to build a Linux system, which is used to drive the configuration of different architectures, the features of the Linux kernel source code tree, how to configure the runtime behavior of the kernel as needed, and how to expand the system functions, it is used to build a complete embedded Linux release of common build systems, USB subsystems and system configuration tools such as udev. More importantly, this book describes how to modify the system to meet your own needs and ensure that you can learn some useful tips and skills in Embedded engineering. BR
The basic tutorial for Embedded Linux (version 2nd) is suitable for Linux programmers. It can also be used as a reference for teachers and students of related majors in colleges and universities. DirectoryBasic tutorial for Embedded Linux (version 2nd)
Chapter 1 entry 1
1.1 why Linux 1
1.2 Status Quo of Embedded Linux 2
1.3 open source and GPL 2
1.4 standards and related organizations 3
1.4.1 Linux Standard 3
1.4.2 Linux Foundation 4
1.4.3 carrier-level Linux 4
1.4.4 mobile Linux plan: moblin 4
1.4.5 Service Availability Forum 5
1.5 conclusion 5
Chapter 6 summary 6
2.1 embedding and non-embedding 6
2.2 Analysis of embedded systems 7
2.2.1 typical embedded Linux development environment 8
2.2.2 start target Board 9
2.2.3 boot kernel 10
2.2.4 kernel initialization: Overview 12
2.2.5 first user space process: init 13.2.3 storage 14
2.3.1 flash 14
2.3.2 NAND Flash 15
2.3.3 flash usage 16
2.3.4 FLASH file system 17
2.3.5 memory space 17
2.3.6 execution context 19
2.3.7 Process Virtual Memory 20
2.3.8 cross-Development Environment 21
2.4 embedded Linux release 22
2.4.1 commercial Linux release 24
2.4.2 build your own Linux release 24
2.5 Conclusion 24
Chapter 2 processor basics 26
3.1 independent processor 26
3.1.1 IBM 970fx 27
3.1.2 Intel Pentium M 27
3.1.3 intel lingdong TM 28
3.1.4 flykar mpc7448 28
3.1.5 supporting chipset 28
3.2 integrated processor: On-chip system 30
3.2.1 Power Architecture 30
3.2.2 Apsara Power Architecture 30
3.2.3 flykar powerquicc I 31
3.2.4 flykar powerquicc II 32
3.2.5 powerquicc II Pro 32
3.2.6 flykar powerquicc III 33
3.2.7 flykar qoriqtm 34
3.2.8 AMCC Power Architecture 36
3.2.9 MIPS 38
3.2.10 Broadcom MIPS 38
3.2.11 other MIPS 39
3.2.12 arm 40
3.2.13 Texas Instrument arm 40
3.2.14 flykar arm 42
3.2.15 other arm processors 43
3.3 other architectures 43
3.4 hardware platform 43
3.4.1 CompactPCI 43
3.4.2 ATCA 44
3.5 Conclusion 44
Chapter 4 Linux kernel: different perspectives 46
4.1 background knowledge 46
4.1.1 kernel version 47
4.1.2 kernel source code library 48
4.1.3 use git to download kernel code 49
4.2 Linux kernel structure 49
4.2.1 top-level Source Code directory 49
4.2.2 compile the kernel 50
4.2.3 kernel subject: vmlinux 52
4.2.4 kernel image components 53
4.2.5 subdirectory layout 56
4.3 kernel build system 57
4.3.1. config file 57
4.3.2 configuration editor 58
4.3.3 makefile target 61
4.4 Kernel configuration 66
4.4.1 custom configuration option 68
4.4.2 kernel makefile 71
4.5 kernel document 72
4.6 obtain the customized Linux kernel 72
4.7 summary 73
Chapter 5 kernel initialization 75
5.1 merging kernel images: Piggy and other 75
5.1.1 image object 78
5.1.2 objects related to the specific architecture 78
5.1.3 start the loader 79
5.1.4 boot message 80
5.2 control flow during initialization 83
5.2.1 kernel entry: head. O 84
5.2.2 kernel startup: Main. c 85
5.2.3 architecture settings 86
5.3 kernel command line processing 87
5.4 subsystem initialization 92
5.5 init thread 94
5.5.1 perform initialization through initcils 95
5.5.2 initcall_debug 96
5.5.3 final guide step 97
5.6 summary 98
Chapter 4 user space initialization 6th
6.1 file systems 100
6.1.1 FHS: file system level standard 101
6.1.2 file system layout 101
6.1.3 minimal file system 102
6.1.4 challenges posed by the embedded root file system 103
6.1.5 trial and error method 104
6.1.6 automated file system build tool 104
6.2 kernel boot steps 104
6.2.1 first user space program 106
6.2.2 resolve dependency 106
6.2.3 customized initial process 107
6.3 INIT process 107
6.3.1 inittab 109
6.3.2 sample Web server startup script 111
6.4 initial RAM disk 112
6.4.1 use initrd for boot 113
6.4.2 Boot Loader support for initrd 113
6.4.3 mysteries of initrd:
Linuxrc 115
6.4.4 initrd inquiry 116
6.4.5 construct initrd image 116
6.5 use initramfs 117
6.6 shutdown 119
6.7 Conclusion 120
Chapter 4 Boot Loader 7th
7.1 role of bootstrap loader 122
7.2 challenges brought by Boot Loader 123
7.2.1 DRAM controller 123
7.2.2 flash and ram 123
7.2.3 image complexity 124
7.2.4 running environment 126
7.3 General Boot Loader: Das U-boot 126
7.3.1 obtain U-boot 127.
7.3.2 configure the U-boot 127
7.3.3 monitoring command 129 for U-boot
7.3.4 Network Operation 130
7.3.5 storage subsystem 132
7.3.6 boot 133 from disk
7.4 port U-boot 133
7.4.1 ep405 U-boot port 133
7.4.2 configuration target 134 in U-boot makefile
7.4.3 first build of ep405 135
7.4.4 ep405 processor initialization 136
7.4.5 card-related initialization 138
7.4.6 transplantation summary 141
7.4.7 U-boot image 141
7.5 Device Tree object (flat Device Tree) 143
7.5.1 source code of the Device Tree 145
7.5.2 Device Tree compiler 148
7.5.3 use other dtb kernel images 148
7.6 Other Boot Loader 149
7.6.1 maid 149
7.6.2 grub 150
7.6.3 other boot loader 151
7.7 Conclusion 152
Chapter 2 device driver basics 8th
8.1 concepts of device drivers 154
8.1.1 loadable module 155
8.1.2 device driver architecture 155
8.1.3 sample driver for minimum device 156
8.1.4 infrastructure built by the module 157
8.1.5 install the device driver 160
8.1.6 load module 160
8.1.7 module parameters 161
8.2 module tools 162
8.2.1 The insmod 162
8.2.2 lsmod 163
8.2.3 mod probe 163
8.2.4 depmod 164
8.2.5 rmmod 165
8.2.6 modinfo 165
8.3 driver method 166
8.3.1 file system operations in the driver 166
8.3.2 device No. Allocation 169
8.3.3 device node and mknod 169
8.4 comprehensive application 170
8.5 build a driver outside the kernel source code tree 171
8.6 device drivers and GPL 172
8.7 conclusion 173
Chapter 4 File System 9th
9.1 Linux File System Concept 175
9.2 ext2 176
9.2.1 mount file system 177
9.2.2 check file system integrity 178
9.3 ext3 180
9.4 ext4 182
9.5 reiserfs 182
9.6 jffs2 183
9.7 cramfs 185
9.8 Network File System 187
9.9 pseudo File System 190
9.9.1/proc file system 191
9.9.2 sysfs 194
9.10 other file systems 196
9.11 create a simple File System 197
9.12 conclusion 199
Chapter 2 MTD subsystem 10th
10.1 MTD overview 201
10.1.1 enable MTD service 202
10.1.2 MTD base 203
10.1.3 configure MTD 205 on the target board
10.2 MTD partition 205
10.2.1 use Redboot Partition Table
Partition 206
10.2.2 use the kernel command line to pass partitions
Message 210
10.2.3 ing driver 211
10.2.4 flash chip driver 213
10.2.5 card-related initialization 214
10.3 MTD tool 215
10.4 ubi File System 219
10.4.1 configure ubifs 219
10.4.2 build ubifs image 220
10.4.3 use ubifs as the root file system 222
10.5 conclusion 222
Chapter 2 busybox 11th
11.1 busybox introduction 224
11.2 busybox configuration 225
11.3 busybox operations 227
11.3.1 The init 230 of busybox
11.3.2 sample 232
11.3.3 install busybox 233 on the target board
11.3.4 busybox small application 235
11.4 conclusion 235
Chapter 2 embedded development environment 12th
12.1 cross-development environment 237
12.2 requirements for host systems 241
12.3 provide services for the target board 242
12.3.1 TFTP server 242
12.3.2 Bootp/DHCP server 243
12.3.3 NFS server 245
12.3.4 mount the root file system 247 using NFS on the target board
12.3.5 example 248 of using NFS to mount the root file system in U-boot
12.4 conclusion 250
Chapter 2 development tools 13th
13.1 GNU Debugger (GDB) 252
13.1.1 debug core dump 253
13.1.2 execute GDB 255
13.1.3 debug session 257 in GDB
13.2 data display debugger 258
13.3 cbrowser/cs1_260
13.4 tracing and performance evaluation tools 261
13.4.1 struts 261
13.4.2 strace command line option 264
13.4.3 ltrace 266
13.4.4 PS 267
13.4.5 top 269
13.4.6 mtrace 270
13.4.7 dmalloc 272.
13.4.8 kernel oops 274
13.5 binary tool 276
13.5.1 readelf 277
13.5.2 use readelf to view debugging information 278
13.5.3 objdump 280
13.5.4 objcopy 281
13.6 other binary utilities 281
13.6.1 strip 281
13.6.2 addr2line 282
13.6.3 strings 282
13.6.4 ldds 282
136.5 nm 283
13.6.6 pre-link 283
13.7 conclusion 284
Chapter 4 kernel debugging technology 14th
14.1 kernel debugging challenges 286
14.2 use kgdb for kernel debugging 287
14.2.1 kgdb Kernel configuration 288
14.2.2 guide target board 289 when kgdb is enabled
14.2.3 some useful kernel breakpoint 293
14.2.4 kgdb shares a serial port 294 with the console
14.2.5 early kernel code 295 debugging
14.2.6 296 kgdb support for the main kernel
14.3 kernel debugging technology 297
14.3.1 GDB Remote Serial protocol 298
14.3.2 kernel code 300 optimized for debugging
14.3.3 GDB user-defined command 307
14.3.4 useful kernel GDB macro 307
14.3.5 debug and load module 315
14.3.6 printk debugging 319
14.3.7 magic sysreq key 320
14.4 hardware auxiliary debugging 321
14.4.1 use the JTAG detector to program flash 322
14.4.2 use the JTAG Detector for debugging 323
14.5 cases where startup fails 326
14.5.1 early serial port debugging output 326
14.5.2 dumping the log buffer of printk 327
14.5.3 kernel debugging exception 328 using kgdb
14.6 conclusion 329
Chapter 2 debugging embedded Linux applications 15th
15.1 target debugging 331
15.2 remote (Cross) debugging 331
15.3 debug shared library 335
15.4 debug multiple tasks 340
15.4.1 debug multiple processes 340
15.4.2 debug multi-threaded application 342
15.4.3 debug boot loader/flash code 345
15.5 other remote debug options 345
15.5.1 use the serial port for debugging 345
15.5.2 attach to the running process 346
15.6 conclusion 346
Chapter 2 open-source construction system 16th
16.1 why use build system 348
16.2 scratchbox 349
16.2.1 install scratchbox 349
16.2.2 create a cross-compilation target 350
16.3 buildroot 351
16.3.1 install buildroot 352
16.3.2 configure buildroot 352
16.3.3 build buildroot 353
16.4 openembedded 354
16.4.1 composition of openembedded 355
16.4.2 bitbake metadata 355
16.4.3 formula 356
16.4.4 task 358
16.4.5 359
16.4.6 configure metadata 
16.4.7 build image 361
16.5 conclusion 362
Chapter 2 Real-Time Linux 17th
17.1 what is real-time 363
17.1.1 Soft Real-Time 363
17.1.2 hard real-time 364
17.1.3 Linux scheduling 364
17.1.4 latency 364
17.2 kernel preemption 365
17.2.1 366 obstacles to Preemption
17.2.2 preemptive mode 367
17.2.3 SMP kernel 368
17.2.4 root cause of preemption latency 369
17.3 Real-Time Kernel Patch 369
17.3.1 real-time patch features 370
17.3.2 O (1) scheduler 371
17.3.3 create a real-time process 372
17.4 Real-Time Kernel performance analysis 373
17.4.1 use ftrace to track kernel behavior 373
17.4.2 detects 374 of the time delay caused by Preemption
17.4.3 detection wake-up delay 375
17.4.4 detect the 377 delay when the interrupt is disabled
17.4.5 soft lockup 378
17.5 conclusion 378
Chapter 2 general serial bus 18th
18.1 USB overview 379
18.1.1 USB physical topology 379
18.1.2 logical topology 381 of USB
18.1.3 USB Version 382
18.1.4 USB connector 382
18.1.5 USB cable 383
18.1.6 USB 384
18.2 configure USB 384
18.3 sysfs and USB device name 388
18.4 practical USB tool 390
18.4.1 USB 390
18.4.2 use USB view 392.
18.4.3 USB utility (lsusb) 394
18.5 universal USB subsystem 395
18.5.1 USB large-capacity Storage Class 395
18.5.2 USB hid 397
18.5.3 usb cdc driver 398
18.5.4 USB network support 400
18.6 USB debugging 401
18.6.1 usbmon402
18.6.2 practical USB 403
18.7 conclusion 403
Chapter 2 udev 19th
19.1 what is udev 405
19.2 device discovery 406
19.3 default udev behavior 407
19.4 understand udev rules 409
19.4.1 modalias 411
19.4.2 typical udev Rule Configuration 414
19.4.3 udev initial system settings 415
19.5 load platform device driver 417
19.6 custom udev behavior 419
19.7 persistent device name 420
19.8 use udev and busybox together with 423
19.8.1 busybox mdev 423
19.8.2 configure mdev 425
19.9 conclusion 425
Appendix A configurable U-boot command 427
Appendix B busybox command 430
Appendix c sdram interface precautions 440
Appendix D open source resource 447
Appendix E simple bdi-2000 configuration file 449


PrefaceAlthough there are many good books about Linux, this book brings together information and suggestions for Embedded Linux developers. In fact, there are already many excellent books on Linux kernel and Linux system management. This book also refers to the best books I think of as similar.
Many of the content in this book comes from actual problems. Computer booksSome development engineers raised some questions during the embedded Linux consultant, Which I encountered when I was directly involved in commercial embedded Linux development.
Embedded Linux brings some unique challenges to experienced software engineers. First, engineers with years of experience in real time operating system (RTOs) development will find that their mindset is hard to switch from the old environment to Linux. Second, experienced application developers often have difficulty understanding the relative complexity of multiple development environments.
Although this is a basic tutorial for beginners of Embedded Linux development, I believe that even experienced embedded Linux developers can benefit from it. The book contains practical suggestions and skills I have accumulated over the years.
Practical suggestions for embedded developers
This book introduces how embedded engineers can quickly learn new knowledge about the embedded Linux environment. The book does not focus on Linux kernel principles. Instead, it focuses on introducing the kernel from the project perspective. You can read excellent books dedicated to kernel principles to learn more. You can learn about the organization and layout of the kernel source code tree, the binary components that make up the kernel image, the methods to load them, and their role in the embedded system.
In this book, you will learn how the Linux kernel build system works and how to integrate specific changes that meet project requirements into the system. You will understand the Linux system initialization details, including kernel space initialization and user space initialization. You can also see many useful suggestions and tips for Embedded projects, including boot loader, system initialization, file system and flash, and advanced kernel and application debugging technologies. Many new content has been added in version 2nd, and many chapters have been updated. For example, the open source build system, USB and udev chapters are all new, in addition, we will discuss how to configure and use these complex systems in Embedded Linux projects.
Target readers
This book requires readers to have a certain degree of C language programming basics, a basic understanding of the LAN and the Internet, understanding the concept of IP addresses and IP address usage in a simple lan, you also need to understand the hexadecimal and octal encoding methods and their common usage.
This book also involves some in-depth concepts in C language compilation and links. Therefore, it would be better if you can roughly review the concept of C language linker. At the same time, understanding the GNU make operation and syntax is also helpful for reading this book.
This book is nothing
This book is not a detailed guide to hardware. The wide variety of hardware devices is a major challenge for embedded developers. A modern 32-bit processor that integrates some peripheral devices, and its user manual has 3000 pages at will. There are no shortcuts. As a programmer, to understand hardware devices, you must spend a lot of time studying hardware data manuals and reference guides, and spend more time writing and testing code for these hardware devices.
This is not a book about Linux kernel or internal principles. This book will not discuss in depth the memory management units (MMU) used to implement Linux virtual memory management policies and processes ). There are already many excellent books on this topic. We recommend that you read the "additional reading suggestions" at the end of each chapter ".
Typographical Conventions
The command and code statement use the Courier New font. The command entered by the user uses the bold Courier New font. The new terms and important concepts are emphasized by the entity.


The book information in this article comes to: China Interactive publishing network Http://www.china-pub.com/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.