Merge from vendor branch LESS:
[dragonfly.git] / sys / i386 / acpica / genwakecode.sh
1 #!/bin/sh
2 # $FreeBSD: src/sys/i386/acpica/genwakecode.sh,v 1.1.6.1 2003/08/22 20:49:21 jhb Exp $
3 # $DragonFly: src/sys/i386/acpica/Attic/genwakecode.sh,v 1.1 2003/09/24 03:32:16 drhodus Exp $
4 #
5 echo 'static char wakecode[] = {';
6 hexdump -Cv acpi_wakecode.bin | \
7     sed -e 's/^[0-9a-f][0-9a-f]*//' -e 's/\|.*$//' | \
8     while read line
9     do
10         for code in ${line}
11         do
12             echo -n "0x${code},";
13         done
14     done
15 echo '};'
16
17 nm -n acpi_wakecode.o | while read offset dummy what
18 do
19     echo "#define ${what}       0x${offset}"
20 done
21
22 exit 0