# Building Yocto for a Beagle Bone Black


Install the needed dependencies to build Yocto:
`apt install build-essential chrpath diffstat gawk libncurses5-dev python3-distutils texinfo`

Create a folder to hold the different Yocto layers
`mkdir yocto`

Clone the dunfell version of Yocto:
`git clone -b dunfell git://git.yoctoproject.org/poky.git poky-dunfell`

Clone the meta layers within the dunfell folder:
`
cd poky-dunfell
git clone -b dunfell git://git.openembedded.org/meta-openembedded
git clone -b dunfell https://github.com/meta-qt5/meta-qt5.git
git clone -b dunfell git://git.yoctoproject.org/meta-security.git
`

Clone the meta layer for the custom build recipes:
`git clone -b dunfell https://github.com/jumpnow/meta-jumpnow.git`

Create a directory next to the dunfell directory for the beagle bone black specific recipes:
`
mkdir bbb
cd bbb
git clone -b dunfell git://github.com/jumpnow/meta-bbb
`

Initialize the build directory for the beagle bone black:
`source poky-dunfell/oe-init-build-env bbb/build`

`cp meta-bbb/conf/local.conf.sample build/conf/local.conf`
`cp meta-bbb/conf/bblayers.conf.sample build/conf/bblayers.conf`

Edit `bblayers.conf`  and replace the ${HOME} with the appropriate directory. In vim, the find and replace command is:

`%s/${HOME}/\/media\/nick\/code\/yocto/g`



