Skip to content

Commit

Permalink
meta/conf: Split bitbake config
Browse files Browse the repository at this point in the history
Split 'bitbake.conf' into two parts: originial bitbake's one and Isar
custom settings. The target config file is generated during configuration
by 'isar-setup-builddir' script.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
  • Loading branch information
henning-schild authored and ismagulb committed Aug 21, 2017
1 parent b5c2316 commit 376b2f0
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 34 deletions.
32 changes: 2 additions & 30 deletions meta/conf/bitbake.conf.sample → meta/conf/isar-bitbake.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2003 Chris Larson
# Copyright (C) 2017 Siemens AG
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
Expand All @@ -18,45 +18,17 @@
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.

B = "${S}"
CVSDIR = "${DL_DIR}/cvs"
DEPENDS = ""
DEPLOY_DIR = "${TMPDIR}/deploy"

DEPLOY_DIR_DEB = "${TMPDIR}/deploy/deb/${MACHINE}"
DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images"
DL_DIR = "${TMPDIR}/downloads"
SSTATE_DIR ?= "${TMPDIR}/sstate-cache"
FILESDIR = "${@bb.which(bb.data.getVar('FILESPATH', d, 1), '.')}"
FILESPATH = "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}"
FILE_DIRNAME = "${@os.path.dirname(bb.data.getVar('FILE', d))}"
GITDIR = "${DL_DIR}/git"
IMAGE_CMD = "_NO_DEFINED_IMAGE_TYPES_"
IMAGE_ROOTFS = "${TMPDIR}/rootfs"
MKTEMPCMD = "mktemp -q ${TMPBASE}"
MKTEMPDIRCMD = "mktemp -d -q ${TMPBASE}"
OVERRIDES = "local:${MACHINE}:${TARGET_OS}:${TARGET_ARCH}"
P = "${PN}-${PV}"
PERSISTENT_DIR = "${TMPDIR}/cache"
PF = "${PN}-${PV}-${PR}"
PN = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[0] or 'defaultpkgname'}"
PR = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[2] or 'r0'}"
PROVIDES = ""
PV = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[1] or '1.0'}"
RESUMECOMMAND = ""
RESUMECOMMAND_wget = "/usr/bin/env wget -c -t 5 --passive-ftp -P ${DL_DIR} ${URI}"
S = "${WORKDIR}/${P}"
SRC_URI = "file://${FILE}"
STAMPS_DIR ?= "${TMPDIR}/stamps"
STAMP = "${TMPDIR}/stamps/${PF}"
SVNDIR = "${DL_DIR}/svn"
T = "${WORKDIR}/temp"
TARGET_ARCH = "${BUILD_ARCH}"
TMPDIR = "${TOPDIR}/tmp"
UPDATECOMMAND = ""
UPDATECOMMAND_cvs = "/usr/bin/env cvs -d${CVSROOT} update ${CVSCOOPTS}"
UPDATECOMMAND_svn = "/usr/bin/env svn update ${SVNCOOPTS}"
WORKDIR = "${TMPDIR}/work/${PF}"
PERSISTENT_DIR = "${TMPDIR}/cache"
BUILDCHROOT_DIR = "${TOPDIR}/tmp/work/buildchroot/${DISTRO}/rootfs"
CACHE = "${TMPDIR}/cache"

Expand Down
33 changes: 29 additions & 4 deletions scripts/isar-setup-builddir
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,35 @@ EOM
SHOWYPDOC=yes
fi

if [ ! -f "$BUILDDIR/conf/bitbake.conf" ]; then
cp "$ISARROOT/meta/conf/bitbake.conf.sample" \
"$BUILDDIR/conf/bitbake.conf"
fi
cat <<EOF > $BUILDDIR/conf/bitbake.conf
# ********************************************
# THIS FILE IS GENERATED! DO NOT MESS WITH IT!
# ********************************************
# ---------
# begin original bitbake.conf
# ---------
EOF
cat "$ISARROOT/bitbake/conf/bitbake.conf" >> \
"$BUILDDIR/conf/bitbake.conf"
cat <<EOF >> $BUILDDIR/conf/bitbake.conf
# ---------
# end original bitbake.conf
# ---------
# ---------
# begin isar-bitbake.conf
# ---------
EOF
cat "$ISARROOT/meta/conf/isar-bitbake.conf" >> \
"$BUILDDIR/conf/bitbake.conf"
cat <<EOF >> $BUILDDIR/conf/bitbake.conf
# ---------
# end isar-bitbake.conf
# ---------
EOF

# Ending the first-time run message. Show the no documentation banner.
if [ ! -z "$SHOWYPDOC" ]; then
Expand Down

0 comments on commit 376b2f0

Please sign in to comment.