Skip to content

Commit

Permalink
[ADD] Amiga installer script added
Browse files Browse the repository at this point in the history
  • Loading branch information
MOS6510 committed Oct 4, 2020
1 parent bdbe3c8 commit a9df494
Show file tree
Hide file tree
Showing 13 changed files with 51 additions and 179 deletions.
18 changes: 7 additions & 11 deletions A1200PlusNetworkDriver.readme
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,25 @@ Architecture: m68k-amigaos
DESCRIPTION:

This is a SANA-2 Amiga network device driver for the Amiga1200 Plus
build-in network chip ("KSZ8851"). You can always get the newest version
from:
build-in network chip ("KSZ8851"). You can get the source or the
newest version from:

https://github.com/MOS6510/Driver-AmigaOS-KS8851

You may also want to look on the pages of the Amiga1200 Plus project:

You may also want to look on the pages of the great Amiga1200 Plus project:

http://www.amigaclub.be/projects/amiga1200plus


INSTALLATION:

Execute the small Amiga shell script "install" from Workbench which
copies anything to the right place or copy it manually:
Execute the installer script from Workbench or copy all files manually:

network/ksz8851.device.020 => devs:networks/ksz8851.device
ksz8851.config => env:sana2/
ksz8851.config => envarc:sana2/

ksz8851.config => envarc:sana2/ + env:sana2/

The packages comes with a Roadshow Stack configuration files.
If you want to use it, you also need to copy 2 additional files (or use
the install script):
The package also comes with a Roadshow TCP stack configuration file:

ksz8851 => devs:NetInterfaces/ksz8851
ksz8851.info => devs:NetInterfaces/ksz8851.info
Expand Down
Binary file added DistributionTemplate/Folder.info
Binary file not shown.
148 changes: 27 additions & 121 deletions DistributionTemplate/Install
Original file line number Diff line number Diff line change
@@ -1,54 +1,36 @@
; Installer for Etherbridge Device.
; Copyright (c) 2019 Heiko Pruessing.
; $VER: "Install Etherbridge" 2.01 (26.1.2019)
; Installer script for Amiga1200 Plus Network Device Driver ("ksz8851").
; Copyright (c) 2020 Heiko Pruessing.
; $VER: "Install ksz8851 network device driver" 1.0 (03.10.2020)

; ----------------------------- CONSTS ----------------------------------------

(set #current_version "2.01")
(set #current_version "1.0")

(set #dev-name "etherbridge.device")
(set #dev-name "ksz8851.device")
(set @default-dest "RAM:")
(set #pc-install-path "C:\\ETHBRDGE")
(set #config_file_env "env:sana2/etherbridge.config")
(set #config_file_envarc "envarc:sana2/etherbridge.config")
(set #config_file_env "env:sana2/ksz8851.config")
(set #config_file_envarc "envarc:sana2/ksz8851.config")
(set #src_dev_name "network/ksz8851.device.020")

(set #msg-os-too-low "AmigaOS 2.04 or greater is required.")
(set #msg-janus-too-old "Janus Software 2.1 required. Please install the newest Janus software first and run again.")
(set #msg-no-mui-installed "No MUI found! MUI is needed by the configuration program 'EtherPrefs'. You may install the device without EtherPrefs.")
(set #msg-help-copy-lib "Copy the SANA2 Network Device Driver to the system.")

(set #msg-final-installed
(cat "Installation complete!\n\n"
"Etherbridge 2.0 is on your system!\n\nMay the force be with you! :-)\n"
"ksz8851 device driver 1.0 is on your system!\n\nMay the force be with you! :-)\n"
)
)

(set #wrongversion
(cat "You have an old version of the program 'Installer' "
"on your Amiga!\n\nThe installation procedure needs at least Installer 42.9.\n\n"
"Please check your configuration!"
(cat "You have an old version of 'Installer' installed."
"\n\nThe installation procedure needs at least Amiga Installer 42.9.\n\n"
"Please check your configuration and try again!"
))

(set #msg-install-pc-parts
(cat "Now the PC parts of Etherbridge will be installed on your PC in path\n\n "
#pc-install-path "\n\n"
"For this, Janus 'AREAD' command must be in path on PC side. "
"Be sure your PC had finished booting and no other program is currently running on! "
"Depending on your Bridgeboard this will take some time (1-2 minutes)! "
"Do not break up!"
"\n\n"
"Click 'YES' if ready or 'NO' to skip"
)
)

(set #msg-install-pc-parts-help
(cat "Some files will be copied to PC path '" #pc-install-path "' The janus tool AREAD must be present on path. If not please install manually, check documentation." )
)

(set #intro (cat "\nEtherbridge Network Driver " #current_version
"\n====================================\n� 1997-1999,2013,2019 Heiko Pr�ssing\n\n"
"Welcome to the installation program of Etherbridge.\n"
"Use this tool to install Etherbridge on your system or to update a previously installed release.")
(set #intro (cat "\nAmiga1200 Plus Network Device Driver " #current_version
"\n====================================\n(c) 2019 Heiko Pruessing\n"
"Welcome to the installation program of Amiga1200 Plus network device driver ('ksz8851.device'). "
"Use this tool to install the device driver on your Amiga system or to update a previously installed release.")
)


Expand All @@ -64,92 +46,57 @@
)
)


; Check OS version isn't too old
(if (< (/ (getversion) 65536) 37)
(abort #msg-os-too-low)
)

; Check right version of Janus Library. Should be latest V36.83
(set vernum (getversion "sys:expansion/janus.library"))
(if (< vernum 2359379) ; => last version from Commodore: V36.83
(abort #msg-janus-too-old)
)

;Check that MUI is installed. Needed by the config program EtherPrefs.
(if (< (getversion "LIBS:muimaster.library") 917611) ; V14.107
(abort #msg-no-mui-installed)
)

(complete 0)

; ###### Install Files ########

;Install EtherPrefs to sys:Prefs
(copyfiles
(prompt "Copying the configuration application.")
(help @copyfiles-help)
(source "prefs")
(dest "SYS:Prefs")
(pattern "EtherPrefs#?")
(files)
(confirm)
(infos)
)

;
; Install Device
; Pick the right CPU device and copy it to the destination...
(set installed_cpu (database "cpu") )
(set #default_cpu_choice 0)
(if ( >= installed_cpu "68020") (set #default_cpu_choice 1) )
(if ( >= installed_cpu "68040") (set #default_cpu_choice 2) )
(if ( >= installed_cpu "68060") (set #default_cpu_choice 3) )
(set #devicetype
(askchoice
(choices "68000" "68020" "68040" "68060")
(prompt "Select processor optimized device version (default: The installer chooses the best for your system)")
(help "Some processor optimized devices are available. Pick the right one you want to use.")
(default #default_cpu_choice)
)
)
(set #src_dev_name (select #devicetype "000" "020" "040" "060") )
(set #src_dev_name (cat "devs/networks/etherbridge.device." #src_dev_name) )
(debug #src_dev_name)
;
(copylib
(prompt "Installing the network device driver.")
(help @copylib-help)
(source #src_dev_name)
(dest "DEVS:networks")
(newname "etherbridge.device")
(newname "ksz8851.device")
(confirm)
)

(complete 30)

; Copy new default configuration file(s) only if none exists
(if ( = (exists #config_file_env) 0 )
(
(copyfiles
(source "envarc/sana2/etherbridge.config")
(source "ksz8851.config")
(dest "env:sana2")
(optional "force" "askuser")
(confirm)
)
)
)

(complete 60)

(if ( = (exists #config_file_envarc) 0 )
(
(copyfiles
(source "envarc/sana2/etherbridge.config")
(source "ksz8851.config")
(dest "envarc:sana2")
(confirm)
(files)
)
)
)

(complete 40)
(complete 90)

; Install Roadshow configuration
; Install Roadshow configuration if present
(if ( = (exists "Devs:NetInterfaces" (noreq) ) 2 )
(
(copyfiles
Expand All @@ -165,47 +112,6 @@
)
)
)



;
; Install PC part
;
(complete 50)
(if (askbool (prompt #msg-install-pc-parts) (help #msg-install-pc-parts-help) (default 1))
(
(copyfiles
(prompt (cat "Install the PC files to " #pc-install-path) )
(help @copyfiles-help)
(source "pc")
(dest "T:pc")
(pattern "#?")
(files)
)
(complete 85)
; Run the command to install all...
(set #installpccmd (cat "runpccmd \"aread T:pc/~(#?.BAT) " #pc-install-path " /b\"") )
(run #installpccmd )
;Wait/delay until command is finished...
(run ( cat "runpccmd \"dir " #pc-install-path " \"") ) ; send Space + LF only
)
)
(complete 90)


;
; Start EtherPrefs (default) at the end of the installation
;
(set #start_etherprefs
(askbool
(prompt "Do you want to configure Etherbridge now?\n('SYS:Prefs/EtherPrefs' will be started...)")
(help "The config program will be started ('SYS:Prefs/EtherPrefs').")
(choices "Start EtherPrefs now" "No, configure later")
(default 0)
)
)
(if (= #start_etherprefs 1) (execute "executePrefs.ash") )


;
; Finish Installation
Expand Down
Binary file modified DistributionTemplate/Install.info
Binary file not shown.
Binary file modified DistributionTemplate/Roadshow.info
Binary file not shown.
22 changes: 0 additions & 22 deletions DistributionTemplate/install-old

This file was deleted.

Binary file removed DistributionTemplate/install-old.info
Binary file not shown.
Binary file added DistributionTemplate/network.info
Binary file not shown.
9 changes: 4 additions & 5 deletions KSZ8851/devicedriver/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,13 @@ install:
$(AMIGA_EXPLORER) -s $(BUILDDIR)/$(DEVICE_NAME).$(ARCH) DEVS:/networks/ksz8851.device

builddir:
@echo "Create build dir..."
@mkdir -p $(BUILDDIR)
@mkdir -p $(BUILDDIR)/hwl

# This is a dummy lib for a dummy hardware...
$(BUILDDIR)/libdummyhwl.a: $(OBJS_HWL)
@echo "Create Linking Library..." $@
$(AR) rcs $@ $^
@$(AR) rcs $@ $^

# Creates distribution (and build all architechtures and LHA file at the end)
distribution:
Expand All @@ -73,9 +72,9 @@ distribution:

$(BUILDDIR)/$(DEVICE_NAME).$(ARCH): $(OBJS)
@echo "Linking " $@
$(LD) $^ $(HWL_LIB_PATH) -o $@ $(LDOPTS)
@$(LD) $^ $(HWL_LIB_PATH) -o $@ $(LDOPTS)
@strings $@ | grep '$$VER'
$(MAKE) addToAdf
@$(MAKE) addToAdf
@ls -la $@

clean:
Expand All @@ -84,7 +83,7 @@ clean:

$(BUILDDIR)/%.o:%.c
@echo "Compiling C " $< " (68"$(ARCH)")"
$(CC) -c $(CFLAGS) -o $@ $<
@$(CC) -c $(CFLAGS) -o $@ $<

.c.s: $(HDR)
@echo "Compiling C (only to ASM) " $< " (68"$(ARCH)")"
Expand Down
11 changes: 1 addition & 10 deletions KSZ8851/servicetool/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,12 @@ LDFLAGS += -L$(BUILDDIR)

all: builddir $(BUILDDIR)/ksz8851

addToADF:
#@echo "Create ADF file..."
#@$(XDFTOOL) $(ADFIMAGE) format "Amiga1200+Tools" + makedir "network" || true
#@$(XDFTOOL) $(ADFIMAGE) delete "network/ksz8851" || true
#@$(XDFTOOL) $(ADFIMAGE) write $(BUILDDIR)/ksz8851 "network"


builddir:
@echo "Create build directories..."
@mkdir -p $(BUILDDIR)

$(BUILDDIR)/ksz8851: $(OBJ_MAIN) $(BUILDDIR)/libksz8851.a
@echo "Linking " $@
@$(LD) $^ $(LDFLAGS) -o $@ -lksz8851 -Wl,-Map,$@.map
$(MAKE) addToADF

$(BUILDDIR)/libksz8851.a: $(OBJ_LIB)
@echo "Create Linking Library " $@
Expand All @@ -67,7 +58,7 @@ clean:
#.c.o:
$(BUILDDIR)/%.o:%.c $(HDR)
@echo "Compiling C " $< " (cpu=68"$(ARCH)")"
$(CC) -c $(CFLAGS) -o $@ $<
@$(CC) -c $(CFLAGS) -o $@ $<

#.c.s:
$(BUILDDIR)/%.s:%.c $(HDR)
Expand Down
4 changes: 2 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ clean:
createADFDistribution:
@$(XDFTOOL) $(ADFIMAGE) write DistributionTemplate/install
@$(XDFTOOL) $(ADFIMAGE) write DistributionTemplate/install.info
@$(XDFTOOL) $(ADFIMAGE) write DistributionTemplate/ksz8851
@$(XDFTOOL) $(ADFIMAGE) write DistributionTemplate/ksz8851.info
@$(XDFTOOL) $(ADFIMAGE) write DistributionTemplate/Roadshow/ksz8851
@$(XDFTOOL) $(ADFIMAGE) write DistributionTemplate/Roadshow/ksz8851.info
@$(XDFTOOL) $(ADFIMAGE) write DistributionTemplate/ksz8851.config
@$(XDFTOOL) $(ADFIMAGE) list

Expand Down
15 changes: 8 additions & 7 deletions tools/create_lha_distribution.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
#!/bin/sh
# Creates LHA distribution file.

# 1. Parameter LHA file
# 1. Parameter: LHA archive file to create

DISTDIR=build/LhaDistribution
DISTDIRNAME=A1200PlusNetworkDriver
DISTDIR=build/${DISTDIRNAME}
ARCH=020

echo "Build LHA distribution:"
mkdir -p ${DISTDIR}
cp -r DistributionTemplate/* ${DISTDIR}
cp KSZ8851/devicedriver/build/build-${ARCH}/ksz8851.device.${ARCH} ${DISTDIR}/network/
mv ${DISTDIR}/Folder.info ${DISTDIR}.info

#rm -fr ${DISTDIR}

cd ${DISTDIR}
lha c --ignore-mac-files $1 *
cd ${DISTDIR}/..
lha c --ignore-mac-files $1 ${DISTDIRNAME}*
cd ../..
cp A1200PlusNetworkDriver.readme build
lha l $1

Loading

0 comments on commit a9df494

Please sign in to comment.