genwakecode.sh revision 1.2
11.2Sjmcneill#!/bin/sh 21.2Sjmcneill# $NetBSD: genwakecode.sh,v 1.2 2007/12/09 20:32:18 jmcneill Exp $ 31.2Sjmcneill 41.2SjmcneillP='/WAKEUP_/ { printf("#define\t%s%s\t%s\n", $2, length($2) < 16 ? "\t" : "", $1); }' 51.2Sjmcneillawk "$P" < acpi_wakecode.bin.map 61.2Sjmcneill 71.2Sjmcneillecho 81.2Sjmcneillecho 'static const unsigned char wakecode[] = {'; 91.2Sjmcneillhexdump -v -e '"\t" 8/1 "0x%02x, " "\n"' < acpi_wakecode.bin | sed 's/0x /0x00/g' 101.2Sjmcneillecho '};' 111.2Sjmcneill 121.2Sjmcneillexit 0 13