1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00
freebsd/sys/i386/acpica/genwakecode.sh
2002-05-01 21:52:34 +00:00

22 lines
361 B
Bash

#!/bin/sh
# $FreeBSD$
#
echo 'static char wakecode[] = {';
hexdump -Cv acpi_wakecode.bin | \
sed -e 's/^[0-9a-f][0-9a-f]*//' -e 's/\|.*$//' | \
while read line
do
for code in ${line}
do
echo -n "0x${code},";
done
done
echo '};'
nm -n acpi_wakecode.o | while read offset dummy what
do
echo "#define ${what} 0x${offset}"
done
exit 0