OpenEmbedded build template using oe-core, meta-oe, etc
Clone or download
cbrake Merge pull request #75 from kraj/kraj/master
Update to latest master of layers
Latest commit c343649 Sep 17, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
conf envsetup: Drop needs for setting board specific arch/subarch Aug 23, 2018
sources Update to latest master of layers Sep 16, 2018
tools envsetup: replace nodejs based feed server setup with simple python3 … May 13, 2017
.gitignore gitignore: Add few more temp files Aug 26, 2018
.gitmodules Update meta-variscite-fslc to pyro branch Aug 11, 2017
COPYING.MIT add COPYING.MIT Nov 23, 2011
README.md updates Sep 13, 2018
envsetup.sh envsetup: Fix order of PATHs after pruning Sep 3, 2018
imx6ul-var-dart-envsetup.sh export MACHINE in files that are not soft links Aug 31, 2018
local.sh.example local.sh.example: Document HOST_IP Aug 23, 2018
minnowboard-max-envsetup.sh export MACHINE in files that are not soft links Aug 31, 2018
overo-envsetup.sh export MACHINE in files that are not soft links Aug 31, 2018
qemuarm-envsetup.sh envsetups: Add logic to detect machine from envscript name Aug 26, 2018
qemuarm64-envsetup.sh envsetups: Add logic to detect machine from envscript name Aug 26, 2018
qemumips-envsetup.sh envsetups: Add logic to detect machine from envscript name Aug 26, 2018
qemumips64-envsetup.sh envsetups: Add logic to detect machine from envscript name Aug 26, 2018
qemuppc-envsetup.sh envsetups: Add logic to detect machine from envscript name Aug 26, 2018
qemuriscv64-envsetup.sh Add support for qemuriscv64 in envscript Aug 29, 2018
qemux86-64-envsetup.sh envsetups: Add logic to detect machine from envscript name Aug 26, 2018
qemux86-envsetup.sh envsetups: Add logic to detect machine from envscript name Aug 26, 2018
raspberrypi2-envsetup.sh envsetups: Add logic to detect machine from envscript name Aug 26, 2018
raspberrypi3-64-envsetup.sh envsetups: Add logic to detect machine from envscript name Aug 26, 2018
raspberrypi3-envsetup.sh envsetups: Add logic to detect machine from envscript name Aug 26, 2018

README.md

BEC OpenEmbedded Distribution template

Build system based on oe-core, OpenEmbedded, and Angstrom.

Example

This following is example of building and installing a linux system from scratch on the BeagleBoard.

  • git clone git://github.com/cbrake/oe-build.git
  • cd oe-build
  • . envsetup.sh
  • oe_setup
  • bitbake systemd-image
  • [insert SD card]
  • lsblk (note sd card device)
  • oe_partition_sd /dev/sdX
  • oe_install_sd_boot (install MLO, u-boot, kernel)
  • oe_install_sd_rootfs_systemd_image
  • [Install SD card in beagleboard and enjoy your new image]
  • oe_console (fire up a serial console for the machine)

Motivation

This build template is designed to be used for production build systems (used to build product software), and thus has the following goals:

  1. simplicity: uses well understood things like bash and git submodules.
  2. robustness: Git submodules are a robust solution for production environments, and error handling good. Git submodules are also very good at making sure you are building exactly what was checked in, because it locks every submodule down to a specific version, which is generally what you want for a production build system, where the build must be absolutely repeatable.
  3. generate a modern Linux root filesystem.
  4. uses systemd
  5. track development of layers (we want the latest bits)
  6. support a range of common development platforms and SOCs

Tested Machines

See the <machine>-envsetup.sh files for examples of machines we regularly test with.

Using

envsetup.sh

This is where all the magic happens. In general, this build system must be run in a bash shell. To set up the environment, source the following file:

. ./<machine>-envsetup.sh

Or, you can export a MACHINE environment variable, and then source envsetup.sh.

This file will create a bunch of functions in the environment prefixed with oe_ that can be executed. Type oe_ to see them.

directories and key files

  • build: temporary directory where build actually takes place
  • conf: configuration files for the build
  • sources: various sources used for the build. The entries in this directory are git submodules.
  • downloads: contains files that are downloaded by various recipes during builds.
  • tools: utility scripts
  • localconfig.sh: file created by envsetup.sh that contains directory specific variables based on the build system location.
  • local.sh: can be used to customize MACHINE, and other variables

building for another machine

  • export MACHINE=[my machine]
  • bitbake [recipe name]

adding a new layer

  • Adding rocko branch of meta-altera layer to layer mix

oe_add_layer https://github.com/kraj/meta-altera rocko

removing a new layer

  • Remove meta-altera

oe_remove_layer meta-altera

customizing settings

conf/local.conf contains settings that are commonly modified such as parallel build options.

starting a local feed server

Sometimes you want to install packages you build on the target system without building and re-installing the entire rootfs. This can be done using a feed server.

  • Workstation: oe_feed_server (this starts a feed server on port 4000)
  • Target: modify /etc/opkg to http://[your workstation IP]:4000
  • Target: opkg update
  • Target: opkg install [package]

This advantage of a feed server versus scp'ing opkg files to the target and installing manually is that dependencies will automatically get installed. This mechanism is very useful for packages that are only needed occasionally during development (gdb, screen, strace, iperf, etc).

updating the submodules to the latest

Assuming you have a recent version of git, you can make use of the branch values specified in .gitmodules to update each submodule branch to the HEAD of the specified branch:

git submodule update --remote

License

This build system is licensed under the MIT license which is the same license as oe-core, etc. See COPYING.MIT

Contributions are welcome: please email cbrake@bec-systems.com