#owner: Ron Minnich #email: rminnich@lanl.gov #status: unstable #explanation: #flash-types: #payload-types: #OS-types: #OS-issues: #console-types: #vga: #last-known-good: 0/0/0000 #Comments: #Links: #Mainboard-revision: #AKA: $mainboardcount = 0; sub mainboard { my $sname = shift(@_); my $mainboard = $sname; $mainboard =~ s/.*src.mainboard.(.*).STATUS/$1/; open(STATUS, $sname) || die("Can' open $name: $!"); $mainboardlist[$mainboardcount] = $mainboard; $mainboardcount++; LOOP: while() { chop; next LOOP if (/^#.*/) ; ($varname, $value) = split(/:/); # no lead spaces/tabs on value! $value =~ s/^[ \t]+//; # @ gets eaten up ... $value =~ s/@/AT_AT_SIGN/; $varname =~ s/-/_/g; $cmd = " \$$varname { '$mainboard' } = \"$value\""; #print "Command: $cmd\n"; eval $cmd; } } sub cell { my $item = shift(@_); print "$item\n"; } sub dumpstatus { print "\n"; print "\n"; print "\n"; cell("Name"); cell("Revision"); cell("AKA"); cell("Status"); cell("owner"); cell("email"); cell("Last Known Good"); cell("Explanation"); print "\n"; foreach $i (0 .. $#mainboardlist) { print "\n"; $board = $mainboardlist[$i]; cell($board); cell($Mainboard_revision{$board}); cell($AKA{$board}); cell($status{$board}); cell($owner{$board}); $mail = $email{$board}; $mail =~ s/AT_AT_SIGN/@/; #cell($email{$board}); cell($mail); cell($last_known_good{$board}); cell($explanation{$board}); #print "$board, $status{$board}, $owner{$board}\n"; print "\n"; } print "

LinuxBIOS Mainboard Status

\n"; } sub dumpbootinfo { print "\n"; print "\n"; print "\n"; cell("Name"); cell("Flash types"); cell("Payload Types"); cell("OS types"); cell("OS issues"); cell("Comments"); print "\n"; foreach $i (0 .. $#mainboardlist) { print "\n"; $board = $mainboardlist[$i]; cell($board); cell($flash_types{$board}); cell($payload_types{$board}); cell($OS_types{$board}); cell($OS_issues{$board}); cell($Comments{$board}); print "\n"; } print "

LinuxBIOS Boot information

\n"; } sub dumpconsoleinfo{ print "\n"; print "\n"; print "\n"; cell("Name"); cell("Console types"); cell("VGA capability"); print "\n"; foreach $i (0 .. $#mainboardlist) { print "\n"; $board = $mainboardlist[$i]; cell($board); cell($console_types{$board}); cell($vga{$board}); print "\n"; } print "

LinuxBIOS Console Information

\n"; } sub dumplinks { print "\n"; print "\n"; print "\n"; cell("Name"); cell("Links"); print "\n"; foreach $i (0 .. $#mainboardlist) { print "\n"; $board = $mainboardlist[$i]; cell($board); cell($Links{$board}); print "\n"; } print "

LinuxBIOS Links and Documentation

\n"; } # make it look like C argv[] unshift(@ARGV, "XX"); $prefix="."; if ($#ARGV == 1) { $prefix = $ARGV[1]; } open(DIRS, "ls $prefix/src/mainboard/*/*/STATUS|") || die("open ls failed: $!"); while() { chop; printf(STDERR "$_ \n"); mainboard($_); } dumpstatus(); dumpbootinfo(); dumpconsoleinfo(); dumplinks();