Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / arch / x86 / acpi / genwakecode.sh
blob55820c46e06432e68836c7c8c30c92d3a3a3790c
1 #!/bin/sh
2 # $NetBSD: genwakecode.sh,v 1.2 2007/12/09 20:32:18 jmcneill Exp $
4 AWK=${AWK:=awk}
5 HEXDUMP=${HEXDUMP:=hexdump}
6 SED=${SED:=sed}
8 P='/WAKEUP_/ { printf("#define\t%s%s\t%s\n", $2, length($2) < 16 ? "\t" : "", $1); }'
9 ${AWK} "$P" < acpi_wakecode.bin.map
11 echo
12 echo 'static const unsigned char wakecode[] = {';
13 ${HEXDUMP} -v -e '"\t" 8/1 "0x%02x, " "\n"' < acpi_wakecode.bin | ${SED} 's/0x /0x00/g'
14 echo '};'
16 exit 0