aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishal Bhoj <vishal.bhoj@linaro.org>2014-12-09 14:49:50 +0530
committerFathi Boudra <fathi.boudra@linaro.org>2014-12-10 11:06:29 +0000
commit2e805ef213c951c49044611b8c362021d66345a8 (patch)
tree452c082fbd4e6769e72d97be3a26816e89f757d5
parentff701f023114d1ea7da8e625d8446cb5b978d56d (diff)
Add support for local manifest, fix issue with pinned-manifest build and few cleanups
Change-Id: Ia50c3e4e89211389133cec6fb334ad3fc14790e7 Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
-rwxr-xr-xbuild-scripts/create-user-build-script25
1 files changed, 19 insertions, 6 deletions
diff --git a/build-scripts/create-user-build-script b/build-scripts/create-user-build-script
index c7d5b04..0e023d1 100755
--- a/build-scripts/create-user-build-script
+++ b/build-scripts/create-user-build-script
@@ -17,7 +17,7 @@ if [ -n "$SOURCE_OVERLAY" ]; then
USAGE_SUM="'Usage: \$0 -m <manifest.xml> -o <overlay.tar> [ -t -d directory -l login ]'"
USAGE_OVERLAY="'\\n -m <manifest> If -t is not used, then using a browser with cookies you\\n must download the pinned manifest from:\\n $PINNED_MANIFEST_URL\\n -o The path to the vendor required overlay.\\n Can be downloaded from http://snapshots.linaro.org/android/binaries/$SOURCE_OVERLAY\\n'"
USAGE_OPTOVERLAY="m:o:"
- USAGE_OPTHANDLER="o ) SOURCE_OVERLAY=\$OPTARG; SOURCE_OVERLAY_OPTIONAL=0;; m ) MANIFEST=\`readlink -f \$OPTARG\`;;"
+ USAGE_OPTHANDLER="o ) SOURCE_OVERLAY=\$OPTARG; SOURCE_OVERLAY_OPTIONAL=0;; m ) MANIFEST=\`readlink -f \$OPTARG\`; EXACT=1;;"
else
USAGE_SUM="'Usage: \$0 [ -t -d directory -l login ]'"
fi
@@ -69,7 +69,7 @@ done
UBUNTU=\`cat /etc/issue.net | cut -d' ' -f2\`
HOST_ARCH=\`uname -m\`
if [ \${HOST_ARCH} == "x86_64" ] ; then
- PKGS='gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc vim-common python-parted python-yaml wget uuid-dev'
+ PKGS='gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc vim-common python-parted python-yaml wget uuid-dev python-mako'
else
echo "ERROR: Only 64bit Host(Build) machines are supported at the moment."
exit 1
@@ -194,9 +194,13 @@ if [ \${PM} -gt 0 -a \${INTERACTIVE} -eq 1 ] ; then
fi
fi
export MANIFEST_REPO=\`echo ${MANIFEST_REPO} | sed 's/\/\/.*-bot@/\/\/'"\${LINARO_ANDROID_ACCESS_ID}"'@/'\`
+export LOCAL_MANIFEST=\`echo ${LOCAL_MANIFEST} | sed 's/\/\/.*-bot@/\/\/'"\${LINARO_ANDROID_ACCESS_ID}"'@/'\`
export MANIFEST_BRANCH=${MANIFEST_BRANCH}
+export LOCAL_MANIFEST_BRANCH=${LOCAL_MANIFEST_BRANCH}
export MANIFEST_FILENAME=${MANIFEST_FILENAME}
export TARGET_PRODUCT=${TARGET_PRODUCT}
+export PATCHSETS=${PATCHSETS}
+export LUNCH=${LUNCH}
EOF
if [ -n "$TARGET_KERNEL_SOURCE" ] ; then
cat <<EOF
@@ -269,6 +273,13 @@ if [ \${EXACT} -eq 1 ] ; then
rm .repo/manifest.xml
$CP_CMD
fi
+rm -rf .repo/local_manifests
+if [[ -n \${LOCAL_MANIFEST} && ! -n \${MANIFEST} ]]; then
+ cd .repo/
+ git clone \${LOCAL_MANIFEST} -b \${LOCAL_MANIFEST_BRANCH} local_manifests
+ cd -
+fi
+
# check for linaro private git repositories
PRI=\`grep -i "linaro-private" .repo/manifest.xml | wc -l\`
if [ \${PRI} -gt 0 -a \${INTERACTIVE} -eq 1 ] ; then
@@ -286,6 +297,7 @@ if [ \${PRI} -gt 0 -a \${INTERACTIVE} -eq 1 ] ; then
fi
fi
sed -i 's/\/\/.*-bot@/\/\/'"\${LINARO_ANDROID_ACCESS_ID}"'@/' .repo/manifest.xml
+ sed -i 's/\/\/.*-bot@/\/\/'"\${LINARO_ANDROID_ACCESS_ID}"'@/' .repo/local_manifests/*.xml
fi
./repo sync -f -j1
@@ -303,9 +315,9 @@ EOF
if [ -n "$SOURCE_OVERLAY" ]; then
cat <<EOF
-if [ \$SOURCE_OVERLAY_OPTIONAL -ne 1 ]; then
+if [ -n \${SOURCE_OVERLAY} ]; then
# extract the vendor's source overlay
- tar -x -a -f "\$SOURCE_OVERLAY" -C .
+ tar -x -a -f "\${SOURCE_OVERLAY}" -C .
fi
EOF
fi
@@ -316,8 +328,9 @@ build_commands()
{
cat <<EOF
# build the code
-. build/envsetup.sh
-make -j\${CPUS} boottarball systemtarball userdatatarball
+source build/envsetup.sh
+lunch \${LUNCH}
+make -j\${CPUS} ${MAKE_TARGETS}
EOF
}