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
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)
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."
# 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}}
# 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))}
# 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