Creating a New BSP Layer Using the yocto-bsp Script

The below steps gives details about how to create a custom BSP layer with yocto,

$ mkdir ~/Desktop/devlab/yocto/metadata/

$ cd ~/Desktop/devlab/yocto/metadata/

$ git clone git://git.yoctoproject.org/poky poky

$ cd poky

$ git checkout -b fido origin/fido

Here, we have used poky / yocto fido version,

$ source oe-init-build-env

You had no conf/local.conf file. This configuration file has therefore been
created for you with some default values. You may wish to edit it to use a
different MACHINE (target hardware) or enable parallel build options to take
advantage of multiple cores for example. See the file for more information as
common configuration options are commented.

You had no conf/bblayers.conf file. The configuration file has been created for
you with some default values. To add additional metadata layers into your
configuration please add entries to this file.

The Yocto Project has extensive documentation about OE including a reference
manual which can be found at:
http://yoctoproject.org/documentation

For more information about OpenEmbedded see their website:
http://www.openembedded.org/

### Shell environment set up for builds. ###

You can now run ‘bitbake ‘

Common targets are:
core-image-minimal
core-image-sato
meta-toolchain
adt-installer
meta-ide-support

You can also run generated qemu images with a command like ‘runqemu qemux86’

~/Desktop/devlab/yocto/metadata/build$ yocto-bsp create lynxbee qemu
Checking basic git connectivity…
Done.

Which qemu architecture would you like to use? [default: i386] 1) i386    (32-bit)
2) x86_64  (64-bit)
3) ARM     (32-bit)
4) PowerPC (32-bit)
5) MIPS    (32-bit)
6) MIPS64  (64-bit)
3
Would you like to use the default (3.19) kernel? (y/n) [default: y] y
Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n] [default: y] y
Getting branches from remote repo git://git.yoctoproject.org/linux-yocto-3.19.git…
Please choose a machine branch to base your new BSP branch on: [default: standard/base] 1) standard/arm-versatile-926ejs
2) standard/base
3) standard/beagleboard
4) standard/beaglebone
5) standard/ck
6) standard/common-pc
7) standard/edgerouter
8) standard/fsl-mpc8315e-rdb
9) standard/mti-malta32
10) standard/mti-malta64
11) standard/qemuarm64
12) standard/qemuppc

READ  Flashing RPi yocto images to SD card using dd / Making SD card ready to boot Yocto images for Raspberry Pi

Would you like SMP support? (y/n) [default: y] Does your BSP have a touchscreen? (y/n) [default: n] y
Does your BSP have a keyboard? (y/n) [default: y]

New qemu BSP created in meta-lynxbee

$ tree meta-lynxbee/
meta-lynxbee/
|– binary
|– conf
|   |– layer.conf
|   `– machine
|       `– lynxbee.conf
|– COPYING.MIT
|– README
|– README.sources
|– recipes-bsp
|   `– formfactor
|       |– formfactor
|       |   `– lynxbee
|       |       `– machconfig
|       `– formfactor_0.0.bbappend
|– recipes-core
|   `– init-ifupdown
|       |– init-ifupdown
|       |   `– lynxbee
|       |       `– interfaces
|       `– init-ifupdown_1.0.bbappend
|– recipes-graphics
|   `– xorg-xserver
|       |– xserver-xf86-config
|       |   `– lynxbee
|       |       `– xorg.conf
|       `– xserver-xf86-config_0.1.bbappend
`– recipes-kernel
`– linux
|– files
|   |– lynxbee.cfg
|   |– lynxbee-preempt-rt.scc
|   |– lynxbee.scc
|   |– lynxbee-standard.scc
|   |– lynxbee-tiny.scc
|   |– lynxbee-user-config.cfg
|   |– lynxbee-user-features.scc
|   `– lynxbee-user-patches.scc
`– linux-yocto_3.19.bbappend

18 directories, 20 files

Here, may be you will need to change conf/bblayers.conf file to point to your newly created meta layer, as

BBLAYERS ?= ” \
~/devlab/yocto/metadata/meta-lynxbee \

Now you can customize the meta layer as per your need, this will give us a framework to work for our own BSP.

Reference : http://www.yoctoproject.org/docs/1.8/bsp-guide/bsp-guide.html#creating-a-new-bsp-layer-using-the-yocto-bsp-script

Leave a Reply

Your email address will not be published. Required fields are marked *