summaryrefslogtreecommitdiffstats
path: root/sys/i386/acpica/genwakecode.pl
blob: 1f5aede59309bfa2b8ae53840516196ace2d6b00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/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);

OpenPOWER on IntegriCloud