嵌入式Linux基础教程(第2版):英文版

嵌入式Linux基础教程(第2版):英文版

编辑推荐

嵌入式Linux权威著作

Amazon全五星评价

  全面剖析嵌入式Linux开发,揭示大量技术内幕

基本信息

http://product.china-pub.com/194677

内容简介

<!--更改-->
  《嵌入式linux基础教程》是嵌入式linux 的经典教程,介绍了引导装入程序、系统初始化、文件系统、闪存和内核、应用程序调试技巧等,还讲述了构建linux 系统的工作原理,用于驱动不同体系结构的配置,linux内核源码树的特性,如何根据需求配制内核运行时的行为,如何扩展系统功能,用于构建完整嵌入式linux 发行版的常用构建系统,usb 子系统和系统配置工具udev 等内容。更重要的是,《嵌入式linux基础教程》阐述了如何修改系统使之满足读者自己的需求,使读者能从中学习一些嵌入式工程中非常有用的提示和技巧。  《嵌入式linux基础教程》适合linux 程序员阅读,也可作为高等院校相关专业师生的参考读物。

目录

《嵌入式linux基础教程》

edition  xxxiii

acknowledgmentsforthesecondedition  xxxv

abouttheauthor  xxxvi

chapter1introduction  1

1.1whylinux?  2

1.2embeddedlinuxtoday  3

1.3opensourceandthegpl  3

1.3.1freeversusfreedom 4

1.4standardsandrelevantbodies  5

1.4.1linuxstandardbase  5

1.4.2linuxfoundation  6

1.4.3carrier-gradelinux  6

1.4.4mobilelinuxinitiative:moblin  7

1.4.5serviceavailabilityforum   7

1.5summary  8

1.5.1suggestionsforadditionalreading  8

chapter2thebigpicture   9

2.1embeddedornot?   10

2.1.1biosversusbootloader  11

.2.2 anatomy of an embedded system   12

2.2.1typicalembeddedlinuxsetup  13

2.2.2startingthetargetboard  14

2.2.3bootingthekernel  16

2.2.4kernelinitialization:overview  18

2.2.5firstuserspaceprocess:init  19

2.3storageconsiderations  20

2.3.1flashmemory  20

2.3.2nandflash  22

2.1.1biosversusbootloader  11

2.2anatomyofanembeddedsystem  12

2.2.1typicalembeddedlinuxsetup  13

2.2.2startingthetargetboard  14

2.2.3bootingthekernel  16

2.2.4kernelinitialization:overview  18

2.2.5firstuserspaceprocess:init  19

2.3storageconsiderations  20

2.3.1flashmemory  20

2.3.2nandflash  22

2.3.3flashusage  23

2.3.4flashfilesystems  24

2.3.5memoryspace  25

2.3.6executioncontexts  26

2.3.7processvirtualmemory  28

2.3.8cross-developmentenvironment  30

2.4embeddedlinuxdistributions  32

2.4.1commerciallinuxdistributions 33

2.4.2do-it-yourselflinuxdistributions  33

2.5summary  34

2.5.1suggestionsforadditionalreading  35

chapter3processorbasics  37

3.1stand-aloneprocessors 38

3.1.1ibm970fx  39

3.1.2intelpentiumm  39

3.1.3intelatom?  40

3.1.4freescalempc7448  40

3.1.5companionchipsets  41

3.2integratedprocessors:systemsonchip  43

3.2.1powerarchitecture  44

3.2.2freescalepowerarchitecture  44

3.2.3freescalepowerquicci  45

3.2.4freescalepowerquiccii  46

3.2.5powerquicciipro  47

3.2.6freescalepowerquicciii  48

3.2.7freescaleqoriq?  48

3.1.4freescalempc7448  40

3.1.5companionchipsets  41

3.2integratedprocessors:systemsonchip  43

3.2.1powerarchitecture  44

3.2.2freescalepowerarchitecture 44

3.2.3freescalepowerquicci 45

3.2.4freescalepowerquiccii 46

3.2.5powerquicciipro 47

3.2.6freescalepowerquicciii 48

3.2.7freescaleqoriq? 48

3.2.8amccpowerarchitecture  50

3.2.9mips 53

3.2.10broadcommips 54

3.2.11othermips  55

3.2.12arm  55

3.2.13tiarm  56

3.2.14freescalearm  58

3.2.15otherarmprocessors  59

3.3otherarchitectures  59

3.4hardwareplatforms  60

3.4.1compactpci  60

3.4.2atca  60

3.5summary  61

3.5.1suggestionsforadditionalreading  62

chapter4thelinuxkernel:adifferentperspective  63

4.1background  64

4.1.1kernelversions  65

4.1.2kernelsourcerepositories  67

4.1.3usinggittodownloadakernel  68

4.2linuxkernelconstruction  68

4.2.1top-levelsourcedirectory  69

4.2.2compilingthekernel  69

4.2.3thekernelproper:vmlinux  72

4.2.4kernelimagecomponents  73

4.2.5subdirectorylayout  77

4.3kernelbuildsystem  78

4.1.1kernelversions  65

4.1.2kernelsourcerepositories   67

4.1.3usinggittodownloadakernel  68

4.2linuxkernelconstruction  68

4.2.1top-levelsourcedirectory  69

4.2.2compilingthekernel 69

4.2.3thekernelproper:vmlinux  72

4.2.4kernelimagecomponents  73

4.2.5subdirectorylayout  77

4.3kernelbuildsystem  78

4.3.1thedot-config  78

4.3.2configurationeditor(s)  80

4.3.3makefiletargets  83

4.4kernelconfiguration  89

4.4.1customconfigurationoptions  91

4.4.2kernelmakefiles  95

4.5kerneldocumentation  96

4.6obtainingacustomlinuxkernel  96

4.6.1whatelsedoineed?  97

4.7summary  97

4.7.1suggestionsforadditionalreading  98

chapter5kernelinitialization  99

5.1compositekernelimage:piggyandfriends  100

5.1.1theimageobject  103

5.1.2architectureobjects  104

5.1.3bootstraploader  105

5.1.4bootmessages  106

5.2initializationflowofcontrol  109

5.2.1kernelentrypoint:head.o  111

5.2.2kernelstartup:main.c  113

5.2.3architecturesetup  114

5.3kernelcommand-lineprocessing 115

5.3.1the__setupmacro  116

5.4subsysteminitialization   122

5.4.1the*__initcallmacros  122

5.5theinitthread  125

5.2initializationflowofcontrol  109

5.2.1kernelentrypoint:head.o  111

5.2.2kernelstartup:main.c  113

5.2.3architecturesetup  114

5.3kernelcommand-lineprocessing  115

5.3.1the__setupmacro  116

5.4subsysteminitialization 122

5.4.1the*__initcallmacros 122

5.5theinitthread 125

5.5.1initializationviainitcalls  126

5.5.2initcall_debug  127

5.5.3finalbootsteps  127

5.6summary  129

5.6.1suggestionsforadditionalreading  130

chapter6userspaceinitialization  131

6.1rootfilesystem  132

6.1.1fhs:filesystemhierarchystandard  133

6.1.2filesystemlayout 133

6.1.3minimalfilesystem  134

6.1.4theembeddedrootfschallenge  136

6.1.5trial-and-errormethod  137

6.1.6automatedfilesystembuildtools  137

6.2kernel’slastbootsteps 137

6.2.1firstuserspaceprogram 139

6.2.2resolvingdependencies  139

6.2.3customizedinitialprocess  140

6.3theinitprocess  140

6.3.1inittab  143

6.3.2samplewebserverstartupscript  145

6.4initialramdisk  146

6.4.1bootingwithinitrd  147

6.4.2bootloadersupportforinitrd  148

6.4.3initrdmagic:linuxrc  150

6.4.4theinitrdplumbing  151

6.4.5buildinganinitrdimage  152

6.5usinginitramfs  153

6.5.1customizing  154

6.3.1inittab  143

6.3.2samplewebserverstartupscript  145

6.4initialramdisk  146

6.4.1bootingwithinitrd  147

6.4.2bootloadersupportforinitrd  148

6.4.3initrdmagic:linuxrc  150

6.4.4theinitrdplumbing  151

6.4.5buildinganinitrdimage  152

6.5usinginitramfs  153

6.5.1customizinginitramfs  154

6.6shutdown  156

6.7summary  156

6.7.1suggestionsforadditionalreading  157

chapter7bootloaders  159

7.1roleofabootloader  160

7.2bootloaderchallenges   161

7.2.1dramcontroller  161

7.2.2flashversusram  162

7.2.3imagecomplexity  162

7.2.4executioncontext  165

7.3auniversalbootloader:dasu-boot 166

7.3.1obtainingu-boot  166

7.3.2configuringu-boot  167

7.3.3u-bootmonitorcommands  169

7.3.4networkoperations  170

7.3.5storagesubsystems  173

7.3.6bootingfromdisk  174

7.4portingu-boot  174

7.4.1ep405u-bootport  175

7.4.2u-bootmakefileconfigurationtarget  176

7.4.3ep405firstbuild  177

7.4.4ep405processorinitialization  178

7.4.5board-specificinitialization 181

7.4.6portingsummary  184

7.4.7u-bootimageformat  185

7.5devicetreeblob(flatdevicetree)  187

7.3.6bootingfromdisk  174

7.4portingu-boot  174

7.4.1ep405u-bootport  175

7.4.2u-bootmakefileconfigurationtarget  176

7.4.3ep405firstbuild  177

7.4.4ep405processorinitialization  178

7.4.5board-specificinitialization 181

7.4.6portingsummary  184

7.4.7u-bootimageformat 185

7.5devicetreeblob(flatdevicetree)  187

7.5.1devicetreesource 189

7.5.2devicetreecompiler  192

7.5.3alternativekernelimagesusingdtb  193

7.6otherbootloaders  194

7.6.1lilo  194

7.6.2grub  195

7.6.3stillmorebootloaders  197

7.7summary  197

7.7.1suggestionsforadditionalreading  198

chapter8devicedriverbasics  201

8.1devicedriverconcepts  202

8.1.1loadablemodules  203

8.1.2devicedriverarchitecture  204

8.1.3minimaldevicedriverexample  204

8.1.4modulebuildinfrastructure  205

8.1.5installingadevicedriver  209

8.1.6loadingamodule  210

8.1.7moduleparameters  211

8.2moduleutilities  212

8.2.1insmod  212

8.2.2lsmod 213

8.2.3modprobe  213

8.2.4depmod  214

8.2.5rmmod  215

8.2.6modinfo  216

8.3drivermethods   217

8.1.5installingadevicedriver  209

8.1.6loadingamodule  210

8.1.7moduleparameters  211

8.2moduleutilities  212

8.2.1insmod  212

8.2.2lsmod  213

8.2.3modprobe  213

8.2.4depmod  214

8.2.5rmmod  215

8.2.6modinfo  216

8.3drivermethods  217

8.3.1driverfilesystemoperations  217

8.3.2allocationofdevicenumbers  220

8.3.3devicenodesandmknod  220

8.4bringingitalltogether  222

8.5buildingout-of-treedrivers  223

8.6devicedriversandthegpl  224

8.7summary  225

8.7.1suggestionsforadditionalreading  226

chapter9filesystems  227

9.1linuxfilesystemconcepts   228

9.1.1partitions  229

9.2ext2  230

9.2.1mountingafilesystem  232

9.2.2checkingfilesystemintegrity  233

9.3ext3  235

9.4ext4  237

9.5reiserfs  238

9.6jffs2  239

9.6.1buildingajffs2image  240

9.7cramfs  242

9.8networkfilesystem  244

9.8.1rootfilesystemonnfs  246

9.9pseudofilesystems  248

9.9.1/procfilesystem  249

9.9.2sysfs  252

9.4ext4  237

9.5reiserfs  238

9.6jffs2  239

9.6.1buildingajffs2image  240

9.7cramfs  242

9.8networkfilesystem  244

9.8.1rootfilesystemonnfs  246

9.9pseudofilesystems 248

9.9.1/procfilesystem  249

9.9.2sysfs  252

9.10otherfilesystems  255

9.11buildingasimplefilesystem  256

9.12summary  258

9.12.1suggestionsforadditionalreading  259

chapter10mtdsubsystem  261

10.1mtdoverview  262

10.1.1enablingmtdservices  263

10.1.2mtdbasics  265

10.1.3configuringmtdonyourtarget  267

10.2mtdpartitions  267

10.2.1redbootpartitiontablepartitioning  269

10.2.2kernelcommand-linepartitioning  273

10.2.3mappingdriver  274

10.2.4flashchipdrivers  276

10.2.5board-specificinitialization  276

10.3mtdutilities  279

10.3.1jffs2rootfilesystem 281

10.4ubifilesystem  284

10.4.1configuringforubifs  284

10.4.2buildingaubifsimage  284

10.4.3usingubifsastherootfilesystem  287

10.5summary 287

10.5.1suggestionsforadditionalreading  288

chapter11busybox  289

11.1introductiontobusybox  290

11.1.1busyboxiseasy  291

11.2busyboxconfiguration  291

11.2.1cross-compilingbusybox  293

11.3busyboxoperation  293

11.3.1busyboxinit 297

11.3.2samplercsinitializationscript  299

11.3.3busyboxtargetinstallation  300

11.3.4busyboxapplets  302

11.4summary  303

11.4.1suggestionsforadditionalreading  304

chapter12embeddeddevelopmentenvironment  305

12.1cross-developmentenvironment  306

12.1.1“helloworld”embedded  307

12.2hostsystemrequirements  311

12.2.1hardwaredebugprobe  311

12.3hostingtargetboards 312

12.3.1tftpserver  312

12.3.2bootp/dhcpserver  313

12.3.3nfsserver   316

12.3.4targetnfsrootmount  318

12.3.5u-bootnfsrootmountexample  320

12.4summary  322

12.4.1suggestionsforadditionalreading  323

chapter13developmenttools  325

13.1gnudebugger(gdb)  326

13.1.1debuggingacoredump  327

13.1.2invokinggdb  329

13.1.3debugsessioningdb  331

13.2datadisplaydebugger  333

13.3cbrowser/cscope  335

13.4tracingandprofilingtools  337

13.4.1strace  337

13.4.2stracevariations  341

13.4.3ltrace  343

13.4.4ps  344

13.4.5top  346

13.4.6mtrace  348

13.4.7dmalloc 350

13.4.8kerneloops 353

13.5binaryutilities  355

13.5.1readelf  355

13.5.2examiningdebuginformationusingreadelf  357

13.5.3objdump  359

13.5.4objcopy  360

13.6miscellaneousbinaryutilities  361

13.6.1strip  361

13.6.2addr2line  361

13.6.3strings  362

13.6.4ldd  362

13.6.5nm  363

13.6.6prelink  364

13.5.2examiningdebuginformationusingreadelf  357

13.5.3objdump  359

13.5.4objcopy  360

13.6miscellaneousbinaryutilities  361

13.6.1strip  361

13.6.2addr2line  361

13.6.3strings  362

13.6.4ldd  362

13.6.5nm  363

13.6.6prelink  364

13.7summary 364

13.7.1suggestionsforadditionalreading  365

chapter14kerneldebuggingtechniques  367

14.1challengestokerneldebugging  368

14.2usingkgdbforkerneldebugging  369

14.2.1kgdbkernelconfiguration  371

14.2.2targetbootwithkgdbsupport  372

14.2.3usefulkernelbreakpoints  376

14.2.4sharingaconsoleserialportwithkgdb  377

14.2.5debuggingveryearlykernelcode  379

14.2.6kgdbsupportinthemainlinekernel  380

14.3kerneldebuggingtechniques  381

14.3.1gdbremoteserialprotocol  382

14.3.2debuggingoptimizedkernelcode  385

14.3.3gdbuser-definedcommands  392

14.3.4usefulkernelgdbmacros  393

14.3.5debuggingloadablemodules  402

14.3.6printkdebugging   407

14.3.7magicsysreqkey   409

14.4hardware-assisteddebugging  410

14.4.1programmingflashusingajtagprobe  411

14.4.2debuggingwithajtagprobe  413

14.5whenitdoesn’tboot  417

14.5.1earlyserialdebugoutput  417

14.5.2dumpingtheprintklogbuffer  417

14.5.3kgdbonpanic  420

14.3.4usefulkernelgdbmacros  393

14.3.5debuggingloadablemodules  402

14.3.6printkdebugging  407

14.3.7magicsysreqkey   409

14.4hardware-assisteddebugging  410

14.4.1programmingflashusingajtagprobe  411

14.4.2debuggingwithajtagprobe  413

14.5whenitdoesn’tboot  417

14.5.1earlyserialdebugoutput  417

14.5.2dumpingtheprintklogbuffer  417

14.5.3kgdbonpanic   420

14.6summary  421

14.6.1suggestionsforadditionalreading  422

chapter15debuggingembeddedlinuxapplications  423

15.1targetdebugging  424

15.2remote(cross)debugging   424

15.2.1gdbserver  427

15.3debuggingwithsharedlibraries  429

15.3.1sharedlibraryeventsingdb  431

15.4debuggingmultipletasks  435

15.4.1debuggingmultipleprocesses  435

15.4.2debuggingmultithreadedapplications   438

15.4.3debuggingbootloader/flashcode  441

15.5additionalremotedebugoptions  442

15.5.1debuggingusingaserialport  442

15.5.2attachingtoarunningprocess  442

15.6summary  443

15.6.1suggestionsforadditionalreading  444

chapter16opensourcebuildsystems  445

16.1whyuseabuildsystem?  446

16.2scratchbox  447

16.2.1installingscratchbox   447

16.2.2creatingacross-compilationtarget  448

16.3buildroot  451

16.3.1buildrootinstallation  451

16.3.2buildrootconfiguration  451

15.6summary  443

15.6.1suggestionsforadditionalreading  444

chapter16opensourcebuildsystems  445

16.1whyuseabuildsystem?  446

16.2scratchbox  447

16.2.1installingscratchbox   447

16.2.2creatingacross-compilationtarget  448

16.3buildroot  451

16.3.1buildrootinstallation  451

16.3.2buildrootconfiguration  451

16.3.3buildrootbuild  452

16.4openembedded  454

16.4.1openembeddedcomposition  455

16.4.2bitbakemetadata  456

16.4.3recipebasics  456

16.4.4metadatatasks  460

16.4.5metadataclasses  461

16.4.6configuringopenembedded  462

16.4.7buildingimages  463

16.5summary  464

16.5.1suggestionsforadditionalreading  464

chapter17linuxandrealtime  465

17.1whatisrealtime?  466

17.1.1softrealtime 466

17.1.2hardrealtime  467

17.1.3linuxscheduling  467

17.1.4latency  467

17.2kernelpreemption  469

17.2.1impedimentstopreemption  469

17.2.2preemptionmodels  471

17.2.3smpkernel   472

17.2.4sourcesofpreemptionlatency  473

17.3real-timekernelpatch  473

17.3.1real-timefeatures  475

17.3.2o(1)scheduler  476

17.1.3linuxscheduling  467

17.1.4latency  467

17.2kernelpreemption  469

17.2.1impedimentstopreemption  469

17.2.2preemptionmodels  471

17.2.3smpkernel  472

17.2.4sourcesofpreemptionlatency  473

17.3real-timekernelpatch 473

17.3.1real-timefeatures  475

17.3.2o(1)scheduler  476

17.3.3creatingareal-timeprocess  477

17.4real-timekernelperformanceanalysis  478

17.4.1usingftracefortracing  478

17.4.2preemptionofflatencymeasurement  479

17.4.3wakeuplatencymeasurement  481

17.4.4interruptofftiming  483

17.4.5softlockupdetection  484

17.5summary  485

17.5.1suggestionforadditionalreading  485

chapter18universalserialbus  487

18.1usboverview  488

18.1.1usbphysicaltopology  488

18.1.2usblogicaltopology  490

18.1.3usbrevisions  491

18.1.4usbconnectors   492

18.1.5usbcableassemblies  494

18.1.6usbmodes  494

18.2configuringusb  495

18.2.1usbinitialization  497

18.3sysfsandusbdevicenaming  500

18.4usefulusbtools  502

18.4.1usbfilesystem  502

18.4.2usingusbview  504

18.4.3usbutils(lsusb)  507

18.5commonusbsubsystems  508

18.5.1usbmassstorageclass  508

18.1.6usbmodes  494

18.2configuringusb  495

18.2.1usbinitialization   497

18.3sysfsandusbdevicenaming  500

18.4usefulusbtools  502

18.4.1usbfilesystem  502

18.4.2usingusbview  504

18.4.3usbutils(lsusb)  507

18.5commonusbsubsystems  508

18.5.1usbmassstorageclass  508

18.5.2usbhidclass  511

18.5.3usbcdcclassdrivers  512

18.5.4usbnetworksupport  515

18.6usbdebug  516

18.6.1usbmon  517

18.6.2usefulusbmiscellanea  518

18.7summary  519

18.7.1suggestionsforadditionalreading  519

chapter19udev  521

19.1whatisudev?  522

19.2devicediscovery  523

19.3defaultudevbehavior  525

19.4understandingudevrules  527

19.4.1modalias  530

19.4.2typicaludevrulesconfiguration  533

19.4.3initialsystemsetupforudev  535

19.5loadingplatformdevicedrivers  538

19.6customizingudevbehavior  540

19.6.1udevcustomizationexample:usbautomounting   540

19.7persistentdevicenaming   541

19.7.1udevhelperutilities  542

19.8usingudevwithbusybox   545

19.8.1busyboxmdev  545

19.8.2configuringmdev  547

19.9summary  548

19.9.1suggestionsforadditionalreading  548

19.6customizingudevbehavior 540

19.6.1udevcustomizationexample:usbautomounting  540

19.7persistentdevicenaming  541

19.7.1udevhelperutilities   542

19.8usingudevwithbusybox   545

19.8.1busyboxmdev  545

19.8.2configuringmdev   547

19.9summary 548

19.9.1suggestionsforadditionalreading  548

appendixagnupubliclicense  549

preamble  550

termsandconditionsforcopying,distribution,andmodification   551

nowarranty 555

appendixbu-bootconfigurablecommands  557

appendixcbusyboxcommands  561

appendixdsdraminterfaceconsiderations  571

d.1sdrambasics  572

d.1.1sdramrefresh   573

d.2clocking  574

d.3sdramsetup  575

d.4summary  580

d.4.1suggestionsforadditionalreading  580

appendixeopensourceresources  581

sourcerepositoriesanddeveloperinformation  582

mailinglists  582

linuxnewsanddevelopments  583

opensourcelegalinsightanddiscussion  583

appendixfsamplebdi-2000configurationfile  585

index  593

相关推荐