#!/bin/bash set -e MP_MINIX=/tmp/minix MP_BOOT=/tmp/minixboot : ${ARCH=evbearm-el} : ${OBJ=../obj.arm} : ${CROSS_TOOLS=${OBJ}/"tooldir.`uname -s`-`uname -r`-`uname -m`"/bin} : ${CROSS_PREFIX=${CROSS_TOOLS}/arm-elf32-minix-} : ${DESTDIR=${OBJ}/destdir.$ARCH} : ${FSTAB=$DESTDIR/etc/fstab} : ${LOOP=/dev/loop0} : ${EMPTYIMG=minix_arm_sd_empty.img} : ${IMG=minix_arm_sd.img} : ${QEMU=/opt/bin/qemu-system-arm} BUILDSH=build.sh if [ ! -f $BUILDSH ] then echo "Please invoke me from the root source dir, where $BUILDSH is." exit 1 fi if [ ! -f ${EMPTYIMG}.bz2 ] then echo Retrieving $EMPTYIMG wget http://www.minix3.org/arm/${EMPTYIMG}.bz2 fi if [ ! -f $IMG ] then echo decompressing $EMPTYIMG onto $IMG bzip2 -d -k ${EMPTYIMG}.bz2 mv $EMPTYIMG $IMG fi # remove fstab and generated pw db rm -rf $DESTDIR/etc sh build.sh -j4 -m$ARCH -O $OBJ -D $DESTDIR -u distribution cat >$FSTAB <