libreboot.texi 444 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748
  1. \input texinfo @c -*-texinfo-*-
  2. @setfilename libreboot.info
  3. @settitle GNU Libreboot documentation
  4. @documentencoding UTF-8
  5. @include constants.texi
  6. @ifclear docsdir
  7. @set docsdir ../
  8. @end ifclear
  9. @ignore
  10. A few notes:
  11. - Nodes cannot share the same name in texinfo files. Therefore I had to change some of the node names. I usually did this by appending the name of the hardware in question to the original node name.
  12. - I removed .html extensions from the text that displays for references, e.g. See bbb_setup.html --> See bbb_setup
  13. - In texinfo, section numbering does not go below the @subsubsection level. Because the Table of Contents section is already a chapter, many sections do not have numbers and therefore do not appear in the texinfo-generated table of contents.
  14. - I removed @anchor statements where they were unused (almost everywhere)
  15. - The @copying section currently appears at the top of the page in html and info output for testing purposes.
  16. TODO:
  17. - Images do not display in .info. Some nodes therefore appear blank.
  18. - Some image files are contained in @uref statments -- consider changing to @image
  19. - Some references to other sections of the documentation are in @emph statements -- consider changing to @ref
  20. - Formatting pdf/ps/dvi output
  21. - Strikethrough
  22. - Internationalization
  23. - Structure: subsubheadings
  24. - Suppliers page (../../suppliers)?
  25. @end ignore
  26. @copying
  27. Copyright @copyright{} 2014, 2015, 2016 Leah Rowe <info@@minifree.org>@*
  28. Copyright @copyright{} 2015 Paul Kocialkowski <contact@@paulk.fr>@*
  29. Copyright @copyright{} 2015 Alex David <opdecirkel@@gmail.com>@*
  30. Copyright @copyright{} 2015 Patrick "P. J." McDermott <pj@@pehjota.net>@*
  31. Copyright @copyright{} 2015 Albin S@"oderqvist@*
  32. Copyright @copyright{} 2015 Jeroen Quint <jezza@@diplomail.ch>@*
  33. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license can be found at @uref{@value{docsdir}licenses/gfdl-1.3.txt,gfdl-1.3.txt}
  34. Updated versions of the license (when available) can be found at @uref{https://www.gnu.org/licenses/licenses.html,https://www.gnu.org/licenses/licenses.html}
  35. @quotation
  36. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
  37. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
  38. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
  39. @end quotation
  40. @end copying
  41. @ifnottex
  42. @paragraphindent 0
  43. @end ifnottex
  44. @titlepage
  45. @title GNU Libreboot documentation
  46. @insertcopying
  47. @end titlepage
  48. @ifnottex
  49. @insertcopying
  50. @end ifnottex
  51. @summarycontents
  52. @contents
  53. @node Top
  54. @top GNU Libreboot documentation
  55. Information about this release can be found by consulting the release notes (see @ref{Libreboot release information,release}). Always check @uref{http://libreboot.org,libreboot.org} for updates.
  56. @menu
  57. * Libreboot release information::
  58. * Table of contents::
  59. * About the libreboot project::
  60. * How do I know what version I'm running?::
  61. Appendix
  62. * GNU Free Documentation License::
  63. @end menu
  64. @node Libreboot release information
  65. @chapter Libreboot release information
  66. Release date: Day Month Year.
  67. Installation instructions can be found @ref{Installation,here}. Building instructions (for source code) can be found @ref{Building libreboot from source, here}.
  68. @menu
  69. * Machines supported in this release::
  70. * Changes for this release relative to r20150518:: Earliest changes last, recent changes first
  71. @end menu
  72. @node Machines supported in this release
  73. @section Machines supported in this release:
  74. @itemize
  75. @item
  76. @strong{ASUS Chromebook C201}
  77. @itemize
  78. @item
  79. Check notes: @xref{ASUS Chromebook C201}. @c @strong{@emph{hcl/c201.html}}
  80. @end itemize
  81. @item
  82. @strong{Gigabyte GA-G41M-ES2L desktop board}
  83. @itemize
  84. @item
  85. Check notes: @xref{Gigabyte GA-G41M-ES2L motherboard}. @c @strong{@emph{hcl/ga-g41m-es2l.html}}
  86. @end itemize
  87. @item
  88. @strong{Intel D510MO desktop board}
  89. @itemize
  90. @item
  91. Check notes: @xref{Intel D510MO motherboard}. @c @strong{@emph{hcl/d510mo.html}}
  92. @end itemize
  93. @item
  94. @strong{ASUS KFSN4-DRE server board}
  95. @itemize
  96. @item
  97. PCB revision 1.05G is the best version (can use 6-core CPUs)
  98. @item
  99. Check notes: @xref{ASUS KFSN4-DRE motherboard}. @c @strong{@emph{hcl/kfsn4-dre.html}}
  100. @end itemize
  101. @item
  102. @strong{ASUS KGPE-D16 server board}
  103. @itemize
  104. @item
  105. Check notes: @xref{ASUS KGPE-D16 motherboard}. @c @strong{@emph{hcl/kgpe-d16.html}}
  106. @end itemize
  107. @item
  108. @strong{ASUS KCMA-D8 desktop/workstation board}
  109. @itemize
  110. @item
  111. Check notes: @xref{ASUS KCMA-D8 motherboard}. @c @strong{@emph{hcl/kcma-d8.html}}
  112. @end itemize
  113. @item
  114. @strong{ThinkPad X60/X60s}
  115. @itemize
  116. @item
  117. You can also remove the motherboard from an X61/X61s and replace it with an X60/X60s motherboard. An X60 Tablet motherboard will also fit inside an X60/X60s.
  118. @end itemize
  119. @item
  120. @strong{ThinkPad X60 Tablet} (1024x768 and 1400x1050) with digitizer support
  121. @itemize
  122. @item
  123. See @ref{Lenovo ThinkPad X60/X60s} for list of supported LCD panels
  124. @item
  125. It is unknown whether an X61 Tablet can have it's mainboard replaced with an X60 Tablet motherboard.
  126. @end itemize
  127. @item
  128. @strong{ThinkPad T60} (Intel GPU) (there are issues; see below):
  129. @itemize
  130. @item
  131. See notes below for exceptions, and see @ref{Supported T60 list} for known working LCD panels.
  132. @item
  133. It is unknown whether a T61 can have it's mainboard replaced with a T60 motherboard.
  134. @item
  135. See @uref{https://libreboot.org/docs/future/index.html#t60_cpu_microcode} @c @strong{@emph{future/index.html#t60_cpu_microcode}}.
  136. @item
  137. T60P (and T60 laptops with ATI GPU) will likely never be supported: @xref{Lenovo ThinkPad T60}. @c @strong{@emph{hcl/index.html#t60_ati_intel}}
  138. @end itemize
  139. @item
  140. @strong{ThinkPad X200}
  141. @itemize
  142. @item
  143. X200S and X200 Tablet are also supported, conditionally; @pxref{X200S and X200 Tablet}. @c @strong{@emph{hcl/x200.html#x200s}}
  144. @item
  145. @strong{ME/AMT}: libreboot removes this, permanently. @xref{GM45 chipsets - remove the ME}. @c @strong{@emph{hcl/gm45_remove_me.html}}
  146. @end itemize
  147. @item
  148. @strong{ThinkPad R400}
  149. @itemize
  150. @item
  151. See @strong{@emph{hcl/r400.html}}
  152. @item
  153. @strong{ME/AMT}: libreboot removes this, permanently. @xref{GM45 chipsets - remove the ME}. @c @strong{@emph{hcl/gm45_remove_me.html}}
  154. @end itemize
  155. @item
  156. @strong{ThinkPad T400}
  157. @itemize
  158. @item
  159. See @strong{@emph{hcl/t400.html}}
  160. @item
  161. @strong{ME/AMT}: libreboot removes this, permanently. @xref{GM45 chipsets - remove the ME}. @c @strong{@emph{hcl/gm45_remove_me.html}}
  162. @end itemize
  163. @item
  164. @strong{ThinkPad T500}
  165. @itemize
  166. @item
  167. See @strong{@emph{hcl/t500.html}}
  168. @item
  169. @strong{ME/AMT}: libreboot removes this, permanently. @xref{GM45 chipsets - remove the ME}. @c @strong{@emph{hcl/gm45_remove_me.html}}
  170. @end itemize
  171. @item
  172. @strong{Apple MacBook1@comma{}1} (MA255LL/A, MA254LL/A, MA472LL/A)
  173. @itemize
  174. @item
  175. @xref{Apple Macbook1-1,Macbook1@comma{}1}. @c See @strong{@emph{hcl/index.html#macbook11}}.
  176. @end itemize
  177. @item
  178. @strong{Apple MacBook2@comma{}1} (MA699LL/A, MA701LL/A, MB061LL/A, MA700LL/A, MB063LL/A, MB062LL/A)
  179. @itemize
  180. @item
  181. @xref{Apple Macbook2-1,Macbook2@comma{}1}. @c See @strong{@emph{hcl/index.html#macbook21}}.
  182. @end itemize
  183. @end itemize
  184. @node Changes for this release relative to r20160818
  185. @section Changes for this release, relative to r20160818 (earliest changes last, recent changes first)
  186. @itemize
  187. @item
  188. Changelog not yet generated. Clone the git repository and check the git logs.
  189. @end itemize
  190. @node Table of contents
  191. @chapter Table of contents
  192. @menu
  193. * Hardware compatibility:: Hardware compatibility list
  194. * Installation:: How to install libreboot
  195. * GNU/Linux distributions:: How to install GNU/Linux on a libreboot system
  196. * Git:: How to use the git repository and build/maintain libreboot from source
  197. * Hardware security::
  198. * Hardware maintenance:: Hardware maintenance
  199. * Depthcharge:: Depthcharge payload
  200. * GRUB:: GRUB payload
  201. * Miscellaneous::
  202. @end menu
  203. @c
  204. @c NOTE: this is one way of structuring the file I tried
  205. @c
  206. @ignore
  207. @include include/hardware-compatibility.texi
  208. @include include/installation.texi
  209. @include include/installing-gnu-linux.texi
  210. @include include/git.texi
  211. @include include/security.texi
  212. @include include/hardware-maintenance.texi
  213. @include include/depthcharge-payload.texi
  214. @include include/grub-payload.texi
  215. @include include/misc.texi
  216. @end ignore
  217. @node Hardware compatibility
  218. @section Hardware compatibility
  219. This section relates to known hardware compatibility in libreboot.
  220. @menu
  221. * List of supported hardware::
  222. * Recommended wifi chipsets::
  223. * GM45 chipsets - remove the ME::
  224. * LCD compatibility on GM45 laptops::
  225. @end menu
  226. @node List of supported hardware
  227. @subsection List of supported hardware
  228. Libreboot supports the following systems in this release:
  229. @itemize @bullet
  230. @item Desktops (AMD, Intel x86)
  231. @itemize @minus
  232. @item Gigabyte GA-G41M-ES2L motherboard @c (@xref{Gigabyte GA-G41M-ES2L motherboard})
  233. @item Intel D510MO motherboard @c (@xref{Intel D510MO motherboard})
  234. @item ASUS KCMA-D8 motherboard @c (@xref{ASUS KCMA-D8 motherboard})
  235. @end itemize
  236. @item Servers/workstations (AMD, x86)
  237. @itemize @minus
  238. @item ASUS KFSN4-DRE motherboard @c (@xref{ASUS KFSN4-DRE motherboard})
  239. @item ASUS KGPE-D16 motherboard @c (@xref{ASUS KGPE-D16 motherboard})
  240. @end itemize
  241. @item Laptops (ARM)
  242. @itemize @minus
  243. @item ASUS Chromebook C201 @c (@xref{ASUS Chromebook C201})
  244. @end itemize
  245. @item Laptops (Intel x86)
  246. @itemize @minus
  247. @item Lenovo ThinkPad X60/X60s @c (@xref{Lenovo ThinkPad X60/X60s})
  248. @item Lenovo ThinkPad X60 Tablet @c (@xref{Lenovo ThinkPad X60 Tablet})
  249. @item Lenovo ThinkPad T60 @c (@xref{Lenovo ThinkPad T60})
  250. @item Lenovo ThinkPad X200 @c (@xref{Lenovo ThinkPad X200})
  251. @item Lenovo ThinkPad R400 @c (@xref{Lenovo ThinkPad R400})
  252. @item Lenovo ThinkPad T400 @c (@xref{Lenovo ThinkPad T400})
  253. @item Lenovo ThinkPad T500 @c (@xref{Lenovo ThinkPad T500})
  254. @item Apple MacBook1,1 @c (@xref{Apple MacBook1,1})
  255. @item Apple MacBook2,1 @c (@xref{Apple MacBook2,1})
  256. @end itemize
  257. @end itemize
  258. `Supported' means that the build scripts know how to build ROM images for these systems, and that the systems have been tested (confirmed working). There may be exceptions; in other words, this is a list of `officially' supported systems.
  259. It is also possible to build ROM images (from source) for other systems (and virtual systems, e.g. QEMU).
  260. @menu
  261. * Gigabyte GA-G41M-ES2L motherboard::
  262. * Intel D510MO motherboard::
  263. * ASUS KCMA-D8 motherboard::
  264. * ASUS KFSN4-DRE motherboard::
  265. * ASUS KGPE-D16 motherboard::
  266. * ASUS Chromebook C201::
  267. * Lenovo ThinkPad X60/X60s::
  268. * Lenovo ThinkPad X60 Tablet::
  269. * Lenovo ThinkPad T60::
  270. * Lenovo ThinkPad X200::
  271. * Lenovo ThinkPad R400::
  272. * Lenovo ThinkPad T400::
  273. * Lenovo ThinkPad T500::
  274. * Apple Macbook1-1:: @c commas cannot be used in node names
  275. * Apple Macbook2-1::
  276. @end menu
  277. @node Gigabyte GA-G41M-ES2L motherboard
  278. @subsubsection Gigabyte GA-G41M-ES2L motherboard
  279. This is a desktop board using intel hardware (circa ~2009, ICH7 southbridge, similar performance-wise to the Libreboot X200. It can make for quite a nifty desktop. Powered by libreboot.
  280. IDE on the board is untested, but it might be possible to use a SATA HDD using an IDE SATA adapter. The SATA ports do work.
  281. Read this post on the libreboot mailing list for more information: @uref{https://lists.nongnu.org/archive/html/libreboot-dev/2015-12/msg00011.html,https://lists.nongnu.org/archive/html/libreboot-dev/2015-12/msg00011.html}
  282. NOTE: by default, a working MAC address is not always set automatically. You need to set a MAC address manually in your GNU/Linux distribution.
  283. On debian-based systems (e.g. Trisquel), you can add this to your /etc/network/interfaces file for your NIC: hwaddress ether macaddressgoeshere
  284. Flashing instructions can be found at @ref{How to update/install,flashrom}.
  285. @node Intel D510MO motherboard
  286. @subsubsection Intel D510MO motherboard
  287. This is a desktop board using intel hardware. It can make for quite a nifty desktop. Powered by libreboot.
  288. NOTE: video framebuffer currently unsupported, only text-mode works, even when booting GNU/Linux.
  289. This can still be used for building a headlesss server. Boot with fb=false
  290. Flashing instructions can be found at @ref{Flashing Intel D510MO}.
  291. @node ASUS KCMA-D8 motherboard
  292. @subsubsection ASUS KCMA-D8 motherboard
  293. This is a desktop board using AMD hardware (Fam10h @strong{and Fam15h} CPUs available). It can also be used for building a high-powered workstation. Powered by libreboot. The coreboot port was done by Timothy Pearson of @uref{https://raptorengineeringinc.com/,Raptor Engineering Inc.} and, working with Timothy (and sponsoring the work) merged into libreboot.
  294. @strong{Memory initialization is still problematic, for some modules. We recommend avoiding Kingston modules..}
  295. Flashing instructions can be found at @ref{How to update/install,flashrom} - note that external flashing is required (e.g. BBB), if the proprietary (ASUS) firmware is currently installed. If you already have libreboot, by default it is possible to re-flash using software running in GNU/Linux on the kcma-d8, without using external hardware.
  296. @itemize
  297. @item
  298. CPU compatibility
  299. @itemize
  300. @item
  301. @strong{Use Opteron 4200 series (works without microcode updates, including hw virt).} 4300 series needs microcode updates, so avoid those CPUs. 4100 series is too old, and mostly untested.
  302. @end itemize
  303. @item
  304. Board status compatibility
  305. @itemize
  306. @item
  307. See @uref{https://raptorengineeringinc.com/coreboot/kcma-d8-status.php,https://raptorengineeringinc.com/coreboot/kcma-d8-status.php}.
  308. @end itemize
  309. @item
  310. Form factor
  311. @itemize
  312. @item
  313. These boards use the SSI EEB 3.61 form factor; make sure that your case supports this. This form factor is similar to E-ATX in that the size is identical, but the position of the screws are different.
  314. @end itemize
  315. @item
  316. IPMI iKVM module add-on
  317. @itemize
  318. @item
  319. Don't use it. It uses proprietary firmware and adds a backdoor (remote out-of-band management chip, similar to the @uref{http://libreboot.org/faq/#intelme,Intel Management Engine}. Fortunately, the firmware is unsigned (possibly to replace) and physically separate from the mainboard since it's on the add-on module, which you don't have to install.
  320. @end itemize
  321. @item
  322. Flash chips
  323. @itemize
  324. @item
  325. 2MiB flash chips are included by default, on these boards. It's on a P-DIP 8 slot (SPI chip). The flash chip can be upgraded to higher sizes: 4MiB, 8MiB or 16MiB. With at least 8MiB, you could feasibly fit a compressed linux+initramfs image (BusyBox+Linux system) into CBFS and boot that, loading it into memory.
  326. @item
  327. Libreboot has configs for 2, 4, 8 and 16 MiB flash chip sizes (default flash chip is 2MiB).
  328. @item
  329. @strong{DO NOT hot-swap the chip with your bare hands. Use a P-DIP 8 chip extractor. These can be found online. See @uref{http://www.coreboot.org/Developer_Manual/Tools#Chip_removal_tools,http://www.coreboot.org/Developer_Manual/Tools#Chip_removal_tools}}
  330. @end itemize
  331. @item
  332. Native graphics initialization
  333. @anchor{native-graphics-kcma-d8}
  334. @itemize
  335. @item
  336. Only text-mode is known to work, but linux(kernel) can initialize the framebuffer display (if it has KMS - kernel mode setting).
  337. @end itemize
  338. @item
  339. Current issues
  340. @itemize
  341. @item
  342. LRDIMM memory modules are currently incompatible
  343. @item
  344. SAS (via PIKE 2008 module) requires non-free option ROM (and SeaBIOS) to boot from it (theoretically possible to replace, but you can put a kernel in CBFS or on SATA and use that to boot GNU, which can be on a SAS drive. The linux kernel can use those SAS drives (via PIKE module) without an option ROM).
  345. @item
  346. IPMI iKVM module (optional add-on card) uses proprietary firmware. Since it's for remote out-of-band management, it's theoretically a backdoor similar to the Intel Management Engine. Fortunately, unlike the ME, this firmware is unsigned which means that a free replacement is theoretically possible. For now, the libreboot project recommends not installing the module. @uref{https://github.com/facebook/openbmc,This project} might be interesting to derive from, for those who want to work on a free replacement. In practise, out-of-band management isn't very useful anyway (or at the very least, it's not a major inconvenience to not have it).
  347. @item
  348. Graphics: only text-mode works. See @ref{native-graphics-kcma-d8,graphics}.
  349. @end itemize
  350. @item
  351. Hardware specifications
  352. @itemize
  353. @item
  354. Check ASUS website for specs
  355. @end itemize
  356. @end itemize
  357. @node ASUS KFSN4-DRE motherboard
  358. @subsubsection ASUS KFSN4-DRE motherboard
  359. This is a server board using AMD hardware (Fam10h). It can also be used for building a high-powered workstation. Powered by libreboot.
  360. Flashing instructions can be found at @ref{How to update/install,flashrom}.
  361. @itemize
  362. @item
  363. Form factor
  364. @itemize
  365. @item
  366. These boards use the SSI EEB 3.61 form factor; make sure that your case supports this. This form factor is similar to E-ATX in that the size is identical, but the position of the screws are different.
  367. @end itemize
  368. @item
  369. Flash chips
  370. @itemize
  371. @item
  372. These boards use LPC flash (not SPI), in a PLCC socket. The default flash size 1MiB (8Mbits), and can be upgraded to 2MiB (16Mbits). SST49LF080A is the default that the board uses. SST49LF016C is an example of a 2MiB (16Mbits) chip, which might work. It is believed that 2MiB (16Mbits) is the maximum size available for the flash chip.
  373. @item
  374. @strong{DO NOT hot-swap the chip with your bare hands. Use a PLCC chip extractor. These can be found online. See @uref{http://www.coreboot.org/Developer_Manual/Tools#Chip_removal_tools,http://www.coreboot.org/Developer_Manual/Tools#Chip_removal_tools}}
  375. @end itemize
  376. @item
  377. Native graphics initialization
  378. @itemize
  379. @item
  380. Native graphics initialization exists (XGI Z9s) for this board. Framebuffer- and text-mode both work. A serial port is also available.
  381. @end itemize
  382. @item
  383. Memory
  384. @itemize
  385. @item
  386. DDR2 533/667 Registered ECC. 16 slots. Total capacity up to 64GiB.
  387. @end itemize
  388. @item
  389. Hex-core CPUs
  390. @itemize
  391. @item
  392. PCB revision 1.05G is the best version of this board (the revision number will be printed on the board), because it can use dual hex-core CPUs (Opteron 2400/8400 series). Other revisions are believed to only support dual quad-core CPUs.
  393. @end itemize
  394. @item
  395. Current issues
  396. @itemize
  397. @item
  398. There seems to be a 30 second bootblock delay (observed by tpearson); the system otherwise boots and works as expected. See @uref{@value{docsdir}text/kfsn4-dre/bootlog.txt,kfsn4-dre/bootlog.txt} - this uses the 'simple' bootblock, while tpearson uses the 'normal' bootblock, which tpearson suspects may be a possible cause. This person says that they will look into it. @uref{http://review.coreboot.org/gitweb?p=board-status.git;a=blob;f=asus/kfsn4-dre/4.0-10101-g039edeb/2015-06-27T03:59:16Z/config.txt;h=4742905c185a93fbda8eb14322dd82c70641aef0;hb=055f5df4e000a97453dfad6c91c2d06ea22b8545,This config} doesn't have the issue.
  399. @item
  400. Text-mode is a bit jittery (but still usable). (the jitter disappears if using KMS, once the kernel starts. The jitter will remain, if booting the kernel in text-mode).
  401. @end itemize
  402. @item
  403. Other information
  404. @itemize
  405. @item
  406. @uref{ftp://ftp.sgi.com/public/Technical%20Support/Pdf%20files/Asus/kfsn4-dre.pdf,specifications}
  407. @end itemize
  408. @end itemize
  409. @node ASUS KGPE-D16 motherboard @c TODO: Nodes?
  410. @subsubsection ASUS KGPE-D16 server/workstation board
  411. This is a server board using AMD hardware (Fam10h @strong{and Fam15h} CPUs available). It can also be used for building a high-powered workstation. Powered by libreboot. The coreboot port was done by Timothy Pearson of @uref{https://raptorengineeringinc.com/,Raptor Engineering Inc.} and, working with Timothy (and sponsoring the work) merged into libreboot.
  412. @strong{Memory initialization is still problematic, for some modules. We recommend avoiding Kingston modules..}
  413. Flashing instructions can be found at @ref{How to update/install,flashrom} - note that external flashing is required (e.g. BBB), if the proprietary (ASUS) firmware is currently installed. If you already have libreboot, by default it is possible to re-flash using software running in GNU/Linux on the KGPE-D16, without using external hardware.
  414. @itemize
  415. @item
  416. CPU compatibility
  417. @itemize @minus
  418. @item
  419. @strong{Use Opteron 6200 series (works without microcode updates, including hw virt).}
  420. 6300 series needs microcode updates, so avoid those CPUs. 6100 series is too old, and mostly untested.
  421. @end itemize
  422. @item
  423. Board status compatibility
  424. @itemize @minus
  425. @item
  426. See @uref{https://raptorengineeringinc.com/coreboot/kgpe-d16-status.php,https://raptorengineeringinc.com/coreboot/kgpe-d16-status.php}.
  427. @end itemize
  428. @item
  429. Form factor
  430. @itemize @minus
  431. @item
  432. These boards use the SSI EEB 3.61 form factor; make sure that your case supports this. This form factor is similar to E-ATX in that the size is identical, but the position of the screws are different.
  433. @end itemize
  434. @item
  435. IPMI iKVM module add-on
  436. @itemize @minus
  437. @item
  438. Don't use it. It uses proprietary firmware and adds a backdoor (remote out-of-band management chip, similar to the @uref{http://libreboot.org/faq/#intelme,Intel Management Engine}. Fortunately, the firmware is unsigned (possibly to replace) and physically separate from the mainboard since it's on the add-on module, which you don't have to install.
  439. @end itemize
  440. @item
  441. Flash chips
  442. @itemize @minus
  443. @item
  444. 2MiB flash chips are included by default, on these boards. It's on a P-DIP 8 slot (SPI chip). The flash chip can be upgraded to higher sizes: 4MiB, 8MiB or 16MiB. With at least 8MiB, you could feasibly fit a compressed linux+initramfs image (BusyBox+Linux system) into CBFS and boot that, loading it into memory.
  445. @item
  446. Libreboot has configs for 2, 4, 8 and 16 MiB flash chip sizes (default flash chip is 2MiB).
  447. @item
  448. @strong{DO NOT hot-swap the chip with your bare hands. Use a P-DIP 8 chip extractor. These can be found online. See @uref{http://www.coreboot.org/Developer_Manual/Tools#Chip_removal_tools,http://www.coreboot.org/Developer_Manual/Tools#Chip_removal_tools}}
  449. @end itemize
  450. @item
  451. Native graphics initialization
  452. @anchor{native-graphics-kgpe-d16}
  453. @itemize @minus
  454. @item
  455. Only text-mode is known to work, but linux(kernel) can initialize the framebuffer display (if it has KMS - kernel mode setting).
  456. @end itemize
  457. @item
  458. Current issues
  459. @itemize @minus
  460. @item
  461. LRDIMM memory modules are currently incompatible
  462. @item
  463. SAS (via PIKE 2008 module) requires non-free option ROM (and SeaBIOS) to boot from it (theoretically possible to replace, but you can put a kernel in CBFS or on SATA and use that to boot GNU, which can be on a SAS drive. The linux kernel can use those SAS drives (via PIKE module) without an option ROM).
  464. @item
  465. IPMI iKVM module (optional add-on card) uses proprietary firmware. Since it's for remote out-of-band management, it's theoretically a backdoor similar to the Intel Management Engine. Fortunately, unlike the ME, this firmware is unsigned which means that a free replacement is theoretically possible. For now, the libreboot project recommends not installing the module. @uref{https://github.com/facebook/openbmc,This project} might be interesting to derive from, for those who want to work on a free replacement. In practise, out-of-band management isn't very useful anyway (or at the very least, it's not a major inconvenience to not have it).
  466. @item
  467. Graphics: only text-mode works. See @ref{native-graphics-kgpe-d16,graphics}. @c @ref{#graphics,#graphics}
  468. @end itemize
  469. @end itemize
  470. @menu
  471. * ASUS KGPE-D16 Hardware specifications::
  472. @end menu
  473. @node ASUS KGPE-D16 Hardware specifications
  474. @c @subsubheading ASUS KGPE-D16 Hardware specifications
  475. @itemize
  476. @item Processor / system bus
  477. @itemize
  478. @item
  479. 2 CPU sockets (G34 compatible)
  480. @item
  481. HyperTransport(TM) Technology 3.0 @c FIX FIX FIX -- TM
  482. @item
  483. CPUs supported:
  484. @itemize
  485. @item
  486. AMD Opteron 6100 series (Fam10h. No IOMMU support. @strong{Not} recommended - old. View errata datasheet here: @uref{http://support.amd.com/TechDocs/41322_10h_Rev_Gd.pdf,http://support.amd.com/TechDocs/41322_10h_Rev_Gd.pdf})
  487. @item
  488. AMD Opteron 6200 series (bulldozer cores) (Fam15h, with full IOMMU support in libreboot. @strong{highly recommended - fast, and works well without microcode updates, including virtualization})
  489. @item
  490. AMD Opteron 6300 series (piledriver cores) (Fam15h, with full IOMMU support in libreboot. @strong{AVOID LIKE THE PLAGUE - virtualization is broken without microcode updates}
  491. @item
  492. NOTE: 6300 series CPUs have buggy microcode built-in, and libreboot recommends avoiding the updates. The 6200 series CPUs have more reliable microcode.
  493. Look at this errata datasheet: @uref{http://support.amd.com/TechDocs/48063_15h_Mod_00h-0Fh_Rev_Guide.pdf,http://support.amd.com/TechDocs/48063_15h_Mod_00h-0Fh_Rev_Guide.pdf}
  494. (see Errata 734 - this is what kills the 6300 series)
  495. @end itemize
  496. @item
  497. 6.4 GT/s per link (triple link)
  498. @end itemize
  499. @item Core logic
  500. @itemize
  501. @item
  502. AMD SR5690
  503. @item
  504. AMD SP5100
  505. @end itemize
  506. @item Memory compatibility with libreboot
  507. @itemize
  508. @item
  509. @strong{Total Slots:} 16 (4-channel per CPU, 8 DIMM per CPU), ECC
  510. @item
  511. @strong{Capacity:} Maximum up to 256GB RDIMM
  512. @item
  513. @strong{Memory Type that is compatible:}
  514. @itemize
  515. @item
  516. DDR3 1600/1333/1066/800 UDIMM*
  517. @item
  518. DDR3 1600/1333/1066/800 RDIMM*
  519. @end itemize
  520. @item
  521. @strong{Compatible sizes per memory module:}
  522. @itemize
  523. @item
  524. 16GB, 8GB, 4GB, 3GB, 2GB, 1GB RDIMM
  525. @item
  526. 8GB, 4GB, 2GB, 1GB UDIMM
  527. @end itemize
  528. @end itemize
  529. @item Expansion slots
  530. @itemize
  531. @item
  532. @strong{Total slot:} 6
  533. @item
  534. @strong{Slot Location 1:} PCI 32bit/33MHz
  535. @item
  536. @strong{Slot Location 2:} PCI-E x16 (Gen2 X8 Link)
  537. @item
  538. @strong{Slot Location 3:} PCI-E x16 (Gen2 X16 Link), Auto switch to x8 link if slot 2 is occupied
  539. @item
  540. @strong{Slot Location 4:} PCI-E x8 (Gen2 X4 Link)
  541. @item
  542. @strong{Slot Location 5:} PCI-E x16 (Gen2 X16 Link)
  543. @item
  544. @strong{Slot Location 6:} PCI-E x16 (Gen2 X16 Link), Auto turn off if slot 5 is occupied, For 1U FH/FL Card, MIO supported
  545. @item
  546. @strong{Additional Slot 1:} PIKE slot (for SAS drives. See notes above)
  547. @item
  548. Follow SSI Location#
  549. @end itemize
  550. @item Form factor
  551. @itemize
  552. @item
  553. SSI EEB 3.61 (12"x13")
  554. @end itemize
  555. @item ASUS features
  556. @itemize
  557. @item
  558. Fan Speed Control
  559. @item
  560. Rack Ready (Rack and Pedestal dual use)
  561. @end itemize
  562. @item Storage
  563. @itemize
  564. @item
  565. @strong{SATA controller:}
  566. @itemize
  567. @item
  568. AMD SP5100
  569. @item
  570. 6 x SATA2 300MB/s
  571. @end itemize
  572. @item
  573. @strong{SAS/SATA Controller:}
  574. @itemize
  575. @item
  576. ASUS PIKE2008 3Gbps 8-port SAS card included
  577. @end itemize
  578. @end itemize
  579. @item Networking
  580. @itemize
  581. @item
  582. 2 x Intel@registeredsymbol{} 82574L + 1 x Mgmt LAN
  583. @end itemize
  584. @item Graphics
  585. @itemize
  586. @item
  587. Aspeed AST2050 with 8MB VRAM
  588. @end itemize
  589. @item On board I/O
  590. @itemize
  591. @item
  592. 1 x PSU Power Connector (24-pin SSI power connector + 8-pin SSI 12V + 8-pin SSI 12V power connector)
  593. @item
  594. 1 x Management Connector , Onboard socket for management card
  595. @item
  596. 3 x USB pin header , Up to 6 Devices
  597. @item
  598. 1 x Internal A Type USB Port
  599. @item
  600. 8 x Fan Header , 4pin (3pin/4pin fan dual support)
  601. @item
  602. 2 x SMBus
  603. @item
  604. 1 x Serial Port Header
  605. @item
  606. 1 x TPM header
  607. @item
  608. 1 x PS/2 KB/MS port
  609. @end itemize
  610. @item Back I/O ports
  611. @itemize
  612. @item
  613. 1 x External Serial Port
  614. @item
  615. 2 x External USB Port
  616. @item
  617. 1 x VGA Port
  618. @item
  619. 2 x RJ-45
  620. @item
  621. 1 x PS/2 KB/Mouse
  622. @end itemize
  623. @item Environment
  624. @itemize
  625. @item
  626. @strong{Operation temperature:} 10C ~ 35C
  627. @item
  628. @strong{Non operation temperature:} -40C ~ 70C
  629. @item
  630. @strong{Non operation humidity:} 20% ~ 90% ( Non condensing)
  631. @end itemize
  632. @item Monitoring
  633. @itemize
  634. @item
  635. CPU temperatures
  636. @item
  637. Fan speed (RPM)
  638. @end itemize
  639. @item Note
  640. @itemize
  641. @item
  642. DDR3 1600 can only be supported with AMD Opteron 6300/6200 series processor
  643. @end itemize
  644. @end itemize
  645. @node ASUS Chromebook C201
  646. @subsubsection ASUS Chromebook C201
  647. This is a Chromebook, using the Rockchip RK3288 SoC. It uses an ARM CPU, and has free EC firmware (unlike some other laptops). More RK3288-based laptops will be added to libreboot at a later date.
  648. Paul Kocialkowski, a @uref{http://www.replicant.us/,Replicant} developer, ported this laptop to libreboot. Thank you, Paul!
  649. @strong{More info will be added later, including build/installation instructions. The board is supported in libreboot, however, and has been confirmed to work.}
  650. Flashing instructions can be found at @ref{How to update/install,flashrom}.
  651. @menu
  652. * Intent:: Google's intent with CrOS devices
  653. * Considerations:: Considerations about ChromeOS and free operating systems
  654. * Video blobs:: Caution: Video acceleration requires a non-free blob, software rendering can be used instead
  655. * WiFi blobs:: Caution: WiFi requires a non-free blob, a USB dongle can be used instead
  656. * EC Firmware:: EC firmware is free software!
  657. * Microcode:: No microcode!
  658. * Depthcharge payload - CrOS::
  659. * The Screw:: Flash chip write protection: the screw
  660. @end menu
  661. @node Intent
  662. @ifinfo
  663. @subsubheading Google's intent with CrOS devices
  664. @end ifinfo
  665. CrOS (Chromium OS/Chrome OS) devices, such as Chromebooks, were not designed with the intent of bringing more freedom to users. However, they run with a lot of free software at the boot software and embedded controller levels, since free software gives Google enough flexibility to optimize various aspects such as boot time and most importantly, to implement the CrOS security system, that involves various aspects of the software. Google does hire a lot of Coreboot developers, who are generally friendly to the free software movement and try to be good members of the free software community, by contributing code back.
  666. CrOS devices are designed (from the factory) to actually coax the user into using @uref{https://www.gnu.org/philosophy/who-does-that-server-really-serve.en.html,proprietary web services} (SaaSS) that invade the user's privacy (ChromeOS is literally just the Google Chrome browser when you boot up, itself proprietary and comes with proprietary add-ons like flash. It's only intended for SaaSS, not actual, real computing). Google is even a member of the @emph{PRISM} program, as outlined by Edward Snowden. See notes about ChromeOS below. The libreboot project recommends that the user replace the default @emph{ChromeOS} with a distribution that can be used in freedom, without invading the user's privacy.
  667. We also use a similar argument for the MacBook and the ThinkPads that are supported in libreboot. Those laptops are supported, in spite of Apple and Lenovo, companies which are actually @emph{hostile} to the free software movement.
  668. @node Considerations
  669. @ifinfo
  670. @subsubheading Considerations about ChromeOS and free operating systems
  671. @end ifinfo
  672. This laptop comes preinstalled (from the factory) with Google ChromeOS. This is a GNU/Linux distribution, but it's not general purpose and it comes with proprietary software. It's designed for @emph{@uref{https://www.gnu.org/philosophy/who-does-that-server-really-serve.en.html,SaaSS}}. Libreboot recommends that users of this laptop replace it with another distribution.
  673. The FSF has a @uref{https://www.gnu.org/distros/free-distros.html,list of distributions} that are 100% free software. Only one of them is confirmed to work on ARM CrOS devices. Parabola looks hopeful: @uref{https://www.parabola.nu/news/parabola-supports-armv7/,https://www.parabola.nu/news/parabola-supports-armv7/}
  674. The libreboot project would like to see all FSF-endorsed distro projects port to these laptops. This includes Trisquel, GuixSD and others. And ProteanOS. Maybe even LibreCMC. The more the merrier. We need them, badly.
  675. @strong{We need these distributions to be ported as soon as possible.}
  676. @node Video blobs
  677. @ifinfo
  678. @subsubheading Caution: Video acceleration requires a non-free blob, software rendering can be used instead.
  679. @end ifinfo
  680. The Tamil driver source code for the onboard Mali T GPU is not released. The developer has so-far withheld it. Until that is released, the only way to use video (in freedom) on this laptop is to not have video acceleration, by making sure not to install the relevant blob. Most tasks can still be performed without video acceleration, without any noticeable performance penalty.
  681. In practise, this means that certain things like games, blender and GNOME shell (or other fancy desktops) won't work well. The libreboot project recommends a lightweight desktop which does not need video acceleration, such as @emph{XFCE} or @emph{LXDE}.
  682. The Tamil developer wrote this blog post, which sheds light on the story: @uref{http://libv.livejournal.com/27461.html,http://libv.livejournal.com/27461.html}
  683. @node WiFi blobs
  684. @ifinfo
  685. @subsubheading Caution: WiFi requires a non-free blob, a USB dongle can be used instead.
  686. @end ifinfo
  687. These laptops have non-removeable (soldered on) WiFi chips, which require non-free firmware in the Linux kernel in order to work.
  688. The libreboot project recommends using an external USB wifi dongle that works with free software. @xref{Recommended wifi chipsets}. @c See @uref{index.html#recommended_wifi,index.html#recommended_wifi}.
  689. There are 2 companies (endorsed by the Free Software Foundation, under their @emph{Respects your Freedom} guidelines), that sell USB WiFi dongles guaranteed to work with free software (i.e. linux-libre kernel):
  690. @itemize
  691. @item
  692. @uref{https://www.thinkpenguin.com/gnu-linux/penguin-wireless-n-usb-adapter-gnu-linux-tpe-n150usb,ThinkPenguin sells them} (company based in USA)
  693. @item
  694. @uref{https://tehnoetic.com/tehnoetic-wireless-adapter-gnu-linux-libre-tet-n150,Tehnoetic sells them} (company based in Europe)
  695. @end itemize
  696. These wifi dongles use the AR9271 (atheros) chipset, supported by the free @emph{ath9k_htc} driver in the Linux kernel. They work in @emph{linux-libre} too.
  697. @node EC Firmware
  698. @ifinfo
  699. @subsubheading EC firmware is free software!
  700. @end ifinfo
  701. It's free software. Google provides the source. Build scripts will be added later, with EC sources provided in libreboot, and builds of the EC firmware.
  702. This is unlike the other current libreboot laptops (Intel based). In practise, you can (if you do without the video/wifi blobs, and replace ChromeOS with a distribution that respects your freedom) be more free when using one of these laptops.
  703. The libreboot FAQ briefly describes what an @emph{EC} is: @uref{http://libreboot.org/faq/#firmware-ec,http://libreboot.org/faq/#firmware-ec}
  704. @node Microcode
  705. @ifinfo
  706. @subsubheading No microcode!
  707. @end ifinfo
  708. Unlike x86 (e.g. Intel/AMD) CPUs, ARM CPUs do not use microcode, not even built in. On the Intel/AMD based libreboot systems, there is still microcode in the CPU (not considered problematic by the FSF, provided that it is reasonably trusted to not be malicious, since it's part of the hardware and read-only), but we exclude microcode updates (volatile updates which are uploaded at boot time by the boot firmware, if present), which are proprietary software.
  709. On ARM CPUs, the instruction set is implemented in circuitry, without microcode.
  710. @node Depthcharge payload - CrOS
  711. @ifinfo
  712. @subsubheading Depthcharge payload
  713. @end ifinfo
  714. These systems do not use the GRUB payload. Instead, they use a payload called depthcharge, which is common on CrOS devices. This is free software, maintained by Google.
  715. @node The Screw
  716. @ifinfo
  717. @subsubheading Flash chip write protection: the screw
  718. @end ifinfo
  719. It's next to the flash chip. Unscrew it, and the flash chip is read-write. Screw it back in, and the flash chip is read-only. It's called the screw.
  720. @emph{The screw} is accessible by removing other screws and gently prying off the upper shell, where the flash chip and the screw are then directly accessible. User flashing from software is possible, without having to externally re-flash, but the flash chip is SPI (SOIC-8 form factor) so you can also externally re-flash if you want to. In practise, you only need to externally re-flash if you brick the laptop; read @ref{How to program an SPI flash chip with BeagleBone Black or Teensy 3.1,BBB setup} for an example of how to set up an SPI programmer.
  721. Write protection is useful, because it prevents the firmware from being re-flashed by any malicious software that might become executed on your GNU/Linux system, as root. In other words, it can prevent a firmware-level @emph{evil maid} attack. It's possible to write protect on all current libreboot systems, but CrOS devices make it easy. The screw is such a stupidly simple idea, which all designs should implement.
  722. @node Lenovo ThinkPad X60/X60s
  723. @subsubsection Lenovo ThinkPad X60/X60s
  724. Native gpu initialization (`native graphics') which replaces the proprietary VGA Option ROM (`@uref{https://en.wikipedia.org/wiki/Video_BIOS,Video BIOS}' or `VBIOS'), all known LCD panels are currently compatible:
  725. To find what LCD panel you have, see: @ref{Get EDID - Find out the name of your LCD panel,Get EDID}.
  726. @itemize
  727. @item
  728. TMD-Toshiba LTD121ECHB: #
  729. @item
  730. CMO N121X5-L06: #
  731. @item
  732. Samsung LTN121XJ-L07: #
  733. @item
  734. BOE-Hydis HT121X01-101: #
  735. @end itemize
  736. You can remove an X61/X61s motherboard from the chassis and install an X60/X60s motherboard in it's place (for flashing libreboot). The chassis is mostly identical and the motherboards are the same shape/size.
  737. The X60 typically comes with an Intel wifi chipset which does not work at all without proprietary firmware, and while Lenovo BIOS is running the system will refuse to boot if you replace the card. Fortunately it is very easily replaced; just remove the card and install another one @strong{after} libreboot is installed. See Recommended wifi chipsets for replacements. @c ADD REF
  738. @node Lenovo ThinkPad X60 Tablet
  739. @subsubsection Lenovo ThinkPad X60 Tablets
  740. Native gpu initialization (`native graphics') which replaces the proprietary VGA Option ROM (`@uref{https://en.wikipedia.org/wiki/Video_BIOS,Video BIOS}' or `VBIOS').
  741. To find what LCD panel you have, see: @ref{Get EDID - Find out the name of your LCD panel,Get EDID}. @c @uref{../misc/index.html#get_edid_panelname,../misc/index.html#get_edid_panelname}.
  742. There are 5 known LCD panels for the X60 Tablet:
  743. @itemize
  744. @item
  745. @strong{X60T XGA (1024x768):}
  746. @itemize
  747. @item
  748. BOE-Hydis HV121X03-100 (works)
  749. @item
  750. Samsung LTN121XP01 (does not work. blank screen)
  751. @item
  752. BOE-Hydis HT12X21-351 (does not work. blank screen)
  753. @end itemize
  754. @item
  755. @strong{X60T SXGA+ (1400x1050):}
  756. @itemize
  757. @item
  758. BOE-Hydis HV121P01-100 (works)
  759. @item
  760. BOE-Hydis HV121P01-101 (works)
  761. @end itemize
  762. @end itemize
  763. Most X60Ts only have digitizer (pen), but some have finger (touch) aswell as pen; finger/multitouch doesn't work, only digitizer (pen) does.
  764. You can remove an X61/X61s motherboard from the chassis and install an X60/X60s motherboard in its place (for flashing libreboot). The chassis is mostly identical and the motherboards are the same shape/size. @strong{It is unknown if the same applies between the X60 Tablet and the X61 Tablet}.
  765. The X60 Tablet typically comes with an Intel wifi chipset which does not work at all without proprietary firmware, and while Lenovo BIOS is running the system will refuse to boot if you replace the card. Fortunately it is very easily replaced; just remove the card and install another one @strong{after} libreboot is installed. See Recommended wifi chipsets for replacements. @c ADD REF
  766. A user with a X60T that has digitizer+finger support, reported that they could get finger input working. They used linuxwacom at git tag 0.25.99.2 and had the following in their xorg.conf:
  767. @verbatim
  768. # Now, for some reason (probably a bug in linuxwacom),
  769. # the 'Touch=on' directive gets reset to 'off'.
  770. # So you'll need to do
  771. # $ xsetwacom --set WTouch Touch on
  772. #
  773. # tested with linuxwacom git 42a42b2a8636abc9e105559e5dea467163499de7
  774. Section "Monitor"
  775. Identifier "<default monitor>"
  776. DisplaySize 245 184
  777. EndSection
  778. Section "Screen"
  779. Identifier "Default Screen Section"
  780. Monitor "<default monitor<"
  781. EndSection
  782. Section "InputDevice"
  783. Identifier "WTouch"
  784. Driver "wacom"
  785. Option "Device" "/dev/ttyS0"
  786. # Option "DebugLevel" "12"
  787. Option "BaudRate" "38400"
  788. Option "Type" "touch"
  789. Option "Touch" "on"
  790. Option "Gesture" "on"
  791. Option "ForceDevice" "ISDV4"
  792. # Option "KeepShape" "on"
  793. Option "Mode" "Absolute"
  794. Option "RawSample" "2"
  795. # Option "TPCButton" "off"
  796. Option "TopX" "17"
  797. Option "TopY" "53"
  798. Option "BottomX" "961"
  799. Option "BottomY" "985"
  800. EndSection
  801. Section "ServerLayout"
  802. Identifier "Default Layout"
  803. Screen "Default Screen Section"
  804. InputDevice "WTouch" "SendCoreEvents"
  805. EndSection
  806. @end verbatim
  807. @node Lenovo ThinkPad T60
  808. @subsubsection Lenovo ThinkPad T60
  809. If your T60 is a 14.1" or 15.1" model with an ATI GPU, it won't work with libreboot by default but you can replace the motherboard with another T60 motherboard that has an Intel GPU, and then libreboot should work.
  810. As far as I know, 14.1" (Intel GPU) and 15.1" (Intel GPU) T60 motherboards are the same, where 'spacers' are used on the 15.1" T60. In any case, it makes sense to find one that is guaranteed to fit in your chassis.
  811. There is also a 15.4" T60 with Intel GPU.
  812. Note: the T60@strong{p} laptops all have ATI graphics. The T60p laptops cannot be used with libreboot under any circumstances.
  813. The following T60 motherboard (see area highlighted in white) shows an empty space where the ATI GPU would be (this particular motherboard has an Intel GPU):@*@* @image{@value{docsdir}images/t60_dev/t60_unbrick,,,,jpg}
  814. The reason that the ATI GPU on T60 is unsupported is due to the VBIOS (Video BIOS) which is non-free. The VBIOS for the Intel GPU on X60/T60 has been reverse engineered, and replaced with Free Software and so will work in libreboot.
  815. The 'Video BIOS' is what initializes graphics.
  816. See: @uref{https://en.wikipedia.org/wiki/Video_BIOS,https://en.wikipedia.org/wiki/Video_BIOS}.@* In fact, lack of free VBIOS in general is a big problem in coreboot, and is one reason (among others) why many ports for coreboot are unsuitable for libreboot's purpose.
  817. Theoretically, the ThinkPad T60 with ATI GPU can work with libreboot and have ROM images compiled for it, however in practise it would not be usable as a laptop because there would be no visual display at all. That being said, such a configuration is acceptable for use in a 'headless' server setup (with serial and/or ssh console as the display).
  818. @menu
  819. * Supported T60 list::
  820. @end menu
  821. @node Supported T60 list
  822. Native gpu initialization ('native graphics') which replaces the proprietary VGA Option ROM ('@uref{https://en.wikipedia.org/wiki/Video_BIOS,Video BIOS}' or 'VBIOS').
  823. To find what LCD panel you have, see: @ref{Get EDID - Find out the name of your LCD panel,Get EDID}. @c @uref{../misc/index.html#get_edid_panelname,../misc/index.html#get_edid_panelname}.
  824. @strong{Some T60s have ATI GPUs, and all T60P laptops have ATI GPUs These are incompatible! See @ref{Lenovo ThinkPad T60,t60_ati_intel} for how to remedy this.}
  825. How to dump the EDID:@*
  826. Tested LCD panels: @strong{working(compatible)}
  827. @itemize
  828. @item
  829. TMD-Toshiba LTD141EN9B (14.1" 1400x1050) (FRU P/N 41W1478 recommended for the inverter board)
  830. @item
  831. Samsung LTN141P4-L02 (14.1" 1400x1050) (FRU P/N 41W1478 recommended for the inverter board)
  832. @item
  833. LG-Philips LP150E05-A2K1 (15.1" 1400x1050) (P/N 42T0078 FRU 42T0079 or P/N 41W1338 recommended for the inverter board)
  834. @item
  835. Samsung LTN150P4-L01 (15.1" 1400x1050) (P/N 42T0078 FRU 42T0079 or P/N 41W1338 recommended for the inverter board) (not a T60 screen afaik, but it works)
  836. @item
  837. BOE-Hydis HV150UX1-100 (15.1" 1600x1200) (P/N 42T0078 FRU 42T0079 or P/N 41W1338 recommended for the inverter board)
  838. @end itemize
  839. Tested LCD panels: @strong{not working yet (incompatible; see @uref{https://libreboot.org/docs/future/index.html#lcd_i945_incompatibility})}
  840. @itemize
  841. @item
  842. Samsung LTN141XA-L01 (14.1" 1024x768)
  843. @item
  844. LG-Philips LP150X09 (15.1" 1024x768)
  845. @item
  846. Samsung LTN150XG (15.1" 1024x768)
  847. @item
  848. LG-Philips LP150E06-A5K4 (15.1" 1400x1050) (also, not an official T60 screen)
  849. @item
  850. Samsung LTN154X3-L0A (15.4" 1280x800)
  851. @item
  852. IDtech IAQX10N (15.1" 2048x1536) (no display in GRUB, display in GNU/Linux is temperamental) (P/N 42T0078 FRU 42T0079 or P/N 41W1338 recommended for the inverter board)
  853. @item
  854. IDtech N150U3-L01 (15.1" 1600x1200) (no display in GRUB, display in GNU/Linux works) (P/N 42T0078 FRU 42T0079 or P/N 41W1338 recommended for the inverter board)
  855. @end itemize
  856. @emph{The following LCD panels are @strong{UNTESTED}. If you have one of these panels then please submit a report!}:
  857. @itemize
  858. @item
  859. CMO(IDtech?) N141XC (14.1" 1024x768)
  860. @item
  861. BOE-Hydis HT14X14 (14.1" 1024x768)
  862. @item
  863. TMD-Toshiba LTD141ECMB (14.1" 1024x768)
  864. @item
  865. Boe-Hydis HT14P12 (14.1" 1400x1050) (FRU P/N 41W1478 recommended for the inverter board)
  866. @item
  867. CMO (IDtech?) 13N7068 (15.1" 1024x768)
  868. @item
  869. CMO (IDtech?) 13N7069 (15.1" 1024x768)
  870. @item
  871. BOE-Hydis HV150P01-100 (15.1" 1400x1050) (P/N 42T0078 FRU 42T0079 or P/N 41W1338 recommended for the inverter board)
  872. @item
  873. BOE-Hydis HV150UX1-102 (15.1" 1600x1200) (P/N 42T0078 FRU 42T0079 or P/N 41W1338 recommended for the inverter board)
  874. @item
  875. IDtech IAQX10S (15.1" 2048x1536) (P/N 42T0078 FRU 42T0079 or P/N 41W1338 recommended for the inverter board)
  876. @item
  877. Samsung LTN154P2-L05 (42X4641 42T0329) (15.4" 1680x1050)
  878. @item
  879. LG-Philips LP154W02-TL10 (13N7020 42T0423) (15.4" 1680x1050)
  880. @item
  881. LG-Philips LP154WU1-TLB1 (42T0361) (15.4" 1920x1200) @strong{(for T61p but it might work in T60. Unknown!)}
  882. @item
  883. Samsung LTN154U2-L05 (42T0408 42T0574) (15.4" 1920x1200) @strong{(for T61p but it might work in T60. Unknown!)}
  884. @end itemize
  885. It is unknown whether the 1680x1050 (15.4") and 1920x1200 (15.4") panels use a different inverter board than the 1280x800 panels.
  886. The T60 typically comes with an Intel wifi chipset which does not work at all without proprietary firmware, and while Lenovo BIOS is running the system will refuse to boot if you replace the card. Fortunately it is very easily replaced; just remove the card and install another one @strong{after} libreboot is installed. See Recommended wifi chipsets for replacements. @c ADD REF
  887. @node Lenovo ThinkPad X200
  888. @subsubsection ThinkPad X200
  889. It is believed that all X200 laptops are compatible. @ref{X200S and X200 Tablet,X200S and X200 Tablet} will also work,depending on the configuration.
  890. It *might* be possible to put an X200 motherboard in an X201 chassis, though this is currently untested by the libreboot project. The same may also apply between X200S and X201S; again, this is untested. @strong{It's most likely true.}
  891. There are two possible flash chip sizes for the X200: 4MiB (32Mbit) or 8MiB (64Mbit). This can be identified by the type of flash chip below the palmrest: 4MiB is SOIC-8, 8MiB is SOIC-16.
  892. @strong{The X200 laptops come with the ME (and sometimes AMT in addition) before flashing libreboot. Libreboot disables and removes it by using a modified descriptor: @pxref{GM45 chipsets - remove the ME,gm45_remove_me}} (contains notes, plus instructions).
  893. Flashing instructions can be found at @ref{How to update/install,flashrom}
  894. @menu
  895. * Compatibility without blobs - X200::
  896. * X200S and X200 Tablet::
  897. * Trouble undocking button doesn't work::
  898. * LCD compatibility list - X200::
  899. * How to tell if it has an LED or CCFL?::
  900. * Hardware register dumps::
  901. * RAM S3 and microcode updates::
  902. * Unsorted notes::
  903. @end menu
  904. @node Compatibility without blobs - X200
  905. @ifinfo
  906. @subsubheading Compatibility without blobs - X200
  907. @end ifinfo
  908. @c @subsubheading Hardware virtualization vt-x
  909. @c @menu
  910. @c * Hardware virtualization vt-x::
  911. @c @end menu
  912. @c @node Hardware virtualization vt-x
  913. @c @subsubheading Hardware virtualization (vt-x)
  914. @c @anchor{#hardware-virtualization-vt-x}
  915. The X200, when run without CPU microcode updates in coreboot, currently kernel panics if running QEMU with vt-x enabled on 2 cores for the guest. With a single core enabled for the guest, the guest panics (but the host is fine). Working around this in QEMU might be possible; if not, software virtualization should work fine (it's just slower).
  916. On GM45 hardware (with libreboot), make sure that the @emph{kvm} and @emph{kvm_intel} kernel modules are not loaded, when using QEMU.
  917. The following errata datasheet from Intel might help with investigation: @uref{http://download.intel.com/design/mobile/specupdt/320121.pdf,http://download.intel.com/design/mobile/specupdt/320121.pdf}
  918. Anecdotal reports from at least 1 user suggests that some models with CPU microcode 1067a (on the CPU itself) might work with vt-x in libreboot.
  919. @node X200S and X200 Tablet
  920. @ifinfo
  921. @subsubheading X200S and X200 Tablet.
  922. @end ifinfo
  923. X200S and X200 Tablet have raminit issues at the time of writing (GS45 chipset. X200 uses GM45).
  924. X200S and X200 Tablet are known to work, but only with certain CPU+RAM configurations. The current stumbling block is RCOMP and SFF, mentioned in @uref{https://www.cs.cmu.edu/~410/doc/minimal_boot.pdf,https://www.cs.cmu.edu/~410/doc/minimal_boot.pdf}.
  925. The issues mostly relate to raminit (memory initialization). With an unpatched coreboot, you get the following: @uref{@value{docsdir}text/x200s/cblog00.txt,cblog00.txt}. No SODIMM combination that was tested would work. At first glance, it looks like GS45 (chipset that X200S uses. X200 uses GM45) is unsupported, but there is a workaround that can be used to make certain models of the X200S work, depending on the RAM.
  926. The datasheet for GS45 describes two modes: low-performance and high-performance. Low performance uses the SU range of ultra-low voltage procesors (SU9400, for example), and high-performance uses the SL range of processors (SL9400, for example). According to datasheets, GS45 behaves very similarly to GM45 when operating in high-performance mode.
  927. The theory then was that you could simply remove the checks in coreboot and make it pass GS45 off as GM45; the idea is that, with a high-performance mode CPU (SL9400, for example) it would just boot up and work.
  928. This suspicion was confirmed with the following log: @uref{@value{docsdir}text/x200s/cblog01.txt,cblog01.txt}. The memory modules in this case are 2x4GB. @strong{However, not all configurations work: @uref{@value{docsdir}text/x200s/cblog02.txt,cblog02.txt} (2x2GB) and @uref{@value{docsdir}text/x200s/cblog03.txt,cblog03.txt} (1x2GB) show a failed bootup.} @emph{False alarm. The modules were mixed (non-matching). X200S with high-performance mode CPU will work so long as you use matching memory modules (doesn't matter what size).} S
  929. This was then pushed as a patch for coreboot, which can be found at @uref{http://review.coreboot.org/#/c/7786/,http://review.coreboot.org/#/c/7786/} (libreboot merges this patch in coreboot-libre now. Check the 'getcb' script in src or git).
  930. @menu
  931. * Proper GS45 raminit::
  932. @end menu
  933. @node Proper GS45 raminit @c FIX FIX FIX: node issues?
  934. @c @subsubheading Proper GS45 raminit
  935. A new northbridge gs45 should be added to coreboot, based on gm45, and a new port x200st (X200S and X200T) should be added based on the x200 port.
  936. This port would have proper raminit. Alternatively, gs45 (if raminit is taken to be the only issue with it) can be part of gm45 northbridge support (and X200S/Tablet being part of the X200 port) with conditional checks in the raminit that make raminit work differently (as required) for GS45. nico_h and pgeorgi/patrickg in the coreboot IRC channel should know more about raminit on gm45 and likely gs45.
  937. pgeorgi recommends to run SerialICE on the factory BIOS (for X200S), comparing it with X200 (factory BIOS) and X200 (gm45 raminit code in coreboot), to see what the differences are. Then tweak raminit code based on that.
  938. @node Trouble undocking button doesn't work
  939. @ifinfo
  940. @subsubheading Trouble undocking (button doesn't work)
  941. @end ifinfo
  942. This person seems to have a workaround: @uref{https://github.com/the-unconventional/libreboot-undock,https://github.com/the-unconventional/libreboot-undock}
  943. @node LCD compatibility list - X200
  944. @ifinfo
  945. @subsubheading LCD compatibility list
  946. @end ifinfo
  947. LCD panel list (X200 panels listed there): @uref{http://www.thinkwiki.org/wiki/TFT_display,http://www.thinkwiki.org/wiki/TFT_display}
  948. All LCD panels for the X200, X200S and X200 Tablet are known to work.
  949. @menu
  950. * AFFS/IPS panels::
  951. * X200S::
  952. @end menu
  953. @node AFFS/IPS panels
  954. @c @subsubheading AFFS/IPS panels
  955. @c @menu
  956. @c * X200::
  957. @c @end menu
  958. X200
  959. @c @subsubheading X200
  960. @c @anchor{#x200}
  961. Adapted from @uref{https://github.com/bibanon/Coreboot-ThinkPads/wiki/ThinkPad-X200,https://github.com/bibanon/Coreboot-ThinkPads/wiki/ThinkPad-X200}
  962. Look at wikipedia for difference between TN and IPS panels. IPS have much better colour/contrast than a regular TN, and will typically have good viewing angles.
  963. These seem to be from the X200 tablet. You need to find one without the glass touchscreen protection on it (might be able to remove it, though). It also must not have a digitizer on it (again, might be possible to just simply remove the digitizer).
  964. @itemize
  965. @item
  966. BOE-Hydis HV121WX4-120, HV121WX4-110 or HV121WX4-100 - cheap-ish, might be hard to find
  967. @item
  968. Samsung LTN121AP02-001 - common to find, cheap
  969. @end itemize
  970. @strong{If your X200 has an LED backlit panel in it, then you also need to get an inverter and harness cable that is compatible with the CCFL panels. To see which panel type you have, @pxref{How to tell if it has an LED or CCFL?,led_howtotell}. If you need the inverter/cable, here are part numbers: 44C9909 for CCFL LVDS cable with bluetooth and camera connections, and 42W8009 or 42W8010 for the inverter.} @c ADD REF
  971. There are glossy and matte versions of these. Matte means anti-glare, which is what you want (in this authors opinion).
  972. Refer to the HMM (hardware maintenance manual) for how to replace the screen.
  973. Sources:
  974. @itemize
  975. @item
  976. @uref{http://forum.thinkpads.com/viewtopic.php?f=2&t=84941,ThinkPad Forums - Matte AFFS Panel on X200}
  977. @item
  978. @uref{http://forum.thinkpads.com/viewtopic.php?p=660662#p660662,ThinkPad Forums - Parts for X200 AFFS Mod}
  979. @item
  980. @uref{http://thinkwiki.de/X200_Displayumbau,ThinkWiki.de - X200 Displayumbau} (achtung: du musst lesen und/oder spreche deutsch; oder ein freund fur hilfe)
  981. @end itemize
  982. @node X200S
  983. @c @subsubheading X200S
  984. @uref{http://forum.thinkpads.com/viewtopic.php?p=618928#p618928,http://forum.thinkpads.com/viewtopic.php?p=618928#p618928} explains that the X200S screens/assemblies are thinner. You need to replace the whole lid with one from a normal X200/X201.
  985. @c @ref{#pagetop,Back to top of page.}
  986. @node How to tell if it has an LED or CCFL?
  987. @c @subsubheading How to tell if it has an LED or CCFL?
  988. Some X200s have a CCFL backlight and some have an LED backlight, in their LCD panel. This also means that the inverters will vary, so you must be careful if ever replacing either the panel and/or inverter. (a CCFL inverter is high-voltage and will destroy an LED backlit panel).
  989. CCFLs contain mercury. An X200 with a CCFL backlight will (@strong{}unless it has been changed to an LED, with the correct inverter. Check with your supplier!) the following: @emph{"This product contains Lithium Ion Battery, Lithium Battery and a lamp which contains mercury; dispose according to local, state or federal laws"} (one with an LED backlit panel will say something different).
  990. @node Hardware register dumps
  991. @c @subsubheading Hardware register dumps
  992. The coreboot wiki @uref{http://www.coreboot.org/Motherboard_Porting_Guide,shows} how to collect various logs useful in porting to new boards. Following are outputs from the X200:
  993. @itemize
  994. @item
  995. BIOS 3.15, EC 1.06
  996. @itemize
  997. @item
  998. @uref{@value{docsdir}misc/dumps/x200/,x200_dumps/}
  999. @end itemize
  1000. @end itemize
  1001. @node RAM S3 and microcode updates
  1002. @c @subsubheading RAM, S3 and microcode updates
  1003. Not all memory modules work. Most of the default ones do, but you have to be careful when upgrading to 8GiB; some modules work, some don't.
  1004. @uref{http://www.forum.thinkpads.com/viewtopic.php?p=760721,This page} might be useful for RAM compatibility info
  1005. (note: coreboot raminit is different, so this page might be BS)
  1006. pehjota started collecting some steppings for different CPUs on several X200 laptops. You can get the CPUID by running: @* $ @strong{dmesg | sed -n 's/^.* microcode: CPU0 sig=0x\([^,]*\),.*$/\1/p'}
  1007. What pehjota wrote: The laptops that have issues resuming from suspend, as well as a laptop that (as I mentioned earlier in #libreboot) won't boot with any Samsung DIMMs, all have CPUID 0x10676 (stepping M0).
  1008. What pehjota wrote: Laptops with CPUID 0x167A (stepping R0) resume properly every time and work with Samsung DIMMs. I'll need to do more testing on more units to better confirm these trends, but it looks like the M0 microcode is very buggy. That would also explain why I didn't have issues with Samsung DIMMs with the Lenovo BIOS (which would have microcode updates). I wonder if VT-x works on R0.
  1009. What pehjota wrote: As I said, 10676 is M0 and 1067A is R0; those are the two CPUIDs and steppings for Intel Core 2 Duo P8xxx CPUs with factory microcode. (1067 is the family and model, and 6 or A is the stepping ID.)
  1010. @strong{TODO: check the CPUIDs and test S3 resume and/or KVM on any C2D systems (including non-P8xxx ones, which I don't have here) you have available. I'd be curious if you could confirm these results.} It might not be coreboot that's buggy with raminit/S3; it might just be down to the microcode updates.
  1011. @c @menu
  1012. @c * Unsorted notes::
  1013. @c @end menu
  1014. @node Unsorted notes
  1015. @c @subsubheading Unsorted notes
  1016. @c @anchor{#unsorted-notes}
  1017. @verbatim
  1018. <sgsit> do you know if it's possible to flash thinkpads over the LPC debug connector at the front edge?
  1019. <sgsit> that would make life much easier for systems like this
  1020. <sgsit> all the Wistron manufactured systems have this thing called a "golden finger", normally at the front edge of the board
  1021. <sgsit> you can plug a board in which gives diagnostic codes but i'm wondering whether it is capable of more
  1022. <sgsit> http://www.endeer.cz/bios.tools/bios.html
  1023. @end verbatim
  1024. @node Lenovo ThinkPad R400
  1025. @subsubsection Lenovo ThinkPad R400
  1026. It is believed that all or most R400 laptops are compatible. See notes about @ref{A note about CPUs - R400,r400_external,CPU compatibility} for potential incompatibilities.
  1027. There are two possible flash chip sizes for the R400: 4MiB (32Mbit) or 8MiB (64Mbit). This can be identified by the type of flash chip below the palmrest: 4MiB is SOIC-8, 8MiB is SOIC-16.
  1028. @strong{The R400 laptops come with the ME (and sometimes AMT in addition) before flashing libreboot. Libreboot disables and removes it by using a modified descriptor: see @ref{GM45 chipsets - remove the ME,gm45_remove_me}} (contains notes, plus instructions).
  1029. Flashing instructions can be found at @ref{How to update/install,flashrom}.
  1030. @menu
  1031. * Compatibility without blobs - R400::
  1032. * LCD Compatibility - R400::
  1033. @end menu
  1034. @node Compatibility without blobs - R400
  1035. @c @subsubheading Compatibility (without blobs)
  1036. @c @menu
  1037. @c * Hardware virtualization vt-x::
  1038. @c @end menu
  1039. @itemize
  1040. @item
  1041. Hardware virtualization vt-x
  1042. @c @subsubheading Hardware virtualization (vt-x)
  1043. @c @anchor{#hardware-virtualization-vt-x}
  1044. The R400, when run without CPU microcode updates in coreboot, currently kernel panics if running QEMU with vt-x enabled on 2 cores for the guest. With a single core enabled for the guest, the guest panics (but the host is fine). Working around this in QEMU might be possible; if not, software virtualization should work fine (it's just slower).
  1045. On GM45 hardware (with libreboot), make sure that the @emph{kvm} and @emph{kvm_intel} kernel modules are not loaded, when using QEMU.
  1046. The following errata datasheet from Intel might help with investigation: @uref{http://download.intel.com/design/mobile/specupdt/320121.pdf,http://download.intel.com/design/mobile/specupdt/320121.pdf}
  1047. @end itemize
  1048. The R400 is almost identical to the X200, code-wise. @xref{Lenovo ThinkPad X200,x200}.
  1049. TODO: put hardware register logs here like on the @uref{x200.html,X200} and @uref{t400.html,T400} page.
  1050. @node LCD Compatibility - R400 @c Fixed a typo here: previously 'LCD compatibily'
  1051. @c @subsubheading LCD compatibility
  1052. Not all LCD panels are compatible yet. @xref{LCD compatibility on GM45 laptops,gm45_lcd}.
  1053. @node Lenovo ThinkPad T400
  1054. @subsubsection Lenovo ThinkPad T400
  1055. It is believed that all or most T400 laptops are compatible. See notes about @ref{A note about CPUs - T400,CPU compatibility} for potential incompatibilities.
  1056. There are two possible flash chip sizes for the T400: 4MiB (32Mbit) or 8MiB (64Mbit). This can be identified by the type of flash chip below the palmrest: 4MiB is SOIC-8, 8MiB is SOIC-16.
  1057. @strong{The T400 laptops come with the ME (and sometimes AMT in addition) before flashing libreboot. Libreboot disables and removes it by using a modified descriptor: see @ref{GM45 chipsets - remove the ME,gm45_remove_me}} (contains notes, plus instructions)
  1058. Flashing instructions can be found at @ref{How to update/install,flashrom}.
  1059. @menu
  1060. * Compatibility without blobs - T400::
  1061. * LCD compatibility - T400::
  1062. * Hardware register dumps - T400::
  1063. @end menu
  1064. @node Compatibility without blobs - T400
  1065. @c @subsubheading Compatibility (without blobs)
  1066. @itemize
  1067. @item
  1068. Hardware virtualization vt-x
  1069. The T400, when run without CPU microcode updates in coreboot, currently kernel panics if running QEMU with vt-x enabled on 2 cores for the guest. With a single core enabled for the guest, the guest panics (but the host is fine). Working around this in QEMU might be possible; if not, software virtualization should work fine (it's just slower).
  1070. On GM45 hardware (with libreboot), make sure that the @emph{kvm} and @emph{kvm_intel} kernel modules are not loaded, when using QEMU.
  1071. The following errata datasheet from Intel might help with investigation: @uref{http://download.intel.com/design/mobile/specupdt/320121.pdf,http://download.intel.com/design/mobile/specupdt/320121.pdf}
  1072. The T400 is almost identical to the X200, code-wise. @xref{Lenovo ThinkPad X200,x200}.
  1073. @end itemize
  1074. @node LCD compatibility - T400
  1075. @c @subsubheading LCD compatiblity
  1076. Not all LCD panels are compatible yet. @xref{LCD compatibility on GM45 laptops,gm45_lcd}.
  1077. @node Hardware register dumps - T400
  1078. @c @subsubheading Hardware register dumps
  1079. The coreboot wiki @uref{http://www.coreboot.org/Motherboard_Porting_Guide,shows} how to collect various logs useful in porting to new boards. Following are outputs from the T400:
  1080. @itemize
  1081. @item
  1082. T400 with @strong{Winbond W25X64} flash chip (8MiB, SOIC-16) and Lenovo BIOS 2.02 (EC firmware 1.01):
  1083. @itemize
  1084. @item
  1085. @uref{@value{docsdir}misc/dumps/logs-t400-bios2.02-ec1.01/,logs-t400-bios2.02-ex1.01}
  1086. @end itemize
  1087. @item
  1088. Version of flashrom used for the external flashing/reading logs is the one that libreboot git revision c164960 uses.
  1089. @end itemize
  1090. @node Lenovo ThinkPad T500
  1091. @subsubsection Lenovo ThinkPad T500
  1092. It is believed that all or most T500 laptops are compatible. See notes about @ref{A note about CPUs - T500,CPU compatibility} for potential incompatibilities.
  1093. There are two possible flash chip sizes for the T500: 4MiB (32Mbit) or 8MiB (64Mbit). This can be identified by the type of flash chip below the palmrest: 4MiB is SOIC-8, 8MiB is SOIC-16.
  1094. @strong{The T500 laptops come with the ME (and sometimes AMT in addition) before flashing libreboot. Libreboot disables and removes it by using a modified descriptor: see @ref{GM45 chipsets - remove the ME,gm45_remove_me}} (contains notes, plus instructions)
  1095. Flashing instructions can be found at @ref{How to update/install,flashrom}.
  1096. @menu
  1097. * Compatibility without blobs - T500::
  1098. * LCD compatibility - T500::
  1099. * Descriptor and Gbe differences::
  1100. * Hardware register dumps - T500::
  1101. @end menu
  1102. @node Compatibility without blobs - T500
  1103. @c @subsubheading Compatibility (without blobs)
  1104. @itemize
  1105. @item
  1106. Hardware virtualization vt-x
  1107. The T500, when run without CPU microcode updates in coreboot, currently kernel panics if running QEMU with vt-x enabled on 2 cores for the guest. With a single core enabled for the guest, the guest panics (but the host is fine). Working around this in QEMU might be possible; if not, software virtualization should work fine (it's just slower).
  1108. On GM45 hardware (with libreboot), make sure that the @emph{kvm} and @emph{kvm_intel} kernel modules are not loaded, when using QEMU.
  1109. The following errata datasheet from Intel might help with investigation: @uref{http://download.intel.com/design/mobile/specupdt/320121.pdf,http://download.intel.com/design/mobile/specupdt/320121.pdf}
  1110. The T500 is almost identical to the X200, code-wise. See @ref{Lenovo ThinkPad X200,x200}.
  1111. @end itemize
  1112. @node LCD compatibility - T500
  1113. @c @subsubheading LCD compatibility
  1114. Not all LCD panels are compatible yet. See @ref{LCD compatibility on GM45 laptops,gm45_lcd}.
  1115. @node Descriptor and Gbe differences
  1116. @c @subsubheading Descriptor and Gbe differences
  1117. See @uref{@value{docsdir}misc/dumps/t500_x200_descriptor/descriptor_diff_t500_x200.txt,descriptor_diff_t500_x200.txt} and @uref{@value{docsdir}misc/dumps/t500_x200_descriptor/gbe_diff_t500_x200.txt,gbe_diff_t500_x200.txt}.
  1118. The patches above are based on the output from ich9deblob on a factory.rom image dumped from the T500 with a SOIC-8 4MiB flash chip. The patch re-creates the X200 descriptor/gbe source, so the commands were something like:@* $ @strong{diff -u t500gbe x200gbe}@* $ @strong{diff -u t500descriptor x200descriptor}
  1119. ME VSCC table is in a different place and a different size on the T500. Libreboot disables and removes the ME anyway, so it doesn't matter.
  1120. The very same descriptor/gbe used on the X200 (generated by @ref{ICH9 gen utility,ich9gen}) was re-used on the T500, and it still worked.
  1121. @node Hardware register dumps - T500
  1122. @c @subsubheading Hardware register dumps
  1123. The coreboot wiki @uref{http://www.coreboot.org/Motherboard_Porting_Guide,shows} how to collect various logs useful in porting to new boards. Following are outputs from the T500:
  1124. @itemize
  1125. @item
  1126. T500 with @strong{Macronix MX25L3205D} flash chip (4MiB, SOIC-8) and Lenovo BIOS 3.13 7VET83WW (EC firmware 1.06):
  1127. @itemize
  1128. @item
  1129. @uref{@value{docsdir}misc/dumps/t500log/,t500log/}
  1130. @end itemize
  1131. @end itemize
  1132. @node Apple Macbook1-1
  1133. @subsubsection Information about the macbook1,1
  1134. There is an Apple laptop called the macbook1,1 from 2006 which uses the same i945 chipset as the ThinkPad X60/T60. A developer ported the @ref{Apple Macbook2-1,MacBook2@,1} to coreboot, the ROM images also work on the macbook1,1.
  1135. You can refer to @ref{Apple Macbook2-1,MacBook2@,1} for most of this. Macbook2,1 laptops come with Core 2 Duo processors which support 64-bit operating systems (and 32-bit). The MacBook1,1 uses Core Duo processors (supports 32-bit OS but not 64-bit), and it is believed that this is the only difference.
  1136. It is believed that all models are compatible, listed here:
  1137. @itemize
  1138. @item
  1139. @uref{http://www.everymac.com/ultimate-mac-lookup/?search_keywords=MacBook1,1,http://www.everymac.com/ultimate-mac-lookup/?search_keywords=MacBook1,1}
  1140. @end itemize
  1141. Specifically (Order No. / Model No. / CPU):
  1142. @itemize
  1143. @item
  1144. MA255LL/A / A1181 (EMC 2092) / Core Duo T2500 @strong{(tested - working)}
  1145. @item
  1146. MA254LL/A / A1181 (EMC 2092) / Core Duo T2400 @strong{(tested - working)}
  1147. @item
  1148. MA472LL/A / A1181 (EMC 2092) / Core Duo T2500 (untested)
  1149. @end itemize
  1150. Also of interest: @ref{How to build the ROM images,config_macbook21}.
  1151. Unbricking: @uref{https://www.ifixit.com/Device/MacBook_Core_2_Duo,this page shows disassembly guides} and mono's page (see @ref{Apple Macbook2-1,MacBook2@,1}) shows the location of the SPI flash chip on the motherboard. @uref{https://www.ifixit.com/Guide/MacBook+Core+2+Duo+PRAM+Battery+Replacement/529,How to remove the motherboard}.
  1152. No method is yet known for flashing in GNU/Linux while the Apple firmware is running. You will need to disassemble the system and flash externally. Reading from flash seems to work. For external flashing, refer to @ref{How to program an SPI flash chip with BeagleBone Black or Teensy 3.1,bbb_setup}.
  1153. @node Apple Macbook2-1
  1154. @subsubsection Information about the macbook2,1
  1155. There is an Apple laptop called the macbook2,1 from late 2006 or early 2007 that uses the same i945 chipset as the ThinkPad X60 and ThinkPad T60. A developer ported coreboot to their macbook2,1, and now libreboot can run on it.
  1156. Mono Moosbart is the person who wrote the port for macbook2,1. Referenced below are copies (up to date at the time of writing, 20140630) of the pages that this person wrote when porting coreboot to the macbook2,1. They are included here in case the main site goes down for whatever reason, since they include a lot of useful information.
  1157. Backups created using wget:@* @strong{$ wget -m -p -E -k -K -np http://macbook.donderklumpen.de/}@* @strong{$ wget -m -p -E -k -K -np http://macbook.donderklumpen.de/coreboot/}@* Use @strong{-e robots=off} if using this trick for other sites and the site restricts using robots.txt
  1158. @strong{Links to wget backups (and the backups themselves) of Mono's pages (see above) removed temporarily. Mono has given me permission to distribute them, but I need to ask this person to tell me what license these works fall under first. Otherwise, the above URLs should be fine. NOTE TO SELF: REMOVE THIS WHEN DONE}
  1159. @menu
  1160. * Installing GNU/Linux distributions on Apple EFI firmware::
  1161. * Information about coreboot::
  1162. * coreboot wiki page::
  1163. * Compatible models::
  1164. @end menu
  1165. @node Installing GNU/Linux distributions on Apple EFI firmware
  1166. @c @subsubheading Installing GNU/Linux distributions (on Apple EFI firmware)
  1167. @itemize
  1168. @item
  1169. Parabola GNU/Linux installation on a macbook2,1 with Apple EFI firmware (this is a copy of Mono's page, see above) @c ADD REF???
  1170. @end itemize
  1171. How to boot an ISO: burn it to a CD (like you would normally) and hold down the Alt/Control key while booting. The bootloader will detect the GNU/Linux CD as 'Windows' (because Apple doesn't think GNU/Linux exists). Install it like you normally would. When you boot up again, hold Alt/Control once more. The installation (on the HDD) will once again be seen as 'Windows'. (it's not actually Windows, but Apple likes to think that Apple and Microsoft are all that exist.) Now to install libreboot, follow @ref{MacBook2-1 install,flashrom_macbook21}.
  1172. @node Information about coreboot
  1173. @c @subsubheading Information about coreboot
  1174. @itemize
  1175. @item
  1176. Coreboot on the macbook2,1 (this is a copy of Mono's page, see above)
  1177. @end itemize
  1178. @node coreboot wiki page
  1179. @c @subsubheading coreboot wiki page
  1180. @itemize
  1181. @item
  1182. @uref{http://www.coreboot.org/Board:apple/macbook21,http://www.coreboot.org/Board:apple/macbook21}
  1183. @end itemize
  1184. @node Compatible models
  1185. @c @subsubheading Compatible models
  1186. It is believed that all models are compatible, listed here:
  1187. @itemize
  1188. @item
  1189. @uref{http://www.everymac.com/ultimate-mac-lookup/?search_keywords=MacBook2,1,http://www.everymac.com/ultimate-mac-lookup/?search_keywords=MacBook2,1}
  1190. @end itemize
  1191. Specifically (Order No. / Model No. / CPU):
  1192. @itemize
  1193. @item
  1194. MA699LL/A / A1181 (EMC 2121) / Intel Core 2 Duo T5600 @strong{(tested - working)}
  1195. @item
  1196. MA701LL/A / A1181 (EMC 2121) / Intel Core 2 Duo T7200 @strong{(tested - working)}
  1197. @item
  1198. MB061LL/A / A1181 (EMC 2139) / Intel Core 2 Duo T7200 (untested)
  1199. @item
  1200. MA700LL/A / A1181 (EMC 2121) / Intel Core 2 Duo T7200 @strong{(tested - working)}
  1201. @item
  1202. MB063LL/A / A1181 (EMC 2139) / Intel Core 2 Duo T7400 (works)
  1203. @item
  1204. MB062LL/A / A1181 (EMC 2139) / Intel Core 2 Duo T7400 @strong{(tested - working)}
  1205. @end itemize
  1206. Also of interest: @ref{How to build the ROM images,config_macbook21}.
  1207. Unbricking: @uref{https://www.ifixit.com/Device/MacBook_Core_2_Duo,this page shows disassembly guides} and mono's page (see above) shows the location of the SPI flash chip on the motherboard. @uref{https://www.ifixit.com/Guide/MacBook+Core+2+Duo+PRAM+Battery+Replacement/529,How to remove the motherboard}.
  1208. For external flashing, refer to @ref{How to program an SPI flash chip with BeagleBone Black or Teensy 3.1,bbb_setup}.
  1209. You need to replace OS X with GNU/Linux before flashing libreboot. (OSX won't run at all in libreboot).
  1210. There are some issues with this system (compared to other computers that libreboot supports):
  1211. This is an apple laptop, so it comes with OS X: it has an Apple keyboard, which means that certain keys are missing: insert, del, home, end, pgup, pgdown. There is also one mouse button only. Battery life is poor compared to X60/T60 (for now). It also has other issues: for example, the Apple logo on the back is a hole, exposing the backlight, which means that it glows. You should cover it up.
  1212. The system does get a bit hotter compared to when running the original firmware. It is certainly hotter than an X60/T60. The heat issues have been partially fixed by the following patch (now merged in libreboot): @uref{http://review.coreboot.org/#/c/7923/,http://review.coreboot.org/#/c/7923/}.
  1213. @strong{The MacBook2,1 comes with a webcam, which does not work without proprietary software. Also, webcams are a security risk; cover it up! Or remove it.}
  1214. A user reported that they could get better response from the touchpad with the following in their xorg.conf:
  1215. @verbatim
  1216. Section "InputClass"
  1217. Identifier "Synaptics Touchpad"
  1218. Driver "synaptics"
  1219. MatchIsTouchpad "on"
  1220. MatchDevicePath "/dev/input/event*"
  1221. Driver "synaptics"
  1222. # The next two values determine how much pressure one needs
  1223. # for tapping, moving the cursor and other events.
  1224. Option "FingerLow" "10"
  1225. Option "FingerHigh" "15"
  1226. # Do not emulate mouse buttons in the touchpad corners.
  1227. Option "RTCornerButton" "0"
  1228. Option "RBCornerButton" "0"
  1229. Option "LTCornerButton" "0"
  1230. Option "LBCornerButton" "0"
  1231. # One finger tap = left-click
  1232. Option "TapButton1" "1"
  1233. # Two fingers tap = right-click
  1234. Option "TapButton2" "3"
  1235. # Three fingers tap = middle-mouse
  1236. Option "TapButton3" "2"
  1237. # Try to not count the palm of the hand landing on the touchpad
  1238. # as a tap. Not sure if helps.
  1239. Option "PalmDetect" "1"
  1240. # The following modifies how long and how fast scrolling continues
  1241. # after lifting the finger when scrolling
  1242. Option "CoastingSpeed" "20"
  1243. Option "CoastingFriction" "200"
  1244. # Smaller number means that the finger has to travel less distance
  1245. # for it to count as cursor movement. Larger number prevents cursor
  1246. # shaking.
  1247. Option "HorizHysteresis" "10"
  1248. Option "VertHysteresis" "10"
  1249. # Prevent two-finger scrolling. Very jerky movement
  1250. Option "HorizTwoFingerScroll" "0"
  1251. Option "VertTwoFingerScroll" "0"
  1252. # Use edge scrolling
  1253. Option "HorizEdgeScroll" "1"
  1254. Option "VertEdgeScroll" "1"
  1255. EndSection
  1256. @end verbatim
  1257. A user reported that the above is only for linux kernel 3.15 or lower. For newer kernels, the touchpad works fine out of the box, except middle tapping.
  1258. A user submitted a utility to enable 3-finger tap on this laptop. It's available at @emph{resources/utilities/macbook21-three-finger-tap} in the libreboot git repository. The script is for GNOME, confirmed to work in Trisquel 7.
  1259. @node Recommended wifi chipsets
  1260. @subsection Recommended wifi chipsets
  1261. The following are known to work well:
  1262. @itemize
  1263. @item
  1264. @uref{http://h-node.org/search/results/en/1/search/wifi/ar9285,Atheros AR5B95} (chipset: Atheros AR9285); mini PCI-E. Most of these are half-height, so you will need a half>full height mini PCI express adapter/bracket.
  1265. @item
  1266. @uref{http://h-node.org/wifi/view/en/116/Atheros-Communications-Inc--AR928X-Wireless-Network-Adapter--PCI-Express---rev-01-,Atheros AR928X} chipset; mini PCI-E. Most of these are half-height, so you will need a half>full height mini PCI express adapter/bracket
  1267. @item
  1268. Unex DNUA-93F (chipset: @uref{http://h-node.org/search/results/en/1/search/wifi/ar9271,Atheros AR9271}); USB.
  1269. @item
  1270. Any of the chipsets listed at @uref{https://www.fsf.org/resources/hw/endorsement/respects-your-freedom,https://www.fsf.org/resources/hw/endorsement/respects-your-freedom}
  1271. @item
  1272. Any of the chipsets listed at @uref{http://h-node.org/wifi/catalogue/en/1/1/undef/undef/yes?,http://h-node.org/wifi/catalogue/en/1/1/undef/undef/yes?}
  1273. @end itemize
  1274. The following was mentioned (on IRC), but it's unknown to the libreboot project if these work with linux-libre kernel (TODO: test):
  1275. @itemize
  1276. @item
  1277. ar5bhb116 ar9382 ABGN
  1278. @item
  1279. [0200]: Qualcomm Atheros AR242x / AR542x Wireless Network Adapter (PCI-Express) [168c:001c]
  1280. @end itemize
  1281. @node GM45 chipsets - remove the ME
  1282. @subsection GM45 chipsets: remove the ME (manageability engine)
  1283. This sections relates to disabling and removing the ME (Intel @strong{M}anagement @strong{E}ngine) on GM45. This was originally done on the ThinkPad X200, and later adapted for the ThinkPad R400/T400/T500. It can in principle be done on any GM45 or GS45 system.
  1284. The ME is a blob that typically must be left inside the flash chip (in the ME region, as outlined by the default descriptor). On GM45, it is possible to remove it without any ill effects. All other parts of coreboot on GM45 systems (provided GMA MHD4500 / Intel graphics) can be blob-free, so removing the ME was the last obstacle to make GM45 a feasible target in libreboot (the systems can also work without the microcode blobs).
  1285. The ME is removed and disabled in libreboot by modifying the descriptor. More info about this can be found in the ich9deblob/ich9gen source code in resources/utilities/ich9deblob/ in libreboot, or more generally on this page.
  1286. More information about the ME can be found at @uref{http://www.coreboot.org/Intel_Management_Engine,http://www.coreboot.org/Intel_Management_Engine} and @uref{http://me.bios.io/Main_Page,http://me.bios.io/Main_Page}.
  1287. Another project recently found: @uref{http://io.smashthestack.org/me/,http://io.smashthestack.org/me/}
  1288. @menu
  1289. * ICH9 gen utility::
  1290. * ICH9 deblob utility::
  1291. * demefactory utility::
  1292. * Notes - GM45 ME removal::
  1293. @end menu
  1294. @node ICH9 gen utility
  1295. @subsubsection ICH9 gen utility
  1296. It is no longer necessary to use @ref{ICH9 deblob utility,ich9deblob} to generate a deblobbed descriptor+gbe image for GM45 targets. ich9gen is a small utility within ich9deblob that can generate them from scratch, without a factory.bin dump.
  1297. If you are using src or git, build ich9gen from source with:@* $ @strong{./build module ich9deblob}@* The executable will appear under resources/utilities/ich9deblob/
  1298. Building from the _util directory is done in much the same way.
  1299. Run:@* $ @strong{./ich9gen}
  1300. Running ich9gen this way (without any arguments) generates a default descriptor+gbe image with a generic MAC address. You probably don't want to use the generic one; the ROM images in libreboot contain a descriptor+gbe image by default (already inserted) just to prevent or mitigate the risk of bricking your laptop, but with the generic MAC address (the libreboot project does not know what your real MAC address is).
  1301. You can find out your MAC address from @strong{ip addr} or @strong{ifconfig} in GNU/Linux. Alternatively, if you are running libreboot already (with the correct MAC address in your ROM), dump it (flashrom -r) and read the first 6 bytes from position 0x1000 (or 0x2000) in a hex editor (or, rename it to factory.rom and run it in ich9deblob: in the newly created mkgbe.c will be the individual bytes of your MAC address). If you are currently running the stock firmware and haven't installed libreboot yet, you can also run that through ich9deblob to get the mac address.
  1302. An even simpler way to get the MAC address would be to read what's on the little sticker on the bottom/base of the laptop.
  1303. On GM45 laptops that use flash descriptors, the MAC address or the onboard ethernet chipset is flashed (inside the ROM image). You should generate a descriptor+gbe image with your own MAC address inside (with the Gbe checksum updated to match). Run:@* $ @strong{./ich9gen --macaddress XX:XX:XX:XX:XX:XX}@* (replace the XX chars with the hexadecimal chars in the MAC address that you want)
  1304. Two new files will be created:
  1305. @itemize
  1306. @item
  1307. @strong{ich9fdgbe_4m.bin}: this is for GM45 laptops with the 4MB flash chip.
  1308. @item
  1309. @strong{ich9fdgbe_8m.bin}: this is for GM45 laptops with the 8MB flash chip.
  1310. @item
  1311. @strong{ich9fdgbe_16m.bin}: this is for GM45 laptops with the 16MB flash chip.
  1312. @end itemize
  1313. Assuming that your libreboot image is named @strong{libreboot.rom}, copy the file to where @strong{libreboot.rom} is located and then insert the descriptor+gbe file into the ROM image. For 16MiB flash chips:@* $ @strong{dd if=ich9fdgbe_16m.bin of=libreboot.rom bs=1 count=12k conv=notrunc}@* For 8MiB flash chips:@* $ @strong{dd if=ich9fdgbe_8m.bin of=libreboot.rom bs=1 count=12k conv=notrunc}@* For 4MiB flash chips:@* $ @strong{dd if=ich9fdgbe_4m.bin of=libreboot.rom bs=1 count=12k conv=notrunc}@*
  1314. Your libreboot.rom image is now ready to be flashed on the system. Refer back to @ref{How to update/install,flashrom}. for how to flash it.
  1315. @menu
  1316. * Write-protecting the flash chip::
  1317. @end menu
  1318. @node Write-protecting the flash chip
  1319. @ifinfo
  1320. @subsubheading Write-protecting the flash chip
  1321. @end ifinfo
  1322. Look in @emph{resources/utilities/ich9deblob/src/descriptor/descriptor.c} for the following lines in the @emph{descriptorHostRegionsUnlocked} function:
  1323. @verbatim
  1324. descriptorStruct.masterAccessSection.flMstr1.fdRegionWriteAccess = 0x1;
  1325. descriptorStruct.masterAccessSection.flMstr1.biosRegionWriteAccess = 0x1;
  1326. descriptorStruct.masterAccessSection.flMstr1.meRegionWriteAccess = 0x1;
  1327. descriptorStruct.masterAccessSection.flMstr1.gbeRegionWriteAccess = 0x1;
  1328. descriptorStruct.masterAccessSection.flMstr1.pdRegionWriteAccess = 0x1;
  1329. @end verbatim
  1330. Also look in @emph{resources/utilities/ich9deblob/src/ich9gen/mkdescriptor.c} for the following lines:
  1331. @verbatim
  1332. descriptorStruct.masterAccessSection.flMstr1.fdRegionWriteAccess = 0x1; /* see ../descriptor/descriptor.c */
  1333. descriptorStruct.masterAccessSection.flMstr1.biosRegionWriteAccess = 0x1; /* see ../descriptor/descriptor.c */
  1334. descriptorStruct.masterAccessSection.flMstr1.meRegionWriteAccess = 0x1; /* see ../descriptor/descriptor.c */
  1335. descriptorStruct.masterAccessSection.flMstr1.gbeRegionWriteAccess = 0x1; /* see ../descriptor/descriptor.c */
  1336. descriptorStruct.masterAccessSection.flMstr1.pdRegionWriteAccess = 0x1; /* see ../descriptor/descriptor.c */
  1337. @end verbatim
  1338. NOTE: When you write-protect the flash chip, re-flashing is no longer possible unless you use dedicated external equipment, which also means disassembling the laptop. The same equipment can also be used to remove the write-protection later on, if you choose to do so. *Only* write-protect the chip if you have the right equipment for external flashing later on; for example, see @ref{How to program an SPI flash chip with BeagleBone Black or Teensy 3.1,bbb_setup}.
  1339. Change them all to 0x0, then re-compile ich9gen. After you have done that, follow the notes in @ref{ICH9 deblob utility,ich9gen} to generate a new descriptor+gbe image and insert that into your ROM image, then flash it. The next time you boot, the flash chip will be read-only in software (hardware re-flashing will still work, which you will need for re-flashing the chip after write-protecting it, to clear the write protection or to flash yet another ROM image with write protection set in the descriptor).
  1340. Flashrom will tell you that you can still forcefully re-flash, using @emph{-p internal:ich_spi_force=yes} but this won't actually work; it'll just brick your laptop.
  1341. For external flashing guides, refer to @ref{Installation}.
  1342. @node ICH9 deblob utility
  1343. @subsubsection ICH9 deblob utility
  1344. @strong{This is no longer strictly necessary. Libreboot ROM images for GM45 systems now contain the 12KiB descriptor+gbe generated from ich9gen, by default.}
  1345. This was the tool originally used to disable the ME on X200 (later adapted for other systems that use the GM45 chipset). @ref{ICH9 gen utility,ich9gen} now supersedes it; ich9gen is better because it does not rely on dumping the factory.rom image (whereas, ich9deblob does).
  1346. This is what you will use to generate the deblobbed descriptor+gbe regions for your libreboot ROM image.
  1347. If you are working with libreboot_src (or git), you can find the source under resources/utilities/ich9deblob/ and will already be compiled if you ran @strong{./build module all} or @strong{./build module ich9deblob} from the main directory (./), otherwise you can build it like so:@* $ @strong{./build module ich9deblob}@* An executable file named @strong{ich9deblob} will now appear under resources/utilities/ich9deblob/
  1348. Place the factory.rom from your system (can be obtained using the external flashing guides for GM45 targets linked, @pxref{Installation}) in the directory where you have your ich9deblob executable, then run the tool:@* $ @strong{./ich9deblob}
  1349. A 12kiB file named @strong{deblobbed_descriptor.bin} will now appear. @strong{Keep this and the factory.rom stored in a safe location!} The first 4KiB contains the descriptor data region for your system, and the next 8KiB contains the gbe region (config data for your gigabit NIC). These 2 regions could actually be separate files, but they are joined into 1 file in this case.
  1350. A 4KiB file named @strong{deblobbed_4kdescriptor.bin} will alternatively appear, if no GbE region was detected inside the ROM image. This is usually the case, when a discrete NIC is used (eg Broadcom) instead of Intel. Only the Intel NICs need a GbE region in the flash chip.
  1351. Assuming that your libreboot image is named @strong{libreboot.rom}, copy the @strong{deblobbed_descriptor.bin} file to where @strong{libreboot.rom} is located and then run:@* $ @strong{dd if=deblobbed_descriptor.bin of=libreboot.rom bs=1 count=12k conv=notrunc}
  1352. Alternatively, if you got a the @strong{deblobbed_4kdescriptor.bin} file (no GbE defined), do this: $ @strong{dd if=deblobbed_4kdescriptor.bin of=libreboot.rom bs=1 count=4k conv=notrunc}
  1353. The utility will also generate 4 additional files:
  1354. @itemize
  1355. @item
  1356. mkdescriptor.c
  1357. @item
  1358. mkdescriptor.h
  1359. @item
  1360. mkgbe.c
  1361. @item
  1362. mkgbe.h
  1363. @end itemize
  1364. These are C source files that can re-generate the very same Gbe and Descriptor structs (from ich9deblob/ich9gen). To use these, place them in src/ich9gen/ in ich9deblob, then re-build. The newly built @strong{ich9gen} executable will be able to re-create the very same 12KiB file from scratch, based on the C structs, this time @strong{without} the need for a factory.rom dump!
  1365. You should now have a @strong{libreboot.rom} image containing the correct 4K descriptor and 8K gbe regions, which will then be safe to flash. Refer back to @ref{How to update/install,flashrom}. for how to flash it.
  1366. @node demefactory utility
  1367. @subsubsection demefactory utility
  1368. This takes a factory.rom dump and disables the ME/TPM, but leaves the region intact. It also sets all regions read-write.
  1369. The ME interferes with flash read/write in flashrom, and the default descriptor locks some regions. The idea is that doing this will remove all of those restrictions.
  1370. Simply run (with factory.rom in the same directory):@* $ @strong{./demefactory}
  1371. It will generate a 4KiB descriptor file (only the descriptor, no GbE). Insert that into a factory.rom image (NOTE: do this on a copy of it. Keep the original factory.rom stored safely somewhere):@* $ @strong{dd if=demefactory_4kdescriptor.bin of=factory_nome.rom bs=1 count=4k conv=notrunc}
  1372. TODO: test this.@* TODO: lenovobios (GM45 thinkpads) still write-protects parts of the flash. Modify the assembly code inside. Note: the factory.rom (BIOS region) from lenovobios is in a compressed format, which you have to extract. bios_extract upstream won't work, but the following was said in #coreboot on freenode IRC:
  1373. @verbatim
  1374. <roxfan> vimuser: try bios_extract with ffv patch http://patchwork.coreboot.org/patch/3444/
  1375. <roxfan> or https://github.com/coreboot/bios_extract/blob/master/phoenix_extract.py
  1376. <roxfan> what are you looking for specifically, btw?
  1377. 0x74: 0x9fff03e0 PR0: Warning: 0x003e0000-0x01ffffff is read-only.
  1378. 0x84: 0x81ff81f8 PR4: Warning: 0x001f8000-0x001fffff is locked.
  1379. @end verbatim
  1380. Use-case: a factory.rom image modified in this way would theoretically have no flash protections whatsoever, making it easy to quickly switch between factory/libreboot in software, without ever having to disassemble and re-flash externally unless you brick the device.
  1381. demefactory is part of the ich9deblob src, found at @emph{resources/utilities/ich9deblob/}
  1382. @node Notes - GM45 ME removal
  1383. @subsubsection Notes
  1384. The sections below are adapted from (mostly) IRC logs related to early development getting the ME removed on GM45. They are useful for background information. This could not have been done without sgsit's help.
  1385. @menu
  1386. * Early notes::
  1387. * Flash chips::
  1388. * Early development notes::
  1389. * GBE gigabit ethernet region in SPI flash::
  1390. * GBE region - change MAC address::
  1391. * Flash descriptor region::
  1392. * platform data partition in boot flash factoryrom / lenovo bios::
  1393. @end menu
  1394. @node Early notes
  1395. @ifinfo
  1396. @subsubheading Early notes
  1397. @end ifinfo
  1398. @itemize
  1399. @item
  1400. @uref{http://www.intel.co.uk/content/dam/doc/datasheet/io-controller-hub-10-family-datasheet.pdf,http://www.intel.co.uk/content/dam/doc/datasheet/io-controller-hub-10-family-datasheet.pdf} page 230 mentions about descriptor and non-descriptor mode (which wipes out gbe and ME/AMT).
  1401. @item
  1402. textstrikeout@{@strong{See reference to HDA_SDO (disable descriptor security)@}} strap connected GPIO33 pin is it on ICH9-M (X200). HDA_SDO applies to later chipsets (series 6 or higher). Disabling descriptor security also disables the ethernet according to sgsit. sgsit's method involves use of 'soft straps' (see IRC logs below) instead of disabling the descriptor. @c ADD STRIKEOUT
  1403. @item
  1404. @strong{and the location of GPIO33 on the x200s: (was an external link. Putting it here instead)} @uref{@value{docsdir}@value{useinstall}images/x200/gpio33_location.jpg,@value{docsdir}@value{useinstall}images/x200/gpio33_location.jpg} - it's above the number 7 on TP37 (which is above the big intel chip at the bottom)
  1405. @item
  1406. The ME datasheet may not be for the mobile chipsets but it doesn't vary that much. This one gives some detail and covers QM67 which is what the X201 uses: @uref{http://www.intel.co.uk/content/dam/www/public/us/en/documents/datasheets/6-chipset-c200-chipset-datasheet.pdf,http://www.intel.co.uk/content/dam/www/public/us/en/documents/datasheets/6-chipset-c200-chipset-datasheet.pdf}
  1407. @end itemize
  1408. @node Flash chips
  1409. @ifinfo
  1410. @subsubheading Flash chips
  1411. @end ifinfo
  1412. @itemize
  1413. @item
  1414. Schematics for X200 laptop: @uref{http://pdf.datasheetarchive.com/indexerfiles/Datasheets-USER/DSAUPLD00006075.pdf,http://pdf.datasheetarchive.com/indexerfiles/Datasheets-USER/DSAUPLD00006075.pdf} @strong{textstrikeout@{- Page 20 and page 9 refer to SDA_HDO or SDA_HDOUT@}} only on series 6 or higher chipsets. ICH9-M (X200) does it with a strap connected to GPIO33 pin (see IRC notes below)@* - According to page 29, the X200 can have any of the following flash chips:
  1415. @itemize
  1416. @item
  1417. ATMEL AT26DF321-SU 72.26321.A01 - this is a 32Mb (4MiB) chip
  1418. @item
  1419. MXIC (Macronix?) MX25L3205DM2I-12G 72.25325.A01 - another 32Mb (4MiB) chip
  1420. @item
  1421. MXIC (Macronix?) MX25L6405DMI-12G 41R0820AA - this is a 64Mb (8MiB) chip
  1422. @item
  1423. Winbond W25X64VSFIG 41R0820BA - another 64Mb (8MiB) chip
  1424. @end itemize
  1425. sgsit says that the X200s with the 64Mb flash chips are (probably) the ones with AMT (alongside the ME), whereas the 32Mb chips contain only the ME.
  1426. @item
  1427. Schematics for X200s laptop: @uref{http://pdf.datasheetarchive.com/indexerfiles/Datasheets-USER/DSAUPLD00006104.pdf,http://pdf.datasheetarchive.com/indexerfiles/Datasheets-USER/DSAUPLD00006104.pdf}.
  1428. @end itemize
  1429. @node Early development notes
  1430. @ifinfo
  1431. @subsubheading Early development notes
  1432. @end ifinfo
  1433. @verbatim
  1434. Start (hex) End (hex) Length (hex) Area Name
  1435. ----------- --------- ------------ ---------
  1436. 00000000 003FFFFF 00400000 Flash Image
  1437. 00000000 00000FFF 00001000 Descriptor Region
  1438. 00000004 0000000F 0000000C Descriptor Map
  1439. 00000010 0000001B 0000000C Component Section
  1440. 00000040 0000004F 00000010 Region Section
  1441. 00000060 0000006B 0000000C Master Access Section
  1442. 00000060 00000063 00000004 CPU/BIOS
  1443. 00000064 00000067 00000004 Manageability Engine (ME)
  1444. 00000068 0000006B 00000004 GbE LAN
  1445. 00000100 00000103 00000004 ICH Strap 0
  1446. 00000104 00000107 00000004 ICH Strap 1
  1447. 00000200 00000203 00000004 MCH Strap 0
  1448. 00000EFC 00000EFF 00000004 Descriptor Map 2
  1449. 00000ED0 00000EF7 00000028 ME VSCC Table
  1450. 00000ED0 00000ED7 00000008 Flash device 1
  1451. 00000ED8 00000EDF 00000008 Flash device 2
  1452. 00000EE0 00000EE7 00000008 Flash device 3
  1453. 00000EE8 00000EEF 00000008 Flash device 4
  1454. 00000EF0 00000EF7 00000008 Flash device 5
  1455. 00000F00 00000FFF 00000100 OEM Section
  1456. 00001000 001F5FFF 001F5000 ME Region
  1457. 001F6000 001F7FFF 00002000 GbE Region
  1458. 001F8000 001FFFFF 00008000 PDR Region
  1459. 00200000 003FFFFF 00200000 BIOS Region
  1460. Start (hex) End (hex) Length (hex) Area Name
  1461. ----------- --------- ------------ ---------
  1462. 00000000 003FFFFF 00400000 Flash Image
  1463. 00000000 00000FFF 00001000 Descriptor Region
  1464. 00000004 0000000F 0000000C Descriptor Map
  1465. 00000010 0000001B 0000000C Component Section
  1466. 00000040 0000004F 00000010 Region Section
  1467. 00000060 0000006B 0000000C Master Access Section
  1468. 00000060 00000063 00000004 CPU/BIOS
  1469. 00000064 00000067 00000004 Manageability Engine (ME)
  1470. 00000068 0000006B 00000004 GbE LAN
  1471. 00000100 00000103 00000004 ICH Strap 0
  1472. 00000104 00000107 00000004 ICH Strap 1
  1473. 00000200 00000203 00000004 MCH Strap 0
  1474. 00000ED0 00000EF7 00000028 ME VSCC Table
  1475. 00000ED0 00000ED7 00000008 Flash device 1
  1476. 00000ED8 00000EDF 00000008 Flash device 2
  1477. 00000EE0 00000EE7 00000008 Flash device 3
  1478. 00000EE8 00000EEF 00000008 Flash device 4
  1479. 00000EF0 00000EF7 00000008 Flash device 5
  1480. 00000EFC 00000EFF 00000004 Descriptor Map 2
  1481. 00000F00 00000FFF 00000100 OEM Section
  1482. 00001000 00002FFF 00002000 GbE Region
  1483. 00003000 00202FFF 00200000 BIOS Region
  1484. Build Settings
  1485. --------------
  1486. Flash Erase Size = 0x1000
  1487. @end verbatim
  1488. It's a utility called 'Flash Image Tool' for ME 4.x that was used for this. You drag a complete image into in and the utility decomposes the various components, allowing you to set soft straps.
  1489. This tool is proprietary, for Windows only, but was used to deblob the X200. End justified means, and the utility is no longer needed since the ich9deblob utility (documented on this page) can now be used to create deblobbed descriptors.
  1490. @node GBE gigabit ethernet region in SPI flash
  1491. @ifinfo
  1492. @subsubheading GBE (gigabit ethernet) region in SPI flash
  1493. @end ifinfo
  1494. Of the 8K, about 95% is 0xFF. The data is the gbe region is fully documented in this public datasheet: @uref{http://www.intel.co.uk/content/dam/doc/application-note/i-o-controller-hub-9m-82567lf-lm-v-nvm-map-appl-note.pdf,http://www.intel.co.uk/content/dam/doc/application-note/i-o-controller-hub-9m-82567lf-lm-v-nvm-map-appl-note.pdf}
  1495. The only actual content found was:
  1496. @verbatim
  1497. 00 1F 1F 1F 1F 1F 00 08 FF FF 83 10 FF FF FF FF
  1498. 08 10 FF FF C3 10 EE 20 AA 17 F5 10 86 80 00 00
  1499. 01 0D 00 00 00 00 05 06 20 30 00 0A 00 00 8B 8D
  1500. 02 06 40 2B 43 00 00 00 F5 10 AD BA F5 10 BF 10
  1501. AD BA CB 10 AD BA AD BA 00 00 00 00 00 00 00 00
  1502. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  1503. 00 01 00 40 28 12 07 40 FF FF FF FF FF FF FF FF
  1504. FF FF FF FF FF FF FF FF FF FF FF FF FF FF D9 F0
  1505. 20 60 1F 00 02 00 13 00 00 80 1D 00 FF 00 16 00
  1506. DD CC 18 00 11 20 17 00 DD DD 18 00 12 20 17 00
  1507. 00 80 1D 00 00 00 1F
  1508. @end verbatim
  1509. The first part is the MAC address set to all 0x1F. It's repeated haly way through the 8K area, and the rest is all 0xFF. This is all documented in the datasheet.
  1510. The GBe region starts at 0x20A000 bytes from the *end* of a factory image and is 0x2000 bytes long. In libreboot (deblobbed) the descriptor is set to put gbe directly after the initial 4K flash descriptor. So the first 4K of the ROM is the descriptor, and then the next 8K is the gbe region.
  1511. @c @menu
  1512. @c * GBE region change MAC address::
  1513. @c @end menu
  1514. @node GBE region - change MAC address
  1515. @ifinfo
  1516. @subsubheading GBE region: change MAC address
  1517. @end ifinfo
  1518. According to the datasheet, it's supposed to add up to 0xBABA but can actually be others on the X200. @uref{https://communities.intel.com/community/wired/blog/2010/10/14/how-to-basic-eeprom-checksums,https://communities.intel.com/community/wired/blog/2010/10/14/how-to-basic-eeprom-checksums}
  1519. @emph{"One of those engineers loves classic rock music, so they selected 0xBABA"}
  1520. In honour of the song @emph{Baba O'Reilly} by @emph{The Who} apparently. We're not making this stuff up...
  1521. 0x3ABA, 0x34BA, 0x40BA and more have been observed in the main Gbe regions on the X200 factory.rom dumps. The checksums of the backup regions match BABA, however.
  1522. By default, the X200 (as shipped by Lenovo) actually has an invalid main gbe checksum. The backup gbe region is correct, and is what these systems default to. Basically, you should do what you need on the *backup* gbe region, and then correct the main one by copying from the backup.
  1523. Look at resources/utilities/ich9deblob/ich9deblob.c.
  1524. @itemize
  1525. @item
  1526. Add the first 0x3F 16bit numbers (unsigned) of the GBe descriptor together (this includes the checksum value) and that has to add up to 0xBABA. In other words, the checksum is 0xBABA minus the total of the first 0x3E 16bit numbers (unsigned), ignoring any overflow.
  1527. @end itemize
  1528. @node Flash descriptor region
  1529. @ifinfo
  1530. @subsubheading Flash descriptor region
  1531. @end ifinfo
  1532. @uref{http://www.intel.co.uk/content/dam/doc/datasheet/io-controller-hub-9-datasheet.pdf,http://www.intel.co.uk/content/dam/doc/datasheet/io-controller-hub-9-datasheet.pdf} from page 850 onwards. This explains everything that is in the flash descriptor, which can be used to understand what libreboot is doing about modifying it.
  1533. How to deblob:
  1534. @itemize
  1535. @item
  1536. patch the number of regions present in the descriptor from 5 - 3
  1537. @item
  1538. originally descriptor + bios + me + gbe + platform
  1539. @item
  1540. modified = descriptor + bios + gbe
  1541. @item
  1542. the next stage is to patch the part of the descriptor which defines the start and end point of each section
  1543. @item
  1544. then cut out the gbe region and insert it just after the region
  1545. @item
  1546. all this can be substantiated with public docs (ICH9 datasheet)
  1547. @item
  1548. the final part is flipping 2 bits. Halting the ME via 1 MCH soft strap and 1 ICH soft strap
  1549. @item
  1550. the part of the descriptor described there gives the base address and length of each region (bits 12:24 of each address)
  1551. @item
  1552. to disable a region, you set the base address to 0xFFF and the length to 0
  1553. @item
  1554. and you change the number of regions from 4 (zero based) to 2
  1555. @end itemize
  1556. There's an interesting parameter called 'ME Alternate disable', which allows the ME to only handle hardware errata in the southbridge, but disables any other functionality. This is similar to the 'ignition' in the 5 series and higher but using the standard firmware instead of a small 128K version. Useless for libreboot, though.
  1557. To deblob GM45, you chop out the platform and ME regions and correct the addresses in flReg1-4. Then you set meDisable to 1 in ICHSTRAP0 and MCHSTRAP0.
  1558. How to patch the descriptor from the factory.rom dump
  1559. @itemize
  1560. @item
  1561. map the first 4k into the struct (minus the gbe region)
  1562. @item
  1563. set NR in FLMAP0 to 2 (from 4)
  1564. @item
  1565. adjust BASE and LIMIT in flReg1,2,3,4 to reflect the new location of each region (or remove them in the case of Platform and ME)
  1566. @item
  1567. set meDisable to 1/true in ICHSTRAP0 and MCHSTRAP0
  1568. @item
  1569. extract the 8k GBe region and append that to the end of the 4k descriptor
  1570. @item
  1571. output the 12k concatenated chunk
  1572. @item
  1573. Then it can be dd'd into the first 12K part of a coreboot image.
  1574. @item
  1575. the GBe region always starts 0x20A000 bytes from the end of the ROM
  1576. @end itemize
  1577. This means that libreboot's descriptor region will simply define the following regions:
  1578. @itemize
  1579. @item
  1580. descriptor (4K)
  1581. @item
  1582. gbe (8K)
  1583. @item
  1584. bios (rest of flash chip. CBFS also set to occupy this whole size)
  1585. @end itemize
  1586. The data in the descriptor region is little endian, and it represents bits 24:12 of the address (bits 12-24, written this way since bit 24 is nearer to left than bit 12 in the binary representation).
  1587. So, @emph{x << 12 = address}
  1588. If it's in descriptor mode, then the first 4 bytes will be 5A A5 F0 0F.
  1589. @node platform data partition in boot flash factoryrom / lenovo bios
  1590. @ifinfo
  1591. @subsubheading platform data partition in boot flash (factory.rom / lenovo bios)
  1592. @end ifinfo
  1593. Basically useless for libreboot, since it appears to be a blob. Removing it didn't cause any issues in libreboot.
  1594. This is a 32K region from the factory image. It could be data (non-functional) that the original Lenovo BIOS used, but we don't know.
  1595. It has only a 448 byte fragment different from 0x00 or 0xFF.
  1596. @node LCD compatibility on GM45 laptops
  1597. @subsection LCD compatibility on GM45 laptops
  1598. On the T400 and T500 (maybe others), some of the higher resolution panels (e.g. 1440x900, 1680x1050, 1920x1200) fail in libreboot.
  1599. @strong{All X200/X200S/X200T LCD panels are believed to be compatible.}
  1600. @menu
  1601. * The problem::
  1602. * Current workaround::
  1603. * Differences in dmesg::
  1604. @end menu
  1605. @node The problem
  1606. @subsubsection The problem
  1607. In some cases, backlight turns on during boot, sometimes not. In all cases, no display is shown in GRUB, nor in GNU/Linux.
  1608. @node Current workaround
  1609. @subsubsection Current workaround
  1610. Libreboot (git, and releases after 20150518) now automatically detect whether to use single or dual link LVDS configuration. If you're using an older version, use the instructions below. In practise, this means that you'll get a visual display when booting GNU/Linux, but not in GRUB (payload).
  1611. The i915 module in the Linux kernel also provides an option to set the LVDS link configuration. i915.lvds_channel_mode:Specify LVDS channel mode (0=probe BIOS [default], 1=single-channel, 2=dual-channel) (int) - from /sbin/modinfo i915 - use @strong{i915.lvds_channel_mode=2} as a kernel option in grub.cfg.
  1612. @node Differences in dmesg
  1613. @subsubsection Differences in dmesg (kernel parameter added)
  1614. @uref{https://01.org/linuxgraphics/documentation/how-report-bugs,https://01.org/linuxgraphics/documentation/how-report-bugs}
  1615. These panels all work in the original firmware, so the idea is to see what differences there are in how coreboot handles them.
  1616. @uref{http://www.coreboot.org/pipermail/coreboot/attachments/20150712/d2e214bb/attachment-0002.txt,dmesg with coreboot-libre} (coreboot) - See: @emph{[drm:intel_lvds_init] detected single-link lvds configuration}
  1617. @uref{http://www.coreboot.org/pipermail/coreboot/attachments/20150712/d2e214bb/attachment-0003.txt,dmesg with lenovobios} (lenovobios) - For the same line, it says dual-channel lvds configuration.
  1618. @menu
  1619. * EDID::
  1620. @end menu
  1621. @node EDID
  1622. @ifinfo
  1623. @subsubheading EDID
  1624. @end ifinfo
  1625. One T500 had a screen (1920x1200) that is currently incompatible. Working to fix it. EDID:
  1626. @verbatim
  1627. user@user-ThinkPad-T500:~/Desktop$ sudo i2cdump -y 2 0x50
  1628. No size specified (using byte-data access)
  1629. 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
  1630. 00: XX ff ff ff ff ff ff 00 30 ae 55 40 00 00 00 00 X.......0?U@....
  1631. 10: 00 11 01 03 80 21 15 78 ea ba 70 98 59 52 8c 28 .????!?x??p?YR?(
  1632. 20: 25 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01 %PT...??????????
  1633. 30: 01 01 01 01 01 01 e7 3a 80 8c 70 b0 14 40 1e 50 ???????:??p??@?P
  1634. 40: 24 00 4b cf 10 00 00 19 16 31 80 8c 70 b0 14 40 $.K??..??1??p??@
  1635. 50: 1e 50 24 00 4b cf 10 00 00 19 00 00 00 0f 00 d1 ?P$.K??..?...?.?
  1636. 60: 0a 32 d1 0a 28 11 01 00 32 0c 00 00 00 00 00 fe ?2??(??.2?.....?
  1637. 70: 00 4c 50 31 35 34 57 55 31 2d 54 4c 42 31 00 9a .LP154WU1-TLB1.?
  1638. 80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
  1639. 90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
  1640. a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
  1641. b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
  1642. c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
  1643. d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
  1644. e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
  1645. f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
  1646. @end verbatim
  1647. What happens: backlight turns on at boot, then turns off. At no point is there a working visual display.
  1648. Another incompatible screen (EDID) 1680 x 1050 with the same issue:
  1649. @verbatim
  1650. EDID:
  1651. 00 ff ff ff ff ff ff 00 30 ae 53 40 00 00 00 00
  1652. 00 11 01 03 80 21 15 78 ea cd 75 91 55 4f 8b 26
  1653. 21 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
  1654. 01 01 01 01 01 01 a8 2f 90 e0 60 1a 10 40 20 40
  1655. 13 00 4b cf 10 00 00 19 b7 27 90 e0 60 1a 10 40
  1656. 20 40 13 00 4b cf 10 00 00 19 00 00 00 0f 00 b3
  1657. 0a 32 b3 0a 28 14 01 00 4c a3 50 33 00 00 00 fe
  1658. 00 4c 54 4e 31 35 34 50 33 2d 4c 30 32 0a 00 7e
  1659. Extracted contents:
  1660. header: 00 ff ff ff ff ff ff 00
  1661. serial number: 30 ae 53 40 00 00 00 00 00 11
  1662. version: 01 03
  1663. basic params: 80 21 15 78 ea
  1664. chroma info: cd 75 91 55 4f 8b 26 21 50 54
  1665. established: 00 00 00
  1666. standard: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
  1667. descriptor 1: a8 2f 90 e0 60 1a 10 40 20 40 13 00 4b cf 10 00 00 19
  1668. descriptor 2: b7 27 90 e0 60 1a 10 40 20 40 13 00 4b cf 10 00 00 19
  1669. descriptor 3: 00 00 00 0f 00 b3 0a 32 b3 0a 28 14 01 00 4c a3 50 33
  1670. descriptor 4: 00 00 00 fe 00 4c 54 4e 31 35 34 50 33 2d 4c 30 32 0a
  1671. extensions: 00
  1672. checksum: 7e
  1673. Manufacturer: LEN Model 4053 Serial Number 0
  1674. Made week 0 of 2007
  1675. EDID version: 1.3
  1676. Digital display
  1677. Maximum image size: 33 cm x 21 cm
  1678. Gamma: 220%
  1679. Check DPMS levels
  1680. DPMS levels: Standby Suspend Off
  1681. Supported color formats: RGB 4:4:4, YCrCb 4:2:2
  1682. First detailed timing is preferred timing
  1683. Established timings supported:
  1684. Standard timings supported:
  1685. Detailed timings
  1686. Hex of detail: a82f90e0601a1040204013004bcf10000019
  1687. Did detailed timing
  1688. Detailed mode (IN HEX): Clock 122000 KHz, 14b mm x cf mm
  1689. 0690 06b0 06f0 0770 hborder 0
  1690. 041a 041b 041e 042a vborder 0
  1691. -hsync -vsync
  1692. Hex of detail: b72790e0601a1040204013004bcf10000019
  1693. Detailed mode (IN HEX): Clock 122000 KHz, 14b mm x cf mm
  1694. 0690 06b0 06f0 0770 hborder 0
  1695. 041a 041b 041e 042a vborder 0
  1696. -hsync -vsync
  1697. Hex of detail: 0000000f00b30a32b30a281401004ca35033
  1698. Manufacturer-specified data, tag 15
  1699. Hex of detail: 000000fe004c544e31353450332d4c30320a
  1700. ASCII string: LTN154P3-L02
  1701. Checksum
  1702. Checksum: 0x7e (valid)
  1703. WARNING: EDID block does NOT fully conform to EDID 1.3.
  1704. Missing name descriptor
  1705. Missing monitor ranges
  1706. bringing up panel at resolution 1680 x 1050
  1707. Borders 0 x 0
  1708. Blank 224 x 16
  1709. Sync 64 x 3
  1710. Front porch 32 x 1
  1711. Spread spectrum clock
  1712. Single channel
  1713. Polarities 1, 1
  1714. Data M1=2132104, N1=8388608
  1715. Link frequency 270000 kHz
  1716. Link M1=236900, N1=524288
  1717. Pixel N=9, M1=24, M2=8, P1=1
  1718. Pixel clock 243809 kHz
  1719. waiting for panel powerup
  1720. panel powered up
  1721. @end verbatim
  1722. Another incompatible (T400) screen:
  1723. @verbatim
  1724. No size specified (using byte-data access)
  1725. 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
  1726. 00: XX ff ff ff ff ff ff 00 30 ae 33 40 00 00 00 00 X.......0?3@....
  1727. 10: 00 0f 01 03 80 1e 13 78 ea cd 75 91 55 4f 8b 26 .??????x??u?UO?&
  1728. 20: 21 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01 !PT...??????????
  1729. 30: 01 01 01 01 01 01 b0 27 a0 60 51 84 2d 30 30 20 ???????'?`Q?-00
  1730. 40: 36 00 2f be 10 00 00 19 d5 1f a0 40 51 84 1a 30 6./??..????@Q??0
  1731. 50: 30 20 36 00 2f be 10 00 00 19 00 00 00 0f 00 90 0 6./??..?...?.?
  1732. 60: 0a 32 90 0a 28 14 01 00 4c a3 42 44 00 00 00 fe ?2??(??.L?BD...?
  1733. 70: 00 4c 54 4e 31 34 31 57 44 2d 4c 30 35 0a 00 32 .LTN141WD-L05?.2
  1734. 80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
  1735. 90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
  1736. a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
  1737. b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
  1738. c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
  1739. d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
  1740. e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
  1741. f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
  1742. @end verbatim
  1743. For comparison, here is a working display (T400 screen, but was connected to a T500. Some T500 displays also work, but no EDID available on this page yet):
  1744. @verbatim
  1745. EDID:
  1746. 00 ff ff ff ff ff ff 00 30 ae 31 40 00 00 00 00
  1747. 00 12 01 03 80 1e 13 78 ea b3 85 95 58 53 8a 28
  1748. 25 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
  1749. 01 01 01 01 01 01 26 1b 00 7d 50 20 16 30 30 20
  1750. 36 00 30 be 10 00 00 18 8b 16 00 7d 50 20 16 30
  1751. 30 20 36 00 30 be 10 00 00 18 00 00 00 0f 00 81
  1752. 0a 32 81 0a 28 14 01 00 30 e4 28 01 00 00 00 fe
  1753. 00 4c 50 31 34 31 57 58 33 2d 54 4c 52 31 00 d8
  1754. Extracted contents:
  1755. header: 00 ff ff ff ff ff ff 00
  1756. serial number: 30 ae 31 40 00 00 00 00 00 12
  1757. version: 01 03
  1758. basic params: 80 1e 13 78 ea
  1759. chroma info: b3 85 95 58 53 8a 28 25 50 54
  1760. established: 00 00 00
  1761. standard: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
  1762. descriptor 1: 26 1b 00 7d 50 20 16 30 30 20 36 00 30 be 10 00 00 18
  1763. descriptor 2: 8b 16 00 7d 50 20 16 30 30 20 36 00 30 be 10 00 00 18
  1764. descriptor 3: 00 00 00 0f 00 81 0a 32 81 0a 28 14 01 00 30 e4 28 01
  1765. descriptor 4: 00 00 00 fe 00 4c 50 31 34 31 57 58 33 2d 54 4c 52 31
  1766. extensions: 00
  1767. checksum: d8
  1768. Manufacturer: LEN Model 4031 Serial Number 0
  1769. Made week 0 of 2008
  1770. EDID version: 1.3
  1771. Digital display
  1772. Maximum image size: 30 cm x 19 cm
  1773. Gamma: 220%
  1774. Check DPMS levels
  1775. DPMS levels: Standby Suspend Off
  1776. Supported color formats: RGB 4:4:4, YCrCb 4:2:2
  1777. First detailed timing is preferred timing
  1778. Established timings supported:
  1779. Standard timings supported:
  1780. Detailed timings
  1781. Hex of detail: 261b007d502016303020360030be10000018
  1782. Did detailed timing
  1783. Detailed mode (IN HEX): Clock 69500 KHz, 130 mm x be mm
  1784. 0500 0530 0550 057d hborder 0
  1785. 0320 0323 0329 0336 vborder 0
  1786. -hsync -vsync
  1787. Hex of detail: 8b16007d502016303020360030be10000018
  1788. Detailed mode (IN HEX): Clock 69500 KHz, 130 mm x be mm
  1789. 0500 0530 0550 057d hborder 0
  1790. 0320 0323 0329 0336 vborder 0
  1791. -hsync -vsync
  1792. Hex of detail: 0000000f00810a32810a2814010030e42801
  1793. Manufacturer-specified data, tag 15
  1794. Hex of detail: 000000fe004c503134315758332d544c5231
  1795. ASCII string: LP141WX3-TLR1
  1796. Checksum
  1797. Checksum: 0xd8 (valid)
  1798. WARNING: EDID block does NOT fully conform to EDID 1.3.
  1799. Missing name descriptor
  1800. Missing monitor ranges
  1801. bringing up panel at resolution 1280 x 800
  1802. Borders 0 x 0
  1803. Blank 125 x 22
  1804. Sync 32 x 6
  1805. Front porch 48 x 3
  1806. Spread spectrum clock
  1807. Single channel
  1808. Polarities 1, 1
  1809. Data M1=1214600, N1=8388608
  1810. Link frequency 270000 kHz
  1811. Link M1=134955, N1=524288
  1812. Pixel N=10, M1=14, M2=11, P1=1
  1813. Pixel clock 138857 kHz
  1814. waiting for panel powerup
  1815. panel powered up
  1816. @end verbatim
  1817. Another compatible T400 screen:
  1818. @verbatim
  1819. trisquel@trisquel:~$ sudo i2cdump -y 2 0x50
  1820. No size specified (using byte-data access)
  1821. 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
  1822. 00: 00 ff ff ff ff ff ff 00 30 ae 31 40 00 00 00 00 ........0?1@....
  1823. 10: 00 12 01 03 80 1e 13 78 ea b3 85 95 58 53 8a 28 .??????x????XS?(
  1824. 20: 25 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01 %PT...??????????
  1825. 30: 01 01 01 01 01 01 26 1b 00 7d 50 20 16 30 30 20 ??????&?.}P ?00
  1826. 40: 36 00 30 be 10 00 00 18 8b 16 00 7d 50 20 16 30 6.0??..???.}P ?0
  1827. 50: 30 20 36 00 30 be 10 00 00 18 00 00 00 0f 00 81 0 6.0??..?...?.?
  1828. 60: 0a 32 81 0a 28 14 01 00 30 e4 28 01 00 00 00 fe ?2??(??.0?(?...?
  1829. 70: 00 4c 50 31 34 31 57 58 33 2d 54 4c 52 31 00 d8 .LP141WX3-TLR1.?
  1830. 80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
  1831. 90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
  1832. a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
  1833. b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
  1834. c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
  1835. d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
  1836. e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
  1837. f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
  1838. @end verbatim
  1839. @node Installation
  1840. @section Installing libreboot
  1841. This section relates to installing libreboot on supported targets.
  1842. NOTE: if running flashrom -p internal for software based flashing, and you
  1843. get an error related to /dev/mem access, you should reboot with iomem=relaxed
  1844. kernel parameter before running flashrom, or use a kernel that has
  1845. CONFIG_STRICT_DEVMEM not enabled.
  1846. @c ADD itemize block here to show subsections?
  1847. @menu
  1848. * Software methods::
  1849. * Hardware methods::
  1850. @end menu
  1851. @node Software methods
  1852. @subsection Software methods
  1853. @menu
  1854. * List of ROM images in libreboot:: Pre-compiled images for user convenience
  1855. * QEMU:: ROM images for QEMU
  1856. * How to update/install:: If you are already running libreboot or coreboot
  1857. * ThinkPad X60/T60 install:: Initial installation guide if running proprietary firmware
  1858. * MacBook2-1 install:: Initial installation guide if running proprietary firmware
  1859. * ASUS Chromebook C201 install:: Installing Libreboot internally, from the device
  1860. @end menu
  1861. @c QUESTION: Should the device-specific instructions be moved to their own nodes on this level?
  1862. @node List of ROM images in libreboot
  1863. @subsubsection List of ROM images in libreboot
  1864. Libreboot distributes pre-compiled ROM images, built from the libreboot source code. These images are provided for user convenience, so that they don't have to build anything from source on their own.
  1865. The ROM images in each archive use the following at the end of the file name, if they are built with the GRUB payload: @strong{_@emph{keymap}_@emph{mode}.rom}
  1866. Available @emph{modes}: @strong{vesafb} or @strong{txtmode}. The @emph{vesafb} ROM images are recommended, in most cases; @emph{txtmode} ROM images come with MemTest86+, which requires text-mode instead of the usual framebuffer used by coreboot native graphics initialization.
  1867. @emph{keymap} can be one of several keymaps that keyboard supports (there are quite a few), which affects the keyboard layout configuration that is used in GRUB. It doesn't matter which ROM image you choose here, as far as the keymap in GNU/Linux is concerned.
  1868. Keymaps are named appropriately according to each keyboard layout support in GRUB. To learn how these keymaps are created, see @ref{GRUB keyboard layouts - for reference,grub_keyboard}.
  1869. @node QEMU
  1870. @subsubsection ROM images for QEMU
  1871. Libreboot comes with ROM images built for QEMU, by default:
  1872. Examples of how to use libreboot ROM images in QEMU:
  1873. @itemize
  1874. @item
  1875. $ @strong{qemu-system-i386 -M q35 -m 512 -bios qemu_q35_ich9_keymap_mode.rom}
  1876. @item
  1877. $ @strong{qemu-system-i386 -M pc -m 512 -bios qemu_i440fx_piix4_keymap_mode.rom}
  1878. @end itemize
  1879. You can optionally specify the @strong{-serial stdio} argument, so that QEMU will emulate a serial terminal on the standard input/output (most likely your terminal emulator or TTY).
  1880. Other arguments are available for QEMU. The manual will contain more information.
  1881. @node How to update/install
  1882. @subsubsection How to update or install libreboot (if you are already running libreboot or coreboot)
  1883. On all current targets, updating libreboot can be accomplished without disassembly and, therefore, without having to externally re-flash using any dedicated hardware. In other words, you can do everything entirely in software, directly from the OS that is running on your libreboot system.
  1884. @strong{If you are using libreboot_src or git, then make sure that you built the sources first (see @ref{How to build the ROM images,build}).}
  1885. Look at the @ref{List of ROM images in libreboot,list of ROM images} to see which image is compatible with your device.
  1886. @menu
  1887. * Are you currently running the original proprietary firmware?::
  1888. * ASUS KFSN4-DRE?::
  1889. * ASUS KGPE-D16?::
  1890. * ASUS KCMA-D8?::
  1891. * Are you currently running libreboot or coreboot?::
  1892. * MAC address on GM45 X200/R400/T400/T500::
  1893. * Flash chip size::
  1894. * All good?::
  1895. @end menu
  1896. @node Are you currently running the original proprietary firmware?
  1897. @c @subsubheading Are you currently running the original, proprietary firmware?
  1898. If you are currently running the proprietary firmware (not libreboot or coreboot), then the flashing instructions for your system are going to be different.
  1899. X60/T60 users running the proprietary firmware should refer to @ref{ThinkPad X60/T60 install,flashrom_lenovobios}. MacBook2,1 users running Apple EFI should refer to @ref{MacBook2-1 install,flashrom_macbook21}.
  1900. X200 users, refer to @ref{ThinkPad X200/X200S/X200T,x200_external}, R400 users refer to @ref{ThinkPad R400,r400_external}, T400 users refer to @ref{ThinkPad T400,t400_external}, T500 users refer to @ref{ThinkPad T500,t500_external}.
  1901. @node ASUS KFSN4-DRE?
  1902. @c @subsubheading ASUS KFSN4-DRE?
  1903. Internal flashing should work just fine, even if you are currently booting the proprietary firmware.
  1904. Libreboot currently lacks documentation for externally re-flashing an LPC flash chip. However, these boards have the flash chip inside of a PLCC socket, and it is possible to hot-swap the chips. If you want to back up your known-working image, simply hot-swap the chip for one that is the same capacity, after having dumped a copy of the current firmware (flashrom -p internal -r yourchosenname.rom), and then flash that chip with the known-working image. Check whether the system still boots, and if it does, then it should be safe to flash the new image (because you now have a backup of the old image).
  1905. Keeping at least one spare LPC PLCC chip with working firmware on it is highly recommended, in case of bricks.
  1906. @strong{DO NOT hot-swap the chip with your bare hands. Use a PLCC chip extractor. These can be found online. See @uref{http://www.coreboot.org/Developer_Manual/Tools#Chip_removal_tools,http://www.coreboot.org/Developer_Manual/Tools#Chip_removal_tools}}
  1907. Do check the HCL entry: @ref{ASUS KFSN4-DRE motherboard,kfsn4-dre-hcl}.
  1908. @node ASUS KGPE-D16?
  1909. @c @subsubheading ASUS KGPE-D16?
  1910. If you have the proprietary BIOS, you need to flash libreboot externally. See @ref{KGPE-D16,kgpe-d16}.
  1911. If you already have coreboot or libreboot installed, without write protection on the flash chip, then you can do it in software (otherwise, see link above).
  1912. @strong{DO NOT hot-swap the chip with your bare hands. Use a PDIP-8 chip extractor. These can be found online. See @uref{http://www.coreboot.org/Developer_Manual/Tools#Chip_removal_tools,http://www.coreboot.org/Developer_Manual/Tools#Chip_removal_tools}}
  1913. Do check the HCL entry: @ref{ASUS KGPE-D16 motherboard,kgpe-d16-hcl}.
  1914. @node ASUS KCMA-D8?
  1915. @c @subsubheading ASUS KCMA-D8?
  1916. If you have the proprietary BIOS, you need to flash libreboot externally. See @ref{KCMA-D8,kcma-d8}.
  1917. If you already have coreboot or libreboot installed, without write protection on the flash chip, then you can do it in software (otherwise, see link above).
  1918. @strong{DO NOT hot-swap the chip with your bare hands. Use a PDIP-8 chip extractor. These can be found online. See @uref{http://www.coreboot.org/Developer_Manual/Tools#Chip_removal_tools,http://www.coreboot.org/Developer_Manual/Tools#Chip_removal_tools}}
  1919. Do check the HCL entry: @ref{ASUS KCMA-D8 motherboard,kcma-d8-hcl}
  1920. @node Are you currently running libreboot or coreboot?
  1921. @c @subsubheading Are you currently running libreboot (or coreboot)?
  1922. X60/T60 users should be fine with this guide. If you write-protected the flash chip, please refer to @ref{ThinkPad X60 Recovery Guide,x60_unbrick}, @ref{ThinkPad X60 Tablet Recovery Guide,x60tablet_unbrick} or @ref{ThinkPad T60 Recovery Guide,t60_unbrick}. @emph{This probably does not apply to you. Most people do not write-protect the flash chip, so you probably didn't either.}
  1923. Similarly, it is possible to write-protect the flash chip in coreboot or libreboot on GM45 laptops (X200/R400/T400/T500). If you did this, then you will need to use the links above for flashing, treating your laptop as though it currently has the proprietary firmware (because write-protected SPI flash requires external re-flashing, as is also the case when running the proprietary firmware).
  1924. If you did not write-protect the flash chip, or it came to you without any write-protection (@strong{@emph{libreboot does not write-protect the flash chip by default, so this probably applies to you}}), read on!
  1925. @node MAC address on GM45 X200/R400/T400/T500
  1926. @c @subsubheading MAC address on GM45 (X200/R400/T400/T500)
  1927. @strong{Users of the X200/R400/T400/T500 take note:} The MAC address for the onboard ethernet chipset is located inside the flash chip. Libreboot ROM images for these laptops contain a generic MAC address by default (00:F5:F0:40:71:FE), but this is not what you want. @emph{Make sure to change the MAC address inside the ROM image, before flashing it. The instructions on @ref{ICH9 gen utility,ich9gen} show how to do this.}
  1928. It is important that you change the default MAC address, before flashing. It will be printed on a sticker at the bottom of the laptop, or it will be printed on a sticker next to or underneath the RAM. Alternatively, and assuming that your current firmware has the correct MAC address in it, you can get it from your OS.
  1929. @node Flash chip size
  1930. @c @subsubheading Flash chip size
  1931. Use this to find out:@* # @strong{dmidecode | grep ROM\ Size}
  1932. @node All good?
  1933. @c @subsubheading All good?
  1934. Excellent! Moving on...
  1935. How to update the flash chip contents:@* $ @strong{sudo ./flash update @ref{List of ROM images in libreboot,yourrom.rom}}
  1936. Ocassionally, coreboot changes the name of a given board. If flashrom complains about a board mismatch, but you are sure that you chose the correct ROM image, then run this alternative command:@* $ @strong{sudo ./flash forceupdate @ref{List of ROM images in libreboot,yourrom.rom}}
  1937. You should see @strong{"Verifying flash... VERIFIED."} written at the end of the flashrom output. @strong{Shut down} after you see this, and then boot up again after a few seconds.
  1938. @node ThinkPad X60/T60 install
  1939. @subsubsection ThinkPad X60/T60: Initial installation guide (if running the proprietary firmware)
  1940. @strong{This is for the ThinkPad X60 and T60 while running Lenovo BIOS. If you already have coreboot or libreboot running, then go to @ref{How to update/install,flashrom} instead!}
  1941. @strong{If you are flashing a Lenovo ThinkPad T60, be sure to read @ref{Supported T60 list,supported_t60_list}}
  1942. @strong{If you are using libreboot_src or git, then make sure that you built the sources first (see @ref{How to build the ROM images,build}).}
  1943. @strong{Warning: this guide will not instruct the user how to backup the original Lenovo BIOS firmware. These backups are tied to each system, and will not work on any other. For that, please refer to @uref{http://www.coreboot.org/Board:lenovo/x60/Installation,http://www.coreboot.org/Board:lenovo/x60/Installation}.}
  1944. @strong{If you're using libreboot 20150518, note that there is a mistake in the flashing script. do this: @emph{rm -f patch && wget -O flash http://git.savannah.gnu.org/cgit/libreboot.git/plain/flash?id=910b212e90c6f9c57025e1c7b0c08897af787496 && chmod +x flash}}
  1945. The first half of the procedure is as follows:@* $ @strong{sudo ./flash i945lenovo_firstflash @ref{List of ROM images in libreboot,yourrom.rom}.}
  1946. You should see within the output the following:@* @strong{"Updated BUC.TS=1 - 64kb address ranges at 0xFFFE0000 and 0xFFFF0000 are swapped"}.
  1947. You should also see within the output the following:@* @strong{"Your flash chip is in an unknown state"}, @strong{"FAILED"} and @strong{"DO NOT REBOOT OR POWEROFF"}@* Seeing this means that the operation was a @strong{resounding} success! @strong{DON'T PANIC}.
  1948. See this link for more details: @uref{http://thread.gmane.org/gmane.linux.bios.flashrom/575,http://thread.gmane.org/gmane.linux.bios.flashrom/575}.
  1949. If the above is what you see, then @strong{SHUT DOWN}. Wait a few seconds, and then boot; libreboot is running, but there is a 2nd procedure @strong{*needed*} (see below).
  1950. When you have booted up again, you must also do this:@* $ @strong{sudo ./flash i945lenovo_secondflash @ref{List of ROM images in libreboot,yourrom.rom}}
  1951. If flashing fails at this stage, try the following:@* $ @strong{sudo ./flashrom/i686/flashrom -p internal:laptop=force_I_want_a_brick -w @ref{List of ROM images in libreboot,yourrom.rom}}
  1952. You should see within the output the following:@* @strong{"Updated BUC.TS=0 - 128kb address range 0xFFFE0000-0xFFFFFFFF is untranslated"}
  1953. You should also see within the output the following:@* @strong{"Verifying flash... VERIFIED."}
  1954. @node MacBook2-1 install
  1955. @subsubsection MacBook2,1: Initial installation guide (if running the proprietary firmware)
  1956. @strong{If you have a MacBook1,1, refer to @ref{Apple Macbook1-1,macbook1-1} for flashing instructions.}
  1957. @strong{This is for the MacBook2,1 while running Apple EFI firmware. If you already have coreboot or libreboot running, then go to @ref{How to update/install,flashrom} instead!}
  1958. Be sure to read the information in @ref{Apple Macbook2-1,macbook2-1}.
  1959. @strong{Warning: this guide will not instruct the user how to backup the original Apple EFI firmware. For that, please refer to @uref{http://www.coreboot.org/Board:apple/macbook21,http://www.coreboot.org/Board:apple/macbook21}.}
  1960. @strong{If you are using libreboot_src or git, then make sure that you built the sources first (see @ref{How to build the ROM images,build}).}
  1961. Look at the @ref{List of ROM images in libreboot,list of ROM images} to see which image is compatible with your device.
  1962. Use this flashing script, to install libreboot:@* $ @strong{sudo ./flash i945apple_firstflash @ref{List of ROM images in libreboot,yourrom.rom}}
  1963. You should also see within the output the following:@* @strong{"Verifying flash... VERIFIED."}
  1964. Shut down.
  1965. @node ASUS Chromebook C201 install
  1966. @subsubsection ASUS Chromebook C201 installation guide
  1967. These instructions are for installing Libreboot to the ASUS Chromebook C201. Since the device ships with Coreboot, the installation instructions are the same before and after flashing Libreboot for the first time.
  1968. @strong{If you are using libreboot_src or git, then make sure that you built the sources first (see @ref{How to build the ROM images,build}).}
  1969. Look at the @ref{List of ROM images in libreboot,list of ROM images} to see which image is compatible with your device.
  1970. Libreboot can be installed internally from the device, with sufficient privileges. The installation process requires using @strong{Google's modified version of flashrom}, that has support for reflashing the Chromebook's SPI flash. Otherwise, flashing externally will work with the upstream flashrom version.
  1971. @strong{Google's modified version of flashrom} is free software and its source code is made available by Google: @uref{https://chromium.googlesource.com/chromiumos/third_party/flashrom/,flashrom}.@* It is not distributed along with Libreboot yet. However, it is preinstalled on the device, with ChromeOS.
  1972. Installing Libreboot internally requires sufficient privileges on the system installed on the device.@* When the device has ChromeOS installed (as it does initially), it is necessary to gain root privileges in ChromeOS, to be able to access a root shell.
  1973. @menu
  1974. * Gaining root privileges on ChromeOS::
  1975. * Preparing the device for the installation::
  1976. * Installing Libreboot to the SPI flash::
  1977. * Warning with Disabling Developer Mode::
  1978. @end menu
  1979. @node Gaining root privileges on ChromeOS
  1980. @c @subsubheading Gaining root privileges on ChromeOS
  1981. In order to gain root privileges on ChromeOS, developer mode has to be enabled from the recovery mode screen and debugging features have to be enabled in ChromeOS.
  1982. Instructions to access the @ref{Recovery mode screen,recovery mode screen} and @ref{Enabling developer mode,enabling developer mode} are available on the page dedicated to @ref{Depthcharge,depthcharge}.
  1983. Once developer mode is enabled, the device will boot to the @ref{Developer mode screen,developer mode screen}. ChromeOS can be booted by waiting for 30 seconds (the delay is shortened in Libreboot) or by pressing @strong{Ctrl + D}
  1984. After the system has booted, root access can be enabled by clicking on the @strong{Enable debugging features} link. A confirmation dialog will ask whether to proceed.@* After confirming by clicking @strong{Proceed}, the device will reboot and ask for the root password to set. Finally, the operation has to be confirmed by clicking @strong{Enable}.
  1985. After setting the root password, it becomes possible to log-in as root. A tty prompt can be obtained by pressing @strong{Ctrl + Alt + Next}. The @strong{Next} key is the one on the top left of the keyboard.
  1986. @node Preparing the device for the installation
  1987. @c @subsubheading Preparing the device for the installation
  1988. Before installing Libreboot on the device, both its software and hardware has to be prepared to allow the installation procedure and to ensure that security features don't get in the way.
  1989. @menu
  1990. * Configuring verified boot parameters::
  1991. * Removing the write protect screw::
  1992. @end menu
  1993. @node Configuring verified boot parameters
  1994. @c @subsubheading Configuring verified boot parameters
  1995. It is recommended to have access to the @ref{Developer mode screen,developer mode screen} and to @ref{Configuring verified boot parameters for depthcharge,configure the following verified boot parameters}:
  1996. @itemize
  1997. @item
  1998. Kernels signature verification: @emph{disabled}
  1999. @item
  2000. External media boot: @emph{enabled}
  2001. @end itemize
  2002. Those changes can be reverted later, when the device is known to be in a working state.
  2003. @node Removing the write protect screw
  2004. @c @subsubheading Removing the write protect screw
  2005. Since part of the SPI flash is write-protected by a screw, it is necessary to remove the screw to remove the write protection and allow writing Libreboot to the @emph{read-only} part of the flash.
  2006. To access the screw, the device has to be opened. There are 8 screws to remove from the bottom of the device, as shown on the picture below. Two are hidden under the top pads. After removing the screws, the keyboard plastic part can be carefully detached from the rest. @strong{Beware: there are cables attached to it!} It is advised to flip the keyboard plastic part over, as shown on the picture below. The write protect screw is located next to the SPI flash chip, circled in red in the picture below. It has to be removed.
  2007. @uref{@value{docsdir}@value{useinstall}images/c201/screws.jpg,@image{@value{docsdir}@value{useinstall}images/c201/screws,,,Screws,jpg}} @uref{@value{docsdir}@value{useinstall}images/c201/wp-screw.jpg,@image{@value{docsdir}@value{useinstall}images/c201/wp-screw,,,WP screw,jpg}}
  2008. The write protect screw can be put back in place later, when the device is known to be in a working state.
  2009. @node Installing Libreboot to the SPI flash
  2010. @c @subsubheading Installing Libreboot to the SPI flash
  2011. The SPI flash (that holds Libreboot) is divided into various partitions that are used to implement parts of the CrOS security system. Libreboot is installed in the @emph{read-only} coreboot partition, that becomes writable after removing the write-protect screw.
  2012. @menu
  2013. * Installing Libreboot internally from the device::
  2014. * Installing Libreboot externally with a SPI flash programmer::
  2015. @end menu
  2016. @node Installing Libreboot internally from the device
  2017. @c @subsubheading Installing Libreboot internally, from the device
  2018. Before installing Libreboot to the SPI flash internally, the device has to be reassembled.
  2019. All the files from the @strong{veyron_speedy} release (or build) have to be transferred to the device.
  2020. The following operations have to be executed with root privileges on the device (e.g. using the @emph{root} account). In addition, the @strong{cros-flash-replace} script has to be made executable:@* # @strong{chmod a+x cros-flash-replace}@*
  2021. The SPI flash has to be read first:@* # @strong{flashrom -p host -r flash.img}@* @strong{Note: it might be a good idea to copy the produced flash.img file at this point and store it outside of the device for backup purposes.}
  2022. Then, the @strong{cros-flash-replace} script has to be executed as such:@* # @strong{./cros-flash-replace flash.img coreboot ro-frid}@* If any error is shown, it is definitely a bad idea to go further than this point.
  2023. If you are getting @strong{"./cros-flash-replace: Permission denied"} error, it might be that ChromeOS automatically mounts your drive with @strong{noexec} flag for security reasons. You can check if your device is mounted noexec:@* # @strong{mount -l}@* Manually re-mounting the device solves the problem (replace /dev/sda1 with correct partition path and /mnt with desired mount point:@* # @strong{umount /dev/sda1 && mount /dev/sda1 /mnt}
  2024. The resulting flash image can then be flashed back:@* # @strong{flashrom -p host -w flash.img}@*
  2025. You should also see within the output the following:@* @strong{"Verifying flash... VERIFIED."}
  2026. Shut down. The device will now boot to Libreboot.
  2027. @node Installing Libreboot externally with a SPI flash programmer
  2028. @c @subsubheading Installing Libreboot externally, with a SPI flash programmer
  2029. Before installing Libreboot to the SPI flash internally, the device has to be opened.
  2030. The SPI flash is located next to the write protect screw. Its layout is indicated in the picture below. Note that it is not necessary to connect @strong{WP#} since removing the screw already connects it to ground. Before writing to the chip externally, the battery connector has to be detached. It is located under the heat spreader, that has to be unscrewed from the rest of the case. The battery connector is located on the right and has colorful cables, as shown on the picture below.
  2031. @uref{@value{docsdir}@value{useinstall}images/c201/spi-flash-layout.jpg,@image{@value{docsdir}@value{useinstall}images/c201/spi-flash-layout,,,SPI flash layout,jpg}} @uref{@value{docsdir}@value{useinstall}images/c201/battery-connector.jpg,@image{@value{docsdir}@value{useinstall}images/c201/battery-connector,,,Battery connector,jpg}}
  2032. All the files from the @strong{veyron_speedy} release (or build) have to be transferred to the host.
  2033. The following operations have to be executed with root privileges on the host (e.g. using the @emph{root} account). In addition, the @strong{cros-flash-replace} script has to be made executable:@* # @strong{chmod a+x cros-flash-replace}@*
  2034. The SPI flash has to be read first (using the right spi programmer):@* # @strong{flashrom -p @emph{programmer} -r flash.img}@* @strong{Note: it might be a good idea to copy the produced flash.img file at this point and store it outside of the device for backup purposes.}
  2035. Then, the @strong{cros-flash-replace} script has to be executed as such:@* # @strong{./cros-flash-replace flash.img coreboot ro-frid}@* If any error is shown, it is definitely a bad idea to go further than this point.
  2036. The resulting flash image can then be flashed back (using the right spi programmer):@* # @strong{flashrom -p @emph{programmer} -w flash.img}@*
  2037. You should also see within the output the following:@* @strong{"Verifying flash... VERIFIED."}
  2038. The device will now boot to Libreboot.
  2039. @node Warning with Disabling Developer Mode
  2040. @c @subsubheading Warning with Developer Mode
  2041. @c QUESTION: are we sure that default flasg are dev_boot_usb=0 and dev_boot_signed_only=0?
  2042. Disabling the developer mode resets the verified boot parameters to:
  2043. @itemize
  2044. @item
  2045. Kernels signature verification: @emph{disabled}
  2046. @item
  2047. External media boot: @emph{disabled}
  2048. @end itemize
  2049. If you have installed a custom kernel to external device, and wiped the internal device, it may cause your device to be bricked @strong{if you disable the developer mode (by pressing space at boot screen)}. Make sure your custom kernel resides on internal device before disabling the developer mode, or do not disable it at all until you know everyhing works fine.
  2050. However if you have mistakenly disabled developer mode and locked yourself out, Google's recovery image can still be of use. See @uref{https://lists.nongnu.org/archive/html/libreboot/2016-06/msg00021.html, this} post on mailing list. If that did not help, the final solution would be using @ref{Installing Libreboot externally with a SPI flash programmer,SPI flash programmer}.
  2051. @node Hardware methods
  2052. @subsection Hardware methods
  2053. @menu
  2054. * How to program an SPI flash chip with BeagleBone Black or Teensy 3.1::
  2055. * GA-G41M-ES2L flashing tutorial::
  2056. * Flashing Intel D510MO::
  2057. * Configuring EHCI debugging on the BeagleBone Black::
  2058. * KGPE-D16:: Needed if running proprietary firmware, or to unbrick
  2059. * KCMA-D8:: Needed if running proprietary firmware, or to unbrick
  2060. * ThinkPad X60 Recovery Guide::
  2061. * ThinkPad X60 Tablet Recovery Guide::
  2062. * ThinkPad T60 Recovery Guide::
  2063. * ThinkPad X200/X200S/X200T:: Needed if running proprietary firmware, or to unbrick
  2064. * ThinkPad R400:: Needed if running proprietary firmware, or to unbrick
  2065. * ThinkPad T400:: Needed if running proprietary firmware, or to unbrick
  2066. * ThinkPad T500:: Needed if running proprietary firmware, or to unbrick
  2067. @end menu
  2068. @node How to program an SPI flash chip with BeagleBone Black
  2069. @subsubsection How to program an SPI flash chip with the BeagleBone Black or Teensy 3.1
  2070. This document exists as a guide for reading from or writing to an SPI flash chip with the BeagleBone Black, using the @uref{http://flashrom.org/Flashrom,flashrom} software. A BeagleBone Black, rev. C was used when creating this guide, but earlier revisions may also work.
  2071. There was no justification for a further section for the Teensy. Simply refer to @uref{https://www.flashrom.org/Teensy_3.1_SPI_%2B_LPC/FWH_Flasher#ISP_Usage,this page on flashrom.org} for information about how to set it up, and correlate that with the pins on the SPI flash chip as per other guides in the libreboot documentation for each board. At the time of writing, the teensy is tested for flashing on the ThinkPad X200, but it should work for other targets. here is a photo of the setup for Teensy: @uref{http://h5ai.swiftgeek.net/IMG_20160601_120855.jpg,http://h5ai.swiftgeek.net/IMG_20160601_120855.jpg}.
  2072. Onto the BeagleBone black...
  2073. @menu
  2074. * Hardware requirements - BBB::
  2075. * Setting up the 33V DC PSU::
  2076. * Accessing the operating system on the BBB::
  2077. * Setting up spidev on the BBB::
  2078. * Connecting the Pomona 5250/5252::
  2079. * Notes about stability::
  2080. @end menu
  2081. @node Hardware requirements - BBB
  2082. @c @subsubheading Hardware requirements
  2083. Shopping list (pictures of this hardware is shown later):
  2084. @itemize
  2085. @item
  2086. A @uref{http://flashrom.org,Flashrom}-compatible external SPI programmer: @strong{BeagleBone Black}, sometimes referred to as 'BBB', (rev. C) is highly recommended. You can buy one from @uref{https://www.adafruit.com,Adafruit} (USA), @uref{http://electrokit.com,Electrokit} (Sweden) or any of the distributors listed @uref{http://beagleboard.org/black,here} (look below 'Purchase'). We recommend this product because we know that it works well for our purposes and doesn't require any non-free software.
  2087. @item
  2088. Electrical/insulative tape: cover the entire bottom surface of the BBB (the part that rests on a surface). This is important, when placing the BBB on top of a board so that nothing shorts. Most hardware/electronics stores have this. Optionally, you can use the bottom half of a @uref{http://www.hammondmfg.com/1593HAM.htm#BeagleBoneBlack,hammond plastic enclosure}.
  2089. @item
  2090. Clip for connecting to the flash chip: if you have a SOIC-16 flash chip (16 pins), you will need the @strong{Pomona 5252} or equivalent. For SOIC-8 flash chips (8 pins), you will need the @strong{Pomona 5250} or equivalent. Do check which chip you have, before ordering a clip. Also, you might as well buy two clips or more since they break easily. @uref{http://farnell.com/,Farnell element 14} sells these and ships to many countries. Some people find these clips difficult to get hold of, especially in South America. If you know of any good suppliers, please contact the libreboot project with the relevant information. @strong{If you can't get hold of a pomona clip, some other clips might work, e.g. 3M, but they are not always reliable. You can also directly solder the wires to the chip, if that suits you; the clip is just for convenience, really.}
  2091. @item
  2092. @strong{External 3.3V DC power supply}, for powering the flash chip: an ATX power supply / PSU (common on Intel/AMD desktop computers) will work for this. A lab PSU (DC) will also work (adjusted to 3.3V).
  2093. @itemize
  2094. @item
  2095. Getting a multimeter might be worthwhile, to verify that it's supplying 3.3V.
  2096. @end itemize
  2097. @item
  2098. @strong{External 5V DC power supply} (barrel connector), for powering the BBB: the latter can have power supplied via USB, but a dedicated power supply is recommended. These should be easy to find in most places that sell electronics. @strong{OPTIONAL. Only needed if not powering with the USB cable, or if you want to use @ref{ Configuring EHCI debugging on the BeagleBone Black,EHCI debug}}.
  2099. @item
  2100. @strong{Pin header / jumper cables} (2.54mm / 0.1" headers): you should get male--male, male--female and female--female cables in 10cm size. Just get a load of them. Other possible names for these cables/wires/leads are
  2101. @itemize
  2102. @item
  2103. flying leads
  2104. @item
  2105. dupont (or other brand names)
  2106. @item
  2107. breadboard cables (since they are often used on breadboards).
  2108. @end itemize
  2109. @uref{https://www.adafruit.com,Adafruit} sell them, as do many others. @strong{Some people find them difficult to buy. Please contact the libreboot project if you know of any good sellers.} You might also be able to make these cables yourself. For PSU connections, using long cables, e.g. 20cm, is fine, and you can extend them longer than that if needed.
  2110. @item
  2111. @strong{Mini USB A-B cable}: the BBB probably already comes with one. @strong{OPTIONAL---only needed for @ref{ Configuring EHCI debugging on the BeagleBone Black,EHCI debug} or for serial/SSH access without ethernet cable (g_multi kernel module)}.
  2112. @item
  2113. @strong{FTDI TTL cable or debug board}: used for accessing the serial console on the BBB. @uref{http://elinux.org/Beagleboard:BeagleBone_Black_Serial,This page} contains a list. @strong{OPTIONAL---only needed for serial console on the BBB, if not using SSH via ethernet cable.}
  2114. @end itemize
  2115. @node Setting up the 33V DC PSU
  2116. @c @subsubheading Setting up the 3.3V DC PSU
  2117. ATX PSU pinouts can be read on @uref{https://en.wikipedia.org/wiki/Power_supply_unit_%28computer%29#Wiring_diagrams,this Wikipedia page}.
  2118. You can use pin 1 or 2 (orange wire) on a 20-pin or 24-pin ATX PSU for 3.3V, and any of the ground/earth sources (black cables) for ground. Short PS_ON# / Power on (green wire; pin 16 on 24-pin ATX PSU, or pin 14 on a 20-pin ATX PSU) to a ground (black; there is one right next to it) using a wire/paperclip/jumper, then power on the PSU by grounding PS_ON# (this is also how an ATX motherboard turns on a PSU).
  2119. @strong{DO **NOT** use pin 4, 6, do **NOT** use pin 19 or 20 (on a 20-pin ATX PSU), and DO **NOT** use pin 21, 22 or 23 (on a 24-pin ATX PSU). Those wires (the red ones) are 5V, and they **WILL** kill your flash chip. ***NEVER*** supply more than 3.3V to your flash chip (that is, if it's a 3.3V flash chip; 5V and 1.8V SPI flash chips do exist, but they are rare. Always check what voltage your chip takes. Most of them take 3.3V).}
  2120. You only need one 3.3V supply and one ground for the flash chip, after grounding PS_ON#.
  2121. The male end of a 0.1" or 2.54mm header cable is not thick enough to remain permanently connected to the ATX PSU on its own. When connecting header cables to the connector on the ATX PSU, use a female end attached to a thicker piece of wire (you could use a paper clip), or wedge the male end of the jumper cable into the sides of the hole in the connector, instead of going through the centre.
  2122. Here is an example set up:@* @image{@value{docsdir}@value{useinstall}images/x200/psu33,,,,jpg}
  2123. @node Accessing the operating system on the BBB
  2124. @c @subsubheading Accessing the operating system on the BBB
  2125. The operating system on your BBB will probably have an SSH daemon running where the root account has no password. Use SSH to access the operating system and set a root password. By default, the OS on your BBB will most likely use DHCP, so it should already have an IP address.
  2126. You will also be using the OS on your BBB for programming an SPI flash chip.
  2127. @itemize
  2128. @item
  2129. Alternatives to SSH in case SSH fails::
  2130. You can also use a serial FTDI debug board with GNU Screen, to access the serial console.@* # @strong{screen /dev/ttyUSB0 115200}@* Here are some example photos:@* @image{@value{docsdir}@value{useinstall}images/x200/ftdi,,,,jpg} @image{@value{docsdir}@value{useinstall}images/x200/ftdi_port,,,,jpg}@*
  2131. You can also connect the USB cable from the BBB to another computer and a new network interface will appear, with its own IP address. This is directly accessible from SSH, or screen:@* # @strong{screen /dev/ttyACM0 115200}
  2132. You can also access the uboot console, using the serial method instead of SSH.
  2133. @end itemize
  2134. @node Setting up spidev on the BBB
  2135. @c @subsubheading Setting up spidev on the BBB
  2136. Log on as root on the BBB, using either SSH or a serial console as defined in @ref{Accessing the operating system on the BBB,bbb_access}. Make sure that you have internet access on your BBB.
  2137. Follow the instructions at @uref{http://elinux.org/BeagleBone_Black_Enable_SPIDEV#SPI0,http://elinux.org/BeagleBone_Black_Enable_SPIDEV#SPI0} up to (and excluding) the point where it tells you to modify uEnv.txt
  2138. You need to update the software on the BBB first. If you have an element14 brand BBB (sold by Premier Farnell plc. stores like Farnell element14, Newark element14, and Embest), you may need to @uref{https://groups.google.com/forum/?_escaped_fragment_=msg/beagleboard/LPjCn4LEY2I/alozBGsbTJMJ#!msg/beagleboard/LPjCn4LEY2I/alozBGsbTJMJ,work around a bug} in the LED aging init script before you can update your software. If you don't have a file named /etc/init.d/led_aging.sh, you can skip this step and update your software as described below. Otherwise, replace the contents of this file with:
  2139. @verbatim
  2140. #!/bin/sh -e
  2141. ### BEGIN INIT INFO
  2142. # Provides: led_aging.sh
  2143. # Required-Start: $local_fs
  2144. # Required-Stop: $local_fs
  2145. # Default-Start: 2 3 4 5
  2146. # Default-Stop: 0 1 6
  2147. # Short-Description: Start LED aging
  2148. # Description: Starts LED aging (whatever that is)
  2149. ### END INIT INFO
  2150. x=$(/bin/ps -ef | /bin/grep "[l]ed_acc")
  2151. if [ ! -n "$x" -a -x /usr/bin/led_acc ]; then
  2152. /usr/bin/led_acc &
  2153. fi
  2154. @end verbatim
  2155. Run @strong{apt-get update} and @strong{apt-get upgrade} then reboot the BBB, before continuing.
  2156. Check that the firmware exists:@* # @strong{ls /lib/firmware/BB-SPI0-01-00A0.*}@* Output:
  2157. @verbatim
  2158. /lib/firmware/BB-SPI0-01-00A0.dtbo
  2159. @end verbatim
  2160. Then:@* # @strong{echo BB-SPI0-01 > /sys/devices/bone_capemgr.*/slots}@* # @strong{cat /sys/devices/bone_capemgr.*/slots}@* Output:
  2161. @verbatim
  2162. 0: 54:PF---
  2163. 1: 55:PF---
  2164. 2: 56:PF---
  2165. 3: 57:PF---
  2166. 4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
  2167. 5: ff:P-O-L Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
  2168. 7: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-SPI0-01
  2169. @end verbatim
  2170. Verify that the spidev device now exists:@* # @strong{ls -al /dev/spid*}@* Output:
  2171. @verbatim
  2172. crw-rw---T 1 root spi 153, 0 Nov 19 21:07 /dev/spidev1.0
  2173. @end verbatim
  2174. Now the BBB is ready to be used for flashing. Make this persist across reboots:@* In /etc/default/capemgr add @strong{CAPE=BB-SPI0-01} at the end (or change the existing @strong{CAPE=} entry to say that, if an entry already exists.
  2175. Finally, get the ROM image that you would like to flash and put that on your BBB.
  2176. Now test flashrom:@* # @strong{./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512}@* Output:
  2177. @verbatim
  2178. Calibrating delay loop... OK.
  2179. No EEPROM/flash device found.
  2180. Note: flashrom can never write if the flash chip isn't found automatically.
  2181. @end verbatim
  2182. This means that it's working (the clip isn't connected to any flash chip, so the error is fine).
  2183. @node Connecting the Pomona 5250/5252
  2184. @c @subsubheading Connecting the Pomona 5250/5252
  2185. Use this image for reference when connecting the pomona to the BBB: @uref{http://beagleboard.org/Support/bone101#headers,http://beagleboard.org/Support/bone101#headers} (D0 = MISO or connects to MISO).
  2186. The following shows how to connect clip to the BBB (on the P9 header), for SOIC-16 (clip: Pomona 5252):
  2187. @verbatim
  2188. NC - - 21
  2189. 1 - - 17
  2190. NC - - NC
  2191. NC - - NC
  2192. NC - - NC
  2193. NC - - NC
  2194. 18 - - 3.3V (PSU)
  2195. 22 - - NC - this is pin 1 on the flash chip
  2196. This is how you will connect. Numbers refer to pin numbers on the BBB, on the plugs near the DC jack.
  2197. You may also need to connect pins 1 and 9 (tie to 3.3V supply). These are HOLD# and WP#.
  2198. On some systems they are held high, if the flash chip is attached to the board.
  2199. If you're flashing a chip that isn't connected to a board, you'll almost certainly
  2200. have to connect them.
  2201. SOIC16 pinout (more info available online, or in the datasheet for your flash chip):
  2202. HOLD 1-16 SCK
  2203. VDD 2-15 MOSI
  2204. N/C 3-14 N/C
  2205. N/C 4-13 N/C
  2206. N/C 5-12 N/C
  2207. N/C 6-11 N/C
  2208. SS 7-10 GND
  2209. MISO 8-9 WP
  2210. @end verbatim
  2211. The following shows how to connect clip to the BBB (on the P9 header), for SOIC-8 (clip: Pomona 5250):
  2212. @verbatim
  2213. 18 - - 1
  2214. 22 - - NC
  2215. NC - - 21
  2216. 3.3V (PSU) - - 17 - this is pin 1 on the flash chip
  2217. This is how you will connect. Numbers refer to pin numbers on the BBB, on the plugs near the DC jack.
  2218. You may also need to connect pins 3 and 7 (tie to 3.3V supply). These are HOLD# and WP#.
  2219. On some systems they are held high, if the flash chip is attached to the board.
  2220. If you're flashing a chip that isn't connected to a board, you'll almost certainly
  2221. have to connect them.
  2222. SOIC8 pinout (more info available online, or in the datasheet for your flash chip):
  2223. SS 1-8 VDD
  2224. MISO 2-7 HOLD
  2225. WP 3-6 SCK
  2226. GND 4-5 MOSI
  2227. @end verbatim
  2228. @strong{NC = no connection}
  2229. @strong{DO NOT connect 3.3V (PSU) yet. ONLY connect this once the pomona is connected to the flash chip.}
  2230. @strong{You also need to connect the BLACK wire (ground/earth) from the 3.3V PSU to pin 2 on the BBB (P9 header). It is safe to install this now (that is, before you connect the pomona to the flash chip); in fact, you should.}
  2231. if you need to extend the 3.3v psu leads, just use the same colour M-F leads, @strong{but} keep all other leads short (10cm or less)
  2232. You should now have something that looks like this:@* @image{@value{docsdir}@value{useinstall}images/x200/5252_bbb0,,,,jpg} @image{@value{docsdir}@value{useinstall}images/x200/5252_bbb1,,,,jpg}
  2233. @node Notes about stability
  2234. @c @subsubheading Notes about stability
  2235. @uref{http://flashrom.org/ISP,http://flashrom.org/ISP} is what we typically do in libreboot, though not always. That page has some notes about using resistors to affect stability. Currently, we use spispeed=512 (512kHz) but it is possible to use higher speeds while maintaining stability.
  2236. tty0_ in #libreboot was able to get better flashing speeds with the following configuration:
  2237. @itemize
  2238. @item
  2239. "coax" with 0.1 mm core and aluminum foley (from my kitchen), add 100 Ohm resistors (serial)
  2240. @item
  2241. put heatshrink above the foley, for: CS, CLK, D0, D1
  2242. @item
  2243. Twisted pair used as core (in case more capacitors are needed)
  2244. @item
  2245. See this image: @uref{http://i.imgur.com/qHGxKpj.jpg,http://i.imgur.com/qHGxKpj.jpg}
  2246. @item
  2247. He was able to flash at 50MHz (lower speeds are also fine).
  2248. @end itemize
  2249. @node GA-G41M-ES2L flashing tutorial
  2250. @subsubsection GA-G41M-ES2L flashing tutorial
  2251. This guide is for those who want libreboot on their Intel GA-G41M-ES2L motherboard while they still have the original BIOS present.
  2252. @menu
  2253. * Flash chip size - GA-G41M-ES2L::
  2254. * Flashing instructions - GA-G41M-ES2L::
  2255. @end menu
  2256. @node Flash chip size - GA-G41M-ES2L
  2257. @ifinfo
  2258. @subsubheading Flash chip size
  2259. @end ifinfo
  2260. Use this to find out:@* # @strong{dmidecode | grep ROM\ Size}
  2261. @node Flashing instructions - GA-G41M-ES2L
  2262. @ifinfo
  2263. @subsubheading Flashing instructions - GA-G41M-ES2L
  2264. @end ifinfo
  2265. Refer to @ref{How to program an SPI flash chip with BeagleBone Black or Teensy 3.1,bbb_setup} for how to set up the BBB for flashing it externally, if you want to do that.
  2266. Here is an image of the flash chip:
  2267. @image{@value{docsdir}images/ga-g41m-es2l/ga-g41m-es2l,,,,jpg}
  2268. Internal flashing is possible. Boot with proprietary BIOS and GNU/Linux, and run the latest version of flashrom. This board has 2 flash chips, one is a backup.
  2269. Flash the first chip:
  2270. ./flashrom -p internal:dualbiosindex=0 -w libreboot.rom
  2271. Flash the second chip:
  2272. ./flashrom -p internal:dualbiosindex=1 -w libreboot.rom
  2273. NOTE: You need the latest version of flashrom. Just grab it on flashrom.org from their SVN or Git repos.
  2274. That's all!
  2275. NOTE: There is a hardcoded MAC address for this board, due to a bug in the hardware. The
  2276. factory BIOS worked around this per board, but in libreboot we don't. You will need
  2277. to set the MAC address yourself, in your operating system.
  2278. Do refer to the @ref{Hardware compatibility,compatibility page} for more information about this board.
  2279. @node Flashing Intel D510MO
  2280. @subsubsection Flashing Intel D510MO
  2281. D510MO flashing tutorial
  2282. This guide is for those who want libreboot on their Intel D510MO motherboard while they still have the original BIOS present.
  2283. @menu
  2284. * Flash chip size - D510MO::
  2285. * Flashing instructions - D510MO::
  2286. @end menu
  2287. @node Flash chip size - D510MO
  2288. @c @subsubheading Flash chip size
  2289. Use this to find out:@* # @strong{dmidecode | grep ROM\ Size}
  2290. @node Flashing instructions - D510MO
  2291. @c @subsubheading Flashing instructions - D510MO
  2292. @image{@value{docsdir}images/d510mo/d510mo,,,,jpg}
  2293. Use this image for reference, then refer to @ref{How to program an SPI flash chip with BeagleBone Black or Teensy 3.1,bbb_setup} for how to set up the BBB for flashing it.
  2294. Do refer to the @ref{Hardware compatibility,compatibility page} for more information about this board.
  2295. @node Configuring EHCI debugging on the BeagleBone Black
  2296. @subsubsection EHCI debugging on the BeagleBone Black
  2297. If your computer does not boot after installing libreboot, it is very useful to get debug logs from it, from the payload (grub) and/or the kernel (if gets to there). All of them stream debug logs on the available serial (RS-232) by default. However, most of todays laptops lack RS-232 port. The other option is to stream the logs to USB EHCI debug port.
  2298. This section explains step-by-step how to setup BBB as a ``USB EHCI debug dongle'' and configure libreboot and the linux kernel to stream logs to it (TODO: grub).
  2299. I will refer to three computers:
  2300. @itemize
  2301. @item
  2302. @strong{host} - this is the computer you use, have tools, compiler, Internet, etc
  2303. @item
  2304. @strong{BBB} - Beaglebone Black (rev. B or higher, i use rev. C)
  2305. @item
  2306. @strong{target} - the computer you are trying to install liberboot
  2307. @end itemize
  2308. @menu
  2309. * Find USB port on the target that supports EHCI debug::
  2310. * Initial setup of BBB to act as EHCI debug dongle::
  2311. * Patch BBB's g_dbgp module:: Optional, but highly recommended
  2312. * Configure libreboot with EHCI debug::
  2313. * Selecting HCD Index and USB Debug port::
  2314. * How to get the debug logs::
  2315. * Enable EHCI Debug on the target's kernel:: Optional , but recommended
  2316. * References::
  2317. @end menu
  2318. @node Find USB port on the target that supports EHCI debug
  2319. @c @subsubheading Find USB port on the target that supports EHCI debug
  2320. Not all USB controllers support EHCI debug (see: @uref{http://www.coreboot.org/EHCI_Debug_Port#Hardware_capability,EHCI Debug Port} ). Even more, if a USB controller supports EHCI debug, it is available only @strong{on a single port} that might or might not be exposed externally.
  2321. @itemize
  2322. @item
  2323. You need running OS (GNU/Linux) on your target for this step (If you've flashed libreboot and it does not boot, you have to flush back the stock bios)
  2324. @item
  2325. You need USB memory stick (the data on it will not be touched).
  2326. @item
  2327. The EHCI debugging can not be done through external hub, BBB must be connected directly to the debug port of the controller (so, no hubs)
  2328. @end itemize
  2329. @itemize
  2330. @item
  2331. Download @xref{1-ehci-ref,,1}, @uref{http://www.coreboot.org/pipermail/coreboot/attachments/20080909/ae11c291/attachment.sh,this} shell script.
  2332. @end itemize
  2333. @enumerate
  2334. @item
  2335. Plug the usb stick in the first available usb port
  2336. @item
  2337. Run the script, you will get output similar to following:
  2338. @item
  2339. The buses the support debug are Bus 3 (0000:00:1a.0) on Port 1 and Bus 4 (0000:00:1d.0) on port 2. Your usb stick is plugged on Bus 1, Port 3
  2340. @item
  2341. Repeat the steps, plugging the USB stick in the next available port
  2342. @item
  2343. Go through all available ports and remember(write down) those for which bus/port of the usb stick matches one of the bus/port that support debug (bold).
  2344. @end enumerate
  2345. Remember (write down) for each port (external plug) you found that supports debug: @strong{PCI device id, the bus id, the port number, and the physical location of the usb plug.}
  2346. If you do not find a match, you can not get debug over EHCI. Sorry.
  2347. @anchor{1-ehci-ref}
  2348. The guys from coreboot were talking about including the script in coreboot distribution (check the status).
  2349. @node Initial setup of BBB to act as EHCI debug dongle
  2350. @c @subsubheading Initial setup of BBB to act as EHCI debug dongle
  2351. BBB must be powered with a barrel power connector since the mini-B USB plug will be used for the EHCI debug stream. So you will need:
  2352. @itemize
  2353. @item
  2354. power supply (5V, 2A(10W) is sufficient).
  2355. @item
  2356. an extra usb cable: A to mini-B
  2357. @end itemize
  2358. (On BBB) The linux kernel includes module (g_dbgp that enables one of the usb ports on a computer to behave as EHCI debug dongle. Make sure you have this module available on your BBB (Debian 7.8 that comes with BBB should have it), if not, you should compile it yourself (see next section):
  2359. @verbatim
  2360. ls /lib/modules/3.8.13-bone70/kernel/drivers/usb/gadget/g_dbgp.ko
  2361. @end verbatim
  2362. Unload all other g_* modules:
  2363. @verbatim
  2364. # lsmod
  2365. # rmmod g_multi
  2366. ...
  2367. @end verbatim
  2368. Then load g_dbgp :
  2369. @verbatim
  2370. # modprobe g_dbgp
  2371. # lsmod # should show that g_dbgp is loaded, and no other g_*
  2372. @end verbatim
  2373. Plug the mini-B side of the USB cable in your BBB and the A side in your target. Then one of the usb devices on your target (with lsusb ) should be:
  2374. @verbatim
  2375. Bus 001 Device 024: ID 0525:c0de Netchip Technology, Inc.
  2376. @end verbatim
  2377. If you see the device on the target, you are good to continue to the next step.
  2378. @node Patch BBB's g_dbgp module
  2379. @c @subsubheading Patch BBB's g_dbgp module (optional, but highly recommended)
  2380. For the reasons why you need this, see: @uref{http://www.coreboot.org/EHCI_Gadget_Debug,EHCI Gadget Debug}.@*Make sure that you have cross compiling environment for arm-linux-gnueabihf setup on your @emph{host}.
  2381. @itemize
  2382. @item
  2383. On BBB: uname -r - this will give you version number like 3.8.13-bone70 (I will refer to this as: $mav.$miv-$lv: where mav=3.8, miv=13, lv=bone70
  2384. @item
  2385. Get the BBB kernel ready on your host for cross-compiling:
  2386. @end itemize
  2387. @verbatim
  2388. $ cd $work_dir
  2389. $ git clone https://github.com/beagleboard/kernel.git
  2390. $ cd kernel
  2391. $ git checkout $mav (see above)
  2392. $ ./patch.sh
  2393. $ wget http://arago-project.org/git/projects/?p=am33x-cm3.git\;a=blob_plain\;f=bin/am335x-pm-firmware.bin\;hb=HEAD -O kernel/firmware/am335x-pm-firmware.bin
  2394. $ cp configs/beaglebone kernel/arch/arm/configs/beaglebone_defconfig
  2395. @end verbatim
  2396. @itemize
  2397. @item
  2398. Download the patch from @uref{http://www.coreboot.org/images/8/88/Ehci-debug-gadget-patches.tar.gz,here}
  2399. @item
  2400. tar -xf Ehci-debug-gadget-patches.tar.gz (will create dir: usbdebug-gadget)
  2401. @item
  2402. Note that there are two patches (patch_1 and patch_2) for each of the two different version of the kernel (3.8 and 3.10). I will use 3.8. (If using kernel 3.12 patch_1 is not needed)
  2403. @item
  2404. cd kernel (note that this is one more level: you should be in $work_dir/kernel/kernel)
  2405. @item
  2406. Apply the patches:
  2407. @end itemize
  2408. @verbatim
  2409. git apply ../usbdebug-gadget/v3.8-debug-gadget/0001-usb-dbgp-gadget-Fix-re-connecting-after-USB-disconne.patch
  2410. git apply ../usbdebug-gadget/v3.8-debug-gadget/0002-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch
  2411. ;
  2412. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- beaglebone_defconfig -j4@
  2413. @end verbatim
  2414. @itemize
  2415. @item
  2416. You should also apply the linux-libre @emph{deblob} script to turn it into linux-libre (deletes all the blobs from the linux kernel). @uref{http://www.fsfla.org/ikiwiki/selibre/linux-libre/,fsfla website} - see @uref{http://www.fsfla.org/svn/fsfla/software/linux-libre/scripts/,scripts}.
  2417. @item
  2418. Get your current BBB kernel config (from: /boot/config-<ver>) and copy it to your host as $work_dir/kernel/kernel/.config
  2419. @item
  2420. Set proper version number:
  2421. @itemize
  2422. @item
  2423. On your host, edit $work_dir/kernel/kernel/.config (the one you've just copied from BBB), find the line CONFIG_LOCALVERSION="<something or empty>" and change it to CONFIG_LOCALVERSION="-$lv", so it will look something like: CONFIG_LOCALVERSION="-bone70"
  2424. @end itemize
  2425. @item
  2426. Also, make sure that: CONFIG_USB_G_DBGP=m (If not, make menuconfig, and set @@Device Drivers-> USB Support -> USB Gadget Support -> EHCI Debug Device Gadget=m
  2427. @item
  2428. Build the module:
  2429. @end itemize
  2430. @verbatim
  2431. $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4 (is it possoble to build only the gadget modules)
  2432. $ mkdir ../tmp && make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=../tmp modules_install
  2433. @end verbatim
  2434. @itemize
  2435. @item
  2436. on BBB, backup /lib/modules/3.8.13-bone70/kernel/drivers/usb/gadget (i.e. mv /lib/modules/3.8.13-bone70/kernel/drivers/usb/gadget $HOME)
  2437. @item
  2438. copy the freshly compiled usb/gadget dir to /lib/modules/3.8.13-bone70/kernel/drivers/usb
  2439. @item
  2440. restart BBB
  2441. @item
  2442. Remove all g_* modules (rmmod g_<>)
  2443. @item
  2444. modprobpe g_dbgp
  2445. @end itemize
  2446. @node Configure libreboot with EHCI debug
  2447. @c @subsubheading Configure libreboot with EHCI debug
  2448. Libreboot(coreboot) should be configured with debug turned on and to push debug messages to the EHCI debug port.@*If you've downloaded the binary distribution, you can check if it is properly configured in the following way:
  2449. @itemize
  2450. @item
  2451. Go to the libreboot dist root directory cd $libreboot_bin
  2452. @item
  2453. Locate the rom image for your target (I will call it: $img_path)
  2454. @item
  2455. Running the following command will extract the config in a file ./my_config:
  2456. @end itemize
  2457. cbfstool is in coreboot source code under util/
  2458. @verbatim
  2459. ./cbfstool/i686/cbfstool $img_path extract -n config -f ./my_config
  2460. @end verbatim
  2461. @itemize
  2462. @item
  2463. Make sure that the following params in the config are set as following:
  2464. @end itemize
  2465. @verbatim
  2466. CONFIG_USBDEBUG=y (Generic Drivers -> USB 2.0 EHCI debug dongle support)
  2467. CONFIG_USBDEBUG_IN_ROMSTAGE=y (Generic Drivers -> Enable early (pre-RAM) usbdebug)
  2468. CONFIG_USBDEBUG_HCD_INDEX=<HCD Index of usb controller - see below> (Generic Drivers -> Index for EHCI controller to use with usbdebug)
  2469. CONFIG_USBDEBUG_DEFAULT_PORT=<USB Debug port - see below> (Generic Drivers -> Default USB port to use as Debug Port)
  2470. @end verbatim
  2471. The following three are behind radio button in the menu. Only the first one @xref{2-ehci-ref,,2}, should be = y
  2472. @verbatim
  2473. USBDEBUG_DONGLE_STD=y (Generic Drivers -> Type of dongle (Net20DC or compatible) -> Net20DC or compatible)
  2474. CONFIG_USBDEBUG_DONGLE_BEAGLEBONE=n (Generic Drivers -> Type of dongle (Net20DC or compatible) -> BeagleBone)
  2475. CONFIG_USBDEBUG_DONGLE_BEAGLEBONE_BLACK=n (Generic Drivers -> Type of dongle (Net20DC or compatible) -> BeagleBone Black)
  2476. @end verbatim
  2477. @anchor{2-ehci-ref}
  2478. The g_dbgp module on BeagleBone Black (Rev. C) reports it self as Net20DC, the other options are for older BB(B) - ver1. This is documented @uref{https://johnlewis.ie/coreboot-ehci-debug-gadget-demonstration/,here} (also tested/verified).
  2479. Then:@*
  2480. @verbatim
  2481. CONFIG_CONSOLE_USB=y (Console -> USB dongle console output)
  2482. @end verbatim
  2483. Also Debugging ---> Output verbose XYZ ) (@strong{FIXME} somebody verify these):
  2484. @verbatim
  2485. CONFIG_DEBUG_CBFS=y (Output verbose CBFS debug messages )
  2486. CONFIG_HAVE_DEBUG_RAM_SETUP=y (??? What/where is this)
  2487. CONFIG_DEBUG_RAM_SETUP=y (Output verbose RAM init debug messages)
  2488. CONFIG_DEBUG_SMI=y (Output verbose SMI debug messages)
  2489. CONFIG_DEBUG_ACPI=y (Output verbose ACPI debug messages )
  2490. CONFIG_DEBUG_USBDEBUG=y (Output verbose USB 2.0 EHCI debug dongle messages)
  2491. @end verbatim
  2492. If some of the above mentioned configuration options are not as specified, you have to configure and compile libreboot yourself. Please refer to the doc(@strong{FIXME: link} about compiling libreboot.
  2493. @node Selecting HCD Index and USB Debug port
  2494. @c @subsubheading Selecting HCD Index and USB Debug port
  2495. This applies (and works) only if the USB controller that supports debug (found in the first section) is from Intel.@*If the PCI ID of the port you found in the first section is 0000:00:1a.0 or 0000:00:1d.0 , you are ok. Otherwise you have to try without guarantee that will work.
  2496. If the externally exposed port is on a bus with PCI ID == 0000:00:1a.0 then for CONFIG_USBDEBUG_HCD_INDEX choose 2, otherwise choose 0 .
  2497. For CONFIG_USBDEBUG_DEFAULT_PORT choose the port from the first section that correspond to the PCI ID
  2498. Notes:@*The above is based on the implementation of coreboot/src/southbridge/intel/common/usb_debug.c : pci_ehci_dbg_dev() .@*This is enough as it applies for the supported GM45/G45 Thinkpads. coreboot support some other contollers too, but they are irellevent for libreboot (for now).
  2499. @itemize
  2500. @item
  2501. On T500 (with switchable GPU) the debug ports for both intel controllers is exposed.
  2502. @item
  2503. On x200t the debug ports for both intel controllers is exposed.
  2504. @end itemize
  2505. @node How to get the debug logs
  2506. @c @subsubheading How to get the debug logs
  2507. @itemize
  2508. @item
  2509. Plug the USB cable in the target's debug port (the one you found in step 1) and BBB's mini-B USB
  2510. @item
  2511. Make sure no other then g_dbgp of the g_* modules is loaded on your BBB
  2512. @item
  2513. On the BBB:
  2514. @end itemize
  2515. @verbatim
  2516. stty -icrnl -inlcr -F /dev/ttyGS0
  2517. cat /dev/ttyGS0
  2518. @end verbatim
  2519. @itemize
  2520. @item
  2521. Power on the target with libreboot
  2522. @item
  2523. You should see debug logs comming on your BBB console
  2524. @end itemize
  2525. Note that this is not permanent on BBB, if you reboot it, you have to rmmod g_* and modprobe g_dbgp
  2526. @node Enable EHCI Debug on the target's kernel
  2527. @c @subsubheading Enable EHCI Debug on the target's kernel (optional, recommended)
  2528. You have to know how to compile kernel for your target.
  2529. @enumerate
  2530. @item
  2531. Check if early debugging is already enabled: grep CONFIG_EARLY_PRINTK_DBGP /boot/config-<ver>
  2532. @item
  2533. If enabled, you do not have to compile the kernel (skip this step). Otherwise, prepare kernel source for your distribution and select (Kernel hacking -> Early printk via EHCI debug port). Compile and install the new kernel.
  2534. @item
  2535. Edit your grub configuration and add following to the kernel parameters @xref{20-ehci-ref,,20}, @xref{21-ehci-ref,21},: earlyprintk=dbgp,keep. Also, try: earlyprintk=dbgp<N>,keep where N is the debug port id if the first does not work. @c TYPO: kenel > kernel
  2536. @end enumerate
  2537. @node References
  2538. @c @subsubheading References
  2539. @c NOTE: Many of these are not referenced above.
  2540. @enumerate
  2541. @item @anchor{10-ehci-ref}
  2542. @uref{http://www.coreboot.org/EHCI_Debug_Port,EHCI Debug Port}
  2543. @item @anchor{11-ehci-ref}
  2544. @uref{https://johnlewis.ie/coreboot-ehci-debug-gadget-demonstration/,coreboot EHCI debug gadget demonstration}
  2545. @item @anchor{12-ehci-ref}
  2546. @uref{http://www.coreboot.org/EHCI_Gadget_Debug,EHCI Gadget Debug}
  2547. @item @anchor{13-ehci-ref}
  2548. @uref{http://www.coreboot.org/images/8/88/Ehci-debug-gadget-patches.tar.gz,Ehci-debug-gadget-patches.tar.gz}
  2549. @item @anchor{14-ehci-ref}
  2550. @uref{http://wiki.beyondlogic.org/index.php/BeagleBoneBlack_Building_Kernel,Compiling the BeagleBone Black Kernel}
  2551. @item @anchor{15-ehci-ref}
  2552. @uref{http://dumb-looks-free.blogspot.ca/2014/06/beaglebone-black-bbb-compile-kernel.html}
  2553. @item @anchor{16-ehci-ref}
  2554. @uref{http://dumb-looks-free.blogspot.fr/2014/06/beaglebone-black-bbb-kernal-headers.html}
  2555. @item @anchor{17-ehci-ref}
  2556. @uref{http://elinux.org/Building_BBB_Kernel,Building BBB Kernel}
  2557. @item @anchor{18-ehci-ref}
  2558. @uref{http://komposter.com.ua/documents/USB-2.0-Debug-Port%28John-Keys%29.pdf}
  2559. @item @anchor{19-ehci-ref}
  2560. @uref{http://cs.usfca.edu/~cruse/cs698s10/,Exploring USB at the Hardware/Software Interface}
  2561. @item @anchor{20-ehci-ref}
  2562. @uref{https://www.kernel.org/doc/Documentation/x86/earlyprintk.txt}
  2563. @item @anchor{21-ehci-ref}
  2564. @uref{https://wiki.ubuntu.com/Kernel/Debugging/USBearlyprintk}
  2565. @strong{TODO}:
  2566. @enumerate
  2567. @item
  2568. grub does not send messages to EHCI debug. Investigate.
  2569. @item
  2570. The section ``Configure libreboot with EHCI debug'' can be skipped/simplified if a common configuration works for all relevant targets is selected as defualt
  2571. @item
  2572. Patch and compule g_dbgp on BBB instead cross-compile
  2573. @item
  2574. Find a simple way to send debug messages from targets userland
  2575. @end enumerate
  2576. @end enumerate
  2577. @node KGPE-D16
  2578. @subsubsection Initial flashing instructions for KGPE-D16
  2579. @strong{Memory initialization is still problematic, for some modules. We recommend avoiding Kingston modules..}
  2580. This guide is for those who want libreboot on their ASUS KGPE-D16 motherboard, while they still have the proprietary ASUS BIOS present. This guide can also be followed (adapted) if you brick you board, to know how to recover.
  2581. For more general information about this board, refer to @ref{ASUS KGPE-D16 motherboard,kgpe-d16}.
  2582. TODO: show photos here, and other info.
  2583. @menu
  2584. * KGPE-D16 boards and full systems with libreboot preinstalled::
  2585. * External programmer - KGPE-D16::
  2586. @end menu
  2587. @node KGPE-D16 boards and full systems with libreboot preinstalled
  2588. @c @subsubheading KGPE-D16 boards (and full systems) with libreboot preinstalled
  2589. If you don't want to install libreboot yourself, companies exist that sell these boards with libreboot pre-installed, along with a free GNU/Linux distribution.
  2590. Check the @uref{../../suppliers,suppliers} page for more information.
  2591. @node External programmer - KGPE-D16
  2592. @c @subsubheading External programmer
  2593. Refer to @ref{How to program an SPI flash chip with BeagleBone Black or Teensy 3.1,bbb_setup} for a guide on how to set up an external SPI programmer.
  2594. The flash chip is in a PDIP 8 socket (SPI flash chip) on the motherboard, which you take out and then re-flash with libreboot, using the programmer. @strong{DO NOT} remove the chip with your hands. Use a chip extractor tool.
  2595. @node KCMA-D8
  2596. @subsubsection Initial flashing instructions for KCMA-D8
  2597. @strong{Memory initialization is still problematic, for some modules. We recommend avoiding Kingston modules..}
  2598. This guide is for those who want libreboot on their ASUS KGPE-D16 motherboard, while they still have the proprietary ASUS BIOS present. This guide can also be followed (adapted) if you brick you board, to know how to recover.
  2599. For more general information about this board, refer to @ref{ASUS KCMA-D8 motherboard,kcma-d8}.
  2600. TODO: show photos here, and other info.
  2601. @menu
  2602. * KCMA-D8 boards and full systems with libreboot preinstalled::
  2603. * External programmer - KCMA-D8::
  2604. @end menu
  2605. @node KCMA-D8 boards and full systems with libreboot preinstalled
  2606. @c @subsubheading KCMA-D8 boards (and full systems) with libreboot preinstalled
  2607. @c NOTE: I added this section from ./install/kgpe-d16.texi because it was linked to but nonexistent on website
  2608. If you don't want to install libreboot yourself, companies exist that sell these boards with libreboot pre-installed, along with a free GNU/Linux distribution.
  2609. Check the @uref{../../suppliers,suppliers} page for more information.
  2610. @node External programmer - KCMA-D8
  2611. @c @subsubheading External programmer
  2612. Refer to @ref{How to program an SPI flash chip with BeagleBone Black or Teensy 3.1,bbb_setup} for a guide on how to set up an external SPI programmer.
  2613. The flash chip is in a PDIP 8 socket (SPI flash chip) on the motherboard, which you take out and then re-flash with libreboot, using the programmer. @strong{DO NOT} remove the chip with your hands. Use a chip extractor tool.
  2614. @node ThinkPad X60 Recovery Guide
  2615. @subsubsection ThinkPad X60: Recovery guide
  2616. This section documents how to recover from a bad flash that prevents your ThinkPad X60 from booting.
  2617. Types of brick:
  2618. @menu
  2619. * Bucts not reset - X60::
  2620. * Bad rom or user error - X60::
  2621. @end menu
  2622. @node Bucts not reset - X60
  2623. @c @subsubheading Brick type 1: bucts not reset.
  2624. You still have Lenovo BIOS, or you had libreboot running and you flashed another ROM; and you had bucts 1 set and the ROM wasn't dd'd.* or if Lenovo BIOS was present and libreboot wasn't flashed.@*@* In this case, unbricking is easy: reset BUC.TS to 0 by removing that yellow cmos coin (it's a battery) and putting it back after a minute or two:@* @image{@value{docsdir}images/x60_unbrick/0004,,,,jpg}@*@* *Those dd commands should be applied to all newly compiled X60 ROM images (the ROM images in libreboot binary archives already have this applied!):@* dd if=coreboot.rom of=top64k.bin bs=1 skip=$[$(stat -c %s coreboot.rom) - 0x10000] count=64k@* dd if=coreboot.rom bs=1 skip=$[$(stat -c %s coreboot.rom) - 0x20000] count=64k | hexdump@* dd if=top64k.bin of=coreboot.rom bs=1 seek=$[$(stat -c %s coreboot.rom) - 0x20000] count=64k conv=notrunc@* (doing this makes the ROM suitable for use when flashing a system that still has Lenovo BIOS running, using those instructions: @uref{http://www.coreboot.org/Board:lenovo/x60/Installation,http://www.coreboot.org/Board:lenovo/x60/Installation}.
  2625. @node Bad rom or user error - X60
  2626. @c @subsubheading Brick type 2: Bad rom (or user error), system won't boot
  2627. In this scenario, you compiled a ROM that had an incorrect configuration, or there is an actual bug preventing your system from booting. Or, maybe, you set BUC.TS to 0 and shut down after first flash while Lenovo BIOS was running. In any case, your system is bricked and will not boot at all.
  2628. "Unbricking" means flashing a known-good (working) ROM. The problem: you can't boot the system, making this difficult. In this situation, external hardware (see hardware requirements above) is needed which can flash the SPI chip (where libreboot resides).
  2629. Remove those screws:@* @image{@value{docsdir}images/x60_unbrick/0000,,,,jpg} @c IMAGES
  2630. Push the keyboard forward (carefully):@* @image{@value{docsdir}images/x60_unbrick/0001,,,,jpg}
  2631. Lift the keyboard up and disconnect it from the board:@* @image{@value{docsdir}images/x60_unbrick/0002,,,,jpg}
  2632. Grab the right-hand side of the chassis and force it off (gently) and pry up the rest of the chassis:@* @image{@value{docsdir}images/x60_unbrick/0003,,,,jpg}
  2633. You should now have this:@* @image{@value{docsdir}images/x60_unbrick/0004,,,,jpg}
  2634. Disconnect the wifi antenna cables, the modem cable and the speaker:@* @image{@value{docsdir}images/x60_unbrick/0005,,,,jpg}
  2635. Unroute the cables along their path, carefully lifting the tape that holds them in place. Then, disconnect the modem cable (other end) and power connection and unroute all the cables so that they dangle by the monitor hinge on the right-hand side:@* @image{@value{docsdir}images/x60_unbrick/0006,,,,jpg}
  2636. Disconnect the monitor from the motherboard, and unroute the grey antenna cable, carefully lifting the tape that holds it into place:@* @image{@value{docsdir}images/x60_unbrick/0008,,,,jpg}
  2637. Carefully lift the remaining tape and unroute the left antenna cable so that it is loose:@* @image{@value{docsdir}images/x60_unbrick/0009,,,,jpg}
  2638. Remove the screw that is highlighted (do NOT remove the other one; it holds part of the heatsink (other side) into place):@* @image{@value{docsdir}images/x60_unbrick/0011,,,,jpg}
  2639. Remove those screws:@* @image{@value{docsdir}images/x60_unbrick/0012,,,,jpg}
  2640. Carefully remove the plate, like so:@* @image{@value{docsdir}images/x60_unbrick/0013,,,,jpg}
  2641. Remove the SATA connector:@* @image{@value{docsdir}images/x60_unbrick/0014,,,,jpg}
  2642. Now remove the motherboard (gently) and cast the lcd/chassis aside:@* @image{@value{docsdir}images/x60_unbrick/0015,,,,jpg}
  2643. Lift back that tape and hold it with something. Highlighted is the SPI flash chip:@* @image{@value{docsdir}images/x60_unbrick/0016,,,,jpg}
  2644. Now wire up the BBB and the Pomona with your PSU.@* Refer to @ref{How to program an SPI flash chip with BeagleBone Black or Teensy 3.1,bbb_setup} for how to setup the BBB for flashing.@* @strong{Note, the guide mentions a 3.3v DC PSU but you don't need this on the X60: if you don't have or don't want to use an external PSU, then make sure not to connect the 3.3v leads mentioned in the guide; instead, connect the AC adapter (the one that normally charges your battery) so that the board has power (but don't boot it up)} @image{@value{docsdir}images/x60_unbrick/0017,,,,jpg}@* Correlate the following with the BBB guide linked above:
  2645. @verbatim
  2646. POMONA 5250:
  2647. === golden finger and wifi switch ====
  2648. 18 - - 1
  2649. 22 - - NC ---------- audio jacks are on this end
  2650. NC - - 21
  2651. 3.3V (PSU) - - 17 - this is pin 1 on the flash chip
  2652. === CPU fan ===
  2653. This is how you will connect. Numbers refer to pin numbers on the BBB, on the plugs near the DC jack.
  2654. @end verbatim
  2655. Connecting the BBB and pomona (in this image, an external 3.3v DC PSU was used):@* @image{@value{docsdir}@value{useinstall}images/x60/th_bbb_flashing,,,,jpg}
  2656. SSH'd into the BBB:@* # @strong{./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -w yourrom.rom}
  2657. It should be @strong{Verifying flash... VERIFIED} at the end. If flashrom complains about multiple flash chip definitions detected, then choose one of them following the instructions in the output.
  2658. Remove the programmer and put it away somewhere. Put back the tape and press firmly over it:@* @image{@value{docsdir}images/x60_unbrick/0026,,,,jpg}
  2659. Your empty chassis:@* @image{@value{docsdir}images/x60_unbrick/0027,,,,jpg}
  2660. Put the motherboard back in:@* @image{@value{docsdir}images/x60_unbrick/0028,,,,jpg}
  2661. Reconnect SATA:@* @image{@value{docsdir}images/x60_unbrick/0029,,,,jpg}
  2662. Put the plate back and re-insert those screws:@* @image{@value{docsdir}images/x60_unbrick/0030,,,,jpg}
  2663. Re-route that antenna cable around the fan and apply the tape:@* @image{@value{docsdir}images/x60_unbrick/0031,,,,jpg}
  2664. Route the cable here and then (not shown, due to error on my part) reconnect the monitor cable to the motherboard and re-insert the screws:@* @image{@value{docsdir}images/x60_unbrick/0032,,,,jpg}
  2665. Re-insert that screw:@* @image{@value{docsdir}images/x60_unbrick/0033,,,,jpg}
  2666. Route the black antenna cable like so:@* @image{@value{docsdir}images/x60_unbrick/0034,,,,jpg}
  2667. Tuck it in neatly like so:@* @image{@value{docsdir}images/x60_unbrick/0035,,,,jpg}
  2668. Route the modem cable like so:@* @image{@value{docsdir}images/x60_unbrick/0036,,,,jpg}
  2669. Connect modem cable to board and tuck it in neatly like so:@* @image{@value{docsdir}images/x60_unbrick/0037,,,,jpg}
  2670. Route the power connection and connect it to the board like so:@* @image{@value{docsdir}images/x60_unbrick/0038,,,,jpg}
  2671. Route the antenna and modem cables neatly like so:@* @image{@value{docsdir}images/x60_unbrick/0039,,,,jpg}
  2672. Connect the wifi antenna cables. At the start of the tutorial, this system had an Intel wifi chip. Here you see I've replaced it with an Atheros AR5B95 (supports 802.11n and can be used without blobs):@* @image{@value{docsdir}images/x60_unbrick/0040,,,,jpg}
  2673. Connect the modem cable:@* @image{@value{docsdir}images/x60_unbrick/0041,,,,jpg}
  2674. Connect the speaker:@* @image{@value{docsdir}images/x60_unbrick/0042,,,,jpg}
  2675. You should now have this:@* @image{@value{docsdir}images/x60_unbrick/0043,,,,jpg}
  2676. Re-connect the upper chassis:@* @image{@value{docsdir}images/x60_unbrick/0044,,,,jpg}
  2677. Re-connect the keyboard:@* @image{@value{docsdir}images/x60_unbrick/0045,,,,jpg}
  2678. Re-insert the screws that you removed earlier:@* @image{@value{docsdir}images/x60_unbrick/0046,,,,jpg}
  2679. Power on!@* @image{@value{docsdir}images/x60_unbrick/0047,,,,jpg}
  2680. Trisquel live USB menu (using the GRUB ISOLINUX parser):@* @image{@value{docsdir}images/x60_unbrick/0048,,,,jpg}
  2681. Trisquel live desktop:@* @image{@value{docsdir}images/x60_unbrick/0049,,,,jpg}
  2682. @node ThinkPad X60 Tablet Recovery Guide
  2683. @subsubsection ThinkPad X60 Tablet Recovery Guide
  2684. This section documents how to recover from a bad flash that prevents your ThinkPad X60 Tablet from booting.
  2685. Types of brick:
  2686. @menu
  2687. * Bucts not reset - X60 Tablet::
  2688. * Bad rom or user error - X60 Tablet::
  2689. @end menu
  2690. @node Bucts not reset - X60 Tablet
  2691. @c @subsubheading Brick type 1: bucts not reset.
  2692. You still have Lenovo BIOS, or you had libreboot running and you flashed another ROM; and you had bucts 1 set and the ROM wasn't dd'd.* or if Lenovo BIOS was present and libreboot wasn't flashed.@*@* In this case, unbricking is easy: reset BUC.TS to 0 by removing that yellow cmos coin (it's a battery) and putting it back after a minute or two:@* @image{@value{docsdir}images/x60t_unbrick/0008,,,,JPG}@*@* *Those dd commands should be applied to all newly compiled X60 ROM images (the ROM images in libreboot binary archives already have this applied!):@* dd if=coreboot.rom of=top64k.bin bs=1 skip=$[$(stat -c %s coreboot.rom) - 0x10000] count=64k@* dd if=coreboot.rom bs=1 skip=$[$(stat -c %s coreboot.rom) - 0x20000] count=64k | hexdump@* dd if=top64k.bin of=coreboot.rom bs=1 seek=$[$(stat -c %s coreboot.rom) - 0x20000] count=64k conv=notrunc@* (doing this makes the ROM suitable for use when flashing a system that still has Lenovo BIOS running, using those instructions: @uref{http://www.coreboot.org/Board:lenovo/x60/Installation,http://www.coreboot.org/Board:lenovo/x60/Installation}.
  2693. @node Bad rom or user error - X60 Tablet
  2694. @c @subsubheading Brick type 2: Bad rom (or user error), system won't boot
  2695. In this scenario, you compiled a ROM that had an incorrect configuration, or there is an actual bug preventing your system from booting. Or, maybe, you set BUC.TS to 0 and shut down after first flash while Lenovo BIOS was running. In any case, your system is bricked and will not boot at all.
  2696. "Unbricking" means flashing a known-good (working) ROM. The problem: you can't boot the system, making this difficult. In this situation, external hardware (see hardware requirements above) is needed which can flash the SPI chip (where libreboot resides).
  2697. @image{@value{docsdir}images/x60t_unbrick/0000,,,,JPG}
  2698. Remove those screws:@* @image{@value{docsdir}images/x60t_unbrick/0001,,,,JPG}
  2699. Remove the HDD:@* @image{@value{docsdir}images/x60t_unbrick/0002,,,,JPG}
  2700. Push keyboard forward to loosen it:@* @image{@value{docsdir}images/x60t_unbrick/0003,,,,JPG}
  2701. Lift:@* @image{@value{docsdir}images/x60t_unbrick/0004,,,,JPG}
  2702. Remove those:@* @image{@value{docsdir}images/x60t_unbrick/0005,,,,JPG}
  2703. @image{@value{docsdir}images/x60t_unbrick/0006,,,,JPG}
  2704. Also remove that (marked) and unroute the antenna cables:@* @image{@value{docsdir}images/x60t_unbrick/0007,,,,JPG}
  2705. For some X60T laptops, you have to unroute those too:@* @image{@value{docsdir}images/x60t_unbrick/0010,,,,JPG}
  2706. Remove the LCD extend board screws. Also remove those screws (see blue marks) and remove/unroute the cables and remove the metal plate:@* @image{@value{docsdir}images/x60t_unbrick/0008,,,,JPG}
  2707. Remove that screw and then remove the board:@* @image{@value{docsdir}images/x60t_unbrick/0009,,,,JPG}
  2708. Now wire up the BBB and the Pomona with your PSU.@* Refer to @ref{How to program an SPI flash chip with BeagleBone Black or Teensy 3.1,bbb_setup} for how to setup the BBB for flashing.@* @strong{Note, the guide mentions a 3.3v DC PSU but you don't need this on the X60 Tablet: if you don't have or don't want to use an external PSU, then make sure not to connect the 3.3v leads mentioned in the guide; instead, connect the AC adapter (the one that normally charges your battery) so that the board has power (but don't boot it up)} @image{@value{docsdir}images/x60t_unbrick/0011,,,,JPG}@* Correlate the following with the BBB guide linked above:
  2709. @verbatim
  2710. POMONA 5250:
  2711. === golden finger and wifi switch ====
  2712. 18 - - 1
  2713. 22 - - NC ---------- audio jacks are on this end
  2714. NC - - 21
  2715. 3.3V (PSU) - - 17 - this is pin 1 on the flash chip
  2716. === CPU fan ===
  2717. This is how you will connect. Numbers refer to pin numbers on the BBB, on the plugs near the DC jack.
  2718. @end verbatim
  2719. Connecting the BBB and pomona (in this image, an external 3.3v DC PSU was used):@* @image{@value{docsdir}@value{useinstall}images/x60/th_bbb_flashing,,,,jpg}
  2720. SSH'd into the BBB:@* # @strong{./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -w yourrom.rom}
  2721. It should be @strong{Verifying flash... VERIFIED} at the end. If flashrom complains about multiple flash chip definitions detected, then choose one of them following the instructions in the output.
  2722. Reverse the steps to re-assemble your system.
  2723. @node ThinkPad T60 Recovery Guide
  2724. @subsubsection ThinkPad T60 Recovery Guide
  2725. This section documents how to recover from a bad flash that prevents your ThinkPad T60 from booting.
  2726. Types of brick:
  2727. @menu
  2728. * Bucts not reset - T60::
  2729. * Bad rom or user error - T60::
  2730. @end menu
  2731. @node Bucts not reset - T60
  2732. @c @subsubheading Brick type 1: bucts not reset.
  2733. You still have Lenovo BIOS, or you had libreboot running and you flashed another ROM; and you had bucts 1 set and the ROM wasn't dd'd.* or if Lenovo BIOS was present and libreboot wasn't flashed.@*@* In this case, unbricking is easy: reset BUC.TS to 0 by removing that yellow cmos coin (it's a battery) and putting it back after a minute or two:@* @image{@value{docsdir}images/t60_dev/0006,,,,JPG}@*@* *Those dd commands should be applied to all newly compiled T60 ROM images (the ROM images in libreboot binary archives already have this applied!):@* dd if=coreboot.rom of=top64k.bin bs=1 skip=$[$(stat -c %s coreboot.rom) - 0x10000] count=64k@* dd if=coreboot.rom bs=1 skip=$[$(stat -c %s coreboot.rom) - 0x20000] count=64k | hexdump@* dd if=top64k.bin of=coreboot.rom bs=1 seek=$[$(stat -c %s coreboot.rom) - 0x20000] count=64k conv=notrunc@* (doing this makes the ROM suitable for use when flashing a system that still has Lenovo BIOS running, using those instructions: @uref{http://www.coreboot.org/Board:lenovo/x60/Installation,http://www.coreboot.org/Board:lenovo/x60/Installation}. (it says x60, but instructions for t60 are identical)
  2734. @node Bad rom or user error - T60
  2735. @c @subsubheading bad rom (or user error), system won't boot
  2736. In this scenario, you compiled a ROM that had an incorrect configuration, or there is an actual bug preventing your system from booting. Or, maybe, you set BUC.TS to 0 and shut down after first flash while Lenovo BIOS was running. In any case, your system is bricked and will not boot at all.
  2737. "Unbricking" means flashing a known-good (working) ROM. The problem: you can't boot the system, making this difficult. In this situation, external hardware (see hardware requirements above) is needed which can flash the SPI chip (where libreboot resides).
  2738. Remove those screws and remove the HDD:@* @image{@value{docsdir}images/t60_dev/0001,,,,JPG} @image{@value{docsdir}images/t60_dev/0002,,,,JPG}
  2739. Lift off the palm rest:@* @image{@value{docsdir}images/t60_dev/0003,,,,JPG}
  2740. Lift up the keyboard, pull it back a bit, flip it over like that and then disconnect it from the board:@* @image{@value{docsdir}images/t60_dev/0004,,,,JPG} @image{@value{docsdir}images/t60_dev/0005,,,,JPG} @image{@value{docsdir}images/t60_dev/0006,,,,JPG}
  2741. Gently wedge both sides loose:@* @image{@value{docsdir}images/t60_dev/0007,,,,JPG} @image{@value{docsdir}images/t60_dev/0008,,,,JPG}
  2742. Remove that cable from the position:@* @image{@value{docsdir}images/t60_dev/0009,,,,JPG} @image{@value{docsdir}images/t60_dev/0010,,,,JPG}
  2743. Now remove that bezel. Remove wifi, nvram battery and speaker connector (also remove 56k modem, on the left of wifi):@* @image{@value{docsdir}images/t60_dev/0011,,,,JPG}
  2744. Remove those screws:@* @image{@value{docsdir}images/t60_dev/0012,,,,JPG}
  2745. Disconnect the power jack:@* @image{@value{docsdir}images/t60_dev/0013,,,,JPG}
  2746. Remove nvram battery:@* @image{@value{docsdir}images/t60_dev/0014,,,,JPG}
  2747. Disconnect cable (for 56k modem) and disconnect the other cable:@* @image{@value{docsdir}images/t60_dev/0015,,,,JPG} @image{@value{docsdir}images/t60_dev/0016,,,,JPG}
  2748. Disconnect speaker cable:@* @image{@value{docsdir}images/t60_dev/0017,,,,JPG}
  2749. Disconnect the other end of the 56k modem cable:@* @image{@value{docsdir}images/t60_dev/0018,,,,JPG}
  2750. Make sure you removed it:@* @image{@value{docsdir}images/t60_dev/0019,,,,JPG}
  2751. Unscrew those:@* @image{@value{docsdir}images/t60_dev/0020,,,,JPG}
  2752. Make sure you removed those:@* @image{@value{docsdir}images/t60_dev/0021,,,,JPG}
  2753. Disconnect LCD cable from board:@* @image{@value{docsdir}images/t60_dev/0022,,,,JPG}
  2754. Remove those screws then remove the LCD assembly:@* @image{@value{docsdir}images/t60_dev/0023,,,,JPG} @image{@value{docsdir}images/t60_dev/0024,,,,JPG} @image{@value{docsdir}images/t60_dev/0025,,,,JPG}
  2755. Once again, make sure you removed those:@* @image{@value{docsdir}images/t60_dev/0026,,,,JPG}
  2756. Remove the shielding containing the motherboard, then flip it over. Remove these screws, placing them on a steady surface in the same layout as they were in before you removed them. Also, you should mark each screw hole after removing the screw (a permanent marker pen will do), this is so that you have a point of reference when re-assembling the system:@* @image{@value{docsdir}images/t60_dev/0027,,,,JPG} @image{@value{docsdir}images/t60_dev/0028,,,,JPG} @image{@value{docsdir}images/t60_dev/0029,,,,JPG} @image{@value{docsdir}images/t60_dev/0031,,,,JPG} @image{@value{docsdir}images/t60_dev/0032,,,,JPG} @image{@value{docsdir}images/t60_dev/0033,,,,JPG}
  2757. Now wire up the BBB and the Pomona with your PSU.@* Refer to @ref{How to program an SPI flash chip with BeagleBone Black or Teensy 3.1,bbb_setup} for how to setup the BBB for flashing.@* @strong{Note, the guide mentions a 3.3v DC PSU but you don't need this on the T60: if you don't have or don't want to use an external PSU, then make sure not to connect the 3.3v leads mentioned in the guide; instead, connect the AC adapter (the one that normally charges your battery) so that the board has power (but don't boot it up)}@* @image{@value{docsdir}images/t60_dev/0030,,,,JPG}@* Correlate the following with the BBB guide linked above:
  2758. @verbatim
  2759. POMONA 5250:
  2760. === DVD drive ====
  2761. 18 - - 1
  2762. 22 - - NC ---- RAM is on this end
  2763. NC - - 21
  2764. 3.3V (PSU) - - 17 - this is pin 1 on the flash chip
  2765. === audio jacks ===
  2766. This is how you will connect. Numbers refer to pin numbers on the BBB, on the plugs near the DC jack.
  2767. @end verbatim
  2768. Connect the pomona from the BBB to the flash chip. No pics unfortunately. (use the text diagram above).
  2769. SSH'd into the BBB:@* # @strong{./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -w yourrom.rom}
  2770. It should be @strong{Verifying flash... VERIFIED} at the end. If flashrom complains about multiple flash chip definitions detected, then choose one of them following the instructions in the output.
  2771. Put those screws back:@* @image{@value{docsdir}images/t60_dev/0047,,,,JPG}
  2772. Put it back into lower chassis:@* @image{@value{docsdir}images/t60_dev/0048,,,,JPG}
  2773. Attach LCD and insert screws (also, attach the lcd cable to the board):@* @image{@value{docsdir}images/t60_dev/0049,,,,JPG}
  2774. Insert those screws:@* @image{@value{docsdir}images/t60_dev/0050,,,,JPG}
  2775. On the CPU (and there is another chip south-east to it, sorry forgot to take pic) clean off the old thermal paste (with the alcohol) and apply new (Artic Silver 5 is good, others are good too) you should also clean the heatsink the same way@* @image{@value{docsdir}images/t60_dev/0051,,,,JPG}
  2776. Attach the heatsink and install the screws (also, make sure to install the AC jack as highlighted):@* @image{@value{docsdir}images/t60_dev/0052,,,,JPG}
  2777. Reinstall that upper bezel:@* @image{@value{docsdir}images/t60_dev/0053,,,,JPG}
  2778. Do that:@* @image{@value{docsdir}images/t60_dev/0054,,,,JPG} @image{@value{docsdir}images/t60_dev/0055,,,,JPG}
  2779. Re-attach modem, wifi, (wwan?), and all necessary cables. Sorry, forgot to take pics. Look at previous removal steps to see where they go back to.
  2780. Attach keyboard and install nvram battery:@* @image{@value{docsdir}images/t60_dev/0056,,,,JPG} @image{@value{docsdir}images/t60_dev/0057,,,,JPG}
  2781. Place keyboard and (sorry, forgot to take pics) reinstall the palmrest and insert screws on the underside:@* @image{@value{docsdir}images/t60_dev/0058,,,,JPG}
  2782. It lives!@* @image{@value{docsdir}images/t60_dev/0071,,,,JPG} @image{@value{docsdir}images/t60_dev/0072,,,,JPG} @image{@value{docsdir}images/t60_dev/0073,,,,JPG}
  2783. Always stress test ('stress -c 2' and xsensors. below 90C is ok) when replacing cpu paste/heatsink:@* @image{@value{docsdir}images/t60_dev/0074,,,,JPG}
  2784. @node ThinkPad X200/X200S/X200T
  2785. @subsubsection Flashing the X200 with a BeagleBone Black
  2786. Initial flashing instructions for X200.
  2787. This guide is for those who want libreboot on their ThinkPad X200 while they still have the original Lenovo BIOS present. This guide can also be followed (adapted) if you brick your X200, to know how to recover.
  2788. @menu
  2789. * X200 laptops with libreboot pre-installed::
  2790. * Flash chip size - X200::
  2791. * MAC address - X200::
  2792. * Initial BBB configuration - X200::
  2793. * The procedure - X200::
  2794. * Wifi - X200::
  2795. * WWAN - X200::
  2796. * Memory - X200::
  2797. * Booting - X200::
  2798. * X200S and X200 Tablet users GPIO33 trick will not work::
  2799. @end menu
  2800. @node X200 laptops with libreboot pre-installed
  2801. @c @subsubheading X200 laptops with libreboot pre-installed
  2802. If you don't want to install libreboot yourself, companies exist that sell these laptops with libreboot pre-installed, along with a free GNU/Linux distribution.
  2803. Check the @uref{../../suppliers,suppliers} page for more information.
  2804. @node Flash chip size - X200
  2805. @c @subsubheading Flash chip size - X200
  2806. Use this to find out:@* # @strong{dmidecode | grep ROM\ Size}
  2807. The X200S and X200 Tablet will use a WSON-8 flash chip, on the bottom of the motherboard (this requires removal of the motherboard). @strong{Not all X200S/X200T are supported; see @ref{X200S and X200 Tablet,x200s}.}
  2808. @node MAC address - X200
  2809. @c @subsubheading MAC address - X200
  2810. On the X200/X200S/X200T, the MAC address for the onboard gigabit ethernet chipset is stored inside the flash chip, along with other configuration data.
  2811. Keep a note of the MAC address before disassembly; this is very important, because you will need to insert this into the libreboot ROM image before flashing it. It will be written in one of these locations:
  2812. @image{@value{docsdir}@value{useinstall}images/x200/disassembly/0002,,,,jpg} @image{@value{docsdir}@value{useinstall}images/x200/disassembly/0001,,,,jpg}
  2813. @node Initial BBB configuration - X200
  2814. @c @subsubheading Initial BBB configuration - X200
  2815. Refer to @ref{How to program an SPI flash chip with BeagleBone Black or Teensy 3.1,bbb_setup} for how to set up the BBB for flashing.
  2816. The following shows how to connect the clip to the BBB (on the P9 header), for SOIC-16 (clip: Pomona 5252):
  2817. @verbatim
  2818. POMONA 5252 (correlate with the BBB guide)
  2819. === front (display) on your X200 ====
  2820. NC - - 21
  2821. 1 - - 17
  2822. NC - - NC
  2823. NC - - NC
  2824. NC - - NC
  2825. NC - - NC
  2826. 18 - - 3.3V (PSU)
  2827. 22 - - NC - this is pin 1 on the flash chip
  2828. === back (palmrest) on your X200 ===
  2829. This is how you will connect. Numbers refer to pin numbers on the BBB, on the plugs near the DC jack.
  2830. Here is a photo of the SOIC-16 flash chip. Pins are labelled:
  2831. @end verbatim
  2832. The following shows how to connect the clip to the BBB (on the P9 header), for SOIC-8 (clip: Pomona 5250):
  2833. @verbatim
  2834. POMONA 5250 (correlate with the BBB guide)
  2835. === left side of the X200 (where the VGA port is) ====
  2836. 18 - - 1
  2837. 22 - - NC
  2838. NC - - 21
  2839. 3.3V (PSU) - - 17 - this is pin 1 on the flash chip. in front of it is the screen.
  2840. === right side of the X200 (where the audio jacks are) ===
  2841. This is how you will connect. Numbers refer to pin numbers on the BBB, on the plugs near the DC jack.
  2842. Here is a photo of the SOIC-8 flash chip. The pins are labelled:
  2843. Look at the pads in that photo, on the left and right. Those are for SOIC-16. Would it be possible to remove the SOIC-8 and solder a SOIC-16
  2844. chip on those pins?
  2845. @end verbatim
  2846. @strong{On the X200S and X200 Tablet the flash chip is underneath the board, in a WSON package. The pinout is very much the same as a SOIC-8, except you need to solder (there are no clips available).@* The following image shows how this is done:}@* @image{@value{docsdir}@value{useinstall}images/x200/wson_soldered,,,,jpg} @* In this image, a pin header was soldered onto the WSON. Another solution might be to de-solder the WSON-8 chip and put a SOIC-8 there instead. Check the list of SOIC-8 flash chips at @ref{Flash chips,flashchips} but do note that these are only 4MiB (32Mb) chips. The only X200 SPI chips with 8MiB capacity are SOIC-16. For 8MiB capacity in this case, the X201 SOIC-8 flash chip (Macronix 25L6445E) might work.
  2847. @node The procedure - X200
  2848. @c @subsubheading The procedure - X200
  2849. This section is for the X200. This does not apply to the X200S or X200 Tablet (for those systems, you have to remove the motherboard completely, since the flash chip is on the other side of the board).
  2850. Remove these screws:@* @image{@value{docsdir}@value{useinstall}images/x200/disassembly/0003,,,,jpg}
  2851. Push the keyboard forward, gently, then lift it off and disconnect it from the board:@* @image{@value{docsdir}@value{useinstall}images/x200/disassembly/0004,,,,jpg} @image{@value{docsdir}@value{useinstall}images/x200/disassembly/0005,,,,jpg}
  2852. Pull the palm rest off, lifting from the left and right side at the back of the palm rest:@* @image{@value{docsdir}@value{useinstall}images/x200/disassembly/0006,,,,jpg}
  2853. Lift back the tape that covers a part of the flash chip, and then connect the clip:@* @image{@value{docsdir}@value{useinstall}images/x200/disassembly/0007,,,,jpg} @image{@value{docsdir}@value{useinstall}images/x200/disassembly/0008,,,,jpg}
  2854. On pin 2 of the BBB, where you have the ground (GND), connect the ground to your PSU:@* @image{@value{docsdir}@value{useinstall}images/x200/disassembly/0009,,,,jpg} @image{@value{docsdir}@value{useinstall}images/x200/disassembly/0010,,,,jpg}
  2855. Connect the 3.3V supply from your PSU to the flash chip (via the clip):@* @image{@value{docsdir}@value{useinstall}images/x200/disassembly/0011,,,,jpg} @image{@value{docsdir}@value{useinstall}images/x200/disassembly/0012,,,,jpg}
  2856. Of course, make sure that your PSU is also plugged in and turn on:@* @image{@value{docsdir}@value{useinstall}images/x200/disassembly/0013,,,,jpg}
  2857. This tutorial tells you to use an ATX PSU, for the 3.3V DC supply. The PSU used when taking these photos is actually not an ATX PSU, but a PSU that is designed specifically for providing 3.3V DC (an ATX PSU will also work):@* @image{@value{docsdir}@value{useinstall}images/x200/disassembly/0014,,,,jpg}
  2858. Now, you should be ready to install libreboot.
  2859. Log in as root on your BBB, using the instructions in @ref{Accessing the operating system on the BBB,bbb_access}.
  2860. Test that flashrom works:@* # @strong{./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512}@* In this case, the output was:
  2861. @verbatim
  2862. flashrom v0.9.7-r1854 on Linux 3.8.13-bone47 (armv7l)
  2863. flashrom is free software, get the source code at http://www.flashrom.org
  2864. Calibrating delay loop... OK.
  2865. Found Macronix flash chip "MX25L6405(D)" (8192 kB, SPI) on linux_spi.
  2866. Found Macronix flash chip "MX25L6406E/MX25L6436E" (8192 kB, SPI) on linux_spi.
  2867. Found Macronix flash chip "MX25L6445E/MX25L6473E" (8192 kB, SPI) on linux_spi.
  2868. Multiple flash chip definitions match the detected chip(s): "MX25L6405(D)", "MX25L6406E/MX25L6436E", "MX25L6445E/MX25L6473E"
  2869. Please specify which chip definition to use with the -c <chipname> option.
  2870. @end verbatim
  2871. How to backup factory.rom (change the -c option as neeed, for your flash chip):@* # @strong{./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r factory.rom}@* # @strong{./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r factory1.rom}@* # @strong{./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r factory2.rom}@* Note: the @strong{-c} option is not required in libreboot's patched flashrom, because the redundant flash chip definitions in @emph{flashchips.c} have been removed.@* Now compare the 3 images:@* # @strong{sha512sum factory*.rom}@* If the hashes match, then just copy one of them (the factory.rom) to a safe place (on a drive connected to another system, not the BBB). This is useful for reverse engineering work, if there is a desirable behaviour in the original firmware that could be replicated in coreboot and libreboot.
  2872. Follow the instructions at @ref{ICH9 gen utility,ich9gen} to change the MAC address inside the libreboot ROM image, before flashing it. Although there is a default MAC address inside the ROM image, this is not what you want. @strong{Make sure to always change the MAC address to one that is correct for your system.}
  2873. Now flash it:@* # @strong{./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -w path/to/libreboot/rom/image.rom -V}
  2874. @image{@value{docsdir}@value{useinstall}images/x200/disassembly/0015,,,,jpg}
  2875. You might see errors, but if it says @strong{Verifying flash... VERIFIED} at the end, then it's flashed and should boot. If you see errors, try again (and again, and again); the message @strong{Chip content is identical to the requested image} is also an indication of a successful installation.
  2876. Example output from running the command (see above):
  2877. @verbatim
  2878. flashrom v0.9.7-r1854 on Linux 3.8.13-bone47 (armv7l)
  2879. flashrom is free software, get the source code at http://www.flashrom.org
  2880. Calibrating delay loop... OK.
  2881. Found Macronix flash chip "MX25L6405(D)" (8192 kB, SPI) on linux_spi.
  2882. Reading old flash chip contents... done.
  2883. Erasing and writing flash chip... FAILED at 0x00001000! Expected=0xff, Found=0x00, failed byte count from 0x00000000-0x0000ffff: 0xd716
  2884. ERASE FAILED!
  2885. Reading current flash chip contents... done. Looking for another erase function.
  2886. Erase/write done.
  2887. Verifying flash... VERIFIED.
  2888. @end verbatim
  2889. @node Wifi - X200
  2890. @c @subsubheading Wifi - X200
  2891. The X200 typically comes with an Intel wifi chipset, which does not work without proprietary software. For a list of wifi chipsets that work without proprietary software, see @ref{Recommended wifi chipsets,recommended_wifi}.
  2892. Some X200 laptops come with an Atheros chipset, but this is 802.11g only.
  2893. It is recommended that you install a new wifi chipset. This can only be done after installing libreboot, because the original firmware has a whitelist of approved chips, and it will refuse to boot if you use an 'unauthorized' wifi card.
  2894. The following photos show an Atheros AR5B95 being installed, to replace the Intel chip that this X200 came with:@* @image{@value{docsdir}@value{useinstall}images/x200/disassembly/0016,,,,jpg} @image{@value{docsdir}@value{useinstall}images/x200/disassembly/0017,,,,jpg}
  2895. @node WWAN - X200
  2896. @c @subsubheading WWAN - X200
  2897. If you have a WWAN/3G card and/or sim card reader, remove them permanently. The WWAN-3G card has proprietary firmware inside; the technology is identical to what is used in mobile phones, so it can also track your movements.
  2898. Not to be confused with wifi (wifi is fine).
  2899. @node Memory - X200
  2900. @c @subsubheading Memory - X200
  2901. You need DDR3 SODIMM PC3-8500 RAM installed, in matching pairs (speed/size). Non-matching pairs won't work. You can also install a single module (meaning, one of the slots will be empty) in slot 0.
  2902. NOTE: reports from some users indicate that non matching pairs might work (e.g. 1+2 GiB).
  2903. Make sure that the RAM you buy is the 2Rx8 density.
  2904. @uref{http://www.forum.thinkpads.com/viewtopic.php?p=760721, This page} might be useful for RAM compatibility info
  2905. (note: coreboot raminit is different, so this page might be BS)
  2906. In this photo, 8GiB of RAM (2x4GiB) is installed:@* @image{@value{docsdir}@value{useinstall}images/x200/disassembly/0018,,,,jpg}
  2907. @node Booting - X200
  2908. @c @subsubheading Boot it!
  2909. You should see something like this:
  2910. @image{@value{docsdir}@value{useinstall}images/x200/disassembly/0019,,,,jpg}
  2911. Now @ref{GNU/Linux distributions,install GNU/Linux}.
  2912. @node X200S and X200 Tablet users GPIO33 trick will not work
  2913. @c @subsubheading X200S and X200 Tablet users: GPIO33 trick will not work.
  2914. sgsit found out about a pin called GPIO33, which can be grounded to disable the flashing protections by the descriptor and stop the ME from starting (which itself interferes with flashing attempts). The theory was proven correct; however, it is still useless in practise.
  2915. Look just above the 7 in TP37 (that's GPIO33):@* @image{@value{docsdir}@value{useinstall}images/x200/gpio33_location,,,,jpg}
  2916. By default we would see this in lenovobios, when trying flashrom -p internal -w rom.rom:
  2917. @verbatim
  2918. FREG0: Warning: Flash Descriptor region (0x00000000-0x00000fff) is read-only.
  2919. FREG2: Warning: Management Engine region (0x00001000-0x005f5fff) is locked.
  2920. @end verbatim
  2921. With GPIO33 grounded during boot, this disabled the flash protections as set by descriptor, and stopped the ME from starting. The output changed to:
  2922. @verbatim
  2923. The Flash Descriptor Override Strap-Pin is set. Restrictions implied by
  2924. the Master Section of the flash descriptor are NOT in effect. Please note
  2925. that Protected Range (PR) restrictions still apply.
  2926. @end verbatim
  2927. The part in bold is what got us. This was still observed:
  2928. @verbatim
  2929. PR0: Warning: 0x007e0000-0x01ffffff is read-only.
  2930. PR4: Warning: 0x005f8000-0x005fffff is locked.
  2931. @end verbatim
  2932. It is actually possible to disable these protections. Lenovobios does, when updating the BIOS (proprietary one). One possible way to go about this would be to debug the BIOS update utility from Lenovo, to find out how it's disabling these protections. Some more research is available here: @uref{http://www.coreboot.org/Board:lenovo/x200/internal_flashing_research,http://www.coreboot.org/Board:lenovo/x200/internal_flashing_research}
  2933. On a related note, libreboot has a utility that could help with investigating this: @ref{demefactory utility,demefactory}
  2934. @node ThinkPad R400
  2935. @subsubsection Flashing the ThinkPad R400 with a BeagleBone Black
  2936. Initial flashing instructions for R400.
  2937. This guide is for those who want libreboot on their ThinkPad R400 while they still have the original Lenovo BIOS present. This guide can also be followed (adapted) if you brick your R400, to know how to recover.
  2938. Before following this section, please make sure to setup your libreboot ROM properly first. Although ROM images are provided pre-built in libreboot, there are some modifications that you need to make to the one you chose before flashing. (instructions referenced later in this guide)
  2939. @menu
  2940. * Libreboot T400::
  2941. * Serial port - R400::
  2942. * LCD compatibly - R400::
  2943. * A note about CPUs - R400::
  2944. * A note about GPUs - R400::
  2945. * CPU paste required - R400::
  2946. * Flash chip size - R400::
  2947. * MAC address - R400::
  2948. * Initial BBB configuration - R400::
  2949. * Disassembly - R400::
  2950. * Thermal paste - IMPORTANT - R400::
  2951. * Wifi - R400::
  2952. * WWAN - R400::
  2953. * Memory - R400::
  2954. * Booting - R400::
  2955. @end menu
  2956. @node Libreboot T400
  2957. @c @subsubheading Libreboot T400
  2958. You may also be interested in the smaller, more portable @ref{ThinkPad T400,Libreboot T400}.
  2959. @node Serial port - R400
  2960. @c @subsubheading Serial port
  2961. EHCI debug might not be needed. It has been reported that the docking station for this laptop has a serial port, so it might be possible to use that instead.
  2962. @node LCD compatibly - R400
  2963. @c @subsubheading LCD compatibly
  2964. Not all LCD panels are compatible yet. See @ref{LCD compatibility on GM45 laptops,gm45_lcd}.
  2965. @node A note about CPUs - R400
  2966. @c @subsubheading A note about CPUs
  2967. @uref{http://www.thinkwiki.org/wiki/Category:R400,ThinkWiki} has a list of CPUs for this system. The Core 2 Duo P8400 and P8600 are believed to work in libreboot. The Core 2 Duo T9600 was confirmed to work, so the T9400 probably also works. @strong{The Core 2 Duo T5870/5670 and Celeron M 575/585 are untested!}
  2968. @itemize
  2969. @item
  2970. Quad-core CPUs
  2971. @itemize @minus
  2972. @item
  2973. Incompatible. Do not use.
  2974. @end itemize
  2975. @end itemize
  2976. @node A note about GPUs - R400
  2977. @c @subsubheading A note about GPUs
  2978. Some models have an Intel GPU, while others have both an ATI and an Intel GPU; this is referred to as "switchable graphics". In the @emph{BIOS setup} program for lenovobios, you can specify that the system will use one or the other (but not both).
  2979. Libreboot is known to work on systems with only the Intel GPU, using native graphics initialization. On systems with switchable graphics, the Intel GPU is used and the ATI GPU is disabled, so native graphics initialization works all the same.
  2980. @node CPU paste required - R400
  2981. @c @subsubheading CPU paste required
  2982. See @xref{paste-r400,,paste}.
  2983. @node Flash chip size - R400
  2984. @c @subsubheading Flash chip size
  2985. Use this to find out:@* # @strong{dmidecode | grep ROM\ Size}@*
  2986. @node MAC address - R400
  2987. @c @subsubheading MAC address
  2988. On the R400, the MAC address for the onboard gigabit ethernet chipset is stored inside the flash chip, along with other configuration data.
  2989. Keep a note of the MAC address before disassembly; this is very important, because you will need to insert this into the libreboot ROM image before flashing it. It will be written in one of these locations:
  2990. @image{@value{docsdir}@value{useinstall}images/t400/macaddress0,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/macaddress1,,,,jpg} @image{@value{docsdir}@value{useinstall}images/x200/disassembly/0001,,,,jpg}
  2991. @node Initial BBB configuration - R400
  2992. @c @subsubheading Initial BBB configuration
  2993. Refer to @ref{How to program an SPI flash chip with BeagleBone Black or Teensy 3.1,bbb_setup} for how to setup the BBB for flashing.
  2994. The following shows how to connect clip to the BBB (on the P9 header), for SOIC-16 (clip: Pomona 5252):
  2995. @verbatim
  2996. POMONA 5252 (correlate with the BBB guide)
  2997. === ethernet jack and VGA port ====
  2998. NC - - 21
  2999. 1 - - 17
  3000. NC - - NC
  3001. NC - - NC
  3002. NC - - NC
  3003. NC - - NC
  3004. 18 - - 3.3V (PSU)
  3005. 22 - - NC - this is pin 1 on the flash chip
  3006. === SATA port ===
  3007. This is how you will connect. Numbers refer to pin numbers on the BBB, on the plugs near the DC jack.
  3008. @end verbatim
  3009. The following shows how to connect clip to the BBB (on the P9 header), for SOIC-8 (clip: Pomona 5250):
  3010. @verbatim
  3011. POMONA 5250 (correlate with the BBB guide)
  3012. === RAM slots ====
  3013. 18 - - 1
  3014. 22 - - NC
  3015. NC - - 21
  3016. 3.3V (PSU) - - 17 - this is pin 1 on the flash chip
  3017. === slot where the AC jack is connected ===
  3018. This is how you will connect. Numbers refer to pin numbers on the BBB, on the plugs near the DC jack.
  3019. @end verbatim
  3020. @node Disassembly - R400
  3021. @c @subsubheading Disassembly
  3022. Remove all screws:@* @image{@value{docsdir}@value{useinstall}images/r400/0000,,,,jpg}@* Remove the HDD and optical drive:@* @image{@value{docsdir}@value{useinstall}images/r400/0001,,,,jpg}@* Remove the hinge screws:@* @image{@value{docsdir}@value{useinstall}images/r400/0002,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0003,,,,jpg}
  3023. Remove the palm rest and keyboard:@* @image{@value{docsdir}@value{useinstall}images/r400/0004,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0005,,,,jpg}
  3024. Remove these screws, and then remove the bezel:@* @image{@value{docsdir}@value{useinstall}images/r400/0006,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0007,,,,jpg}
  3025. Remove the speaker screws, but don't remove the speakers yet (just set them loose):@* @image{@value{docsdir}@value{useinstall}images/r400/0008,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0009,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0010,,,,jpg}
  3026. Remove these screws, and then remove the metal plate:@* @image{@value{docsdir}@value{useinstall}images/r400/0011,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0012,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0013,,,,jpg}
  3027. Remove the antennas from the wifi card, and then start unrouting them:@* @image{@value{docsdir}@value{useinstall}images/r400/0014,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0015,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0016,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0017,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0018,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0019,,,,jpg}
  3028. Disconnect the LCD cable from the motherboard:@* @image{@value{docsdir}@value{useinstall}images/r400/0020,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0021,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0022,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0023,,,,jpg}
  3029. Remove the hinge screws, and then remove the LCD panel:@* @image{@value{docsdir}@value{useinstall}images/r400/0024,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0025,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0026,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0027,,,,jpg}
  3030. Remove this:@* @image{@value{docsdir}@value{useinstall}images/r400/0028,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0029,,,,jpg}
  3031. Remove this long cable (there are 3 connections):@* @image{@value{docsdir}@value{useinstall}images/r400/0030,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0031,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0032,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0033,,,,jpg}
  3032. Disconnect the speaker cable, and remove the speakers:@* @image{@value{docsdir}@value{useinstall}images/r400/0034,,,,jpg}
  3033. Remove the heatsink screws, remove the fan and then remove the heatsink/fan:@* @image{@value{docsdir}@value{useinstall}images/r400/0035,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0036,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0037,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0038,,,,jpg}
  3034. Remove the NVRAM battery:@* @image{@value{docsdir}@value{useinstall}images/r400/0039,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0040,,,,jpg}
  3035. Remove this screw:@* @image{@value{docsdir}@value{useinstall}images/r400/0041,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0042,,,,jpg}
  3036. Disconnect the AC jack:@* @image{@value{docsdir}@value{useinstall}images/r400/0043,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0044,,,,jpg}
  3037. Remove this screw and then remove what is under it:@* @image{@value{docsdir}@value{useinstall}images/r400/0045,,,,jpg}
  3038. Remove this:@* @image{@value{docsdir}@value{useinstall}images/r400/0046,,,,jpg}
  3039. Lift the motherboard (which is still inside the cage) from the side on the right, removing it completely:@* @image{@value{docsdir}@value{useinstall}images/r400/0047,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0048,,,,jpg}
  3040. Remove all screws, marking each hole so that you know where to re-insert them. You should place the screws in a layout corresponding to the order that they were in before removal: @image{@value{docsdir}@value{useinstall}images/r400/0049,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0050,,,,jpg}
  3041. Remove the motherboard from the cage, and the SPI flash chip will be next to the memory slots:@* @image{@value{docsdir}@value{useinstall}images/r400/0051,,,,jpg} @image{@value{docsdir}@value{useinstall}images/r400/0052,,,,jpg}
  3042. Connect your programmer, then connect GND and 3.3V@* @image{@value{docsdir}@value{useinstall}images/t400/0065,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0066,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0067,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0069,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0070,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0071,,,,jpg}
  3043. A dedicated 3.3V PSU was used to create this guide, but at ATX PSU is also fine:@* @image{@value{docsdir}@value{useinstall}images/t400/0072,,,,jpg}
  3044. Of course, make sure to turn on your PSU:@* @image{@value{docsdir}@value{useinstall}images/x200/disassembly/0013,,,,jpg}
  3045. Now, you should be ready to install libreboot.
  3046. Log in as root on your BBB, using the instructions in @ref{Accessing the operating system on the BBB,bbb_access}.
  3047. Test that flashrom works:@* # @strong{./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512}@* In this case, the output was:
  3048. @verbatim
  3049. flashrom v0.9.7-r1854 on Linux 3.8.13-bone47 (armv7l)
  3050. flashrom is free software, get the source code at http://www.flashrom.org
  3051. Calibrating delay loop... OK.
  3052. Found Macronix flash chip "MX25L6405(D)" (8192 kB, SPI) on linux_spi.
  3053. Found Macronix flash chip "MX25L6406E/MX25L6436E" (8192 kB, SPI) on linux_spi.
  3054. Found Macronix flash chip "MX25L6445E/MX25L6473E" (8192 kB, SPI) on linux_spi.
  3055. Multiple flash chip definitions match the detected chip(s): "MX25L6405(D)", "MX25L6406E/MX25L6436E", "MX25L6445E/MX25L6473E"
  3056. Please specify which chip definition to use with the -c <chipname> option.
  3057. @end verbatim
  3058. How to backup factory.rom (change the -c option as neeed, for your flash chip):@* # @strong{./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r factory.rom}@* # @strong{./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r factory1.rom}@* # @strong{./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r factory2.rom}@* Note: the @strong{-c} option is not required in libreboot's patched flashrom, because the redundant flash chip definitions in @emph{flashchips.c} have been removed.@* Now compare the 3 images:@* # @strong{sha512sum factory*.rom}@* If the hashes match, then just copy one of them (the factory.rom) to a safe place (on a drive connected to another system, not the BBB). This is useful for reverse engineering work, if there is a desirable behaviour in the original firmware that could be replicated in coreboot and libreboot.
  3059. Follow the instructions at @ref{ICH9 gen utility,ich9gen} to change the MAC address inside the libreboot ROM image, before flashing it. Although there is a default MAC address inside the ROM image, this is not what you want. @strong{Make sure to always change the MAC address to one that is correct for your system.}
  3060. Now flash it:@* # @strong{./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -w path/to/libreboot/rom/image.rom -V}
  3061. @image{@value{docsdir}@value{useinstall}images/x200/disassembly/0015,,,,jpg}
  3062. You might see errors, but if it says @strong{Verifying flash... VERIFIED} at the end, then it's flashed and should boot. If you see errors, try again (and again, and again); the message @strong{Chip content is identical to the requested image} is also an indication of a successful installation.
  3063. Example output from running the command (see above):
  3064. @verbatim
  3065. flashrom v0.9.7-r1854 on Linux 3.8.13-bone47 (armv7l)
  3066. flashrom is free software, get the source code at http://www.flashrom.org
  3067. Calibrating delay loop... OK.
  3068. Found Macronix flash chip "MX25L6405(D)" (8192 kB, SPI) on linux_spi.
  3069. Reading old flash chip contents... done.
  3070. Erasing and writing flash chip... FAILED at 0x00001000! Expected=0xff, Found=0x00, failed byte count from 0x00000000-0x0000ffff: 0xd716
  3071. ERASE FAILED!
  3072. Reading current flash chip contents... done. Looking for another erase function.
  3073. Erase/write done.
  3074. Verifying flash... VERIFIED.
  3075. @end verbatim
  3076. @node Thermal paste - IMPORTANT - R400
  3077. @c @subsubheading Thermal paste (IMPORTANT)
  3078. @anchor{paste-r400}
  3079. Because part of this procedure involved removing the heatsink, you will need to apply new paste. Arctic MX-4 is ok. You will also need isopropyl alcohol and an anti-static cloth to clean with.
  3080. When re-installing the heatsink, you must first clean off all old paste with the alcohol/cloth. Then apply new paste. Arctic MX-4 is also much better than the default paste used on these systems.
  3081. @image{@value{docsdir}@value{useinstall}images/t400/paste,,,,jpg}
  3082. NOTE: the photo above is for illustration purposes only, and does not show how to properly apply the thermal paste. Other guides online detail the proper application procedure.
  3083. @node Wifi - R400
  3084. @c @subsubheading Wifi
  3085. The R400 typically comes with an Intel wifi chipset, which does not work without proprietary software. For a list of wifi chipsets that work without proprietary software, see @ref{Recommended wifi chipsets,recommended_wifi}.
  3086. Some R400 laptops might come with an Atheros chipset, but this is 802.11g only.
  3087. It is recommended that you install a new wifi chipset. This can only be done after installing libreboot, because the original firmware has a whitelist of approved chips, and it will refuse to boot if you use an 'unauthorized' wifi card.
  3088. The following photos show an Atheros AR5B95 being installed, to replace the Intel chip that this R400 came with:@* @image{@value{docsdir}@value{useinstall}images/t400/0012,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/ar5b95,,,,jpg}
  3089. @node WWAN - R400
  3090. @c @subsubheading WWAN
  3091. If you have a WWAN/3G card and/or sim card reader, remove them permanently. The WWAN-3G card has proprietary firmware inside; the technology is identical to what is used in mobile phones, so it can also track your movements.
  3092. Not to be confused with wifi (wifi is fine).
  3093. @node Memory - R400
  3094. @c @subsubheading Memory
  3095. You need DDR3 SODIMM PC3-8500 RAM installed, in matching pairs (speed/size). Non-matching pairs won't work. You can also install a single module (meaning, one of the slots will be empty) in slot 0.
  3096. Make sure that the RAM you buy is the 2Rx8 density.
  3097. @uref{http://www.forum.thinkpads.com/viewtopic.php?p=760721, This page} might be useful for RAM compatibility info
  3098. (note: coreboot raminit is different, so this page might be BS)
  3099. The following photo shows 8GiB (2x4GiB) of RAM installed:@* @image{@value{docsdir}@value{useinstall}images/t400/memory,,,,jpg}
  3100. @node Booting - R400
  3101. @c @subsubheading Boot it!
  3102. You should see something like this:
  3103. @image{@value{docsdir}@value{useinstall}images/t400/boot0,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/boot1,,,,jpg}
  3104. Now @ref{GNU/Linux distributions,install GNU/Linux}.
  3105. @node ThinkPad T400
  3106. @subsubsection Flashing the T400 with a BeagleBone Black
  3107. Initial flashing instructions for the ThinkPad T400.
  3108. This guide is for those who want libreboot on their ThinkPad T400 while they still have the original Lenovo BIOS present. This guide can also be followed (adapted) if you brick your T400, to know how to recover.
  3109. Before following this section, please make sure to setup your libreboot ROM properly first. Although ROM images are provided pre-built in libreboot, there are some modifications that you need to make to the one you chose before flashing. (instructions referenced later in this guide)
  3110. @menu
  3111. * T400 laptops with libreboot pre-installed::
  3112. * Serial port - T400::
  3113. * LCD compatibly - T400::
  3114. * A note about CPUs - T400::
  3115. * A note about GPUs - T400::
  3116. * CPU paste required - T400::
  3117. * Flash chip size - T400::
  3118. * MAC address - T400::
  3119. * Initial BBB configuration - T400::
  3120. * The procedure - T400::
  3121. * Thermal paste - IMPORTANT - T400::
  3122. * Wifi - T400::
  3123. * WWAN - T400::
  3124. * Memory - T400::
  3125. * Booting - T400::
  3126. @end menu
  3127. @node T400 laptops with libreboot pre-installed
  3128. @c @subsubheading T400 laptops with libreboot pre-installed
  3129. If you don't want to install libreboot yourself, companies exist that sell these laptops with libreboot pre-installed, along with a free GNU/Linux distribution.
  3130. @node Serial port - T400
  3131. @c @subsubheading Serial port
  3132. EHCI debug might not be needed. It has been reported that the docking station for this laptop has a serial port, so it might be possible to use that instead.
  3133. @node LCD compatibly - T400
  3134. @c @subsubheading LCD compatibly
  3135. Not all LCD panels are compatible yet. See @ref{LCD compatibility on GM45 laptops,gm45_lcd}.
  3136. @node A note about CPUs - T400
  3137. @c @subsubheading A note about CPUs
  3138. @uref{http://www.thinkwiki.org/wiki/Category:T400,ThinkWiki} has a list of CPUs for this system. The Core 2 Duo P8400, P8600 and P8700 are believed to work in libreboot. The T9600 was confirmed to work, so the T9500/T9550 probably also work.
  3139. @itemize
  3140. @item
  3141. Quad-core CPUs
  3142. @itemize @minus
  3143. @item
  3144. Incompatible. Do not use.
  3145. @end itemize
  3146. @end itemize
  3147. @node A note about GPUs - T400
  3148. @c @subsubheading A note about GPUs
  3149. Some models have an Intel GPU, while others have both an ATI and an Intel GPU; this is referred to as ``switchable graphics''. In the @emph{BIOS setup} program for lenovobios, you can specify that the system will use one or the other (but not both).
  3150. Libreboot is known to work on systems with only the Intel GPU, using native graphics initialization. On systems with switchable graphics, the Intel GPU is used and the ATI GPU is disabled, so native graphics initialization works all the same.
  3151. @node CPU paste required - T400
  3152. @c @subsubheading CPU paste required
  3153. See @xref{paste-t400,,paste}.
  3154. @node Flash chip size - T400
  3155. @c @subsubheading Flash chip size
  3156. Use this to find out:@* # @strong{dmidecode | grep ROM\ Size}@*
  3157. @node MAC address - T400
  3158. @c @subsubheading MAC address
  3159. On the T400, the MAC address for the onboard gigabit ethernet chipset is stored inside the flash chip, along with other configuration data.
  3160. Keep a note of the MAC address before disassembly; this is very important, because you will need to insert this into the libreboot ROM image before flashing it. It will be written in one of these locations:
  3161. @image{@value{docsdir}@value{useinstall}images/t400/macaddress0,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/macaddress1,,,,jpg} @image{@value{docsdir}@value{useinstall}images/x200/disassembly/0001,,,,jpg}
  3162. @node Initial BBB configuration - T400
  3163. @c @subsubheading Initial BBB configuration
  3164. Refer to @ref{How to program an SPI flash chip with BeagleBone Black or Teensy 3.1,bbb_setup} for how to configure the BBB for flashing.
  3165. The following shows how to connect clip to the BBB (on the P9 header), for SOIC-16 (clip: Pomona 5252):
  3166. @verbatim
  3167. POMONA 5252 (correlate with the BBB guide)
  3168. === ethernet jack and VGA port ====
  3169. NC - - 21
  3170. 1 - - 17
  3171. NC - - NC
  3172. NC - - NC
  3173. NC - - NC
  3174. NC - - NC
  3175. 18 - - 3.3V (PSU)
  3176. 22 - - NC - this is pin 1 on the flash chip
  3177. === SATA port ===
  3178. This is how you will connect. Numbers refer to pin numbers on the BBB, on the plugs near the DC jack.
  3179. @end verbatim
  3180. The following shows how to connect clip to the BBB (on the P9 header), for SOIC-8 (clip: Pomona 5250):
  3181. @verbatim
  3182. POMONA 5250 (correlate with the BBB guide)
  3183. === RAM slots ====
  3184. 18 - - 1
  3185. 22 - - NC
  3186. NC - - 21
  3187. 3.3V (PSU) - - 17 - this is pin 1 on the flash chip
  3188. === slot where the AC jack is connected ===
  3189. This is how you will connect. Numbers refer to pin numbers on the BBB, on the plugs near the DC jack.
  3190. @end verbatim
  3191. @node The procedure - T400
  3192. @c @subsubheading The procedure
  3193. Remove @emph{all} screws, placing them in the order that you removed them:@* @image{@value{docsdir}@value{useinstall}images/t400/0001,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0002,,,,jpg}
  3194. Remove those three screws then remove the rear bezel:@* @image{@value{docsdir}@value{useinstall}images/t400/0003,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0004,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0005,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0006,,,,jpg}
  3195. Remove the speakers:@* @image{@value{docsdir}@value{useinstall}images/t400/0007,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0008,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0009,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0010,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0011,,,,jpg}
  3196. Remove the wifi:@* @image{@value{docsdir}@value{useinstall}images/t400/0012,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0013,,,,jpg}
  3197. Remove this cable:@* @image{@value{docsdir}@value{useinstall}images/t400/0014,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0015,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0016,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0017,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0018,,,,jpg}
  3198. Unroute those antenna wires:@* @image{@value{docsdir}@value{useinstall}images/t400/0019,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0020,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0021,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0022,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0023,,,,jpg}
  3199. Remove the LCD assembly:@* @image{@value{docsdir}@value{useinstall}images/t400/0024,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0025,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0026,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0027,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0028,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0029,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0030,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0031,,,,jpg}
  3200. Disconnect the NVRAM battery:@* @image{@value{docsdir}@value{useinstall}images/t400/0033,,,,jpg}
  3201. Disconnect the fan:@* @image{@value{docsdir}@value{useinstall}images/t400/0034,,,,jpg}
  3202. Unscrew these:@* @image{@value{docsdir}@value{useinstall}images/t400/0035,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0036,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0037,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0038,,,,jpg}
  3203. Unscrew the heatsink, then lift it off:@* @image{@value{docsdir}@value{useinstall}images/t400/0039,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0040,,,,jpg}
  3204. Disconnect the power jack:@* @image{@value{docsdir}@value{useinstall}images/t400/0041,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0042,,,,jpg}
  3205. Loosen this:@* @image{@value{docsdir}@value{useinstall}images/t400/0043,,,,jpg}
  3206. Remove this:@* @image{@value{docsdir}@value{useinstall}images/t400/0044,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0045,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0046,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0047,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0048,,,,jpg}
  3207. Unscrew these:@* @image{@value{docsdir}@value{useinstall}images/t400/0049,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0050,,,,jpg}
  3208. Remove this:@* @image{@value{docsdir}@value{useinstall}images/t400/0051,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0052,,,,jpg}
  3209. Unscrew this:@* @image{@value{docsdir}@value{useinstall}images/t400/0053,,,,jpg}
  3210. Remove the motherboard (the cage is still attached) from the right hand side, then lift it out:@* @image{@value{docsdir}@value{useinstall}images/t400/0054,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0055,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0056,,,,jpg}
  3211. Remove these screws, placing the screws in the same layout and marking each screw hole (so that you know what ones to put the screws back into later): @image{@value{docsdir}@value{useinstall}images/t400/0057,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0058,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0059,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0060,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0061,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0062,,,,jpg}
  3212. Separate the motherboard:@* @image{@value{docsdir}@value{useinstall}images/t400/0063,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0064,,,,jpg}
  3213. Connect your programmer, then connect GND and 3.3V@* @image{@value{docsdir}@value{useinstall}images/t400/0065,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0066,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0067,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0069,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0070,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0071,,,,jpg}
  3214. A dedicated 3.3V PSU was used to create this guide, but at ATX PSU is also fine:@* @image{@value{docsdir}@value{useinstall}images/t400/0072,,,,jpg}
  3215. Of course, make sure to turn on your PSU:@* @image{@value{docsdir}@value{useinstall}images/x200/disassembly/0013,,,,jpg}
  3216. Now, you should be ready to install libreboot.
  3217. Log in as root on your BBB, using the instructions in @ref{Accessing the operating system on the BBB,bbb_access}.
  3218. Test that flashrom works:@* # @strong{./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512}@* In this case, the output was:
  3219. @verbatim
  3220. flashrom v0.9.7-r1854 on Linux 3.8.13-bone47 (armv7l)
  3221. flashrom is free software, get the source code at http://www.flashrom.org
  3222. Calibrating delay loop... OK.
  3223. Found Macronix flash chip "MX25L6405(D)" (8192 kB, SPI) on linux_spi.
  3224. Found Macronix flash chip "MX25L6406E/MX25L6436E" (8192 kB, SPI) on linux_spi.
  3225. Found Macronix flash chip "MX25L6445E/MX25L6473E" (8192 kB, SPI) on linux_spi.
  3226. Multiple flash chip definitions match the detected chip(s): "MX25L6405(D)", "MX25L6406E/MX25L6436E", "MX25L6445E/MX25L6473E"
  3227. Please specify which chip definition to use with the -c <chipname> option.
  3228. @end verbatim
  3229. How to backup factory.rom (change the -c option as neeed, for your flash chip):@* # @strong{./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r factory.rom}@* # @strong{./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r factory1.rom}@* # @strong{./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r factory2.rom}@* Note: the @strong{-c} option is not required in libreboot's patched flashrom, because the redundant flash chip definitions in @emph{flashchips.c} have been removed.@* Now compare the 3 images:@* # @strong{sha512sum factory*.rom}@* If the hashes match, then just copy one of them (the factory.rom) to a safe place (on a drive connected to another system, not the BBB). This is useful for reverse engineering work, if there is a desirable behaviour in the original firmware that could be replicated in coreboot and libreboot.
  3230. Follow the instructions at @ref{ICH9 gen utility,ich9gen} to change the MAC address inside the libreboot ROM image, before flashing it. Although there is a default MAC address inside the ROM image, this is not what you want. @strong{Make sure to always change the MAC address to one that is correct for your system.}
  3231. Now flash it:@* # @strong{./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -w path/to/libreboot/rom/image.rom -V}
  3232. @image{@value{docsdir}@value{useinstall}images/x200/disassembly/0015,,,,jpg}
  3233. You might see errors, but if it says @strong{Verifying flash... VERIFIED} at the end, then it's flashed and should boot. If you see errors, try again (and again, and again); the message @strong{Chip content is identical to the requested image} is also an indication of a successful installation.
  3234. Example output from running the command (see above):
  3235. @verbatim
  3236. flashrom v0.9.7-r1854 on Linux 3.8.13-bone47 (armv7l)
  3237. flashrom is free software, get the source code at http://www.flashrom.org
  3238. Calibrating delay loop... OK.
  3239. Found Macronix flash chip "MX25L6405(D)" (8192 kB, SPI) on linux_spi.
  3240. Reading old flash chip contents... done.
  3241. Erasing and writing flash chip... FAILED at 0x00001000! Expected=0xff, Found=0x00, failed byte count from 0x00000000-0x0000ffff: 0xd716
  3242. ERASE FAILED!
  3243. Reading current flash chip contents... done. Looking for another erase function.
  3244. Erase/write done.
  3245. Verifying flash... VERIFIED.
  3246. @end verbatim
  3247. @node Thermal paste - IMPORTANT - T400
  3248. @c @subsubheading Thermal paste (IMPORTANT)
  3249. @anchor{paste-t400}
  3250. Because part of this procedure involved removing the heatsink, you will need to apply new paste. Arctic MX-4 is ok. You will also need isopropyl alcohol and an anti-static cloth to clean with.
  3251. When re-installing the heatsink, you must first clean off all old paste with the alcohol/cloth. Then apply new paste. Arctic MX-4 is also much better than the default paste used on these systems.
  3252. @image{@value{docsdir}@value{useinstall}images/t400/paste,,,,jpg}
  3253. NOTE: the photo above is for illustration purposes only, and does not show how to properly apply the thermal paste. Other guides online detail the proper application procedure.
  3254. @node Wifi - T400
  3255. @c @subsubheading Wifi
  3256. The T400 typically comes with an Intel wifi chipset, which does not work without proprietary software. For a list of wifi chipsets that work without proprietary software, see @ref{Recommended wifi chipsets,recommended_wifi}.
  3257. Some T400 laptops might come with an Atheros chipset, but this is 802.11g only.
  3258. It is recommended that you install a new wifi chipset. This can only be done after installing libreboot, because the original firmware has a whitelist of approved chips, and it will refuse to boot if you use an 'unauthorized' wifi card.
  3259. The following photos show an Atheros AR5B95 being installed, to replace the Intel chip that this T400 came with:@* @image{@value{docsdir}@value{useinstall}images/t400/0012,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/ar5b95,,,,jpg}
  3260. @node WWAN - T400
  3261. @c @subsubheading WWAN
  3262. If you have a WWAN/3G card and/or sim card reader, remove them permanently. The WWAN-3G card has proprietary firmware inside; the technology is identical to what is used in mobile phones, so it can also track your movements.
  3263. Not to be confused with wifi (wifi is fine).
  3264. @node Memory - T400
  3265. @c @subsubheading Memory
  3266. You need DDR3 SODIMM PC3-8500 RAM installed, in matching pairs (speed/size). Non-matching pairs won't work. You can also install a single module (meaning, one of the slots will be empty) in slot 0.
  3267. Make sure that the RAM you buy is the 2Rx8 density.
  3268. @uref{http://www.forum.thinkpads.com/viewtopic.php?p=760721, This page} might be useful for RAM compatibility info
  3269. (note: coreboot raminit is different, so this page might be BS)
  3270. The following photo shows 8GiB (2x4GiB) of RAM installed:@* @image{@value{docsdir}@value{useinstall}images/t400/memory,,,,jpg}
  3271. @node Booting - T400
  3272. @c @subsubheading Boot it!
  3273. You should see something like this:
  3274. @image{@value{docsdir}@value{useinstall}images/t400/boot0,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/boot1,,,,jpg}
  3275. Now @ref{GNU/Linux distributions,install GNU/Linux}.
  3276. @node ThinkPad T500
  3277. @subsubsection Flashing the T500 with a BeagleBone Black
  3278. Initial flashing instructions for T500.
  3279. This guide is for those who want libreboot on their ThinkPad T500 while they still have the original Lenovo BIOS present. This guide can also be followed (adapted) if you brick your T500, to know how to recover.
  3280. @menu
  3281. * Libreboot T400 - T500::
  3282. * Serial port - T500::
  3283. * LCD compatibly - T500::
  3284. * A note about CPUs - T500::
  3285. * A note about GPUs - T500::
  3286. * CPU paste required - T500::
  3287. * Flash chip size - T500::
  3288. * MAC address - T500::
  3289. * Initial BBB configuration - T500::
  3290. * The procedure - T500::
  3291. * Thermal paste - IMPORTANT - T500::
  3292. * Wifi - T500::
  3293. * WWAN - T500::
  3294. * Memory - T500::
  3295. * Booting - T500::
  3296. @end menu
  3297. @node Libreboot T400 - T500
  3298. @c @subsubheading Libreboot T400
  3299. You may also be interested in the smaller, more portable @ref{ThinkPad T400,Libreboot T400}.
  3300. @node Serial port - T500
  3301. @c @subsubheading Serial port
  3302. EHCI debug might not be needed. It has been reported that the docking station for this laptop has a serial port, so it might be possible to use that instead.
  3303. @node LCD compatibly - T500
  3304. @c @subsubheading LCD compatibly
  3305. Not all LCD panels are compatible yet. See @ref{LCD compatibility on GM45 laptops,gm45_lcd}.
  3306. @node A note about CPUs - T500
  3307. @c @subsubheading A note about CPUs
  3308. @uref{http://www.thinkwiki.org/wiki/Category:T500,ThinkWiki} has a list of CPUs for this system. The Core 2 Duo P8400, P8600 and P8700 are believed to work in libreboot. The T9600 was also tested on the T400 and confirmed working, so the T9400/T9500/T9550 probably also work, but they are untested.
  3309. @itemize
  3310. @item
  3311. Quad-core CPUs
  3312. @itemize @minus
  3313. @item
  3314. Incompatible. Do not use.
  3315. @end itemize
  3316. @end itemize
  3317. @node A note about GPUs - T500
  3318. @c @subsubheading A note about GPUs
  3319. Some models have an Intel GPU, while others have both an ATI and an Intel GPU; this is referred to as "switchable graphics". In the @emph{BIOS setup} program for lenovobios, you can specify that the system will use one or the other (but not both).
  3320. Libreboot is known to work on systems with only the Intel GPU, using native graphics initialization. On systems with switchable graphics, the Intel GPU is used and the ATI GPU is disabled, so native graphics initialization works all the same.
  3321. @node CPU paste required - T500
  3322. @c @subsubheading CPU paste required
  3323. See @xref{paste-t500,,paste}.
  3324. @node Flash chip size - T500
  3325. @c @subsubheading Flash chip size
  3326. Use this to find out:@* # @strong{dmidecode | grep ROM\ Size}
  3327. @node MAC address - T500
  3328. @c @subsubheading MAC address
  3329. On the T500, the MAC address for the onboard gigabit ethernet chipset is stored inside the flash chip, along with other configuration data.
  3330. Keep a note of the MAC address before disassembly; this is very important, because you will need to insert this into the libreboot ROM image before flashing it. It will be written in one of these locations:
  3331. @image{@value{docsdir}@value{useinstall}images/t400/macaddress0,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/macaddress1,,,,jpg} @image{@value{docsdir}@value{useinstall}images/x200/disassembly/0001,,,,jpg}
  3332. @node Initial BBB configuration - T500
  3333. @c @subsubheading Initial BBB configuration
  3334. Refer to @ref{How to program an SPI flash chip with BeagleBone Black or Teensy 3.1,bbb_setup} for how to configure the BBB for flashing.
  3335. The following shows how to connect clip to the BBB (on the P9 header), for SOIC-16 (clip: Pomona 5252):
  3336. @verbatim
  3337. POMONA 5252 (correlate with the BBB guide)
  3338. === ethernet jack and VGA port ====
  3339. NC - - 21
  3340. 1 - - 17
  3341. NC - - NC
  3342. NC - - NC
  3343. NC - - NC
  3344. NC - - NC
  3345. 18 - - 3.3V (PSU)
  3346. 22 - - NC - this is pin 1 on the flash chip
  3347. === SATA port ===
  3348. This is how you will connect. Numbers refer to pin numbers on the BBB, on the plugs near the DC jack.
  3349. @end verbatim
  3350. The following shows how to connect clip to the BBB (on the P9 header), for SOIC-8 (clip: Pomona 5250):
  3351. @verbatim
  3352. POMONA 5250 (correlate with the BBB guide)
  3353. === RAM slots ====
  3354. 18 - - 1
  3355. 22 - - NC
  3356. NC - - 21
  3357. 3.3V (PSU) - - 17 - this is pin 1 on the flash chip
  3358. === slot where the AC jack is connected ===
  3359. This is how you will connect. Numbers refer to pin numbers on the BBB, on the plugs near the DC jack.
  3360. @end verbatim
  3361. @node The procedure - T500
  3362. @c @subsubheading The procedure
  3363. Remove all screws:@* @image{@value{docsdir}@value{useinstall}images/t500/0000,,,,jpg}@* It is also advisable to, throughout the disassembly, place any screws and/or components that you removed in the same layout or arrangement. The follow photos demonstrate this:@* @image{@value{docsdir}@value{useinstall}images/t500/0001,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0002,,,,jpg}
  3364. Remove the HDD/SSD and optical drive:@* @image{@value{docsdir}@value{useinstall}images/t500/0003,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0004,,,,jpg}
  3365. Remove the palm rest:@* @image{@value{docsdir}@value{useinstall}images/t500/0005,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0006,,,,jpg}
  3366. Remove the keyboard and rear bezel:@* @image{@value{docsdir}@value{useinstall}images/t500/0007,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0008,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0009,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0010,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0011,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0012,,,,jpg}
  3367. If you have a WWAN/3G card and/or sim card reader, remove them permanently. The WWAN-3G card has proprietary firmware inside; the technology is identical to what is used in mobile phones, so it can also track your movements:@* @image{@value{docsdir}@value{useinstall}images/t500/0013,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0017,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0018,,,,jpg}
  3368. Remove this frame, and then remove the wifi chip:@* @image{@value{docsdir}@value{useinstall}images/t500/0014,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0015,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0016,,,,jpg}
  3369. Remove the speakers:@* @image{@value{docsdir}@value{useinstall}images/t500/0019,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0020,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0021,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0022,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0023,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0024,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0025,,,,jpg}
  3370. Remove the NVRAM battery (already removed in this photo):@* @image{@value{docsdir}@value{useinstall}images/t500/0026,,,,jpg}
  3371. When you re-assemble, you will be replacing the wifi chip with another. These two screws don't hold anything together, but they are included in your system because the screw holes for half-height cards are a different size, so use these if you will be installing a half-height card:@* @image{@value{docsdir}@value{useinstall}images/t500/0027,,,,jpg}
  3372. Unroute the antenna wires:@* @image{@value{docsdir}@value{useinstall}images/t500/0028,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0029,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0030,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0031,,,,jpg}
  3373. Disconnect the LCD cable from the motherboard:@* @image{@value{docsdir}@value{useinstall}images/t500/0032,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0033,,,,jpg}
  3374. Remove the LCD assembly hinge screws, and then remove the LCD assembly:@* @image{@value{docsdir}@value{useinstall}images/t500/0034,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0035,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0036,,,,jpg}
  3375. Remove the fan and heatsink:@* @image{@value{docsdir}@value{useinstall}images/t500/0037,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0038,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0039,,,,jpg}
  3376. Remove this screw:@* @image{@value{docsdir}@value{useinstall}images/t500/0040,,,,jpg}
  3377. Remove these cables, keeping note of how and in what arrangement they are connected:@* @image{@value{docsdir}@value{useinstall}images/t500/0041,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0042,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0043,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0044,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0045,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0046,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0047,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0048,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0049,,,,jpg}
  3378. Disconnect the power jack:@* @image{@value{docsdir}@value{useinstall}images/t500/0050,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0051,,,,jpg}
  3379. Remove the motherboard and cage from the base (the marked hole is where those cables were routed through):@* @image{@value{docsdir}@value{useinstall}images/t500/0052,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0053,,,,jpg}
  3380. Remove all screws, arranging them in the same layout when placing the screws on a surface and marking each screw hole (this is to reduce the possibility of putting them back in the wrong holes):@* @image{@value{docsdir}@value{useinstall}images/t500/0054,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0055,,,,jpg}
  3381. Also remove this:@* @image{@value{docsdir}@value{useinstall}images/t500/0056,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0057,,,,jpg}
  3382. Separate the motherboard from the cage:@* @image{@value{docsdir}@value{useinstall}images/t500/0058,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t500/0059,,,,jpg}
  3383. The flash chip is next to the memory slots. On this system, it was a SOIC-8 (4MiB or 32Mb) flash chip:@* @image{@value{docsdir}@value{useinstall}images/t500/0060,,,,jpg}
  3384. Connect your programmer, then connect GND and 3.3V@* @image{@value{docsdir}@value{useinstall}images/t500/0061,,,,jpg}@* @image{@value{docsdir}@value{useinstall}images/t400/0067,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0069,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0070,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/0071,,,,jpg}
  3385. A dedicated 3.3V PSU was used to create this guide, but at ATX PSU is also fine:@* @image{@value{docsdir}@value{useinstall}images/t400/0072,,,,jpg}
  3386. Of course, make sure to turn on your PSU:@* @image{@value{docsdir}@value{useinstall}images/x200/disassembly/0013,,,,jpg}
  3387. Now, you should be ready to install libreboot.
  3388. Log in as root on your BBB, using the instructions in @ref{Accessing the operating system on the BBB,bbb_access}.
  3389. Test that flashrom works:@* # @strong{./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512}@* In this case, the output was:
  3390. @verbatim
  3391. flashrom v0.9.7-r1854 on Linux 3.8.13-bone47 (armv7l)
  3392. flashrom is free software, get the source code at http://www.flashrom.org
  3393. Calibrating delay loop... OK.
  3394. Found Macronix flash chip "MX25L6405(D)" (8192 kB, SPI) on linux_spi.
  3395. Found Macronix flash chip "MX25L6406E/MX25L6436E" (8192 kB, SPI) on linux_spi.
  3396. Found Macronix flash chip "MX25L6445E/MX25L6473E" (8192 kB, SPI) on linux_spi.
  3397. Multiple flash chip definitions match the detected chip(s): "MX25L6405(D)", "MX25L6406E/MX25L6436E", "MX25L6445E/MX25L6473E"
  3398. Please specify which chip definition to use with the -c <chipname> option.
  3399. @end verbatim
  3400. How to backup factory.rom (change the -c option as neeed, for your flash chip):@* # @strong{./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r factory.rom}@* # @strong{./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r factory1.rom}@* # @strong{./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r factory2.rom}@* Note: the @strong{-c} option is not required in libreboot's patched flashrom, because the redundant flash chip definitions in @emph{flashchips.c} have been removed.@* Now compare the 3 images:@* # @strong{sha512sum factory*.rom}@* If the hashes match, then just copy one of them (the factory.rom) to a safe place (on a drive connected to another system, not the BBB). This is useful for reverse engineering work, if there is a desirable behaviour in the original firmware that could be replicated in coreboot and libreboot.
  3401. Follow the instructions at @ref{ICH9 gen utility,ich9gen} to change the MAC address inside the libreboot ROM image, before flashing it. Although there is a default MAC address inside the ROM image, this is not what you want. @strong{Make sure to always change the MAC address to one that is correct for your system.}
  3402. Now flash it:@* # @strong{./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -w path/to/libreboot/rom/image.rom -V}
  3403. @image{@value{docsdir}@value{useinstall}images/x200/disassembly/0015,,,,jpg}
  3404. You might see errors, but if it says @strong{Verifying flash... VERIFIED} at the end, then it's flashed and should boot. If you see errors, try again (and again, and again); the message @strong{Chip content is identical to the requested image} is also an indication of a successful installation.
  3405. Example output from running the command (see above):
  3406. @verbatim
  3407. flashrom v0.9.7-r1854 on Linux 3.8.13-bone47 (armv7l)
  3408. flashrom is free software, get the source code at http://www.flashrom.org
  3409. Calibrating delay loop... OK.
  3410. Found Macronix flash chip "MX25L6405(D)" (8192 kB, SPI) on linux_spi.
  3411. Reading old flash chip contents... done.
  3412. Erasing and writing flash chip... FAILED at 0x00001000! Expected=0xff, Found=0x00, failed byte count from 0x00000000-0x0000ffff: 0xd716
  3413. ERASE FAILED!
  3414. Reading current flash chip contents... done. Looking for another erase function.
  3415. Erase/write done.
  3416. Verifying flash... VERIFIED.
  3417. @end verbatim
  3418. @node Thermal paste - IMPORTANT - T500
  3419. @c @subsubheading Thermal paste (IMPORTANT)
  3420. @anchor{paste-t500}
  3421. Because part of this procedure involved removing the heatsink, you will need to apply new paste. Arctic MX-4 is ok. You will also need isopropyl alcohol and an anti-static cloth to clean with.
  3422. When re-installing the heatsink, you must first clean off all old paste with the alcohol/cloth. Then apply new paste. Arctic MX-4 is also much better than the default paste used on these systems.
  3423. @image{@value{docsdir}@value{useinstall}images/t400/paste,,,,jpg}
  3424. NOTE: the photo above is for illustration purposes only, and does not show how to properly apply the thermal paste. Other guides online detail the proper application procedure.
  3425. @node Wifi - T500
  3426. @c @subsubheading Wifi
  3427. The T500 typically comes with an Intel wifi chipset, which does not work without proprietary software. For a list of wifi chipsets that work without proprietary software, see @ref{Recommended wifi chipsets,recommended_wifi}.
  3428. Some T500 laptops might come with an Atheros chipset, but this is 802.11g only.
  3429. It is recommended that you install a new wifi chipset. This can only be done after installing libreboot, because the original firmware has a whitelist of approved chips, and it will refuse to boot if you use an 'unauthorized' wifi card.
  3430. The following photos show an Atheros AR5B95 being installed, to replace the Intel chip that this T500 came with:@* @image{@value{docsdir}@value{useinstall}images/t400/0012,,,,jpg} @image{@value{docsdir}@value{useinstall}images/t400/ar5b95,,,,jpg}
  3431. @node WWAN - T500
  3432. @c @subsubheading WWAN
  3433. If you have a WWAN/3G card and/or sim card reader, remove them permanently. The WWAN-3G card has DMA, and proprietary firmware inside; the technology is identical to what is used in mobile phones, so it can also track your movements.
  3434. Not to be confused with wifi (wifi is fine).
  3435. @node Memory - T500
  3436. @c @subsubheading Memory
  3437. You need DDR3 SODIMM PC3-8500 RAM installed, in matching pairs (speed/size). Non-matching pairs won't work. You can also install a single module (meaning, one of the slots will be empty) in slot 0.
  3438. Make sure that the RAM you buy is the 2Rx8 density.
  3439. @uref{http://www.forum.thinkpads.com/viewtopic.php?p=760721, This page} might be useful for RAM compatibility info
  3440. (note: coreboot raminit is different, so this page might be BS)
  3441. The following photo shows 8GiB (2x4GiB) of RAM installed:@* @image{@value{docsdir}@value{useinstall}images/t400/memory,,,,jpg}
  3442. @node Booting - T500
  3443. @c @subsubheading Boot it!
  3444. You should see something like this:
  3445. @image{@value{docsdir}@value{useinstall}images/t500/0062,,,,jpg}
  3446. Now @ref{GNU/Linux distributions,install GNU/Linux}.
  3447. @node GNU/Linux distributions
  3448. @section GNU/Linux distributions
  3449. This section relates to dealing with GNU/Linux distributions: preparing bootable USB drives, changing the default GRUB menu and so on.
  3450. @strong{This section is only for the *GRUB* payload. For depthcharge, instructions have yet to be written.}
  3451. @menu
  3452. * How to install GNU/Linux on a libreboot system::
  3453. * How to replace the default GRUB configuration file on a libreboot system::
  3454. * Writing a GRUB configuration file::
  3455. * Installing Parabola GNU/Linux-libre with full disk encryption:: (Including /boot)
  3456. * Configuring Parabola post-install::
  3457. * Installing Trisquel GNU/Linux-libre with full disk encryption:: (Including /boot)
  3458. @end menu
  3459. @node How to install GNU/Linux on a libreboot system
  3460. @subsection How to install GNU/Linux on a libreboot system
  3461. This section relates to preparing, booting and installing a GNU/Linux distribution on your libreboot system, using nothing more than a USB flash drive (and @emph{dd}).
  3462. @strong{This section is only for the GRUB payload. For depthcharge (used on CrOS devices in libreboot), instructions have yet to be written in the libreboot documentation.}
  3463. @menu
  3464. * Prepare the USB drive in GNU/Linux::
  3465. * Installing GNU/Linux with full disk encryption::
  3466. * GNU Guix System Distribution?::
  3467. * Trisquel net install?::
  3468. * Booting ISOLINUX images - automatic method::
  3469. * Booting ISOLINUX images - manual method::
  3470. * Troubleshooting GNU/Linux installation::
  3471. @end menu
  3472. @node Prepare the USB drive in GNU/Linux
  3473. @subsubsection Prepare the USB drive (in GNU/Linux)
  3474. Connect the USB drive. Check dmesg:@* @strong{$ dmesg}@* Check lsblk to confirm which drive it is:@* @strong{$ lsblk}
  3475. Check that it wasn't automatically mounted. If it was, unmount it. For example:@* @strong{$ sudo umount /dev/sdX*}@* @strong{# umount /dev/sdX*}
  3476. dmesg told you what device it is. Overwrite the drive, writing your distro ISO to it with dd. For example:@* @strong{$ sudo dd if=gnulinux.iso of=/dev/sdX bs=8M; sync}@* @strong{# dd if=gnulinux.iso of=/dev/sdX bs=8M; sync}
  3477. You should now be able to boot the installer from your USB drive. Continue reading, for information about how to do that.
  3478. @node Installing GNU/Linux with full disk encryption
  3479. @subsubsection Installing GNU/Linux with full disk encryption
  3480. @itemize
  3481. @item
  3482. @ref{Installing Trisquel GNU/Linux-libre with full disk encryption,Installing Trisquel GNU/Linux with full disk encryption (including /boot)}
  3483. @item
  3484. @ref{Installing Parabola GNU/Linux-libre with full disk encryption,Installing Parabola GNU/Linux with full disk encryption (including /boot)}
  3485. @end itemize
  3486. @node GNU Guix System Distribution?
  3487. @subsubsection GNU Guix System Distribution?
  3488. The Guix installers use the GRUB bootloader, unlike most GNU/Linux installers which will likely use ISOLINUX. @c TYPO: uses > use
  3489. To boot the Guix live USB install, select @strong{@emph{Search for GRUB configuration (grub.cfg) outside of CBFS}} from the GRUB payload menu. After you have done that, a new menuentry will appear at the very bottom with text like @strong{@emph{Load Config from (usb0)}}; select that, and it should boot.
  3490. Once you have installed Guix onto the main storage device, check @ref{1st option - don't re-flash,option1_dont_reflash} for hints on how to boot it.
  3491. GuixSD (Guix System Distribution) is highly recommended; it's part of GNU, and @uref{https://www.gnu.org/distros/free-distros.html,endorsed} by the Free Software Foundation.
  3492. @node Trisquel net install?
  3493. @subsubsection Trisquel net install?
  3494. Tip: don't use the official net install image. Download the full GNOME ISO (the ~1.5GiB one). In this ISO, there is still the capability to boot the net install, while it also provides an easy to use live system (which you can boot from USB). This ISO also works using @emph{syslinux_configfile -i} (the @emph{Parse ISOLINUX} menu entries in the default GRUB configuration that libreboot uses).
  3495. @node Booting ISOLINUX images - automatic method
  3496. @subsubsection Booting ISOLINUX images (automatic method)
  3497. Boot it in GRUB using the @emph{Parse ISOLINUX config (USB)} option. A new menu should appear in GRUB, showing the boot options for that distro; this is a GRUB menu, converted from the usual ISOLINUX menu provided by that distro.
  3498. @node Booting ISOLINUX images - manual method
  3499. @subsubsection Booting ISOLINUX images (manual method)
  3500. @emph{These are generic instructions. They may or may not be correct for your distribution. You must adapt them appropriately, for whatever GNU/Linux distribution it is that you are trying to install.}
  3501. If the ISOLINUX parser or @emph{Search for GRUB configuration} options won't work, then press C in GRUB to access the command line.@* grub> @strong{ls}@* Get the device from above output, eg (usb0). Example:@* grub> @strong{cat (usb0)/isolinux/isolinux.cfg}@* Either this will show the ISOLINUX menuentries for that ISO, or link to other .cfg files, for example /isolinux/foo.cfg.@* If it did that, then you do:@* grub> @strong{cat (usb0)/isolinux/foo.cfg}@* And so on, until you find the correct menuentries for ISOLINUX. @strong{The file @emph{/isolinux/foo.cfg} is a fictional example. Do not actually use this example, unless you actually have that file, if it is appropriate.}
  3502. For Trisquel (and other debian-based distros), there are typically menuentries listed in @emph{/isolinux/txt.cfg} or @emph{/isolinux/gtk.cfg}. For dual-architecture ISO images (i686 and x86_64), there may be separate files/directories for each architecture. Just keep searching through the image, until you find the correct ISOLINUX configuration file.
  3503. Now look at the ISOLINUX menuentry. It'll look like:@* @strong{kernel /path/to/kernel@* append PARAMETERS initrd=/path/to/initrd MAYBE_MORE_PARAMETERS@*} GRUB works the same way, but in it's own way. Example GRUB commands:@* grub> @strong{set root='usb0'}@* grub> @strong{linux /path/to/kernel PARAMETERS MAYBE_MORE_PARAMETERS}@* grub> @strong{initrd /path/to/initrd}@* grub> @strong{boot}@* Note: @emph{usb0} may be incorrect. Check the output of the @emph{ls} command in GRUB, to see a list of USB devices/partitions. Of course this will vary from distro to distro. If you did all of that correctly, then it should now be booting your USB drive in the way that you specified.
  3504. @node Troubleshooting GNU/Linux installation
  3505. @subsubsection Troubleshooting GNU/Linux installation
  3506. Most of these issues occur when using libreboot with coreboot's 'text mode' instead of the coreboot framebuffer. This mode is useful for booting payloads like memtest86+ which expect text-mode, but for GNU/Linux distributions it can be problematic when they are trying to switch to a framebuffer because it doesn't exist.
  3507. In most cases, you should use the vesafb ROM images. Example filename: libreboot_ukdvorak_vesafb.rom.
  3508. @menu
  3509. * Parabola won't boot in text-mode::
  3510. * Debian-installer graphical corruption in text-mode:: (Trisquel net install)
  3511. @end menu
  3512. @node Parabola won't boot in text-mode
  3513. @ifinfo
  3514. @subsubheading Parabola won't boot in text-mode
  3515. @end ifinfo
  3516. Use one of the ROM images with vesafb in the filename (uses coreboot framebuffer instead of text-mode).
  3517. @node Debian-installer graphical corruption in text-mode
  3518. @ifinfo
  3519. @subsubheading Debian-installer (trisquel net install) graphical corruption in text-mode
  3520. @end ifinfo
  3521. When using the ROM images that use coreboot's "text mode" instead of the coreboot framebuffer, booting the Trisquel net installer results in graphical corruption because it is trying to switch to a framebuffer which doesn't exist. Use that kernel parameter on the 'linux' line when booting it:@* @strong{vga=normal fb=false}
  3522. Tested in Trisquel 6 (and 7). This forces debian-installer to start in text-mode, instead of trying to switch to a framebuffer.
  3523. If selecting text-mode from a GRUB menu created using the ISOLINUX parser, you can press E on the menu entry to add this. Or, if you are booting manually (from GRUB terminal) then just add the parameters.
  3524. This workaround was found on the page: @uref{https://www.debian.org/releases/stable/i386/ch05s04.html,https://www.debian.org/releases/stable/i386/ch05s04.html}. It should also work for gNewSense, Debian and any other apt-get distro that provides debian-installer (text mode) net install method.
  3525. @node How to replace the default GRUB configuration file on a libreboot system
  3526. @subsection How to replace the default GRUB configuration file on a libreboot system
  3527. Libreboot on x86 uses the GRUB @uref{http://www.coreboot.org/Payloads#GRUB_2,payload} by default, which means that the GRUB configuration file (where your GRUB menu comes from) is stored directly alongside libreboot and its GRUB payload executable, inside the flash chip. In context, this means that installing distributions and managing them is handled slightly differently compared to traditional BIOS systems.
  3528. A libreboot (or coreboot) ROM image is not simply "flat"; there is an actual filesystem inside called CBFS (coreboot filesystem). A utility called 'cbfstool' allows you to change the contents of the ROM image. In this case, libreboot is configured such that the 'grub.cfg' and 'grubtest.cfg' files exist directly inside CBFS instead of inside the GRUB payload 'memdisk' (which is itself stored in CBFS).
  3529. cbfstool is in coreboot source code under util/
  3530. You can either modify the GRUB configuration stored in the flash chip, or you can modify a GRUB configuration file on the main storage which the libreboot GRUB payload will automatically search for.
  3531. Here is an excellent writeup about CBFS (coreboot filesystem): @uref{http://lennartb.home.xs4all.nl/coreboot/col5.html,http://lennartb.home.xs4all.nl/coreboot/col5.html}.
  3532. @strong{This guide is *only* for the GRUB payload. If you use the depthcharge payload, ignore this section entirely.}
  3533. @menu
  3534. * Introduction - GRUB config::
  3535. * 1st option - don't re-flash::
  3536. * 2nd option - re-flash::
  3537. @end menu
  3538. @node Introduction - GRUB config
  3539. @subsubsection Introduction
  3540. Download the latest release from @uref{http://libreboot.org/,http://libreboot.org/} @*@strong{If you downloaded from git, refer to @ref{Get the full source code from metadata,build_meta} before continuing.}
  3541. There are several advantages to modifying the GRUB configuration stored in CBFS, but this also means that you have to flash a new libreboot ROM image on your system (some users feel intimidated by this, to say the least). Doing so can be risky if not handled correctly, because it can result in a bricked system (recovery is easy if you have the @ref{How to program an SPI flash chip with BeagleBone Black or Teensy 3.1,equipment} for it, but most people don't). If you aren't up to that then don't worry; it is possible to use a custom GRUB menu without flashing a new image, by loading a GRUB configuration from a partition on the main storage instead.
  3542. @node 1st option - don't re-flash
  3543. @subsubsection 1st option: don't re-flash
  3544. By default, GRUB in libreboot is configured to scan all partitions on the main storage for /boot/grub/libreboot_grub.cfg or /grub/libreboot_grub.cfg(for systems where /boot is on a dedicated partition), and then use it automatically.
  3545. Simply create your custom GRUB configuration and save it to @strong{/boot/grub/libreboot_grub.cfg} on the running system. The next time you boot, GRUB (in libreboot) will automatically switch to this configuration file. @strong{This means that you do not have to re-flash, recompile or otherwise modify libreboot at all!}
  3546. Ideally, your distribution should automatically generate a libreboot_grub.cfg file that is written specifically under the assumption that it will be read and used on a libreboot system that uses GRUB as a payload. If your distribution does not do this, then you can try to add that feature yourself or politely ask someone involved with or otherwise knowledgeable about the distribution to do it for you. The libreboot_grub.cfg could either contain the full configuration, or it could chainload another GRUB ELF executable (built to be used as a coreboot payload) that is located in a partition on the main storage.
  3547. If you want to adapt a copy of the existing @emph{libreboot} GRUB configuration and use that for the libreboot_grub.cfg file, then follow @ref{Acquire the necessary utilities,tools}, @ref{Acquiring the correct ROM image,rom} and @ref{Extract grubtestcfg from the ROM image,extract_testconfig} to get the @strong{@emph{grubtest.cfg}}. Rename @strong{@emph{grubtest.cfg}} to @strong{@emph{libreboot_grub.cfg}} and save it to @strong{@emph{/boot/grub/}} on the running system where it is intended to be used. Modify the file at that location however you see fit, and then stop reading this guide (the rest of this page is irrelevant to you); @strong{in libreboot_grub.cfg on disk, if you are adapting it based on grub.cfg from CBFS then remove the check for libreboot_grub.cfg otherwise it will loop.}.
  3548. This is all well and good, but what should you actually put in your GRUB configuration file? Read @ref{Writing a GRUB configuration file,grub_config} for more information.
  3549. @node 2nd option - re-flash
  3550. @subsubsection 2nd option: re-flash
  3551. You can modify what is stored inside the flash chip quite easily. Read on to find out how.
  3552. @menu
  3553. * Acquire the necessary utilities::
  3554. * Acquiring the correct ROM image::
  3555. * Extract grubtestcfg from the ROM image::
  3556. * Re-insert the modified grubtestcfg into the ROM image::
  3557. * Testing::
  3558. * Final steps::
  3559. @end menu
  3560. @node Acquire the necessary utilities
  3561. @ifinfo
  3562. @subsubheading Acquire the necessary utilities
  3563. @end ifinfo
  3564. @node Acquiring the correct ROM image
  3565. @ifinfo
  3566. @subsubheading Acquiring the correct ROM image
  3567. @end ifinfo
  3568. You can either work directly with one of the ROM images already included in the libreboot ROM archives, or re-use the ROM that you have currently flashed. For the purpose of this tutorial it is assumed that your ROM image file is named @emph{libreboot.rom}, so please make sure to adapt.
  3569. ROM images are included pre-compiled in libreboot. You can also dump your current firmware, using flashrom:@* $ @strong{sudo flashrom -p internal -r libreboot.rom}@* # @strong{flashrom -p internal -r libreboot.rom}@* If you are told to specify the chip, add the option @strong{-c @{your chip@}} to the command, for example:@* # @strong{flashrom -c MX25L6405 -p internal -r libreboot.rom}
  3570. @node Extract grubtestcfg from the ROM image
  3571. @ifinfo
  3572. @subsubheading Extract grubtest.cfg from the ROM image
  3573. @end ifinfo
  3574. You can check the contents of the ROM image, inside CBFS:@* @strong{$ cd .../libreboot_util/cbfstool} @strong{$ ./cbfstool libreboot.rom print}
  3575. cbfstool is in the coreboot source archive, under util/
  3576. The files @emph{grub.cfg} and @emph{grubtest.cfg} should be present. grub.cfg is loaded by default, with a menuentry for switching to grubtest.cfg. In this tutorial, you will first modify and test @emph{grubtest.cfg}. This is to reduce the possibility of bricking your device, so DO NOT SKIP THIS!
  3577. Extract grubtest.cfg from the ROM image:@* @strong{$ ./cbfstool libreboot.rom extract -n grubtest.cfg -f grubtest.cfg}
  3578. Modify the grubtest.cfg accordingly.
  3579. This is all well and good, but what should you actually put in your GRUB configuration file? Read @ref{Writing a GRUB configuration file,grub_config} for more information.
  3580. @node Re-insert the modified grubtestcfg into the ROM image
  3581. @ifinfo
  3582. @subsubheading Re-insert the modified grubtest.cfg into the ROM image
  3583. @end ifinfo
  3584. Once your grubtest.cfg is modified and saved, delete the unmodified config from the ROM image:@* @strong{$ ./cbfstool libreboot.rom remove -n grubtest.cfg}
  3585. Next, insert the modified version:@* @strong{$ ./cbfstool libreboot.rom add -n grubtest.cfg -f grubtest.cfg -t raw}
  3586. @node Testing
  3587. @ifinfo
  3588. @subsubheading Testing
  3589. @end ifinfo
  3590. @strong{Now you have a modified ROM. Refer back to @ref{How to update/install,flashrom} for information on how to flash it.@* $ @strong{cd /libreboot_util} # @strong{./flash update libreboot.rom}@* Ocassionally, coreboot changes the name of a given board. If flashrom complains about a board mismatch, but you are sure that you chose the correct ROM image, then run this alternative command:@* # @strong{./flash forceupdate libreboot.rom}@* You should see @strong{"Verifying flash... VERIFIED."} written at the end of the flashrom output. Once you have done that, shut down and then boot up with your new test configuration.}
  3591. Choose (in GRUB) the menu entry that switches to grubtest.cfg. If it works, then your config is safe and you can continue below.
  3592. @strong{If it does not work like you want it to, if you are unsure or sceptical in any way, then re-do the steps above until you get it right! Do *not* proceed past this point unless you are 100% sure that your new configuration is safe (or desirable) to use.}
  3593. @node Final steps
  3594. @ifinfo
  3595. @subsubheading Final steps
  3596. @end ifinfo
  3597. When you are satisfied booting from grubtest.cfg, you can create a copy of grubtest.cfg, called grub.cfg. This is the same except for one difference: the menuentry 'Switch to grub.cfg' will be changed to 'Switch to grubtest.cfg' and inside it, all instances of grub.cfg to grubtest.cfg. This is so that the main config still links (in the menu) to grubtest.cfg, so that you don't have to manually switch to it, in case you ever want to follow this guide again in the future (modifying the already modified config). From /libreboot_util/cbfstool, do:@* $ @strong{sed -e 's:(cbfsdisk)/grub.cfg:(cbfsdisk)/grubtest.cfg:g' -e 's:Switch to grub.cfg:Switch to grubtest.cfg:g' < grubtest.cfg > grub.cfg}@*
  3598. Delete the grub.cfg that remained inside the ROM:@* @strong{$ ./cbfstool libreboot.rom remove -n grub.cfg}
  3599. Add the modified version that you just made:@* @strong{$ ./cbfstool libreboot.rom add -n grub.cfg -f grub.cfg -t raw}
  3600. @strong{Now you have a modified ROM. Again, refer back to @ref{How to update/install,flashrom} for information on how to flash it. It's the same method as you used before. Shut down and then boot up with your new configuration.}
  3601. @node Writing a GRUB configuration file
  3602. @subsection Writing a GRUB configuration file
  3603. This section is for those systems which use the GRUB payload. @strong{If your system uses the depthcharge payload, ignore this section.}
  3604. The following are some common examples of ways in which the grubtest.cfg file can be modified. @c NOTE: These > The following
  3605. @menu
  3606. * Obvious option:: Don't even modify the built-in grub.cfg
  3607. * Trisquel with full disk encryption - custom partition layout::
  3608. * Parabola GNU/Linux-libre::
  3609. @end menu
  3610. @node Obvious option
  3611. @subsubsection Obvious option: don't even modify the built-in grub.cfg
  3612. Use the menuentry that says something like @emph{Search for GRUB outside CBFS}. Assuming that you have a grub.cfg file at /boot/grub/ in your installed distro, this will generate a new menuentry in the GRUB menu. Use that to boot.
  3613. Then do this as root:@* $ @strong{cd /boot/grub/}@* $ @strong{ln -s grub.cfg libreboot_grub.cfg}
  3614. After that, your system should then boot automatically.
  3615. @node Trisquel with full disk encryption - custom partition layout
  3616. @subsubsection Trisquel with full disk encryption, custom partition layout
  3617. GRUB can boot from a symlink (or symlinks) pointing to your kernel/initramfs, whether from an unencrypted or encrypted /boot/. You can create your own custom symlink(s) but you have to manually update them when updating your kernel. This guide (not maintained by the libreboot project) shows how to configure Trisquel to automatically update that symlink on every kernel update. @uref{http://www.rel4tion.org/people/fr33domlover/libreboot-fix/,http://www.rel4tion.org/people/fr33domlover/libreboot-fix/}
  3618. @strong{TODO: adapt those notes and put them here. The author said that it was CC-0, so re-licensing under GFDL shouldn't be a problem.}
  3619. As an example, on my test system in /boot/grub/grub.cfg (on the HDD/SSD) I see for the main menu entry:
  3620. @itemize
  3621. @item
  3622. @strong{linux /boot/vmlinuz-3.15.1-gnu.nonpae root=UUID=3a008e14-4871-497b-95e5-fb180f277951 ro crashkernel=384M-2G:64M,2G-:128M quiet splash $vt_handoff}
  3623. @item
  3624. @strong{initrd /boot/initrd.img-3.15.1-gnu.nonpae}
  3625. @end itemize
  3626. @strong{ro}, @strong{quiet}, @strong{splash}, @strong{crashkernel=384M-2G:64M,2G-:128M} and @strong{$vt_handoff} can be safely ignored.
  3627. I use this to get my partition layout:@* $ @strong{lsblk}
  3628. In my case, I have no /boot partition, instead /boot is on the same partition as / on sda1. Yours might be different. In GRUB terms, sda means ahci0. 1 means msdos1, or gpt1, depending on whether I am using MBR or GPT partitioning. Thus, /dev/sda1 is GRUB is (ahci0,msdos1) or (ahci0,gpt1). In my case, I use MBR partitioning so it's (ahci0,msdos1). 'msdos' is a GRUB name simply because this partitioning type is traditionally used by MS-DOS. It doesn't mean that you have a proprietary OS.
  3629. Trisquel doesn't keep the filenames of kernels consistent, instead it keeps old kernels and new kernel updates are provided with the version in the filename. This can make GRUB payload a bit tricky. Fortunately, there are symlinks /vmlinuz and /initrd.img so if your /boot and / are on the same partition, you can set GRUB to boot from that. These are also updated automatically when installing kernel updates from your distributions apt-get repositories. @strong{Note: when using @uref{http://jxself.org/linux-libre,jxself kernel releases}, these are not updated at all and you have to update them manually.}
  3630. For the GRUB payload grubtest.cfg (in the 'Load Operating System' menu entry), we therefore have (in this example):@* @strong{set root='ahci0,msdos1'}@* @strong{linux /vmlinuz root=UUID=3a008e14-4871-497b-95e5-fb180f277951}@* @strong{initrd /initrd.img}
  3631. Optionally, you can convert the UUID to its real device name, for example /dev/sda1 in this case. sdX naming isn't very reliable, though, which is why UUID is used for most distributions.
  3632. Alternatively, if your /boot is on a separate partition then you cannot rely on the /vmlinuz and /initrd.img symlinks. Instead, go into /boot and create your own symlinks (update them manually when you install a new kernel update).@* $ @strong{sudo -s} (or @strong{su -})@* # @strong{cd /boot/}@* # @strong{rm -f vmlinuz initrd.img}@* # @strong{ln -s yourkernel ksym}@* # @strong{ln -s yourinitrd isym}@* # @strong{exit}
  3633. Then your grubtest.cfg menu entry (for payload) becomes like that, for example if / was on sda2 and /boot was on sda1:@* @strong{set root='ahci0,msdos1'}@* @strong{linux /ksym root=/dev/sda2}@* @strong{initrd /isym}
  3634. There are lots of possible variations so please try to adapt.
  3635. @node Parabola GNU/Linux-libre
  3636. @subsubsection Parabola GNU/Linux-libre
  3637. You can basically adapt the above. Note however that Parabola does not keep old kernels still installed, and the file names are always consistent, so you don't need to boot from symlinks, you can just use the real thing directly.
  3638. @node Installing Parabola GNU/Linux-libre with full disk encryption
  3639. @subsection Installing Parabola GNU/Linux-libre with full disk encryption including /boot
  3640. Libreboot on x86 uses the GRUB @uref{http://www.coreboot.org/Payloads#GRUB_2,payload} by default, which means that the GRUB configuration file (where your GRUB menu comes from) is stored directly alongside libreboot and it's GRUB payload executable, inside the flash chip. In context, this means that installing distributions and managing them is handled slightly differently compared to traditional BIOS systems.
  3641. On most systems, the /boot partition has to be left unencrypted while the others are encrypted. This is so that GRUB, and therefore the kernel, can be loaded and executed since the firmware can't open a LUKS volume. Not so with libreboot! Since GRUB is already included directly as a payload, even /boot can be encrypted. This protects /boot from tampering by someone with physical access to the system.
  3642. NOTE: When finishing implementing this setup, if the boot stalls when running cryptomount -a, try removing the DVD drive (on thinkpads).
  3643. @strong{This guide is *only* for the GRUB payload. If you use the depthcharge payload, ignore this section entirely.}
  3644. @menu
  3645. * Booting the install environment:: @c Added
  3646. * Setting up the storage device:: @c Added
  3647. * Change keyboard layout::
  3648. * Establish an internet connection::
  3649. * Getting started::
  3650. * dm-mod::
  3651. * Create LUKS partition::
  3652. * Create LVM::
  3653. * Create / and swap partitions and mount::
  3654. * Continue with Parabola installation::
  3655. * Configure the system::
  3656. * Extra security tweaks::
  3657. * Unmount reboot!::
  3658. * Booting from GRUB::
  3659. * Follow-up tutorial configuring Parabola::
  3660. * Modify grubcfg inside the ROM::
  3661. * Bonus Using a key file to unlock /boot/::
  3662. * Further security tips::
  3663. * Troubleshooting Parabola::
  3664. @end menu
  3665. @node Booting the install environment
  3666. @subsubsection Booting the install environment
  3667. Boot Parabola's install environment. @ref{How to install GNU/Linux on a libreboot system,How to boot a GNU/Linux installer}.
  3668. For this guide I used the 2015 08 01 image to boot the live installer and install the system. This is available at @uref{https://wiki.parabola.nu/Get_Parabola#Main_live_ISO,this page}.
  3669. This guide will go through the installation steps taken at the time of writing, which may or may not change due to the volatile nature of Parabola (it changes all the time). In general most of it should remain the same. If you spot mistakes, please say so! This guide will be ported to the Parabola wiki at a later date. For up to date Parabola install guide, go to the Parabola wiki. This guide essentially cherry picks the useful information (valid at the time of writing: 2015-08-25).
  3670. @node Setting up the storage device
  3671. @subsubsection Setting up the storage device
  3672. This section deals with wiping the storage device on which you plan to install Parabola GNU/Linux. Follow these steps, but if you use an SSD, also:
  3673. - beware there are issues with TRIM (not enabled through luks) and security issues if you do enable it. See @uref{https://wiki.archlinux.org/index.php/Dm-crypt/Specialties#Discard.2FTRIM_support_for_solid_state_drives_.28SSD.29,this page} for more info.
  3674. - make sure it's brand-new (or barely used). Or, otherwise, be sure that it never previously contained plaintext copies of your data.
  3675. - make sure to read @uref{https://wiki.archlinux.org/index.php/Solid_State_Drives,this article}. Edit /etc/fstab later on when chrooted into your install. Also, read the whole article and keep all points in mind, adapting them for this guide.
  3676. Securely wipe the drive:@* # @strong{dd if=/dev/urandom of=/dev/sda; sync}@* NOTE: If you have an SSD, only do this the first time. If it was already LUKS-encrypted before, use the info below to wipe the LUKS header. Also, check online for your SSD what the recommended erase block size is. For example if it was 2MiB:@* # @strong{dd if=/dev/urandom of=/dev/sda bs=2M; sync}
  3677. If your drive was already LUKS encrypted (maybe you are re-installing your distro) then it is already 'wiped'. You should just wipe the LUKS header. @uref{https://www.lisenet.com/2013/luks-add-keys-backup-and-restore-volume-header/,https://www.lisenet.com/2013/luks-add-keys-backup-and-restore-volume-header/} showed me how to do this. It recommends doing the first 3MiB. Now, that guide is recommending putting zero there. I'm going to use urandom. Do this:@* # @strong{head -c 3145728 /dev/urandom > /dev/sda; sync}@* (Wiping the LUKS header is important, since it has hashed passphrases and so on. It's 'secure', but 'potentially' a risk).
  3678. @node Change keyboard layout
  3679. @subsubsection Change keyboard layout
  3680. Parabola live shell assumes US Qwerty. If you have something different, list the available keymaps and use yours:@* # @strong{localectl list-keymaps}@* # @strong{loadkeys LAYOUT}@* For me, LAYOUT would have been dvorak-uk.
  3681. @node Establish an internet connection
  3682. @subsubsection Establish an internet connection
  3683. Refer to @uref{https://wiki.parabola.nu/Beginners%27_guide#Establish_an_internet_connection,this guide}. Wired is recommended, but wireless is also explained there.
  3684. @node Getting started
  3685. @subsubsection Getting started
  3686. The beginning is based on @uref{https://wiki.parabolagnulinux.org/Installation_Guide,https://wiki.parabolagnulinux.org/Installation_Guide}. Then I referred to @uref{https://wiki.archlinux.org/index.php/Partitioning,https://wiki.archlinux.org/index.php/Partitioning} at first.
  3687. @node dm-mod
  3688. @subsubsection dm-mod
  3689. device-mapper will be used - a lot. Make sure that the kernel module is loaded:@* # @strong{modprobe dm-mod}
  3690. @node Create LUKS partition
  3691. @subsubsection Create LUKS partition
  3692. I am using MBR partitioning, so I use cfdisk:@* # @strong{cfdisk /dev/sda}
  3693. I create a single large sda1 filling the whole drive, leaving it as the default type 'Linux' (83).
  3694. Now I refer to @uref{https://wiki.archlinux.org/index.php/Dm-crypt/Drive_preparation#Partitioning,https://wiki.archlinux.org/index.php/Dm-crypt/Drive_preparation#Partitioning}:@* I am then directed to @uref{https://wiki.archlinux.org/index.php/Dm-crypt/Device_encryption,https://wiki.archlinux.org/index.php/Dm-crypt/Device_encryption}.
  3695. Parabola forces you to RTFM. Do that.
  3696. It tells me to run:@* # @strong{cryptsetup benchmark} (for making sure the list below is populated)@* Then:@* # @strong{cat /proc/crypto}@* This gives me crypto options that I can use. It also provides a representation of the best way to set up LUKS (in this case, security is a priority; speed, a distant second). To gain a better understanding, I am also reading:@* # @strong{man cryptsetup}
  3697. Following that page, based on my requirements, I do the following based on @uref{https://wiki.archlinux.org/index.php/Dm-crypt/Device_encryption#Encryption_options_for_LUKS_mode,https://wiki.archlinux.org/index.php/Dm-crypt/Device_encryption#Encryption_options_for_LUKS_mode}. Reading through, it seems like Serpent (encryption) and Whirlpool (hash) is the best option.
  3698. I am initializing LUKS with the following:@* # @strong{cryptsetup -v --cipher serpent-xts-plain64 --key-size 512 --hash whirlpool --use-random --verify-passphrase luksFormat /dev/sda1} Choose a @strong{secure} passphrase here. Ideally lots of lowercase/uppercase numbers, letters, symbols etc all in a random pattern. The password length should be as long as you are able to handle without writing it down or storing it anywhere.
  3699. Use of the @emph{diceware method} is recommended, for generating secure passphrases (instead of passwords).
  3700. @node Create LVM
  3701. @subsubsection Create LVM
  3702. Now I refer to @uref{https://wiki.archlinux.org/index.php/LVM,https://wiki.archlinux.org/index.php/LVM}.
  3703. Open the LUKS partition:@* # @strong{cryptsetup luksOpen /dev/sda1 lvm}@* (it will be available at /dev/mapper/lvm)
  3704. Create LVM partition:@* # @strong{pvcreate /dev/mapper/lvm}@* Show that you just created it:@* # @strong{pvdisplay}
  3705. Now I create the volume group, inside of which the logical volumes will be created:@* # @strong{vgcreate matrix /dev/mapper/lvm}@* (volume group name is 'matrix' - choose your own name, if you like) Show that you created it:@* # @strong{vgdisplay}
  3706. Now create the logical volumes:@* # @strong{lvcreate -L 2G matrix -n swapvol} (2G swap partition, named swapvol)@* Again, choose your own name if you like. Also, make sure to choose a swap size of your own needs. It basically depends on how much RAM you have installed. I refer to @uref{http://www.linux.com/news/software/applications/8208-all-about-linux-swap-space,http://www.linux.com/news/software/applications/8208-all-about-linux-swap-space}.@* # @strong{lvcreate -l +100%FREE matrix -n root} (single large partition in the rest of the space, named root)@* You can also be flexible here, for example you can specify a /boot, a /, a /home, a /var, a /usr, etc. For example, if you will be running a web/mail server then you want /var in its own partition (so that if it fills up with logs, it won't crash your system). For a home/laptop system (typical use case), a root and a swap will do (really).
  3707. Verify that the logical volumes were created, using the following command:@* # @strong{lvdisplay}
  3708. @node Create / and swap partitions and mount
  3709. @subsubsection Create / and swap partitions, and mount
  3710. For the swapvol LV I use:@* # @strong{mkswap /dev/mapper/matrix-swapvol}@* Activate swap:@* # @strong{swapon /dev/matrix/swapvol}
  3711. For the root LV I use:@* # @strong{mkfs.ext4 /dev/mapper/matrix-root}
  3712. Mount the root (/) partition:@* # @strong{mount /dev/matrix/root /mnt}
  3713. @node Continue with Parabola installation
  3714. @subsubsection Continue with Parabola installation
  3715. This guide is really about GRUB, Parabola and cryptomount. I have to show how to install Parabola so that the guide can continue.
  3716. Now I am following the rest of @uref{https://wiki.parabolagnulinux.org/Installation_Guide,https://wiki.parabolagnulinux.org/Installation_Guide}. I also cross referenced @uref{https://wiki.archlinux.org/index.php/Installation_guide,https://wiki.archlinux.org/index.php/Installation_guide}.
  3717. Create /home and /boot on root mountpoint:@* # @strong{mkdir -p /mnt/home}@* # @strong{mkdir -p /mnt/boot}
  3718. Once all the remaining partitions, if any, have been mounted, the devices are ready to install Parabola.
  3719. In @strong{/etc/pacman.d/mirrorlist}, comment out all lines except the Server line closest to where you are (I chose the UK Parabola server (main server)) and then did:@* # @strong{pacman -Syy}@* # @strong{pacman -Syu}@* # @strong{pacman -Sy pacman} (and then I did the other 2 steps above, again)@* In my case I did the steps in the next paragraph, and followed the steps in this paragraph again.
  3720. <troubleshooting>@* @ @ @ The following is based on 'Verification of package signatures' in the Parabola install guide.@* @ @ @ Check there first to see if steps differ by now.@* @ @ @ Now you have to update the default Parabola keyring. This is used for signing and verifying packages:@* @ @ @ # @strong{pacman -Sy parabola-keyring}@* @ @ @ It says that if you get GPG errors, then it's probably an expired key and, therefore, you should do:@* @ @ @ # @strong{pacman-key --populate parabola}@* @ @ @ # @strong{pacman-key --refresh-keys}@* @ @ @ # @strong{pacman -Sy parabola-keyring}@* @ @ @ To be honest, you should do the above anyway. Parabola has a lot of maintainers, and a lot of keys. Really!@* @ @ @ If you get an error mentioning dirmngr, do:@* @ @ @ # @strong{dirmngr </dev/null}@* @ @ @ Also, it says that if the clock is set incorrectly then you have to manually set the correct time @* @ @ @ (if keys are listed as expired because of it):@* @ @ @ # @strong{date MMDDhhmm[[CC]YY][.ss]}@* @ @ @ I also had to install:@* @ @ @ # @strong{pacman -S archlinux-keyring}@* @ @ @ # @strong{pacman-key --populate archlinux}@* @ @ @ In my case I saw some conflicting files reported in pacman, stopping me from using it.@* @ @ @ I deleted the files that it mentioned and then it worked. Specifically, I had this error:@* @ @ @ @emph{licenses: /usr/share/licenses/common/MPS exists in filesystem}@* @ @ @ I rm -Rf'd the file and then pacman worked. I'm told that the following would have also made it work:@* @ @ @ # @strong{pacman -Sf licenses}@* </troubleshooting>@*
  3721. I also like to install other packages (base-devel, compilers and so on) and wpa_supplicant/dialog/iw/wpa_actiond are needed for wireless after the install:@* # @strong{pacstrap /mnt base base-devel wpa_supplicant dialog iw wpa_actiond}
  3722. @node Configure the system
  3723. @subsubsection Configure the system
  3724. Generate an fstab - UUIDs are used because they have certain advantages (see @uref{https://wiki.parabola.nu/Fstab#Identifying_filesystems,https://wiki.parabola.nu/Fstab#Identifying_filesystems}. If you prefer labels instead, replace the -U option with -L):@* # @strong{genfstab -U -p /mnt >> /mnt/etc/fstab}@* Check the created file:@* # @strong{cat /mnt/etc/fstab}@* (If there are any errors, edit the file. Do @strong{NOT} run the genfstab command again!)
  3725. Chroot into new system:@* # @strong{arch-chroot /mnt /bin/bash}
  3726. It's a good idea to have this installed:@* # @strong{pacman -S linux-libre-lts}
  3727. It was also suggested that you should install this kernel (read up on what GRSEC is):@* # @strong{pacman -S linux-libre-grsec}
  3728. This is another kernel that sits inside /boot, which you can use. LTS means 'long-term support'. These are so-called 'stable' kernels that can be used as a fallback during updates, if a bad kernel causes issues for you.
  3729. Parabola does not have wget. This is sinister. Install it:@* # @strong{pacman -S wget}
  3730. Locale:@* # @strong{nano /etc/locale.gen}@* Uncomment your needed localisations. For example en_GB.UTF-8 (UTF-8 is highly recommended over other options).@* # @strong{locale-gen}@* # @strong{echo LANG=en_GB.UTF-8 > /etc/locale.conf}@* # @strong{export LANG=en_GB.UTF-8}
  3731. Console font and keymap:@* # @strong{nano /etc/vconsole.conf}@* In my case:
  3732. @verbatim
  3733. KEYMAP=dvorak-uk
  3734. FONT=lat9w-16
  3735. @end verbatim
  3736. Time zone:@* # @strong{ln -s /usr/share/zoneinfo/Europe/London /etc/localtime}@* (Replace Zone and Subzone to your liking. See /usr/share/zoneinfo)
  3737. Hardware clock:@* # @strong{hwclock --systohc --utc}
  3738. Hostname: Write your hostname to /etc/hostname. For example, if your hostname is parabola:@* # @strong{echo parabola > /etc/hostname}@* Add the same hostname to /etc/hosts:@* # @strong{nano /etc/hosts}@*
  3739. @verbatim
  3740. #<ip-address> <hostname.domain.org> <hostname>
  3741. 127.0.0.1 localhost.localdomain localhost parabola
  3742. ::1 localhost.localdomain localhost parabola
  3743. @end verbatim
  3744. Configure the network: Refer to @uref{https://wiki.parabola.nu/Beginners%27_guide#Configure_the_network,https://wiki.parabola.nu/Beginners%27_guide#Configure_the_network}.
  3745. Mkinitcpio: Configure /etc/mkinitcpio.conf as needed (see @uref{https://wiki.parabola.nu/Mkinitcpio,https://wiki.parabola.nu/Mkinitcpio}). Runtime modules can be found in /usr/lib/initcpio/hooks, and build hooks can be found in /usr/lib/initcpio/install. (# @strong{mkinitcpio -H hookname} gives information about each hook.) Specifically, for this use case:@* # @strong{nano /etc/mkinitcpio.conf}@* Then modify the file like so:
  3746. @itemize
  3747. @item
  3748. MODULES="i915"
  3749. @item
  3750. This forces the driver to load earlier, so that the console font isn't wiped out after getting to login). Macbook21 users will also need to add the @strong{"hid-generic", "hid" and "hid-apple" modules to have a working keyboard when asked to enter the LUKS password.}
  3751. @item
  3752. HOOKS="base udev autodetect modconf block keyboard keymap consolefont encrypt lvm2 filesystems fsck shutdown"
  3753. @item
  3754. Explanation:
  3755. @item
  3756. keymap adds to initramfs the keymap that you specified in /etc/vconsole.conf
  3757. @item
  3758. consolefont adds to initramfs the font that you specified in /etc/vconsole.conf
  3759. @item
  3760. encrypt adds LUKS support to the initramfs - needed to unlock your disks at boot time
  3761. @item
  3762. lvm2 adds LVM support to the initramfs - needed to mount the LVM partitions at boot time
  3763. @item
  3764. shutdown is needed according to Parabola wiki for unmounting devices (such as LUKS/LVM) during shutdown)
  3765. @end itemize
  3766. Now using mkinitcpio, you can create the kernel and ramdisk for booting with (this is different from Arch, specifying linux-libre instead of linux):@* # @strong{mkinitcpio -p linux-libre}@* Also do it for linux-libre-lts:@* # @strong{mkinitcpio -p linux-libre-lts}@* Also do it for linux-libre-grsec:@* # @strong{mkinitcpio -p linux-libre-grsec}
  3767. Set the root password: At the time of writing, Parabola used SHA512 by default for its password hashing. I referred to @uref{https://wiki.archlinux.org/index.php/SHA_password_hashes,https://wiki.archlinux.org/index.php/SHA_password_hashes}.@* # @strong{nano /etc/pam.d/passwd}@* Add rounds=65536 at the end of the uncommented 'password' line.@* # @strong{passwd root}@* Make sure to set a secure password! Also, it must never be the same as your LUKS password.
  3768. Use of the @emph{diceware method} is recommended, for generating secure passphrases (instead of passwords).
  3769. @node Extra security tweaks
  3770. @subsubsection Extra security tweaks
  3771. Based on @uref{https://wiki.archlinux.org/index.php/Security,https://wiki.archlinux.org/index.php/Security}.
  3772. Restrict access to important directories:@* # @strong{chmod 700 /boot /etc/@{iptables,arptables@}}
  3773. Lockout user after three failed login attempts:@* Edit the file /etc/pam.d/system-login and comment out that line:@* @emph{# auth required pam_tally.so onerr=succeed file=/var/log/faillog}@* Or just delete it. Above it, put:@* @emph{auth required pam_tally.so deny=2 unlock_time=600 onerr=succeed file=/var/log/faillog}@* To unlock a user manually (if a password attempt is failed 3 times), do:@* # @strong{pam_tally --user @emph{theusername} --reset} What the above configuration does is lock the user out for 10 minutes, if they make 3 failed login attempts.
  3774. Configure sudo - not covered here. Will be covered post-installation in another tutorial, at a later date. If this is a single-user system, you don't really need sudo.
  3775. @node Unmount reboot!
  3776. @subsubsection Unmount, reboot!
  3777. Exit from chroot:@* # @strong{exit}
  3778. unmount:@* # @strong{umount -R /mnt}@* # @strong{swapoff -a}
  3779. deactivate the lvm lv's:@* # @strong{lvchange -an /dev/matrix/root}@* # @strong{lvchange -an /dev/matrix/swapvol}@*
  3780. Lock the encrypted partition (close it):@* # @strong{cryptsetup luksClose lvm}
  3781. # @strong{shutdown -h now}@* Remove the installation media, then boot up again.
  3782. @node Booting from GRUB
  3783. @subsubsection Booting from GRUB
  3784. Initially you will have to boot manually. Press C to get to the GRUB command line. The underlined parts are optional (using those 2 underlines will boot lts kernel instead of normal).
  3785. grub> @strong{cryptomount -a}@* grub> @strong{set root='lvm/matrix-root'}@* grub> @strong{linux /boot/vmlinuz-linux-libre-lts root=/dev/matrix/root cryptdevice=/dev/sda1:root}@* grub> @strong{initrd /boot/initramfs-linux-libre-lts.img}@* grub> @strong{boot}@*
  3786. You could also make it load /boot/vmlinuz-linux-libre-grsec and /boot/initramfs-linux-libre-grsec.img
  3787. @node Follow-up tutorial configuring Parabola
  3788. @subsubsection Follow-up tutorial: configuring Parabola
  3789. We will modify grub.config inside the ROM and do all kinds of fun stuff, but I recommend that you first transform the current bare-bones Parabola install into a more useable system. Doing so will make the upcoming ROM modifications MUCH easier to perform and less risky! @ref{Configuring Parabola post-install,configuring_parabola} shows my own notes post-installation. Using these, you can get a basic system similar to the one that I chose for myself. You can also cherry pick useful notes and come up with your own system. Parabola is user-centric, which means that you are in control. For more information, read @uref{https://wiki.archlinux.org/index.php/The_Arch_Way,The Arch Way} (Parabola also follows it).
  3790. @node Modify grubcfg inside the ROM
  3791. @subsubsection Modify grub.cfg inside the ROM
  3792. (Re-)log in to your system, pressing C, so booting manually from GRUB (see above). You need to modify the ROM, so that Parabola can boot automatically with this configuration. @ref{How to replace the default GRUB configuration file on a libreboot system,grub_cbfs} shows you how. Follow that guide, using the configuration details below. If you go for option 2 (re-flash), promise to do this on grubtest.cfg first! We can't emphasise this enough. This is to reduce the possibility of bricking your device!
  3793. In grubtest.cfg, inside the 'Load Operating System' menu entry, change the contents to:
  3794. @verbatim
  3795. cryptomount -a
  3796. set root='lvm/matrix-root'
  3797. linux /boot/vmlinuz-linux-libre-lts root=/dev/matrix/root cryptdevice=/dev/sda1:root
  3798. initrd /boot/initramfs-linux-libre-lts.img
  3799. @end verbatim
  3800. Note: the underlined parts above (-lts) can also be removed, to boot the latest kernel instead of LTS (long-term support) kernels. You could also copy the menu entry and in one have -lts, and without in the other menuentry. You could also create a menu entry to load /boot/vmlinuz-linux-libre-grsec and /boot/initramfs-linux-libre-grsec.img The first entry will load by default.
  3801. Without specifying a device, the @emph{-a} parameter tries to unlock all detected LUKS volumes. You can also specify -u UUID or -a (device).
  3802. Now, to protect your system from an attacker simply booting a live usb distro and re-flashing the boot firmware, we are going to add a password for GRUB. In a new terminal window, if you are not yet online, start dhcp on ethernet:@* # @strong{systemctl start dhcpcd.service} Or make sure to get connected to the internet in any other way you prefer, at least.
  3803. Use of the @emph{diceware method} is recommended, for generating secure passphrases (instead of passwords).
  3804. AGAIN: MAKE SURE TO DO THIS WHOLE SECTION ON grubtest.cfg *BEFORE* DOING IT ON grub.cfg. (When we get there, upon reboot, select the menu entry that says @emph{Switch to grubtest.cfg} and test that it works. Only once you are satisfied, copy that to grub.cfg. Only a few steps to go, though.) WHY? BECAUSE AN INCORRECTLY SET PASSWORD CONFIG MEANS YOU CAN'T AUTHENTICATE, WHICH MEANS 'BRICK'.
  3805. (emphasis added, because it's needed: this is a common roadblock for users.)
  3806. We need a utility that comes with GRUB, so we will download it temporarily. (Remember that GRUB isn't needed for booting, since it's already included as a payload in libreboot.) Also, we will use flashrom, and I installed dmidecode. You only need base-devel (compilers and so on) to build and use cbfstool. It was already installed if you followed this tutorial, but here it is:@* # @strong{pacman -S grub flashrom dmidecode base-devel}@* Next, do:@* # @strong{grub-mkpasswd-pbkdf2}@* Enter your chosen password at the prompt and your hash will be shown. Copy this string - you will add it to your grubtest.cfg.
  3807. The password below (it's @strong{password}, by the way) after @emph{'password_pbkdf2 root'} @emph{should be changed} to your own. Make sure to specify a password that is different from both your LUKS *and* your root/user password. Obviously, do not simply copy and paste the examples shown here...
  3808. Next, back in grubtest.cfg, above the first 'Load Operating System' menu entry, you should now add your GRUB password, like so (replace with your own name (I used @strong{root} on both lines, feel free to choose another one) and the password hash which you copied):
  3809. @verbatim
  3810. set superusers="root"
  3811. password_pbkdf2 root grub.pbkdf2.sha512.10000.711F186347156BC105CD83A2ED7AF1EB971AA2B1EB2640172F34B0DEFFC97E654AF48E5F0C3B7622502B76458DA494270CC0EA6504411D676E6752FD1651E749.8DD11178EB8D1F633308FD8FCC64D0B243F949B9B99CCEADE2ECA11657A757D22025986B0FA116F1D5191E0A22677674C994EDBFADE62240E9D161688266A711
  3812. @end verbatim
  3813. Save your changes in grubtest.cfg, then delete the unmodified config from the ROM image:@* $ @strong{./cbfstool libreboot.rom remove -n grubtest.cfg}@* and insert the modified grubtest.cfg:@* $ @strong{./cbfstool libreboot.rom add -n grubtest.cfg -f grubtest.cfg -t raw}@*
  3814. Now refer to @uref{http://libreboot.org/install/index.html#flashrom,http://libreboot.org/install/index.html#flashrom}. Cd (up) to the libreboot_util directory and update the flash chip contents:@* # @strong{./flash update libreboot.rom}@* Ocassionally, coreboot changes the name of a given board. If flashrom complains about a board mismatch, but you are sure that you chose the correct ROM image, then run this alternative command:@* # @strong{./flash forceupdate libreboot.rom}@* You should see "Verifying flash... VERIFIED." written at the end of the flashrom output.
  3815. With this new configuration, Parabola can boot automatically and you will have to enter a password at boot time, in GRUB, before being able to use any of the menu entries or switch to the terminal. Let's test it out: reboot and choose grubtest.cfg from the GRUB menu, using the arrow keys on your keyboard. Enter the name you chose, the GRUB password, your LUKS passphrase and login as root/your user. All went well? Great!
  3816. If it does not work like you want it to, if you are unsure or sceptical in any way, don't despair: you have been wise and did not brick your device! Reboot and login the default way, and then modify your grubtest.cfg until you get it right! @strong{Do *not* proceed past this point unless you are 100% sure that your new configuration is safe (or desirable) to use.}
  3817. Now, we can easily and safely create a copy of grubtest.cfg, called grub.cfg. This will be the same except for one difference: the menuentry 'Switch to grub.cfg' is changed to 'Switch to grubtest.cfg' and, inside it, all instances of grub.cfg to grubtest.cfg. This is so that the main config still links (in the menu) to grubtest.cfg, so that you don't have to manually switch to it, in case you ever want to follow this guide again in the future (modifying the already modified config). Inside libreboot_util/cbfstool/@{armv7l i686 x86_64@}, we can do this with the following command:@* $ @strong{sed -e 's:(cbfsdisk)/grub.cfg:(cbfsdisk)/grubtest.cfg:g' -e 's:Switch to grub.cfg:Switch to grubtest.cfg:g' < grubtest.cfg > grub.cfg}@* Delete the grub.cfg that remained inside the ROM:@* $ @strong{./cbfstool libreboot.rom remove -n grub.cfg}@* Add the modified version that you just made:@* $ @strong{./cbfstool libreboot.rom add -n grub.cfg -f grub.cfg -t raw}@*
  3818. Now you have a modified ROM. Once more, refer to @uref{http://libreboot.org/install/index.html#flashrom,http://libreboot.org/install/index.html#flashrom}. Cd to the libreboot_util directory and update the flash chip contents:@* # @strong{./flash update libreboot.rom}@* And wait for the "Verifying flash... VERIFIED." Once you have done that, shut down and then boot up with your new configuration.
  3819. When done, delete GRUB (remember, we only needed it for the @emph{grub-mkpasswd-pbkdf2} utility; GRUB is already part of libreboot, flashed alongside it as a @emph{payload}):@* # @strong{pacman -R grub}
  3820. If you followed all that correctly, you should now have a fully encrypted Parabola installation. Refer to the wiki for how to do the rest.
  3821. @node Bonus Using a key file to unlock /boot/
  3822. @subsubsection Bonus: Using a key file to unlock /boot/
  3823. By default, you will have to enter your LUKS passphrase twice; once in GRUB, and once when booting the kernel. GRUB unlocks the encrypted partition and then loads the kernel, but the kernel is not aware of the fact that it is being loaded from an encrypted volume. Therefore, you will be asked to enter your passphrase a second time. A workaround is to put a keyfile inside initramfs, with instructions for the kernel to use it when booting. This is safe, because /boot/ is encrypted (otherwise, putting a keyfile inside initramfs would be a bad idea).@* Boot up and login as root or your user. Then generate the key file:@* # @strong{dd bs=512 count=4 if=/dev/urandom of=/etc/mykeyfile iflag=fullblock}@* Insert it into the luks volume:@* # @strong{cryptsetup luksAddKey /dev/sdX /etc/mykeyfile}@* and enter your LUKS passphrase when prompted. Add the keyfile to the initramfs by adding it to FILES in /etc/mkinitcpio.conf. For example:@* # @strong{FILES="/etc/mykeyfile"}@* Create the initramfs image from scratch:@* # @strong{mkinitcpio -p linux-libre}@* # @strong{mkinitcpio -p linux-libre-lts}@* # @strong{mkinitcpio -p linux-libre-grsec}@* Add the following to your grub.cfg - you are now able to do that, see above! -, or add it in the kernel command line for GRUB:@* # @strong{cryptkey=rootfs:/etc/mykeyfile}@* @* You can also place this inside the grub.cfg that exists in CBFS: @ref{How to replace the default GRUB configuration file on a libreboot system,grub_cbfs}.
  3824. @node Further security tips
  3825. @subsubsection Further security tips
  3826. @uref{https://wiki.archlinux.org/index.php/Security,https://wiki.archlinux.org/index.php/Security}.@* @uref{https://wiki.parabolagnulinux.org/User:GNUtoo/laptop,https://wiki.parabolagnulinux.org/User:GNUtoo/laptop}
  3827. @node Troubleshooting Parabola
  3828. @subsubsection Troubleshooting Parabola
  3829. A user reported issues when booting with a docking station attached on an X200, when decrypting the disk in GRUB. The error @emph{AHCI transfer timed out} was observed. The workaround was to remove the docking station.
  3830. Further investigation revealed that it was the DVD drive causing problems. Removing that worked around the issue.
  3831. @verbatim
  3832. "sudo wodim -prcap" shows information about the drive:
  3833. Device was not specified. Trying to find an appropriate drive...
  3834. Detected CD-R drive: /dev/sr0
  3835. Using /dev/cdrom of unknown capabilities
  3836. Device type : Removable CD-ROM
  3837. Version : 5
  3838. Response Format: 2
  3839. Capabilities :
  3840. Vendor_info : 'HL-DT-ST'
  3841. Identification : 'DVDRAM GU10N '
  3842. Revision : 'MX05'
  3843. Device seems to be: Generic mmc2 DVD-R/DVD-RW.
  3844. Drive capabilities, per MMC-3 page 2A:
  3845. Does read CD-R media
  3846. Does write CD-R media
  3847. Does read CD-RW media
  3848. Does write CD-RW media
  3849. Does read DVD-ROM media
  3850. Does read DVD-R media
  3851. Does write DVD-R media
  3852. Does read DVD-RAM media
  3853. Does write DVD-RAM media
  3854. Does support test writing
  3855. Does read Mode 2 Form 1 blocks
  3856. Does read Mode 2 Form 2 blocks
  3857. Does read digital audio blocks
  3858. Does restart non-streamed digital audio reads accurately
  3859. Does support Buffer-Underrun-Free recording
  3860. Does read multi-session CDs
  3861. Does read fixed-packet CD media using Method 2
  3862. Does not read CD bar code
  3863. Does not read R-W subcode information
  3864. Does read raw P-W subcode data from lead in
  3865. Does return CD media catalog number
  3866. Does return CD ISRC information
  3867. Does support C2 error pointers
  3868. Does not deliver composite A/V data
  3869. Does play audio CDs
  3870. Number of volume control levels: 256
  3871. Does support individual volume control setting for each channel
  3872. Does support independent mute setting for each channel
  3873. Does not support digital output on port 1
  3874. Does not support digital output on port 2
  3875. Loading mechanism type: tray
  3876. Does support ejection of CD via START/STOP command
  3877. Does not lock media on power up via prevent jumper
  3878. Does allow media to be locked in the drive via PREVENT/ALLOW command
  3879. Is not currently in a media-locked state
  3880. Does not support changing side of disk
  3881. Does not have load-empty-slot-in-changer feature
  3882. Does not support Individual Disk Present feature
  3883. Maximum read speed: 4234 kB/s (CD 24x, DVD 3x)
  3884. Current read speed: 4234 kB/s (CD 24x, DVD 3x)
  3885. Maximum write speed: 4234 kB/s (CD 24x, DVD 3x)
  3886. Current write speed: 4234 kB/s (CD 24x, DVD 3x)
  3887. Rotational control selected: CLV/PCAV
  3888. Buffer size in KB: 1024
  3889. Copy management revision supported: 1
  3890. Number of supported write speeds: 4
  3891. Write speed # 0: 4234 kB/s CLV/PCAV (CD 24x, DVD 3x)
  3892. Write speed # 1: 2822 kB/s CLV/PCAV (CD 16x, DVD 2x)
  3893. Write speed # 2: 1764 kB/s CLV/PCAV (CD 10x, DVD 1x)
  3894. Write speed # 3: 706 kB/s CLV/PCAV (CD 4x, DVD 0x)
  3895. Supported CD-RW media types according to MMC-4 feature 0x37:
  3896. Does write multi speed CD-RW media
  3897. Does write high speed CD-RW media
  3898. Does write ultra high speed CD-RW media
  3899. Does not write ultra high speed+ CD-RW media
  3900. @end verbatim
  3901. @node Configuring Parabola post-install
  3902. @subsection Configuring Parabola (post-install)
  3903. Post-installation configuration steps for Parabola GNU/Linux-libre. Parabola is extremely flexible; this is just an example.
  3904. While not strictly related to the libreboot project, this guide is intended to be useful for those interested in installing Parabola on their libreboot system.
  3905. It details configuration steps that I took after installing the base system, as a follow up to @ref{Installing Parabola GNU/Linux-libre with full disk encryption,encrypted_parabola}. This guide is likely to become obsolete at a later date (due to the volatile 'rolling-release' model that Arch/Parabola both use), but attempts will be made to maintain it.
  3906. @strong{This guide was valid on 2014-09-21. If you see any changes that should to be made at the present date, please get in touch with the libreboot project!}
  3907. You do not necessarily have to follow this guide word-for-word; @emph{parabola} is extremely flexible. The aim here is to provide a common setup that most users will be happy with. While Parabola can seem daunting at first glance (especially for new GNU/Linux users), with a simple guide it can provide all the same usability as Trisquel, without hiding any details from the user.
  3908. Paradoxically, as you get more advanced Parabola can actually become @emph{easier to use} when you want to set up your system in a special way compared to what most distributions provide. You will find over time that other distributions tend to @emph{get in your way}.
  3909. @strong{This guide assumes that you already have Parabola installed. If you have not yet installed Parabola, then @ref{Installing Parabola GNU/Linux-libre with full disk encryption,this guide} is highly recommended!}
  3910. A lot of the steps in this guide will refer to the Arch wiki. Arch is the upstream distribution that Parabola uses. Most of this guide will also tell you to read wiki articles, other pages, manuals, and so on. In general it tries to cherry pick the most useful information but nonetheless you are encouraged to learn as much as possible. @strong{It might take you a few days to fully install your system how you like, depending on how much you need to read. Patience is key, especially for new users}.
  3911. The Arch wiki will sometimes use bad language, such as calling the whole system Linux, using the term open-source (or closed-source), and it will sometimes recommend the use of proprietary software. You need to be careful about this when reading anything on the Arch wiki.
  3912. Some of these steps require internet access. I'll go into networking later but for now, I just connected my system to a switch and did:@* # @strong{systemctl start dhcpcd.service}@* You can stop it later by running:@* # @strong{systemctl stop dhcpcd.service}@* For most people this should be enough, but if you don't have DHCP on your network then you should setup your network connection first:@* @ref{Setup a network connection in Parabola,Setup network connection in Parabola}
  3913. @menu
  3914. * Configure pacman::
  3915. * Updating Parabola::
  3916. * Maintaining Parabola::
  3917. * your-freedom::
  3918. * Add a user::
  3919. * systemd::
  3920. * Interesting repositories::
  3921. * Setup a network connection in Parabola::
  3922. * System Maintenance::
  3923. * Configuring the desktop::
  3924. @end menu
  3925. @node Configure pacman
  3926. @subsubsection Configure pacman
  3927. pacman (@strong{pac}kage @strong{man}ager) is the name of the package management system in Arch, which Parabola (as a deblobbed parallel effort) also uses. Like with 'apt-get' on debian-based systems like Trisquel, this can be used to add/remove and update the software on your computer.
  3928. Based on @uref{https://wiki.parabolagnulinux.org/Installation_Guide#Configure_pacman,https://wiki.parabolagnulinux.org/Installation_Guide#Configure_pacman} and from reading @uref{https://wiki.archlinux.org/index.php/Pacman,https://wiki.archlinux.org/index.php/Pacman} (make sure to read and understand this, it's very important) and @uref{https://wiki.parabolagnulinux.org/Official_Repositories,https://wiki.parabolagnulinux.org/Official_Repositories}
  3929. @node Updating Parabola
  3930. @subsubsection Updating Parabola
  3931. In the end, I didn't change my configuration for pacman. When you are updating, resync with the latest package names/versions:@* # @strong{pacman -Syy}@* (according to the wiki, -Syy is better than Sy because it refreshes the package list even if it appears to be up to date, which can be useful when switching to another mirror).@* Then, update the system:@* # @strong{pacman -Syu}
  3932. @strong{Before installing packages with 'pacman -S', always update first, using the notes above.}
  3933. Keep an eye out on the output, or read it in /var/log/pacman.log. Sometimes, pacman will show messages about maintenance steps that you will need to perform with certain files (typically configurations) after the update. Also, you should check both the Parabola and Arch home pages to see if they mention any issues. If a new kernel is installed, you should also update to be able to use it (the currently running kernel will also be fine). It's generally good enough to update Parabola once every week, or maybe twice. As a rolling release distribution, it's a good idea never to leave your install too outdated; update regularly. This is simply because of the way the project works; old packages are deleted from the repositories quickly, once they are updated. A system that hasn't been updated for quite a while will mean potentially more reading of previous posts through the website, and more maintenance work.
  3934. The Arch forum can also be useful, if others have the same issue as you (if you encounter issues, that is). The @emph{Parabola} IRC channel (#parabola on freenode) can also help you.
  3935. Due to this and the volatile nature of Parabola/Arch, you should only update when you have at least a couple hours of spare time in case of issues that need to be resolved. You should never update, for example, if you need your system for an important event, like a presentation or sending an email to an important person before an allocated deadline, and so on.
  3936. Relax - packages are well-tested regularly when new updates are made to the repositories. Separate 'testing' repositories exist for this exact reason. Despite what many people will tell you, Parabola is fairly stable and trouble-free, so long as you are aware of how to check for issues, and are willing to spend some time fixing issues in the rare event that they do occur.
  3937. @node Maintaining Parabola
  3938. @subsubsection Maintaining Parabola
  3939. Parabola is a very simple distro, in the sense that you are in full control and everything is made transparent to you. One consequence is that you also need to know what you are doing, and what you have done before. In general, keeping notes (such as what I have done with this page) can be very useful as a reference in the future (if you wanted to re-install it or install the distro on another computer, for example).
  3940. @c TODO: Itemize?
  3941. @menu
  3942. * Cleaning the package cache::
  3943. * pacman command equivalents::
  3944. @end menu
  3945. @node Cleaning the package cache
  3946. @ifinfo
  3947. @subsubheading Cleaning the package cache
  3948. @end ifinfo
  3949. @strong{The following is very important as you continue to use, update and maintain your Parabola system:@* @uref{https://wiki.archlinux.org/index.php/Pacman#Cleaning_the_package_cache,https://wiki.archlinux.org/index.php/Pacman#Cleaning_the_package_cache}. Essentially, this guide talks about a directory that has to be cleaned once in a while, to prevent it from growing too big (it's a cache of old package information, updated automatically when you do anything in pacman).}
  3950. To clean out all old packages that are cached:@* # @strong{pacman -Sc}
  3951. The wiki cautions that this should be used with care. For example, since older packages are deleted from the repo, if you encounter issues and want to revert back to an older package then it's useful to have the caches available. Only do this if you are sure that you won't need it.
  3952. The wiki also mentions this method for removing everything from the cache, including currently installed packages that are cached:@* # @strong{pacman -Scc}@* This is inadvisable, since it means re-downloading the package again if you wanted to quickly re-install it. This should only be used when disk space is at a premium.
  3953. @node pacman command equivalents
  3954. @ifinfo
  3955. @subsubheading pacman command equivalents
  3956. @end ifinfo
  3957. The following table lists other distro package manager commands, and their equivalent in pacman:@* @uref{https://wiki.archlinux.org/index.php/Pacman_Rosetta,https://wiki.archlinux.org/index.php/Pacman_Rosetta}
  3958. @node your-freedom
  3959. @subsubsection your-freedom
  3960. your-freedom is a package specific to Parabola, and it is installed by default. What it does is conflict with packages from Arch that are known to be non-free (proprietary) software. When migrating from Arch (there is a guide on the Parabola wiki for migrating - converting - an existing Arch system to a Parabola system), installing your-freedom will also fail if these packages are installed, citing them as conflicts; the recommended solution is then to delete the offending packages, and continue installing @emph{your-freedom}.
  3961. @node Add a user
  3962. @subsubsection Add a user
  3963. Based on @uref{https://wiki.archlinux.org/index.php/Users_and_Groups,https://wiki.archlinux.org/index.php/Users_and_Groups}.
  3964. It is important (for security reasons) to create and use a non-root (non-admin) user account for everyday use. The default 'root' account is intended only for critical administrative work, since it has complete access to the entire operating system.
  3965. Read the entire document linked to above, and then continue.
  3966. Add your user:@* # @strong{useradd -m -G wheel -s /bin/bash @emph{yourusername}}@* Set a password:@* # @strong{passwd @emph{yourusername}}
  3967. Use of the @emph{diceware method} is recommended, for generating secure passphrases (instead of passwords).
  3968. @node systemd
  3969. @subsubsection systemd
  3970. This is the name of the system used for managing services in Parabola. It is a good idea to become familiar with it. Read @uref{https://wiki.archlinux.org/index.php/systemd,https://wiki.archlinux.org/index.php/systemd} and @uref{https://wiki.archlinux.org/index.php/systemd#Basic_systemctl_usage,https://wiki.archlinux.org/index.php/systemd#Basic_systemctl_usage} to gain a full understanding. @strong{This is very important! Make sure to read them.}
  3971. An example of a 'service' could be a webserver (such as lighttpd), or sshd (openssh), dhcp, etc. There are countless others.
  3972. @uref{https://bbs.archlinux.org/viewtopic.php?pid=1149530#p1149530,https://bbs.archlinux.org/viewtopic.php?pid=1149530#p1149530} explains the background behind the decision by Arch (Parabola's upstream supplier) to use systemd.
  3973. The manpage should also help:@* # @strong{man systemd}@* The section on 'unit types' is especially useful.
  3974. According to the wiki, systemd 'journal' keeps logs of a size up to 10% of the total size your / partition takes up. on a 60GB root this would mean 6GB. That's not exactly practical, and can have performance implications later when the log gets too big. Based on instructions from the wiki, I will reduce the total size of the journal to 50MiB (the wiki recommends 50MiB).
  3975. Open /etc/systemd/journald.conf and find the line that says:@* @emph{#SystemMaxUse=}@* Change it to say:@* @emph{SystemMaxUse=50M}
  3976. The wiki also recommended a method for forwarding journal output to TTY 12 (accessible by pressing ctrl+alt+f12, and you use ctrl+alt+[F1-F12] to switch between terminals). I decided not to enable it.
  3977. Restart journald:@* # @strong{systemctl restart systemd-journald}
  3978. The wiki recommends that if the journal gets too large, you can also simply delete (rm -Rf) everything inside /var/log/journald/* but recommends backing it up. This shouldn't be necessary, since you already set the size limit above and systemd will automatically start to delete older records when the journal size reaches it's limit (according to systemd developers).
  3979. Finally, the wiki mentions 'temporary' files and the utility for managing them.@* # @strong{man systemd-tmpfiles}@* The command for 'clean' is:@* # @strong{systemd-tmpfiles --clean}@* According to the manpage, this @emph{"cleans all files and directories with an age parameter"}. According to the Arch wiki, this reads information in /etc/tmpfiles.d/ and /usr/lib/tmpfiles.d/ to know what actions to perform. Therefore, it is a good idea to read what's stored in these locations to get a better understanding.
  3980. I looked in /etc/tmpfiles.d/ and found that it was empty on my system. However, /usr/lib/tmpfiles.d/ contained some files. The first one was etc.conf, containing information and a reference to this manpage:@* # @strong{man tmpfiles.d}@* Read that manpage, and then continue studying all the files.
  3981. The systemd developers tell me that it isn't usually necessary to touch the systemd-tmpfiles utility manually at all.
  3982. @node Interesting repositories
  3983. @subsubsection Interesting repositories
  3984. Parabola wiki at @uref{https://wiki.parabolagnulinux.org/Repositories#kernels,https://wiki.parabolagnulinux.org/Repositories#kernels} mentions about a repository called [kernels] for custom kernels that aren't in the default base. It might be worth looking into what is available there, depending on your use case.
  3985. I enabled it on my system, to see what was in it. Edit /etc/pacman.conf and below the 'extra' section add:@* @emph{[kernels]@* Include = /etc/pacman.d/mirrorlist}
  3986. Now sync with the repository:@* # @strong{pacman -Syy}
  3987. List all available packages in this repository:@* # @strong{pacman -Sl kernels}
  3988. In the end, I decided not to install anything from it but I kept the repository enabled regardless.
  3989. @node Setup a network connection in Parabola
  3990. @subsubsection Setup a network connection in Parabola
  3991. Read @uref{https://wiki.archlinux.org/index.php/Configuring_Network,https://wiki.archlinux.org/index.php/Configuring_Network}.
  3992. @menu
  3993. * Set the hostname::
  3994. * Network Status::
  3995. * Network device names::
  3996. * Network setup::
  3997. @end menu
  3998. @node Set the hostname
  3999. @ifinfo
  4000. @subsubheading Set the hostname
  4001. @end ifinfo
  4002. This should be the same as the hostname that you set in /etc/hostname when installing Parabola. You can also do it with systemd (do so now, if you like):@* # @strong{hostnamectl set-hostname @emph{yourhostname}}@* This writes the specified hostname to /etc/hostname. More information can be found in these manpages:@* # @strong{man hostname}@* # @strong{info hostname}@* # @strong{man hostnamectl}
  4003. Add the same hostname to /etc/hosts, on each line. Example:@* @emph{127.0.0.1 localhost.localdomain localhost myhostname@* ::1 localhost.localdomain localhost myhostname}
  4004. You'll note that I set both lines; the 2nd line is for IPv6. More and more ISPs are providing this now (mine does) so it's good to be forward-thinking here.
  4005. The @emph{hostname} utility is part of the @emph{inetutils} package and is in core/, installed by default (as part of @emph{base}).
  4006. @node Network Status
  4007. @ifinfo
  4008. @subsubheading Network Status
  4009. @end ifinfo
  4010. According to the Arch wiki, @uref{https://wiki.archlinux.org/index.php/Udev,udev} should already detect the ethernet chipset and load the driver for it automatically at boot time. You can check this in the @emph{"Ethernet controller"} section when running this command:@* # @strong{lspci -v}
  4011. Look at the remaining sections @emph{'Kernel driver in use'} and @emph{'Kernel modules'}. In my case it was as follows:@* @emph{Kernel driver in use: e1000e@* Kernel modules: e1000e}
  4012. Check that the driver was loaded by issuing @emph{dmesg | grep module_name}. In my case, I did:@* # @strong{dmesg | grep e1000e}
  4013. @node Network device names
  4014. @ifinfo
  4015. @subsubheading Network device names
  4016. @end ifinfo
  4017. According to @uref{https://wiki.archlinux.org/index.php/Configuring_Network#Device_names,https://wiki.archlinux.org/index.php/Configuring_Network#Device_names}, it is important to note that the old interface names like eth0, wlan0, wwan0 and so on no longer apply. Instead, @emph{systemd} creates device names starting with en (for enternet), wl (for wifi) and ww (for wwan) with a fixed identifier that systemd automatically generates. An example device name for your ethernet chipset would be @emph{enp0s25}, where it is never supposed to change.
  4018. If you want to enable the old names (eth0, wlan0, wwan0, etc), the Arch wiki recommends adding @emph{net.ifnames=0} to your kernel parameters (in libreboot context, this would be accomplished by following the instructions in @ref{How to replace the default GRUB configuration file on a libreboot system,grub_cbfs}).
  4019. For background information, read @uref{http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/,Predictable Network Interface Names}
  4020. Show device names:@* # @strong{ls /sys/class/net}
  4021. Changing the device names is possible (I chose not to do it):@* @uref{https://wiki.archlinux.org/index.php/Configuring_Network#Change_device_name,https://wiki.archlinux.org/index.php/Configuring_Network#Change_device_name}
  4022. @node Network setup
  4023. @ifinfo
  4024. @subsubheading Network setup
  4025. @end ifinfo
  4026. I actually chose to ignore most of Networking section on the wiki. Instead, I plan to set up LXDE desktop with the graphical network-manager client. Here is a list of network managers:@* @uref{https://wiki.archlinux.org/index.php/List_of_applications/Internet#Network_managers,https://wiki.archlinux.org/index.php/List_of_applications/Internet#Network_managers}. If you need to, set a static IP address (temporarily) using the networking guide and the Arch wiki, or start the dhcpcd service in systemd. NetworkManager will be setup later, after installing LXDE.
  4027. @node System Maintenance
  4028. @subsubsection System Maintenance
  4029. Read @uref{https://wiki.archlinux.org/index.php/System_maintenance,https://wiki.archlinux.org/index.php/System_maintenance} before continuing. Also read @uref{https://wiki.archlinux.org/index.php/Enhance_system_stability,https://wiki.archlinux.org/index.php/Enhance_system_stability}. @strong{This is important, so make sure to read them!}
  4030. Install smartmontools (it can be used to check smart data. HDDs use non-free firmware inside, but it's transparent to you but the smart data comes from it. Therefore, don't rely on it too much):@* # @strong{pacman -S smartmontools}@* Read @uref{https://wiki.archlinux.org/index.php/S.M.A.R.T.,https://wiki.archlinux.org/index.php/S.M.A.R.T.} to learn how to use it.
  4031. @node Configuring the desktop
  4032. @subsubsection Configuring the desktop
  4033. Based on steps from @uref{https://wiki.archlinux.org/index.php/General_recommendations#Graphical_user_interface,General Recommendations} on the Arch wiki. The plan is to use LXDE and LXDM/LightDM, along with everything else that you would expect on other distributions that provide LXDE by default.
  4034. @menu
  4035. * Installing Xorg::
  4036. * Xorg keyboard layout::
  4037. * Install LXDE::
  4038. * LXDE - clock::
  4039. * LXDE - font::
  4040. * LXDE - screenlock::
  4041. * LXDE - automounting::
  4042. * LXDE - disable suspend::
  4043. * LXDE - battery monitor::
  4044. * LXDE - Network Manager::
  4045. @end menu
  4046. @node Installing Xorg
  4047. @ifinfo
  4048. @subsubheading Installing Xorg
  4049. @end ifinfo
  4050. Based on @uref{https://wiki.archlinux.org/index.php/Xorg,https://wiki.archlinux.org/index.php/Xorg}.
  4051. Firstly, install it!@* # @strong{pacman -S xorg-server}@* I also recommend installing this (contains lots of useful tools, including @emph{xrandr}):@* # @strong{pacman -S xorg-server-utils}
  4052. Install the driver. For me this was @emph{xf86-video-intel} on the ThinkPad X60. T60 and macbook11/21 should be the same.@* # @strong{pacman -S xf86-video-intel}@* For other systems you can try:@* # @strong{pacman -Ss xf86-video- | less}@* Combined with looking at your @emph{lspci} output, you can determine which driver is needed. By default, Xorg will revert to xf86-video-vesa which is a generic driver and doesn't provide true hardware acceleration.
  4053. Other drivers (not just video) can be found by looking at the @emph{xorg-drivers} group:@* # @strong{pacman -Sg xorg-drivers}@*
  4054. Mostly you will rely on a display manager, but in case you ever want to start X without one:@* # @strong{pacman -S xorg-xinit}
  4055. <optional>@* @ @ @ Arch wiki recommends installing these, for testing that X works:@* @ @ @ # @strong{pacman -S xorg-twm xorg-xclock xterm}@* @ @ @ Refer to @uref{https://wiki.archlinux.org/index.php/Xinitrc,https://wiki.archlinux.org/index.php/Xinitrc}. and test X:@* @ @ @ # @strong{startx}@* @ @ @ When you are satisfied, type @strong{@emph{exit}} in xterm, inside the X session.@* @ @ @ Uninstall them (clutter. eww): # @strong{pacman -S xorg-xinit xorg-twm xorg-xclock xterm}@* </optional> @c TODO: Should be pacman -Rs?
  4056. @node Xorg keyboard layout
  4057. @ifinfo
  4058. @subsubheading Xorg keyboard layout
  4059. @end ifinfo
  4060. Refer to @uref{https://wiki.archlinux.org/index.php/Keyboard_configuration_in_Xorg,https://wiki.archlinux.org/index.php/Keyboard_configuration_in_Xorg}.
  4061. Xorg uses a different configuration method for keyboard layouts, so you will notice that the layout you set in /etc/vconsole.conf earlier might not actually be the same in X.
  4062. To see what layout you currently use, try this on a terminal emulator in X:@* # @strong{setxkbmap -print -verbose 10}
  4063. In my case, I wanted to use the Dvorak (UK) keyboard which is quite different from Xorg's default Qwerty (US) layout.
  4064. I'll just say it now: @emph{XkbModel} can be @emph{pc105} in this case (ThinkPad X60, with a 105-key UK keyboard). If you use an American keyboard (typically 104 keys) you will want to use @emph{pc104}.
  4065. @emph{XkbLayout} in my case would be @emph{gb}, and @emph{XkbVariant} would be @emph{dvorak}.
  4066. The Arch wiki recommends two different methods for setting the keyboard layout:@* @uref{https://wiki.archlinux.org/index.php/Keyboard_configuration_in_Xorg#Using_X_configuration_files,https://wiki.archlinux.org/index.php/Keyboard_configuration_in_Xorg#Using_X_configuration_files} and@* @uref{https://wiki.archlinux.org/index.php/Keyboard_configuration_in_Xorg#Using_localectl,https://wiki.archlinux.org/index.php/Keyboard_configuration_in_Xorg#Using_localectl}.
  4067. In my case, I chose to use the @emph{configuration file} method:@* Create the file /etc/X11/xorg.conf.d/10-keyboard.conf and put this inside:@* @emph{Section "InputClass"@* @ @ @ @ @ @ @ @ Identifier "system-keyboard"@* @ @ @ @ @ @ @ @ MatchIsKeyboard "on"@* @ @ @ @ @ @ @ @ Option "XkbLayout" "gb"@* @ @ @ @ @ @ @ @ Option "XkbModel" "pc105"@* @ @ @ @ @ @ @ @ Option "XkbVariant" "dvorak"@* EndSection}
  4068. For you, the steps above may differ if you have a different layout. If you use a US Qwerty keyboard, then you don't even need to do anything (though it might help, for the sake of being explicit).
  4069. @node Install LXDE
  4070. @ifinfo
  4071. @subsubheading Install LXDE
  4072. @end ifinfo
  4073. Desktop choice isn't that important to me, so for simplicity I decided to use LXDE. It's lightweight and does everything that I need. If you would like to try something different, refer to @uref{https://wiki.archlinux.org/index.php/Desktop_environment,https://wiki.archlinux.org/index.php/Desktop_environment}
  4074. Refer to @uref{https://wiki.archlinux.org/index.php/LXDE,https://wiki.archlinux.org/index.php/LXDE}.
  4075. Install it, choosing 'all' when asked for the default package list:@* # @strong{pacman -S lxde obconf}
  4076. I didn't want the following, so I removed them:@* # @strong{pacman -R lxmusic lxtask}
  4077. I also lazily installed all fonts:@* # @strong{pacman -S $(pacman -Ssq ttf-)}
  4078. LXDE comes with a terminal. You probably want a browser to go with that; I choose GNU IceCat, part of the @emph{@uref{https://gnu.org/,GNU project}}:@* # @strong{pacman -S icecat}@* And a mail client:@* # @strong{pacman -S icedove}
  4079. In IceCat, go to @emph{Preferences :: Advanced} and disable @emph{GNU IceCat Health Report}.
  4080. I also like to install these:@* # @strong{pacman -S xsensors stress htop}
  4081. Enable LXDM (the default display manager, providing a graphical login):@* # @strong{systemctl enable lxdm.service}@* It will start when you boot up the system. To start it now, do:@* # @strong{systemctl start lxdm.service}
  4082. Log in with your standard (non-root) user that you created earlier. It is advisable to also create an xinitrc rule in case you ever want to start lxde without lxdm. Read @uref{https://wiki.archlinux.org/index.php/Xinitrc,https://wiki.archlinux.org/index.php/Xinitrc}.
  4083. Open LXterminal:@* $ @strong{cp /etc/skel/.xinitrc ~}@* Open .xinitrc and add the following plus a line break at the bottom of the file.@* @emph{# Probably not needed. The same locale info that we set before@* # Based on advice from the LXDE wiki export LC_ALL=en_GB.UTF-8@* export LANGUAGE=en_GB.UTF-8@* export LANG=en_GB.UTF-8@* @* # Start lxde desktop@* exec startlxde@*} Now make sure that it is executable:@* $ @strong{chmod +x .xinitrc}
  4084. @node LXDE - clock
  4085. @ifinfo
  4086. @subsubheading LXDE - clock
  4087. @end ifinfo
  4088. In @strong{Digital Clock Settings} (right click the clock) I set the Clock Format to @emph{%Y/%m/%d %H:%M:%S}
  4089. @node LXDE - font
  4090. @ifinfo
  4091. @subsubheading LXDE - font
  4092. @end ifinfo
  4093. NOTE TO SELF: come back to this later.
  4094. @node LXDE - screenlock
  4095. @ifinfo
  4096. @subsubheading LXDE - screenlock
  4097. @end ifinfo
  4098. Arch wiki recommends to use @emph{xscreensaver}:@* # @strong{pacman -S xscreensaver}
  4099. Under @emph{Preferences :: Screensaver} in the LXDE menu, I chose @emph{Mode: Blank Screen Only}, setting @emph{Blank After}, @emph{Cycle After} and @emph{Lock Screen After} (checked) to 10 minutes.
  4100. You can now lock the screen with @emph{Logout :: Lock Screen} in the LXDE menu.
  4101. @node LXDE - automounting
  4102. @ifinfo
  4103. @subsubheading LXDE - automounting
  4104. @end ifinfo
  4105. Refer to @uref{https://wiki.archlinux.org/index.php/File_manager_functionality,https://wiki.archlinux.org/index.php/File_manager_functionality}.
  4106. I chose to ignore this for now. NOTE TO SELF: come back to this later.
  4107. @node LXDE - disable suspend
  4108. @ifinfo
  4109. @subsubheading LXDE - disable suspend
  4110. @end ifinfo
  4111. When closing the laptop lid, the system suspends. This is annoying at least to me. NOTE TO SELF: disable it, then document the steps here.
  4112. @node LXDE - battery monitor
  4113. @ifinfo
  4114. @subsubheading LXDE - battery monitor
  4115. @end ifinfo
  4116. Right click lxde panel and @emph{Add/Remove Panel Items}. Click @emph{Add} and select @emph{Battery Monitor}, then click @emph{Add}. Close and then right-click the applet and go to @emph{Battery Monitor Settings}, check the box that says @emph{Show Extended Information}. Now click @emph{Close}. When you hover the cursor over it, it'll show information about the battery.
  4117. @node LXDE - Network Manager
  4118. @ifinfo
  4119. @subsubheading LXDE - Network Manager
  4120. @end ifinfo
  4121. Refer to @uref{https://wiki.archlinux.org/index.php/LXDE#Network_Management,https://wiki.archlinux.org/index.php/LXDE#Network_Management}. Then I read: @uref{https://wiki.archlinux.org/index.php/NetworkManager,https://wiki.archlinux.org/index.php/NetworkManager}.
  4122. Install Network Manager:@* # @strong{pacman -S networkmanager}
  4123. You will also want the graphical applet:@* # @strong{pacman -S network-manager-applet}@* Arch wiki says that an autostart rule will be written at @emph{/etc/xdg/autostart/nm-applet.desktop}
  4124. I want to be able to use a VPN at some point, so the wiki tells me to do:@* # @strong{pacman -S networkmanager-openvpn}
  4125. LXDE uses openbox, so I refer to:@* @uref{https://wiki.archlinux.org/index.php/NetworkManager#Openbox,https://wiki.archlinux.org/index.php/NetworkManager#Openbox}.
  4126. It tells me for the applet I need:@* # @strong{pacman -S xfce4-notifyd gnome-icon-theme}@* Also, for storing authentication details (wifi) I need:@* # @strong{pacman -S gnome-keyring}
  4127. I wanted to quickly enable networkmanager:@* # @strong{systemctl stop dhcpcd}@* # @strong{systemctl start NetworkManager}@* Enable NetworkManager at boot time:@* # @strong{systemctl enable NetworkManager}
  4128. Restart LXDE (log out, and then log back in).
  4129. I added the volume control applet to the panel (right click panel, and add a new applet). I also later changed the icons to use the gnome icon theme, in @emph{lxappearance}.
  4130. @node Installing Trisquel GNU/Linux-libre with full disk encryption
  4131. @subsection Installing Trisquel GNU/Linux-libre with full disk encryption (including /boot)
  4132. Libreboot on x86 uses the GRUB @uref{http://www.coreboot.org/Payloads#GRUB_2,payload} by default, which means that the GRUB configuration file (where your GRUB menu comes from) is stored directly alongside libreboot and its GRUB payload executable, inside the flash chip. In context, this means that installing distributions and managing them is handled slightly differently compared to traditional BIOS systems.
  4133. On most systems, the /boot partition has to be left unencrypted while the others are encrypted. This is so that GRUB, and therefore the kernel, can be loaded and executed since the firmware can't open a LUKS volume. Not so with libreboot! Since GRUB is already included directly as a payload, even /boot can be encrypted. This protects /boot from tampering by someone with physical access to the system.
  4134. This works in Trisquel 7, and probably Trisquel 6. Boot the 'net installer' (Install Trisquel in Text Mode). @uref{How to install GNU/Linux on a libreboot system,How to boot a GNU/Linux installer}.
  4135. NOTE: When finishing implementing this setup, if the boot stalls when running cryptomount -a, try removing the DVD drive (on thinkpads).
  4136. @strong{This guide is *only* for the GRUB payload. If you use the depthcharge payload, ignore this section entirely.}
  4137. Set a strong user password (lots of lowercase/uppercase, numbers and symbols).
  4138. Use of the @emph{diceware method} is recommended, for generating secure passphrases (instead of passwords).
  4139. When the installer asks you to set up encryption (ecryptfs) for your home directory, select 'Yes' if you want to: @strong{LUKS is already secure and performs well. Having ecryptfs on top of it will add noticeable performance penalty, for little security gain in most use cases. This is therefore optional, and not recommended. Choose 'no'.}
  4140. @strong{Your user password should be different from the LUKS password which you will set later on. Your LUKS password should, like the user password, be secure.}
  4141. @menu
  4142. * Partitioning::
  4143. * Further partitioning::
  4144. * Kernel::
  4145. * Tasksel::
  4146. * Postfix configuration::
  4147. * Install the GRUB boot loader to the master boot record::
  4148. * Clock UTC::
  4149. * Booting your system::
  4150. * ecryptfs::
  4151. * Modify grubcfg CBFS::
  4152. * Troubleshooting Trisquel::
  4153. @end menu
  4154. @node Partitioning
  4155. @subsubsection Partitioning
  4156. Choose 'Manual' partitioning:
  4157. @itemize
  4158. @item
  4159. Select drive and create new partition table
  4160. @item
  4161. Single large partition. The following are mostly defaults:
  4162. @itemize
  4163. @item
  4164. Use as: physical volume for encryption
  4165. @item
  4166. Encryption: aes
  4167. @item
  4168. key size: 256
  4169. @item
  4170. IV algorithm: xts-plain64
  4171. @item
  4172. Encryption key: passphrase
  4173. @item
  4174. erase data: Yes (only choose 'No' if it's a new drive that doesn't contain your private data)
  4175. @end itemize
  4176. @item
  4177. Select 'configure encrypted volumes'
  4178. @itemize
  4179. @item
  4180. Create encrypted volumes
  4181. @item
  4182. Select your partition
  4183. @item
  4184. Finish
  4185. @item
  4186. Really erase: Yes
  4187. @item
  4188. (erase will take a long time. be patient)
  4189. @item
  4190. (if your old system was encrypted, just let this run for about a minute to make sure that the LUKS header is wiped out)
  4191. @end itemize
  4192. @item
  4193. Select encrypted space:
  4194. @itemize
  4195. @item
  4196. use as: physical volume for LVM
  4197. @item
  4198. Choose 'done setting up the partition'
  4199. @end itemize
  4200. @item
  4201. Configure the logical volume manager:
  4202. @itemize
  4203. @item
  4204. Keep settings: Yes
  4205. @end itemize
  4206. @item
  4207. Create volume group:
  4208. @itemize
  4209. @item
  4210. Name: @strong{matrix} (you can use whatever you want here, this is just an example)
  4211. @item
  4212. Select crypto partition
  4213. @end itemize
  4214. @item
  4215. Create logical volume
  4216. @itemize
  4217. @item
  4218. select @strong{matrix} (or whatever you named it before)
  4219. @item
  4220. name: @strong{root} (you can use whatever you want here, this is just an example)
  4221. @item
  4222. size: default, minus 2048 MB
  4223. @end itemize
  4224. @item
  4225. Create logical volume
  4226. @itemize
  4227. @item
  4228. select @strong{matrix} (or whatever you named it before)
  4229. @item
  4230. name: @strong{swap} (you can use whatever you want here, this is just an example)
  4231. @item
  4232. size: press enter
  4233. @end itemize
  4234. @end itemize
  4235. @node Further partitioning
  4236. @subsubsection Further partitioning
  4237. Now you are back at the main partitioning screen. You will simply set mountpoints and filesystems to use.
  4238. @itemize
  4239. @item
  4240. LVM LV root
  4241. @itemize
  4242. @item
  4243. use as: ext4
  4244. @item
  4245. mount point: /
  4246. @item
  4247. done setting up partition
  4248. @end itemize
  4249. @item
  4250. LVM LV swap
  4251. @itemize
  4252. @item
  4253. use as: swap area
  4254. @item
  4255. done setting up partition
  4256. @end itemize
  4257. @item
  4258. Now you select 'Finished partitioning and write changes to disk'.
  4259. @end itemize
  4260. @node Kernel
  4261. @subsubsection Kernel
  4262. Installation will ask what kernel you want to use. linux-generic is fine.
  4263. @node Tasksel
  4264. @subsubsection Tasksel
  4265. Choose @emph{"Trisquel Desktop Environment"} if you want GNOME, @emph{"Trisquel-mini Desktop Environment"} if you want LXDE or @emph{"Triskel Desktop Environment"} if you want KDE. If you want to have no desktop (just a basic shell) when you boot or if you want to create your own custom setup, then choose nothing here (don't select anything). You might also want to choose some of the other package groups; it's up to you.
  4266. @node Postfix configuration
  4267. @subsubsection Postfix configuration
  4268. If asked, choose @emph{"No Configuration"} here (or maybe you want to select something else. It's up to you.)
  4269. @node Install the GRUB boot loader to the master boot record
  4270. @subsubsection Install the GRUB boot loader to the master boot record
  4271. Choose 'Yes'. It will fail, but don't worry. Then at the main menu, choose 'Continue without a bootloader'. You could also choose 'No'. Choice is irrelevant here.
  4272. @emph{You do not need to install GRUB at all, since in libreboot you are using the GRUB payload (for libreboot) to boot your system directly.}
  4273. @node Clock UTC
  4274. @subsubsection Clock UTC
  4275. Just say 'Yes'.
  4276. @node Booting your system
  4277. @subsubsection Booting your system
  4278. At this point, you will have finished the installation. At your GRUB payload, press C to get to the command line.
  4279. Do that:@* grub> @strong{cryptomount -a}@* grub> @strong{set root='lvm/matrix-root'}@* grub> @strong{linux /vmlinuz root=/dev/mapper/matrix-root cryptdevice=/dev/mapper/matrix-root:root}@* grub> @strong{initrd /initrd.img}@* grub> @strong{boot}
  4280. @node ecryptfs
  4281. @subsubsection ecryptfs
  4282. If you didn't encrypt your home directory, then you can safely ignore this section.
  4283. Immediately after logging in, do that:@* $ @strong{sudo ecryptfs-unwrap-passphrase}
  4284. This will be needed in the future if you ever need to recover your home directory from another system, so write it down and keep the note somewhere secret. Ideally, you should memorize it and then burn the note (or not even write it down, and memorize it still)>
  4285. @node Modify grubcfg CBFS
  4286. @subsubsection Modify grub.cfg (CBFS)
  4287. Now you need to set it up so that the system will automatically boot, without having to type a bunch of commands.
  4288. Modify your grub.cfg (in the firmware) @ref{How to replace the default GRUB configuration file on a libreboot system,using this tutorial}; just change the default menu entry 'Load Operating System' to say this inside:
  4289. @strong{cryptomount -a}@* @strong{set root='lvm/matrix-root'}@* @strong{linux /vmlinuz root=/dev/mapper/matrix-root cryptdevice=/dev/mapper/matrix-root:root}@* @strong{initrd /initrd.img}
  4290. Without specifying a device, the @emph{-a} parameter tries to unlock all detected LUKS volumes. You can also specify -u UUID or -a (device).
  4291. Additionally, you should set a GRUB password. This is not your LUKS password, but it's a password that you have to enter to see GRUB. This protects your system from an attacker simply booting a live USB and re-flashing your firmware. @strong{This should be different than your LUKS passphrase and user password.}
  4292. Use of the @emph{diceware method} is recommended, for generating secure passphrases (as opposed to passwords).
  4293. The GRUB utility can be used like so:@* $ @strong{grub-mkpasswd-pbkdf2}
  4294. Give it a password (remember, it has to be secure) and it'll output something like:@* @strong{grub.pbkdf2.sha512.10000.711F186347156BC105CD83A2ED7AF1EB971AA2B1EB2640172F34B0DEFFC97E654AF48E5F0C3B7622502B76458DA494270CC0EA6504411D676E6752FD1651E749.8DD11178EB8D1F633308FD8FCC64D0B243F949B9B99CCEADE2ECA11657A757D22025986B0FA116F1D5191E0A22677674C994EDBFADE62240E9D161688266A711}
  4295. Use of the @emph{diceware method} is recommended, for generating secure passphrases (instead of passwords).
  4296. Put that in the grub.cfg (the one for CBFS inside the ROM) before the 'Load Operating System' menu entry like so (example):@*
  4297. @verbatim
  4298. set superusers="root"
  4299. password_pbkdf2 root grub.pbkdf2.sha512.10000.711F186347156BC105CD83A2ED7AF1EB971AA2B1EB2640172F34B0DEFFC97E654AF48E5F0C3B7622502B76458DA494270CC0EA6504411D676E6752FD1651E749.8DD11178EB8D1F633308FD8FCC64D0B243F949B9B99CCEADE2ECA11657A757D22025986B0FA116F1D5191E0A22677674C994EDBFADE62240E9D161688266A711
  4300. @end verbatim
  4301. MAKE SURE TO DO THIS ON grubtest.cfg *BEFORE* DOING IT ON grub.cfg. Then select the menu entry that says @emph{Switch to grubtest.cfg} and test that it works. Then copy that to grub.cfg once you're satisfied. WHY? BECAUSE AN INCORRECTLY SET PASSWORD CONFIG MEANS YOU CAN'T AUTHENTICATE, WHICH MEANS 'BRICK'.
  4302. (emphasis added, because it's needed. This is a common roadblock for users)
  4303. Obviously, replace it with the correct hash that you actually got for the password that you entered. Meaning, not the hash that you see above!
  4304. After this, you will have a modified ROM with the menu entry for cryptomount, and the entry before that for the GRUB password. Flash the modified ROM using @ref{How to update/install,this tutorial}.
  4305. @node Troubleshooting Trisquel
  4306. @subsubsection Troubleshooting Trisquel
  4307. A user reported issues when booting with a docking station attached on an X200, when decrypting the disk in GRUB. The error @emph{AHCI transfer timed out} was observed. The workaround was to remove the docking station.
  4308. Further investigation revealed that it was the DVD drive causing problems. Removing that worked around the issue.
  4309. @verbatim
  4310. "sudo wodim -prcap" shows information about the drive:
  4311. Device was not specified. Trying to find an appropriate drive...
  4312. Detected CD-R drive: /dev/sr0
  4313. Using /dev/cdrom of unknown capabilities
  4314. Device type : Removable CD-ROM
  4315. Version : 5
  4316. Response Format: 2
  4317. Capabilities :
  4318. Vendor_info : 'HL-DT-ST'
  4319. Identification : 'DVDRAM GU10N '
  4320. Revision : 'MX05'
  4321. Device seems to be: Generic mmc2 DVD-R/DVD-RW.
  4322. Drive capabilities, per MMC-3 page 2A:
  4323. Does read CD-R media
  4324. Does write CD-R media
  4325. Does read CD-RW media
  4326. Does write CD-RW media
  4327. Does read DVD-ROM media
  4328. Does read DVD-R media
  4329. Does write DVD-R media
  4330. Does read DVD-RAM media
  4331. Does write DVD-RAM media
  4332. Does support test writing
  4333. Does read Mode 2 Form 1 blocks
  4334. Does read Mode 2 Form 2 blocks
  4335. Does read digital audio blocks
  4336. Does restart non-streamed digital audio reads accurately
  4337. Does support Buffer-Underrun-Free recording
  4338. Does read multi-session CDs
  4339. Does read fixed-packet CD media using Method 2
  4340. Does not read CD bar code
  4341. Does not read R-W subcode information
  4342. Does read raw P-W subcode data from lead in
  4343. Does return CD media catalog number
  4344. Does return CD ISRC information
  4345. Does support C2 error pointers
  4346. Does not deliver composite A/V data
  4347. Does play audio CDs
  4348. Number of volume control levels: 256
  4349. Does support individual volume control setting for each channel
  4350. Does support independent mute setting for each channel
  4351. Does not support digital output on port 1
  4352. Does not support digital output on port 2
  4353. Loading mechanism type: tray
  4354. Does support ejection of CD via START/STOP command
  4355. Does not lock media on power up via prevent jumper
  4356. Does allow media to be locked in the drive via PREVENT/ALLOW command
  4357. Is not currently in a media-locked state
  4358. Does not support changing side of disk
  4359. Does not have load-empty-slot-in-changer feature
  4360. Does not support Individual Disk Present feature
  4361. Maximum read speed: 4234 kB/s (CD 24x, DVD 3x)
  4362. Current read speed: 4234 kB/s (CD 24x, DVD 3x)
  4363. Maximum write speed: 4234 kB/s (CD 24x, DVD 3x)
  4364. Current write speed: 4234 kB/s (CD 24x, DVD 3x)
  4365. Rotational control selected: CLV/PCAV
  4366. Buffer size in KB: 1024
  4367. Copy management revision supported: 1
  4368. Number of supported write speeds: 4
  4369. Write speed # 0: 4234 kB/s CLV/PCAV (CD 24x, DVD 3x)
  4370. Write speed # 1: 2822 kB/s CLV/PCAV (CD 16x, DVD 2x)
  4371. Write speed # 2: 1764 kB/s CLV/PCAV (CD 10x, DVD 1x)
  4372. Write speed # 3: 706 kB/s CLV/PCAV (CD 4x, DVD 0x)
  4373. Supported CD-RW media types according to MMC-4 feature 0x37:
  4374. Does write multi speed CD-RW media
  4375. Does write high speed CD-RW media
  4376. Does write ultra high speed CD-RW media
  4377. Does not write ultra high speed+ CD-RW media
  4378. @end verbatim
  4379. @node Git
  4380. @section Git
  4381. @c TODO: Add some text here that connects these two things
  4382. @menu
  4383. * Building libreboot from source::
  4384. * Maintaining libreboot::
  4385. @end menu
  4386. @node Building libreboot from source
  4387. @subsection Building libreboot from source
  4388. This section relates to building libreboot from source, and working with the git repository.
  4389. @menu
  4390. * Install build dependencies::
  4391. * Get the full source code from metadata::
  4392. * How to build bucts for LenovoBIOS X60/X60S/X60T/T60::
  4393. * How to build flashrom::
  4394. * Configuring libreboot::
  4395. * How to build the ROM images::
  4396. @end menu
  4397. @node Install build dependencies
  4398. @subsubsection Install build dependencies
  4399. For Trisquel 7, you can run the following command:@* $ @strong{sudo ./build dependencies trisquel7}
  4400. For Parabola, you can run the following command:@* $ @strong{sudo ./build dependencies parabola}@* or:@* # @strong{./build dependencies parabola}
  4401. For other GNU/Linux distributions, you can adapt the existing scripts.
  4402. @node Get the full source code from metadata
  4403. @subsubsection Get the full source code from metadata (git clone)
  4404. If you downloaded libreboot from git, then there are some steps to download and patch the source code for all relevant dependencies. The archive in the git repository used to be available as a tarball called 'libreboot_meta.tar.gz'. It contains 'metadata' (scripts) which define how the source was created (where it came from).
  4405. You can use the scripts included to download everything.
  4406. First, @ref{Install build dependencies,install the build dependencies}.
  4407. Since libreboot makes extensive use of git, you need to configure git properly. If you have not yet configured git, then the minimum requirement is:@* $ @strong{git config --global user.name ``Your Name''}@* $ @strong{git config --global user.email your@@emailaddress.com}@* This is what will also appear in git logs if you ever commit your own changes to a given repository. For more information, see @uref{http://git-scm.com/doc,http://git-scm.com/doc}.
  4408. Another nice config for you (optional, but recommended):@* $ @strong{git config --global core.editor nano}@* $ @strong{git config --global color.status auto}@* $ @strong{git config --global color.branch auto}@* $ @strong{git config --global color.interactive auto}@* $ @strong{git config --global color.diff auto}
  4409. After that, run the script:@* $ @strong{./download all}
  4410. What this did was download everything (grub, coreboot, memtest86+, bucts, flashrom) at the versions last tested for this release, and patch them. Read the script in a text editor to learn more.
  4411. To build the ROM images, see @ref{How to build the ROM images,build}.
  4412. @node How to build bucts for LenovoBIOS X60/X60S/X60T/T60
  4413. @subsubsection How to build ``bucts'' (for LenovoBIOS X60/X60S/X60T/T60)
  4414. @strong{This is for Lenovo BIOS users on the ThinkPad X60/X60S, X60 Tablet and T60. If you have coreboot or libreboot running already, ignore this.}
  4415. BUC.TS isn't really specific to these laptops, but is a bit inside the a register in the chipset on some Intel systems.
  4416. Bucts is needed when flashing in software the X60/X60S/X60T/T60 ROM while Lenovo BIOS is running; external flashing will be safe regardless. Each ROM contains identical data inside the two final 64K region in the file*. This corresponds to the final two 64K regions in the flash chip. Lenovo BIOS will prevent you from writing the final one, so running ``@strong{bucts 1}'' will set the system to boot from the other block instead (which is writeable along with everything beneath it when using a patched flashrom. see @ref{How to build flashrom,build_flashrom}). After shutting down and booting up after the first flash of libreboot, the final 64K block is writeable so you flash the ROM again with an unpatched flashrom and run ``@strong{bucts 0}'' to make the system boot from the normal (highest) block again.
  4417. *Libreboot ROM images have identical data in those two 64KiB regions because dd is used to do that, by the build system. If you're building from upstream (coreboot), you have to do it manually.
  4418. BUC.TS is backed up (powered) by the NVRAM battery (or CMOS battery, as some people call it). On thinkpads, this is typically in a yellow plastic package with the battery inside, connected via power lines to the mainboard. Removing that battery removes power to BUC.TS, resetting the bit back to 0 (if you previously set it to 1).
  4419. ``BUC'' means ``@strong{B}ack@strong{u}p @strong{C}ontrol'' (it's a register) and ``TS'' means ``@strong{T}op @strong{S}wap'' (it's a status bit). Hence ``bucts'' (BUC.TS). TS 1 and TS 0 corresponds to bucts 1 and bucts 0.
  4420. If you have the binary release archive, you'll find executables under ./bucts/. Otherwise if you need to build from source, continue reading.
  4421. First, @ref{Install build dependencies,install the build dependencies}.
  4422. To build bucts, do this in the main directory:@* $ @strong{./build module bucts}
  4423. To statically compile it, do this:@* $ @strong{./build module bucts static}
  4424. The ``builddeps'' script in libreboot_src also makes use of builddeps-bucts.
  4425. @node How to build flashrom
  4426. @subsubsection How to build flashrom
  4427. Flashrom is the utility for flashing/dumping ROM images. This is what you will use to install libreboot.
  4428. Flashrom source code is included in libreboot_src.tar.xz and libreboot_util.tar.xz.@* @strong{If you downloaded from git, follow @ref{Get the full source code from metadata,build_meta} before you proceed.}
  4429. If you are using the binary release archive, then there are already binaries included under ./flashrom/. The flashing scripts will try to choose the correct one for you. Otherwise if you wish to re-build flashrom from source, continue reading.
  4430. First, @ref{Install build dependencies,install the build dependencies}.
  4431. To build it, do the following in the main directory:@* $ @strong{./build module flashrom}
  4432. To statically compile it, do the following in the main directory:@* $ @strong{./build module flashrom static}
  4433. After you've done that, under ./flashrom/ you will find the following executables:
  4434. @itemize
  4435. @item
  4436. @strong{flashrom}
  4437. @itemize
  4438. @item
  4439. For flashing while coreboot or libreboot is running.
  4440. @end itemize
  4441. @item
  4442. @strong{flashrom_lenovobios_sst}
  4443. @itemize
  4444. @item
  4445. This is patched for flashing while Lenovo BIOS is running on an X60 or T60 with the SST25VF016B (SST) flash chip.
  4446. @end itemize
  4447. @item
  4448. @strong{flashrom_lenovobios_macronix}
  4449. @itemize
  4450. @item
  4451. This is patched for flashing while Lenovo BIOS is running on an X60 or T60 with the MX25L1605D (Macronix) flash chip.
  4452. @end itemize
  4453. @end itemize
  4454. The ``builddeps'' script in libreboot_src also makes use of builddeps-flashrom.
  4455. @node Configuring libreboot
  4456. @subsubsection Configuring libreboot
  4457. Before building a ROM in libreboot (or coreboot, for that matter), you need to configure it. Configuration files should already be included, so you don't need to do anything. This information is only for reference. If you are updating or modifying coreboot-libre, and need to update the configs in any way, refer to @ref{Adding a new board to libreboot,newboard_libreboot}.
  4458. If you've already built a kernel before, you know how to use this interface.
  4459. @menu
  4460. * dmidecode::
  4461. * GRUB payload configuration::
  4462. * Depthcharge payload configuration::
  4463. @end menu
  4464. @node dmidecode
  4465. @ifinfo
  4466. @subsubheading dmidecode
  4467. @end ifinfo
  4468. There is certain information that can be useful to enter in particular:
  4469. @itemize
  4470. @item
  4471. Local version string
  4472. @item
  4473. SMBIOS Serial Number
  4474. @item
  4475. SMBIOS Manufacturer
  4476. @item
  4477. SMBIOS Version
  4478. @item
  4479. SMBIOS Product name
  4480. @end itemize
  4481. This information can be obtained using:@* @strong{$ sudo dmidecode}@* @strong{# dmidecode}
  4482. Specifically, it's good practise to enter the same information for libreboot that you found when running this with the original BIOS or firmware. @strong{libreboot has already done this for you. This information is for reference, in the hope that it will be useful.}
  4483. In practise, this information is useless and you can just leave it on the defaults that coreboot uses (this is what libreboot does, on most boards).
  4484. @node GRUB payload configuration
  4485. @ifinfo
  4486. @subsubheading GRUB payload
  4487. @end ifinfo
  4488. GRUB is one of the payloads that libreboot targets.
  4489. Configurations are then saved as files called @strong{``.config''}. Copies of each configuration used for each system type by the libreboot build scripts are stored in resources/libreboot/config/grub/
  4490. Generic configuration (file: resources/libreboot/config/payload/board/config)
  4491. @itemize
  4492. @item
  4493. General setup / Expert mode = @emph{enable}
  4494. @item
  4495. General / Use CMOS for configuration values = @emph{enable}
  4496. @item
  4497. Mainboard / Mainboard vendor = @emph{Name of manufacturer}
  4498. @item
  4499. Mainboard / Mainboard model = @emph{Model name}
  4500. @item
  4501. Mainboard / ROM chip size = @emph{Size of chip}
  4502. @item
  4503. Chipset / Include CPU microcode in CBFS = @emph{Do not include microcode updates}
  4504. @item
  4505. Devices / Use native graphics initialization = @emph{enable}
  4506. @item
  4507. Display / Keep VESA framebuffer = @emph{disable} (disable for text-mode graphics, enable for coreboot vesa framebuffer)
  4508. @itemize
  4509. @item
  4510. Libreboot provides this with text-mode enabled by default, but it automatically patches a copy of the config at build time to enable coreboot framebuffer for a separate set of ROM images, in each system.
  4511. @end itemize
  4512. @item
  4513. Generic Drivers / USB 2.0 EHCI debug dongle support = @emph{Enable}
  4514. @item
  4515. Generic Drivers / Enable early (pre-RAM) usbdebug = @emph{Enable}
  4516. @item
  4517. Generic Drivers / Type of dongle = @emph{Net20DC or compatible}
  4518. @item
  4519. Generic Drivers / Digitizer = @emph{Present}
  4520. @item
  4521. Console / USB dongle console output = @emph{enable}
  4522. @item
  4523. Payload / Add a payload = @emph{An ELF executable payload}
  4524. @item
  4525. Payload / Payload path and filename = @emph{grub.elf}
  4526. @end itemize
  4527. Now go back into Devices:
  4528. @itemize
  4529. @item
  4530. Devices / Run VGA Option ROMs = @emph{disable}
  4531. @item
  4532. Devices / Run Option ROMs on PCI devices = @emph{disable}
  4533. @end itemize
  4534. The resulting .config file was saved as resources/libreboot/config/@strong{payload/board/config} and is used by the build scripts for this system.
  4535. @node Depthcharge payload configuration
  4536. @ifinfo
  4537. @subsubheading Configuring libreboot for chromebooks - Depthcharge payload
  4538. @end ifinfo
  4539. Depthcharge is one of the payloads that libreboot targets.
  4540. Configurations are then saved as files called @strong{``.config''}. Copies of each configuration used for each system type by the libreboot build scripts are stored in resources/libreboot/config/depthcharge/
  4541. Configuration for chromebooks (file: resources/libreboot/config/depthcharge/board/config)
  4542. @itemize
  4543. @item
  4544. Mainboard / Mainboard vendor = @emph{Google}
  4545. @item
  4546. Mainboard / Mainboard model = @emph{Name of board}
  4547. @item
  4548. Chipset / ChromeOS / Build for ChromeOS = @emph{enable}
  4549. @item
  4550. Chipset / ChromeOS / Verify firmware with vboot. = @emph{disable}
  4551. @item
  4552. Payload / Add a payload = @emph{An ELF executable payload}
  4553. @item
  4554. Payload / Payload path and filename = @emph{depthcharge.elf}
  4555. @end itemize
  4556. The resulting .config file was saved as resources/libreboot/config/@strong{depthcharge/board/config} and is used by the build scripts for this system.
  4557. @node How to build the ROM images
  4558. @subsubsection How to build the ROM images
  4559. You don't need to do much, as there are scripts already written for you that can build everything automatically.
  4560. You can build libreboot from source on a 32-bit (i686) or 64-bit (x86_64) system. Recommended (if possible): x86_64. ASUS KFSN4-DRE has 64-bit CPUs. On a ThinkPad T60, you can replace the CPU (Core 2 Duo T5600, T7200 or T7600. T5600 recommended) for 64-bit support. On an X60s, you can replace the board with one that has a Core 2 Duo L7400 (you could also use an X60 Tablet board with the same CPU). On an X60, you can replace the board with one that has a Core 2 Duo T5600 or T7200 (T5600 is recommended). All MacBook2,1 laptops are 64-bit, as are all ThinkPad X200, X200S, X200 Tablet, R400, T400 and T500 laptops. Warning: MacBook1,1 laptops are all 32-bit only.
  4561. First, @ref{Install build dependencies,install the build dependencies}.
  4562. If you downloaded libreboot from git, refer to @ref{Get the full source code from metadata,build_meta}.
  4563. Build all of the components used in libreboot:@* $ @strong{./build module all}
  4564. You can also build each modules separately, using @emph{./build module modulename}. To see the possible values for @emph{modulename}, use:@* $ @strong{./build module list}
  4565. After that, build the ROM images (for all boards):@* $ @strong{./build roms withgrub}@* Alternatively, you can build for a specific board or set of boards. For example:@* $ @strong{./build roms withgrub x60}@* $ @strong{./build roms withgrub x200_8mb}@* $ @strong{./build roms withgrub x60 x200_8mb}@* The list of board options can be found by looking at the directory names in @strong{resources/libreboot/config/grub/}.
  4566. For those boards which use the depcharge payload, you must use: $ @strong{./build roms withdepthcharge}@* You can also build for a specific board or set of boards. For example:@* $ @strong{./build roms withdepthcharge veyron_speedy}
  4567. To clean (reverse) everything, do the following:@* $ @strong{./build clean all}
  4568. The ROM images will be stored under @strong{bin/@emph{payload}/}, where @emph{payload} could be @emph{grub}, @emph{depthcharge}, @emph{seabios}, or whatever other payload those images were built for.
  4569. @menu
  4570. * Preparing release archives - optional::
  4571. @end menu
  4572. @c TODO: Make into node under git.texi?
  4573. @node Preparing release archives - optional
  4574. @ifinfo
  4575. @subsubheading Preparing release archives (optional)
  4576. @end ifinfo
  4577. @strong{This is only confirmed to work (tested) in Trisquel 7. Parabola *fails* at this stage (for now). For all other distros, YMMV.}
  4578. This is mainly intended for use with the git repository. These commands will work in the release archive (_src), unless otherwise noted below.
  4579. The archives will appear under @emph{release/$@{version@}/}; $@{version@} will either be set using @emph{git describe} or, if a @emph{version} file already exists (_src release archive), then it will simply re-use that.
  4580. Tag the current commit, and that version will appear in both the $@{version@} string on the directory under @emph{release/}, and in the file names of the archives. Otherwise, whatever git uses for @emph{git describe --tags HEAD} will be used.
  4581. Utilities (static executables):@* $ @strong{./build release util}
  4582. Archive containing flashrom and bucts source code:@* $ @strong{./build release tobuild}
  4583. Documentation archive (@strong{does not work on _src release archive, only git}):@* $ @strong{./build release docs}
  4584. ROM image archives:@* $ @strong{./build release roms}
  4585. Source code archive:@* $ @strong{./build release src}
  4586. SHA512 sums of all other release archives that have been generated:@* $ @strong{./build release sha512sums}
  4587. If you are building on an i686 host, this will build statically linked 32-bit binaries in the binary release archive that you created, for: @strong{nvramtool, cbfstool, ich9deblob, cbmem}.
  4588. If you are building on an x86_64 host, this will build statically linked 32- *and* 64-bit binaries for @strong{cbmem}, @strong{ich9deblob}, @strong{cbfstool} and @strong{nvramtool}.
  4589. @strong{To include statically linked i686 and x86_64 binaries for bucts and flashrom, you will need to build them on a chroot, a virtual system or a real system where the host uses each given architecture. These packages are difficult to cross-compile, and the libreboot project is still figuring out how to deal with them.}
  4590. The same applies if you want to include statically linked flashrom binaries for ARM.
  4591. @itemize
  4592. @item
  4593. cbfstool
  4594. @item
  4595. ich9gen
  4596. @item
  4597. ich9deblob
  4598. @item
  4599. flashrom
  4600. @end itemize
  4601. If you are building binaries on a live system or chroot (for flashrom/bucts), you can use the following to statically link them:@* $ @strong{./build module flashrom static}@* $ @strong{./build module bucts static}
  4602. The same conditions as above apply for ARM (except, building bucts on ARM is pointless, and for flashrom you only need the normal executable since the lenovobios_sst and _macronix executables are meant to run on an X60/T60 while lenovo bios is present, working around the security restrictions).
  4603. The command that you used for generating the release archives will also run the following command:@* $ @strong{./build release tobuild}@* The archive @strong{tobuild.tar.xz} will have been created under @strong{release/}, containing bucts, flashrom and all other required resources for building them.
  4604. You'll find that the files libreboot_util.tar.xz and libreboot_src.tar.xz have been created, under @strong{release/}.
  4605. The ROM images will be stored in separate archives for each system, under @strong{release/rom/}.
  4606. @node Maintaining libreboot
  4607. @subsection Maintaining libreboot
  4608. This section relates to maintaining libreboot.
  4609. Do not follow anything here to the letter; is it only a rough guide representing how libreboot is maintained (for reference).
  4610. This section of the documentation applies mainly to the development version of libreboot, which is hosted in a git repository. It is not intended for the release versions of libreboot.
  4611. @menu
  4612. * Overview - maintaining libreboot::
  4613. * Updating coreboot-libre::
  4614. * Adding a new board to libreboot::
  4615. * Add/remove/modify patches in coreboot-libre::
  4616. * Updating GRUB::
  4617. * Change how the GRUB payload is built::
  4618. * Modify the configuration used in GRUB::
  4619. * Updating depthcharge::
  4620. * Updating flashrom::
  4621. * Updating bucts::
  4622. * Updating MemTest86+::
  4623. @end menu
  4624. @c TODO: What to do with this?
  4625. @c @item
  4626. @c @uref{../grub/index.html,Other maintenance-related tasks in GRUB}
  4627. @c @end itemize
  4628. @node Overview - maintaining libreboot
  4629. @subsubsection Overview
  4630. The way the libreboot project is run is very similar to how a GNU/Linux distribution project is run (but for the boot firmware, not your operating system). Thus, libreboot is a @emph{coreboot distribution}.
  4631. This page demonstrates on a high level how libreboot is maintained, how the project is run, how everything goes together, etc. For a more detailed guide, refer to each subsection for the various components/modules used in libreboot.
  4632. @node Updating coreboot-libre
  4633. @subsubsection Updating coreboot-libre
  4634. NOTE: it helps to own all libreboot-compatible systems here, or have reliable (and fast) access to a team of testers.
  4635. Coreboot-libre is the name of the deblobbed coreboot sources used in libreboot. It is also the name of the collection of scripts used for deblobbing coreboot, on each new update.
  4636. This section shows an example of how to update (re-base) to the latest version of coreboot, how to update the deblobbing scripts, and so on. @strong{This does not teach you how to change what custom patches are used, nor does it tell you how to add new boards to libreboot. It assumes that you simply want to re-base to the latest version (for instance, there could be bug fixes that you want). For those things not listed in this section, you can refer to other sections on this page instead.}
  4637. Open these files in your editor (you will most likely be editing them):
  4638. @itemize
  4639. @item
  4640. resources/scripts/helpers/download/coreboot
  4641. @item
  4642. resources/scripts/helpers/build/module/coreboot
  4643. @item
  4644. resources/utilities/coreboot-libre/deblob
  4645. @item
  4646. resources/utilities/coreboot-libre/nonblobs
  4647. @item
  4648. resources/utilities/coreboot-libre/nonblobs_notes
  4649. @item
  4650. resources/scripts/helpers/build/roms/helper
  4651. @item
  4652. resources/scripts/helpers/build/roms/withgrub
  4653. @end itemize
  4654. If you already had a coreboot/ directory in your libreboot tree, delete it:@* $ @strong{rm -Rf coreboot/}
  4655. Firstly, download coreboot. Do @strong{not} use @strong{./download coreboot} for this, just clone coreboot, as it does in that script, like so:@* $ @strong{git clone http://review.coreboot.org/coreboot}
  4656. $ @strong{cd coreboot/}@* Get the ID of the latest commit in this clone, by reading the commit ID using e.g.:@* $ @strong{git log}@* In @emph{resources/scripts/helpers/download/coreboot} you will find a line that says @emph{@strong{git reset --hard}} and then a commit ID next to it. Replace this with the commit ID of the latest commit from the coreboot version that you just downloaded.
  4657. You must also checkout the @emph{vboot} submodule:@* $ @strong{git submodule update --init --checkout -- 3rdparty/vboot/}
  4658. Delete the .git* resources. For example:@* $ @strong{rm -Rf .git* 3rdparty/*/.git*}@* ...this is to avoid the deblobbing script from picking up files in there as blobs, which would be only false positives and increase the amount of time taken. Now come out of coreboot:@* $ @strong{cd ../}
  4659. Check all coreboot file names/paths in @emph{deblob}; if any of them no longer exist at that name/path in the coreboot tree that you downloaded, delete the reference(s) in @emph{deblob}.
  4660. Check all coreboot file names/paths in @emph{nonblobs}; if any of them no longer exist at that name/path in the coreboot tree that you downloaded, delete the reference in @emph{nonblobs}.
  4661. Now, back in the main root directory of libreboot (git repository), run the deblob script. This is to prevent the @emph{findblobs} scripts from finding the blobs that are already deleted when running the @emph{deblob} script. Like so:@* $ @strong{./resources/utilities/coreboot-libre/deblob}
  4662. Now search for new blobs:@* $ @strong{cd resources/utilities/coreboot-libre/}@* $ @strong{./findblobs}@* WARNING: this will take a @strong{*long*} time. Be patient! What this will do is look through the coreboot source directory, looking for blobs. It will not find the blobs that you deleted before (because they no longer exist), and it will ignore any files listed in @emph{nonblobs}.
  4663. Once the @emph{findblobs} script has finished, check the file @emph{tocheck} (from the root, this will be @emph{resources/utilities/coreboot-libre/tocheck}). These are the files detected as blobs; some might be blobs, some not. The @emph{findblobs} script doesn't know how to determine between blobs and non-blobs, it only knows patterns. Distinguishing between blobs and non-blobs must be performed by you, the human being.
  4664. @itemize
  4665. @item
  4666. Files in @emph{tocheck} that you identify as blobs, should be added appropriately to @emph{resources/utilities/coreboot-libre/deblob}
  4667. @item
  4668. Files in @emph{tocheck} that you identify as non-blobs, should be added appropriately to @emph{resources/utilities/coreboot-libre/nonblobs} - also, if you feel it necessary, add an explanation of it in @emph{resources/utilities/coreboot-libre/nonblobs_notes}
  4669. @end itemize
  4670. Now come back to the main libreboot root directory (root of the git clone). If you are still in resources/utilities/coreboot-libre/ for instance, you would do something like:@* $ @strong{cd ../../../}
  4671. Now delete the coreboot directory:@* $ @strong{rm -Rf coreboot/}
  4672. Download coreboot again, only this time, using the download script. The download script also applies custom patches to coreboot (see resources/scripts/helpers/download/coreboot); if they do not apply anymore, you will have to re-base them and then update @emph{resources/scripts/helpers/download/coreboot} accordingly. Anyway, download coreboot like so:@* $ @strong{./download coreboot}
  4673. If the custom patches no longer apply, and you have to re-base (or replace?) some patches, please do this in coreboot upstream, not in libreboot. Then re-include new patches from upstream, into libreboot. Here is coreboot's guide for contributing patches:@* @uref{http://www.coreboot.org/Git,http://www.coreboot.org/Git}.
  4674. Update all configs:@* $ @strong{./build config grubupdate}@* $ @strong{./build config dcupdate}@* This simply takes all of the coreboot @strong{.config} files from @emph{resources/libreboot/config/} and does @strong{make oldconfig} on them. It usually works. If it doesn't, you'll need to recreate those configs from scratch using @strong{./build config grubreplace} or @strong{./build config dcreplace} (optionally add a config name), or @strong{./build config grubmodify} or @strong{./build config dcmodify} (ditto) (see @ref{Configuring libreboot,config})
  4675. Finally, build *all* ROM images using the instructions at @ref{Git}, to verify that everything still builds.
  4676. Once you've verified that building isn't broken, test *all* boards (you don't need to test all ROM images, only one vesafb and one txtmode image for each configuration). If you do not have all systems supported in libreboot, then you will need to get other testers for those boards.
  4677. If you have established a build issue, or a board no longer works (booting issues, bugs during/after boot, etc), you'll need to fix it upstream: @uref{http://www.coreboot.org/Git,http://www.coreboot.org/Git} and then re-update coreboot (or apply patches from upstream).
  4678. You should also test the resulting ROM images from building with the new or modified coreboot revision.
  4679. @node Adding a new board to libreboot
  4680. @subsubsection Adding a new board to libreboot
  4681. Make sure that the board is supported, and that the patches are included (if there are custom patches that you need). Add configs for it like so (for GRUB payload):@* $ @strong{./build config grubreplace @emph{payload}/@emph{boardname}}@* Alternatively, for depthcharge payload:@* $ @strong{./build config dcreplace @emph{payload}/@emph{boardname}}
  4682. This can also be used for replacing an existing config.
  4683. Configure the board. Make sure to add the steps to the config section in @ref{Git}.
  4684. When you're done, the config will be stored in @emph{resources/libreboot/config/}. Now build-test it and then check that it actually works.
  4685. The following scripts may also need to be modified before building: @emph{resources/scripts/helpers/build/roms/withgrub} and @emph{resources/scripts/helpers/build/roms/helper}
  4686. The following can be used when updating coreboot-libre (GRUB payload):@* $ @strong{./build config grubupdate}@* You must also do this for boards that use the depthcharge payload:@* $ @strong{./build config dcupdate}@* (adding a board name on the end is optional, for either of these)
  4687. The following can be used if you want to modify an existing configuration (GRUB payload):@* $ @strong{./build config grubmodify}@* For those boards which use the depthcharge payload:@* $ @strong{./build config dcmodify}@* (adding a board name on the end is optional)
  4688. Examples (GRUB payload):@* $ @strong{./build config grubmodify x60}@* $ @strong{./build config grubreplace x60}@* $ @strong{./build config grubupdate x60}@* $ @strong{./build config grubmodify kfsn4-dre}@* $ @strong{./build config grubreplace kfsn4-dre}@* $ @strong{./build config grubupdate kfsn4-dre}@*
  4689. Examples (depthcharge payload):@* $ @strong{./build config dcmodify veyron_speedy}@* $ @strong{./build config dcreplace veyron_speedy}@* $ @strong{./build config dcupdate veyron_speedy}
  4690. @node Add/remove/modify patches in coreboot-libre
  4691. @subsubsection Add/remove/modify patches in coreboot-libre
  4692. Under @strong{resources/scripts/helpers/download/coreboot} you can find the instructions used for patching coreboot.
  4693. Modify the commit ID on the @emph{git reset --hard} line accordingly, and update the list of patches used accordingly. Do not cherry-pick from review.coreboot.org directly; instead, include the diff in resources/libreboot/patch/ and use @emph{git am} (you can get the diff by using git-format-patch).
  4694. When you're done, simply download coreboot again:@* $ @strong{./download coreboot}
  4695. Finally, re-build the parts from coreboot that are used by the build system (also builds GCC):@* $ @strong{./build module coreboot}
  4696. Before running the above command, you can save time by copying out the crossgcc that you compiled before (from coreboot/util/crossgcc/) and then putting it back. After you've done that, run everything in @emph{resources/scripts/helpers/build/module/coreboot} except for the part that builds GCC. @strong{Only do this if the version is correct.}
  4697. You should also test the resulting ROM images from building with the new or modified coreboot revision.
  4698. @node Updating GRUB
  4699. @subsubsection Updating GRUB
  4700. $ @strong{rm -Rf grub/}@* $ @strong{git clone git://git.savannah.gnu.org/grub.git}@* $ @strong{cd grub/}@* $ @strong{git log}
  4701. Open the file @emph{resources/scripts/helpers/download/grub} and replace the commit ID on the line that performs @emph{git reset --hard} with the commit ID of the GRUB revision that you just downloaded.
  4702. $ @strong{cd ../}@* $ @strong{./download grub}
  4703. If it fails because of merge conflicts, you'll need to re-base or (as appropriate) remove the offending patch(es) in @emph{resources/scripts/helpers/download/grub}.
  4704. Finally, verify that it will build:@* $ @strong{./build module grub}
  4705. Since GRUB is the payload in libreboot, you should also build the ROM images and test them, with this different GRUB version that you have prepared.
  4706. @node Change how the GRUB payload is built
  4707. @subsubsection Change how the GRUB payload (grub.elf) is built (utility: grub-assemble)
  4708. Look in @emph{resources/utilities/grub-assemble/}.
  4709. @emph{gen.sh} creates ELF executables of GRUB with different configurations: text-mode or framebuffer mode in coreboot. Essentially, the text-mode version has no background nor any custom fonts, and contains MemTest86+. You probably don't need to modify these files at all.
  4710. @emph{modules.conf} defines which modules will be included in the GRUB ELF executable.
  4711. Since GRUB is the payload in libreboot, you should also build the ROM images and test them, with this different GRUB version that you have prepared.
  4712. @node Modify the configuration used in GRUB
  4713. @subsubsection Modify the configuration used in GRUB
  4714. Look in @emph{resources/scripts/helpers/build/roms/withgrub} to see how the GRUB configuration files are generated.
  4715. You might need to modify this. You can also modify the default configuration by making changes to the files under @emph{resources/grub/config/}
  4716. Since GRUB is the payload in libreboot, you should also build the ROM images and test them, with this different GRUB version that you have prepared.
  4717. @node Updating depthcharge
  4718. @subsubsection Updating depthcharge
  4719. The script to download depthcharge is: @emph{resources/scripts/helpers/download/depthcharge}.
  4720. Patches are in @emph{resources/depthcharge/patch/}.
  4721. The configuration used for depthcharge is located in @emph{depthcharge/board}. Each board has a @emph{defconfig} Kconfig configuration and a fmap.dts FMAP device-tree configuration. Those shouldn't need much attention, but when needed, it's best to modify them in the depthcharge tree (with patches) to keep things in one place.
  4722. @node Updating flashrom
  4723. @subsubsection Updating flashrom
  4724. Modify these files: @emph{resources/scripts/helpers/download/flashrom} and @emph{resources/scripts/helpers/build/module/flashrom}.
  4725. Patches are in @emph{resources/flashrom/patch/}
  4726. @node Updating bucts
  4727. @subsubsection Updating bucts
  4728. bucts doesn't really need updating, but the patches are in @emph{resources/bucts/patch}, the download script is @emph{resources/scripts/helpers/download/bucts} and the build script is @emph{resources/scripts/helpers/build/module/bucts}.
  4729. @node Updating MemTest86+
  4730. @subsubsection Updating MemTest86+
  4731. MemTest86+ doesn't really need updating, but the patches are in @emph{resources/memtest86plus/patch}, the download script is @emph{resources/scripts/helpers/download/memtest86plus} and the build script is @emph{resources/scripts/helpers/build/module/memtest86plus}.
  4732. In the download script for memtest86plus, make sure to update the checksum that it matches for the downloaded source tarball.
  4733. @node Hardware security
  4734. @section Hardware security
  4735. Security topics:
  4736. @menu
  4737. * ThinkPad X60/X60S - Hardware security::
  4738. * ThinkPad T60 - Hardware security::
  4739. * Notes about DMA and the docking station::
  4740. @end menu
  4741. @node ThinkPad X60/X60S - Hardware security
  4742. @subsection Security on the ThinkPad X60
  4743. Hardware modifications to enhance security on the ThinkPad X60. This tutorial is @strong{incomplete} at the time of writing.
  4744. @menu
  4745. * Hardware requirements - X60::
  4746. * Software requirements - X60::
  4747. * Rationale - X60::
  4748. * Disassembly - X60::
  4749. * Extra notes - X60::
  4750. * Risk level - X60::
  4751. * Further reading material - software security - X60::
  4752. * References - X60::
  4753. @end menu
  4754. @node Hardware requirements - X60
  4755. @subsubsection Hardware requirements
  4756. @itemize
  4757. @item
  4758. An X60
  4759. @item
  4760. screwdriver
  4761. @item
  4762. (in a later version of this tutorial: soldering iron and scalpel)
  4763. @end itemize
  4764. @node Software requirements - X60
  4765. @subsubsection Software requirements
  4766. @itemize
  4767. @item
  4768. none (at least in the scope of the article as-is)
  4769. @item
  4770. You probably want to encrypt your GNU/Linux install using LUKS
  4771. @end itemize
  4772. @node Rationale - X60
  4773. @subsubsection Rationale
  4774. Most people think of security on the software side: the hardware is important aswell.
  4775. This tutorial deals with reducing the number of devices that have direct memory access that could communicate with inputs/outputs that could be used to remotely command the system (or leak data). All of this is purely theoretical for the time being.
  4776. @node Disassembly - X60
  4777. @subsubsection Disassembly
  4778. Firstly remove the bluetooth (if your X60 has this):@* The marked screws are underneath those stickers (marked in those 3 locations at the bottom of the LCD assembly):@* @image{@value{docsdir}images/x60_security/0000_bluetooth0,,,,jpg}@* Now gently pry off the bottom part of the front bezel, and the bluetooth module is on the left (easily removable):@* @image{@value{docsdir}images/x60_security/0000_bluetooth,,,,jpg}@*
  4779. If your model was WWAN, remove the simcard (check anyway):@* Uncover those 2 screws at the bottom:@* @image{@value{docsdir}images/x60_security/0000_simcard0,,,,jpg}@* SIM card (not present in the picture) is in the marked location:@* @image{@value{docsdir}images/x60_security/0000_simcard1,,,,jpg}@* Replacement: USB dongle.
  4780. Now get into the motherboard.
  4781. Remove those screws:@* @image{@value{docsdir}images/x60_security/0000,,,,jpg}
  4782. Push the keyboard forward (carefully):@* @image{@value{docsdir}images/x60_security/0001,,,,jpg}
  4783. Lift the keyboard up and disconnect it from the board:@* @image{@value{docsdir}images/x60_security/0002,,,,jpg}
  4784. Grab the right-hand side of the chassis and force it off (gently) and pry up the rest of the chassis:@* @image{@value{docsdir}images/x60_security/0003,,,,jpg}
  4785. You should now have this:@* @image{@value{docsdir}images/x60_security/0004,,,,jpg}
  4786. The following is a summary of what you will remove (already done to this system):@* @image{@value{docsdir}images/x60_security/0001_overview,,,,jpg}@* Note: the blue lines represent antenna cables and modem cables. You don't need to remove these, but you can if you want (to make it tidier after removing other parts). I removed the antenna wires, the modem jack, the modem cable and also (on another model) a device inside the part where the wwan antenna goes (wasn't sure what it was, but I knew it wasn't needed). @strong{This is optional}
  4787. Remove the microphone (can desolder it, but you can also easily pull it off with you hands). Already removed here:@* @image{@value{docsdir}images/x60_security/0001_microphone,,,,jpg}@* @strong{Rationale:}@* Another reason to remove the microphone: If your computer gets @xref{physical-access-x60,,[1]}, compromised, it can record what you say, and use it to receive data from nearby devices if they're compromised too. Also, we do not know what the built-in microcode (in the CPU) is doing; it could theoretically be programmed to accept remote commands from some speaker somewhere (remote security hole). @strong{In other words, the system could already be compromised from the factory.}
  4788. Remove the modem:@* @image{@value{docsdir}images/x60_security/0001_modem,,,,jpg}@* (useless, obsolete device)
  4789. Remove the speaker:@* @image{@value{docsdir}images/x60_security/0001_speaker,,,,jpg}@* Reason: combined with the microphone issue, this could be used to leak data.@* If your computer gets @xref{physical-access-x60,,[1]}, compromised, it can be used to transmit data to nearby compromised devices. It's unknown if it can be turned into a microphone @xref{microphone-x60,,[2]},.@* Replacement: headphones/speakers (line-out) or external DAC (USB).
  4790. Remove the wlan (also remove wwan if you have it):@* @image{@value{docsdir}images/x60_security/0001_wlan_wwan,,,,jpg}@* Reason: has direct (and very fast) memory access, and could (theoretically) leak data over a side-channel.@* @strong{Wifi:} The ath5k/ath9k cards might not have firmware at all. They might safe but could have access to the computer's RAM trough DMA. If people have an intel card(most X60s come with Intel wifi by default, until you change it),then that card runs a non-free firwamre and has access to the computer's RAM trough DMA! So the risk-level is very high.@* @strong{Wwan (3g modem):} They run proprietary software! It's like AMT but over the GSM network which is probably even worse.@* Replacement: external USB wifi dongle. (or USB wwan/3g dongle; note, this has all the same privacy issues as mobile phones. wwan not recommended).
  4791. @menu
  4792. * Not covered yet - X60::
  4793. * Also not covered yet - X60::
  4794. @end menu
  4795. @node Not covered yet - X60
  4796. @ifinfo
  4797. @subsubheading Not covered yet:
  4798. @end ifinfo
  4799. @itemize
  4800. @item
  4801. Disable cardbus (has fast/direct memory access)
  4802. @item
  4803. Disable firewire (has fast/direct memory access)
  4804. @item
  4805. Disable flashing the ethernet firmware
  4806. @item
  4807. Disable SPI flash writes (can be re-enabled by unsoldering two parts)
  4808. @item
  4809. Disable use of xrandr/edid on external monitor (cut 2 pins on VGA)
  4810. @item
  4811. Disable docking station (might be possible to do it in software, in coreboot upstream as a Kconfig option)
  4812. @end itemize
  4813. Go to @uref{http://media.ccc.de/browse/congress/2013/30C3_-_5529_-_en_-_saal_2_-_201312271830_-_hardening_hardware_and_choosing_a_goodbios_-_peter_stuge.html,http://media.ccc.de/browse/congress/2013/30C3_-_5529_-_en_-_saal_2_-_201312271830_-_hardening_hardware_and_choosing_a_goodbios_-_peter_stuge.html} or directly to the video: @uref{http://mirror.netcologne.de/CCC/congress/2013/webm/30c3-5529-en-Hardening_hardware_and_choosing_a_goodBIOS_webm.webm,http://mirror.netcologne.de/CCC/congress/2013/webm/30c3-5529-en-Hardening_hardware_and_choosing_a_goodBIOS_webm.webm}.
  4814. A lot of this tutorial is based on that video. Look towards the second half of the video to see how to do the above.
  4815. @node Also not covered yet - X60
  4816. @ifinfo
  4817. @subsubheading Also not covered yet:
  4818. @end ifinfo
  4819. @itemize
  4820. @item
  4821. Intrusion detection: randomized seal on screws@* Just put nail polish with lot of glider on the important screws, take some good pictures. Keep the pictures and make sure of their integrity. Compare the nail polish with the pictures before powering on the laptop. @c TYPO: picueres > pictures
  4822. @item
  4823. Tips about preventing/mitigating risk of cold boot attack.
  4824. @itemize
  4825. @item
  4826. soldered RAM?
  4827. @item
  4828. seal RAM door shut (possibly modified lower chassis) so that system has to be disassembled (which has to go through the nail polish)
  4829. @item
  4830. wipe all RAM at boot/power-off/power-on? (patch in coreboot upstream?)
  4831. @item
  4832. ask gnutoo about fallback patches (counts number of boots)
  4833. @end itemize
  4834. @item
  4835. General tips/advice and web links showing how to detect physical intrusions.
  4836. @item
  4837. For example: @uref{http://cs.tau.ac.il/~tromer/acoustic/,http://cs.tau.ac.il/~tromer/acoustic/} or @uref{http://cyber.bgu.ac.il/content/how-leak-sensitive-data-isolated-computer-air-gap-near-mobile-phone-airhopper,http://cyber.bgu.ac.il/content/how-leak-sensitive-data-isolated-computer-air-gap-near-mobile-phone-airhopper}.
  4838. @item
  4839. @uref{https://en.wikipedia.org/wiki/Tempest_%28codename%29,https://en.wikipedia.org/wiki/Tempest_%28codename%29}
  4840. @item
  4841. https://gitorious.org/gnutoo-for-coreboot/grub-assemble/source/a61f636797777a742f65f4c9c58032aa6a9b23c3:
  4842. @end itemize
  4843. @node Extra notes - X60
  4844. @subsubsection Extra notes
  4845. EC: Cannot be removed but can be mitigated: it contains non-free non-loadable code, but it has no access to the computer's RAM. It has access to the on-switch of the wifi, bluetooth, modem and some other power management features. The issue is that it has access to the keyboard, however if the software security howto @strong{(not yet written)} is followed correctly, it won't be able to leak data to a local attacker. It has no network access but it may still be able to leak data remotely, but that requires someone to be nearby to recover the data with the help of an SDR and some directional antennas - See @xref{video-ccc-x60,[3]}.
  4846. @uref{http://www.coreboot.org/Intel_82573_Ethernet_controller,Intel 82573 Ethernet controller} on the X60 seems safe, according to Denis.
  4847. @ignore
  4848. @menu
  4849. @c * Risk level - X60::
  4850. @end menu
  4851. @end ignore
  4852. @node Risk level - X60
  4853. @subsubsection Risk level
  4854. @itemize
  4855. @item
  4856. Modem (3g/wwan): highest
  4857. @item
  4858. Intel wifi: Near highest
  4859. @item
  4860. Atheros PCI wifi: unknown, but lower than intel wifi.
  4861. @item
  4862. Microphone: only problematic if the computer gets compromised.
  4863. @item
  4864. Speakers: only problematic if the computer gets compromised.
  4865. @item
  4866. EC: can be mitigated if following the guide on software security.
  4867. @end itemize
  4868. @node Further reading material - software security - X60
  4869. @subsubsection Further reading material (software security)
  4870. @itemize
  4871. @item
  4872. @ref{Installing Trisquel GNU/Linux-libre with full disk encryption,Installing Trisquel GNU/Linux with full disk encryption (including /boot)}
  4873. @item
  4874. @ref{Installing Parabola GNU/Linux-libre with full disk encryption,Installing Parabola GNU/Linux with full disk encryption (including /boot)}
  4875. @item
  4876. @ref{Notes about DMA and the docking station,Notes about DMA access and the docking station}
  4877. @end itemize
  4878. @node References - X60
  4879. @subsubsection References
  4880. @enumerate
  4881. @item
  4882. physical access
  4883. @anchor{physical-access-x60}
  4884. Explain that black hats, TAO, and so on might use a 0day to get in, and explain that in this case it mitigates what the attacker can do. Also the TAO do some evaluation before launching an attack: they take the probability of beeing caught into account, along with the kind of target. A 0day costs a lot of money, I heard that it was from 100000$ to 400000$, some other websites had prices 10 times lower but that but it was probably a typo. So if people increase their security it makes it more risky and more costly to attack people.
  4885. @item
  4886. microphone
  4887. @anchor{microphone-x60}
  4888. It's possible to turn headphones into a microphone, you could try yourself, however they don't record loud at all. Also intel cards have the capability to change a connector's function, for instance the microphone jack can now become a headphone plug, that's called retasking. There is some support for it in GNU/Linux but it's not very well known.
  4889. @item
  4890. Video (CCC)
  4891. @anchor{video-ccc-x60}
  4892. 30c3-5356-en-Firmware_Fat_Camp_webm.webm from the 30th CCC. While their demo is experimental(their hardware also got damaged during the transport), the spies probably already have that since a long time. @uref{http://berlin.ftp.media.ccc.de/congress/2013/webm/30c3-5356-en-Firmware_Fat_Camp_webm.webm,http://berlin.ftp.media.ccc.de/congress/2013/webm/30c3-5356-en-Firmware_Fat_Camp_webm.webm}
  4893. @end enumerate
  4894. @node ThinkPad T60 - Hardware security
  4895. @subsection Security on the ThinkPad T60
  4896. Hardware modifications to enhance security on the ThinkPad T60. This tutorial is @strong{incomplete} at the time of writing.
  4897. @menu
  4898. * Hardware requirements - T60::
  4899. * Software requirements - T60::
  4900. * Rationale - T60::
  4901. * Disassembly - T60::
  4902. * Extra notes - T60::
  4903. * Risk level - T60::
  4904. * Further reading material - software security - T60::
  4905. * References - T60::
  4906. @end menu
  4907. @node Hardware requirements - T60
  4908. @subsubsection Hardware requirements
  4909. @itemize
  4910. @item
  4911. A T60
  4912. @item
  4913. screwdriver
  4914. @item
  4915. Rubbing or isopropyl alcohol, and thermal compound.
  4916. @item
  4917. (in a later version of this tutorial: soldering iron and scalpel)
  4918. @end itemize
  4919. @node Software requirements - T60
  4920. @subsubsection Software requirements
  4921. @itemize
  4922. @item
  4923. none (at least in the scope of the article as-is)
  4924. @item
  4925. You probably want to encrypt your GNU/Linux install using LUKS
  4926. @end itemize
  4927. @node Rationale - T60
  4928. @subsubsection Rationale
  4929. Most people think of security on the software side: the hardware is important aswell.
  4930. This tutorial deals with reducing the number of devices that have direct memory access that could communicate with inputs/outputs that could be used to remotely command the system (or leak data). All of this is purely theoretical for the time being.
  4931. @node Disassembly - T60
  4932. @subsubsection Disassembly
  4933. Remove those screws and remove the HDD:@* @image{@value{docsdir}images/t60_dev/0001,,,,JPG} @image{@value{docsdir}images/t60_dev/0002,,,,JPG}
  4934. Lift off the palm rest:@* @image{@value{docsdir}images/t60_dev/0003,,,,JPG}
  4935. Lift up the keyboard, pull it back a bit, flip it over like that and then disconnect it from the board:@* @image{@value{docsdir}images/t60_dev/0004,,,,JPG} @image{@value{docsdir}images/t60_dev/0005,,,,JPG} @image{@value{docsdir}images/t60_dev/0006,,,,JPG}
  4936. Gently wedge both sides loose:@* @image{@value{docsdir}images/t60_dev/0007,,,,JPG} @image{@value{docsdir}images/t60_dev/0008,,,,JPG}
  4937. Remove that cable from the position:@* @image{@value{docsdir}images/t60_dev/0009,,,,JPG} @image{@value{docsdir}images/t60_dev/0010,,,,JPG}
  4938. Now remove that bezel. Remove wifi, nvram battery and speaker connector (also remove 56k modem, on the left of wifi):@* @image{@value{docsdir}images/t60_dev/0011,,,,JPG}@* Reason: has direct (and very fast) memory access, and could (theoretically) leak data over a side-channel.@* @strong{Wifi:} The ath5k/ath9k cards might not have firmware at all. They might safe but could have access to the computer's RAM trough DMA. If people have an intel card(most T60 laptops come with Intel wifi by default, until you change it),then that card runs a non-free firwamre and has access to the computer's RAM trough DMA! So the risk-level is very high.
  4939. Remove those screws:@* @image{@value{docsdir}images/t60_dev/0012,,,,JPG}
  4940. Disconnect the power jack:@* @image{@value{docsdir}images/t60_dev/0013,,,,JPG}
  4941. Remove nvram battery (we will put it back later):@* @image{@value{docsdir}images/t60_dev/0014,,,,JPG}
  4942. Disconnect cable (for 56k modem) and disconnect the other cable:@* @image{@value{docsdir}images/t60_dev/0015,,,,JPG} @image{@value{docsdir}images/t60_dev/0016,,,,JPG}
  4943. Disconnect speaker cable:@* @image{@value{docsdir}images/t60_dev/0017,,,,JPG}
  4944. Disconnect the other end of the 56k modem cable:@* @image{@value{docsdir}images/t60_dev/0018,,,,JPG}
  4945. Make sure you removed it:@* @image{@value{docsdir}images/t60_dev/0019,,,,JPG}
  4946. Unscrew those:@* @image{@value{docsdir}images/t60_dev/0020,,,,JPG}
  4947. Make sure you removed those:@* @image{@value{docsdir}images/t60_dev/0021,,,,JPG}
  4948. Disconnect LCD cable from board:@* @image{@value{docsdir}images/t60_dev/0022,,,,JPG}
  4949. Remove those screws then remove the LCD assembly:@* @image{@value{docsdir}images/t60_dev/0023,,,,JPG} @image{@value{docsdir}images/t60_dev/0024,,,,JPG} @image{@value{docsdir}images/t60_dev/0025,,,,JPG}
  4950. Once again, make sure you removed those:@* @image{@value{docsdir}images/t60_dev/0026,,,,JPG}
  4951. Remove the shielding containing the motherboard, then flip it over. Remove these screws, placing them on a steady surface in the same layout as they were in before you removed them. Also, you should mark each screw hole after removing the screw (a permanent marker pen will do), this is so that you have a point of reference when re-assembling the system:@* @image{@value{docsdir}images/t60_dev/0027,,,,JPG} @image{@value{docsdir}images/t60_dev/0028,,,,JPG} @image{@value{docsdir}images/t60_dev/0029,,,,JPG} @image{@value{docsdir}images/t60_dev/0031,,,,JPG} @image{@value{docsdir}images/t60_dev/0032,,,,JPG} @image{@value{docsdir}images/t60_dev/0033,,,,JPG}
  4952. Remove microphone (soldering iron not needed. Just wedge it out gently):@* @image{@value{docsdir}images/t60_dev/0039,,,,JPG}@* @strong{Rationale:}@* Another reason to remove the microphone: If your computer gets@xref{physical-access-t60,,[1]}, compromised, it can record what you say, and use it to receive data from nearby devices if they're compromised too. Also, we do not know what the built-in microcode (in the CPU) is doing; it could theoretically be programmed to accept remote commands from some speaker somewhere (remote security hole). @strong{In other words, the system could already be compromised from the factory.}
  4953. Remove infrared:@* @image{@value{docsdir}images/t60_dev/0040,,,,JPG} @image{@value{docsdir}images/t60_dev/0042,,,,JPG}
  4954. Remove cardbus (it's in a socket, no need to disable. Just remove the port itself):@* @image{@value{docsdir}images/t60_dev/0041,,,,JPG}@* @strong{Rationale:}@* It has direct memory access and can be used to extract sensitive details (such as LUKS keys). See 'GoodBIOS' video linked at the end (speaker is Peter Stuge, a coreboot hacker). The video covers X60 but the same topics apply to T60.
  4955. Before re-installing the upper chassis, remove the speaker:@* @image{@value{docsdir}images/t60_dev/0043,,,,JPG} @image{@value{docsdir}images/t60_dev/0044,,,,JPG}@* Reason: combined with the microphone issue, this could be used to leak data.@* If your computer gets@xref{physical-access-t60,,[1]}, compromised, it can be used to transmit data to nearby compromised devices. It's unknown if it can be turned into a microphone@xref{microphone-t60,,[2]}.@* Replacement: headphones/speakers (line-out) or external DAC (USB).
  4956. Remove the wwan:@* @image{@value{docsdir}images/t60_dev/0045,,,,JPG}@* @strong{Wwan (3g modem):} They run proprietary software! It's like AMT but over the GSM network which is probably even worse.@* Replacement: external USB wifi dongle. (or USB wwan/3g dongle; note, this has all the same privacy issues as mobile phones. wwan not recommended).
  4957. This is where the simcard connector is soldered. See notes above about wwan. Remove simcard by removing battery and then it's accessible (so, remember to do this when you re-assemble. or you could do it now?)@* @image{@value{docsdir}images/t60_dev/0046,,,,JPG}
  4958. Put those screws back:@* @image{@value{docsdir}images/t60_dev/0047,,,,JPG}
  4959. Put it back into lower chassis:@* @image{@value{docsdir}images/t60_dev/0048,,,,JPG}
  4960. Attach LCD and insert screws (also, attach the lcd cable to the board):@* @image{@value{docsdir}images/t60_dev/0049,,,,JPG}
  4961. Insert those screws:@* @image{@value{docsdir}images/t60_dev/0050,,,,JPG}
  4962. On the CPU (and there is another chip south-east to it, sorry forgot to take pic) clean off the old thermal paste (with the alcohol) and apply new (Artic Silver 5 is good, others are good too) you should also clean the heatsink the same way@* @image{@value{docsdir}images/t60_dev/0051,,,,JPG}
  4963. Attach the heatsink and install the screws (also, make sure to install the AC jack as highlighted):@* @image{@value{docsdir}images/t60_dev/0052,,,,JPG}
  4964. Reinstall that upper bezel:@* @image{@value{docsdir}images/t60_dev/0053,,,,JPG}
  4965. Do that:@* @image{@value{docsdir}images/t60_dev/0054,,,,JPG} @image{@value{docsdir}images/t60_dev/0055,,,,JPG}
  4966. Attach keyboard and install nvram battery:@* @image{@value{docsdir}images/t60_dev/0056,,,,JPG} @image{@value{docsdir}images/t60_dev/0057,,,,JPG}
  4967. Place keyboard and (sorry, forgot to take pics) reinstall the palmrest and insert screws on the underside:@* @image{@value{docsdir}images/t60_dev/0058,,,,JPG}
  4968. Remove those covers and unscrew:@* @image{@value{docsdir}images/t60_dev/0059,,,,JPG} @image{@value{docsdir}images/t60_dev/0060,,,,JPG} @image{@value{docsdir}images/t60_dev/0061,,,,JPG}
  4969. Gently pry off the front bezel (sorry, forgot to take pics).
  4970. Remove bluetooth module:@* @image{@value{docsdir}images/t60_dev/0062,,,,JPG} @image{@value{docsdir}images/t60_dev/0063,,,,JPG}
  4971. Re-attach the front bezel and re-insert the screws (sorry, forgot to take pics).
  4972. It lives!@* @image{@value{docsdir}images/t60_dev/0071,,,,JPG} @image{@value{docsdir}images/t60_dev/0072,,,,JPG} @image{@value{docsdir}images/t60_dev/0073,,,,JPG}
  4973. Always stress test ('stress -c 2' and xsensors. below 90C is ok) when replacing cpu paste/heatsink:@* @image{@value{docsdir}images/t60_dev/0074,,,,JPG}
  4974. @menu
  4975. * Not covered yet - T60::
  4976. * Also not covered yet - T60::
  4977. @end menu
  4978. @node Not covered yet - T60
  4979. @ifinfo
  4980. @subsubheading Not covered yet
  4981. @end ifinfo
  4982. @itemize
  4983. @item
  4984. Disable flashing the ethernet firmware
  4985. @item
  4986. Disable SPI flash writes (can be re-enabled by unsoldering two parts)
  4987. @item
  4988. Disable use of xrandr/edid on external monitor (cut 2 pins on VGA)
  4989. @item
  4990. Disable docking station (might be possible to do it in software, in coreboot upstream as a Kconfig option)
  4991. @end itemize
  4992. Go to @uref{http://media.ccc.de/browse/congress/2013/30C3_-_5529_-_en_-_saal_2_-_201312271830_-_hardening_hardware_and_choosing_a_goodbios_-_peter_stuge.html,http://media.ccc.de/browse/congress/2013/30C3_-_5529_-_en_-_saal_2_-_201312271830_-_hardening_hardware_and_choosing_a_goodbios_-_peter_stuge.html} or directly to the video: @uref{http://mirror.netcologne.de/CCC/congress/2013/webm/30c3-5529-en-Hardening_hardware_and_choosing_a_goodBIOS_webm.webm,http://mirror.netcologne.de/CCC/congress/2013/webm/30c3-5529-en-Hardening_hardware_and_choosing_a_goodBIOS_webm.webm}.
  4993. A lot of this tutorial is based on that video. Look towards the second half of the video to see how to do the above.
  4994. @node Also not covered yet - T60
  4995. @ifinfo
  4996. @subsubheading Also not covered yet
  4997. @end ifinfo
  4998. @itemize
  4999. @item
  5000. Intrusion detection: randomized seal on screws@* Just put nail polish with lot of glider on the important screws, take some good pictures. Keep the pictueres and make sure of their integrity. Compare the nail polish with the pictures before powering on the laptop.
  5001. @item
  5002. Tips about preventing/mitigating risk of cold boot attack.
  5003. @itemize
  5004. @item
  5005. soldered RAM?
  5006. @item
  5007. wipe all RAM at boot/power-off/power-on? (patch in coreboot upstream?)
  5008. @item
  5009. ask gnutoo about fallback patches (counts number of boots)
  5010. @end itemize
  5011. @item
  5012. General tips/advice and web links showing how to detect physical intrusions.
  5013. @item
  5014. For example: @uref{http://cs.tau.ac.il/~tromer/acoustic/,http://cs.tau.ac.il/~tromer/acoustic/} or @uref{http://cyber.bgu.ac.il/content/how-leak-sensitive-data-isolated-computer-air-gap-near-mobile-phone-airhopper,http://cyber.bgu.ac.il/content/how-leak-sensitive-data-isolated-computer-air-gap-near-mobile-phone-airhopper}.
  5015. @item
  5016. @uref{https://en.wikipedia.org/wiki/Tempest_%28codename%29,https://en.wikipedia.org/wiki/Tempest_%28codename%29}
  5017. @item
  5018. https://gitorious.org/gnutoo-for-coreboot/grub-assemble/source/a61f636797777a742f65f4c9c58032aa6a9b23c3:
  5019. @end itemize
  5020. @node Extra notes - T60
  5021. @subsubsection Extra notes
  5022. EC: Cannot be removed but can be mitigated: it contains non-free non-loadable code, but it has no access to the computer's RAM. It has access to the on-switch of the wifi, bluetooth, modem and some other power management features. The issue is that it has access to the keyboard, however if the software security howto @strong{(not yet written)} is followed correctly, it won't be able to leak data to a local attacker. It has no network access but it may still be able to leak data remotely, but that requires someone to be nearby to recover the data with the help of an SDR and some directional antennas@xref{video-ccc-t60,,[3]}.
  5023. @uref{http://www.coreboot.org/Intel_82573_Ethernet_controller,Intel 82573 Ethernet controller} on the X60 seems safe, according to Denis.
  5024. @ignore
  5025. @menu
  5026. @c * Risk level - T60::
  5027. @end menu
  5028. @end ignore
  5029. @node Risk level - T60
  5030. @subsubsection Risk level
  5031. @itemize
  5032. @item
  5033. Modem (3g/wwan): highest
  5034. @item
  5035. Intel wifi: Near highest
  5036. @item
  5037. Atheros PCI wifi: unknown, but lower than intel wifi.
  5038. @item
  5039. Microphone: only problematic if the computer gets compromised.
  5040. @item
  5041. Speakers: only problematic if the computer gets compromised.
  5042. @item
  5043. EC: can be mitigated if following the guide on software security.
  5044. @end itemize
  5045. @node Further reading material - software security - T60
  5046. @subsubsection Further reading material (software security)
  5047. @itemize
  5048. @item
  5049. @ref{Installing Trisquel GNU/Linux-libre with full disk encryption,Installing Trisquel GNU/Linux with full disk encryption (including /boot)}
  5050. @item
  5051. @ref{Installing Parabola GNU/Linux-libre with full disk encryption,Installing Parabola GNU/Linux with full disk encryption (including /boot)}
  5052. @item
  5053. @ref{Notes about DMA and the docking station,Notes about DMA access and the docking station}
  5054. @end itemize
  5055. @node References - T60
  5056. @subsubsection References
  5057. @enumerate
  5058. @item
  5059. physical access
  5060. @anchor{physical-access-t60}
  5061. Explain that black hats, TAO, and so on might use a 0day to get in, and explain that in this case it mitigates what the attacker can do. Also the TAO do some evaluation before launching an attack: they take the probability of beeing caught into account, along with the kind of target. A 0day costs a lot of money, I heard that it was from 100000$ to 400000$, some other websites had prices 10 times lower but that but it was probably a typo. So if people increase their security it makes it more risky and more costly to attack people.
  5062. @item
  5063. microphone
  5064. @anchor{microphone-t60}
  5065. It's possible to turn headphones into a microphone, you could try yourself, however they don't record loud at all. Also intel cards have the capability to change a connector's function, for instance the microphone jack can now become a headphone plug, that's called retasking. There is some support for it in GNU/Linux but it's not very well known.
  5066. @item
  5067. Video (CCC)
  5068. @anchor{video-ccc-t60}
  5069. 30c3-5356-en-Firmware_Fat_Camp_webm.webm from the 30th CCC. While their demo is experimental(their hardware also got damaged during the transport), the spies probably already have that since a long time. @uref{http://berlin.ftp.media.ccc.de/congress/2013/webm/30c3-5356-en-Firmware_Fat_Camp_webm.webm,http://berlin.ftp.media.ccc.de/congress/2013/webm/30c3-5356-en-Firmware_Fat_Camp_webm.webm}
  5070. @end enumerate
  5071. @c @bye
  5072. @node Notes about DMA and the docking station
  5073. @subsection Notes about DMA access and the docking station
  5074. @verbatim
  5075. Use case:
  5076. ---------
  5077. Usually when people do full disk encryption, it's not really full disk,
  5078. instead they still have a /boot in clear.
  5079. So an evil maid attack can still be done, in two passes:
  5080. 1) Clone the hdd, Infect the initramfs or the kernel.
  5081. 2) Wait for the user to enter its password, recover the password,
  5082. luksOpen the hdd image.
  5083. I wanted a real full-disk encryption so I've put grub in flash and I
  5084. have the following: The HDD has a LUKS rootfs(containing /boot) on an
  5085. lvm partition, so no partition is in clear.
  5086. So when the computer boots it executes coreboot, then grub as a payload.
  5087. Grub then opens the LUKS partition and loads the kernel and initramfs
  5088. from there.
  5089. To prevent hardware level tempering(like reflashing), I used nail
  5090. polish with a lot of gilder, that acts like a seal. Then a high
  5091. resolution picture of it is taken, to be able to tell the difference.
  5092. The problem:
  5093. ------------
  5094. But then comes the docking port issue: Some LPC pins are exported
  5095. there, such as the CLKRUN and LDRQ#.
  5096. LDRQ# is "Encoded DMA/Bus Master Request": "Only needed by
  5097. peripherals that need DMA or bus mastering. Requires an
  5098. individual signal per peripheral. Peripherals may not share
  5099. an LDRQ# signal."
  5100. So now DMA access is possible trough the dock connector.
  5101. So I want to be able to turn that off.
  5102. If I got it right, the X60 has 2 superio, one is in the dock, and the
  5103. other one is in the laptop, so we have:
  5104. ________________
  5105. _________________ | |
  5106. | | | Dock connector:|
  5107. |Dock: NSC pc87982|<--LPC--->D_LPC_DREQ0 |
  5108. |_________________| |_______^________|
  5109. |
  5110. |
  5111. |
  5112. |
  5113. ___________________|____
  5114. | v |
  5115. | SuperIO: DLDRQ# |
  5116. | NSC pc87382 LDRQ# |
  5117. |___________________^____|
  5118. |
  5119. |
  5120. |
  5121. |
  5122. ___________________|___
  5123. | v |
  5124. | Southbridge: LDRQ0 |
  5125. | ICH7 |
  5126. |_______________________|
  5127. The code:
  5128. ---------
  5129. Now if I look at the existing code, there is some superio drivers, like
  5130. pc87382 in src/superio/nsc, the code is very small.
  5131. The only interesting part is the pnp_info pnp_dev_info struct.
  5132. Now if I look inside src/mainboard/lenovo/x60 there is some more
  5133. complete dock driver:
  5134. Inside dock.c I see some dock_connect and dock_disconnect functions.
  5135. Such functions are called during the initialisation (romstage.c) and
  5136. from the X60 SMI handler (smihandler.c).
  5137. Questions:
  5138. ----------
  5139. 1) Would the following be sufficent to prevent DMA access from the
  5140. outside:
  5141. > int dock_connect(void)
  5142. > {
  5143. > int timeout = 1000;
  5144. > + int val;
  5145. > +
  5146. > + if (get_option(&val, "dock") != CB_SUCCESS)
  5147. > + val = 1;
  5148. > + if (val == 0)
  5149. > + return 0;
  5150. > [...]
  5151. > }
  5152. >
  5153. > void dock_disconnect(void) {
  5154. > + if (dock_present())
  5155. > + return;
  5156. > [...]
  5157. > }
  5158. 2) Would an nvram option be ok for that? Should a Kconfig option be
  5159. added too?
  5160. > config DOCK_AUTODETECT
  5161. > bool "Autodetect"
  5162. > help
  5163. > The dock is autodetected. If unsure select this option.
  5164. >
  5165. > config DOCK_DISABLED
  5166. > bool "Disabled"
  5167. > help
  5168. > The dock is always disabled.
  5169. >
  5170. > config DOCK_NVRAM_ENABLE
  5171. > bool "Nvram"
  5172. > help
  5173. > The dock autodetection is tried only if it is also enabled
  5174. > trough nvram.
  5175. @end verbatim
  5176. @node Hardware maintenance
  5177. @section Hardware maintenance
  5178. This section relates to hardware maintenance on supported targets.
  5179. @menu
  5180. * ThinkPad X60/X60s/X60T Change keyboard::
  5181. * ThinkPad X60/X60S Change the fan/heatsink::
  5182. * ThinkPad X60/X60s How to change the LCD panel::
  5183. * ThinkPad T60 15.1" changing LCD panel::
  5184. * ThinkPad T60 change the fan/heatsink::
  5185. @end menu
  5186. @node ThinkPad X60/X60s/X60T Change keyboard
  5187. @subsection ThinkPad X60/X60s/X60T Change keyboard
  5188. Use this guide to replace the keyboard on your ThinkPad X60. Also works for X60s and X60 Tablet.
  5189. Although slightly different, this guide can also be followed for the ThinkPad X200, X200S and X200 Tablet. The screws are in more or less the same place, and it's the same procedure.
  5190. Just follow these steps and then reverse.
  5191. This tutorial is incomplete, and only pictures for now.
  5192. @image{@value{docsdir}images/x60_keyboard/1,,,,JPG}@*
  5193. @image{@value{docsdir}images/x60_keyboard/2,,,,JPG}@*
  5194. @image{@value{docsdir}images/x60_keyboard/3,,,,JPG}@*
  5195. @image{@value{docsdir}images/x60_keyboard/4,,,,JPG}@*
  5196. @image{@value{docsdir}images/x60_keyboard/5,,,,JPG}
  5197. @node ThinkPad X60/X60S Change the fan/heatsink
  5198. @subsection Changing the fan/heatsink on the ThinkPad X60
  5199. This guide will teach you how to replace the fan and heatsink on your ThinkPad X60.
  5200. @menu
  5201. * Hardware requirements - X60 heatsink::
  5202. * Software requirements for CPU stress testing - X60 heatsink::
  5203. * Disassembly::
  5204. @end menu
  5205. @node Hardware requirements - X60 heatsink
  5206. @subsubsection Hardware requirements
  5207. @itemize
  5208. @item
  5209. isopropyl alcohol (sometimes called rubbing alcohol)
  5210. @item
  5211. your new fan and/or heatsink
  5212. @item
  5213. CPU thermal compound (some say Arctic MX-4 is good, others are also 'ok')
  5214. @item
  5215. Something to spread the paste with
  5216. @end itemize
  5217. @node Software requirements for CPU stress testing - X60 heatsink
  5218. @subsubsection Software requirements (for CPU stress testing)
  5219. @itemize
  5220. @item
  5221. xsensors utility
  5222. @item
  5223. stress utility
  5224. @end itemize
  5225. @node Disassembly
  5226. @subsubsection Disassembly
  5227. Remove those screws:@* @image{@value{docsdir}images/x60_heatsink/0000,,,,jpg}
  5228. Push the keyboard forward (carefully):@* @image{@value{docsdir}images/x60_heatsink/0001,,,,jpg}
  5229. Lift the keyboard up and disconnect it from the board:@* @image{@value{docsdir}images/x60_heatsink/0002,,,,jpg}
  5230. Grab the right-hand side of the chassis and force it off (gently) and pry up the rest of the chassis:@* @image{@value{docsdir}images/x60_heatsink/0003,,,,jpg}
  5231. You should now have this:@* @image{@value{docsdir}images/x60_heatsink/0004,,,,jpg}
  5232. Disconnect the wifi antenna cables, the modem cable and the speaker:@* @image{@value{docsdir}images/x60_heatsink/0005,,,,jpg}
  5233. Unroute the cables along their path, carefully lifting the tape that holds them in place. Then, disconnect the modem cable (other end) and power connection and unroute all the cables so that they dangle by the monitor hinge on the right-hand side:@* @image{@value{docsdir}images/x60_heatsink/0006,,,,jpg}
  5234. Disconnect the monitor from the motherboard, and unroute the grey antenna cable, carefully lifting the tape that holds it into place:@* @image{@value{docsdir}images/x60_heatsink/0008,,,,jpg}
  5235. Carefully lift the remaining tape and unroute the left antenna cable so that it is loose:@* @image{@value{docsdir}images/x60_heatsink/0009,,,,jpg}
  5236. Remove those screws:@* @image{@value{docsdir}images/x60_heatsink/0011,,,,jpg}
  5237. Remove those screws:@* @image{@value{docsdir}images/x60_heatsink/0012,,,,jpg}
  5238. Carefully remove the plate, like so:@* @image{@value{docsdir}images/x60_heatsink/0013,,,,jpg}
  5239. Remove the SATA connector:@* @image{@value{docsdir}images/x60_heatsink/0014,,,,jpg}
  5240. Now remove the motherboard (gently) and cast the lcd/chassis aside:@* @image{@value{docsdir}images/x60_heatsink/0015,,,,jpg}
  5241. Look at that black tape above the heatsink, remove it:@* @image{@value{docsdir}images/x60_heatsink/0016,,,,jpg}
  5242. Now you have removed it:@* @image{@value{docsdir}images/x60_heatsink/0017,,,,jpg}
  5243. Disconnect the fan and remove all the screws, heatsink will easily come off:@* @image{@value{docsdir}images/x60_heatsink/0018,,,,jpg}
  5244. Remove the old paste with a cloth (from the CPU and heatsink) and then clean both of them with the alcohol (to remove remaining residue of the paste). Apply a pea-sized amount of paste to the both chipsets that the heatsink covered and spread it evenly (uniformally). Finally reinstall the heatsink, reversing previous steps.
  5245. @strong{stress -c 2} command can be used to push the CPU to 100%, and @strong{xsensors} (or @strong{watch sensors} command) can be used to monitor heat. Below 90C is ok.
  5246. @node ThinkPad X60/X60s How to change the LCD panel
  5247. @subsection ThinkPad X60/X60s How to change the LCD panel
  5248. This tutorial is incomplete, and only pictures for now.
  5249. @image{@value{docsdir}images/x60_lcd_change/0001,,,,JPG}
  5250. @image{@value{docsdir}images/x60_lcd_change/0002,,,,JPG}
  5251. @image{@value{docsdir}images/x60_lcd_change/0003,,,,JPG}
  5252. @image{@value{docsdir}images/x60_lcd_change/0004,,,,JPG}
  5253. @image{@value{docsdir}images/x60_lcd_change/0005,,,,JPG}
  5254. @image{@value{docsdir}images/x60_lcd_change/0006,,,,JPG}
  5255. @image{@value{docsdir}images/x60_lcd_change/0007,,,,JPG}
  5256. @node ThinkPad T60 15.1" changing LCD panel
  5257. @subsection ThinkPad T60 15.1" changing LCD panel
  5258. This is for the 15.1" T60. If you have another size then the procedure will differ; for example, on 14.1" you have to remove the hinges and the procedure is a bit more involved than on 15.1".
  5259. @menu
  5260. * Disassembly - T60 LCD::
  5261. @end menu
  5262. @node Disassembly - T60 LCD
  5263. @subsubsection Disassembly
  5264. Remove those covers and unscrew:@* @image{@value{docsdir}images/t60_dev/0059,,,,JPG} @image{@value{docsdir}images/t60_dev/0060,,,,JPG} @image{@value{docsdir}images/t60_dev/0061,,,,JPG}
  5265. Gently pry off the front bezel.
  5266. Remove inverter board:@* @image{@value{docsdir}images/t60_dev/0064,,,,JPG}
  5267. Disconnect LCD cable:@* @image{@value{docsdir}images/t60_dev/0065,,,,JPG}
  5268. Remove the panel:@* @image{@value{docsdir}images/t60_dev/0066,,,,JPG}
  5269. Move the rails (left and right side) from the old panel to the new one and then attach LCD cable:@* @image{@value{docsdir}images/t60_dev/0068,,,,JPG}
  5270. Insert panel (this one is an LG-Philips LP150E05-A2K1, and there are others. See @ref{Supported T60 list,supported_t60_list}):@* @image{@value{docsdir}images/t60_dev/0069,,,,JPG}
  5271. Insert new inverter board (see @ref{Supported T60 list,supported_t60_list} for what is recommended on your LCD panel):@* @image{@value{docsdir}images/t60_dev/0070,,,,JPG}
  5272. Now re-attach the front bezel and put all the screws in.
  5273. It lives!@* @image{@value{docsdir}images/t60_dev/0071,,,,JPG} @image{@value{docsdir}images/t60_dev/0072,,,,JPG} @image{@value{docsdir}images/t60_dev/0073,,,,JPG}
  5274. @node ThinkPad T60 change the fan/heatsink
  5275. @subsection ThinkPad T60 change the fan/heatsink
  5276. Using this guide you can also change/upgrade the CPU.
  5277. @menu
  5278. * Hardware requirements - T60 heatsink::
  5279. * Software requirements - T60 heatsink::
  5280. * Disassembly - T60 heatsink::
  5281. @end menu
  5282. @node Hardware requirements - T60 heatsink
  5283. @subsubsection Hardware requirements - T60 heatsink
  5284. @itemize
  5285. @item
  5286. rubbing alcohol or isopropyl alcohol, and thermal compound for changing CPU heatsink (procedure involves removing heatsink)
  5287. @item
  5288. thermal compound/paste (Arctic MX-4 is good. Others are also good.)
  5289. @end itemize
  5290. @node Software requirements - T60 heatsink
  5291. @subsubsection Software requirements - T60 heatsink
  5292. @itemize
  5293. @item
  5294. xsensors
  5295. @item
  5296. stress
  5297. @end itemize
  5298. @node Disassembly - T60 heatsink
  5299. @subsubsection Disassembly - T60 heatsink
  5300. Remove those screws and remove the HDD:@* @image{@value{docsdir}images/t60_dev/0001,,,,JPG} @image{@value{docsdir}images/t60_dev/0002,,,,JPG}
  5301. Lift off the palm rest:@* @image{@value{docsdir}images/t60_dev/0003,,,,JPG}
  5302. Lift up the keyboard, pull it back a bit, flip it over like that and then disconnect it from the board:@* @image{@value{docsdir}images/t60_dev/0004,,,,JPG} @image{@value{docsdir}images/t60_dev/0005,,,,JPG} @image{@value{docsdir}images/t60_dev/0006,,,,JPG}
  5303. Gently wedge both sides loose:@* @image{@value{docsdir}images/t60_dev/0007,,,,JPG} @image{@value{docsdir}images/t60_dev/0008,,,,JPG}
  5304. Remove that cable from the position:@* @image{@value{docsdir}images/t60_dev/0009,,,,JPG} @image{@value{docsdir}images/t60_dev/0010,,,,JPG}
  5305. Remove the bezel (sorry forgot to take pics).
  5306. On the CPU (and there is another chip south-east to it, sorry forgot to take pic) clean off the old thermal paste (with the alcohol) and apply new (Artic Silver 5 is good, others are good too) you should also clean the heatsink the same way@* @image{@value{docsdir}images/t60_dev/0051,,,,JPG}
  5307. This is also an opportunity to change the CPU to another one. For example if you had a Core Duo T2400, you can upgrade it to a better processor (higher speed, 64-bit support). A Core 2 Duo T7600 was installed here.
  5308. Attach the heatsink and install the screws (also, make sure to install the AC jack as highlighted):@* @image{@value{docsdir}images/t60_dev/0052,,,,JPG}
  5309. Reinstall that upper bezel:@* @image{@value{docsdir}images/t60_dev/0053,,,,JPG}
  5310. Do that:@* @image{@value{docsdir}images/t60_dev/0054,,,,JPG} @image{@value{docsdir}images/t60_dev/0055,,,,JPG}
  5311. Attach keyboard:@* @image{@value{docsdir}images/t60_dev/0056,,,,JPG}
  5312. Place keyboard and (sorry, forgot to take pics) reinstall the palmrest and insert screws on the underside:@* @image{@value{docsdir}images/t60_dev/0058,,,,JPG}
  5313. It lives!@* @image{@value{docsdir}images/t60_dev/0071,,,,JPG} @image{@value{docsdir}images/t60_dev/0072,,,,JPG} @image{@value{docsdir}images/t60_dev/0073,,,,JPG}
  5314. Always stress test ('stress -c 2' and xsensors. below 90C is ok) when replacing cpu paste/heatsink:@* @image{@value{docsdir}images/t60_dev/0074,,,,JPG}
  5315. @node Depthcharge
  5316. @section Depthcharge payload
  5317. This section relates to the depthcharge payload used in libreboot.
  5318. @menu
  5319. * CrOS security model::
  5320. * Developer mode screen::
  5321. * Recovery mode screen::
  5322. * Configuring verified boot parameters for depthcharge::
  5323. @end menu
  5324. @node CrOS security model
  5325. @subsection CrOS security model
  5326. CrOS (Chromium OS/Chrome OS) devices such as Chromebooks implement a strict security model to ensure that these devices do not become compromised, that is implemented as the verified boot (vboot) reference, most of which is executed within depthcharge. A detailed overview of the CrOS security model is available on the dedicated page.
  5327. In spite of the CrOS security model, depthcharge won't allow booting kernels without verifying their signature and booting from external media or legacy payload unless explicitly allowed: see @xref{Configuring verified boot parameters for depthcharge,configuring verified boot parameters}.
  5328. @node Developer mode screen
  5329. @subsection Developer mode screen
  5330. The developer mode screen can be accessed in depthcharge when developer mode is enabled.@* Developer mode can be enabled from the @xref{Recovery mode screen,recovery mode screen}.
  5331. It allows booting normally, booting from internal storage, booting from external media (when enabled), booting from legacy payload (when enabled), showing information about the device and disabling developer mode.
  5332. @menu
  5333. * Holding the developer mode screen::
  5334. * Booting normally::
  5335. * Booting from different mediums::
  5336. * Showing device information::
  5337. * Warnings::
  5338. @end menu
  5339. @node Holding the developer mode screen
  5340. @subsubsection Holding the developer mode screen
  5341. As instructed on the developer mode screen, the screen can be held by pressing @strong{Ctrl + H} in the first 3 seconds after the screen is shown. After that delay, depthcharge will resume booting normally.
  5342. @node Booting normally
  5343. @subsubsection Booting normally
  5344. As instructed on the developer mode screen, a regular boot will happen after @strong{3 seconds} (if developer mode screen is not held).@* The default boot medium (internal storage, external media, legacy payload) is shown on screen.
  5345. @node Booting from different mediums
  5346. @subsubsection Booting from different mediums
  5347. Depthcharge allows booting from different mediums, when they are allowed (see @xref{Configuring verified boot parameters for depthcharge,configuring verified boot parameters}, to enable or disable boot mediums).@* As instructed on the developer mode screen, booting from various mediums can be triggered by pressing various key combinations:
  5348. @itemize
  5349. @item
  5350. Internal storage: @strong{Ctrl + D}
  5351. @item
  5352. External media: @strong{Ctrl + U} (when enabled)
  5353. @item
  5354. Legacy payload: @strong{Ctrl + L} (when enabled)
  5355. @end itemize
  5356. @node Showing device information
  5357. @subsubsection Showing device information
  5358. As instructed on the developer mode screen, showing device information can be triggered by pressing @strong{Ctrl + I} or @strong{Tab}.@* Various information is shown, including vboot non-volatile data, TPM status, GBB flags and key hashes.@*
  5359. @node Warnings
  5360. @subsubsection Warnings
  5361. The developer mode screen will show warnings when:
  5362. @itemize
  5363. @item
  5364. Booting kernels without verifying their signature is enabled
  5365. @item
  5366. Booting from external media is enabled
  5367. @item
  5368. Booting legacy payloads is enabled
  5369. @end itemize
  5370. @node Recovery mode screen
  5371. @subsection Recovery mode screen
  5372. The recovery mode screen can be accessed in depthcharge, by pressing @strong{Escape + Refresh + Power} when the device is off.
  5373. It allows recovering the device from a bad state by booting from a trusted recovery media. When accessed with the device in a good state, it also allows enabling developer mode.
  5374. @menu
  5375. * Recovering from a bad state::
  5376. * Enabling developer mode::
  5377. @end menu
  5378. @node Recovering from a bad state
  5379. @subsubsection Recovering from a bad state
  5380. When the device fails to verify the signature of a piece of the boot software or when an error occurs, it is considered to be in a bad state and will instruct the user to reboot to recovery mode.@* Recovery mode boots using only software located in write-protected memory, that is considered to be trusted and safe.
  5381. Recovery mode then allows recovering the device by booting from a trusted recovery media, that is automatically detected when recovery mode starts. When no external media is found or when the recovery media is invalid, instructions are shown on screen. @* Trusted recovery media are external media (USB drives, SD cards, etc) that hold a kernel signed with the recovery key.
  5382. Google provides images of such recovery media for Chrome OS (which are not advised to users as they contain proprietary software). @* They are signed with Google's recovery keys, that are pre-installed on the device when it ships.
  5383. When replacing the full flash of the device, the pre-installed keys are replaced. When the recovery private key is available (e.g. when using self-generated keys), it can be used to sign a kernel for recovery purposes.
  5384. @node Enabling developer mode
  5385. @subsubsection Enabling developer mode
  5386. As instructed on the recovery mode screen, developer mode can be enabled by pressing @strong{Ctrl + D}.@* Instructions to confirm enabling developer mode are then shown on screen.
  5387. @node Configuring verified boot parameters for depthcharge
  5388. @subsection Configuring verified boot parameters
  5389. Depthcharge's behavior relies on the verified boot (vboot) reference implementation, that can be configured with parameters stored in the verified boot non-volatile storage.@* These parameters can be modified with the @strong{crossystem} tool, that requires sufficient privileges to access the verified boot non-volatile storage.
  5390. @strong{crossystem} relies on @strong{mosys}, that is used to access the verified boot non-volatile storage on some devices. @strong{crossystem} and @strong{mosys} are both free software and their source code is made available by Google: @uref{https://chromium.googlesource.com/chromiumos/platform/vboot_reference/,crossystem}. @uref{https://chromium.googlesource.com/chromiumos/platform/mosys/,mosys}.@* These tools are not distributed along with Libreboot yet. However, they are preinstalled on the device, with ChromeOS.
  5391. Some of these parameters have the potential of @strong{weakening the security of the device}. In particular, disabling kernels signature verification, external media boot and legacy payload boot can weaken the security of the device.
  5392. The following parameters can be configured:
  5393. @itemize
  5394. @item
  5395. Kernels signature verification:
  5396. @itemize @minus
  5397. @item
  5398. Enabled with:@* # @strong{crossystem dev_boot_signed_only=1}
  5399. @item
  5400. Disabled with:@* # @strong{crossystem dev_boot_signed_only=0}
  5401. @end itemize
  5402. @item
  5403. External media boot:
  5404. @itemize @minus
  5405. @item
  5406. Enabled with:@* # @strong{crossystem dev_boot_usb=1}
  5407. @item
  5408. Disabled with:@* # @strong{crossystem dev_boot_usb=0}
  5409. @end itemize
  5410. @item
  5411. Legacy payload boot:
  5412. @itemize @minus
  5413. @item
  5414. Enabled with:@* # @strong{crossystem dev_boot_legacy=1}
  5415. @item
  5416. Disabled with:@* # @strong{crossystem dev_boot_legacy=0}
  5417. @end itemize
  5418. @item
  5419. Default boot medium:
  5420. @itemize @minus
  5421. @item
  5422. Internal storage:@* # @strong{crossystem dev_default_boot=disk}
  5423. @item
  5424. External media:@* # @strong{crossystem dev_default_boot=usb}
  5425. @item
  5426. Legacy payload:@* # @strong{crossystem dev_default_boot=legacy}
  5427. @end itemize
  5428. @end itemize
  5429. @node GRUB
  5430. @section Grub payload
  5431. This section relates to the GRUB payload used in libreboot.
  5432. @menu
  5433. * Changing the background image in GRUB::
  5434. * Setting font in GRUB - for reference::
  5435. * GRUB keyboard layouts - for reference::
  5436. @end menu
  5437. @node Changing the background image in GRUB
  5438. @subsection Changing the background image in GRUB
  5439. cbfstool is found in coreboot under util/, and can be compiled.
  5440. ./cbfstool yourrom.rom remove background.png -n background.png@* ./cbfstool yourrom.rom add -f background.png -n background.png -t raw
  5441. When you've done this, re-flash your ROM and you should have a new background at boot time.
  5442. @node Setting font in GRUB - for reference
  5443. @subsection Setting font in GRUB (for reference)
  5444. You don't need to do this unless you would like to change the default font yourself. (this is just for reference. It has already been done for you)
  5445. The old font used was Unifont, and this had some missing characters: for instance, the border showed ??? characters instead of lines.
  5446. I tried DeJavu Sans Mono from this website: @uref{http://dejavu-fonts.org/wiki/Download,dejavu-fonts.org}
  5447. Specifically, the version that I chose was the latest at the time of writing (Saturday 21 June 2014): @uref{http://sourceforge.net/projects/dejavu/files/dejavu/2.34/dejavu-fonts-ttf-2.34.tar.bz2,this one}
  5448. This is a free font that is also contained in GNU/Linux distributions like Trisquel or Parabola.
  5449. @strong{$ cd libreboot_src/grub}@* compile grub (the build scripts info on how to do this)@* come back out into libreboot_src/resources/grub:@* @strong{$ cd ../libreboot_src/resources/grub/font}
  5450. I took Dejavu Sans Mono from dejavu (included in this version of libreboot) and did:@* @strong{$ ../../../grub/grub-mkfont -o dejavusansmono.pf2 dejavu-fonts-ttf-2.34/ttf/DejaVuSansMono.ttf}
  5451. I then added the instructions to 'gen.sh' script in grub-assemble to include resources/grub/dejavusansmono.pf2 in all of the ROM images, at the root of the GRUB memdisk.@* I then added that instructions to the grub.cfg files (to load the font):@* @strong{loadfont (memdisk)/dejavusansmono.pf2}
  5452. @node GRUB keyboard layouts - for reference
  5453. @subsection GRUB keyboard layouts (for reference)
  5454. @menu
  5455. * Custom keyboard layout in GRUB - for reference::
  5456. * UK Dvorak keyboard layout in GRUB - for reference::
  5457. @end menu
  5458. @node Custom keyboard layout in GRUB - for reference
  5459. @subsubsection Custom keyboard layout in GRUB (for reference)
  5460. Keymaps are stored in resources/utilities/grub-assemble/keymap/.
  5461. Example (French Azerty):@* @strong{$ ckbcomp fr > frazerty}@*@* Go in grub directory:@* @strong{cat frazerty | ./grub/grub-mklayout -o frazerty.gkb}
  5462. You must make sure that the files are named keymap and keymap.gkb (where 'keymap' can be whatever you want).
  5463. Then from the above example, you would put @strong{frazerty} in @strong{resources/utilities/grub-assemble/keymap/original/} and the @strong{frazerty.gkb} file goes under @strong{resources/utilities/grub-assemble/keymap/}
  5464. The build scripts will automatically see this, and automatically build ROM images with your custom layout (given the name) and include them under bin. Example: @strong{libreboot_frazerty.rom}.
  5465. @node UK Dvorak keyboard layout in GRUB - for reference
  5466. @subsubsection UK Dvorak keyboard layout in GRUB (for reference)
  5467. ukdvorak had to be created manually, based on usdvorak. diff them (under resources/utilities/grub-assemble/keymap/original) to see how ukdvorak file was created
  5468. @strong{$ cat ukdvorak | ./grub/grub-mklayout -o ukdvorak.gkb}
  5469. @node Miscellaneous
  5470. @section Miscellaneous
  5471. @menu
  5472. * High Pitched Whining Noise on Idle - Trisquel 7::
  5473. * High Pitched Whining Noise on Idle - Parabola::
  5474. * X60/T60 Serial port - how to use:: for dock owners
  5475. * Power Management Beeps on Thinkpads::
  5476. * Finetune backlight control::
  5477. * Get EDID - Find out the name of your LCD panel::
  5478. @end menu
  5479. @node High Pitched Whining Noise on Idle - Trisquel 7
  5480. @subsection High Pitched Whining Noise on Idle (how to remove in Trisquel 7)
  5481. @ignore
  5482. @menu
  5483. * Start powertop automatically at boot time::
  5484. @end menu
  5485. @end ignore
  5486. Start powertop automatically at boot time:
  5487. Included with libreboot is a script called 'powertop.trisquel7'. Run this as root and it will setup powertop to run with --auto-tune at boot time. Load the file in your text editor to see how it does that.
  5488. $ @strong{sudo ./resources/scripts/misc/poertop.trisquel7}
  5489. Might want to run with --calibrate first
  5490. If powertop doesn't work, another way (reduces battery life slightly) is to add @emph{processor.max_cstate=2} to the @emph{linux} line in grub.cfg, using @ref{How to replace the default GRUB configuration file on a libreboot system,this guide}.
  5491. @node High Pitched Whining Noise on Idle - Parabola
  5492. @subsection High Pitched Whining Noise on Idle (how to remove in Parabola)
  5493. The folloing removes most of the noise. It reduces what is a high frequency whine (that not everyone can hear) to a slight buzz (which most people can't hear or doesn't bother most people).
  5494. This is not perfect! The full solution is still not discovered but this is a step towards that. Also, in some instances you will need to run 'sudo poertop --auto-tune' again. This needs to be implemented properly in coreboot itself!
  5495. On the X60 with coreboot or libreboot, there is a high pitched sound when idle. So far we have use processor.max_cstate=2 or idle=halt in GRUB. These consume power. Stop using them!
  5496. Be root@* @strong{$ su -}
  5497. Installed powertop:@* @strong{# pacman -S powertop}
  5498. and added the folloing to /etc/systemd/system/powertop.service :
  5499. @verbatim
  5500. [Unit]
  5501. Description=Powertop tunings
  5502. [Service]
  5503. Type=oneshot
  5504. RemainAfterExit=no
  5505. ExecStart=/usr/bin/powertop --auto-tune
  5506. # "powertop --auto-tune" still needs a terminal for some reason. Possibly a bug?
  5507. Environment="TERM=xterm"
  5508. [Install]
  5509. WantedBy=multi-user.target
  5510. @end verbatim
  5511. Finally, as root do that:@* @strong{# systemctl enable powertop}@* @strong{# systemctl start powertop}
  5512. The next time you boot the system, the buzz will be gone.
  5513. Might want to run with --calibrate first
  5514. If powertop doesn't work, another way (reduces battery life slightly) is to add @emph{processor.max_cstate=2} to the @emph{linux} line in grub.cfg, using @ref{How to replace the default GRUB configuration file on a libreboot system,this guide}.
  5515. @node X60/T60 Serial port - how to use
  5516. @subsection X60/T60: Serial port - how to use (for dock owners)
  5517. For the Thinkpad X60 you can use the @strong{"UltraBase X6"} dock (for the X60 Tablet it is called X6 Tablet UltraBase). For the ThinkPad T60, you can use the @strong{"Advanced Mini Dock"}.
  5518. If you are using one of the ROM images with 'serial' in the name, then you have serial port enabled in libreboot and you have memtest86+ included inside the ROM. Connect your null modem cable to the serial port on the dock and connect the other end to a 2nd system using your USB Serial adapter.
  5519. On the 2nd system, you can try this (using GNU Screen):@* @strong{$ sudo screen /dev/ttyUSB0 115200}
  5520. How to quit GNU Screen: Ctrl+A then release and press K, and then press Y.
  5521. There are also others like Minicom but I like GNU Screen.
  5522. By doing this before booting the X60/T60, you will see console output from libreboot. You will also see GRUB displaying on the serial output, and you will be able to see MemTest86+ on the serial output as well. You can also configure your distro so that a terminal (TTY) is accessible from the serial console.
  5523. The folloing guide is for Ubuntu, and can be followed for Trisquel 6.0 which is based on Ubuntu 12.04 (should also work in Trisquel 7, based on Ubuntu 14.04) to enable a serial console using GeTTY:@* @uref{https://help.ubuntu.com/community/SerialConsoleHoto,https://help.ubuntu.com/community/SerialConsoleHoto}
  5524. Note: part of the tutorial above requires changing your grub.cfg. Just change the @strong{linux} line to add instructions for enabling getty. See @ref{How to replace the default GRUB configuration file on a libreboot system,grub_cbfs}.
  5525. @node Power Management Beeps on Thinkpads
  5526. @subsection Power Management Beeps on Thinkpads
  5527. When disconnecting or connecting the charger, a beep occurs. When the battery goes to a critically low charge level, a beep occurs. Nvramtool is included in libreboot, and can be used to enable or disable this behaviour.
  5528. Disable or enable beeps when removing/adding the charger:@* $ @strong{sudo ./nvramtool - power_management_beeps=Enable}@* $ @strong{sudo ./nvramtool - power_management_beeps=Disable}
  5529. Disable or enable beeps when battery is low:@* $ @strong{sudo ./nvramtool - low_battery_beep=Enable}@* $ @strong{sudo ./nvramtool - low_battery_beep=Disable}
  5530. A reboot is required, for these changes to take effect.
  5531. @node Finetune backlight control
  5532. @subsection Finetune backlight control on intel gpu's.
  5533. Sometimes the backlight control value (BLC_PWM_CTL) set by libreboot is not ideal. The result is either flicker, which could cause nausea or epilepsy or an uneven backlight and/or coil whine coming from the display.
  5534. To fix this a different value for the gpu reg BLC_PWM_CTL needs to be set. See p94 of @uref{https://01.org/sites/default/files/documentation/g45_vol_3_register_0_0.pdf} for more information on this reg.
  5535. The tool for setting registry values on intel gpu's is included in intel-gpu-tools. Install intel-gpu-tools: @strong{sudo apt-get install intel-gpu-tools}
  5536. You can set values:
  5537. @* @strong{sudo intel_reg write 0x00061254 <your_value>}
  5538. The value set has the following structure: @*
  5539. bits [31:16] is PWM divider. PWM / PWM_divider = frequency @*
  5540. bits [15:0] is the duty cycle and determines the portion of the backlight modulation frequency. A value of 0 will mean that the display is off. A value equal to the backlight modulation frequency means full on. The value should not be larger than the backlight modulation frequency.
  5541. On displays with a CCFL backlight start from:
  5542. @strong{0x60016001}
  5543. To verify if all modes work as desired use:
  5544. @* @strong{xbacklight -set 10} @*
  5545. and gradually increase until 100. @*
  5546. Displays with a LED backlight need a higher PWM frequency. Do the same thing but start from
  5547. @strong{0x01290129}
  5548. .
  5549. Try setting different values until you have found a value which presents no issue.
  5550. It is important to know that there are four failure modes:
  5551. @* 1. flickering very fast, which could cause epilepsy (frequency is too low. decrease divider)
  5552. @* 2. randomly flickering in random intervals - driver IC cannot keep up with toggling the mosfet (frequency too high, increase divider)
  5553. @* 3. backlight is uneven. (CCFL specific, frequency is too high. increase divider)
  5554. @* 4. frequency is in audible range and causes coils to whine (frequency is too low. decrease divider)
  5555. To check for flickering try moving your laptop while looking at it.
  5556. A higher frequency equals higher power consumption. You want to find the highest good working value for the divider (lowest frequency).
  5557. Next this value should be set at boot:
  5558. either add
  5559. @verbatim
  5560. intel_reg write 0x00061254 <your_ideal_value>
  5561. @end verbatim
  5562. before exit 0 in /etc/rc.local
  5563. or create a systemd service file /etc/systemd/system/backlight.service:
  5564. @verbatim
  5565. [Unit]
  5566. Description=Set BLC_PWM_CTL to a good value
  5567. [Service]
  5568. Type=oneshot
  5569. RemainAfterExit=no
  5570. ExecStart=/usr/bin/intel_reg write 0x00061254 <your_value>
  5571. [Install]
  5572. WantedBy=multi-user.target
  5573. @end verbatim
  5574. Now start and enable it:
  5575. @strong{sudo systemctl start backlight && sudo systemctl enable backlight}
  5576. Special note on i945:
  5577. i945 behaves differently.
  5578. Bit 16 needs to be 1 and the duty cycle is not updated when backlight is changed.
  5579. There are no available datasheets on this target so why it behaves in such a way is not known.
  5580. So to find a working value BLC_PWM_CTL set bit 16 to 1 and make sure PWM divider == duty cycle.
  5581. see https://review.coreboot.org/#/c/10624/ on bit 16.
  5582. The cause of this issue is that i945, in contrast with to GM45, is set to work in BLM Legacy Mode. This makes backlight more complicated since the duty cycle is derived from 3 instead of 2 registers using the following formula:
  5583. @verbatim
  5584. if(BPC[7:0] <> xFF) then BPCR[15:0] * BPC[7:0] Else BPCR[15:0]
  5585. @end verbatim
  5586. BPC is LBB - PCI Backlight Control Register, described on http://www.mouser.com/pdfdocs/945gmedatasheet.pdf on page 315.
  5587. BPCR is BLC_PWM_CTL described in https://01.org/sites/default/files/documentation/g45_vol_3_register_0_0.pdf on page 94.
  5588. More research needs to be done on this target so proceed with care.
  5589. @node Get EDID - Find out the name of your LCD panel
  5590. @subsection Get EDID: Find out the name (model) of your LCD panel
  5591. Get the panel name with @strong{sudo get-edid | strings}@* Or look in @strong{/sys/class/drm/card0-LVDS-1/edid}
  5592. Alternatively you can use i2cdump. In Trisquel, this is in the package i2c-tools.@* $ @strong{sudo modprobe i2c-dev}@* $ @strong{sudo i2cdump -y 5 0x50} (you might have to change the value for -y)@* $ @strong{sudo rmmod i2c-dev}@* You'll see the panel name in the output (from the EDID dump).
  5593. If neither of these options work (or they are unavailable), physically removing the LCD panel is an option. Usually, there will be information printed on the back.
  5594. @node USB keyboard wakeup on GM45 laptops
  5595. Look at resources/scripts/helpers/misc/libreboot_usb_bugfix
  5596. Put this script in /etc/init.d/ on debian-based systems.
  5597. @node About the libreboot project
  5598. @chapter About the libreboot project
  5599. GNU Libreboot is a free BIOS or UEFI replacement (@uref{https://www.gnu.org/philosophy/free-sw.html,free as in freedom}); libre @i{boot firmware} that initializes the hardware and starts a bootloader for your operating
  5600. system.
  5601. It's also an open source BIOS, but open source @uref{https://www.gnu.org/philosophy/open-source-misses-the-point.html,fails} to promote freedom; @i{please call libreboot @strong{@uref{https://www.gnu.org/philosophy/free-sw.html,free software}}}.
  5602. Since 14 May 2016, Libreboot is part of the @uref{https://www.gnu.org/,GNU project}.
  5603. Libreboot originally began during December 2013, as a commercial effort by the @uref{https://minifree.org/,Ministry of Freedom} to achieve @uref{https://www.fsf.org/resources/hw/endorsement/respects-your-freedom,RYF} endorsement for a modified ThinkPad X60 (the first system to ever be added to libreboot).
  5604. Back then, the name @emph{libreboot} didn't exist; the project was nameless, referring to itself as a @emph{deblobbed version of coreboot}. The project named itself libreboot at some point during early 2014, and has since rapidly expanded to support more hardware and become more user-friendly.
  5605. Libreboot is a @uref{http://coreboot.org/,coreboot} distribution (distro) with proprietary software removed, intended to be a @uref{https://www.fsf.org/about/what-is-free-software,free} (libre) `BIOS' replacement for your computer. The project is aimed at users, attempting to make coreboot as easy to use as possible. Read the full @uref{https://www.gnu.org/philosophy/free-sw.html,Free Software definition}.
  5606. Libreboot has many practical advantages over @uref{https://gnu.org/philosophy/proprietary/,proprietary} boot firmware, such as faster boot speeds and better security. You can @ref{GNU/Linux distributions,install GNU/Linux with encrypted /boot/}, @uref{http://www.coreboot.org/GRUB2#signed_kernels,verify GPG signatures on your kernel}, put a kernel in the flash chip and more.
  5607. @menu
  5608. * The libreboot project has three main goals::
  5609. * Libreboot is a coreboot distribution not a coreboot fork::
  5610. * Libreboot is a 'stable' version of coreboot::
  5611. @end menu
  5612. @node The libreboot project has three main goals
  5613. @section The libreboot project has three main goals:
  5614. @itemize
  5615. @item
  5616. @emph{@strong{Recommend and distribute only free software}}. Coreboot distributes certain pieces of proprietary software which is needed on some systems. Examples can include things like CPU microcode updates, memory initialization blobs and so on. The coreboot project sometimes recommends adding more blobs which it does not distribute, such as the Video BIOS or Intel's @emph{Management Engine}. However, a lot of dedicated and talented individuals in coreboot work hard to replace these blobs whenever possible.
  5617. @item
  5618. @emph{@strong{Support as much hardware as possible!}} Libreboot supports less hardware than coreboot, because most systems from coreboot still require certain proprietary software to work properly. Libreboot is an attempt to support as much hardware as possible, without any proprietary software.
  5619. @item
  5620. @emph{@strong{Make coreboot easy to use}}. Coreboot is notoriously difficult to install, due to an overall lack of user-focussed documentation and support. Most people will simply give up before attempting to install coreboot.@*@* Libreboot attempts to bridge this divide, making sure that everything from building to installing coreboot is automated, as much as is feasibly possible. Secondly, the project produces documentation aimed at non-technical users. Thirdly, the project attempts to provide excellent user support via mailing lists and IRC.@*@* Libreboot already comes with a payload (GRUB), flashrom and other needed parts. Everything is fully integrated, in a way where most of the complicated steps that are otherwise required, are instead done for the user in advance.@*@* You can download ROM images for your libreboot system and install them, without having to build anything from source. The build system is also fully automated, so building from source is easy if you wanted to do that (for whatever reason).
  5621. @end itemize
  5622. @node Libreboot is a coreboot distribution not a coreboot fork
  5623. @section Libreboot is a coreboot distribution, not a coreboot fork
  5624. Libreboot is not a fork of coreboot. Every so often, the project re-bases on the latest version of coreboot, with the number of custom patches in use minimized.
  5625. All new coreboot development should be done in coreboot (upstream), not libreboot! Libreboot is about deblobbing and packaging coreboot in a user-friendly way, where most work is already done for the user.
  5626. For example, if you wanted to add a new board to libreboot, you should add it to coreboot first. Libreboot will automatically receive your code at a later date, when it updates itself.
  5627. The deblobbed coreboot tree used in libreboot is referred to as @emph{coreboot-libre}, to distinguish it as a component of @emph{libreboot}.
  5628. @node Libreboot is a 'stable' version of coreboot
  5629. @section Libreboot is a `stable' version of coreboot
  5630. @itemize
  5631. @item
  5632. Coreboot uses the @uref{https://en.wikipedia.org/wiki/Rolling_release,rolling release} model, which means that it is not guaranteed to be stable, or to even work at all on a given day. Coreboot does have a strict code review process, but being such a large project with so many contributors, regressions are always possible.
  5633. @item
  5634. Libreboot freezes on a particular revision of coreboot, making sure that everything works properly, making fixes on top of that and repeating this during each subsequent update to a later version of coreboot. By doing this, it provides a stronger guarantee to the user that the firmware will be reliable, and not break their system.
  5635. @end itemize
  5636. @node How do I know what version I'm running?
  5637. @chapter How do I know what version I'm running?
  5638. If you are at least 127 commits after release 20150518 (commit message @emph{build/roms/helper: add version information to CBFS}) (or you have any @strong{upstream} stable release of libreboot after 20150518), then you can press C at the GRUB console, and use this command to find out what version of libreboot you have:@* @strong{cat (cbfsdisk)/lbversion}@* This will also work on non-release images (the version string is automatically generated, using @emph{git describe --tags HEAD}), built from the git repository. A file named @emph{version} will also be included in the archives that you downloaded (if you are using release archives).
  5639. If it exists, you can also extract this @emph{lbversion} file by using the @emph{cbfstool} utility which libreboot includes, from a ROM image that you either dumped or haven't flashed yet. In GNU/Linux, run cbfstool on your ROM image (@emph{libreboot.rom}, in this example):@* $ @strong{./cbfstool libreboot.rom extract -n lbversion -f lbversion}@* You will now have a file, named @emph{lbversion}, which you can read in whatever program it is that you use for reading/writing text files.
  5640. For git, it's easy. Just check the git log.
  5641. For releases on or below 20150518, or snapshots generated from the git repository below 127 commits after 20150518, you can find a file named @emph{commitid} inside the archives. If you are using pre-built ROM images from the libreboot project, you can press C in GRUB for access to the terminal, and then run this command:@* @strong{lscoreboot}@* You may find a date in here, detailing when that ROM image was built. For pre-built images distributed by the libreboot project, this is a rough approximation of what version you have, because the version numbers are dated, and the release archives are typically built on the same day as the release; you can correlate that with the release information: @pxref{Libreboot release information}.
  5642. You can also check the documentation that came with your archives, and in @ref{Libreboot release information} will be the information about the version of libreboot that you are using.
  5643. Generally speaking, it is advisable to use the latest version of libreboot.
  5644. @node GNU Free Documentation License
  5645. @appendix GNU Free Documentation License
  5646. @include resources/licenses/gfdl-1.3.txt
  5647. @bye