900719_FOCE : xFOCE - Embedded Linux - OpenEmbedded, Bitbake for Beaglebone This page last changed on Sep 10, 2012 by headley. See also page on virtual machine setup ======================== Configuring Open Embedded (build env for Beagle Bone) ======================== OpenEmbedded is a tool for building entire Linux Distributions for a platform. It is based on BitBake, which is a tool for automating tasks (derived from Portage,the pkg mgmt system for Gentoo). Most commonly used to build packages. Post\-note: install and run openembedded and bitbake as user (not root) Follow instructions here: http://www.angstrom-distribution.org/building-angstrom http://wiki.openembedded.org/wiki/OEandYourDistro http://www.openembedded.org/wiki/Getting_started http://www.uv-ac.de/openembedded/openembedded-3.html installing on Ubuntu guest VM under VMWare Fusion on Mac OSX install required packages using apt-get note: no git alternatives note: packages python-psyco and apr not available [deleted from Ubuntu and is obsolete. Successor PyPy is not supported by OpenEmbedded, so just run w/o (Python JIT for speed)] did have to reconfigure dash (sudo dpkg-reconfigure dash) install curl too There is an OE Ubuntu script here http://wiki.openembedded.org/wiki/OE_Ubuntu_Script to install the required software (created as ~/bin/oe-packages). Get bitbake tarball and unpack in /stuff/ ln -s bitbake-1.10.2 bitbake option\? : run ./setup.py install --prefix=/usr/local as superuser /or using sudo get oe: git clone git://github.com/openembedded/openembedded.git update oe: cd openembedded; sudo git pull --rebase Update env (may want to add to .profile: export BBPATH=/stuff/build:/stuff/openembedded export PATH=/stuff/bitbake/bin:$PATH export BBPATH=/stuff/build:/stuff/openembedded export PATH=/stuff/bitbake/bin:$PATH =========================== Configuration and Building =========================== Useful Links OE Kernel Building http://www.openembedded.org/wiki/Kernel_Building OpenEmbedded/Ångström Kernel Workflow http://www.slimlogic.co.uk/2011/05/openembeddedangstrom-kernel-workflow/ =========================== Before Building (Environment) =========================== user@ubuntu:~/projects/oe/setup-scripts$ ./oebb.sh --help Usage: ./oebb.sh config <machine> ./oebb.sh update ./oebb.sh tag tagname ./oebb.sh changelog <tagname> ./oebb.sh checkout <tagname> ./oebb.sh clean Not recommended, but also possible: ./oebb.sh bitbake <bitbake target> It is recommended to do '. /home/headley/.oe/environment-angstromv2012.05' and run 'bitbake something' inside /home/user/projects/oe/setup-scripts without using oebb.sh as wrapper You must invoke "./oebb.sh config <machine>" and then "./oebb.sh update" prior to your first bitbake command Note: <machine> may be beaglebone Example: [assumes running as user, OE_HOME=~/projects/oe] cd $OE_HOME source ~/.oe/environment-angstromv2012.05 MACHINE="beaglebone" ./oebb.sh config beaglebone MACHINE="beaglebone" ./oebb.sh update =========================== Building Pre-Defined Images =========================== Images defined in bitbake recipe (.bb) files; there are many in oe/setup-scripts/sources/. There are generic Angstrom targets oe/setup-scripts/sources/meta-angstrom/recipes-images/angstrom There are platform-specific directories like oe/setup-scripts/sources/meta-ti/recipes-misc/images To find all the image names, use: oe/setup-scripts$ find ./sources/ -name "image"|grep bb Generic Angstrom oe/setup-scripts/sources/meta-angstrom/recipes-images/angstrom/ xfce-nm-image systemd-image hardware-bringup-image systemd-gnome-image console-base-image efl-nodm-image console-image TI Beaglebone oe/setup-scripts/sources/meta-ti/recipes-misc/images/ cloud9-image.bb ti-hw-bringup-image.bb cloud9-gfx-image.bb cloud9-gnome-image.bb Common commands/pattern for recompiling if bitbake <target> doesn't work, may try: bitbake -c clean -f <target> bitbake -c compile -f <target> bitbake -c deploy <target> [binaries updated in $OE_HOME/setup-scripts/build/tmp-angstrom_v2012_05-eglibc/deploy/images/beaglebone/ ] bitbake x-load MLO bootstrap loader bitbake u-boot linux loader bitbake virtual/kernel linux kernel =========================== Customize Pre-Defined Images =========================== =========================== Build Default Kernel =========================== For a default build, just run: bitbake virtual/kernel After done, you can collect the built image from under the deploy folder, for example: build/tmp-angstrom_v2012_05-eglibc/deploy/images/beaglebone/ =========================== Configure Kernel(XWindows) =========================== Configure If you need to customize the kernel configuration, you may run the menuconfig task by: bitbake -c menuconfig virtual/kernel Compile bitbake -f -c compile virtual/kernel Fine Control If you need more control over the configuration and compile process, add this somewhere into your local.conf: INHERIT += "devshell" and then you can go to the shell by: bitbake -c devshell virtual/kernel The build environment will be well setup for you; you can run regular make commands like make bzImage ...etc Please note, that the INHERIT step depends on the distribution you're using, some of the distributions already include the INHERIT in their configuration, so it might work already. You can check that easily using listtask task. Preserve Custom Config Changes are lost if you remove the tmpdir or do a "bitbake -c clean virtual/kernel", so you may consider replacing the defconfig with it. =========================== Configure Kernel (non-XWindows) =========================== Note: by default these commands require you to run in X Windows. Q: By default, some bitbake tasks, like devshell and menuconfig, require to run in X Windows, but I have a slow link to the build host. How can I change that requirement? A: Edit the bitbake config file openembedded/conf/bitbake.conf. Under the UI/Interaction Configuration section, set: TERMCMD ?= "$ Unknown macro: {SCREEN_TERMCMD} " # = screen -D -m -t "$TERMWINDOWTITLE" TERMCMDRUN ?= "$ Unknown macro: {SCREEN_TERMCMDRUN} " That will start a screen session to run the task. To attach to the session, open another terminal session and run: screen -r Please read the man page of the screen utility to customize TERMCMD for your requirement.

Document generated by Confluence on Feb 03, 2026 14:29