README 162 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659
  1. # SPDX-License-Identifier: GPL-2.0+
  2. #
  3. # (C) Copyright 2000 - 2013
  4. # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  5. Summary:
  6. ========
  7. This directory contains the source code for U-Boot, a boot loader for
  8. Embedded boards based on PowerPC, ARM, MIPS and several other
  9. processors, which can be installed in a boot ROM and used to
  10. initialize and test the hardware or to download and run application
  11. code.
  12. The development of U-Boot is closely related to Linux: some parts of
  13. the source code originate in the Linux source tree, we have some
  14. header files in common, and special provision has been made to
  15. support booting of Linux images.
  16. Some attention has been paid to make this software easily
  17. configurable and extendable. For instance, all monitor commands are
  18. implemented with the same call interface, so that it's very easy to
  19. add new commands. Also, instead of permanently adding rarely used
  20. code (for instance hardware test utilities) to the monitor, you can
  21. load and run it dynamically.
  22. Status:
  23. =======
  24. In general, all boards for which a configuration option exists in the
  25. Makefile have been tested to some extent and can be considered
  26. "working". In fact, many of them are used in production systems.
  27. In case of problems see the CHANGELOG file to find out who contributed
  28. the specific port. In addition, there are various MAINTAINERS files
  29. scattered throughout the U-Boot source identifying the people or
  30. companies responsible for various boards and subsystems.
  31. Note: As of August, 2010, there is no longer a CHANGELOG file in the
  32. actual U-Boot source tree; however, it can be created dynamically
  33. from the Git log using:
  34. make CHANGELOG
  35. Where to get help:
  36. ==================
  37. In case you have questions about, problems with or contributions for
  38. U-Boot, you should send a message to the U-Boot mailing list at
  39. <u-boot@lists.denx.de>. There is also an archive of previous traffic
  40. on the mailing list - please search the archive before asking FAQ's.
  41. Please see http://lists.denx.de/pipermail/u-boot and
  42. http://dir.gmane.org/gmane.comp.boot-loaders.u-boot
  43. Where to get source code:
  44. =========================
  45. The U-Boot source code is maintained in the Git repository at
  46. git://www.denx.de/git/u-boot.git ; you can browse it online at
  47. http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=summary
  48. The "snapshot" links on this page allow you to download tarballs of
  49. any version you might be interested in. Official releases are also
  50. available for FTP download from the ftp://ftp.denx.de/pub/u-boot/
  51. directory.
  52. Pre-built (and tested) images are available from
  53. ftp://ftp.denx.de/pub/u-boot/images/
  54. Where we come from:
  55. ===================
  56. - start from 8xxrom sources
  57. - create PPCBoot project (http://sourceforge.net/projects/ppcboot)
  58. - clean up code
  59. - make it easier to add custom boards
  60. - make it possible to add other [PowerPC] CPUs
  61. - extend functions, especially:
  62. * Provide extended interface to Linux boot loader
  63. * S-Record download
  64. * network boot
  65. * ATA disk / SCSI ... boot
  66. - create ARMBoot project (http://sourceforge.net/projects/armboot)
  67. - add other CPU families (starting with ARM)
  68. - create U-Boot project (http://sourceforge.net/projects/u-boot)
  69. - current project page: see http://www.denx.de/wiki/U-Boot
  70. Names and Spelling:
  71. ===================
  72. The "official" name of this project is "Das U-Boot". The spelling
  73. "U-Boot" shall be used in all written text (documentation, comments
  74. in source files etc.). Example:
  75. This is the README file for the U-Boot project.
  76. File names etc. shall be based on the string "u-boot". Examples:
  77. include/asm-ppc/u-boot.h
  78. #include <asm/u-boot.h>
  79. Variable names, preprocessor constants etc. shall be either based on
  80. the string "u_boot" or on "U_BOOT". Example:
  81. U_BOOT_VERSION u_boot_logo
  82. IH_OS_U_BOOT u_boot_hush_start
  83. Versioning:
  84. ===========
  85. Starting with the release in October 2008, the names of the releases
  86. were changed from numerical release numbers without deeper meaning
  87. into a time stamp based numbering. Regular releases are identified by
  88. names consisting of the calendar year and month of the release date.
  89. Additional fields (if present) indicate release candidates or bug fix
  90. releases in "stable" maintenance trees.
  91. Examples:
  92. U-Boot v2009.11 - Release November 2009
  93. U-Boot v2009.11.1 - Release 1 in version November 2009 stable tree
  94. U-Boot v2010.09-rc1 - Release candidate 1 for September 2010 release
  95. Directory Hierarchy:
  96. ====================
  97. /arch Architecture specific files
  98. /arc Files generic to ARC architecture
  99. /arm Files generic to ARM architecture
  100. /m68k Files generic to m68k architecture
  101. /microblaze Files generic to microblaze architecture
  102. /mips Files generic to MIPS architecture
  103. /nds32 Files generic to NDS32 architecture
  104. /nios2 Files generic to Altera NIOS2 architecture
  105. /openrisc Files generic to OpenRISC architecture
  106. /powerpc Files generic to PowerPC architecture
  107. /riscv Files generic to RISC-V architecture
  108. /sandbox Files generic to HW-independent "sandbox"
  109. /sh Files generic to SH architecture
  110. /x86 Files generic to x86 architecture
  111. /api Machine/arch independent API for external apps
  112. /board Board dependent files
  113. /cmd U-Boot commands functions
  114. /common Misc architecture independent functions
  115. /configs Board default configuration files
  116. /disk Code for disk drive partition handling
  117. /doc Documentation (don't expect too much)
  118. /drivers Commonly used device drivers
  119. /dts Contains Makefile for building internal U-Boot fdt.
  120. /examples Example code for standalone applications, etc.
  121. /fs Filesystem code (cramfs, ext2, jffs2, etc.)
  122. /include Header Files
  123. /lib Library routines generic to all architectures
  124. /Licenses Various license files
  125. /net Networking code
  126. /post Power On Self Test
  127. /scripts Various build scripts and Makefiles
  128. /test Various unit test files
  129. /tools Tools to build S-Record or U-Boot images, etc.
  130. Software Configuration:
  131. =======================
  132. Configuration is usually done using C preprocessor defines; the
  133. rationale behind that is to avoid dead code whenever possible.
  134. There are two classes of configuration variables:
  135. * Configuration _OPTIONS_:
  136. These are selectable by the user and have names beginning with
  137. "CONFIG_".
  138. * Configuration _SETTINGS_:
  139. These depend on the hardware etc. and should not be meddled with if
  140. you don't know what you're doing; they have names beginning with
  141. "CONFIG_SYS_".
  142. Previously, all configuration was done by hand, which involved creating
  143. symbolic links and editing configuration files manually. More recently,
  144. U-Boot has added the Kbuild infrastructure used by the Linux kernel,
  145. allowing you to use the "make menuconfig" command to configure your
  146. build.
  147. Selection of Processor Architecture and Board Type:
  148. ---------------------------------------------------
  149. For all supported boards there are ready-to-use default
  150. configurations available; just type "make <board_name>_defconfig".
  151. Example: For a TQM823L module type:
  152. cd u-boot
  153. make TQM823L_defconfig
  154. Note: If you're looking for the default configuration file for a board
  155. you're sure used to be there but is now missing, check the file
  156. doc/README.scrapyard for a list of no longer supported boards.
  157. Sandbox Environment:
  158. --------------------
  159. U-Boot can be built natively to run on a Linux host using the 'sandbox'
  160. board. This allows feature development which is not board- or architecture-
  161. specific to be undertaken on a native platform. The sandbox is also used to
  162. run some of U-Boot's tests.
  163. See doc/arch/index.rst for more details.
  164. Board Initialisation Flow:
  165. --------------------------
  166. This is the intended start-up flow for boards. This should apply for both
  167. SPL and U-Boot proper (i.e. they both follow the same rules).
  168. Note: "SPL" stands for "Secondary Program Loader," which is explained in
  169. more detail later in this file.
  170. At present, SPL mostly uses a separate code path, but the function names
  171. and roles of each function are the same. Some boards or architectures
  172. may not conform to this. At least most ARM boards which use
  173. CONFIG_SPL_FRAMEWORK conform to this.
  174. Execution typically starts with an architecture-specific (and possibly
  175. CPU-specific) start.S file, such as:
  176. - arch/arm/cpu/armv7/start.S
  177. - arch/powerpc/cpu/mpc83xx/start.S
  178. - arch/mips/cpu/start.S
  179. and so on. From there, three functions are called; the purpose and
  180. limitations of each of these functions are described below.
  181. lowlevel_init():
  182. - purpose: essential init to permit execution to reach board_init_f()
  183. - no global_data or BSS
  184. - there is no stack (ARMv7 may have one but it will soon be removed)
  185. - must not set up SDRAM or use console
  186. - must only do the bare minimum to allow execution to continue to
  187. board_init_f()
  188. - this is almost never needed
  189. - return normally from this function
  190. board_init_f():
  191. - purpose: set up the machine ready for running board_init_r():
  192. i.e. SDRAM and serial UART
  193. - global_data is available
  194. - stack is in SRAM
  195. - BSS is not available, so you cannot use global/static variables,
  196. only stack variables and global_data
  197. Non-SPL-specific notes:
  198. - dram_init() is called to set up DRAM. If already done in SPL this
  199. can do nothing
  200. SPL-specific notes:
  201. - you can override the entire board_init_f() function with your own
  202. version as needed.
  203. - preloader_console_init() can be called here in extremis
  204. - should set up SDRAM, and anything needed to make the UART work
  205. - there is no need to clear BSS, it will be done by crt0.S
  206. - for specific scenarios on certain architectures an early BSS *can*
  207. be made available (via CONFIG_SPL_EARLY_BSS by moving the clearing
  208. of BSS prior to entering board_init_f()) but doing so is discouraged.
  209. Instead it is strongly recommended to architect any code changes
  210. or additions such to not depend on the availability of BSS during
  211. board_init_f() as indicated in other sections of this README to
  212. maintain compatibility and consistency across the entire code base.
  213. - must return normally from this function (don't call board_init_r()
  214. directly)
  215. Here the BSS is cleared. For SPL, if CONFIG_SPL_STACK_R is defined, then at
  216. this point the stack and global_data are relocated to below
  217. CONFIG_SPL_STACK_R_ADDR. For non-SPL, U-Boot is relocated to run at the top of
  218. memory.
  219. board_init_r():
  220. - purpose: main execution, common code
  221. - global_data is available
  222. - SDRAM is available
  223. - BSS is available, all static/global variables can be used
  224. - execution eventually continues to main_loop()
  225. Non-SPL-specific notes:
  226. - U-Boot is relocated to the top of memory and is now running from
  227. there.
  228. SPL-specific notes:
  229. - stack is optionally in SDRAM, if CONFIG_SPL_STACK_R is defined and
  230. CONFIG_SPL_STACK_R_ADDR points into SDRAM
  231. - preloader_console_init() can be called here - typically this is
  232. done by selecting CONFIG_SPL_BOARD_INIT and then supplying a
  233. spl_board_init() function containing this call
  234. - loads U-Boot or (in falcon mode) Linux
  235. Configuration Options:
  236. ----------------------
  237. Configuration depends on the combination of board and CPU type; all
  238. such information is kept in a configuration file
  239. "include/configs/<board_name>.h".
  240. Example: For a TQM823L module, all configuration settings are in
  241. "include/configs/TQM823L.h".
  242. Many of the options are named exactly as the corresponding Linux
  243. kernel configuration options. The intention is to make it easier to
  244. build a config tool - later.
  245. - ARM Platform Bus Type(CCI):
  246. CoreLink Cache Coherent Interconnect (CCI) is ARM BUS which
  247. provides full cache coherency between two clusters of multi-core
  248. CPUs and I/O coherency for devices and I/O masters
  249. CONFIG_SYS_FSL_HAS_CCI400
  250. Defined For SoC that has cache coherent interconnect
  251. CCN-400
  252. CONFIG_SYS_FSL_HAS_CCN504
  253. Defined for SoC that has cache coherent interconnect CCN-504
  254. The following options need to be configured:
  255. - CPU Type: Define exactly one, e.g. CONFIG_MPC85XX.
  256. - Board Type: Define exactly one, e.g. CONFIG_MPC8540ADS.
  257. - 85xx CPU Options:
  258. CONFIG_SYS_PPC64
  259. Specifies that the core is a 64-bit PowerPC implementation (implements
  260. the "64" category of the Power ISA). This is necessary for ePAPR
  261. compliance, among other possible reasons.
  262. CONFIG_SYS_FSL_TBCLK_DIV
  263. Defines the core time base clock divider ratio compared to the
  264. system clock. On most PQ3 devices this is 8, on newer QorIQ
  265. devices it can be 16 or 32. The ratio varies from SoC to Soc.
  266. CONFIG_SYS_FSL_PCIE_COMPAT
  267. Defines the string to utilize when trying to match PCIe device
  268. tree nodes for the given platform.
  269. CONFIG_SYS_FSL_ERRATUM_A004510
  270. Enables a workaround for erratum A004510. If set,
  271. then CONFIG_SYS_FSL_ERRATUM_A004510_SVR_REV and
  272. CONFIG_SYS_FSL_CORENET_SNOOPVEC_COREONLY must be set.
  273. CONFIG_SYS_FSL_ERRATUM_A004510_SVR_REV
  274. CONFIG_SYS_FSL_ERRATUM_A004510_SVR_REV2 (optional)
  275. Defines one or two SoC revisions (low 8 bits of SVR)
  276. for which the A004510 workaround should be applied.
  277. The rest of SVR is either not relevant to the decision
  278. of whether the erratum is present (e.g. p2040 versus
  279. p2041) or is implied by the build target, which controls
  280. whether CONFIG_SYS_FSL_ERRATUM_A004510 is set.
  281. See Freescale App Note 4493 for more information about
  282. this erratum.
  283. CONFIG_A003399_NOR_WORKAROUND
  284. Enables a workaround for IFC erratum A003399. It is only
  285. required during NOR boot.
  286. CONFIG_A008044_WORKAROUND
  287. Enables a workaround for T1040/T1042 erratum A008044. It is only
  288. required during NAND boot and valid for Rev 1.0 SoC revision
  289. CONFIG_SYS_FSL_CORENET_SNOOPVEC_COREONLY
  290. This is the value to write into CCSR offset 0x18600
  291. according to the A004510 workaround.
  292. CONFIG_SYS_FSL_DSP_DDR_ADDR
  293. This value denotes start offset of DDR memory which is
  294. connected exclusively to the DSP cores.
  295. CONFIG_SYS_FSL_DSP_M2_RAM_ADDR
  296. This value denotes start offset of M2 memory
  297. which is directly connected to the DSP core.
  298. CONFIG_SYS_FSL_DSP_M3_RAM_ADDR
  299. This value denotes start offset of M3 memory which is directly
  300. connected to the DSP core.
  301. CONFIG_SYS_FSL_DSP_CCSRBAR_DEFAULT
  302. This value denotes start offset of DSP CCSR space.
  303. CONFIG_SYS_FSL_SINGLE_SOURCE_CLK
  304. Single Source Clock is clocking mode present in some of FSL SoC's.
  305. In this mode, a single differential clock is used to supply
  306. clocks to the sysclock, ddrclock and usbclock.
  307. CONFIG_SYS_CPC_REINIT_F
  308. This CONFIG is defined when the CPC is configured as SRAM at the
  309. time of U-Boot entry and is required to be re-initialized.
  310. CONFIG_DEEP_SLEEP
  311. Indicates this SoC supports deep sleep feature. If deep sleep is
  312. supported, core will start to execute uboot when wakes up.
  313. - Generic CPU options:
  314. CONFIG_SYS_BIG_ENDIAN, CONFIG_SYS_LITTLE_ENDIAN
  315. Defines the endianess of the CPU. Implementation of those
  316. values is arch specific.
  317. CONFIG_SYS_FSL_DDR
  318. Freescale DDR driver in use. This type of DDR controller is
  319. found in mpc83xx, mpc85xx, mpc86xx as well as some ARM core
  320. SoCs.
  321. CONFIG_SYS_FSL_DDR_ADDR
  322. Freescale DDR memory-mapped register base.
  323. CONFIG_SYS_FSL_DDR_EMU
  324. Specify emulator support for DDR. Some DDR features such as
  325. deskew training are not available.
  326. CONFIG_SYS_FSL_DDRC_GEN1
  327. Freescale DDR1 controller.
  328. CONFIG_SYS_FSL_DDRC_GEN2
  329. Freescale DDR2 controller.
  330. CONFIG_SYS_FSL_DDRC_GEN3
  331. Freescale DDR3 controller.
  332. CONFIG_SYS_FSL_DDRC_GEN4
  333. Freescale DDR4 controller.
  334. CONFIG_SYS_FSL_DDRC_ARM_GEN3
  335. Freescale DDR3 controller for ARM-based SoCs.
  336. CONFIG_SYS_FSL_DDR1
  337. Board config to use DDR1. It can be enabled for SoCs with
  338. Freescale DDR1 or DDR2 controllers, depending on the board
  339. implemetation.
  340. CONFIG_SYS_FSL_DDR2
  341. Board config to use DDR2. It can be enabled for SoCs with
  342. Freescale DDR2 or DDR3 controllers, depending on the board
  343. implementation.
  344. CONFIG_SYS_FSL_DDR3
  345. Board config to use DDR3. It can be enabled for SoCs with
  346. Freescale DDR3 or DDR3L controllers.
  347. CONFIG_SYS_FSL_DDR3L
  348. Board config to use DDR3L. It can be enabled for SoCs with
  349. DDR3L controllers.
  350. CONFIG_SYS_FSL_DDR4
  351. Board config to use DDR4. It can be enabled for SoCs with
  352. DDR4 controllers.
  353. CONFIG_SYS_FSL_IFC_BE
  354. Defines the IFC controller register space as Big Endian
  355. CONFIG_SYS_FSL_IFC_LE
  356. Defines the IFC controller register space as Little Endian
  357. CONFIG_SYS_FSL_IFC_CLK_DIV
  358. Defines divider of platform clock(clock input to IFC controller).
  359. CONFIG_SYS_FSL_LBC_CLK_DIV
  360. Defines divider of platform clock(clock input to eLBC controller).
  361. CONFIG_SYS_FSL_PBL_PBI
  362. It enables addition of RCW (Power on reset configuration) in built image.
  363. Please refer doc/README.pblimage for more details
  364. CONFIG_SYS_FSL_PBL_RCW
  365. It adds PBI(pre-boot instructions) commands in u-boot build image.
  366. PBI commands can be used to configure SoC before it starts the execution.
  367. Please refer doc/README.pblimage for more details
  368. CONFIG_SYS_FSL_DDR_BE
  369. Defines the DDR controller register space as Big Endian
  370. CONFIG_SYS_FSL_DDR_LE
  371. Defines the DDR controller register space as Little Endian
  372. CONFIG_SYS_FSL_DDR_SDRAM_BASE_PHY
  373. Physical address from the view of DDR controllers. It is the
  374. same as CONFIG_SYS_DDR_SDRAM_BASE for all Power SoCs. But
  375. it could be different for ARM SoCs.
  376. CONFIG_SYS_FSL_DDR_INTLV_256B
  377. DDR controller interleaving on 256-byte. This is a special
  378. interleaving mode, handled by Dickens for Freescale layerscape
  379. SoCs with ARM core.
  380. CONFIG_SYS_FSL_DDR_MAIN_NUM_CTRLS
  381. Number of controllers used as main memory.
  382. CONFIG_SYS_FSL_OTHER_DDR_NUM_CTRLS
  383. Number of controllers used for other than main memory.
  384. CONFIG_SYS_FSL_HAS_DP_DDR
  385. Defines the SoC has DP-DDR used for DPAA.
  386. CONFIG_SYS_FSL_SEC_BE
  387. Defines the SEC controller register space as Big Endian
  388. CONFIG_SYS_FSL_SEC_LE
  389. Defines the SEC controller register space as Little Endian
  390. - MIPS CPU options:
  391. CONFIG_SYS_INIT_SP_OFFSET
  392. Offset relative to CONFIG_SYS_SDRAM_BASE for initial stack
  393. pointer. This is needed for the temporary stack before
  394. relocation.
  395. CONFIG_XWAY_SWAP_BYTES
  396. Enable compilation of tools/xway-swap-bytes needed for Lantiq
  397. XWAY SoCs for booting from NOR flash. The U-Boot image needs to
  398. be swapped if a flash programmer is used.
  399. - ARM options:
  400. CONFIG_SYS_EXCEPTION_VECTORS_HIGH
  401. Select high exception vectors of the ARM core, e.g., do not
  402. clear the V bit of the c1 register of CP15.
  403. COUNTER_FREQUENCY
  404. Generic timer clock source frequency.
  405. COUNTER_FREQUENCY_REAL
  406. Generic timer clock source frequency if the real clock is
  407. different from COUNTER_FREQUENCY, and can only be determined
  408. at run time.
  409. - Tegra SoC options:
  410. CONFIG_TEGRA_SUPPORT_NON_SECURE
  411. Support executing U-Boot in non-secure (NS) mode. Certain
  412. impossible actions will be skipped if the CPU is in NS mode,
  413. such as ARM architectural timer initialization.
  414. - Linux Kernel Interface:
  415. CONFIG_MEMSIZE_IN_BYTES [relevant for MIPS only]
  416. When transferring memsize parameter to Linux, some versions
  417. expect it to be in bytes, others in MB.
  418. Define CONFIG_MEMSIZE_IN_BYTES to make it in bytes.
  419. CONFIG_OF_LIBFDT
  420. New kernel versions are expecting firmware settings to be
  421. passed using flattened device trees (based on open firmware
  422. concepts).
  423. CONFIG_OF_LIBFDT
  424. * New libfdt-based support
  425. * Adds the "fdt" command
  426. * The bootm command automatically updates the fdt
  427. OF_TBCLK - The timebase frequency.
  428. OF_STDOUT_PATH - The path to the console device
  429. boards with QUICC Engines require OF_QE to set UCC MAC
  430. addresses
  431. CONFIG_OF_BOARD_SETUP
  432. Board code has addition modification that it wants to make
  433. to the flat device tree before handing it off to the kernel
  434. CONFIG_OF_SYSTEM_SETUP
  435. Other code has addition modification that it wants to make
  436. to the flat device tree before handing it off to the kernel.
  437. This causes ft_system_setup() to be called before booting
  438. the kernel.
  439. CONFIG_OF_IDE_FIXUP
  440. U-Boot can detect if an IDE device is present or not.
  441. If not, and this new config option is activated, U-Boot
  442. removes the ATA node from the DTS before booting Linux,
  443. so the Linux IDE driver does not probe the device and
  444. crash. This is needed for buggy hardware (uc101) where
  445. no pull down resistor is connected to the signal IDE5V_DD7.
  446. CONFIG_MACH_TYPE [relevant for ARM only][mandatory]
  447. This setting is mandatory for all boards that have only one
  448. machine type and must be used to specify the machine type
  449. number as it appears in the ARM machine registry
  450. (see http://www.arm.linux.org.uk/developer/machines/).
  451. Only boards that have multiple machine types supported
  452. in a single configuration file and the machine type is
  453. runtime discoverable, do not have to use this setting.
  454. - vxWorks boot parameters:
  455. bootvx constructs a valid bootline using the following
  456. environments variables: bootdev, bootfile, ipaddr, netmask,
  457. serverip, gatewayip, hostname, othbootargs.
  458. It loads the vxWorks image pointed bootfile.
  459. Note: If a "bootargs" environment is defined, it will overwride
  460. the defaults discussed just above.
  461. - Cache Configuration:
  462. CONFIG_SYS_L2CACHE_OFF- Do not enable L2 cache in U-Boot
  463. - Cache Configuration for ARM:
  464. CONFIG_SYS_L2_PL310 - Enable support for ARM PL310 L2 cache
  465. controller
  466. CONFIG_SYS_PL310_BASE - Physical base address of PL310
  467. controller register space
  468. - Serial Ports:
  469. CONFIG_PL010_SERIAL
  470. Define this if you want support for Amba PrimeCell PL010 UARTs.
  471. CONFIG_PL011_SERIAL
  472. Define this if you want support for Amba PrimeCell PL011 UARTs.
  473. CONFIG_PL011_CLOCK
  474. If you have Amba PrimeCell PL011 UARTs, set this variable to
  475. the clock speed of the UARTs.
  476. CONFIG_PL01x_PORTS
  477. If you have Amba PrimeCell PL010 or PL011 UARTs on your board,
  478. define this to a list of base addresses for each (supported)
  479. port. See e.g. include/configs/versatile.h
  480. CONFIG_SERIAL_HW_FLOW_CONTROL
  481. Define this variable to enable hw flow control in serial driver.
  482. Current user of this option is drivers/serial/nsl16550.c driver
  483. - Autoboot Command:
  484. CONFIG_BOOTCOMMAND
  485. Only needed when CONFIG_BOOTDELAY is enabled;
  486. define a command string that is automatically executed
  487. when no character is read on the console interface
  488. within "Boot Delay" after reset.
  489. CONFIG_RAMBOOT and CONFIG_NFSBOOT
  490. The value of these goes into the environment as
  491. "ramboot" and "nfsboot" respectively, and can be used
  492. as a convenience, when switching between booting from
  493. RAM and NFS.
  494. - Serial Download Echo Mode:
  495. CONFIG_LOADS_ECHO
  496. If defined to 1, all characters received during a
  497. serial download (using the "loads" command) are
  498. echoed back. This might be needed by some terminal
  499. emulations (like "cu"), but may as well just take
  500. time on others. This setting #define's the initial
  501. value of the "loads_echo" environment variable.
  502. - Kgdb Serial Baudrate: (if CONFIG_CMD_KGDB is defined)
  503. CONFIG_KGDB_BAUDRATE
  504. Select one of the baudrates listed in
  505. CONFIG_SYS_BAUDRATE_TABLE, see below.
  506. - Removal of commands
  507. If no commands are needed to boot, you can disable
  508. CONFIG_CMDLINE to remove them. In this case, the command line
  509. will not be available, and when U-Boot wants to execute the
  510. boot command (on start-up) it will call board_run_command()
  511. instead. This can reduce image size significantly for very
  512. simple boot procedures.
  513. - Regular expression support:
  514. CONFIG_REGEX
  515. If this variable is defined, U-Boot is linked against
  516. the SLRE (Super Light Regular Expression) library,
  517. which adds regex support to some commands, as for
  518. example "env grep" and "setexpr".
  519. - Device tree:
  520. CONFIG_OF_CONTROL
  521. If this variable is defined, U-Boot will use a device tree
  522. to configure its devices, instead of relying on statically
  523. compiled #defines in the board file. This option is
  524. experimental and only available on a few boards. The device
  525. tree is available in the global data as gd->fdt_blob.
  526. U-Boot needs to get its device tree from somewhere. This can
  527. be done using one of the three options below:
  528. CONFIG_OF_EMBED
  529. If this variable is defined, U-Boot will embed a device tree
  530. binary in its image. This device tree file should be in the
  531. board directory and called <soc>-<board>.dts. The binary file
  532. is then picked up in board_init_f() and made available through
  533. the global data structure as gd->fdt_blob.
  534. CONFIG_OF_SEPARATE
  535. If this variable is defined, U-Boot will build a device tree
  536. binary. It will be called u-boot.dtb. Architecture-specific
  537. code will locate it at run-time. Generally this works by:
  538. cat u-boot.bin u-boot.dtb >image.bin
  539. and in fact, U-Boot does this for you, creating a file called
  540. u-boot-dtb.bin which is useful in the common case. You can
  541. still use the individual files if you need something more
  542. exotic.
  543. CONFIG_OF_BOARD
  544. If this variable is defined, U-Boot will use the device tree
  545. provided by the board at runtime instead of embedding one with
  546. the image. Only boards defining board_fdt_blob_setup() support
  547. this option (see include/fdtdec.h file).
  548. - Watchdog:
  549. CONFIG_WATCHDOG
  550. If this variable is defined, it enables watchdog
  551. support for the SoC. There must be support in the SoC
  552. specific code for a watchdog. For the 8xx
  553. CPUs, the SIU Watchdog feature is enabled in the SYPCR
  554. register. When supported for a specific SoC is
  555. available, then no further board specific code should
  556. be needed to use it.
  557. CONFIG_HW_WATCHDOG
  558. When using a watchdog circuitry external to the used
  559. SoC, then define this variable and provide board
  560. specific code for the "hw_watchdog_reset" function.
  561. - Real-Time Clock:
  562. When CONFIG_CMD_DATE is selected, the type of the RTC
  563. has to be selected, too. Define exactly one of the
  564. following options:
  565. CONFIG_RTC_PCF8563 - use Philips PCF8563 RTC
  566. CONFIG_RTC_MC13XXX - use MC13783 or MC13892 RTC
  567. CONFIG_RTC_MC146818 - use MC146818 RTC
  568. CONFIG_RTC_DS1307 - use Maxim, Inc. DS1307 RTC
  569. CONFIG_RTC_DS1337 - use Maxim, Inc. DS1337 RTC
  570. CONFIG_RTC_DS1338 - use Maxim, Inc. DS1338 RTC
  571. CONFIG_RTC_DS1339 - use Maxim, Inc. DS1339 RTC
  572. CONFIG_RTC_DS164x - use Dallas DS164x RTC
  573. CONFIG_RTC_ISL1208 - use Intersil ISL1208 RTC
  574. CONFIG_RTC_MAX6900 - use Maxim, Inc. MAX6900 RTC
  575. CONFIG_RTC_DS1337_NOOSC - Turn off the OSC output for DS1337
  576. CONFIG_SYS_RV3029_TCR - enable trickle charger on
  577. RV3029 RTC.
  578. Note that if the RTC uses I2C, then the I2C interface
  579. must also be configured. See I2C Support, below.
  580. - GPIO Support:
  581. CONFIG_PCA953X - use NXP's PCA953X series I2C GPIO
  582. The CONFIG_SYS_I2C_PCA953X_WIDTH option specifies a list of
  583. chip-ngpio pairs that tell the PCA953X driver the number of
  584. pins supported by a particular chip.
  585. Note that if the GPIO device uses I2C, then the I2C interface
  586. must also be configured. See I2C Support, below.
  587. - I/O tracing:
  588. When CONFIG_IO_TRACE is selected, U-Boot intercepts all I/O
  589. accesses and can checksum them or write a list of them out
  590. to memory. See the 'iotrace' command for details. This is
  591. useful for testing device drivers since it can confirm that
  592. the driver behaves the same way before and after a code
  593. change. Currently this is supported on sandbox and arm. To
  594. add support for your architecture, add '#include <iotrace.h>'
  595. to the bottom of arch/<arch>/include/asm/io.h and test.
  596. Example output from the 'iotrace stats' command is below.
  597. Note that if the trace buffer is exhausted, the checksum will
  598. still continue to operate.
  599. iotrace is enabled
  600. Start: 10000000 (buffer start address)
  601. Size: 00010000 (buffer size)
  602. Offset: 00000120 (current buffer offset)
  603. Output: 10000120 (start + offset)
  604. Count: 00000018 (number of trace records)
  605. CRC32: 9526fb66 (CRC32 of all trace records)
  606. - Timestamp Support:
  607. When CONFIG_TIMESTAMP is selected, the timestamp
  608. (date and time) of an image is printed by image
  609. commands like bootm or iminfo. This option is
  610. automatically enabled when you select CONFIG_CMD_DATE .
  611. - Partition Labels (disklabels) Supported:
  612. Zero or more of the following:
  613. CONFIG_MAC_PARTITION Apple's MacOS partition table.
  614. CONFIG_ISO_PARTITION ISO partition table, used on CDROM etc.
  615. CONFIG_EFI_PARTITION GPT partition table, common when EFI is the
  616. bootloader. Note 2TB partition limit; see
  617. disk/part_efi.c
  618. CONFIG_SCSI) you must configure support for at
  619. least one non-MTD partition type as well.
  620. - IDE Reset method:
  621. CONFIG_IDE_RESET_ROUTINE - this is defined in several
  622. board configurations files but used nowhere!
  623. CONFIG_IDE_RESET - is this is defined, IDE Reset will
  624. be performed by calling the function
  625. ide_set_reset(int reset)
  626. which has to be defined in a board specific file
  627. - ATAPI Support:
  628. CONFIG_ATAPI
  629. Set this to enable ATAPI support.
  630. - LBA48 Support
  631. CONFIG_LBA48
  632. Set this to enable support for disks larger than 137GB
  633. Also look at CONFIG_SYS_64BIT_LBA.
  634. Whithout these , LBA48 support uses 32bit variables and will 'only'
  635. support disks up to 2.1TB.
  636. CONFIG_SYS_64BIT_LBA:
  637. When enabled, makes the IDE subsystem use 64bit sector addresses.
  638. Default is 32bit.
  639. - SCSI Support:
  640. CONFIG_SYS_SCSI_MAX_LUN [8], CONFIG_SYS_SCSI_MAX_SCSI_ID [7] and
  641. CONFIG_SYS_SCSI_MAX_DEVICE [CONFIG_SYS_SCSI_MAX_SCSI_ID *
  642. CONFIG_SYS_SCSI_MAX_LUN] can be adjusted to define the
  643. maximum numbers of LUNs, SCSI ID's and target
  644. devices.
  645. The environment variable 'scsidevs' is set to the number of
  646. SCSI devices found during the last scan.
  647. - NETWORK Support (PCI):
  648. CONFIG_E1000
  649. Support for Intel 8254x/8257x gigabit chips.
  650. CONFIG_E1000_SPI
  651. Utility code for direct access to the SPI bus on Intel 8257x.
  652. This does not do anything useful unless you set at least one
  653. of CONFIG_CMD_E1000 or CONFIG_E1000_SPI_GENERIC.
  654. CONFIG_E1000_SPI_GENERIC
  655. Allow generic access to the SPI bus on the Intel 8257x, for
  656. example with the "sspi" command.
  657. CONFIG_NATSEMI
  658. Support for National dp83815 chips.
  659. CONFIG_NS8382X
  660. Support for National dp8382[01] gigabit chips.
  661. - NETWORK Support (other):
  662. CONFIG_DRIVER_AT91EMAC
  663. Support for AT91RM9200 EMAC.
  664. CONFIG_RMII
  665. Define this to use reduced MII inteface
  666. CONFIG_DRIVER_AT91EMAC_QUIET
  667. If this defined, the driver is quiet.
  668. The driver doen't show link status messages.
  669. CONFIG_CALXEDA_XGMAC
  670. Support for the Calxeda XGMAC device
  671. CONFIG_LAN91C96
  672. Support for SMSC's LAN91C96 chips.
  673. CONFIG_LAN91C96_USE_32_BIT
  674. Define this to enable 32 bit addressing
  675. CONFIG_SMC91111
  676. Support for SMSC's LAN91C111 chip
  677. CONFIG_SMC91111_BASE
  678. Define this to hold the physical address
  679. of the device (I/O space)
  680. CONFIG_SMC_USE_32_BIT
  681. Define this if data bus is 32 bits
  682. CONFIG_SMC_USE_IOFUNCS
  683. Define this to use i/o functions instead of macros
  684. (some hardware wont work with macros)
  685. CONFIG_SYS_DAVINCI_EMAC_PHY_COUNT
  686. Define this if you have more then 3 PHYs.
  687. CONFIG_FTGMAC100
  688. Support for Faraday's FTGMAC100 Gigabit SoC Ethernet
  689. CONFIG_FTGMAC100_EGIGA
  690. Define this to use GE link update with gigabit PHY.
  691. Define this if FTGMAC100 is connected to gigabit PHY.
  692. If your system has 10/100 PHY only, it might not occur
  693. wrong behavior. Because PHY usually return timeout or
  694. useless data when polling gigabit status and gigabit
  695. control registers. This behavior won't affect the
  696. correctnessof 10/100 link speed update.
  697. CONFIG_SH_ETHER
  698. Support for Renesas on-chip Ethernet controller
  699. CONFIG_SH_ETHER_USE_PORT
  700. Define the number of ports to be used
  701. CONFIG_SH_ETHER_PHY_ADDR
  702. Define the ETH PHY's address
  703. CONFIG_SH_ETHER_CACHE_WRITEBACK
  704. If this option is set, the driver enables cache flush.
  705. - TPM Support:
  706. CONFIG_TPM
  707. Support TPM devices.
  708. CONFIG_TPM_TIS_INFINEON
  709. Support for Infineon i2c bus TPM devices. Only one device
  710. per system is supported at this time.
  711. CONFIG_TPM_TIS_I2C_BURST_LIMITATION
  712. Define the burst count bytes upper limit
  713. CONFIG_TPM_ST33ZP24
  714. Support for STMicroelectronics TPM devices. Requires DM_TPM support.
  715. CONFIG_TPM_ST33ZP24_I2C
  716. Support for STMicroelectronics ST33ZP24 I2C devices.
  717. Requires TPM_ST33ZP24 and I2C.
  718. CONFIG_TPM_ST33ZP24_SPI
  719. Support for STMicroelectronics ST33ZP24 SPI devices.
  720. Requires TPM_ST33ZP24 and SPI.
  721. CONFIG_TPM_ATMEL_TWI
  722. Support for Atmel TWI TPM device. Requires I2C support.
  723. CONFIG_TPM_TIS_LPC
  724. Support for generic parallel port TPM devices. Only one device
  725. per system is supported at this time.
  726. CONFIG_TPM_TIS_BASE_ADDRESS
  727. Base address where the generic TPM device is mapped
  728. to. Contemporary x86 systems usually map it at
  729. 0xfed40000.
  730. CONFIG_TPM
  731. Define this to enable the TPM support library which provides
  732. functional interfaces to some TPM commands.
  733. Requires support for a TPM device.
  734. CONFIG_TPM_AUTH_SESSIONS
  735. Define this to enable authorized functions in the TPM library.
  736. Requires CONFIG_TPM and CONFIG_SHA1.
  737. - USB Support:
  738. At the moment only the UHCI host controller is
  739. supported (PIP405, MIP405); define
  740. CONFIG_USB_UHCI to enable it.
  741. define CONFIG_USB_KEYBOARD to enable the USB Keyboard
  742. and define CONFIG_USB_STORAGE to enable the USB
  743. storage devices.
  744. Note:
  745. Supported are USB Keyboards and USB Floppy drives
  746. (TEAC FD-05PUB).
  747. CONFIG_USB_EHCI_TXFIFO_THRESH enables setting of the
  748. txfilltuning field in the EHCI controller on reset.
  749. CONFIG_USB_DWC2_REG_ADDR the physical CPU address of the DWC2
  750. HW module registers.
  751. - USB Device:
  752. Define the below if you wish to use the USB console.
  753. Once firmware is rebuilt from a serial console issue the
  754. command "setenv stdin usbtty; setenv stdout usbtty" and
  755. attach your USB cable. The Unix command "dmesg" should print
  756. it has found a new device. The environment variable usbtty
  757. can be set to gserial or cdc_acm to enable your device to
  758. appear to a USB host as a Linux gserial device or a
  759. Common Device Class Abstract Control Model serial device.
  760. If you select usbtty = gserial you should be able to enumerate
  761. a Linux host by
  762. # modprobe usbserial vendor=0xVendorID product=0xProductID
  763. else if using cdc_acm, simply setting the environment
  764. variable usbtty to be cdc_acm should suffice. The following
  765. might be defined in YourBoardName.h
  766. CONFIG_USB_DEVICE
  767. Define this to build a UDC device
  768. CONFIG_USB_TTY
  769. Define this to have a tty type of device available to
  770. talk to the UDC device
  771. CONFIG_USBD_HS
  772. Define this to enable the high speed support for usb
  773. device and usbtty. If this feature is enabled, a routine
  774. int is_usbd_high_speed(void)
  775. also needs to be defined by the driver to dynamically poll
  776. whether the enumeration has succeded at high speed or full
  777. speed.
  778. CONFIG_SYS_CONSOLE_IS_IN_ENV
  779. Define this if you want stdin, stdout &/or stderr to
  780. be set to usbtty.
  781. If you have a USB-IF assigned VendorID then you may wish to
  782. define your own vendor specific values either in BoardName.h
  783. or directly in usbd_vendor_info.h. If you don't define
  784. CONFIG_USBD_MANUFACTURER, CONFIG_USBD_PRODUCT_NAME,
  785. CONFIG_USBD_VENDORID and CONFIG_USBD_PRODUCTID, then U-Boot
  786. should pretend to be a Linux device to it's target host.
  787. CONFIG_USBD_MANUFACTURER
  788. Define this string as the name of your company for
  789. - CONFIG_USBD_MANUFACTURER "my company"
  790. CONFIG_USBD_PRODUCT_NAME
  791. Define this string as the name of your product
  792. - CONFIG_USBD_PRODUCT_NAME "acme usb device"
  793. CONFIG_USBD_VENDORID
  794. Define this as your assigned Vendor ID from the USB
  795. Implementors Forum. This *must* be a genuine Vendor ID
  796. to avoid polluting the USB namespace.
  797. - CONFIG_USBD_VENDORID 0xFFFF
  798. CONFIG_USBD_PRODUCTID
  799. Define this as the unique Product ID
  800. for your device
  801. - CONFIG_USBD_PRODUCTID 0xFFFF
  802. - ULPI Layer Support:
  803. The ULPI (UTMI Low Pin (count) Interface) PHYs are supported via
  804. the generic ULPI layer. The generic layer accesses the ULPI PHY
  805. via the platform viewport, so you need both the genric layer and
  806. the viewport enabled. Currently only Chipidea/ARC based
  807. viewport is supported.
  808. To enable the ULPI layer support, define CONFIG_USB_ULPI and
  809. CONFIG_USB_ULPI_VIEWPORT in your board configuration file.
  810. If your ULPI phy needs a different reference clock than the
  811. standard 24 MHz then you have to define CONFIG_ULPI_REF_CLK to
  812. the appropriate value in Hz.
  813. - MMC Support:
  814. The MMC controller on the Intel PXA is supported. To
  815. enable this define CONFIG_MMC. The MMC can be
  816. accessed from the boot prompt by mapping the device
  817. to physical memory similar to flash. Command line is
  818. enabled with CONFIG_CMD_MMC. The MMC driver also works with
  819. the FAT fs. This is enabled with CONFIG_CMD_FAT.
  820. CONFIG_SH_MMCIF
  821. Support for Renesas on-chip MMCIF controller
  822. CONFIG_SH_MMCIF_ADDR
  823. Define the base address of MMCIF registers
  824. CONFIG_SH_MMCIF_CLK
  825. Define the clock frequency for MMCIF
  826. - USB Device Firmware Update (DFU) class support:
  827. CONFIG_DFU_OVER_USB
  828. This enables the USB portion of the DFU USB class
  829. CONFIG_DFU_NAND
  830. This enables support for exposing NAND devices via DFU.
  831. CONFIG_DFU_RAM
  832. This enables support for exposing RAM via DFU.
  833. Note: DFU spec refer to non-volatile memory usage, but
  834. allow usages beyond the scope of spec - here RAM usage,
  835. one that would help mostly the developer.
  836. CONFIG_SYS_DFU_DATA_BUF_SIZE
  837. Dfu transfer uses a buffer before writing data to the
  838. raw storage device. Make the size (in bytes) of this buffer
  839. configurable. The size of this buffer is also configurable
  840. through the "dfu_bufsiz" environment variable.
  841. CONFIG_SYS_DFU_MAX_FILE_SIZE
  842. When updating files rather than the raw storage device,
  843. we use a static buffer to copy the file into and then write
  844. the buffer once we've been given the whole file. Define
  845. this to the maximum filesize (in bytes) for the buffer.
  846. Default is 4 MiB if undefined.
  847. DFU_DEFAULT_POLL_TIMEOUT
  848. Poll timeout [ms], is the timeout a device can send to the
  849. host. The host must wait for this timeout before sending
  850. a subsequent DFU_GET_STATUS request to the device.
  851. DFU_MANIFEST_POLL_TIMEOUT
  852. Poll timeout [ms], which the device sends to the host when
  853. entering dfuMANIFEST state. Host waits this timeout, before
  854. sending again an USB request to the device.
  855. - Journaling Flash filesystem support:
  856. CONFIG_JFFS2_NAND
  857. Define these for a default partition on a NAND device
  858. CONFIG_SYS_JFFS2_FIRST_SECTOR,
  859. CONFIG_SYS_JFFS2_FIRST_BANK, CONFIG_SYS_JFFS2_NUM_BANKS
  860. Define these for a default partition on a NOR device
  861. - Keyboard Support:
  862. See Kconfig help for available keyboard drivers.
  863. CONFIG_KEYBOARD
  864. Define this to enable a custom keyboard support.
  865. This simply calls drv_keyboard_init() which must be
  866. defined in your board-specific files. This option is deprecated
  867. and is only used by novena. For new boards, use driver model
  868. instead.
  869. - Video support:
  870. CONFIG_FSL_DIU_FB
  871. Enable the Freescale DIU video driver. Reference boards for
  872. SOCs that have a DIU should define this macro to enable DIU
  873. support, and should also define these other macros:
  874. CONFIG_SYS_DIU_ADDR
  875. CONFIG_VIDEO
  876. CONFIG_CFB_CONSOLE
  877. CONFIG_VIDEO_SW_CURSOR
  878. CONFIG_VGA_AS_SINGLE_DEVICE
  879. CONFIG_VIDEO_LOGO
  880. CONFIG_VIDEO_BMP_LOGO
  881. The DIU driver will look for the 'video-mode' environment
  882. variable, and if defined, enable the DIU as a console during
  883. boot. See the documentation file doc/README.video for a
  884. description of this variable.
  885. - LCD Support: CONFIG_LCD
  886. Define this to enable LCD support (for output to LCD
  887. display); also select one of the supported displays
  888. by defining one of these:
  889. CONFIG_ATMEL_LCD:
  890. HITACHI TX09D70VM1CCA, 3.5", 240x320.
  891. CONFIG_NEC_NL6448AC33:
  892. NEC NL6448AC33-18. Active, color, single scan.
  893. CONFIG_NEC_NL6448BC20
  894. NEC NL6448BC20-08. 6.5", 640x480.
  895. Active, color, single scan.
  896. CONFIG_NEC_NL6448BC33_54
  897. NEC NL6448BC33-54. 10.4", 640x480.
  898. Active, color, single scan.
  899. CONFIG_SHARP_16x9
  900. Sharp 320x240. Active, color, single scan.
  901. It isn't 16x9, and I am not sure what it is.
  902. CONFIG_SHARP_LQ64D341
  903. Sharp LQ64D341 display, 640x480.
  904. Active, color, single scan.
  905. CONFIG_HLD1045
  906. HLD1045 display, 640x480.
  907. Active, color, single scan.
  908. CONFIG_OPTREX_BW
  909. Optrex CBL50840-2 NF-FW 99 22 M5
  910. or
  911. Hitachi LMG6912RPFC-00T
  912. or
  913. Hitachi SP14Q002
  914. 320x240. Black & white.
  915. CONFIG_LCD_ALIGNMENT
  916. Normally the LCD is page-aligned (typically 4KB). If this is
  917. defined then the LCD will be aligned to this value instead.
  918. For ARM it is sometimes useful to use MMU_SECTION_SIZE
  919. here, since it is cheaper to change data cache settings on
  920. a per-section basis.
  921. CONFIG_LCD_ROTATION
  922. Sometimes, for example if the display is mounted in portrait
  923. mode or even if it's mounted landscape but rotated by 180degree,
  924. we need to rotate our content of the display relative to the
  925. framebuffer, so that user can read the messages which are
  926. printed out.
  927. Once CONFIG_LCD_ROTATION is defined, the lcd_console will be
  928. initialized with a given rotation from "vl_rot" out of
  929. "vidinfo_t" which is provided by the board specific code.
  930. The value for vl_rot is coded as following (matching to
  931. fbcon=rotate:<n> linux-kernel commandline):
  932. 0 = no rotation respectively 0 degree
  933. 1 = 90 degree rotation
  934. 2 = 180 degree rotation
  935. 3 = 270 degree rotation
  936. If CONFIG_LCD_ROTATION is not defined, the console will be
  937. initialized with 0degree rotation.
  938. CONFIG_LCD_BMP_RLE8
  939. Support drawing of RLE8-compressed bitmaps on the LCD.
  940. CONFIG_I2C_EDID
  941. Enables an 'i2c edid' command which can read EDID
  942. information over I2C from an attached LCD display.
  943. - Gzip compressed BMP image support: CONFIG_VIDEO_BMP_GZIP
  944. If this option is set, additionally to standard BMP
  945. images, gzipped BMP images can be displayed via the
  946. splashscreen support or the bmp command.
  947. - Run length encoded BMP image (RLE8) support: CONFIG_VIDEO_BMP_RLE8
  948. If this option is set, 8-bit RLE compressed BMP images
  949. can be displayed via the splashscreen support or the
  950. bmp command.
  951. - MII/PHY support:
  952. CONFIG_PHY_CLOCK_FREQ (ppc4xx)
  953. The clock frequency of the MII bus
  954. CONFIG_PHY_RESET_DELAY
  955. Some PHY like Intel LXT971A need extra delay after
  956. reset before any MII register access is possible.
  957. For such PHY, set this option to the usec delay
  958. required. (minimum 300usec for LXT971A)
  959. CONFIG_PHY_CMD_DELAY (ppc4xx)
  960. Some PHY like Intel LXT971A need extra delay after
  961. command issued before MII status register can be read
  962. - IP address:
  963. CONFIG_IPADDR
  964. Define a default value for the IP address to use for
  965. the default Ethernet interface, in case this is not
  966. determined through e.g. bootp.
  967. (Environment variable "ipaddr")
  968. - Server IP address:
  969. CONFIG_SERVERIP
  970. Defines a default value for the IP address of a TFTP
  971. server to contact when using the "tftboot" command.
  972. (Environment variable "serverip")
  973. CONFIG_KEEP_SERVERADDR
  974. Keeps the server's MAC address, in the env 'serveraddr'
  975. for passing to bootargs (like Linux's netconsole option)
  976. - Gateway IP address:
  977. CONFIG_GATEWAYIP
  978. Defines a default value for the IP address of the
  979. default router where packets to other networks are
  980. sent to.
  981. (Environment variable "gatewayip")
  982. - Subnet mask:
  983. CONFIG_NETMASK
  984. Defines a default value for the subnet mask (or
  985. routing prefix) which is used to determine if an IP
  986. address belongs to the local subnet or needs to be
  987. forwarded through a router.
  988. (Environment variable "netmask")
  989. - BOOTP Recovery Mode:
  990. CONFIG_BOOTP_RANDOM_DELAY
  991. If you have many targets in a network that try to
  992. boot using BOOTP, you may want to avoid that all
  993. systems send out BOOTP requests at precisely the same
  994. moment (which would happen for instance at recovery
  995. from a power failure, when all systems will try to
  996. boot, thus flooding the BOOTP server. Defining
  997. CONFIG_BOOTP_RANDOM_DELAY causes a random delay to be
  998. inserted before sending out BOOTP requests. The
  999. following delays are inserted then:
  1000. 1st BOOTP request: delay 0 ... 1 sec
  1001. 2nd BOOTP request: delay 0 ... 2 sec
  1002. 3rd BOOTP request: delay 0 ... 4 sec
  1003. 4th and following
  1004. BOOTP requests: delay 0 ... 8 sec
  1005. CONFIG_BOOTP_ID_CACHE_SIZE
  1006. BOOTP packets are uniquely identified using a 32-bit ID. The
  1007. server will copy the ID from client requests to responses and
  1008. U-Boot will use this to determine if it is the destination of
  1009. an incoming response. Some servers will check that addresses
  1010. aren't in use before handing them out (usually using an ARP
  1011. ping) and therefore take up to a few hundred milliseconds to
  1012. respond. Network congestion may also influence the time it
  1013. takes for a response to make it back to the client. If that
  1014. time is too long, U-Boot will retransmit requests. In order
  1015. to allow earlier responses to still be accepted after these
  1016. retransmissions, U-Boot's BOOTP client keeps a small cache of
  1017. IDs. The CONFIG_BOOTP_ID_CACHE_SIZE controls the size of this
  1018. cache. The default is to keep IDs for up to four outstanding
  1019. requests. Increasing this will allow U-Boot to accept offers
  1020. from a BOOTP client in networks with unusually high latency.
  1021. - DHCP Advanced Options:
  1022. You can fine tune the DHCP functionality by defining
  1023. CONFIG_BOOTP_* symbols:
  1024. CONFIG_BOOTP_NISDOMAIN
  1025. CONFIG_BOOTP_BOOTFILESIZE
  1026. CONFIG_BOOTP_NTPSERVER
  1027. CONFIG_BOOTP_TIMEOFFSET
  1028. CONFIG_BOOTP_VENDOREX
  1029. CONFIG_BOOTP_MAY_FAIL
  1030. CONFIG_BOOTP_SERVERIP - TFTP server will be the serverip
  1031. environment variable, not the BOOTP server.
  1032. CONFIG_BOOTP_MAY_FAIL - If the DHCP server is not found
  1033. after the configured retry count, the call will fail
  1034. instead of starting over. This can be used to fail over
  1035. to Link-local IP address configuration if the DHCP server
  1036. is not available.
  1037. CONFIG_BOOTP_DHCP_REQUEST_DELAY
  1038. A 32bit value in microseconds for a delay between
  1039. receiving a "DHCP Offer" and sending the "DHCP Request".
  1040. This fixes a problem with certain DHCP servers that don't
  1041. respond 100% of the time to a "DHCP request". E.g. On an
  1042. AT91RM9200 processor running at 180MHz, this delay needed
  1043. to be *at least* 15,000 usec before a Windows Server 2003
  1044. DHCP server would reply 100% of the time. I recommend at
  1045. least 50,000 usec to be safe. The alternative is to hope
  1046. that one of the retries will be successful but note that
  1047. the DHCP timeout and retry process takes a longer than
  1048. this delay.
  1049. - Link-local IP address negotiation:
  1050. Negotiate with other link-local clients on the local network
  1051. for an address that doesn't require explicit configuration.
  1052. This is especially useful if a DHCP server cannot be guaranteed
  1053. to exist in all environments that the device must operate.
  1054. See doc/README.link-local for more information.
  1055. - MAC address from environment variables
  1056. FDT_SEQ_MACADDR_FROM_ENV
  1057. Fix-up device tree with MAC addresses fetched sequentially from
  1058. environment variables. This config work on assumption that
  1059. non-usable ethernet node of device-tree are either not present
  1060. or their status has been marked as "disabled".
  1061. - CDP Options:
  1062. CONFIG_CDP_DEVICE_ID
  1063. The device id used in CDP trigger frames.
  1064. CONFIG_CDP_DEVICE_ID_PREFIX
  1065. A two character string which is prefixed to the MAC address
  1066. of the device.
  1067. CONFIG_CDP_PORT_ID
  1068. A printf format string which contains the ascii name of
  1069. the port. Normally is set to "eth%d" which sets
  1070. eth0 for the first Ethernet, eth1 for the second etc.
  1071. CONFIG_CDP_CAPABILITIES
  1072. A 32bit integer which indicates the device capabilities;
  1073. 0x00000010 for a normal host which does not forwards.
  1074. CONFIG_CDP_VERSION
  1075. An ascii string containing the version of the software.
  1076. CONFIG_CDP_PLATFORM
  1077. An ascii string containing the name of the platform.
  1078. CONFIG_CDP_TRIGGER
  1079. A 32bit integer sent on the trigger.
  1080. CONFIG_CDP_POWER_CONSUMPTION
  1081. A 16bit integer containing the power consumption of the
  1082. device in .1 of milliwatts.
  1083. CONFIG_CDP_APPLIANCE_VLAN_TYPE
  1084. A byte containing the id of the VLAN.
  1085. - Status LED: CONFIG_LED_STATUS
  1086. Several configurations allow to display the current
  1087. status using a LED. For instance, the LED will blink
  1088. fast while running U-Boot code, stop blinking as
  1089. soon as a reply to a BOOTP request was received, and
  1090. start blinking slow once the Linux kernel is running
  1091. (supported by a status LED driver in the Linux
  1092. kernel). Defining CONFIG_LED_STATUS enables this
  1093. feature in U-Boot.
  1094. Additional options:
  1095. CONFIG_LED_STATUS_GPIO
  1096. The status LED can be connected to a GPIO pin.
  1097. In such cases, the gpio_led driver can be used as a
  1098. status LED backend implementation. Define CONFIG_LED_STATUS_GPIO
  1099. to include the gpio_led driver in the U-Boot binary.
  1100. CONFIG_GPIO_LED_INVERTED_TABLE
  1101. Some GPIO connected LEDs may have inverted polarity in which
  1102. case the GPIO high value corresponds to LED off state and
  1103. GPIO low value corresponds to LED on state.
  1104. In such cases CONFIG_GPIO_LED_INVERTED_TABLE may be defined
  1105. with a list of GPIO LEDs that have inverted polarity.
  1106. - I2C Support: CONFIG_SYS_I2C
  1107. This enable the NEW i2c subsystem, and will allow you to use
  1108. i2c commands at the u-boot command line (as long as you set
  1109. CONFIG_SYS_I2C_SOFT_SPEED and CONFIG_SYS_I2C_SOFT_SLAVE
  1110. for defining speed and slave address
  1111. - activate second bus with I2C_SOFT_DECLARATIONS2 define
  1112. CONFIG_SYS_I2C_SOFT_SPEED_2 and CONFIG_SYS_I2C_SOFT_SLAVE_2
  1113. for defining speed and slave address
  1114. - activate third bus with I2C_SOFT_DECLARATIONS3 define
  1115. CONFIG_SYS_I2C_SOFT_SPEED_3 and CONFIG_SYS_I2C_SOFT_SLAVE_3
  1116. for defining speed and slave address
  1117. - activate fourth bus with I2C_SOFT_DECLARATIONS4 define
  1118. CONFIG_SYS_I2C_SOFT_SPEED_4 and CONFIG_SYS_I2C_SOFT_SLAVE_4
  1119. for defining speed and slave address
  1120. - drivers/i2c/fsl_i2c.c:
  1121. - activate i2c driver with CONFIG_SYS_I2C_FSL
  1122. define CONFIG_SYS_FSL_I2C_OFFSET for setting the register
  1123. offset CONFIG_SYS_FSL_I2C_SPEED for the i2c speed and
  1124. CONFIG_SYS_FSL_I2C_SLAVE for the slave addr of the first
  1125. bus.
  1126. - If your board supports a second fsl i2c bus, define
  1127. CONFIG_SYS_FSL_I2C2_OFFSET for the register offset
  1128. CONFIG_SYS_FSL_I2C2_SPEED for the speed and
  1129. CONFIG_SYS_FSL_I2C2_SLAVE for the slave address of the
  1130. second bus.
  1131. - drivers/i2c/tegra_i2c.c:
  1132. - activate this driver with CONFIG_SYS_I2C_TEGRA
  1133. - This driver adds 4 i2c buses with a fix speed from
  1134. 100000 and the slave addr 0!
  1135. - drivers/i2c/ppc4xx_i2c.c
  1136. - activate this driver with CONFIG_SYS_I2C_PPC4XX
  1137. - CONFIG_SYS_I2C_PPC4XX_CH0 activate hardware channel 0
  1138. - CONFIG_SYS_I2C_PPC4XX_CH1 activate hardware channel 1
  1139. - drivers/i2c/i2c_mxc.c
  1140. - activate this driver with CONFIG_SYS_I2C_MXC
  1141. - enable bus 1 with CONFIG_SYS_I2C_MXC_I2C1
  1142. - enable bus 2 with CONFIG_SYS_I2C_MXC_I2C2
  1143. - enable bus 3 with CONFIG_SYS_I2C_MXC_I2C3
  1144. - enable bus 4 with CONFIG_SYS_I2C_MXC_I2C4
  1145. - define speed for bus 1 with CONFIG_SYS_MXC_I2C1_SPEED
  1146. - define slave for bus 1 with CONFIG_SYS_MXC_I2C1_SLAVE
  1147. - define speed for bus 2 with CONFIG_SYS_MXC_I2C2_SPEED
  1148. - define slave for bus 2 with CONFIG_SYS_MXC_I2C2_SLAVE
  1149. - define speed for bus 3 with CONFIG_SYS_MXC_I2C3_SPEED
  1150. - define slave for bus 3 with CONFIG_SYS_MXC_I2C3_SLAVE
  1151. - define speed for bus 4 with CONFIG_SYS_MXC_I2C4_SPEED
  1152. - define slave for bus 4 with CONFIG_SYS_MXC_I2C4_SLAVE
  1153. If those defines are not set, default value is 100000
  1154. for speed, and 0 for slave.
  1155. - drivers/i2c/rcar_i2c.c:
  1156. - activate this driver with CONFIG_SYS_I2C_RCAR
  1157. - This driver adds 4 i2c buses
  1158. - drivers/i2c/sh_i2c.c:
  1159. - activate this driver with CONFIG_SYS_I2C_SH
  1160. - This driver adds from 2 to 5 i2c buses
  1161. - CONFIG_SYS_I2C_SH_BASE0 for setting the register channel 0
  1162. - CONFIG_SYS_I2C_SH_SPEED0 for for the speed channel 0
  1163. - CONFIG_SYS_I2C_SH_BASE1 for setting the register channel 1
  1164. - CONFIG_SYS_I2C_SH_SPEED1 for for the speed channel 1
  1165. - CONFIG_SYS_I2C_SH_BASE2 for setting the register channel 2
  1166. - CONFIG_SYS_I2C_SH_SPEED2 for for the speed channel 2
  1167. - CONFIG_SYS_I2C_SH_BASE3 for setting the register channel 3
  1168. - CONFIG_SYS_I2C_SH_SPEED3 for for the speed channel 3
  1169. - CONFIG_SYS_I2C_SH_BASE4 for setting the register channel 4
  1170. - CONFIG_SYS_I2C_SH_SPEED4 for for the speed channel 4
  1171. - CONFIG_SYS_I2C_SH_NUM_CONTROLLERS for number of i2c buses
  1172. - drivers/i2c/omap24xx_i2c.c
  1173. - activate this driver with CONFIG_SYS_I2C_OMAP24XX
  1174. - CONFIG_SYS_OMAP24_I2C_SPEED speed channel 0
  1175. - CONFIG_SYS_OMAP24_I2C_SLAVE slave addr channel 0
  1176. - CONFIG_SYS_OMAP24_I2C_SPEED1 speed channel 1
  1177. - CONFIG_SYS_OMAP24_I2C_SLAVE1 slave addr channel 1
  1178. - CONFIG_SYS_OMAP24_I2C_SPEED2 speed channel 2
  1179. - CONFIG_SYS_OMAP24_I2C_SLAVE2 slave addr channel 2
  1180. - CONFIG_SYS_OMAP24_I2C_SPEED3 speed channel 3
  1181. - CONFIG_SYS_OMAP24_I2C_SLAVE3 slave addr channel 3
  1182. - CONFIG_SYS_OMAP24_I2C_SPEED4 speed channel 4
  1183. - CONFIG_SYS_OMAP24_I2C_SLAVE4 slave addr channel 4
  1184. - drivers/i2c/s3c24x0_i2c.c:
  1185. - activate this driver with CONFIG_SYS_I2C_S3C24X0
  1186. - This driver adds i2c buses (11 for Exynos5250, Exynos5420
  1187. 9 i2c buses for Exynos4 and 1 for S3C24X0 SoCs from Samsung)
  1188. with a fix speed from 100000 and the slave addr 0!
  1189. - drivers/i2c/ihs_i2c.c
  1190. - activate this driver with CONFIG_SYS_I2C_IHS
  1191. - CONFIG_SYS_I2C_IHS_CH0 activate hardware channel 0
  1192. - CONFIG_SYS_I2C_IHS_SPEED_0 speed channel 0
  1193. - CONFIG_SYS_I2C_IHS_SLAVE_0 slave addr channel 0
  1194. - CONFIG_SYS_I2C_IHS_CH1 activate hardware channel 1
  1195. - CONFIG_SYS_I2C_IHS_SPEED_1 speed channel 1
  1196. - CONFIG_SYS_I2C_IHS_SLAVE_1 slave addr channel 1
  1197. - CONFIG_SYS_I2C_IHS_CH2 activate hardware channel 2
  1198. - CONFIG_SYS_I2C_IHS_SPEED_2 speed channel 2
  1199. - CONFIG_SYS_I2C_IHS_SLAVE_2 slave addr channel 2
  1200. - CONFIG_SYS_I2C_IHS_CH3 activate hardware channel 3
  1201. - CONFIG_SYS_I2C_IHS_SPEED_3 speed channel 3
  1202. - CONFIG_SYS_I2C_IHS_SLAVE_3 slave addr channel 3
  1203. - activate dual channel with CONFIG_SYS_I2C_IHS_DUAL
  1204. - CONFIG_SYS_I2C_IHS_SPEED_0_1 speed channel 0_1
  1205. - CONFIG_SYS_I2C_IHS_SLAVE_0_1 slave addr channel 0_1
  1206. - CONFIG_SYS_I2C_IHS_SPEED_1_1 speed channel 1_1
  1207. - CONFIG_SYS_I2C_IHS_SLAVE_1_1 slave addr channel 1_1
  1208. - CONFIG_SYS_I2C_IHS_SPEED_2_1 speed channel 2_1
  1209. - CONFIG_SYS_I2C_IHS_SLAVE_2_1 slave addr channel 2_1
  1210. - CONFIG_SYS_I2C_IHS_SPEED_3_1 speed channel 3_1
  1211. - CONFIG_SYS_I2C_IHS_SLAVE_3_1 slave addr channel 3_1
  1212. additional defines:
  1213. CONFIG_SYS_NUM_I2C_BUSES
  1214. Hold the number of i2c buses you want to use.
  1215. CONFIG_SYS_I2C_DIRECT_BUS
  1216. define this, if you don't use i2c muxes on your hardware.
  1217. if CONFIG_SYS_I2C_MAX_HOPS is not defined or == 0 you can
  1218. omit this define.
  1219. CONFIG_SYS_I2C_MAX_HOPS
  1220. define how many muxes are maximal consecutively connected
  1221. on one i2c bus. If you not use i2c muxes, omit this
  1222. define.
  1223. CONFIG_SYS_I2C_BUSES
  1224. hold a list of buses you want to use, only used if
  1225. CONFIG_SYS_I2C_DIRECT_BUS is not defined, for example
  1226. a board with CONFIG_SYS_I2C_MAX_HOPS = 1 and
  1227. CONFIG_SYS_NUM_I2C_BUSES = 9:
  1228. CONFIG_SYS_I2C_BUSES {{0, {I2C_NULL_HOP}}, \
  1229. {0, {{I2C_MUX_PCA9547, 0x70, 1}}}, \
  1230. {0, {{I2C_MUX_PCA9547, 0x70, 2}}}, \
  1231. {0, {{I2C_MUX_PCA9547, 0x70, 3}}}, \
  1232. {0, {{I2C_MUX_PCA9547, 0x70, 4}}}, \
  1233. {0, {{I2C_MUX_PCA9547, 0x70, 5}}}, \
  1234. {1, {I2C_NULL_HOP}}, \
  1235. {1, {{I2C_MUX_PCA9544, 0x72, 1}}}, \
  1236. {1, {{I2C_MUX_PCA9544, 0x72, 2}}}, \
  1237. }
  1238. which defines
  1239. bus 0 on adapter 0 without a mux
  1240. bus 1 on adapter 0 with a PCA9547 on address 0x70 port 1
  1241. bus 2 on adapter 0 with a PCA9547 on address 0x70 port 2
  1242. bus 3 on adapter 0 with a PCA9547 on address 0x70 port 3
  1243. bus 4 on adapter 0 with a PCA9547 on address 0x70 port 4
  1244. bus 5 on adapter 0 with a PCA9547 on address 0x70 port 5
  1245. bus 6 on adapter 1 without a mux
  1246. bus 7 on adapter 1 with a PCA9544 on address 0x72 port 1
  1247. bus 8 on adapter 1 with a PCA9544 on address 0x72 port 2
  1248. If you do not have i2c muxes on your board, omit this define.
  1249. - Legacy I2C Support:
  1250. If you use the software i2c interface (CONFIG_SYS_I2C_SOFT)
  1251. then the following macros need to be defined (examples are
  1252. from include/configs/lwmon.h):
  1253. I2C_INIT
  1254. (Optional). Any commands necessary to enable the I2C
  1255. controller or configure ports.
  1256. eg: #define I2C_INIT (immr->im_cpm.cp_pbdir |= PB_SCL)
  1257. I2C_ACTIVE
  1258. The code necessary to make the I2C data line active
  1259. (driven). If the data line is open collector, this
  1260. define can be null.
  1261. eg: #define I2C_ACTIVE (immr->im_cpm.cp_pbdir |= PB_SDA)
  1262. I2C_TRISTATE
  1263. The code necessary to make the I2C data line tri-stated
  1264. (inactive). If the data line is open collector, this
  1265. define can be null.
  1266. eg: #define I2C_TRISTATE (immr->im_cpm.cp_pbdir &= ~PB_SDA)
  1267. I2C_READ
  1268. Code that returns true if the I2C data line is high,
  1269. false if it is low.
  1270. eg: #define I2C_READ ((immr->im_cpm.cp_pbdat & PB_SDA) != 0)
  1271. I2C_SDA(bit)
  1272. If <bit> is true, sets the I2C data line high. If it
  1273. is false, it clears it (low).
  1274. eg: #define I2C_SDA(bit) \
  1275. if(bit) immr->im_cpm.cp_pbdat |= PB_SDA; \
  1276. else immr->im_cpm.cp_pbdat &= ~PB_SDA
  1277. I2C_SCL(bit)
  1278. If <bit> is true, sets the I2C clock line high. If it
  1279. is false, it clears it (low).
  1280. eg: #define I2C_SCL(bit) \
  1281. if(bit) immr->im_cpm.cp_pbdat |= PB_SCL; \
  1282. else immr->im_cpm.cp_pbdat &= ~PB_SCL
  1283. I2C_DELAY
  1284. This delay is invoked four times per clock cycle so this
  1285. controls the rate of data transfer. The data rate thus
  1286. is 1 / (I2C_DELAY * 4). Often defined to be something
  1287. like:
  1288. #define I2C_DELAY udelay(2)
  1289. CONFIG_SOFT_I2C_GPIO_SCL / CONFIG_SOFT_I2C_GPIO_SDA
  1290. If your arch supports the generic GPIO framework (asm/gpio.h),
  1291. then you may alternatively define the two GPIOs that are to be
  1292. used as SCL / SDA. Any of the previous I2C_xxx macros will
  1293. have GPIO-based defaults assigned to them as appropriate.
  1294. You should define these to the GPIO value as given directly to
  1295. the generic GPIO functions.
  1296. CONFIG_SYS_I2C_INIT_BOARD
  1297. When a board is reset during an i2c bus transfer
  1298. chips might think that the current transfer is still
  1299. in progress. On some boards it is possible to access
  1300. the i2c SCLK line directly, either by using the
  1301. processor pin as a GPIO or by having a second pin
  1302. connected to the bus. If this option is defined a
  1303. custom i2c_init_board() routine in boards/xxx/board.c
  1304. is run early in the boot sequence.
  1305. CONFIG_I2C_MULTI_BUS
  1306. This option allows the use of multiple I2C buses, each of which
  1307. must have a controller. At any point in time, only one bus is
  1308. active. To switch to a different bus, use the 'i2c dev' command.
  1309. Note that bus numbering is zero-based.
  1310. CONFIG_SYS_I2C_NOPROBES
  1311. This option specifies a list of I2C devices that will be skipped
  1312. when the 'i2c probe' command is issued. If CONFIG_I2C_MULTI_BUS
  1313. is set, specify a list of bus-device pairs. Otherwise, specify
  1314. a 1D array of device addresses
  1315. e.g.
  1316. #undef CONFIG_I2C_MULTI_BUS
  1317. #define CONFIG_SYS_I2C_NOPROBES {0x50,0x68}
  1318. will skip addresses 0x50 and 0x68 on a board with one I2C bus
  1319. #define CONFIG_I2C_MULTI_BUS
  1320. #define CONFIG_SYS_I2C_NOPROBES {{0,0x50},{0,0x68},{1,0x54}}
  1321. will skip addresses 0x50 and 0x68 on bus 0 and address 0x54 on bus 1
  1322. CONFIG_SYS_SPD_BUS_NUM
  1323. If defined, then this indicates the I2C bus number for DDR SPD.
  1324. If not defined, then U-Boot assumes that SPD is on I2C bus 0.
  1325. CONFIG_SYS_RTC_BUS_NUM
  1326. If defined, then this indicates the I2C bus number for the RTC.
  1327. If not defined, then U-Boot assumes that RTC is on I2C bus 0.
  1328. CONFIG_SOFT_I2C_READ_REPEATED_START
  1329. defining this will force the i2c_read() function in
  1330. the soft_i2c driver to perform an I2C repeated start
  1331. between writing the address pointer and reading the
  1332. data. If this define is omitted the default behaviour
  1333. of doing a stop-start sequence will be used. Most I2C
  1334. devices can use either method, but some require one or
  1335. the other.
  1336. - SPI Support: CONFIG_SPI
  1337. Enables SPI driver (so far only tested with
  1338. SPI EEPROM, also an instance works with Crystal A/D and
  1339. D/As on the SACSng board)
  1340. CONFIG_SOFT_SPI
  1341. Enables a software (bit-bang) SPI driver rather than
  1342. using hardware support. This is a general purpose
  1343. driver that only requires three general I/O port pins
  1344. (two outputs, one input) to function. If this is
  1345. defined, the board configuration must define several
  1346. SPI configuration items (port pins to use, etc). For
  1347. an example, see include/configs/sacsng.h.
  1348. CONFIG_SYS_SPI_MXC_WAIT
  1349. Timeout for waiting until spi transfer completed.
  1350. default: (CONFIG_SYS_HZ/100) /* 10 ms */
  1351. - FPGA Support: CONFIG_FPGA
  1352. Enables FPGA subsystem.
  1353. CONFIG_FPGA_<vendor>
  1354. Enables support for specific chip vendors.
  1355. (ALTERA, XILINX)
  1356. CONFIG_FPGA_<family>
  1357. Enables support for FPGA family.
  1358. (SPARTAN2, SPARTAN3, VIRTEX2, CYCLONE2, ACEX1K, ACEX)
  1359. CONFIG_FPGA_COUNT
  1360. Specify the number of FPGA devices to support.
  1361. CONFIG_SYS_FPGA_PROG_FEEDBACK
  1362. Enable printing of hash marks during FPGA configuration.
  1363. CONFIG_SYS_FPGA_CHECK_BUSY
  1364. Enable checks on FPGA configuration interface busy
  1365. status by the configuration function. This option
  1366. will require a board or device specific function to
  1367. be written.
  1368. CONFIG_FPGA_DELAY
  1369. If defined, a function that provides delays in the FPGA
  1370. configuration driver.
  1371. CONFIG_SYS_FPGA_CHECK_CTRLC
  1372. Allow Control-C to interrupt FPGA configuration
  1373. CONFIG_SYS_FPGA_CHECK_ERROR
  1374. Check for configuration errors during FPGA bitfile
  1375. loading. For example, abort during Virtex II
  1376. configuration if the INIT_B line goes low (which
  1377. indicated a CRC error).
  1378. CONFIG_SYS_FPGA_WAIT_INIT
  1379. Maximum time to wait for the INIT_B line to de-assert
  1380. after PROB_B has been de-asserted during a Virtex II
  1381. FPGA configuration sequence. The default time is 500
  1382. ms.
  1383. CONFIG_SYS_FPGA_WAIT_BUSY
  1384. Maximum time to wait for BUSY to de-assert during
  1385. Virtex II FPGA configuration. The default is 5 ms.
  1386. CONFIG_SYS_FPGA_WAIT_CONFIG
  1387. Time to wait after FPGA configuration. The default is
  1388. 200 ms.
  1389. - Configuration Management:
  1390. CONFIG_IDENT_STRING
  1391. If defined, this string will be added to the U-Boot
  1392. version information (U_BOOT_VERSION)
  1393. - Vendor Parameter Protection:
  1394. U-Boot considers the values of the environment
  1395. variables "serial#" (Board Serial Number) and
  1396. "ethaddr" (Ethernet Address) to be parameters that
  1397. are set once by the board vendor / manufacturer, and
  1398. protects these variables from casual modification by
  1399. the user. Once set, these variables are read-only,
  1400. and write or delete attempts are rejected. You can
  1401. change this behaviour:
  1402. If CONFIG_ENV_OVERWRITE is #defined in your config
  1403. file, the write protection for vendor parameters is
  1404. completely disabled. Anybody can change or delete
  1405. these parameters.
  1406. Alternatively, if you define _both_ an ethaddr in the
  1407. default env _and_ CONFIG_OVERWRITE_ETHADDR_ONCE, a default
  1408. Ethernet address is installed in the environment,
  1409. which can be changed exactly ONCE by the user. [The
  1410. serial# is unaffected by this, i. e. it remains
  1411. read-only.]
  1412. The same can be accomplished in a more flexible way
  1413. for any variable by configuring the type of access
  1414. to allow for those variables in the ".flags" variable
  1415. or define CONFIG_ENV_FLAGS_LIST_STATIC.
  1416. - Protected RAM:
  1417. CONFIG_PRAM
  1418. Define this variable to enable the reservation of
  1419. "protected RAM", i. e. RAM which is not overwritten
  1420. by U-Boot. Define CONFIG_PRAM to hold the number of
  1421. kB you want to reserve for pRAM. You can overwrite
  1422. this default value by defining an environment
  1423. variable "pram" to the number of kB you want to
  1424. reserve. Note that the board info structure will
  1425. still show the full amount of RAM. If pRAM is
  1426. reserved, a new environment variable "mem" will
  1427. automatically be defined to hold the amount of
  1428. remaining RAM in a form that can be passed as boot
  1429. argument to Linux, for instance like that:
  1430. setenv bootargs ... mem=\${mem}
  1431. saveenv
  1432. This way you can tell Linux not to use this memory,
  1433. either, which results in a memory region that will
  1434. not be affected by reboots.
  1435. *WARNING* If your board configuration uses automatic
  1436. detection of the RAM size, you must make sure that
  1437. this memory test is non-destructive. So far, the
  1438. following board configurations are known to be
  1439. "pRAM-clean":
  1440. IVMS8, IVML24, SPD8xx,
  1441. HERMES, IP860, RPXlite, LWMON,
  1442. FLAGADM
  1443. - Access to physical memory region (> 4GB)
  1444. Some basic support is provided for operations on memory not
  1445. normally accessible to U-Boot - e.g. some architectures
  1446. support access to more than 4GB of memory on 32-bit
  1447. machines using physical address extension or similar.
  1448. Define CONFIG_PHYSMEM to access this basic support, which
  1449. currently only supports clearing the memory.
  1450. - Error Recovery:
  1451. CONFIG_NET_RETRY_COUNT
  1452. This variable defines the number of retries for
  1453. network operations like ARP, RARP, TFTP, or BOOTP
  1454. before giving up the operation. If not defined, a
  1455. default value of 5 is used.
  1456. CONFIG_ARP_TIMEOUT
  1457. Timeout waiting for an ARP reply in milliseconds.
  1458. CONFIG_NFS_TIMEOUT
  1459. Timeout in milliseconds used in NFS protocol.
  1460. If you encounter "ERROR: Cannot umount" in nfs command,
  1461. try longer timeout such as
  1462. #define CONFIG_NFS_TIMEOUT 10000UL
  1463. - Command Interpreter:
  1464. CONFIG_SYS_PROMPT_HUSH_PS2
  1465. This defines the secondary prompt string, which is
  1466. printed when the command interpreter needs more input
  1467. to complete a command. Usually "> ".
  1468. Note:
  1469. In the current implementation, the local variables
  1470. space and global environment variables space are
  1471. separated. Local variables are those you define by
  1472. simply typing `name=value'. To access a local
  1473. variable later on, you have write `$name' or
  1474. `${name}'; to execute the contents of a variable
  1475. directly type `$name' at the command prompt.
  1476. Global environment variables are those you use
  1477. setenv/printenv to work with. To run a command stored
  1478. in such a variable, you need to use the run command,
  1479. and you must not use the '$' sign to access them.
  1480. To store commands and special characters in a
  1481. variable, please use double quotation marks
  1482. surrounding the whole text of the variable, instead
  1483. of the backslashes before semicolons and special
  1484. symbols.
  1485. - Command Line Editing and History:
  1486. CONFIG_CMDLINE_PS_SUPPORT
  1487. Enable support for changing the command prompt string
  1488. at run-time. Only static string is supported so far.
  1489. The string is obtained from environment variables PS1
  1490. and PS2.
  1491. - Default Environment:
  1492. CONFIG_EXTRA_ENV_SETTINGS
  1493. Define this to contain any number of null terminated
  1494. strings (variable = value pairs) that will be part of
  1495. the default environment compiled into the boot image.
  1496. For example, place something like this in your
  1497. board's config file:
  1498. #define CONFIG_EXTRA_ENV_SETTINGS \
  1499. "myvar1=value1\0" \
  1500. "myvar2=value2\0"
  1501. Warning: This method is based on knowledge about the
  1502. internal format how the environment is stored by the
  1503. U-Boot code. This is NOT an official, exported
  1504. interface! Although it is unlikely that this format
  1505. will change soon, there is no guarantee either.
  1506. You better know what you are doing here.
  1507. Note: overly (ab)use of the default environment is
  1508. discouraged. Make sure to check other ways to preset
  1509. the environment like the "source" command or the
  1510. boot command first.
  1511. CONFIG_DELAY_ENVIRONMENT
  1512. Normally the environment is loaded when the board is
  1513. initialised so that it is available to U-Boot. This inhibits
  1514. that so that the environment is not available until
  1515. explicitly loaded later by U-Boot code. With CONFIG_OF_CONTROL
  1516. this is instead controlled by the value of
  1517. /config/load-environment.
  1518. - TFTP Fixed UDP Port:
  1519. CONFIG_TFTP_PORT
  1520. If this is defined, the environment variable tftpsrcp
  1521. is used to supply the TFTP UDP source port value.
  1522. If tftpsrcp isn't defined, the normal pseudo-random port
  1523. number generator is used.
  1524. Also, the environment variable tftpdstp is used to supply
  1525. the TFTP UDP destination port value. If tftpdstp isn't
  1526. defined, the normal port 69 is used.
  1527. The purpose for tftpsrcp is to allow a TFTP server to
  1528. blindly start the TFTP transfer using the pre-configured
  1529. target IP address and UDP port. This has the effect of
  1530. "punching through" the (Windows XP) firewall, allowing
  1531. the remainder of the TFTP transfer to proceed normally.
  1532. A better solution is to properly configure the firewall,
  1533. but sometimes that is not allowed.
  1534. CONFIG_STANDALONE_LOAD_ADDR
  1535. This option defines a board specific value for the
  1536. address where standalone program gets loaded, thus
  1537. overwriting the architecture dependent default
  1538. settings.
  1539. - Frame Buffer Address:
  1540. CONFIG_FB_ADDR
  1541. Define CONFIG_FB_ADDR if you want to use specific
  1542. address for frame buffer. This is typically the case
  1543. when using a graphics controller has separate video
  1544. memory. U-Boot will then place the frame buffer at
  1545. the given address instead of dynamically reserving it
  1546. in system RAM by calling lcd_setmem(), which grabs
  1547. the memory for the frame buffer depending on the
  1548. configured panel size.
  1549. Please see board_init_f function.
  1550. - Automatic software updates via TFTP server
  1551. CONFIG_UPDATE_TFTP
  1552. CONFIG_UPDATE_TFTP_CNT_MAX
  1553. CONFIG_UPDATE_TFTP_MSEC_MAX
  1554. These options enable and control the auto-update feature;
  1555. for a more detailed description refer to doc/README.update.
  1556. - MTD Support (mtdparts command, UBI support)
  1557. CONFIG_MTD_UBI_WL_THRESHOLD
  1558. This parameter defines the maximum difference between the highest
  1559. erase counter value and the lowest erase counter value of eraseblocks
  1560. of UBI devices. When this threshold is exceeded, UBI starts performing
  1561. wear leveling by means of moving data from eraseblock with low erase
  1562. counter to eraseblocks with high erase counter.
  1563. The default value should be OK for SLC NAND flashes, NOR flashes and
  1564. other flashes which have eraseblock life-cycle 100000 or more.
  1565. However, in case of MLC NAND flashes which typically have eraseblock
  1566. life-cycle less than 10000, the threshold should be lessened (e.g.,
  1567. to 128 or 256, although it does not have to be power of 2).
  1568. default: 4096
  1569. CONFIG_MTD_UBI_BEB_LIMIT
  1570. This option specifies the maximum bad physical eraseblocks UBI
  1571. expects on the MTD device (per 1024 eraseblocks). If the
  1572. underlying flash does not admit of bad eraseblocks (e.g. NOR
  1573. flash), this value is ignored.
  1574. NAND datasheets often specify the minimum and maximum NVM
  1575. (Number of Valid Blocks) for the flashes' endurance lifetime.
  1576. The maximum expected bad eraseblocks per 1024 eraseblocks
  1577. then can be calculated as "1024 * (1 - MinNVB / MaxNVB)",
  1578. which gives 20 for most NANDs (MaxNVB is basically the total
  1579. count of eraseblocks on the chip).
  1580. To put it differently, if this value is 20, UBI will try to
  1581. reserve about 1.9% of physical eraseblocks for bad blocks
  1582. handling. And that will be 1.9% of eraseblocks on the entire
  1583. NAND chip, not just the MTD partition UBI attaches. This means
  1584. that if you have, say, a NAND flash chip admits maximum 40 bad
  1585. eraseblocks, and it is split on two MTD partitions of the same
  1586. size, UBI will reserve 40 eraseblocks when attaching a
  1587. partition.
  1588. default: 20
  1589. CONFIG_MTD_UBI_FASTMAP
  1590. Fastmap is a mechanism which allows attaching an UBI device
  1591. in nearly constant time. Instead of scanning the whole MTD device it
  1592. only has to locate a checkpoint (called fastmap) on the device.
  1593. The on-flash fastmap contains all information needed to attach
  1594. the device. Using fastmap makes only sense on large devices where
  1595. attaching by scanning takes long. UBI will not automatically install
  1596. a fastmap on old images, but you can set the UBI parameter
  1597. CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT to 1 if you want so. Please note
  1598. that fastmap-enabled images are still usable with UBI implementations
  1599. without fastmap support. On typical flash devices the whole fastmap
  1600. fits into one PEB. UBI will reserve PEBs to hold two fastmaps.
  1601. CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT
  1602. Set this parameter to enable fastmap automatically on images
  1603. without a fastmap.
  1604. default: 0
  1605. CONFIG_MTD_UBI_FM_DEBUG
  1606. Enable UBI fastmap debug
  1607. default: 0
  1608. - SPL framework
  1609. CONFIG_SPL
  1610. Enable building of SPL globally.
  1611. CONFIG_SPL_LDSCRIPT
  1612. LDSCRIPT for linking the SPL binary.
  1613. CONFIG_SPL_MAX_FOOTPRINT
  1614. Maximum size in memory allocated to the SPL, BSS included.
  1615. When defined, the linker checks that the actual memory
  1616. used by SPL from _start to __bss_end does not exceed it.
  1617. CONFIG_SPL_MAX_FOOTPRINT and CONFIG_SPL_BSS_MAX_SIZE
  1618. must not be both defined at the same time.
  1619. CONFIG_SPL_MAX_SIZE
  1620. Maximum size of the SPL image (text, data, rodata, and
  1621. linker lists sections), BSS excluded.
  1622. When defined, the linker checks that the actual size does
  1623. not exceed it.
  1624. CONFIG_SPL_RELOC_TEXT_BASE
  1625. Address to relocate to. If unspecified, this is equal to
  1626. CONFIG_SPL_TEXT_BASE (i.e. no relocation is done).
  1627. CONFIG_SPL_BSS_START_ADDR
  1628. Link address for the BSS within the SPL binary.
  1629. CONFIG_SPL_BSS_MAX_SIZE
  1630. Maximum size in memory allocated to the SPL BSS.
  1631. When defined, the linker checks that the actual memory used
  1632. by SPL from __bss_start to __bss_end does not exceed it.
  1633. CONFIG_SPL_MAX_FOOTPRINT and CONFIG_SPL_BSS_MAX_SIZE
  1634. must not be both defined at the same time.
  1635. CONFIG_SPL_STACK
  1636. Adress of the start of the stack SPL will use
  1637. CONFIG_SPL_PANIC_ON_RAW_IMAGE
  1638. When defined, SPL will panic() if the image it has
  1639. loaded does not have a signature.
  1640. Defining this is useful when code which loads images
  1641. in SPL cannot guarantee that absolutely all read errors
  1642. will be caught.
  1643. An example is the LPC32XX MLC NAND driver, which will
  1644. consider that a completely unreadable NAND block is bad,
  1645. and thus should be skipped silently.
  1646. CONFIG_SPL_RELOC_STACK
  1647. Adress of the start of the stack SPL will use after
  1648. relocation. If unspecified, this is equal to
  1649. CONFIG_SPL_STACK.
  1650. CONFIG_SYS_SPL_MALLOC_START
  1651. Starting address of the malloc pool used in SPL.
  1652. When this option is set the full malloc is used in SPL and
  1653. it is set up by spl_init() and before that, the simple malloc()
  1654. can be used if CONFIG_SYS_MALLOC_F is defined.
  1655. CONFIG_SYS_SPL_MALLOC_SIZE
  1656. The size of the malloc pool used in SPL.
  1657. CONFIG_SPL_OS_BOOT
  1658. Enable booting directly to an OS from SPL.
  1659. See also: doc/README.falcon
  1660. CONFIG_SPL_DISPLAY_PRINT
  1661. For ARM, enable an optional function to print more information
  1662. about the running system.
  1663. CONFIG_SPL_INIT_MINIMAL
  1664. Arch init code should be built for a very small image
  1665. CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION
  1666. Partition on the MMC to load U-Boot from when the MMC is being
  1667. used in raw mode
  1668. CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR
  1669. Sector to load kernel uImage from when MMC is being
  1670. used in raw mode (for Falcon mode)
  1671. CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR,
  1672. CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS
  1673. Sector and number of sectors to load kernel argument
  1674. parameters from when MMC is being used in raw mode
  1675. (for falcon mode)
  1676. CONFIG_SPL_FS_LOAD_PAYLOAD_NAME
  1677. Filename to read to load U-Boot when reading from filesystem
  1678. CONFIG_SPL_FS_LOAD_KERNEL_NAME
  1679. Filename to read to load kernel uImage when reading
  1680. from filesystem (for Falcon mode)
  1681. CONFIG_SPL_FS_LOAD_ARGS_NAME
  1682. Filename to read to load kernel argument parameters
  1683. when reading from filesystem (for Falcon mode)
  1684. CONFIG_SPL_MPC83XX_WAIT_FOR_NAND
  1685. Set this for NAND SPL on PPC mpc83xx targets, so that
  1686. start.S waits for the rest of the SPL to load before
  1687. continuing (the hardware starts execution after just
  1688. loading the first page rather than the full 4K).
  1689. CONFIG_SPL_SKIP_RELOCATE
  1690. Avoid SPL relocation
  1691. CONFIG_SPL_NAND_IDENT
  1692. SPL uses the chip ID list to identify the NAND flash.
  1693. Requires CONFIG_SPL_NAND_BASE.
  1694. CONFIG_SPL_UBI
  1695. Support for a lightweight UBI (fastmap) scanner and
  1696. loader
  1697. CONFIG_SPL_NAND_RAW_ONLY
  1698. Support to boot only raw u-boot.bin images. Use this only
  1699. if you need to save space.
  1700. CONFIG_SPL_COMMON_INIT_DDR
  1701. Set for common ddr init with serial presence detect in
  1702. SPL binary.
  1703. CONFIG_SYS_NAND_5_ADDR_CYCLE, CONFIG_SYS_NAND_PAGE_COUNT,
  1704. CONFIG_SYS_NAND_PAGE_SIZE, CONFIG_SYS_NAND_OOBSIZE,
  1705. CONFIG_SYS_NAND_BLOCK_SIZE, CONFIG_SYS_NAND_BAD_BLOCK_POS,
  1706. CONFIG_SYS_NAND_ECCPOS, CONFIG_SYS_NAND_ECCSIZE,
  1707. CONFIG_SYS_NAND_ECCBYTES
  1708. Defines the size and behavior of the NAND that SPL uses
  1709. to read U-Boot
  1710. CONFIG_SYS_NAND_U_BOOT_OFFS
  1711. Location in NAND to read U-Boot from
  1712. CONFIG_SYS_NAND_U_BOOT_DST
  1713. Location in memory to load U-Boot to
  1714. CONFIG_SYS_NAND_U_BOOT_SIZE
  1715. Size of image to load
  1716. CONFIG_SYS_NAND_U_BOOT_START
  1717. Entry point in loaded image to jump to
  1718. CONFIG_SYS_NAND_HW_ECC_OOBFIRST
  1719. Define this if you need to first read the OOB and then the
  1720. data. This is used, for example, on davinci platforms.
  1721. CONFIG_SPL_RAM_DEVICE
  1722. Support for running image already present in ram, in SPL binary
  1723. CONFIG_SPL_PAD_TO
  1724. Image offset to which the SPL should be padded before appending
  1725. the SPL payload. By default, this is defined as
  1726. CONFIG_SPL_MAX_SIZE, or 0 if CONFIG_SPL_MAX_SIZE is undefined.
  1727. CONFIG_SPL_PAD_TO must be either 0, meaning to append the SPL
  1728. payload without any padding, or >= CONFIG_SPL_MAX_SIZE.
  1729. CONFIG_SPL_TARGET
  1730. Final target image containing SPL and payload. Some SPLs
  1731. use an arch-specific makefile fragment instead, for
  1732. example if more than one image needs to be produced.
  1733. CONFIG_SPL_FIT_PRINT
  1734. Printing information about a FIT image adds quite a bit of
  1735. code to SPL. So this is normally disabled in SPL. Use this
  1736. option to re-enable it. This will affect the output of the
  1737. bootm command when booting a FIT image.
  1738. - TPL framework
  1739. CONFIG_TPL
  1740. Enable building of TPL globally.
  1741. CONFIG_TPL_PAD_TO
  1742. Image offset to which the TPL should be padded before appending
  1743. the TPL payload. By default, this is defined as
  1744. CONFIG_SPL_MAX_SIZE, or 0 if CONFIG_SPL_MAX_SIZE is undefined.
  1745. CONFIG_SPL_PAD_TO must be either 0, meaning to append the SPL
  1746. payload without any padding, or >= CONFIG_SPL_MAX_SIZE.
  1747. - Interrupt support (PPC):
  1748. There are common interrupt_init() and timer_interrupt()
  1749. for all PPC archs. interrupt_init() calls interrupt_init_cpu()
  1750. for CPU specific initialization. interrupt_init_cpu()
  1751. should set decrementer_count to appropriate value. If
  1752. CPU resets decrementer automatically after interrupt
  1753. (ppc4xx) it should set decrementer_count to zero.
  1754. timer_interrupt() calls timer_interrupt_cpu() for CPU
  1755. specific handling. If board has watchdog / status_led
  1756. / other_activity_monitor it works automatically from
  1757. general timer_interrupt().
  1758. Board initialization settings:
  1759. ------------------------------
  1760. During Initialization u-boot calls a number of board specific functions
  1761. to allow the preparation of board specific prerequisites, e.g. pin setup
  1762. before drivers are initialized. To enable these callbacks the
  1763. following configuration macros have to be defined. Currently this is
  1764. architecture specific, so please check arch/your_architecture/lib/board.c
  1765. typically in board_init_f() and board_init_r().
  1766. - CONFIG_BOARD_EARLY_INIT_F: Call board_early_init_f()
  1767. - CONFIG_BOARD_EARLY_INIT_R: Call board_early_init_r()
  1768. - CONFIG_BOARD_LATE_INIT: Call board_late_init()
  1769. - CONFIG_BOARD_POSTCLK_INIT: Call board_postclk_init()
  1770. Configuration Settings:
  1771. -----------------------
  1772. - MEM_SUPPORT_64BIT_DATA: Defined automatically if compiled as 64-bit.
  1773. Optionally it can be defined to support 64-bit memory commands.
  1774. - CONFIG_SYS_LONGHELP: Defined when you want long help messages included;
  1775. undefine this when you're short of memory.
  1776. - CONFIG_SYS_HELP_CMD_WIDTH: Defined when you want to override the default
  1777. width of the commands listed in the 'help' command output.
  1778. - CONFIG_SYS_PROMPT: This is what U-Boot prints on the console to
  1779. prompt for user input.
  1780. - CONFIG_SYS_CBSIZE: Buffer size for input from the Console
  1781. - CONFIG_SYS_PBSIZE: Buffer size for Console output
  1782. - CONFIG_SYS_MAXARGS: max. Number of arguments accepted for monitor commands
  1783. - CONFIG_SYS_BARGSIZE: Buffer size for Boot Arguments which are passed to
  1784. the application (usually a Linux kernel) when it is
  1785. booted
  1786. - CONFIG_SYS_BAUDRATE_TABLE:
  1787. List of legal baudrate settings for this board.
  1788. - CONFIG_SYS_MEM_RESERVE_SECURE
  1789. Only implemented for ARMv8 for now.
  1790. If defined, the size of CONFIG_SYS_MEM_RESERVE_SECURE memory
  1791. is substracted from total RAM and won't be reported to OS.
  1792. This memory can be used as secure memory. A variable
  1793. gd->arch.secure_ram is used to track the location. In systems
  1794. the RAM base is not zero, or RAM is divided into banks,
  1795. this variable needs to be recalcuated to get the address.
  1796. - CONFIG_SYS_MEM_TOP_HIDE:
  1797. If CONFIG_SYS_MEM_TOP_HIDE is defined in the board config header,
  1798. this specified memory area will get subtracted from the top
  1799. (end) of RAM and won't get "touched" at all by U-Boot. By
  1800. fixing up gd->ram_size the Linux kernel should gets passed
  1801. the now "corrected" memory size and won't touch it either.
  1802. This should work for arch/ppc and arch/powerpc. Only Linux
  1803. board ports in arch/powerpc with bootwrapper support that
  1804. recalculate the memory size from the SDRAM controller setup
  1805. will have to get fixed in Linux additionally.
  1806. This option can be used as a workaround for the 440EPx/GRx
  1807. CHIP 11 errata where the last 256 bytes in SDRAM shouldn't
  1808. be touched.
  1809. WARNING: Please make sure that this value is a multiple of
  1810. the Linux page size (normally 4k). If this is not the case,
  1811. then the end address of the Linux memory will be located at a
  1812. non page size aligned address and this could cause major
  1813. problems.
  1814. - CONFIG_SYS_LOADS_BAUD_CHANGE:
  1815. Enable temporary baudrate change while serial download
  1816. - CONFIG_SYS_SDRAM_BASE:
  1817. Physical start address of SDRAM. _Must_ be 0 here.
  1818. - CONFIG_SYS_FLASH_BASE:
  1819. Physical start address of Flash memory.
  1820. - CONFIG_SYS_MONITOR_BASE:
  1821. Physical start address of boot monitor code (set by
  1822. make config files to be same as the text base address
  1823. (CONFIG_SYS_TEXT_BASE) used when linking) - same as
  1824. CONFIG_SYS_FLASH_BASE when booting from flash.
  1825. - CONFIG_SYS_MONITOR_LEN:
  1826. Size of memory reserved for monitor code, used to
  1827. determine _at_compile_time_ (!) if the environment is
  1828. embedded within the U-Boot image, or in a separate
  1829. flash sector.
  1830. - CONFIG_SYS_MALLOC_LEN:
  1831. Size of DRAM reserved for malloc() use.
  1832. - CONFIG_SYS_MALLOC_F_LEN
  1833. Size of the malloc() pool for use before relocation. If
  1834. this is defined, then a very simple malloc() implementation
  1835. will become available before relocation. The address is just
  1836. below the global data, and the stack is moved down to make
  1837. space.
  1838. This feature allocates regions with increasing addresses
  1839. within the region. calloc() is supported, but realloc()
  1840. is not available. free() is supported but does nothing.
  1841. The memory will be freed (or in fact just forgotten) when
  1842. U-Boot relocates itself.
  1843. - CONFIG_SYS_MALLOC_SIMPLE
  1844. Provides a simple and small malloc() and calloc() for those
  1845. boards which do not use the full malloc in SPL (which is
  1846. enabled with CONFIG_SYS_SPL_MALLOC_START).
  1847. - CONFIG_SYS_NONCACHED_MEMORY:
  1848. Size of non-cached memory area. This area of memory will be
  1849. typically located right below the malloc() area and mapped
  1850. uncached in the MMU. This is useful for drivers that would
  1851. otherwise require a lot of explicit cache maintenance. For
  1852. some drivers it's also impossible to properly maintain the
  1853. cache. For example if the regions that need to be flushed
  1854. are not a multiple of the cache-line size, *and* padding
  1855. cannot be allocated between the regions to align them (i.e.
  1856. if the HW requires a contiguous array of regions, and the
  1857. size of each region is not cache-aligned), then a flush of
  1858. one region may result in overwriting data that hardware has
  1859. written to another region in the same cache-line. This can
  1860. happen for example in network drivers where descriptors for
  1861. buffers are typically smaller than the CPU cache-line (e.g.
  1862. 16 bytes vs. 32 or 64 bytes).
  1863. Non-cached memory is only supported on 32-bit ARM at present.
  1864. - CONFIG_SYS_BOOTM_LEN:
  1865. Normally compressed uImages are limited to an
  1866. uncompressed size of 8 MBytes. If this is not enough,
  1867. you can define CONFIG_SYS_BOOTM_LEN in your board config file
  1868. to adjust this setting to your needs.
  1869. - CONFIG_SYS_BOOTMAPSZ:
  1870. Maximum size of memory mapped by the startup code of
  1871. the Linux kernel; all data that must be processed by
  1872. the Linux kernel (bd_info, boot arguments, FDT blob if
  1873. used) must be put below this limit, unless "bootm_low"
  1874. environment variable is defined and non-zero. In such case
  1875. all data for the Linux kernel must be between "bootm_low"
  1876. and "bootm_low" + CONFIG_SYS_BOOTMAPSZ. The environment
  1877. variable "bootm_mapsize" will override the value of
  1878. CONFIG_SYS_BOOTMAPSZ. If CONFIG_SYS_BOOTMAPSZ is undefined,
  1879. then the value in "bootm_size" will be used instead.
  1880. - CONFIG_SYS_BOOT_RAMDISK_HIGH:
  1881. Enable initrd_high functionality. If defined then the
  1882. initrd_high feature is enabled and the bootm ramdisk subcommand
  1883. is enabled.
  1884. - CONFIG_SYS_BOOT_GET_CMDLINE:
  1885. Enables allocating and saving kernel cmdline in space between
  1886. "bootm_low" and "bootm_low" + BOOTMAPSZ.
  1887. - CONFIG_SYS_BOOT_GET_KBD:
  1888. Enables allocating and saving a kernel copy of the bd_info in
  1889. space between "bootm_low" and "bootm_low" + BOOTMAPSZ.
  1890. - CONFIG_SYS_MAX_FLASH_BANKS:
  1891. Max number of Flash memory banks
  1892. - CONFIG_SYS_MAX_FLASH_SECT:
  1893. Max number of sectors on a Flash chip
  1894. - CONFIG_SYS_FLASH_ERASE_TOUT:
  1895. Timeout for Flash erase operations (in ms)
  1896. - CONFIG_SYS_FLASH_WRITE_TOUT:
  1897. Timeout for Flash write operations (in ms)
  1898. - CONFIG_SYS_FLASH_LOCK_TOUT
  1899. Timeout for Flash set sector lock bit operation (in ms)
  1900. - CONFIG_SYS_FLASH_UNLOCK_TOUT
  1901. Timeout for Flash clear lock bits operation (in ms)
  1902. - CONFIG_SYS_FLASH_PROTECTION
  1903. If defined, hardware flash sectors protection is used
  1904. instead of U-Boot software protection.
  1905. - CONFIG_SYS_DIRECT_FLASH_TFTP:
  1906. Enable TFTP transfers directly to flash memory;
  1907. without this option such a download has to be
  1908. performed in two steps: (1) download to RAM, and (2)
  1909. copy from RAM to flash.
  1910. The two-step approach is usually more reliable, since
  1911. you can check if the download worked before you erase
  1912. the flash, but in some situations (when system RAM is
  1913. too limited to allow for a temporary copy of the
  1914. downloaded image) this option may be very useful.
  1915. - CONFIG_SYS_FLASH_CFI:
  1916. Define if the flash driver uses extra elements in the
  1917. common flash structure for storing flash geometry.
  1918. - CONFIG_FLASH_CFI_DRIVER
  1919. This option also enables the building of the cfi_flash driver
  1920. in the drivers directory
  1921. - CONFIG_FLASH_CFI_MTD
  1922. This option enables the building of the cfi_mtd driver
  1923. in the drivers directory. The driver exports CFI flash
  1924. to the MTD layer.
  1925. - CONFIG_SYS_FLASH_USE_BUFFER_WRITE
  1926. Use buffered writes to flash.
  1927. - CONFIG_FLASH_SPANSION_S29WS_N
  1928. s29ws-n MirrorBit flash has non-standard addresses for buffered
  1929. write commands.
  1930. - CONFIG_SYS_FLASH_QUIET_TEST
  1931. If this option is defined, the common CFI flash doesn't
  1932. print it's warning upon not recognized FLASH banks. This
  1933. is useful, if some of the configured banks are only
  1934. optionally available.
  1935. - CONFIG_FLASH_SHOW_PROGRESS
  1936. If defined (must be an integer), print out countdown
  1937. digits and dots. Recommended value: 45 (9..1) for 80
  1938. column displays, 15 (3..1) for 40 column displays.
  1939. - CONFIG_FLASH_VERIFY
  1940. If defined, the content of the flash (destination) is compared
  1941. against the source after the write operation. An error message
  1942. will be printed when the contents are not identical.
  1943. Please note that this option is useless in nearly all cases,
  1944. since such flash programming errors usually are detected earlier
  1945. while unprotecting/erasing/programming. Please only enable
  1946. this option if you really know what you are doing.
  1947. - CONFIG_SYS_RX_ETH_BUFFER:
  1948. Defines the number of Ethernet receive buffers. On some
  1949. Ethernet controllers it is recommended to set this value
  1950. to 8 or even higher (EEPRO100 or 405 EMAC), since all
  1951. buffers can be full shortly after enabling the interface
  1952. on high Ethernet traffic.
  1953. Defaults to 4 if not defined.
  1954. - CONFIG_ENV_MAX_ENTRIES
  1955. Maximum number of entries in the hash table that is used
  1956. internally to store the environment settings. The default
  1957. setting is supposed to be generous and should work in most
  1958. cases. This setting can be used to tune behaviour; see
  1959. lib/hashtable.c for details.
  1960. - CONFIG_ENV_FLAGS_LIST_DEFAULT
  1961. - CONFIG_ENV_FLAGS_LIST_STATIC
  1962. Enable validation of the values given to environment variables when
  1963. calling env set. Variables can be restricted to only decimal,
  1964. hexadecimal, or boolean. If CONFIG_CMD_NET is also defined,
  1965. the variables can also be restricted to IP address or MAC address.
  1966. The format of the list is:
  1967. type_attribute = [s|d|x|b|i|m]
  1968. access_attribute = [a|r|o|c]
  1969. attributes = type_attribute[access_attribute]
  1970. entry = variable_name[:attributes]
  1971. list = entry[,list]
  1972. The type attributes are:
  1973. s - String (default)
  1974. d - Decimal
  1975. x - Hexadecimal
  1976. b - Boolean ([1yYtT|0nNfF])
  1977. i - IP address
  1978. m - MAC address
  1979. The access attributes are:
  1980. a - Any (default)
  1981. r - Read-only
  1982. o - Write-once
  1983. c - Change-default
  1984. - CONFIG_ENV_FLAGS_LIST_DEFAULT
  1985. Define this to a list (string) to define the ".flags"
  1986. environment variable in the default or embedded environment.
  1987. - CONFIG_ENV_FLAGS_LIST_STATIC
  1988. Define this to a list (string) to define validation that
  1989. should be done if an entry is not found in the ".flags"
  1990. environment variable. To override a setting in the static
  1991. list, simply add an entry for the same variable name to the
  1992. ".flags" variable.
  1993. If CONFIG_REGEX is defined, the variable_name above is evaluated as a
  1994. regular expression. This allows multiple variables to define the same
  1995. flags without explicitly listing them for each variable.
  1996. The following definitions that deal with the placement and management
  1997. of environment data (variable area); in general, we support the
  1998. following configurations:
  1999. - CONFIG_BUILD_ENVCRC:
  2000. Builds up envcrc with the target environment so that external utils
  2001. may easily extract it and embed it in final U-Boot images.
  2002. BE CAREFUL! The first access to the environment happens quite early
  2003. in U-Boot initialization (when we try to get the setting of for the
  2004. console baudrate). You *MUST* have mapped your NVRAM area then, or
  2005. U-Boot will hang.
  2006. Please note that even with NVRAM we still use a copy of the
  2007. environment in RAM: we could work on NVRAM directly, but we want to
  2008. keep settings there always unmodified except somebody uses "saveenv"
  2009. to save the current settings.
  2010. BE CAREFUL! For some special cases, the local device can not use
  2011. "saveenv" command. For example, the local device will get the
  2012. environment stored in a remote NOR flash by SRIO or PCIE link,
  2013. but it can not erase, write this NOR flash by SRIO or PCIE interface.
  2014. - CONFIG_NAND_ENV_DST
  2015. Defines address in RAM to which the nand_spl code should copy the
  2016. environment. If redundant environment is used, it will be copied to
  2017. CONFIG_NAND_ENV_DST + CONFIG_ENV_SIZE.
  2018. Please note that the environment is read-only until the monitor
  2019. has been relocated to RAM and a RAM copy of the environment has been
  2020. created; also, when using EEPROM you will have to use env_get_f()
  2021. until then to read environment variables.
  2022. The environment is protected by a CRC32 checksum. Before the monitor
  2023. is relocated into RAM, as a result of a bad CRC you will be working
  2024. with the compiled-in default environment - *silently*!!! [This is
  2025. necessary, because the first environment variable we need is the
  2026. "baudrate" setting for the console - if we have a bad CRC, we don't
  2027. have any device yet where we could complain.]
  2028. Note: once the monitor has been relocated, then it will complain if
  2029. the default environment is used; a new CRC is computed as soon as you
  2030. use the "saveenv" command to store a valid environment.
  2031. - CONFIG_SYS_FAULT_ECHO_LINK_DOWN:
  2032. Echo the inverted Ethernet link state to the fault LED.
  2033. Note: If this option is active, then CONFIG_SYS_FAULT_MII_ADDR
  2034. also needs to be defined.
  2035. - CONFIG_SYS_FAULT_MII_ADDR:
  2036. MII address of the PHY to check for the Ethernet link state.
  2037. - CONFIG_NS16550_MIN_FUNCTIONS:
  2038. Define this if you desire to only have use of the NS16550_init
  2039. and NS16550_putc functions for the serial driver located at
  2040. drivers/serial/ns16550.c. This option is useful for saving
  2041. space for already greatly restricted images, including but not
  2042. limited to NAND_SPL configurations.
  2043. - CONFIG_DISPLAY_BOARDINFO
  2044. Display information about the board that U-Boot is running on
  2045. when U-Boot starts up. The board function checkboard() is called
  2046. to do this.
  2047. - CONFIG_DISPLAY_BOARDINFO_LATE
  2048. Similar to the previous option, but display this information
  2049. later, once stdio is running and output goes to the LCD, if
  2050. present.
  2051. - CONFIG_BOARD_SIZE_LIMIT:
  2052. Maximum size of the U-Boot image. When defined, the
  2053. build system checks that the actual size does not
  2054. exceed it.
  2055. Low Level (hardware related) configuration options:
  2056. ---------------------------------------------------
  2057. - CONFIG_SYS_CACHELINE_SIZE:
  2058. Cache Line Size of the CPU.
  2059. - CONFIG_SYS_CCSRBAR_DEFAULT:
  2060. Default (power-on reset) physical address of CCSR on Freescale
  2061. PowerPC SOCs.
  2062. - CONFIG_SYS_CCSRBAR:
  2063. Virtual address of CCSR. On a 32-bit build, this is typically
  2064. the same value as CONFIG_SYS_CCSRBAR_DEFAULT.
  2065. - CONFIG_SYS_CCSRBAR_PHYS:
  2066. Physical address of CCSR. CCSR can be relocated to a new
  2067. physical address, if desired. In this case, this macro should
  2068. be set to that address. Otherwise, it should be set to the
  2069. same value as CONFIG_SYS_CCSRBAR_DEFAULT. For example, CCSR
  2070. is typically relocated on 36-bit builds. It is recommended
  2071. that this macro be defined via the _HIGH and _LOW macros:
  2072. #define CONFIG_SYS_CCSRBAR_PHYS ((CONFIG_SYS_CCSRBAR_PHYS_HIGH
  2073. * 1ull) << 32 | CONFIG_SYS_CCSRBAR_PHYS_LOW)
  2074. - CONFIG_SYS_CCSRBAR_PHYS_HIGH:
  2075. Bits 33-36 of CONFIG_SYS_CCSRBAR_PHYS. This value is typically
  2076. either 0 (32-bit build) or 0xF (36-bit build). This macro is
  2077. used in assembly code, so it must not contain typecasts or
  2078. integer size suffixes (e.g. "ULL").
  2079. - CONFIG_SYS_CCSRBAR_PHYS_LOW:
  2080. Lower 32-bits of CONFIG_SYS_CCSRBAR_PHYS. This macro is
  2081. used in assembly code, so it must not contain typecasts or
  2082. integer size suffixes (e.g. "ULL").
  2083. - CONFIG_SYS_CCSR_DO_NOT_RELOCATE:
  2084. If this macro is defined, then CONFIG_SYS_CCSRBAR_PHYS will be
  2085. forced to a value that ensures that CCSR is not relocated.
  2086. - CONFIG_IDE_AHB:
  2087. Most IDE controllers were designed to be connected with PCI
  2088. interface. Only few of them were designed for AHB interface.
  2089. When software is doing ATA command and data transfer to
  2090. IDE devices through IDE-AHB controller, some additional
  2091. registers accessing to these kind of IDE-AHB controller
  2092. is required.
  2093. - CONFIG_SYS_IMMR: Physical address of the Internal Memory.
  2094. DO NOT CHANGE unless you know exactly what you're
  2095. doing! (11-4) [MPC8xx systems only]
  2096. - CONFIG_SYS_INIT_RAM_ADDR:
  2097. Start address of memory area that can be used for
  2098. initial data and stack; please note that this must be
  2099. writable memory that is working WITHOUT special
  2100. initialization, i. e. you CANNOT use normal RAM which
  2101. will become available only after programming the
  2102. memory controller and running certain initialization
  2103. sequences.
  2104. U-Boot uses the following memory types:
  2105. - MPC8xx: IMMR (internal memory of the CPU)
  2106. - CONFIG_SYS_GBL_DATA_OFFSET:
  2107. Offset of the initial data structure in the memory
  2108. area defined by CONFIG_SYS_INIT_RAM_ADDR. Usually
  2109. CONFIG_SYS_GBL_DATA_OFFSET is chosen such that the initial
  2110. data is located at the end of the available space
  2111. (sometimes written as (CONFIG_SYS_INIT_RAM_SIZE -
  2112. GENERATED_GBL_DATA_SIZE), and the initial stack is just
  2113. below that area (growing from (CONFIG_SYS_INIT_RAM_ADDR +
  2114. CONFIG_SYS_GBL_DATA_OFFSET) downward.
  2115. Note:
  2116. On the MPC824X (or other systems that use the data
  2117. cache for initial memory) the address chosen for
  2118. CONFIG_SYS_INIT_RAM_ADDR is basically arbitrary - it must
  2119. point to an otherwise UNUSED address space between
  2120. the top of RAM and the start of the PCI space.
  2121. - CONFIG_SYS_SCCR: System Clock and reset Control Register (15-27)
  2122. - CONFIG_SYS_OR_TIMING_SDRAM:
  2123. SDRAM timing
  2124. - CONFIG_SYS_MAMR_PTA:
  2125. periodic timer for refresh
  2126. - FLASH_BASE0_PRELIM, FLASH_BASE1_PRELIM, CONFIG_SYS_REMAP_OR_AM,
  2127. CONFIG_SYS_PRELIM_OR_AM, CONFIG_SYS_OR_TIMING_FLASH, CONFIG_SYS_OR0_REMAP,
  2128. CONFIG_SYS_OR0_PRELIM, CONFIG_SYS_BR0_PRELIM, CONFIG_SYS_OR1_REMAP, CONFIG_SYS_OR1_PRELIM,
  2129. CONFIG_SYS_BR1_PRELIM:
  2130. Memory Controller Definitions: BR0/1 and OR0/1 (FLASH)
  2131. - SDRAM_BASE2_PRELIM, SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE,
  2132. CONFIG_SYS_OR_TIMING_SDRAM, CONFIG_SYS_OR2_PRELIM, CONFIG_SYS_BR2_PRELIM,
  2133. CONFIG_SYS_OR3_PRELIM, CONFIG_SYS_BR3_PRELIM:
  2134. Memory Controller Definitions: BR2/3 and OR2/3 (SDRAM)
  2135. - CONFIG_PCI_ENUM_ONLY
  2136. Only scan through and get the devices on the buses.
  2137. Don't do any setup work, presumably because someone or
  2138. something has already done it, and we don't need to do it
  2139. a second time. Useful for platforms that are pre-booted
  2140. by coreboot or similar.
  2141. - CONFIG_PCI_INDIRECT_BRIDGE:
  2142. Enable support for indirect PCI bridges.
  2143. - CONFIG_SYS_SRIO:
  2144. Chip has SRIO or not
  2145. - CONFIG_SRIO1:
  2146. Board has SRIO 1 port available
  2147. - CONFIG_SRIO2:
  2148. Board has SRIO 2 port available
  2149. - CONFIG_SRIO_PCIE_BOOT_MASTER
  2150. Board can support master function for Boot from SRIO and PCIE
  2151. - CONFIG_SYS_SRIOn_MEM_VIRT:
  2152. Virtual Address of SRIO port 'n' memory region
  2153. - CONFIG_SYS_SRIOn_MEM_PHYxS:
  2154. Physical Address of SRIO port 'n' memory region
  2155. - CONFIG_SYS_SRIOn_MEM_SIZE:
  2156. Size of SRIO port 'n' memory region
  2157. - CONFIG_SYS_NAND_BUSWIDTH_16BIT
  2158. Defined to tell the NAND controller that the NAND chip is using
  2159. a 16 bit bus.
  2160. Not all NAND drivers use this symbol.
  2161. Example of drivers that use it:
  2162. - drivers/mtd/nand/raw/ndfc.c
  2163. - drivers/mtd/nand/raw/mxc_nand.c
  2164. - CONFIG_SYS_NDFC_EBC0_CFG
  2165. Sets the EBC0_CFG register for the NDFC. If not defined
  2166. a default value will be used.
  2167. - CONFIG_SPD_EEPROM
  2168. Get DDR timing information from an I2C EEPROM. Common
  2169. with pluggable memory modules such as SODIMMs
  2170. SPD_EEPROM_ADDRESS
  2171. I2C address of the SPD EEPROM
  2172. - CONFIG_SYS_SPD_BUS_NUM
  2173. If SPD EEPROM is on an I2C bus other than the first
  2174. one, specify here. Note that the value must resolve
  2175. to something your driver can deal with.
  2176. - CONFIG_SYS_DDR_RAW_TIMING
  2177. Get DDR timing information from other than SPD. Common with
  2178. soldered DDR chips onboard without SPD. DDR raw timing
  2179. parameters are extracted from datasheet and hard-coded into
  2180. header files or board specific files.
  2181. - CONFIG_FSL_DDR_INTERACTIVE
  2182. Enable interactive DDR debugging. See doc/README.fsl-ddr.
  2183. - CONFIG_FSL_DDR_SYNC_REFRESH
  2184. Enable sync of refresh for multiple controllers.
  2185. - CONFIG_FSL_DDR_BIST
  2186. Enable built-in memory test for Freescale DDR controllers.
  2187. - CONFIG_SYS_83XX_DDR_USES_CS0
  2188. Only for 83xx systems. If specified, then DDR should
  2189. be configured using CS0 and CS1 instead of CS2 and CS3.
  2190. - CONFIG_RMII
  2191. Enable RMII mode for all FECs.
  2192. Note that this is a global option, we can't
  2193. have one FEC in standard MII mode and another in RMII mode.
  2194. - CONFIG_CRC32_VERIFY
  2195. Add a verify option to the crc32 command.
  2196. The syntax is:
  2197. => crc32 -v <address> <count> <crc32>
  2198. Where address/count indicate a memory area
  2199. and crc32 is the correct crc32 which the
  2200. area should have.
  2201. - CONFIG_LOOPW
  2202. Add the "loopw" memory command. This only takes effect if
  2203. the memory commands are activated globally (CONFIG_CMD_MEMORY).
  2204. - CONFIG_CMD_MX_CYCLIC
  2205. Add the "mdc" and "mwc" memory commands. These are cyclic
  2206. "md/mw" commands.
  2207. Examples:
  2208. => mdc.b 10 4 500
  2209. This command will print 4 bytes (10,11,12,13) each 500 ms.
  2210. => mwc.l 100 12345678 10
  2211. This command will write 12345678 to address 100 all 10 ms.
  2212. This only takes effect if the memory commands are activated
  2213. globally (CONFIG_CMD_MEMORY).
  2214. - CONFIG_SKIP_LOWLEVEL_INIT
  2215. [ARM, NDS32, MIPS, RISC-V only] If this variable is defined, then certain
  2216. low level initializations (like setting up the memory
  2217. controller) are omitted and/or U-Boot does not
  2218. relocate itself into RAM.
  2219. Normally this variable MUST NOT be defined. The only
  2220. exception is when U-Boot is loaded (to RAM) by some
  2221. other boot loader or by a debugger which performs
  2222. these initializations itself.
  2223. - CONFIG_SKIP_LOWLEVEL_INIT_ONLY
  2224. [ARM926EJ-S only] This allows just the call to lowlevel_init()
  2225. to be skipped. The normal CP15 init (such as enabling the
  2226. instruction cache) is still performed.
  2227. - CONFIG_SPL_BUILD
  2228. Set when the currently-running compilation is for an artifact
  2229. that will end up in the SPL (as opposed to the TPL or U-Boot
  2230. proper). Code that needs stage-specific behavior should check
  2231. this.
  2232. - CONFIG_TPL_BUILD
  2233. Set when the currently-running compilation is for an artifact
  2234. that will end up in the TPL (as opposed to the SPL or U-Boot
  2235. proper). Code that needs stage-specific behavior should check
  2236. this.
  2237. - CONFIG_SYS_MPC85XX_NO_RESETVEC
  2238. Only for 85xx systems. If this variable is specified, the section
  2239. .resetvec is not kept and the section .bootpg is placed in the
  2240. previous 4k of the .text section.
  2241. - CONFIG_ARCH_MAP_SYSMEM
  2242. Generally U-Boot (and in particular the md command) uses
  2243. effective address. It is therefore not necessary to regard
  2244. U-Boot address as virtual addresses that need to be translated
  2245. to physical addresses. However, sandbox requires this, since
  2246. it maintains its own little RAM buffer which contains all
  2247. addressable memory. This option causes some memory accesses
  2248. to be mapped through map_sysmem() / unmap_sysmem().
  2249. - CONFIG_X86_RESET_VECTOR
  2250. If defined, the x86 reset vector code is included. This is not
  2251. needed when U-Boot is running from Coreboot.
  2252. - CONFIG_SYS_NAND_NO_SUBPAGE_WRITE
  2253. Option to disable subpage write in NAND driver
  2254. driver that uses this:
  2255. drivers/mtd/nand/raw/davinci_nand.c
  2256. Freescale QE/FMAN Firmware Support:
  2257. -----------------------------------
  2258. The Freescale QUICCEngine (QE) and Frame Manager (FMAN) both support the
  2259. loading of "firmware", which is encoded in the QE firmware binary format.
  2260. This firmware often needs to be loaded during U-Boot booting, so macros
  2261. are used to identify the storage device (NOR flash, SPI, etc) and the address
  2262. within that device.
  2263. - CONFIG_SYS_FMAN_FW_ADDR
  2264. The address in the storage device where the FMAN microcode is located. The
  2265. meaning of this address depends on which CONFIG_SYS_QE_FMAN_FW_IN_xxx macro
  2266. is also specified.
  2267. - CONFIG_SYS_QE_FW_ADDR
  2268. The address in the storage device where the QE microcode is located. The
  2269. meaning of this address depends on which CONFIG_SYS_QE_FMAN_FW_IN_xxx macro
  2270. is also specified.
  2271. - CONFIG_SYS_QE_FMAN_FW_LENGTH
  2272. The maximum possible size of the firmware. The firmware binary format
  2273. has a field that specifies the actual size of the firmware, but it
  2274. might not be possible to read any part of the firmware unless some
  2275. local storage is allocated to hold the entire firmware first.
  2276. - CONFIG_SYS_QE_FMAN_FW_IN_NOR
  2277. Specifies that QE/FMAN firmware is located in NOR flash, mapped as
  2278. normal addressable memory via the LBC. CONFIG_SYS_FMAN_FW_ADDR is the
  2279. virtual address in NOR flash.
  2280. - CONFIG_SYS_QE_FMAN_FW_IN_NAND
  2281. Specifies that QE/FMAN firmware is located in NAND flash.
  2282. CONFIG_SYS_FMAN_FW_ADDR is the offset within NAND flash.
  2283. - CONFIG_SYS_QE_FMAN_FW_IN_MMC
  2284. Specifies that QE/FMAN firmware is located on the primary SD/MMC
  2285. device. CONFIG_SYS_FMAN_FW_ADDR is the byte offset on that device.
  2286. - CONFIG_SYS_QE_FMAN_FW_IN_REMOTE
  2287. Specifies that QE/FMAN firmware is located in the remote (master)
  2288. memory space. CONFIG_SYS_FMAN_FW_ADDR is a virtual address which
  2289. can be mapped from slave TLB->slave LAW->slave SRIO or PCIE outbound
  2290. window->master inbound window->master LAW->the ucode address in
  2291. master's memory space.
  2292. Freescale Layerscape Management Complex Firmware Support:
  2293. ---------------------------------------------------------
  2294. The Freescale Layerscape Management Complex (MC) supports the loading of
  2295. "firmware".
  2296. This firmware often needs to be loaded during U-Boot booting, so macros
  2297. are used to identify the storage device (NOR flash, SPI, etc) and the address
  2298. within that device.
  2299. - CONFIG_FSL_MC_ENET
  2300. Enable the MC driver for Layerscape SoCs.
  2301. Freescale Layerscape Debug Server Support:
  2302. -------------------------------------------
  2303. The Freescale Layerscape Debug Server Support supports the loading of
  2304. "Debug Server firmware" and triggering SP boot-rom.
  2305. This firmware often needs to be loaded during U-Boot booting.
  2306. - CONFIG_SYS_MC_RSV_MEM_ALIGN
  2307. Define alignment of reserved memory MC requires
  2308. Reproducible builds
  2309. -------------------
  2310. In order to achieve reproducible builds, timestamps used in the U-Boot build
  2311. process have to be set to a fixed value.
  2312. This is done using the SOURCE_DATE_EPOCH environment variable.
  2313. SOURCE_DATE_EPOCH is to be set on the build host's shell, not as a configuration
  2314. option for U-Boot or an environment variable in U-Boot.
  2315. SOURCE_DATE_EPOCH should be set to a number of seconds since the epoch, in UTC.
  2316. Building the Software:
  2317. ======================
  2318. Building U-Boot has been tested in several native build environments
  2319. and in many different cross environments. Of course we cannot support
  2320. all possibly existing versions of cross development tools in all
  2321. (potentially obsolete) versions. In case of tool chain problems we
  2322. recommend to use the ELDK (see http://www.denx.de/wiki/DULG/ELDK)
  2323. which is extensively used to build and test U-Boot.
  2324. If you are not using a native environment, it is assumed that you
  2325. have GNU cross compiling tools available in your path. In this case,
  2326. you must set the environment variable CROSS_COMPILE in your shell.
  2327. Note that no changes to the Makefile or any other source files are
  2328. necessary. For example using the ELDK on a 4xx CPU, please enter:
  2329. $ CROSS_COMPILE=ppc_4xx-
  2330. $ export CROSS_COMPILE
  2331. U-Boot is intended to be simple to build. After installing the
  2332. sources you must configure U-Boot for one specific board type. This
  2333. is done by typing:
  2334. make NAME_defconfig
  2335. where "NAME_defconfig" is the name of one of the existing configu-
  2336. rations; see configs/*_defconfig for supported names.
  2337. Note: for some boards special configuration names may exist; check if
  2338. additional information is available from the board vendor; for
  2339. instance, the TQM823L systems are available without (standard)
  2340. or with LCD support. You can select such additional "features"
  2341. when choosing the configuration, i. e.
  2342. make TQM823L_defconfig
  2343. - will configure for a plain TQM823L, i. e. no LCD support
  2344. make TQM823L_LCD_defconfig
  2345. - will configure for a TQM823L with U-Boot console on LCD
  2346. etc.
  2347. Finally, type "make all", and you should get some working U-Boot
  2348. images ready for download to / installation on your system:
  2349. - "u-boot.bin" is a raw binary image
  2350. - "u-boot" is an image in ELF binary format
  2351. - "u-boot.srec" is in Motorola S-Record format
  2352. By default the build is performed locally and the objects are saved
  2353. in the source directory. One of the two methods can be used to change
  2354. this behavior and build U-Boot to some external directory:
  2355. 1. Add O= to the make command line invocations:
  2356. make O=/tmp/build distclean
  2357. make O=/tmp/build NAME_defconfig
  2358. make O=/tmp/build all
  2359. 2. Set environment variable KBUILD_OUTPUT to point to the desired location:
  2360. export KBUILD_OUTPUT=/tmp/build
  2361. make distclean
  2362. make NAME_defconfig
  2363. make all
  2364. Note that the command line "O=" setting overrides the KBUILD_OUTPUT environment
  2365. variable.
  2366. User specific CPPFLAGS, AFLAGS and CFLAGS can be passed to the compiler by
  2367. setting the according environment variables KCPPFLAGS, KAFLAGS and KCFLAGS.
  2368. For example to treat all compiler warnings as errors:
  2369. make KCFLAGS=-Werror
  2370. Please be aware that the Makefiles assume you are using GNU make, so
  2371. for instance on NetBSD you might need to use "gmake" instead of
  2372. native "make".
  2373. If the system board that you have is not listed, then you will need
  2374. to port U-Boot to your hardware platform. To do this, follow these
  2375. steps:
  2376. 1. Create a new directory to hold your board specific code. Add any
  2377. files you need. In your board directory, you will need at least
  2378. the "Makefile" and a "<board>.c".
  2379. 2. Create a new configuration file "include/configs/<board>.h" for
  2380. your board.
  2381. 3. If you're porting U-Boot to a new CPU, then also create a new
  2382. directory to hold your CPU specific code. Add any files you need.
  2383. 4. Run "make <board>_defconfig" with your new name.
  2384. 5. Type "make", and you should get a working "u-boot.srec" file
  2385. to be installed on your target system.
  2386. 6. Debug and solve any problems that might arise.
  2387. [Of course, this last step is much harder than it sounds.]
  2388. Testing of U-Boot Modifications, Ports to New Hardware, etc.:
  2389. ==============================================================
  2390. If you have modified U-Boot sources (for instance added a new board
  2391. or support for new devices, a new CPU, etc.) you are expected to
  2392. provide feedback to the other developers. The feedback normally takes
  2393. the form of a "patch", i.e. a context diff against a certain (latest
  2394. official or latest in the git repository) version of U-Boot sources.
  2395. But before you submit such a patch, please verify that your modifi-
  2396. cation did not break existing code. At least make sure that *ALL* of
  2397. the supported boards compile WITHOUT ANY compiler warnings. To do so,
  2398. just run the buildman script (tools/buildman/buildman), which will
  2399. configure and build U-Boot for ALL supported system. Be warned, this
  2400. will take a while. Please see the buildman README, or run 'buildman -H'
  2401. for documentation.
  2402. See also "U-Boot Porting Guide" below.
  2403. Monitor Commands - Overview:
  2404. ============================
  2405. go - start application at address 'addr'
  2406. run - run commands in an environment variable
  2407. bootm - boot application image from memory
  2408. bootp - boot image via network using BootP/TFTP protocol
  2409. bootz - boot zImage from memory
  2410. tftpboot- boot image via network using TFTP protocol
  2411. and env variables "ipaddr" and "serverip"
  2412. (and eventually "gatewayip")
  2413. tftpput - upload a file via network using TFTP protocol
  2414. rarpboot- boot image via network using RARP/TFTP protocol
  2415. diskboot- boot from IDE devicebootd - boot default, i.e., run 'bootcmd'
  2416. loads - load S-Record file over serial line
  2417. loadb - load binary file over serial line (kermit mode)
  2418. md - memory display
  2419. mm - memory modify (auto-incrementing)
  2420. nm - memory modify (constant address)
  2421. mw - memory write (fill)
  2422. ms - memory search
  2423. cp - memory copy
  2424. cmp - memory compare
  2425. crc32 - checksum calculation
  2426. i2c - I2C sub-system
  2427. sspi - SPI utility commands
  2428. base - print or set address offset
  2429. printenv- print environment variables
  2430. setenv - set environment variables
  2431. saveenv - save environment variables to persistent storage
  2432. protect - enable or disable FLASH write protection
  2433. erase - erase FLASH memory
  2434. flinfo - print FLASH memory information
  2435. nand - NAND memory operations (see doc/README.nand)
  2436. bdinfo - print Board Info structure
  2437. iminfo - print header information for application image
  2438. coninfo - print console devices and informations
  2439. ide - IDE sub-system
  2440. loop - infinite loop on address range
  2441. loopw - infinite write loop on address range
  2442. mtest - simple RAM test
  2443. icache - enable or disable instruction cache
  2444. dcache - enable or disable data cache
  2445. reset - Perform RESET of the CPU
  2446. echo - echo args to console
  2447. version - print monitor version
  2448. help - print online help
  2449. ? - alias for 'help'
  2450. Monitor Commands - Detailed Description:
  2451. ========================================
  2452. TODO.
  2453. For now: just type "help <command>".
  2454. Environment Variables:
  2455. ======================
  2456. U-Boot supports user configuration using Environment Variables which
  2457. can be made persistent by saving to Flash memory.
  2458. Environment Variables are set using "setenv", printed using
  2459. "printenv", and saved to Flash using "saveenv". Using "setenv"
  2460. without a value can be used to delete a variable from the
  2461. environment. As long as you don't save the environment you are
  2462. working with an in-memory copy. In case the Flash area containing the
  2463. environment is erased by accident, a default environment is provided.
  2464. Some configuration options can be set using Environment Variables.
  2465. List of environment variables (most likely not complete):
  2466. baudrate - see CONFIG_BAUDRATE
  2467. bootdelay - see CONFIG_BOOTDELAY
  2468. bootcmd - see CONFIG_BOOTCOMMAND
  2469. bootargs - Boot arguments when booting an RTOS image
  2470. bootfile - Name of the image to load with TFTP
  2471. bootm_low - Memory range available for image processing in the bootm
  2472. command can be restricted. This variable is given as
  2473. a hexadecimal number and defines lowest address allowed
  2474. for use by the bootm command. See also "bootm_size"
  2475. environment variable. Address defined by "bootm_low" is
  2476. also the base of the initial memory mapping for the Linux
  2477. kernel -- see the description of CONFIG_SYS_BOOTMAPSZ and
  2478. bootm_mapsize.
  2479. bootm_mapsize - Size of the initial memory mapping for the Linux kernel.
  2480. This variable is given as a hexadecimal number and it
  2481. defines the size of the memory region starting at base
  2482. address bootm_low that is accessible by the Linux kernel
  2483. during early boot. If unset, CONFIG_SYS_BOOTMAPSZ is used
  2484. as the default value if it is defined, and bootm_size is
  2485. used otherwise.
  2486. bootm_size - Memory range available for image processing in the bootm
  2487. command can be restricted. This variable is given as
  2488. a hexadecimal number and defines the size of the region
  2489. allowed for use by the bootm command. See also "bootm_low"
  2490. environment variable.
  2491. bootstopkeysha256, bootdelaykey, bootstopkey - See README.autoboot
  2492. updatefile - Location of the software update file on a TFTP server, used
  2493. by the automatic software update feature. Please refer to
  2494. documentation in doc/README.update for more details.
  2495. autoload - if set to "no" (any string beginning with 'n'),
  2496. "bootp" will just load perform a lookup of the
  2497. configuration from the BOOTP server, but not try to
  2498. load any image using TFTP
  2499. autostart - if set to "yes", an image loaded using the "bootp",
  2500. "rarpboot", "tftpboot" or "diskboot" commands will
  2501. be automatically started (by internally calling
  2502. "bootm")
  2503. If set to "no", a standalone image passed to the
  2504. "bootm" command will be copied to the load address
  2505. (and eventually uncompressed), but NOT be started.
  2506. This can be used to load and uncompress arbitrary
  2507. data.
  2508. fdt_high - if set this restricts the maximum address that the
  2509. flattened device tree will be copied into upon boot.
  2510. For example, if you have a system with 1 GB memory
  2511. at physical address 0x10000000, while Linux kernel
  2512. only recognizes the first 704 MB as low memory, you
  2513. may need to set fdt_high as 0x3C000000 to have the
  2514. device tree blob be copied to the maximum address
  2515. of the 704 MB low memory, so that Linux kernel can
  2516. access it during the boot procedure.
  2517. If this is set to the special value 0xFFFFFFFF then
  2518. the fdt will not be copied at all on boot. For this
  2519. to work it must reside in writable memory, have
  2520. sufficient padding on the end of it for u-boot to
  2521. add the information it needs into it, and the memory
  2522. must be accessible by the kernel.
  2523. fdtcontroladdr- if set this is the address of the control flattened
  2524. device tree used by U-Boot when CONFIG_OF_CONTROL is
  2525. defined.
  2526. i2cfast - (PPC405GP|PPC405EP only)
  2527. if set to 'y' configures Linux I2C driver for fast
  2528. mode (400kHZ). This environment variable is used in
  2529. initialization code. So, for changes to be effective
  2530. it must be saved and board must be reset.
  2531. initrd_high - restrict positioning of initrd images:
  2532. If this variable is not set, initrd images will be
  2533. copied to the highest possible address in RAM; this
  2534. is usually what you want since it allows for
  2535. maximum initrd size. If for some reason you want to
  2536. make sure that the initrd image is loaded below the
  2537. CONFIG_SYS_BOOTMAPSZ limit, you can set this environment
  2538. variable to a value of "no" or "off" or "0".
  2539. Alternatively, you can set it to a maximum upper
  2540. address to use (U-Boot will still check that it
  2541. does not overwrite the U-Boot stack and data).
  2542. For instance, when you have a system with 16 MB
  2543. RAM, and want to reserve 4 MB from use by Linux,
  2544. you can do this by adding "mem=12M" to the value of
  2545. the "bootargs" variable. However, now you must make
  2546. sure that the initrd image is placed in the first
  2547. 12 MB as well - this can be done with
  2548. setenv initrd_high 00c00000
  2549. If you set initrd_high to 0xFFFFFFFF, this is an
  2550. indication to U-Boot that all addresses are legal
  2551. for the Linux kernel, including addresses in flash
  2552. memory. In this case U-Boot will NOT COPY the
  2553. ramdisk at all. This may be useful to reduce the
  2554. boot time on your system, but requires that this
  2555. feature is supported by your Linux kernel.
  2556. ipaddr - IP address; needed for tftpboot command
  2557. loadaddr - Default load address for commands like "bootp",
  2558. "rarpboot", "tftpboot", "loadb" or "diskboot"
  2559. loads_echo - see CONFIG_LOADS_ECHO
  2560. serverip - TFTP server IP address; needed for tftpboot command
  2561. bootretry - see CONFIG_BOOT_RETRY_TIME
  2562. bootdelaykey - see CONFIG_AUTOBOOT_DELAY_STR
  2563. bootstopkey - see CONFIG_AUTOBOOT_STOP_STR
  2564. ethprime - controls which interface is used first.
  2565. ethact - controls which interface is currently active.
  2566. For example you can do the following
  2567. => setenv ethact FEC
  2568. => ping 192.168.0.1 # traffic sent on FEC
  2569. => setenv ethact SCC
  2570. => ping 10.0.0.1 # traffic sent on SCC
  2571. ethrotate - When set to "no" U-Boot does not go through all
  2572. available network interfaces.
  2573. It just stays at the currently selected interface.
  2574. netretry - When set to "no" each network operation will
  2575. either succeed or fail without retrying.
  2576. When set to "once" the network operation will
  2577. fail when all the available network interfaces
  2578. are tried once without success.
  2579. Useful on scripts which control the retry operation
  2580. themselves.
  2581. npe_ucode - set load address for the NPE microcode
  2582. silent_linux - If set then Linux will be told to boot silently, by
  2583. changing the console to be empty. If "yes" it will be
  2584. made silent. If "no" it will not be made silent. If
  2585. unset, then it will be made silent if the U-Boot console
  2586. is silent.
  2587. tftpsrcp - If this is set, the value is used for TFTP's
  2588. UDP source port.
  2589. tftpdstp - If this is set, the value is used for TFTP's UDP
  2590. destination port instead of the Well Know Port 69.
  2591. tftpblocksize - Block size to use for TFTP transfers; if not set,
  2592. we use the TFTP server's default block size
  2593. tftptimeout - Retransmission timeout for TFTP packets (in milli-
  2594. seconds, minimum value is 1000 = 1 second). Defines
  2595. when a packet is considered to be lost so it has to
  2596. be retransmitted. The default is 5000 = 5 seconds.
  2597. Lowering this value may make downloads succeed
  2598. faster in networks with high packet loss rates or
  2599. with unreliable TFTP servers.
  2600. tftptimeoutcountmax - maximum count of TFTP timeouts (no
  2601. unit, minimum value = 0). Defines how many timeouts
  2602. can happen during a single file transfer before that
  2603. transfer is aborted. The default is 10, and 0 means
  2604. 'no timeouts allowed'. Increasing this value may help
  2605. downloads succeed with high packet loss rates, or with
  2606. unreliable TFTP servers or client hardware.
  2607. tftpwindowsize - if this is set, the value is used for TFTP's
  2608. window size as described by RFC 7440.
  2609. This means the count of blocks we can receive before
  2610. sending ack to server.
  2611. vlan - When set to a value < 4095 the traffic over
  2612. Ethernet is encapsulated/received over 802.1q
  2613. VLAN tagged frames.
  2614. bootpretryperiod - Period during which BOOTP/DHCP sends retries.
  2615. Unsigned value, in milliseconds. If not set, the period will
  2616. be either the default (28000), or a value based on
  2617. CONFIG_NET_RETRY_COUNT, if defined. This value has
  2618. precedence over the valu based on CONFIG_NET_RETRY_COUNT.
  2619. memmatches - Number of matches found by the last 'ms' command, in hex
  2620. memaddr - Address of the last match found by the 'ms' command, in hex,
  2621. or 0 if none
  2622. mempos - Index position of the last match found by the 'ms' command,
  2623. in units of the size (.b, .w, .l) of the search
  2624. zbootbase - (x86 only) Base address of the bzImage 'setup' block
  2625. zbootaddr - (x86 only) Address of the loaded bzImage, typically
  2626. BZIMAGE_LOAD_ADDR which is 0x100000
  2627. The following image location variables contain the location of images
  2628. used in booting. The "Image" column gives the role of the image and is
  2629. not an environment variable name. The other columns are environment
  2630. variable names. "File Name" gives the name of the file on a TFTP
  2631. server, "RAM Address" gives the location in RAM the image will be
  2632. loaded to, and "Flash Location" gives the image's address in NOR
  2633. flash or offset in NAND flash.
  2634. *Note* - these variables don't have to be defined for all boards, some
  2635. boards currently use other variables for these purposes, and some
  2636. boards use these variables for other purposes.
  2637. Image File Name RAM Address Flash Location
  2638. ----- --------- ----------- --------------
  2639. u-boot u-boot u-boot_addr_r u-boot_addr
  2640. Linux kernel bootfile kernel_addr_r kernel_addr
  2641. device tree blob fdtfile fdt_addr_r fdt_addr
  2642. ramdisk ramdiskfile ramdisk_addr_r ramdisk_addr
  2643. The following environment variables may be used and automatically
  2644. updated by the network boot commands ("bootp" and "rarpboot"),
  2645. depending the information provided by your boot server:
  2646. bootfile - see above
  2647. dnsip - IP address of your Domain Name Server
  2648. dnsip2 - IP address of your secondary Domain Name Server
  2649. gatewayip - IP address of the Gateway (Router) to use
  2650. hostname - Target hostname
  2651. ipaddr - see above
  2652. netmask - Subnet Mask
  2653. rootpath - Pathname of the root filesystem on the NFS server
  2654. serverip - see above
  2655. There are two special Environment Variables:
  2656. serial# - contains hardware identification information such
  2657. as type string and/or serial number
  2658. ethaddr - Ethernet address
  2659. These variables can be set only once (usually during manufacturing of
  2660. the board). U-Boot refuses to delete or overwrite these variables
  2661. once they have been set once.
  2662. Further special Environment Variables:
  2663. ver - Contains the U-Boot version string as printed
  2664. with the "version" command. This variable is
  2665. readonly (see CONFIG_VERSION_VARIABLE).
  2666. Please note that changes to some configuration parameters may take
  2667. only effect after the next boot (yes, that's just like Windoze :-).
  2668. Callback functions for environment variables:
  2669. ---------------------------------------------
  2670. For some environment variables, the behavior of u-boot needs to change
  2671. when their values are changed. This functionality allows functions to
  2672. be associated with arbitrary variables. On creation, overwrite, or
  2673. deletion, the callback will provide the opportunity for some side
  2674. effect to happen or for the change to be rejected.
  2675. The callbacks are named and associated with a function using the
  2676. U_BOOT_ENV_CALLBACK macro in your board or driver code.
  2677. These callbacks are associated with variables in one of two ways. The
  2678. static list can be added to by defining CONFIG_ENV_CALLBACK_LIST_STATIC
  2679. in the board configuration to a string that defines a list of
  2680. associations. The list must be in the following format:
  2681. entry = variable_name[:callback_name]
  2682. list = entry[,list]
  2683. If the callback name is not specified, then the callback is deleted.
  2684. Spaces are also allowed anywhere in the list.
  2685. Callbacks can also be associated by defining the ".callbacks" variable
  2686. with the same list format above. Any association in ".callbacks" will
  2687. override any association in the static list. You can define
  2688. CONFIG_ENV_CALLBACK_LIST_DEFAULT to a list (string) to define the
  2689. ".callbacks" environment variable in the default or embedded environment.
  2690. If CONFIG_REGEX is defined, the variable_name above is evaluated as a
  2691. regular expression. This allows multiple variables to be connected to
  2692. the same callback without explicitly listing them all out.
  2693. The signature of the callback functions is:
  2694. int callback(const char *name, const char *value, enum env_op op, int flags)
  2695. * name - changed environment variable
  2696. * value - new value of the environment variable
  2697. * op - operation (create, overwrite, or delete)
  2698. * flags - attributes of the environment variable change, see flags H_* in
  2699. include/search.h
  2700. The return value is 0 if the variable change is accepted and 1 otherwise.
  2701. Command Line Parsing:
  2702. =====================
  2703. There are two different command line parsers available with U-Boot:
  2704. the old "simple" one, and the much more powerful "hush" shell:
  2705. Old, simple command line parser:
  2706. --------------------------------
  2707. - supports environment variables (through setenv / saveenv commands)
  2708. - several commands on one line, separated by ';'
  2709. - variable substitution using "... ${name} ..." syntax
  2710. - special characters ('$', ';') can be escaped by prefixing with '\',
  2711. for example:
  2712. setenv bootcmd bootm \${address}
  2713. - You can also escape text by enclosing in single apostrophes, for example:
  2714. setenv addip 'setenv bootargs $bootargs ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname::off'
  2715. Hush shell:
  2716. -----------
  2717. - similar to Bourne shell, with control structures like
  2718. if...then...else...fi, for...do...done; while...do...done,
  2719. until...do...done, ...
  2720. - supports environment ("global") variables (through setenv / saveenv
  2721. commands) and local shell variables (through standard shell syntax
  2722. "name=value"); only environment variables can be used with "run"
  2723. command
  2724. General rules:
  2725. --------------
  2726. (1) If a command line (or an environment variable executed by a "run"
  2727. command) contains several commands separated by semicolon, and
  2728. one of these commands fails, then the remaining commands will be
  2729. executed anyway.
  2730. (2) If you execute several variables with one call to run (i. e.
  2731. calling run with a list of variables as arguments), any failing
  2732. command will cause "run" to terminate, i. e. the remaining
  2733. variables are not executed.
  2734. Note for Redundant Ethernet Interfaces:
  2735. =======================================
  2736. Some boards come with redundant Ethernet interfaces; U-Boot supports
  2737. such configurations and is capable of automatic selection of a
  2738. "working" interface when needed. MAC assignment works as follows:
  2739. Network interfaces are numbered eth0, eth1, eth2, ... Corresponding
  2740. MAC addresses can be stored in the environment as "ethaddr" (=>eth0),
  2741. "eth1addr" (=>eth1), "eth2addr", ...
  2742. If the network interface stores some valid MAC address (for instance
  2743. in SROM), this is used as default address if there is NO correspon-
  2744. ding setting in the environment; if the corresponding environment
  2745. variable is set, this overrides the settings in the card; that means:
  2746. o If the SROM has a valid MAC address, and there is no address in the
  2747. environment, the SROM's address is used.
  2748. o If there is no valid address in the SROM, and a definition in the
  2749. environment exists, then the value from the environment variable is
  2750. used.
  2751. o If both the SROM and the environment contain a MAC address, and
  2752. both addresses are the same, this MAC address is used.
  2753. o If both the SROM and the environment contain a MAC address, and the
  2754. addresses differ, the value from the environment is used and a
  2755. warning is printed.
  2756. o If neither SROM nor the environment contain a MAC address, an error
  2757. is raised. If CONFIG_NET_RANDOM_ETHADDR is defined, then in this case
  2758. a random, locally-assigned MAC is used.
  2759. If Ethernet drivers implement the 'write_hwaddr' function, valid MAC addresses
  2760. will be programmed into hardware as part of the initialization process. This
  2761. may be skipped by setting the appropriate 'ethmacskip' environment variable.
  2762. The naming convention is as follows:
  2763. "ethmacskip" (=>eth0), "eth1macskip" (=>eth1) etc.
  2764. Image Formats:
  2765. ==============
  2766. U-Boot is capable of booting (and performing other auxiliary operations on)
  2767. images in two formats:
  2768. New uImage format (FIT)
  2769. -----------------------
  2770. Flexible and powerful format based on Flattened Image Tree -- FIT (similar
  2771. to Flattened Device Tree). It allows the use of images with multiple
  2772. components (several kernels, ramdisks, etc.), with contents protected by
  2773. SHA1, MD5 or CRC32. More details are found in the doc/uImage.FIT directory.
  2774. Old uImage format
  2775. -----------------
  2776. Old image format is based on binary files which can be basically anything,
  2777. preceded by a special header; see the definitions in include/image.h for
  2778. details; basically, the header defines the following image properties:
  2779. * Target Operating System (Provisions for OpenBSD, NetBSD, FreeBSD,
  2780. 4.4BSD, Linux, SVR4, Esix, Solaris, Irix, SCO, Dell, NCR, VxWorks,
  2781. LynxOS, pSOS, QNX, RTEMS, INTEGRITY;
  2782. Currently supported: Linux, NetBSD, VxWorks, QNX, RTEMS, LynxOS,
  2783. INTEGRITY).
  2784. * Target CPU Architecture (Provisions for Alpha, ARM, Intel x86,
  2785. IA64, MIPS, NDS32, Nios II, PowerPC, IBM S390, SuperH, Sparc, Sparc 64 Bit;
  2786. Currently supported: ARM, Intel x86, MIPS, NDS32, Nios II, PowerPC).
  2787. * Compression Type (uncompressed, gzip, bzip2)
  2788. * Load Address
  2789. * Entry Point
  2790. * Image Name
  2791. * Image Timestamp
  2792. The header is marked by a special Magic Number, and both the header
  2793. and the data portions of the image are secured against corruption by
  2794. CRC32 checksums.
  2795. Linux Support:
  2796. ==============
  2797. Although U-Boot should support any OS or standalone application
  2798. easily, the main focus has always been on Linux during the design of
  2799. U-Boot.
  2800. U-Boot includes many features that so far have been part of some
  2801. special "boot loader" code within the Linux kernel. Also, any
  2802. "initrd" images to be used are no longer part of one big Linux image;
  2803. instead, kernel and "initrd" are separate images. This implementation
  2804. serves several purposes:
  2805. - the same features can be used for other OS or standalone
  2806. applications (for instance: using compressed images to reduce the
  2807. Flash memory footprint)
  2808. - it becomes much easier to port new Linux kernel versions because
  2809. lots of low-level, hardware dependent stuff are done by U-Boot
  2810. - the same Linux kernel image can now be used with different "initrd"
  2811. images; of course this also means that different kernel images can
  2812. be run with the same "initrd". This makes testing easier (you don't
  2813. have to build a new "zImage.initrd" Linux image when you just
  2814. change a file in your "initrd"). Also, a field-upgrade of the
  2815. software is easier now.
  2816. Linux HOWTO:
  2817. ============
  2818. Porting Linux to U-Boot based systems:
  2819. ---------------------------------------
  2820. U-Boot cannot save you from doing all the necessary modifications to
  2821. configure the Linux device drivers for use with your target hardware
  2822. (no, we don't intend to provide a full virtual machine interface to
  2823. Linux :-).
  2824. But now you can ignore ALL boot loader code (in arch/powerpc/mbxboot).
  2825. Just make sure your machine specific header file (for instance
  2826. include/asm-ppc/tqm8xx.h) includes the same definition of the Board
  2827. Information structure as we define in include/asm-<arch>/u-boot.h,
  2828. and make sure that your definition of IMAP_ADDR uses the same value
  2829. as your U-Boot configuration in CONFIG_SYS_IMMR.
  2830. Note that U-Boot now has a driver model, a unified model for drivers.
  2831. If you are adding a new driver, plumb it into driver model. If there
  2832. is no uclass available, you are encouraged to create one. See
  2833. doc/driver-model.
  2834. Configuring the Linux kernel:
  2835. -----------------------------
  2836. No specific requirements for U-Boot. Make sure you have some root
  2837. device (initial ramdisk, NFS) for your target system.
  2838. Building a Linux Image:
  2839. -----------------------
  2840. With U-Boot, "normal" build targets like "zImage" or "bzImage" are
  2841. not used. If you use recent kernel source, a new build target
  2842. "uImage" will exist which automatically builds an image usable by
  2843. U-Boot. Most older kernels also have support for a "pImage" target,
  2844. which was introduced for our predecessor project PPCBoot and uses a
  2845. 100% compatible format.
  2846. Example:
  2847. make TQM850L_defconfig
  2848. make oldconfig
  2849. make dep
  2850. make uImage
  2851. The "uImage" build target uses a special tool (in 'tools/mkimage') to
  2852. encapsulate a compressed Linux kernel image with header information,
  2853. CRC32 checksum etc. for use with U-Boot. This is what we are doing:
  2854. * build a standard "vmlinux" kernel image (in ELF binary format):
  2855. * convert the kernel into a raw binary image:
  2856. ${CROSS_COMPILE}-objcopy -O binary \
  2857. -R .note -R .comment \
  2858. -S vmlinux linux.bin
  2859. * compress the binary image:
  2860. gzip -9 linux.bin
  2861. * package compressed binary image for U-Boot:
  2862. mkimage -A ppc -O linux -T kernel -C gzip \
  2863. -a 0 -e 0 -n "Linux Kernel Image" \
  2864. -d linux.bin.gz uImage
  2865. The "mkimage" tool can also be used to create ramdisk images for use
  2866. with U-Boot, either separated from the Linux kernel image, or
  2867. combined into one file. "mkimage" encapsulates the images with a 64
  2868. byte header containing information about target architecture,
  2869. operating system, image type, compression method, entry points, time
  2870. stamp, CRC32 checksums, etc.
  2871. "mkimage" can be called in two ways: to verify existing images and
  2872. print the header information, or to build new images.
  2873. In the first form (with "-l" option) mkimage lists the information
  2874. contained in the header of an existing U-Boot image; this includes
  2875. checksum verification:
  2876. tools/mkimage -l image
  2877. -l ==> list image header information
  2878. The second form (with "-d" option) is used to build a U-Boot image
  2879. from a "data file" which is used as image payload:
  2880. tools/mkimage -A arch -O os -T type -C comp -a addr -e ep \
  2881. -n name -d data_file image
  2882. -A ==> set architecture to 'arch'
  2883. -O ==> set operating system to 'os'
  2884. -T ==> set image type to 'type'
  2885. -C ==> set compression type 'comp'
  2886. -a ==> set load address to 'addr' (hex)
  2887. -e ==> set entry point to 'ep' (hex)
  2888. -n ==> set image name to 'name'
  2889. -d ==> use image data from 'datafile'
  2890. Right now, all Linux kernels for PowerPC systems use the same load
  2891. address (0x00000000), but the entry point address depends on the
  2892. kernel version:
  2893. - 2.2.x kernels have the entry point at 0x0000000C,
  2894. - 2.3.x and later kernels have the entry point at 0x00000000.
  2895. So a typical call to build a U-Boot image would read:
  2896. -> tools/mkimage -n '2.4.4 kernel for TQM850L' \
  2897. > -A ppc -O linux -T kernel -C gzip -a 0 -e 0 \
  2898. > -d /opt/elsk/ppc_8xx/usr/src/linux-2.4.4/arch/powerpc/coffboot/vmlinux.gz \
  2899. > examples/uImage.TQM850L
  2900. Image Name: 2.4.4 kernel for TQM850L
  2901. Created: Wed Jul 19 02:34:59 2000
  2902. Image Type: PowerPC Linux Kernel Image (gzip compressed)
  2903. Data Size: 335725 Bytes = 327.86 kB = 0.32 MB
  2904. Load Address: 0x00000000
  2905. Entry Point: 0x00000000
  2906. To verify the contents of the image (or check for corruption):
  2907. -> tools/mkimage -l examples/uImage.TQM850L
  2908. Image Name: 2.4.4 kernel for TQM850L
  2909. Created: Wed Jul 19 02:34:59 2000
  2910. Image Type: PowerPC Linux Kernel Image (gzip compressed)
  2911. Data Size: 335725 Bytes = 327.86 kB = 0.32 MB
  2912. Load Address: 0x00000000
  2913. Entry Point: 0x00000000
  2914. NOTE: for embedded systems where boot time is critical you can trade
  2915. speed for memory and install an UNCOMPRESSED image instead: this
  2916. needs more space in Flash, but boots much faster since it does not
  2917. need to be uncompressed:
  2918. -> gunzip /opt/elsk/ppc_8xx/usr/src/linux-2.4.4/arch/powerpc/coffboot/vmlinux.gz
  2919. -> tools/mkimage -n '2.4.4 kernel for TQM850L' \
  2920. > -A ppc -O linux -T kernel -C none -a 0 -e 0 \
  2921. > -d /opt/elsk/ppc_8xx/usr/src/linux-2.4.4/arch/powerpc/coffboot/vmlinux \
  2922. > examples/uImage.TQM850L-uncompressed
  2923. Image Name: 2.4.4 kernel for TQM850L
  2924. Created: Wed Jul 19 02:34:59 2000
  2925. Image Type: PowerPC Linux Kernel Image (uncompressed)
  2926. Data Size: 792160 Bytes = 773.59 kB = 0.76 MB
  2927. Load Address: 0x00000000
  2928. Entry Point: 0x00000000
  2929. Similar you can build U-Boot images from a 'ramdisk.image.gz' file
  2930. when your kernel is intended to use an initial ramdisk:
  2931. -> tools/mkimage -n 'Simple Ramdisk Image' \
  2932. > -A ppc -O linux -T ramdisk -C gzip \
  2933. > -d /LinuxPPC/images/SIMPLE-ramdisk.image.gz examples/simple-initrd
  2934. Image Name: Simple Ramdisk Image
  2935. Created: Wed Jan 12 14:01:50 2000
  2936. Image Type: PowerPC Linux RAMDisk Image (gzip compressed)
  2937. Data Size: 566530 Bytes = 553.25 kB = 0.54 MB
  2938. Load Address: 0x00000000
  2939. Entry Point: 0x00000000
  2940. The "dumpimage" is a tool to disassemble images built by mkimage. Its "-i"
  2941. option performs the converse operation of the mkimage's second form (the "-d"
  2942. option). Given an image built by mkimage, the dumpimage extracts a "data file"
  2943. from the image:
  2944. tools/dumpimage -i image -T type -p position data_file
  2945. -i ==> extract from the 'image' a specific 'data_file'
  2946. -T ==> set image type to 'type'
  2947. -p ==> 'position' (starting at 0) of the 'data_file' inside the 'image'
  2948. Installing a Linux Image:
  2949. -------------------------
  2950. To downloading a U-Boot image over the serial (console) interface,
  2951. you must convert the image to S-Record format:
  2952. objcopy -I binary -O srec examples/image examples/image.srec
  2953. The 'objcopy' does not understand the information in the U-Boot
  2954. image header, so the resulting S-Record file will be relative to
  2955. address 0x00000000. To load it to a given address, you need to
  2956. specify the target address as 'offset' parameter with the 'loads'
  2957. command.
  2958. Example: install the image to address 0x40100000 (which on the
  2959. TQM8xxL is in the first Flash bank):
  2960. => erase 40100000 401FFFFF
  2961. .......... done
  2962. Erased 8 sectors
  2963. => loads 40100000
  2964. ## Ready for S-Record download ...
  2965. ~>examples/image.srec
  2966. 1 2 3 4 5 6 7 8 9 10 11 12 13 ...
  2967. ...
  2968. 15989 15990 15991 15992
  2969. [file transfer complete]
  2970. [connected]
  2971. ## Start Addr = 0x00000000
  2972. You can check the success of the download using the 'iminfo' command;
  2973. this includes a checksum verification so you can be sure no data
  2974. corruption happened:
  2975. => imi 40100000
  2976. ## Checking Image at 40100000 ...
  2977. Image Name: 2.2.13 for initrd on TQM850L
  2978. Image Type: PowerPC Linux Kernel Image (gzip compressed)
  2979. Data Size: 335725 Bytes = 327 kB = 0 MB
  2980. Load Address: 00000000
  2981. Entry Point: 0000000c
  2982. Verifying Checksum ... OK
  2983. Boot Linux:
  2984. -----------
  2985. The "bootm" command is used to boot an application that is stored in
  2986. memory (RAM or Flash). In case of a Linux kernel image, the contents
  2987. of the "bootargs" environment variable is passed to the kernel as
  2988. parameters. You can check and modify this variable using the
  2989. "printenv" and "setenv" commands:
  2990. => printenv bootargs
  2991. bootargs=root=/dev/ram
  2992. => setenv bootargs root=/dev/nfs rw nfsroot=10.0.0.2:/LinuxPPC nfsaddrs=10.0.0.99:10.0.0.2
  2993. => printenv bootargs
  2994. bootargs=root=/dev/nfs rw nfsroot=10.0.0.2:/LinuxPPC nfsaddrs=10.0.0.99:10.0.0.2
  2995. => bootm 40020000
  2996. ## Booting Linux kernel at 40020000 ...
  2997. Image Name: 2.2.13 for NFS on TQM850L
  2998. Image Type: PowerPC Linux Kernel Image (gzip compressed)
  2999. Data Size: 381681 Bytes = 372 kB = 0 MB
  3000. Load Address: 00000000
  3001. Entry Point: 0000000c
  3002. Verifying Checksum ... OK
  3003. Uncompressing Kernel Image ... OK
  3004. Linux version 2.2.13 (wd@denx.local.net) (gcc version 2.95.2 19991024 (release)) #1 Wed Jul 19 02:35:17 MEST 2000
  3005. Boot arguments: root=/dev/nfs rw nfsroot=10.0.0.2:/LinuxPPC nfsaddrs=10.0.0.99:10.0.0.2
  3006. time_init: decrementer frequency = 187500000/60
  3007. Calibrating delay loop... 49.77 BogoMIPS
  3008. Memory: 15208k available (700k kernel code, 444k data, 32k init) [c0000000,c1000000]
  3009. ...
  3010. If you want to boot a Linux kernel with initial RAM disk, you pass
  3011. the memory addresses of both the kernel and the initrd image (PPBCOOT
  3012. format!) to the "bootm" command:
  3013. => imi 40100000 40200000
  3014. ## Checking Image at 40100000 ...
  3015. Image Name: 2.2.13 for initrd on TQM850L
  3016. Image Type: PowerPC Linux Kernel Image (gzip compressed)
  3017. Data Size: 335725 Bytes = 327 kB = 0 MB
  3018. Load Address: 00000000
  3019. Entry Point: 0000000c
  3020. Verifying Checksum ... OK
  3021. ## Checking Image at 40200000 ...
  3022. Image Name: Simple Ramdisk Image
  3023. Image Type: PowerPC Linux RAMDisk Image (gzip compressed)
  3024. Data Size: 566530 Bytes = 553 kB = 0 MB
  3025. Load Address: 00000000
  3026. Entry Point: 00000000
  3027. Verifying Checksum ... OK
  3028. => bootm 40100000 40200000
  3029. ## Booting Linux kernel at 40100000 ...
  3030. Image Name: 2.2.13 for initrd on TQM850L
  3031. Image Type: PowerPC Linux Kernel Image (gzip compressed)
  3032. Data Size: 335725 Bytes = 327 kB = 0 MB
  3033. Load Address: 00000000
  3034. Entry Point: 0000000c
  3035. Verifying Checksum ... OK
  3036. Uncompressing Kernel Image ... OK
  3037. ## Loading RAMDisk Image at 40200000 ...
  3038. Image Name: Simple Ramdisk Image
  3039. Image Type: PowerPC Linux RAMDisk Image (gzip compressed)
  3040. Data Size: 566530 Bytes = 553 kB = 0 MB
  3041. Load Address: 00000000
  3042. Entry Point: 00000000
  3043. Verifying Checksum ... OK
  3044. Loading Ramdisk ... OK
  3045. Linux version 2.2.13 (wd@denx.local.net) (gcc version 2.95.2 19991024 (release)) #1 Wed Jul 19 02:32:08 MEST 2000
  3046. Boot arguments: root=/dev/ram
  3047. time_init: decrementer frequency = 187500000/60
  3048. Calibrating delay loop... 49.77 BogoMIPS
  3049. ...
  3050. RAMDISK: Compressed image found at block 0
  3051. VFS: Mounted root (ext2 filesystem).
  3052. bash#
  3053. Boot Linux and pass a flat device tree:
  3054. -----------
  3055. First, U-Boot must be compiled with the appropriate defines. See the section
  3056. titled "Linux Kernel Interface" above for a more in depth explanation. The
  3057. following is an example of how to start a kernel and pass an updated
  3058. flat device tree:
  3059. => print oftaddr
  3060. oftaddr=0x300000
  3061. => print oft
  3062. oft=oftrees/mpc8540ads.dtb
  3063. => tftp $oftaddr $oft
  3064. Speed: 1000, full duplex
  3065. Using TSEC0 device
  3066. TFTP from server 192.168.1.1; our IP address is 192.168.1.101
  3067. Filename 'oftrees/mpc8540ads.dtb'.
  3068. Load address: 0x300000
  3069. Loading: #
  3070. done
  3071. Bytes transferred = 4106 (100a hex)
  3072. => tftp $loadaddr $bootfile
  3073. Speed: 1000, full duplex
  3074. Using TSEC0 device
  3075. TFTP from server 192.168.1.1; our IP address is 192.168.1.2
  3076. Filename 'uImage'.
  3077. Load address: 0x200000
  3078. Loading:############
  3079. done
  3080. Bytes transferred = 1029407 (fb51f hex)
  3081. => print loadaddr
  3082. loadaddr=200000
  3083. => print oftaddr
  3084. oftaddr=0x300000
  3085. => bootm $loadaddr - $oftaddr
  3086. ## Booting image at 00200000 ...
  3087. Image Name: Linux-2.6.17-dirty
  3088. Image Type: PowerPC Linux Kernel Image (gzip compressed)
  3089. Data Size: 1029343 Bytes = 1005.2 kB
  3090. Load Address: 00000000
  3091. Entry Point: 00000000
  3092. Verifying Checksum ... OK
  3093. Uncompressing Kernel Image ... OK
  3094. Booting using flat device tree at 0x300000
  3095. Using MPC85xx ADS machine description
  3096. Memory CAM mapping: CAM0=256Mb, CAM1=256Mb, CAM2=0Mb residual: 0Mb
  3097. [snip]
  3098. More About U-Boot Image Types:
  3099. ------------------------------
  3100. U-Boot supports the following image types:
  3101. "Standalone Programs" are directly runnable in the environment
  3102. provided by U-Boot; it is expected that (if they behave
  3103. well) you can continue to work in U-Boot after return from
  3104. the Standalone Program.
  3105. "OS Kernel Images" are usually images of some Embedded OS which
  3106. will take over control completely. Usually these programs
  3107. will install their own set of exception handlers, device
  3108. drivers, set up the MMU, etc. - this means, that you cannot
  3109. expect to re-enter U-Boot except by resetting the CPU.
  3110. "RAMDisk Images" are more or less just data blocks, and their
  3111. parameters (address, size) are passed to an OS kernel that is
  3112. being started.
  3113. "Multi-File Images" contain several images, typically an OS
  3114. (Linux) kernel image and one or more data images like
  3115. RAMDisks. This construct is useful for instance when you want
  3116. to boot over the network using BOOTP etc., where the boot
  3117. server provides just a single image file, but you want to get
  3118. for instance an OS kernel and a RAMDisk image.
  3119. "Multi-File Images" start with a list of image sizes, each
  3120. image size (in bytes) specified by an "uint32_t" in network
  3121. byte order. This list is terminated by an "(uint32_t)0".
  3122. Immediately after the terminating 0 follow the images, one by
  3123. one, all aligned on "uint32_t" boundaries (size rounded up to
  3124. a multiple of 4 bytes).
  3125. "Firmware Images" are binary images containing firmware (like
  3126. U-Boot or FPGA images) which usually will be programmed to
  3127. flash memory.
  3128. "Script files" are command sequences that will be executed by
  3129. U-Boot's command interpreter; this feature is especially
  3130. useful when you configure U-Boot to use a real shell (hush)
  3131. as command interpreter.
  3132. Booting the Linux zImage:
  3133. -------------------------
  3134. On some platforms, it's possible to boot Linux zImage. This is done
  3135. using the "bootz" command. The syntax of "bootz" command is the same
  3136. as the syntax of "bootm" command.
  3137. Note, defining the CONFIG_SUPPORT_RAW_INITRD allows user to supply
  3138. kernel with raw initrd images. The syntax is slightly different, the
  3139. address of the initrd must be augmented by it's size, in the following
  3140. format: "<initrd addres>:<initrd size>".
  3141. Standalone HOWTO:
  3142. =================
  3143. One of the features of U-Boot is that you can dynamically load and
  3144. run "standalone" applications, which can use some resources of
  3145. U-Boot like console I/O functions or interrupt services.
  3146. Two simple examples are included with the sources:
  3147. "Hello World" Demo:
  3148. -------------------
  3149. 'examples/hello_world.c' contains a small "Hello World" Demo
  3150. application; it is automatically compiled when you build U-Boot.
  3151. It's configured to run at address 0x00040004, so you can play with it
  3152. like that:
  3153. => loads
  3154. ## Ready for S-Record download ...
  3155. ~>examples/hello_world.srec
  3156. 1 2 3 4 5 6 7 8 9 10 11 ...
  3157. [file transfer complete]
  3158. [connected]
  3159. ## Start Addr = 0x00040004
  3160. => go 40004 Hello World! This is a test.
  3161. ## Starting application at 0x00040004 ...
  3162. Hello World
  3163. argc = 7
  3164. argv[0] = "40004"
  3165. argv[1] = "Hello"
  3166. argv[2] = "World!"
  3167. argv[3] = "This"
  3168. argv[4] = "is"
  3169. argv[5] = "a"
  3170. argv[6] = "test."
  3171. argv[7] = "<NULL>"
  3172. Hit any key to exit ...
  3173. ## Application terminated, rc = 0x0
  3174. Another example, which demonstrates how to register a CPM interrupt
  3175. handler with the U-Boot code, can be found in 'examples/timer.c'.
  3176. Here, a CPM timer is set up to generate an interrupt every second.
  3177. The interrupt service routine is trivial, just printing a '.'
  3178. character, but this is just a demo program. The application can be
  3179. controlled by the following keys:
  3180. ? - print current values og the CPM Timer registers
  3181. b - enable interrupts and start timer
  3182. e - stop timer and disable interrupts
  3183. q - quit application
  3184. => loads
  3185. ## Ready for S-Record download ...
  3186. ~>examples/timer.srec
  3187. 1 2 3 4 5 6 7 8 9 10 11 ...
  3188. [file transfer complete]
  3189. [connected]
  3190. ## Start Addr = 0x00040004
  3191. => go 40004
  3192. ## Starting application at 0x00040004 ...
  3193. TIMERS=0xfff00980
  3194. Using timer 1
  3195. tgcr @ 0xfff00980, tmr @ 0xfff00990, trr @ 0xfff00994, tcr @ 0xfff00998, tcn @ 0xfff0099c, ter @ 0xfff009b0
  3196. Hit 'b':
  3197. [q, b, e, ?] Set interval 1000000 us
  3198. Enabling timer
  3199. Hit '?':
  3200. [q, b, e, ?] ........
  3201. tgcr=0x1, tmr=0xff1c, trr=0x3d09, tcr=0x0, tcn=0xef6, ter=0x0
  3202. Hit '?':
  3203. [q, b, e, ?] .
  3204. tgcr=0x1, tmr=0xff1c, trr=0x3d09, tcr=0x0, tcn=0x2ad4, ter=0x0
  3205. Hit '?':
  3206. [q, b, e, ?] .
  3207. tgcr=0x1, tmr=0xff1c, trr=0x3d09, tcr=0x0, tcn=0x1efc, ter=0x0
  3208. Hit '?':
  3209. [q, b, e, ?] .
  3210. tgcr=0x1, tmr=0xff1c, trr=0x3d09, tcr=0x0, tcn=0x169d, ter=0x0
  3211. Hit 'e':
  3212. [q, b, e, ?] ...Stopping timer
  3213. Hit 'q':
  3214. [q, b, e, ?] ## Application terminated, rc = 0x0
  3215. Minicom warning:
  3216. ================
  3217. Over time, many people have reported problems when trying to use the
  3218. "minicom" terminal emulation program for serial download. I (wd)
  3219. consider minicom to be broken, and recommend not to use it. Under
  3220. Unix, I recommend to use C-Kermit for general purpose use (and
  3221. especially for kermit binary protocol download ("loadb" command), and
  3222. use "cu" for S-Record download ("loads" command). See
  3223. http://www.denx.de/wiki/view/DULG/SystemSetup#Section_4.3.
  3224. for help with kermit.
  3225. Nevertheless, if you absolutely want to use it try adding this
  3226. configuration to your "File transfer protocols" section:
  3227. Name Program Name U/D FullScr IO-Red. Multi
  3228. X kermit /usr/bin/kermit -i -l %l -s Y U Y N N
  3229. Y kermit /usr/bin/kermit -i -l %l -r N D Y N N
  3230. NetBSD Notes:
  3231. =============
  3232. Starting at version 0.9.2, U-Boot supports NetBSD both as host
  3233. (build U-Boot) and target system (boots NetBSD/mpc8xx).
  3234. Building requires a cross environment; it is known to work on
  3235. NetBSD/i386 with the cross-powerpc-netbsd-1.3 package (you will also
  3236. need gmake since the Makefiles are not compatible with BSD make).
  3237. Note that the cross-powerpc package does not install include files;
  3238. attempting to build U-Boot will fail because <machine/ansi.h> is
  3239. missing. This file has to be installed and patched manually:
  3240. # cd /usr/pkg/cross/powerpc-netbsd/include
  3241. # mkdir powerpc
  3242. # ln -s powerpc machine
  3243. # cp /usr/src/sys/arch/powerpc/include/ansi.h powerpc/ansi.h
  3244. # ${EDIT} powerpc/ansi.h ## must remove __va_list, _BSD_VA_LIST
  3245. Native builds *don't* work due to incompatibilities between native
  3246. and U-Boot include files.
  3247. Booting assumes that (the first part of) the image booted is a
  3248. stage-2 loader which in turn loads and then invokes the kernel
  3249. proper. Loader sources will eventually appear in the NetBSD source
  3250. tree (probably in sys/arc/mpc8xx/stand/u-boot_stage2/); in the
  3251. meantime, see ftp://ftp.denx.de/pub/u-boot/ppcboot_stage2.tar.gz
  3252. Implementation Internals:
  3253. =========================
  3254. The following is not intended to be a complete description of every
  3255. implementation detail. However, it should help to understand the
  3256. inner workings of U-Boot and make it easier to port it to custom
  3257. hardware.
  3258. Initial Stack, Global Data:
  3259. ---------------------------
  3260. The implementation of U-Boot is complicated by the fact that U-Boot
  3261. starts running out of ROM (flash memory), usually without access to
  3262. system RAM (because the memory controller is not initialized yet).
  3263. This means that we don't have writable Data or BSS segments, and BSS
  3264. is not initialized as zero. To be able to get a C environment working
  3265. at all, we have to allocate at least a minimal stack. Implementation
  3266. options for this are defined and restricted by the CPU used: Some CPU
  3267. models provide on-chip memory (like the IMMR area on MPC8xx and
  3268. MPC826x processors), on others (parts of) the data cache can be
  3269. locked as (mis-) used as memory, etc.
  3270. Chris Hallinan posted a good summary of these issues to the
  3271. U-Boot mailing list:
  3272. Subject: RE: [U-Boot-Users] RE: More On Memory Bank x (nothingness)?
  3273. From: "Chris Hallinan" <clh@net1plus.com>
  3274. Date: Mon, 10 Feb 2003 16:43:46 -0500 (22:43 MET)
  3275. ...
  3276. Correct me if I'm wrong, folks, but the way I understand it
  3277. is this: Using DCACHE as initial RAM for Stack, etc, does not
  3278. require any physical RAM backing up the cache. The cleverness
  3279. is that the cache is being used as a temporary supply of
  3280. necessary storage before the SDRAM controller is setup. It's
  3281. beyond the scope of this list to explain the details, but you
  3282. can see how this works by studying the cache architecture and
  3283. operation in the architecture and processor-specific manuals.
  3284. OCM is On Chip Memory, which I believe the 405GP has 4K. It
  3285. is another option for the system designer to use as an
  3286. initial stack/RAM area prior to SDRAM being available. Either
  3287. option should work for you. Using CS 4 should be fine if your
  3288. board designers haven't used it for something that would
  3289. cause you grief during the initial boot! It is frequently not
  3290. used.
  3291. CONFIG_SYS_INIT_RAM_ADDR should be somewhere that won't interfere
  3292. with your processor/board/system design. The default value
  3293. you will find in any recent u-boot distribution in
  3294. walnut.h should work for you. I'd set it to a value larger
  3295. than your SDRAM module. If you have a 64MB SDRAM module, set
  3296. it above 400_0000. Just make sure your board has no resources
  3297. that are supposed to respond to that address! That code in
  3298. start.S has been around a while and should work as is when
  3299. you get the config right.
  3300. -Chris Hallinan
  3301. DS4.COM, Inc.
  3302. It is essential to remember this, since it has some impact on the C
  3303. code for the initialization procedures:
  3304. * Initialized global data (data segment) is read-only. Do not attempt
  3305. to write it.
  3306. * Do not use any uninitialized global data (or implicitly initialized
  3307. as zero data - BSS segment) at all - this is undefined, initiali-
  3308. zation is performed later (when relocating to RAM).
  3309. * Stack space is very limited. Avoid big data buffers or things like
  3310. that.
  3311. Having only the stack as writable memory limits means we cannot use
  3312. normal global data to share information between the code. But it
  3313. turned out that the implementation of U-Boot can be greatly
  3314. simplified by making a global data structure (gd_t) available to all
  3315. functions. We could pass a pointer to this data as argument to _all_
  3316. functions, but this would bloat the code. Instead we use a feature of
  3317. the GCC compiler (Global Register Variables) to share the data: we
  3318. place a pointer (gd) to the global data into a register which we
  3319. reserve for this purpose.
  3320. When choosing a register for such a purpose we are restricted by the
  3321. relevant (E)ABI specifications for the current architecture, and by
  3322. GCC's implementation.
  3323. For PowerPC, the following registers have specific use:
  3324. R1: stack pointer
  3325. R2: reserved for system use
  3326. R3-R4: parameter passing and return values
  3327. R5-R10: parameter passing
  3328. R13: small data area pointer
  3329. R30: GOT pointer
  3330. R31: frame pointer
  3331. (U-Boot also uses R12 as internal GOT pointer. r12
  3332. is a volatile register so r12 needs to be reset when
  3333. going back and forth between asm and C)
  3334. ==> U-Boot will use R2 to hold a pointer to the global data
  3335. Note: on PPC, we could use a static initializer (since the
  3336. address of the global data structure is known at compile time),
  3337. but it turned out that reserving a register results in somewhat
  3338. smaller code - although the code savings are not that big (on
  3339. average for all boards 752 bytes for the whole U-Boot image,
  3340. 624 text + 127 data).
  3341. On ARM, the following registers are used:
  3342. R0: function argument word/integer result
  3343. R1-R3: function argument word
  3344. R9: platform specific
  3345. R10: stack limit (used only if stack checking is enabled)
  3346. R11: argument (frame) pointer
  3347. R12: temporary workspace
  3348. R13: stack pointer
  3349. R14: link register
  3350. R15: program counter
  3351. ==> U-Boot will use R9 to hold a pointer to the global data
  3352. Note: on ARM, only R_ARM_RELATIVE relocations are supported.
  3353. On Nios II, the ABI is documented here:
  3354. http://www.altera.com/literature/hb/nios2/n2cpu_nii51016.pdf
  3355. ==> U-Boot will use gp to hold a pointer to the global data
  3356. Note: on Nios II, we give "-G0" option to gcc and don't use gp
  3357. to access small data sections, so gp is free.
  3358. On NDS32, the following registers are used:
  3359. R0-R1: argument/return
  3360. R2-R5: argument
  3361. R15: temporary register for assembler
  3362. R16: trampoline register
  3363. R28: frame pointer (FP)
  3364. R29: global pointer (GP)
  3365. R30: link register (LP)
  3366. R31: stack pointer (SP)
  3367. PC: program counter (PC)
  3368. ==> U-Boot will use R10 to hold a pointer to the global data
  3369. NOTE: DECLARE_GLOBAL_DATA_PTR must be used with file-global scope,
  3370. or current versions of GCC may "optimize" the code too much.
  3371. On RISC-V, the following registers are used:
  3372. x0: hard-wired zero (zero)
  3373. x1: return address (ra)
  3374. x2: stack pointer (sp)
  3375. x3: global pointer (gp)
  3376. x4: thread pointer (tp)
  3377. x5: link register (t0)
  3378. x8: frame pointer (fp)
  3379. x10-x11: arguments/return values (a0-1)
  3380. x12-x17: arguments (a2-7)
  3381. x28-31: temporaries (t3-6)
  3382. pc: program counter (pc)
  3383. ==> U-Boot will use gp to hold a pointer to the global data
  3384. Memory Management:
  3385. ------------------
  3386. U-Boot runs in system state and uses physical addresses, i.e. the
  3387. MMU is not used either for address mapping nor for memory protection.
  3388. The available memory is mapped to fixed addresses using the memory
  3389. controller. In this process, a contiguous block is formed for each
  3390. memory type (Flash, SDRAM, SRAM), even when it consists of several
  3391. physical memory banks.
  3392. U-Boot is installed in the first 128 kB of the first Flash bank (on
  3393. TQM8xxL modules this is the range 0x40000000 ... 0x4001FFFF). After
  3394. booting and sizing and initializing DRAM, the code relocates itself
  3395. to the upper end of DRAM. Immediately below the U-Boot code some
  3396. memory is reserved for use by malloc() [see CONFIG_SYS_MALLOC_LEN
  3397. configuration setting]. Below that, a structure with global Board
  3398. Info data is placed, followed by the stack (growing downward).
  3399. Additionally, some exception handler code is copied to the low 8 kB
  3400. of DRAM (0x00000000 ... 0x00001FFF).
  3401. So a typical memory configuration with 16 MB of DRAM could look like
  3402. this:
  3403. 0x0000 0000 Exception Vector code
  3404. :
  3405. 0x0000 1FFF
  3406. 0x0000 2000 Free for Application Use
  3407. :
  3408. :
  3409. :
  3410. :
  3411. 0x00FB FF20 Monitor Stack (Growing downward)
  3412. 0x00FB FFAC Board Info Data and permanent copy of global data
  3413. 0x00FC 0000 Malloc Arena
  3414. :
  3415. 0x00FD FFFF
  3416. 0x00FE 0000 RAM Copy of Monitor Code
  3417. ... eventually: LCD or video framebuffer
  3418. ... eventually: pRAM (Protected RAM - unchanged by reset)
  3419. 0x00FF FFFF [End of RAM]
  3420. System Initialization:
  3421. ----------------------
  3422. In the reset configuration, U-Boot starts at the reset entry point
  3423. (on most PowerPC systems at address 0x00000100). Because of the reset
  3424. configuration for CS0# this is a mirror of the on board Flash memory.
  3425. To be able to re-map memory U-Boot then jumps to its link address.
  3426. To be able to implement the initialization code in C, a (small!)
  3427. initial stack is set up in the internal Dual Ported RAM (in case CPUs
  3428. which provide such a feature like), or in a locked part of the data
  3429. cache. After that, U-Boot initializes the CPU core, the caches and
  3430. the SIU.
  3431. Next, all (potentially) available memory banks are mapped using a
  3432. preliminary mapping. For example, we put them on 512 MB boundaries
  3433. (multiples of 0x20000000: SDRAM on 0x00000000 and 0x20000000, Flash
  3434. on 0x40000000 and 0x60000000, SRAM on 0x80000000). Then UPM A is
  3435. programmed for SDRAM access. Using the temporary configuration, a
  3436. simple memory test is run that determines the size of the SDRAM
  3437. banks.
  3438. When there is more than one SDRAM bank, and the banks are of
  3439. different size, the largest is mapped first. For equal size, the first
  3440. bank (CS2#) is mapped first. The first mapping is always for address
  3441. 0x00000000, with any additional banks following immediately to create
  3442. contiguous memory starting from 0.
  3443. Then, the monitor installs itself at the upper end of the SDRAM area
  3444. and allocates memory for use by malloc() and for the global Board
  3445. Info data; also, the exception vector code is copied to the low RAM
  3446. pages, and the final stack is set up.
  3447. Only after this relocation will you have a "normal" C environment;
  3448. until that you are restricted in several ways, mostly because you are
  3449. running from ROM, and because the code will have to be relocated to a
  3450. new address in RAM.
  3451. U-Boot Porting Guide:
  3452. ----------------------
  3453. [Based on messages by Jerry Van Baren in the U-Boot-Users mailing
  3454. list, October 2002]
  3455. int main(int argc, char *argv[])
  3456. {
  3457. sighandler_t no_more_time;
  3458. signal(SIGALRM, no_more_time);
  3459. alarm(PROJECT_DEADLINE - toSec (3 * WEEK));
  3460. if (available_money > available_manpower) {
  3461. Pay consultant to port U-Boot;
  3462. return 0;
  3463. }
  3464. Download latest U-Boot source;
  3465. Subscribe to u-boot mailing list;
  3466. if (clueless)
  3467. email("Hi, I am new to U-Boot, how do I get started?");
  3468. while (learning) {
  3469. Read the README file in the top level directory;
  3470. Read http://www.denx.de/twiki/bin/view/DULG/Manual;
  3471. Read applicable doc/README.*;
  3472. Read the source, Luke;
  3473. /* find . -name "*.[chS]" | xargs grep -i <keyword> */
  3474. }
  3475. if (available_money > toLocalCurrency ($2500))
  3476. Buy a BDI3000;
  3477. else
  3478. Add a lot of aggravation and time;
  3479. if (a similar board exists) { /* hopefully... */
  3480. cp -a board/<similar> board/<myboard>
  3481. cp include/configs/<similar>.h include/configs/<myboard>.h
  3482. } else {
  3483. Create your own board support subdirectory;
  3484. Create your own board include/configs/<myboard>.h file;
  3485. }
  3486. Edit new board/<myboard> files
  3487. Edit new include/configs/<myboard>.h
  3488. while (!accepted) {
  3489. while (!running) {
  3490. do {
  3491. Add / modify source code;
  3492. } until (compiles);
  3493. Debug;
  3494. if (clueless)
  3495. email("Hi, I am having problems...");
  3496. }
  3497. Send patch file to the U-Boot email list;
  3498. if (reasonable critiques)
  3499. Incorporate improvements from email list code review;
  3500. else
  3501. Defend code as written;
  3502. }
  3503. return 0;
  3504. }
  3505. void no_more_time (int sig)
  3506. {
  3507. hire_a_guru();
  3508. }
  3509. Coding Standards:
  3510. -----------------
  3511. All contributions to U-Boot should conform to the Linux kernel
  3512. coding style; see the kernel coding style guide at
  3513. https://www.kernel.org/doc/html/latest/process/coding-style.html, and the
  3514. script "scripts/Lindent" in your Linux kernel source directory.
  3515. Source files originating from a different project (for example the
  3516. MTD subsystem) are generally exempt from these guidelines and are not
  3517. reformatted to ease subsequent migration to newer versions of those
  3518. sources.
  3519. Please note that U-Boot is implemented in C (and to some small parts in
  3520. Assembler); no C++ is used, so please do not use C++ style comments (//)
  3521. in your code.
  3522. Please also stick to the following formatting rules:
  3523. - remove any trailing white space
  3524. - use TAB characters for indentation and vertical alignment, not spaces
  3525. - make sure NOT to use DOS '\r\n' line feeds
  3526. - do not add more than 2 consecutive empty lines to source files
  3527. - do not add trailing empty lines to source files
  3528. Submissions which do not conform to the standards may be returned
  3529. with a request to reformat the changes.
  3530. Submitting Patches:
  3531. -------------------
  3532. Since the number of patches for U-Boot is growing, we need to
  3533. establish some rules. Submissions which do not conform to these rules
  3534. may be rejected, even when they contain important and valuable stuff.
  3535. Please see http://www.denx.de/wiki/U-Boot/Patches for details.
  3536. Patches shall be sent to the u-boot mailing list <u-boot@lists.denx.de>;
  3537. see https://lists.denx.de/listinfo/u-boot
  3538. When you send a patch, please include the following information with
  3539. it:
  3540. * For bug fixes: a description of the bug and how your patch fixes
  3541. this bug. Please try to include a way of demonstrating that the
  3542. patch actually fixes something.
  3543. * For new features: a description of the feature and your
  3544. implementation.
  3545. * For major contributions, add a MAINTAINERS file with your
  3546. information and associated file and directory references.
  3547. * When you add support for a new board, don't forget to add a
  3548. maintainer e-mail address to the boards.cfg file, too.
  3549. * If your patch adds new configuration options, don't forget to
  3550. document these in the README file.
  3551. * The patch itself. If you are using git (which is *strongly*
  3552. recommended) you can easily generate the patch using the
  3553. "git format-patch". If you then use "git send-email" to send it to
  3554. the U-Boot mailing list, you will avoid most of the common problems
  3555. with some other mail clients.
  3556. If you cannot use git, use "diff -purN OLD NEW". If your version of
  3557. diff does not support these options, then get the latest version of
  3558. GNU diff.
  3559. The current directory when running this command shall be the parent
  3560. directory of the U-Boot source tree (i. e. please make sure that
  3561. your patch includes sufficient directory information for the
  3562. affected files).
  3563. We prefer patches as plain text. MIME attachments are discouraged,
  3564. and compressed attachments must not be used.
  3565. * If one logical set of modifications affects or creates several
  3566. files, all these changes shall be submitted in a SINGLE patch file.
  3567. * Changesets that contain different, unrelated modifications shall be
  3568. submitted as SEPARATE patches, one patch per changeset.
  3569. Notes:
  3570. * Before sending the patch, run the buildman script on your patched
  3571. source tree and make sure that no errors or warnings are reported
  3572. for any of the boards.
  3573. * Keep your modifications to the necessary minimum: A patch
  3574. containing several unrelated changes or arbitrary reformats will be
  3575. returned with a request to re-formatting / split it.
  3576. * If you modify existing code, make sure that your new code does not
  3577. add to the memory footprint of the code ;-) Small is beautiful!
  3578. When adding new features, these should compile conditionally only
  3579. (using #ifdef), and the resulting code with the new feature
  3580. disabled must not need more memory than the old code without your
  3581. modification.
  3582. * Remember that there is a size limit of 100 kB per message on the
  3583. u-boot mailing list. Bigger patches will be moderated. If they are
  3584. reasonable and not too big, they will be acknowledged. But patches
  3585. bigger than the size limit should be avoided.