Skip to content

Instantly share code, notes, and snippets.

@volker-fr
Created April 9, 2014 18:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save volker-fr/6c1308932f82b673b04a to your computer and use it in GitHub Desktop.
Save volker-fr/6c1308932f82b673b04a to your computer and use it in GitHub Desktop.
# Set the path of the cv yocto-distro repository
export repo_path=/home/username/repos/work/depot/Projects/yocto-distro/main
# set path of this new layer
export new_layer="meta-oe-partial"
# create new layer folder
mkdir -p ${repo_path}/${new_layer}
# setup layer
mkdir -p ${repo_path}/${new_layer}/conf
cat > ${repo_path}/${new_layer}/conf/layer.conf << EOF_LAYERCFG
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":\${LAYERDIR}"
# We have recipes-* directories, add to BBFILES
BBFILES += "\${LAYERDIR}/recipes-*/*/*.bb \
\${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "meta-oe-partial"
BBFILE_PATTERN_meta-oe-partial = "^\${LAYERDIR}/"
BBFILE_PRIORITY_meta-oe-partial = "6"
EOF_LAYERCFG
# get the repository
# dora = yocto 1.5, the version we use as of 2014-04-09
git clone \
-b dora \
git://git.openembedded.org/meta-openembedded \
/tmp/meta-openembedded
# go into the repository and specific fodler
# -- you need to be there for the rsync+git head
cd /tmp/meta-openembedded/meta-oe
# save the git hash
echo "git://git.openembedded.org/meta-openembedded" \
> ${repo_path}/${new_layer}/SOURCE.githash
git rev-parse --verify HEAD \
>> ${repo_path}/${new_layer}/SOURCE.githash
# copy to the perforce folder if you are sure we want the current
# version
rsync -avR recipes-connectivity/samba \
${repo_path}/${new_layer}/
# this recipe is a dependency and talloc is also a samba project
rsync -avR recipes-support/talloc \
${repo_path}/${new_layer}/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment