View source for BitBake/it
From Openmoko
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page:
Template used on this page:
Return to BitBake/it.
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page:
Template used on this page:
Return to BitBake/it.
Languages: |
English • العربية • Български • Česky • Dansk • Deutsch • Esperanto • Eesti • Español • فارسی • Suomi • Français • עברית • Magyar • Italiano • 한국어 • Nederlands • Norsk (bokmål) • Polski • Português • Română • Русский • Svenska • Slovenčina • Українська • 中文(中国大陆) • 中文(台灣) • Euskara • Català |
Stub: This is a stub. You can help OpenMokoWiki by expanding it. |
BitBake è uno strumento per la compilazione del codice usato da OpenEmbedded. BitBake recipes sono dei file dichiarativi, semplici da scrivere. Qui vedete un esempio per l'applicazione openmoko-calculator2:
DESCRIPTION = "A Calculator for Openmoko" SECTION = "openmoko/tools" DEPENDS = "libmokoui2" PV = "0.1.0+svnr${SRCREV}" PR = "r0"
inherit openmoko2
Il manuale utente è disponibile su BitBake berlios page.
In pratica, usare bitbake per costruire le proprie immagini è molto semplice.
Tutto quello di cui avete bisogno sono queste quattro semplici cose. Supponiamo qui che voi stiate usando un account chiamato build, e che lavoriate nella cartella moko.
$cd ~/moko # Enter the directory $git clone git://git.openmoko.org/git/bitbake.git bitbake-om # get the bitbake of openmoko.
Bitbake come for OpenEmbedded, however Openmoko has its own bitbake, named bitbake-om. After cloning the bitbake-om, you have the kitchen comprehensive. You also need recipes to tell you how to cook.
$git clone git://git.openmoko.org/git/openmoko.git openmoko
It will clone an OE tree from Openmoko git server. This is the recipes what tell bitbake how to cook. The cloning process spend little time, get a cup of coffee is a good idea when you are waiting.
$install -d /home/build/moko/local/conf #create the direcotry $vim local/conf/local.conf # use your favorite editor
Paste these line into the file
ALLOW_EMPTY = "1" BBFILES := "/home/build/moko/openmoko/packages/*/*.bb" BB_GIT_CLONE_FOR_SRCREV = "1" BBINCLUDELOGS = "yes" BBMASK = "" DISTRO = "openmoko" DL_DIR := "/home/build/moko/sources" EXTENDPE = "" GLIBC_GENERATE_LOCALES = "en_US.UTF-8" IMAGE_FSTYPES = "jffs2 tar.gz" INHERIT += "om-utils" MACHINE = "om-gta02" PARALLEL_MAKE = "-j 4" QA_LOG = "1" TMPDIR := "/home/build/moko/build/"
Let me explain the meanings of some variables.
$vim build_env # use your favorite editor
Paste these lines into the file
export BBPATH="/home/build/moko/local:/home/build/moko/openmoko" export PATH=/home/build/moko/bitbake-om/bin:$PATH
bitbake-om non viene cambiato molto spetto. Tuttavia il tree di OE (/home/build/moko/openmoko) cambia quasi ogni giorno. Aggiornarlo è importante se volete avere gli ultimi fix.
$cd /home/build/moko/bitbake-om $git pull $cd /home/build/moko/openmoko $git pull
La prima volta che userete bitbake potrebbe richiedere molte ore. Deve prendere tutto il codice sorgente di cui avrete bisogno. Deve costruire l'insieme di strumenti per la compilazione, e molte librerie base come glibc.
$source /home/build/moko/build_env #read in the environment variables. $bitbake helloworld # build the simplest case. Playing video game for 5 hours, Watching movie for 3 hours and Sleeping for 8 hours.
Se volete provare a compilare qualche cosa di più impegnativo come l'immagine di fso, basterà dire a bitbake di cucinare un'altra ricetta:
$bitbake fso-image
Tutte le ricette si trovano in /home/build/moko/openmoko/packages. Per esempio, fso-image si trova in /home/build/moko/openmoko/packages/images/fso-image.bb.
Al termine del processo di compilazione, i file opk si trovano in /home/build/moko/build/deploy/glibc/opk, e le immagini in /home/build/moko/build/deploy/images.