-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathrebuild_rom_with_debug.sh
executable file
·52 lines (41 loc) · 1.45 KB
/
rebuild_rom_with_debug.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
45
46
47
48
49
50
51
#!/bin/bash
CPU_COUNT=$(grep processor /proc/cpuinfo | wc -l)
THREADS=${CPU_COUNT}
#Some how, running more than 8 tasks doesn't succeed every time
#if [ ${THREADS} -gt 8 ]
#then
# THREADS=8
#fi
args=("$@")
if [ "${args[ 0 ]}" == "-h" ]
then
echo "Options are:"
echo "-h prints this help text"
echo "--with-nonvampire-support building for non-vampire platforms"
exit
fi
echo "##############################################"
echo "# Rebuilding rom with debug"
echo "# CPU Count: ${CPU_COUNT}"
echo "# Rebuilding with ${THREADS} parallel tasks"
if [ $# -gt 0 ]; then echo "# Building with $@"; fi
echo "##############################################"
sleep 3
make clean
git clean -df
rm -rf bin/amiga-m68k
rm -rf config/features.status
DISTOPTNAME="--enable-dist-name=${DISTRONAME}"
DISTOPTVER="--enable-dist-version=${DISTROVERSION}"
source ./make_dist_config.sh
./configure "${DISTOPTNAME}" "${DISTOPTVER}" --target=amiga-m68k --with-optimization="-Os" --enable-ccache --with-aros-prefs=classic --with-resolution=640x256x4 --with-cpu=68040 --with-serial-debug --enable-debug=all $@
make -j${THREADS}
make -j${THREADS} kernel
if [ "${args[ 0 ]}" == "--with-nonvampire-support" ]
then
cat bin/amiga-m68k/gen/boot/aros-amiga-m68k-ext.bin bin/amiga-m68k/gen/boot/aros-amiga-m68k-rom.bin > ApolloROM.UAE
ls -lah ApolloROM.UAE
else
cat bin/amiga-m68k/gen/boot/aros-amiga-m68k-ext.bin bin/amiga-m68k/gen/boot/aros-amiga-m68k-rom.bin > ApolloROM.V4
ls -lah ApolloROM.V4
fi