Linuxinternals/training-setup

This page helps you get your embedded Linux system up and running with the hardware and software necessary to run the examples covered in the training.

Setting up the build environment
In this training program, we currently use the OpenEmbedded Core build system. The build system makes it super easy to compiler or cross-compiler any and everything under the sun including the kernel and the compiler itself. These instructions were developed on a Ubuntu Linux 14.04 but should work on other distributions.

Inorder to build the software image for your beagle bone, please obtain a build machine (virtual or real) with atleast 4GB of RAM, 150GB of hard disk space and a decent CPU. Install Ubuntu 14.04 for a smooth ride through the instructions.

Download OpenEmbedded code from github
Checkout the code for Open Embedded from my poky repository on github (poky is a distribution based on OpenEmbedded) cd ~/data/repo/ git clone https://github.com/joelagnel/poky-beaglebone.git cd poky-beaglebone git checkout intro_linux_v1 Checkout the code for the meta-ti layer into poky: git clone https://github.com/joelagnel/meta-ti.git cd meta-ti git checkout intro_linux_v1 cd .. Checkout the code for the meta-openembedded layer into poky: git clone https://github.com/joelagnel/meta-openembedded.git cd meta-openembedded git checkout intro_linux_v1 cd ..
 * 1) Create a suitable directory such as ~/data/repo/ to store source code
 * 2) Run the following commands

OpenEmbedded configuration and setup
cd ~/data/repo/poky-beaglebone source oe-init-build-env #MACHINE ?= "am180x-evm" #MACHINE ?= "beaglebone" #MACHINE ?= "genericx86" #MACHINE ?= "genericx86-64" #MACHINE ?= "mpc8315e-rdb" #MACHINE ?= "edgerouter" LCONF_VERSION = "6" BBPATH = "${TOPDIR}" BBFILES ?= "" # meta-openembedded and meta-ti added by Joel for vim # Remember to check out a recent version of these into poky BBLAYERS ?= " \   /home//data/repo/poky-beaglebone/meta \    /home//data/repo/poky-beaglebone/meta-yocto \    /home//data/repo/poky-beaglebone/meta-ti \    /home//data/repo/poky-beaglebone/meta-openembedded/meta-oe \  " BBLAYERS_NON_REMOVABLE ?= " \   /home//data/repo/poky-beaglebone/meta \    /home//data/repo/poky-beaglebone/meta-yocto \  "
 * Goto your poky directory:
 * Setup the environment for the build, this will create config files in build/conf/
 * Edit the local.conf file in the build directory
 * Uncomment the line #MACHINE ?= "beaglebone" and comment out any other MACHINE variable assignments. It should finally look like
 * Goto the end of the file and set BB_NUMBER_THREADS to 8 or other value. This is the number of tasks that will run in parallel during the build (parallel means faster!)
 * Next Setup your Open Embedded layers with the repositories we downloaded, edit your build/conf/bblayer.conf file to look like the following:

Build Beaglebone Image
cd ~/data/repo/poky source oe-init-build-env bitbake beaglebone-image In a few hours your build should be ready to deploy. We will discuss how to install the image onto an SD card and boot up your beaglebone next.
 * Goto the poky directory
 * Setup the environment for the build
 * Run bitbake to build the beaglebone-image

--Joelagnel (talk) 13:03, 3 February 2016 (PST)