Skip to content

Commit

Permalink
Merge pull request OpenXT#42 from flihp/master
Browse files Browse the repository at this point in the history
[OXT-23] Move local build config to openxt.git and use build/ as TOPDIR ...
  • Loading branch information
cjp256 committed Dec 11, 2014
2 parents ad70dc9 + db16e1e commit f88e3ec
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 32 deletions.
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
misc/*
build/*
build/bitbake.lock
build/conf/local.conf
build/conf/sanity_info
build/local.settings
build/manifest
build/oe
build/oeenv
build/pseudodone
build/repos
build/tmp-eglibc
build-output/*
34 changes: 34 additions & 0 deletions build/bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/sh
#
# Copyright (c) 2012 Citrix Systems, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#

BDIR=`readlink -f \`dirname $0\``
REPOS="$BDIR/repos"

export BB_ENV_EXTRAWHITE="MACHINE BUILD_UID"
PATH="$REPOS/bitbake/bin:$PATH"

# allow to disble OE wrapper script
if [ "x$1" = "x--disable-wrapper" ];then
shift
else
PATH="$REPOS/openembedded-core/scripts:$PATH"
fi
export PATH

exec bitbake "$@"
17 changes: 17 additions & 0 deletions build/conf/bblayers.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
LCONF_VERSION = "4"

BBFILES ?= ""
BBLAYERS ?= " \
${TOPDIR}/repos/extra \
${TOPDIR}/oe/xenclient \
${TOPDIR}/repos/openembedded-core/meta \
${TOPDIR}/repos/meta-openembedded/meta-xfce \
${TOPDIR}/repos/meta-openembedded/meta-oe \
${TOPDIR}/repos/meta-openembedded/meta-gnome \
${TOPDIR}/repos/meta-java \
${TOPDIR}/repos/meta-selinux \
"


53 changes: 27 additions & 26 deletions do_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ do_oe_setup()

git_clone "oe" "$OPENXT_GIT_PROTOCOL://$OPENXT_GIT_MIRROR/xenclient-oe.git" "$BRANCH" "$ALLOW_SWITCH_BRANCH_FAIL"

pushd "oe" > /dev/null

echo "*:$BRANCH" > "manifest"

if [ ! -f "local.settings" ]; then
Expand Down Expand Up @@ -171,16 +169,20 @@ EOF
EXTRA_CLASSES=""
[ "x$INHIBIT_RMWORK" == "x" ] && EXTRA_CLASSES="rm_work $EXTRA_CLASSES"

if [ ! -f "xenclient/conf/local.conf" ]; then
cp xenclient/conf/local.conf-dist xenclient/conf/local.conf
if [ ! -e conf ]; then
mkdir -p conf
fi

if [ ! -f "conf/local.conf" ]; then
cp oe/xenclient/conf/local.conf-dist conf/local.conf

if [ ! -z "${OE_TARBALL_MIRROR}" ] ; then
cat >> xenclient/conf/local.conf <<EOF
cat >> conf/local.conf <<EOF
# Tarball mirror
PREMIRRORS = "(ftp|https?)$://.*/.*/ ${OE_TARBALL_MIRROR}"
EOF
fi
cat >> xenclient/conf/local.conf <<EOF
cat >> conf/local.conf <<EOF
# Distribution feed
XENCLIENT_PACKAGE_FEED_URI="${NETBOOT_HTTP_URL}/${ORIGIN_BRANCH}/${NAME}/packages/ipk"
Expand All @@ -205,12 +207,12 @@ require conf/xenclient-extra.conf
EOF

if [ "x$ID" != "x" ]; then
echo "XENCLIENT_BUILD = \"$ID\"" >> xenclient/conf/local.conf
echo "XENCLIENT_BUILD = \"$ID\"" >> conf/local.conf
else
echo "XENCLIENT_BUILD = \"$NAME\"" >> xenclient/conf/local.conf
echo "XENCLIENT_BUILD = \"$NAME\"" >> conf/local.conf
fi

cat >> xenclient/conf/local.conf <<EOF
cat >> conf/local.conf <<EOF
XENCLIENT_BUILD_DATE = "`date +'%T %D'`"
XENCLIENT_BUILD_BRANCH = "${ORIGIN_BRANCH}"
XENCLIENT_VERSION = "$VERSION"
Expand All @@ -228,7 +230,7 @@ XEN_SRC_SHA256SUM="${XEN_SRC_SHA256SUM}"
EOF

cat >> xenclient/conf/local.conf <<EOF
cat >> conf/local.conf <<EOF
# Production and development repository-signing CA certificates
REPO_PROD_CACERT="$REPO_PROD_CACERT_PATH"
REPO_DEV_CACERT="$REPO_DEV_CACERT_PATH"
Expand All @@ -237,15 +239,15 @@ EOF

if [ $SOURCE -eq 1 ]
then
cat >> xenclient/conf/local.conf <<EOF
cat >> conf/local.conf <<EOF
XENCLIENT_BUILD_SRC_PACKAGES = "1"
XENCLIENT_COLLECT_SRC_INFO = "1"
EOF
fi
if [ "x$FREEZE_URIS" = "xyes" ]
then
cat >> xenclient/conf/local.conf <<EOF
cat >> conf/local.conf <<EOF
INHERIT += "freezer"
EOF
Expand All @@ -255,7 +257,7 @@ EOF
if [ $VERBOSE -eq 1 ]
then
echo "Generated config is:"
cat xenclient/conf/local.conf
cat conf/local.conf
fi

if [ $VERBOSE -eq 1 ]
Expand All @@ -268,7 +270,6 @@ EOF
${TOPDIR}/setup_build $OPTS

popd > /dev/null
popd > /dev/null
}

check_repo_signing_file()
Expand All @@ -291,7 +292,7 @@ do_oe_check_cpp()
{
local path="$1"

pushd "$path/oe"
pushd "$path"

cat <<- EOF > fish.cpp
#include <stdio.h>
Expand All @@ -312,7 +313,7 @@ do_oe()
local log_path="${OUTPUT_DIR}/${NAME}/logs"
local dont_get_log="$4"

pushd "$path/oe"
pushd "$path"
export MACHINE="$machine"
if [ "x$FREEZE_URIS" = "xyes" ]; then
echo "Running URI freezer"
Expand All @@ -334,13 +335,13 @@ do_oe()
if [ -z "${dont_get_log}" -a -z "${NEVER_GET_LOG}" ] ; then
mkdir -p "${log_path}"
echo "Collecting build logs..." | do_oe_log
find "$path"/oe/tmp-eglibc/work/*/*/temp -name "log.do_*" | tar -cjf "${log_path}/$machine-$image.tar.bz2" --files-from=- | do_oe_log
find $path/tmp-eglibc/work/*/*/temp -name "log.do_*" | tar -cjf "${log_path}/$machine-$image.tar.bz2" --files-from=- | do_oe_log
echo "Done" | do_oe_log
echo "Collecting sigdata..." | do_oe_log
find "$path/oe/tmp-eglibc/stamps" -name "*.sigdata.*" | tar -cjf "${log_path}/sigdata-$machine-$image.tar.bz2" --files-from=- | do_oe_log
find "$path/tmp-eglibc/stamps" -name "*.sigdata.*" | tar -cjf "${log_path}/sigdata-$machine-$image.tar.bz2" --files-from=- | do_oe_log
echo "Done" | do_oe_log
echo "Collecting buildstats..." | do_oe_log
tar -cjf "${log_path}/buildstats-$machine-$image.tar.bz2" "$path/oe/tmp-eglibc/buildstats" | do_oe_log
tar -cjf "${log_path}/buildstats-$machine-$image.tar.bz2" "$path/tmp-eglibc/buildstats" | do_oe_log
echo "Done" | do_oe_log
fi
}
Expand All @@ -354,7 +355,7 @@ do_oe_copy()
local binaries="tmp-eglibc/deploy/images"
local t=""
local unhappy=1
pushd "$path/oe"
pushd "$path"
# Copy OE
mkdir -p "$OUTPUT_DIR/$NAME/raw"
for t in cpio cpio.gz cpio.bz2 \
Expand Down Expand Up @@ -419,7 +420,7 @@ do_oe_nilfvm_copy()
do_oe_copy "$path" "nilfvm" "xenclient-nilfvm" "xenclient-nilfvm"

local binaries="tmp-eglibc/deploy/images"
pushd "$path/oe"
pushd "$path"
cp "$binaries/service-nilfvm" "$OUTPUT_DIR/$NAME/raw/service-nilfvm"
popd
}
Expand Down Expand Up @@ -451,7 +452,7 @@ do_oe_syncvm()
do_oe_syncui_copy()
{
local path="$1"
pushd "$path/oe"
pushd "$path"
mkdir -p "$OUTPUT_DIR/$NAME/raw"
cp tmp-eglibc/deploy/tar/sync-wui-0+git*.tar.gz "$OUTPUT_DIR/$NAME/raw/sync-wui-${RELEASE}.tar.gz"
cp tmp-eglibc/deploy/tar/sync-wui-sources-0+git*.tar.gz "$OUTPUT_DIR/$NAME/raw/sync-wui-sources-${RELEASE}.tar.gz"
Expand Down Expand Up @@ -495,7 +496,7 @@ do_oe_installer_copy()
{
local path="$1"
local binaries="tmp-eglibc/deploy/images"
pushd "$path/oe"
pushd "$path"

mkdir -p "$OUTPUT_DIR/$NAME/raw/installer"
# Copy installer
Expand Down Expand Up @@ -531,7 +532,7 @@ do_oe_installer_part2_copy()
{
local path="$1"
local binaries="tmp-eglibc/deploy/images"
pushd "$path/oe"
pushd "$path"

mkdir -p "$OUTPUT_DIR/$NAME/raw"

Expand Down Expand Up @@ -574,7 +575,7 @@ do_oe_source_copy()
{
local path="$1"
local rootfs="tmp-eglibc/deploy/images/xenclient-source-image-xenclient-dom0.raw"
pushd "$path/oe" > /dev/null
pushd "$path" > /dev/null

if [ "$SOURCE" -eq 0 ]
then
Expand Down Expand Up @@ -623,7 +624,7 @@ do_oe_copy_licenses()
local path="$1"
local binaries="tmp-eglibc/deploy/images"

pushd "$path/oe"
pushd "$path"

# Copy list of packages and licences for each image
local licences="$OUTPUT_DIR/$NAME/raw/licences"
Expand Down
10 changes: 5 additions & 5 deletions setup_build
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ if [ "$1" != "env" ]; then
mkdir -p $REPOS || die "Could not create local build dir"

getgit $REPOS/bitbake $BITBAKE_REPO $BITBAKE_TAG
for p in `pwd`/patches/bitbake/*.patch; do
for p in `pwd`/oe/patches/bitbake/*.patch; do
if [ ! -f "$p.APPLIED" ]; then
echo "Applying BitBake patch: $p"
pushd $REPOS/bitbake
Expand All @@ -117,12 +117,12 @@ if [ "$1" != "env" ]; then
fi
fi

if [ ! -e $OE_XENCLIENT_DIR/xenclient/conf/local.conf ]; then
ln -s $OE_XENCLIENT_DIR/xenclient/conf/local.conf-dist \
$OE_XENCLIENT_DIR/xenclient/conf/local.conf
if [ ! -e $OE_XENCLIENT_DIR/conf/local.conf ]; then
ln -s $OE_XENCLIENT_DIR/conf/local.conf-dist \
$OE_XENCLIENT_DIR/conf/local.conf
fi

BBPATH=$OE_XENCLIENT_DIR/xenclient:$REPOS/openembedded:$OE_XENCLIENT_DIR/oe-addons
BBPATH=$OE_XENCLIENT_DIR/oe/xenclient:$REPOS/openembedded:$OE_XENCLIENT_DIR/oe-addons
if [ ! -z "$EXTRA_DIR" ]; then
BBPATH=$REPOS/$EXTRA_DIR:$BBPATH
fi
Expand Down

0 comments on commit f88e3ec

Please sign in to comment.