freebsd-dev/sys/i386/acpica/genwakecode.pl
Takanori Watanabe 6161544ca7 Add ACPI S2-S4BIOS Suspend/Resume code.
Some problems may remain.

Reviewed by:iwasaki
2001-07-20 06:07:34 +00:00

23 lines
347 B
Perl

#!/usr/bin/perl
# $FreeBSD$
print "static char wakecode[] = {\n";
open(BIN, "hexdump -Cv acpi_wakecode.bin|");
while (<BIN>) {
s/^[0-9a-f]+//;
s/\|.*$//;
foreach (split()) {
print "0x$_,";
}
print "\n";
}
print "};\n";
close(BIN);
open(NM, "nm -n acpi_wakecode.o|");
while (<NM>) {
split;
print "#define $_[2] 0x$_[0]\n";
}
close(NM);