2 # $NetBSD: genwakecode.sh,v 1.2 2007/12/09 20:32:18 jmcneill Exp $
5 HEXDUMP
=${HEXDUMP:=hexdump}
8 P
='/WAKEUP_/ { printf("#define\t%s%s\t%s\n", $2, length($2) < 16 ? "\t" : "", $1); }'
9 ${AWK} "$P" < acpi_wakecode.bin.map
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'