• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-cqtcocoa誰得pythonphprubygameguibathyscaphec翻訳計画中(planning stage)omegatframeworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

Commit MetaInfo

Revision3d3aacbd1c7f6f636d3093a4d430f2136dbf3220 (tree)
Time2023-01-11 08:12:16
Authorphabrics <phabrics@phab...>
Commiterphabrics

Log Message

Created new script to automate setup of TME machines.

Change Summary

Incremental Difference

--- a/configure.ac
+++ b/configure.ac
@@ -32,9 +32,9 @@ dnl ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3232 dnl POSSIBILITY OF SUCH DAMAGE.
3333
3434 dnl Checks that we are given a good source directory.
35-AC_PREREQ([2.68])
35+AC_PREREQ([2.69])
3636 m4_include(version.m4)
37-AC_INIT([tme], [0.12rc10])
37+AC_INIT([tme],[0.12rc10])
3838 AC_CONFIG_SRCDIR([ic/m68k/m68k-impl.h])
3939 AC_CONFIG_MACRO_DIR([m4])
4040 AC_CANONICAL_TARGET
--- /dev/null
+++ b/machine/sun/tme-make-machs
@@ -0,0 +1,121 @@
1+#!/bin/bash
2+# machine/sun/tme-make-machs - downloads firmware & OS setup files and makes Sun machines:
3+
4+# Copyright (c) 2023 Ruben Agin
5+# All rights reserved.
6+#
7+# Redistribution and use in source and binary forms, with or without
8+# modification, are permitted provided that the following conditions
9+# are met:
10+# 1. Redistributions of source code must retain the above copyright
11+# notice, this list of conditions and the following disclaimer.
12+# 2. Redistributions in binary form must reproduce the above copyright
13+# notice, this list of conditions and the following disclaimer in the
14+# documentation and/or other materials provided with the distribution.
15+# 3. All advertising materials mentioning features or use of this software
16+# must display the following acknowledgement:
17+# This product includes software developed by Matt Fredette.
18+# 4. The name of the author may not be used to endorse or promote products
19+# derived from this software without specific prior written permission.
20+#
21+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24+# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
25+# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29+# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31+# POSSIBILITY OF SUCH DAMAGE.
32+
33+# Firmware downloads for various machines
34+firmware_site=https://people.csail.mit.edu/~fredette/tme
35+firmwares="sun2-multi-rev-R sun3-carrera-rev-3.0 sun4-75-rev-2.9 SUNW,501-1415 SUNW,501-1561 SUNW,501-2325 SUNW,501-3082-update7"
36+
37+# NetBSD location/release to download
38+netbsd_site=https://cdn.netbsd.org
39+netbsd_rel=9.3
40+
41+# Download the firmware for each machine type, if needed
42+if [ ! -d "sun-fw" ]; then
43+ mkdir sun-fw
44+ cd sun-fw
45+ for fw in $firmwares; do
46+ wget $firmware_site/$fw.bin
47+ done
48+ cd ..
49+fi
50+
51+# Mirror arch-specific NetBSD install files
52+for arch in {sun2,sun3}; do
53+ netbsd_path=NetBSD/NetBSD-$netbsd_rel/$arch
54+ # Only download if necessary
55+ if [ ! -d "$netbsd_path" ]; then
56+ wget -R "*.html" -np -r -nH --cut-dirs=1 $netbsd_site/pub/$netbsd_path
57+ fi
58+done
59+
60+for arch in {sparc,sparc64}; do
61+ netbsd_path=NetBSD/images/$netbsd_rel/NetBSD-$netbsd_rel-$arch.iso
62+ # Only download if necessary
63+ if [ ! -f "$netbsd_path" ]; then
64+ wget -np -r -nH --cut-dirs=1 $netbsd_site/pub/$netbsd_path
65+ fi
66+done
67+
68+# First, try to find installed location of tme
69+if [ -z ${MINGW_PREFIX+set} ]; then
70+ prefix=$(dirname `which tmesh`)/..
71+else
72+ prefix=${MINGW_PREFIX}
73+fi
74+
75+loc=`realpath $prefix/share/tme/examples`
76+
77+# Next, key off of the machine descriptions in the examples dir to create config dirs
78+for mach in `ls $loc/SUN*`; do
79+ mach=`basename $mach`
80+ machd=${mach,,}
81+ # Only create config if corresponding dir doesn't already exist
82+ if [ ! -d "$machd" ]; then
83+ echo $mach
84+ mkdir $machd
85+ cp $loc/$mach $machd/MY-$mach 2>/dev/null
86+ cp $loc/{my-sun-macros.txt,sun-keyboards.txt,$machd*} $machd 2>/dev/null
87+ # if there is a site- or mach-specific config, copy those files
88+ [ -d "$loc/$machd" ] && cp $loc/$machd/* $machd 2>/dev/null
89+ fi
90+done
91+
92+# Finally, set up the links to the NetBSD installation files and device configuration
93+for arch in {sun2,sun3,sun4,sun-ultra}; do
94+ netbsd_path=NetBSD/NetBSD-$netbsd_rel/$arch
95+ netbsd_iso=NetBSD/images/$netbsd_rel/NetBSD-$netbsd_rel-sparc
96+ netbsd=netbsd-$arch
97+ for machd in `ls -d $arch-*/`; do
98+ cd $machd
99+ if [ $arch = "sun4" ]; then
100+ [ -d ../sun-fw ] && ln -sf ../sun-fw/$arch* .
101+ [ -d ../sun-fw ] && ln -sf ../sun-fw/SUNW,501-1* .
102+ [ -f "../${netbsd_iso}.iso" ] && ln -sf "../${netbsd_iso}.iso" $netbsd.iso
103+ elif [ $arch = "sun-ultra" ]; then
104+ [ -d ../sun-fw ] && ln -sf ../sun-fw/SUNW* .
105+ [ -f "../${netbsd_iso}64.iso" ] && ln -sf "../${netbsd_iso}64.iso" $netbsd.iso
106+ elif [ -d "../$netbsd_path" ] && [ ! -d "$netbsd.tape" ]; then
107+ [ -d ../sun-fw ] && ln -sf ../sun-fw/$arch* .
108+ mkdir $netbsd.tape
109+ cd $netbsd.tape
110+ ln -s ../../$netbsd_path/installation/tapeimage/tapeboot 01
111+ touch 02 03
112+ gzip -c -d ../../$netbsd_path/installation/miniroot/miniroot.fs.gz > 04
113+ gzip -c -d ../../$netbsd_path/binary/kernel/netbsd-RAMDISK.gz > 05
114+ if [ $arch = "sun3" ]; then
115+ mv 05 02
116+ fi
117+ cd ..
118+ fi
119+ cd ..
120+ done
121+done
--- a/tme/tme.texi
+++ b/tme/tme.texi
@@ -304,6 +304,9 @@ GTK+3 (for a GUI, but will work without if serial support available)
304304 @item
305305 libvncserver (for a GUI, but will work without if serial support available)
306306
307+@item
308+SDL2 (for a GUI, but will work without if serial support available)
309+
307310 @end itemize
308311
309312 @node Optional