README 182 KB

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