# This is a munged config file used during development of 'testbox'.
#

override-file: /etc/rc.conf.local <<EOF
dumpdev="/dev/wd0b"		# Device name to crashdump to
sendmail_enable="NO"
EOF

override-file: /etc/rc.local <<EOF
mount -t null /usr /mnt
ls -l /usr > /tmp/output.usr
ls -l /mnt > /tmp/output.tmp
if ! diff -q /tmp/output.usr /tmp/output.tmp
then
	echo "Initial ls of usr and tmp differ!"
	while true; do sleep 60; done
fi
rm -rf /usr/testdir
ls -l /usr > /tmp/output.usr
ls -l /mnt > /tmp/output.tmp
if ! diff -q /tmp/output.usr /tmp/output.tmp
then
	echo "Post-rm ls of usr and tmp differ!"
	while true; do sleep 60; done
fi
mkdir /usr/testdir
ls -l /usr > /tmp/output.usr
ls -l /mnt > /tmp/output.tmp
if ! diff -q /tmp/output.usr /tmp/output.tmp
then
	echo "Post-mkdir ls of usr and tmp differ!"
	while true; do sleep 60; done
fi
cp /usr/include/stdio.h /mnt/testdir/
ls -l /usr > /tmp/output.usr
ls -l /mnt > /tmp/output.tmp
if ! diff -q /tmp/output.usr /tmp/output.tmp
then
	echo "Post-file-cp ls of usr and tmp differ!"
	while true; do sleep 60; done
fi
if ! diff -q /usr/testdir/stdio.h /mnt/testdir/stdio.h
then
	echo "Copied stdio.h differ in the layers!"
	while true; do sleep 60; done
fi
if ! diff -q /usr/include/stdio.h /mnt/testdir/stdio.h
then
	echo "Copied stdio.h is not identical to the source!"
	while true; do sleep 60; done
fi

echo "Initial tests passed OK - going for 'buildworld'"
sleep 5
mkdir -p /usr/src /usr/obj /tmp/obj
mount -t null /tmp/src /usr/src
mount -t null /tmp/obj /usr/obj
cd /usr/src
echo "Mounted - starting!"
make buildworld
EOF

# I run with a serial console - but these don't seem to work under -current.
#override-file: /boot.config << EOF
#-h
#EOF

# Don't run 'make depend' for the kernel
do-not-do-depend:

# Don't create the disk, run installworld, etc.  We're superimposing
# on an already existing image.
do-not-do-install:

# I want a debugging kernel.
config-options: -g

# We need a kernel, don't we?
kernel:	/kernel i386 FSTEST << EOF
machine		"i386"
cpu		"I586_CPU"
cpu		"I686_CPU"
ident		FSTEST
maxusers	32

options		INET			#InterNETworking
options		FFS			#Berkeley Fast Filesystem
options		FFS_ROOT		#FFS usable as root device [keep this!]
options		NULLFS
#options		UNION
#options		UMAPFS
options		PROCFS			#Process filesystem
options		"COMPAT_43"		#Compatible with BSD 4.3 [KEEP THIS!]
options		SCSI_DELAY=15000	#Be pessimistic about Joe SCSI device
options		UCONSOLE		#Allow users to grab the console
options		FAILSAFE		#Be conservative
options		USERCONFIG		#boot -c editor
options		VISUAL_USERCONFIG	#visual boot -c editor

config		kernel	root on wd0

controller	isa0
controller	pci0

controller	fdc0	at isa? port "IO_FD1" bio irq 6 drq 2
disk		fd0	at fdc0 drive 0
disk		fd1	at fdc0 drive 1

controller	wdc0	at isa? port "IO_WD1" bio irq 14
disk		wd0	at wdc0 drive 0
disk		wd1	at wdc0 drive 1

controller	wdc1	at isa? port "IO_WD2" bio irq 15
disk		wd2	at wdc1 drive 0
disk		wd3	at wdc1 drive 1

# syscons is the default console driver, resembling an SCO console
device		sc0	at isa? port IO_KBD conflicts tty irq 1

device		npx0	at isa? port IO_NPX irq 13

device		sio0	at isa? port "IO_COM1" flags 0x30 tty irq 4
device		sio1	at isa? port "IO_COM2" tty irq 3
device		sio2	at isa? disable port "IO_COM3" tty irq 5
device		sio3	at isa? disable port "IO_COM4" tty irq 9

device ed0 at isa? port 0x280 net irq 10 iomem 0xd8000

pseudo-device	loop
pseudo-device	ether
pseudo-device	pty	16
pseudo-device	gzip		# Exec gzipped a.out's
options		KTRACE		#kernel tracing
options		SYSVSHM
options		DDB
options		DIAGNOSTIC
options		INVARIANT_SUPPORT
options		INVARIANTS
# This should probably be covered by 'INVARIANTS' or similar.
options		DEBUG_VFS_LOCKS
options		CONSPEED=115200
# This create too much noise to be useful (not until something really
# fails, at least)
#options		NULLFS_DIAGNOSTIC
options		BREAK_TO_DEBUGGER	#a BREAK on a comconsole goes to 
					#DDB, if available.
options		VFS_BIO_DEBUG
options		SOFTUPDATES

EOF

# For the rest of the kernels, add them as .1, .2 etc here.
