Script for automated booting RPX boards

Pavel Roskin pavel_roskin at geocities.com
Wed Feb 2 02:51:42 EST 2000


Hello!

Just in case if anybody here is interested, I'm sending a script that
makes it possible to automate booting RPX/Lite boards from Minicom.

This script can also be used together with pppd for establishing a PPP
connection upon the boot.

Main features:

Runs under runscript and intergrates well with Minicom (Ctrl-A G)
Can be run before and after reset, and also after an unsuccessful load
Detection of "dash rotation"
Flexibility - you can specify kernel name parameters

This script requires kernels to be processed with fixed zsrec.c (see my
previous message)

Happy hacking,
Pavel Roskin

=== cut here ===
#!/usr/bin/runscript
# Script for loading RPX/Lite boards
# Copyright (C) 2000 Pavel Roskin <pavel_roskin at geocities.com>
# Process this file with runscript from Minicom distributions

	goto faststart

try_enter:
	send ""
faststart:
	expect {
		"BCLOPRST key : <?> :"
		"123456789T key : <?> :" goto reload
		"/\b-\b\\" goto try_enter
		timeout 30 goto failed
	}
	send "l\c"
	expect {
		"<?> : "
		timeout 10 goto failed
	}
reload:
	send "7\c"
	expect {
		"> : "
		timeout 10 goto failed
	}
	send ""
	expect {
		"> : "
		timeout 10 goto failed
	}
	# kernel name goes here
	send ""
	expect {
		"> : "
		timeout 10 goto failed
	}
	send ""
	expect {
		"00200000"
		"<?> :" goto reload
		timeout 30 goto failed
	}
	expect {
		"<?> : "
		timeout 10 goto failed
	}
	send "9\c"
	expect {
		"confirm] :"
		timeout 10 goto failed
	}
	send "YES\c"
	expect {
		"load:"
		timeout 10 goto failed
	}
	# kernel parameters go here
	send ""
	expect {
		"booting the kernel"
		timeout 10 goto failed
	}
	exit 0

failed:
	print "\nScript failed\n"
	exit 1
=== cut here ===


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-embedded mailing list