Vous êtes sur la page 1sur 6

PortingUboot

Porting
Uboot
MichaelOpdenacker
FreeElectrons

1
FreeElectrons.Kernel,driversandembeddedLinuxdevelopment,consulting,trainingandsupport.http//freeelectrons.com
Rightstocopy
Copyright20042009,FreeElectrons
feedback@freeelectrons.com
Documentsources,updatesandtranslations:
http://freeelectrons.com/docs/portinguboot
Corrections,suggestions,contributionsand
translationsarewelcome!
AttributionShareAlike3.0 Latestupdate:Oct15,2017
Youarefree
tocopy,distribute,display,andperformthework
tomakederivativeworks
tomakecommercialuseofthework
Underthefollowingconditions
Attribution.Youmustgivetheoriginalauthorcredit.
ShareAlike.Ifyoualter,transform,orbuilduponthiswork,you
maydistributetheresultingworkonlyunderalicenseidenticalto
thisone.
Foranyreuseordistribution,youmustmakecleartoothersthelicense
termsofthiswork.
Anyoftheseconditionscanbewaivedifyougetpermissionfromthe
copyrightholder.
Yourfairuseandotherrightsareinnowayaffectedbytheabove.
Licensetext:http://creativecommons.org/licenses/bysa/3.0/legalcode
2
FreeElectrons.Kernel,driversandembeddedLinuxdevelopment,consulting,trainingandsupport.http//freeelectrons.com
PortingUboot(1)

ItisrelativelyeasytoportUboottoanewboard.
Thisexplainsitssuccess.
Lookforanalreadysupportedboard
whichisascloseaspossibletoyours.
Createanewfileininclude/configs.
Forexample,havealookattheadsvix.hfile
(pxa270processor).

3
FreeElectrons.Kernel,driversandembeddedLinuxdevelopment,consulting,trainingandsupport.http//freeelectrons.com
PortingUboot(2)

Thencreatesupportcodeintheboarddirectory
Example:havealookatboard/adsvix:
adsvix.c
config.mk
lowlevel_init.S
Makefile
pcmcia.c
pxavoltage.S
uboot.lds
Youwillfindmanysimilaritieswithboard/lubbock.

4
FreeElectrons.Kernel,driversandembeddedLinuxdevelopment,consulting,trainingandsupport.http//freeelectrons.com
PortingUboot(3)

Then,addyourboardtothefollowingfiles:
MAKEALL:
LIST_pxa="\
adsvixcerf250cradlecsb226\
deltainnokomlubbockpleb2\
pxa255_idpwepep250xaeniaxxm250\
xsenginezylonite\

Makefile:
adsvix_config:unconfig
@$(MKCONFIG)$(@:_config=)armpxaadsvix
include/asmarm/machtypes.h:
#defineMACH_TYPE_ADSVIX620
(originatingfromLinuxheaders,shouldalreadybepresent)

5
FreeElectrons.Kernel,driversandembeddedLinuxdevelopment,consulting,trainingandsupport.http//freeelectrons.com
OtherUbootimplementationdetails

CPUsupportimplementedinthecpu/directory
74xx_7xxarm926ejsi386mipsmpc8260niossa1100
arm1136arm946esixpmpc5xxmpc83xxnios2
arm720tarm_intcmlh7a40xmpc5xxxmpc85xxppc4xx
arm920tat32apmcf52x2mpc8220mpc86xxpxa
arm925tbf533microblazempc824xmpc8xxs3c44b0

Devicedriversimplementedindrivers/
AlotofreusefromLinuxdrivers!
Headersimplementedininclude/
andininclude/asm<arch>/(mostlyLinuxheaders)

6
FreeElectrons.Kernel,driversandembeddedLinuxdevelopment,consulting,trainingandsupport.http//freeelectrons.com