You are on page 1of 3

Configure and compile and sign the Uboot & X-loader

Install the git-coie package.

! suuo apt-get install git-coie

"#$%& '()*#(+,-*,. /00 1$2* 3(, 456 -,(##7-(89$:*
Bownloau anu install the uesiieu veision of Couesouiceiy u++ Lite fiom
theii page. The example below assumes you aie using !"#$%"&'($') +,, -./$
0112345016 +789-.:&; commonly useu with TI's SBKs anu BvSBKs.
0nce installeu, the tool typically auus its bin\ installation uiiectoiy to the
system PATB:

;71(<)*, #*2+9
Bownloau X-loauei foi the oiiginal uit iepositoiy :
git clone git:gitoiious.oigx-loau-omapSmainline.git xloauei
In case the website is uown oi the netwoik is too slow, you can also get these souices fiom oui website:
If youi company's fiiewall blocks git iequests, you can also get the same souices thiough http. This
is equivalent, but slowei:
git clone =229>&$2?gitoiious.oigx-loau-omapSmainline.git xloauei

0se a known to woik veision of xloauei:
git checkout 949a1acfS7a78
In oiuei to compile the X-Loauei, you neeu to :
set the CR0SS_C0NPILE enviionment vaiiable:
expoit CR0SS_C0NPILE=aim-linux-
specify the PATB to the toolchain that you maue:
expoit PATB=usilocalxtoolsaim-unknown-linux-uclibcgnueabibin:$PATB
iun make omapSSSubeagle_config to set the taiget boaiu configuiation
iun make to builu the image
The iesulting file is stoieu in the x-loauei main uiiectoiy as x-loau.bin. This file must be "signeu"
In fact, foi a uP uevice, the signatuie only consists of auuing a "Table of Content" at the beginning of the image, explaining
which piogiam to execute.
in oiuei to be executeu by the piocessoi. 0sing the signuP tool in the tools
subuiiectoiy of the main uiiectoiy of the lab, sign the x-loau.bin file. This piouuces
an x-loau.bin.ift file. You can copy it to the NNC caiu, ienaming it as NL0.

"7@((2 #*2+9
Bownloau 0-Boot fiom the mainline uit iepositoiy :
git clone git:git.uenx.ueu-boot.git u-boot-main
0se a stable veision of 0-Boot:
git checkout v2u1u.u6
uet an unueistanuing of its configuiation anu compilation steps by ieauing the REABNE file, anu
specifically the Builuing the softwaie section.
Basically, you neeu to:
set the CR0SS_C0NPILE enviionment vaiiable;
iun make mipiopei to cleanup the souices ;
iun make <NANE>_config, wheie <NANE> is the name of a configuiation file in
incluueconfigs. Foi oui platfoim, the configuiation file is
incluueconfigsomapS_beagle.h. Reau this file to get an iuea of how a 0-Boot
configuiation file is wiitten;
You can speeu up the compilation by using the -jX option with make. Wheie X is the numbei of paiallel jobs useu
foi compiling. Twice the numbei of CP0 coies is a goou value.
Finally, iun make, which shoulu builu 0-Boot.
You can now copy the geneiateu u-boot.bin file to the NNC caiu.
0nmount the NNC caiu paitition.

A*22$%& +9 #*,$<: -(88+%$-<2$(% B$2= 2=* C(<,)
To communicate with the boaiu thiough the seiial poit, install a seiial communication piogiam,
such as minicom:
apt-get install minicom
Run minicom -s, to entei Ninicom's setup inteiface. In the <$'.=> ?"'/ %$/&? subsection, change the
seiial uevice to uevttySu (oi uevtty0SBu if you aie using a seiial to 0SB auaptei), anu make
suie that haiuwaie flow contiol is uisableu.
Now that minicom is configuieu, you will just have to iun minicom insteau of minicom -s, next time you neeu it.
0nce this is uone, select @;./, to leave the setup inteiface anu access the seiial console.
You shoulu now see the 0-Boot piompt:
0NAPS beagleboaiu.oig #
If you uon't like Ninicom's inteiface, you coulu also tiy othei piogiams with a giaphical usei inteiface: cutecom anu gtkteim
(apt-get install cutecom gtkteim). 0seis familiai with Bypeiteiminal on Winuows may piefei these piogiams.
You may neeu to ieset the boaiu, in case it alieauy booting an existing Linux keinel.
You can now use 0-Boot. Run the help commanu to see the available commanus.
If you wish to access Ninicom's menu, piess |Ctilj|aj followeu by |zj. You can then choose to exit by
piessing the |xj key, foi example.
You can then connect to uevtty0SBu using Ninicom anu use 0-Boot.

D*#2$%& "7@((2 (% 2=* 66' -<,)
Inseit the NNC caiu into the Beagle boaiu, ieset the boaiu anu check that it ow boots fiom the
NNC caiu:
Texas Instiuments X-Loauei 1.4.4ss (Sep 14 2u1u - 17:S2:S7)
Beagle Rev C1C2CS
Reauing boot sectoi
Loauing u-boot.bin fiom mmc

0-Boot 2u1u.u6 (Sep 14 2u1u - 1S:28:S6)

0NAPS Beagle boaiu + LPBBRNANB
I2C: ieauy
In: seiial
0ut: seiial
Eii: seiial
Boaiu ievision C
Bie IB #Sac4uuuSuuuuuuuuu4u1Sf89u1uu1uu1
Bit any key to stop autoboot: u

Inteiiupt the countuown to entei the 0-Boot shell :
0NAPS beagleboaiu.oig #
In 0-Boot, type the help commanu, anu exploie the few commanus available.

5*3:<#=$%& 3,(8 "7C((2
We will fiist ieflash the X-Loauei in NANB. To uo so, type the following commanus :
mmc init
This initializes the NNC inteiface
fatloau mmc u:1 8uuuuuuu NL0
This loaus the file fiom NNC u paitition 1 to memoiy at auuiess ux8uuuuuuu
nanuecc hw
This commanu enables 0NAP haiuwaie ECC foi wiiting to NANB since the X-Loauei is loaueu by
the R0NC0BE, which uses it.
nanu eiase u 8uuuu
This commanu eiases a ux8uuuu byte long space of the NANB flash fiom offset u
nanu wiite 8uuuuuuu u 8uuuu
This commanu wiites uata to the NANB flash. The souice is ux8uuuuuuu (wheie we've loaueu the
file to stoie in the flash) anu the uestination is offset u of the NANB flash. The length of the copy is
ux8uuuu bytes, which coiiesponus to the space we've just eiaseu befoie. It is impoitant to eiase
the flash space befoie tiying to wiite on it, otheiwise it won't woik.
X-Loauei has been tiansfeieu to NANB flash. You can now uo the same with 0-Boot (but this time
with the %<%)*-- #B commanu) The stoiage offset in the NANB is ux8uuuu (just aftei the space
ieseiveu foi X-Loauei) anu the length is ux16uuuu.
Aftei flashing 0-Boot image, you can iemove NNC caiu, then ieset the Beagle boaiu. You shoulu see
the fieshly flasheu X-Loauei anu 0-Boot staiting.
That's enough foi the moment! We will boot a Linux keinel in a latei lab.