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
This commit is contained in:
Erik van der Kouwe 2014-08-06 15:11:22 +02:00 committed by David van Moolenbroek
parent 44bb91d464
commit 63a89582ab
3 changed files with 15 additions and 4 deletions

View file

@ -347,7 +347,7 @@ function minix_test {
LOG=$(pwd)/test.log LOG=$(pwd)/test.log
if [ "$C" == "full" ]; then if [ "$C" == "full" ]; then
cd $ROOT 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 - cd -
else else
C=$C ./relink.llvm 2>&1 | tee $LOG; test ${PIPESTATUS[0]} -eq 0 || exit 125 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 case "$mode" in
'buildimage') 'buildimage')
(cd $ROOT && CREATE_IMAGE_ONLY=1 releasetools/x86_hdimage.sh) (cd $ROOT && CREATE_IMAGE_ONLY=1 releasetools/x86_hdimage.sh -b)
;; ;;
'buildboot') 'buildboot')
(cd $ROOT && $MAKE -C releasetools do-hdboot) (cd $ROOT && $MAKE -C releasetools do-hdboot)

View file

@ -116,7 +116,7 @@ if [ "${REBUILD_MINIX}" == "yes" ]; then
echo "BUILDVARS:$BUILDVARS" echo "BUILDVARS:$BUILDVARS"
echo echo
cd ${MINIX_ROOT} cd ${MINIX_ROOT}
./releasetools/x86_hdimage.sh || EXITCODE=1 ./releasetools/x86_hdimage.sh -b || EXITCODE=1
cd ${MYPWD} cd ${MYPWD}
if [ "$EXITCODE" != "0" ]; then if [ "$EXITCODE" != "0" ]; then
echo "Error: Failed building Minix source code." echo "Error: Failed building Minix source code."

View file

@ -5,6 +5,10 @@ set -e
# This script creates a bootable image and should at some point in the future # This script creates a bootable image and should at some point in the future
# be replaced by makefs. # 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} : ${ARCH=i386}
: ${OBJ=../obj.${ARCH}} : ${OBJ=../obj.${ARCH}}
@ -30,6 +34,9 @@ set -e
# we create a disk image of about 2 gig's # we create a disk image of about 2 gig's
# for alignment reasons, prefer sizes which are multiples of 4096 bytes # 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))} : ${ROOT_SIZE=$(( 64*(2**20) / 512))}
: ${HOME_SIZE=$(( 128*(2**20) / 512))} : ${HOME_SIZE=$(( 128*(2**20) / 512))}
: ${USR_SIZE=$(( 1792*(2**20) / 512))} : ${USR_SIZE=$(( 1792*(2**20) / 512))}
@ -43,12 +50,16 @@ set -e
# Where the kernel & boot modules will be # Where the kernel & boot modules will be
MODDIR=${DESTDIR}/boot/minix/.temp MODDIR=${DESTDIR}/boot/minix/.temp
while getopts "i" c while getopts "ib" c
do do
case "$c" in case "$c" in
i) : ${IMG=minix_x86.iso} i) : ${IMG=minix_x86.iso}
ISOMODE=1 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 esac
done done