From: Erik van der Kouwe Date: Wed, 6 Aug 2014 13:11:22 +0000 (+0200) Subject: x86_hdimage: increase image size for bitcode build X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=refs%2Fchanges%2F39%2F3139%2F1;p=minix.git x86_hdimage: increase image size for bitcode build Make disk image size sufficient for LLVM bitcode build with symbols. Edited by David van Moolenbroek to do this only when -b is given. Change-Id: I3bde164756c477b4af5ed9435ca03da3b186cf7e --- diff --git a/minix/llvm/clientctl b/minix/llvm/clientctl index d0868c1fc..aa8bebef4 100755 --- a/minix/llvm/clientctl +++ b/minix/llvm/clientctl @@ -347,7 +347,7 @@ function minix_test { LOG=$(pwd)/test.log if [ "$C" == "full" ]; then cd $ROOT - JOBS=$JOBS BUILDVARS="-V MKBITCODE=yes" ./releasetools/x86_hdimage.sh 2>&1 | tee $LOG; test ${PIPESTATUS[0]} -eq 0 || exit 125 + JOBS=$JOBS BUILDVARS="-V MKBITCODE=yes" ./releasetools/x86_hdimage.sh -b 2>&1 | tee $LOG; test ${PIPESTATUS[0]} -eq 0 || exit 125 cd - else C=$C ./relink.llvm 2>&1 | tee $LOG; test ${PIPESTATUS[0]} -eq 0 || exit 125 @@ -373,7 +373,7 @@ function minix_bisect { case "$mode" in 'buildimage') - (cd $ROOT && CREATE_IMAGE_ONLY=1 releasetools/x86_hdimage.sh) + (cd $ROOT && CREATE_IMAGE_ONLY=1 releasetools/x86_hdimage.sh -b) ;; 'buildboot') (cd $ROOT && $MAKE -C releasetools do-hdboot) diff --git a/minix/llvm/configure.llvm b/minix/llvm/configure.llvm index 8e0bf07fb..6f11aca3f 100755 --- a/minix/llvm/configure.llvm +++ b/minix/llvm/configure.llvm @@ -116,7 +116,7 @@ if [ "${REBUILD_MINIX}" == "yes" ]; then echo "BUILDVARS:$BUILDVARS" echo cd ${MINIX_ROOT} - ./releasetools/x86_hdimage.sh || EXITCODE=1 + ./releasetools/x86_hdimage.sh -b || EXITCODE=1 cd ${MYPWD} if [ "$EXITCODE" != "0" ]; then echo "Error: Failed building Minix source code." diff --git a/releasetools/x86_hdimage.sh b/releasetools/x86_hdimage.sh index 194a64b6f..77ba4fcab 100755 --- a/releasetools/x86_hdimage.sh +++ b/releasetools/x86_hdimage.sh @@ -5,6 +5,10 @@ set -e # This script creates a bootable image and should at some point in the future # be replaced by makefs. # +# Supported command line switches: +# -i build iso image instead of qemu imaeg +# -b bitcode build, increase partition sizes as necessary +# : ${ARCH=i386} : ${OBJ=../obj.${ARCH}} @@ -30,6 +34,9 @@ set -e # we create a disk image of about 2 gig's # for alignment reasons, prefer sizes which are multiples of 4096 bytes # +# these sizes are insufficient for bitcode builds! +# invoke this script with the -b flag to increase sizes accordingly +# : ${ROOT_SIZE=$(( 64*(2**20) / 512))} : ${HOME_SIZE=$(( 128*(2**20) / 512))} : ${USR_SIZE=$(( 1792*(2**20) / 512))} @@ -43,12 +50,16 @@ set -e # Where the kernel & boot modules will be MODDIR=${DESTDIR}/boot/minix/.temp -while getopts "i" c +while getopts "ib" c do case "$c" in i) : ${IMG=minix_x86.iso} ISOMODE=1 ;; + b) # bitcode build: increase partition sizes + ROOT_SIZE="$((${ROOT_SIZE} + 192*(2**20) / 512))" + USR_SIZE="$((${USR_SIZE} + 256*(2**20) / 512))" + ;; esac done