MiniMemoryTester/make_bootable

68 lines
1.2 KiB
Plaintext
Raw Normal View History

2015-09-29 01:45:46 +00:00
#!/bin/bash
# Here's our fancy build pipeline. Output = src/mtsystem (binary file)
./Merlin32 -V . src/mmt.s
# name of your disk image
DISK="MT"
# whatever the build produces
OUTFILE="src/mtsystem"
# set one of the following to true
USE_CADIUS=true
USE_APPLECOMMANDER=false
if [ ! -f $OUTFILE ]; then
exit 1
fi
mv $OUTFILE src/mt.system
SRCFILES=(`ls src/*.s`)
SYSFILES=(`ls src/PRODOS src/*system`)
CADIUS="../tools/Cadius"
P8NAME="$DISK"
IMGNAME="$DISK.po"
DISKSIZE=800KB
SRCDIR=src
BLDDIR=build/nix
if [ ! -d $BLDDIR ] ; then
echo "Build directory for this platform doesn't exist so I will create it."
mkdir -p $BLDDIR
echo "Created: $BLDDIR"
sleep 1
fi
# need to autogen
#cp src/_FileInformation.txt $BLDDIR
$CADIUS createvolume $IMGNAME $P8NAME $DISKSIZE
#SOURCE FILES
for f in ${SRCFILES[@]};
do
FNAME=${f##*/}
echo Processing $FNAME
cp $f $BLDDIR/$FNAME
$CADIUS sethighbit $BLDDIR/$FNAME > /dev/null
# add -V to debug
$CADIUS addfile $IMGNAME /$P8NAME/ $BLDDIR/$FNAME >/dev/null
done
#SYSTEM FILES
for f in ${SYSFILES[@]};
do
FNAME=${f##*/}
echo Processing $FNAME
cp $f $BLDDIR/$FNAME
$CADIUS addfile $IMGNAME /$P8NAME/ $BLDDIR/$FNAME > /dev/null
done
exit