Home » Development and Build » Yocto Embedded Linux » Creating a New BSP Layer Using the yocto-bsp Script

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. To add additional metadata layers into your configuration please add entries to this file.

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’

<pre>$ yocto-bsp create lynxbee qemu</pre>

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)

=> We entered 3

Would you like to use the default (3.19) kernel? (y/n) [default: y]

=> We entered 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

Would you like SMP support? (y/n) [default: y]

=> We entered y

Does your BSP have a touchscreen? (y/n) [default: n]

=> We entered y

Does your BSP have a keyboard? (y/n) [default: y]

=> We entered 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


Subscribe our Rurban Life YouTube Channel.. "Rural Life, Urban LifeStyle"

Leave a Comment