2. OpenEmbedded is a tool which allows developers to create a fully usable Linux base for various embedded systems.
3. OpenEmbedded is a collection of meta data, configuration, and patches.
How OpenEmbedded works?
Setting up the toolchain and doing a build
Directory Structure
$ mkdir -p /stuff/build/confUsing Subversion
$ cd /stuff/
$ cd /stuff/
$ svn co http://svn.berlios.de/svnroot/repos/bitbake/branches/bitbake-1.6/ bitbake
Updating bitbake
$ cd /stuff/bitbake;svn info$ cd /stuff/bitbake; svn update
Obtaining OpenEmbedded
1. Install Monotone 0.32
2. Go to the base directory of your OpenEmbedded environment
$ cd /stuff/
3. Download and bunzip2 the OE database snapshot
$ wget http://www.openembedded.org/snapshots/OE.mtn.bz2
$ bunzip2 <OE.mtn.bz2 >OE.mtn
4. Update your local copy of the OpenEmbedded database:
$ mtn --db=/stuff/OE.mtn pull monotone.openembedded.org org.openembedded.dev
5. Checkout your local copy of the OpenEmbedded tree.
$ mtn --db=/stuff/OE.mtn checkout --branch=org.openembedded.dev
Updating OE
$ mtn --db=/stuff/OE.mtn pull monotone.openembedded.org org.openembedded.dev
Then update the branch(es) you are using. This will update the contents of the files in the local database. For example:
$ cd /stuff/org.openembedded.dev && mtn update
Create local configuration
$ cd /stuff/
$ cp org.openembedded.dev/conf/local.conf.sample build/conf/local.conf
$ vi build/conf/local.conf
Edit local.conf example:
#DL_DIR = "${HOME}/sources"
DL_DIR = "/stuff/build/sources"
#BBFILES := "${@bb.fatal('Edit your conf/local.conf: BBFILES')}"
BBFILES :="/stuff/org.openembedded.dev/packages/*/*.bb"
# Don't use symlinks in in the path to avoid problems
TMPDIR = /stuff/build
# of TARGET_ARCH
MACHINE = "x86"
If you compile other CPU code, you can change
TARGET_OS = "linux"
DISTRO = "generic"
# following MACHINE types: poodle, tosa and simpad.
remake“#”MACHINE_KERNEL_VERSION = "2.6"
make“#”REMOVE_THIS_LINE:="${@oe.fatal('Read the comments in your conf/local.conf')}"
Setup the environment
1. Edit ~/bash_profile
$ export PATH=/stuff/bitbake/bin:$PATH
$ export BBPATH=/stuff/build:/stuff/org.openembedded.dev
2. Check environment
$ echo $BBPATH
Start building
example:
$bitbake -D -b org.openembedded.dev/packages/zip/zip_2.32.bb
沒有留言:
張貼留言