You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

source oe-init-build-env

create: bitbake-layers create-layer meta-<layer_name>

add: bitbake-layers add-layer ../meta-<layer_name>

show: bitbake-layers show-layers

create and modify meta layer

create meta layer

source oe-init-build-env

bitbake-layers create-layer <yocto_poky_path>/meta-custom

remove example recipes

cd <yocto_poky_path>meta-custom

rm -rf recipes-example

modify layer configuration file

To create a dependency to another meta layer, the layer.conf in meta-custom/conf must be modified as follows:

gedit <yocto_poky_path>/meta-custom/conf/layer.conf

change 'LAYERDEPENDS_meta-custom = "core"' to 'LAYERDEPENDS_meta-custom = "meta-altera"'

create layer structure for bsp and kernel

for bsp:

mkdir -p recipes-bsp/u-boot

mkdir recipes-bsp/u-boot/files

for kernel:

mkdir -p recipes-kernel/linux

mkdir recipes-kernel/linux/files

modify <yocto_poky_path>/build/conf/*

---add meta layer to bblayers.conf---

-before start to configure anything, the meta layers must be added to <yocto_poky_path>/build/conf/bblayers.conf:

bitbake-layers add-layer ../meta-altera

bitbake-layers add-layer ../meta-custom


---add parameters to local.conf---

-for linux-altera-lts the provider and the version must be added:

PREFERRED_PROVIDER_virtual/kernel = "linux-altera-lts"

PREFERRED_VERSION_linux-altera-lts = "5.4%"

-comment all MACHINE variables out and add:

MACHINE="cyclone5"


create workspace

devtool create-workspace workspace

configure kernel

###with devtool

Set up the build environment to modify the source for an existing recipe:

devtool modify linux-altera-lts

Launch menuconfig, make changes to configuration and exit and save your config:

devtool menuconfig linux-altera-lts


devtool update-recipe linux-altera-lts -a ${PWD}/../meta-custom -O


devtool finish linux-altera-lts ${PWD}/../meta-custom/ -f



###with bitbake

run kernel configuration task:

bitbake linux-altera-lts -c kernel_configme -f

Launch menuconfig, make changes to configuration and exit and save your config:

bitbake linux-altera-lts -c menuconfig

generate the fragment.cfg file (contains only the changes made):

bitbake linux-altera-lts -c diffconfig

copy fragment.cfg to meta-custom/recipes-kernel/linux/files. The full path to the generated fragment.cfg file is displayed in the terminal after running 'bitbake linux-altera-lts -c diffconfig'.

cp <path_to_cfg>/fragment.cfg ~/yocto/poky/meta-custom/recipes-kernel/linux/files


create .bbappend file → file name must be the same as original .bb recipe file but with with .bbappend ending

gedit /meta-custom/recipes-kernel/linux/linux-altera-lts_5.4.bbappend

add following content to this file:

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += "file://fragment.cfg "


configure u-boot


















checkout other branch


git checkout mybranch
git reset --hard origin/mybranch

  • No labels