How did these get lost?
This commit is contained in:
parent
4c1d81b2b5
commit
6dc665045d
15
sys/arch/x86/acpi/Makefile.wakecode.inc
Normal file
15
sys/arch/x86/acpi/Makefile.wakecode.inc
Normal file
@ -0,0 +1,15 @@
|
||||
# $NetBSD: Makefile.wakecode.inc,v 1.2 2007/12/09 20:32:17 jmcneill Exp $
|
||||
# FreeBSD: src/sys/i386/acpica/Makefile,v 1.3 2002/05/01 21:54:07 peter Exp
|
||||
|
||||
ACPI_WAKECODE_S= ${S}/arch/${MACHINE}/acpi/acpi_wakecode.S
|
||||
ACPI_GENWAKECODE= ${S}/arch/x86/acpi/genwakecode.sh
|
||||
|
||||
acpi_wakecode.h: ${ACPI_WAKECODE_S} ${ACPI_GENWAKECODE}
|
||||
${CC} -I${.CURDIR} -c ${ACPI_WAKECODE_S}
|
||||
${LD} -M -Map acpi_wakecode.bin.map -z defs -nostdlib \
|
||||
--oformat binary -e wakeup_16 -Ttext 0 \
|
||||
-o acpi_wakecode.bin acpi_wakecode.o
|
||||
${HOST_SH} ${ACPI_GENWAKECODE} > acpi_wakecode.h
|
||||
rm -f acpi_wakecode.bin acpi_wakecode.o acpi_wakecode.bin.map
|
||||
|
||||
acpi_wakeup.o acpi_wakeup.d: acpi_wakecode.h
|
12
sys/arch/x86/acpi/genwakecode.sh
Normal file
12
sys/arch/x86/acpi/genwakecode.sh
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
# $NetBSD: genwakecode.sh,v 1.2 2007/12/09 20:32:18 jmcneill Exp $
|
||||
|
||||
P='/WAKEUP_/ { printf("#define\t%s%s\t%s\n", $2, length($2) < 16 ? "\t" : "", $1); }'
|
||||
awk "$P" < acpi_wakecode.bin.map
|
||||
|
||||
echo
|
||||
echo 'static const unsigned char wakecode[] = {';
|
||||
hexdump -v -e '"\t" 8/1 "0x%02x, " "\n"' < acpi_wakecode.bin | sed 's/0x /0x00/g'
|
||||
echo '};'
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue
Block a user