-
Notifications
You must be signed in to change notification settings - Fork 2
/
buildm68k.sh
executable file
·44 lines (37 loc) · 1.54 KB
/
buildm68k.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# Not used: Target machine, used to select the right software for the SD card.
# TARGET=MZ-700
# TARGET=MZ-80A
M68K_SHARPMZ_BUILD=1
M68K_SHARPMZ_APPADDR=0x100000
M68K_SHARPMZ_APPSIZE=0x70000
M68K_SHARPMZ_HEAPSIZE=0x8000
M68K_SHARPMZ_STACKSIZE=0x3D80
# NB: When setting this variable, see lower section creating the SD card image which uses a hard coded value and will need updating.
ROOT_DIR=/dvlp/Projects/dev/github/
# NB: This clean out is intentionally hard coded as -fr is dangerous, if a variable failed to be set if could see your source base wiped out.
rm -fr /dvlp/Projects/dev/github/zSoft/SD/M68K/*
(
# Ensure the zOS target directories exist.
cd ${ROOT_DIR}/zSoft
mkdir -p SD/SharpMZ
mkdir -p SD/Dev
mkdir -p SD/M68K/ZOS
if [ "${M68K_SHARPMZ_BUILD}x" != "x" -a ${M68K_SHARPMZ_BUILD} = 1 ]; then
echo "Building M68K for Sharp MZ"
./build.sh -C M68K -O zos -M 0x1FD80 -B 0x0000 -S ${M68K_SHARPMZ_STACKSIZE} -N ${M68K_SHARPMZ_HEAPSIZE} -A ${M68K_SHARPMZ_APPADDR} -a ${M68K_SHARPMZ_APPSIZE} -n 0x0000 -s 0x0000 -d -Z
if [ $? != 0 ]; then
echo "Error building Sharp MZ Distribution..."
exit 1
fi
# Copy the BRAM ROM templates to the build area for the FPGA.
# cp rtl/TZSW_* ../tranZPUter/FPGA/SW700/v1.3/devices/sysbus/BRAM/
# Copy the newly built files into the staging area ready for copying to an SD card.
# cp -r build/SD/* SD/SharpMZ/
# The K64F needs a copy of the zOS ROM for the ZPU so that it can load it into the FPGA.
# cp build/SD/ZOS/* SD/K64F/ZOS/
fi
)
if [ $? != 0 ]; then
exit 1
fi