#
# Copyright (C) 2017 FAUmachine Team <info@faumachine.org>.
# This program is free software. You can redistribute it and/or modify it
# under the terms of the GNU General Public License, either version 2 of
# the License, or (at your option) any later version. See COPYING.
#

#
# Insert installation DVD
#
cdrom_insert	Debian-4.0r0-amd64-DVD-1
#
# Power-on node.
#
power_on
#
# Wait for boot prompt.
#
wait_asc	boot:						1min
type		"\0d"
#
# Wait for "Choose language".
# Use preselected "English".
# Press return.
#
wait_asc	Choose language					10min
type		"\0d"
#
# Wait for "Choose country, territory or area".
# Use preselected "United States".
# Press return.
#
wait_asc	Choose a country, territory or area		3min
type		"\0d"
#
# Wait for "Select a keyboard layout".
# Use preselected "American English".
# Press return.
#
wait_asc	Select a keyboard layout			5min
wait_asc	American English				1min
type		"\0d"
#
# Some intermediate steps.
#
wait_asc	Detecting hardware to find CD-ROM drives	1min
wait_asc	Scanning CD-ROM					5min
wait_asc	Loading additional components			5min
wait_asc	Detecting network hardware			15min
wait_asc	Configuring the network with DHCP		5min
#
# Wait for "Configure the network" ("Please enter the hostname...").
# Switch to second console (Press <Alt>-<F2>).
#
# wait_asc	Configure the network				1min
wait_asc	Please enter the hostname			1min
press_alt
type		"\11"
release_alt
#
# Wait for "Please press Enter to activate this console.".
# Press return.
#
wait_asc	Please press Enter to activate this console.	1min
type		"\0d"
#
# Wait for prompt.
# Unmount CD.
#
wait_asc	~ #  						1min
type		"umount /cdrom\0d"
#
# Wait for prompt.
# Remove CD.
#
wait_asc	~ #  						1min
cdrom_remove
#
# Wait for prompt.
# Insert test CDROM.
#
wait_asc	~ #  						1min
cdrom_insert	cd.iso
#
# Wait for prompt.
# Mount CDROM.
#
wait_asc	~ #  						1min
type		"mount -r /dev/hdc /mnt\0d"
#
# Wait for prompt.
# Shutdown network.
#
wait_asc	~ #  						1min
type		"ifconfig eth0 down\0d"
#
# Run test program.
#
wait_asc	~ #  						10sec
type		"/mnt/eepro100-diag -aa\0d"
wait_asc	eepro100-diag.c:v2.13 2/28/2005 Donald Becker (becker@scyld.com)		1min
wait_asc	http://www.scyld.com/diag/index.html						10sec
wait_asc	Index #1: Found a Intel i82557/8/9 EtherExpressPro100 adapter at 0xd000.	10sec
wait_asc	i82557 chip registers at 							10sec
# wait_asc	01000000 00000000 00000000 00080002 143c0080 00000000				10sec
wait_asc	01000000 00000000 00000000 00080000 10000000 00000000				10sec
wait_asc	No interrupt sources are pending.						10sec
wait_asc	The transmit unit state is 'Idle'.						10sec
wait_asc	The receive unit state is 'Idle'.						10sec
wait_asc	This status is unusual for an activated interface.				10sec
wait_asc	The Command register has an unprocessed command 0100(?!).			10sec
wait_asc	~ #  						1min
type		"/mnt/eepro100-diag -e\0d"
wait_asc	eepro100-diag.c:v2.13 2/28/2005 Donald Becker (becker@scyld.com)		1min
wait_asc	http://www.scyld.com/diag/index.html						10sec
wait_asc	Index #1: Found a Intel i82557/8/9 EtherExpressPro100 adapter at 0xd000.	10sec
wait_asc	Intel EtherExpress Pro 10/100 EEPROM contents:					10sec
wait_asc	Station address 00:D0:B7:00:00:01.						10sec
wait_asc	Board assembly 123443-033, Physical connectors present: RJ45			10sec
wait_asc	Primary interface chip i82555 PHY #1.						10sec
# wait_asc	Secondary interface chip i82555, PHY -1.					10sec
# wait_asc	Sleep mode is enabled.  This is not recommended.				10sec
# wait_asc	Under high load the card may not respond to					10sec
# wait_asc	PCI requests, and thus cause a master abort.					10sec
# wait_asc	To clear sleep mode use the '-G 0 -w -w -f' options.				10sec
wait_asc	~ #  						1min
type		"/mnt/eepro100-diag -mm\0d"
wait_asc	eepro100-diag.c:v2.13 2/28/2005 Donald Becker (becker@scyld.com)		1min
wait_asc	http://www.scyld.com/diag/index.html						10sec
wait_asc	Index #1: Found a Intel i82557/8/9 EtherExpressPro100 adapter at 0xd000.	10sec
wait_asc	Primary transceiver is MII PHY #1. MII PHY #1 transceiver registers:		10sec
# wait_asc	3000 7809 02a8 0154 05e1 0000 0010 0000						10sec
wait_asc	3100 782d 02a8 0154 41e1 41e1 0003 0000						10sec
wait_asc	0000 0000 0000 0000 0000 0000 0000 0000						10sec
# wait_asc	0000 0000 0001 0000 0000 0000 0000 0000						10sec
wait_asc	0003 0000 0001 0000 0000 0000 0000 0000						10sec
# wait_asc	ffff 0000 0000 0000 00a0 0000 0000 0000.					10sec
wait_asc	0000 0000 0000 0000 0000 0000 0000 0000.					10sec
# wait_asc	Baseline value of MII status register is 7809.					10sec
wait_asc	Baseline value of MII status register is 782d.					10sec
wait_asc	~ #  										5min
sshot
