Changeset View
Changeset View
Standalone View
Standalone View
sys/boot/i386/gptzfsboot/Makefile
# $FreeBSD$ | # $FreeBSD$ | ||||
.PATH: ${.CURDIR}/../boot2 ${.CURDIR}/../gptboot \ | .PATH: ${.CURDIR}/../boot2 ${.CURDIR}/../gptboot \ | ||||
${.CURDIR}/../zfsboot ${.CURDIR}/../common \ | ${.CURDIR}/../zfsboot ${.CURDIR}/../common \ | ||||
${.CURDIR}/../../common | ${.CURDIR}/../../common ${.CURDIR}/../../../crypto/skein | ||||
FILES= gptzfsboot | FILES= gptzfsboot | ||||
MAN= gptzfsboot.8 | MAN= gptzfsboot.8 | ||||
NM?= nm | NM?= nm | ||||
BOOT_COMCONSOLE_PORT?= 0x3f8 | BOOT_COMCONSOLE_PORT?= 0x3f8 | ||||
BOOT_COMCONSOLE_SPEED?= 9600 | BOOT_COMCONSOLE_SPEED?= 9600 | ||||
B2SIOFMT?= 0x3 | B2SIOFMT?= 0x3 | ||||
REL1= 0x700 | REL1= 0x700 | ||||
ORG1= 0x7c00 | ORG1= 0x7c00 | ||||
ORG2= 0x0 | ORG2= 0x0 | ||||
CFLAGS= -DBOOTPROG=\"gptzfsboot\" \ | CFLAGS= -DBOOTPROG=\"gptzfsboot\" \ | ||||
-O1 \ | -O1 \ | ||||
-DGPT -DBOOT2 \ | -DGPT -DBOOT2 \ | ||||
-DSIOPRT=${BOOT_COMCONSOLE_PORT} \ | -DSIOPRT=${BOOT_COMCONSOLE_PORT} \ | ||||
-DSIOFMT=${B2SIOFMT} \ | -DSIOFMT=${B2SIOFMT} \ | ||||
-DSIOSPD=${BOOT_COMCONSOLE_SPEED} \ | -DSIOSPD=${BOOT_COMCONSOLE_SPEED} \ | ||||
-I${.CURDIR}/../../common \ | -I${.CURDIR}/../../common \ | ||||
-I${.CURDIR}/../common \ | -I${.CURDIR}/../common \ | ||||
-I${.CURDIR}/../../zfs \ | -I${.CURDIR}/../../zfs \ | ||||
-I${.CURDIR}/../../../cddl/boot/zfs \ | -I${.CURDIR}/../../../cddl/boot/zfs \ | ||||
-I${.CURDIR}/../../../crypto/skein \ | |||||
-I${.CURDIR}/../btx/lib -I. \ | -I${.CURDIR}/../btx/lib -I. \ | ||||
-I${.CURDIR}/../boot2 \ | -I${.CURDIR}/../boot2 \ | ||||
-I${.CURDIR}/../../.. \ | -I${.CURDIR}/../../.. \ | ||||
-Wall -Waggregate-return -Wbad-function-cast -Wcast-align \ | -Wall -Waggregate-return -Wbad-function-cast -Wno-cast-align \ | ||||
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ | -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ | ||||
-Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ | -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ | ||||
-Winline | -Winline -Wno-tentative-definition-incomplete-type -Wno-pointer-sign | ||||
.if !defined(LOADER_NO_GELI_SUPPORT) | .if !defined(LOADER_NO_GELI_SUPPORT) | ||||
CFLAGS+= -DLOADER_GELI_SUPPORT | CFLAGS+= -DLOADER_GELI_SUPPORT | ||||
CFLAGS+= -I${.CURDIR}/../../geli | CFLAGS+= -I${.CURDIR}/../../geli | ||||
LIBGELIBOOT= ${.OBJDIR}/../../geli/libgeliboot.a | LIBGELIBOOT= ${.OBJDIR}/../../geli/libgeliboot.a | ||||
.PATH: ${.CURDIR}/../../../opencrypto | .PATH: ${.CURDIR}/../../../opencrypto | ||||
OPENCRYPTO_XTS= xform_aes_xts.o | OPENCRYPTO_XTS= xform_aes_xts.o | ||||
.endif | .endif | ||||
Show All 17 Lines | |||||
gptldr.bin: gptldr.out | gptldr.bin: gptldr.out | ||||
${OBJCOPY} -S -O binary gptldr.out ${.TARGET} | ${OBJCOPY} -S -O binary gptldr.out ${.TARGET} | ||||
gptldr.out: gptldr.o | gptldr.out: gptldr.o | ||||
${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o | ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o | ||||
CLEANFILES+= gptzfsboot.bin gptzfsboot.out zfsboot.o sio.o cons.o \ | CLEANFILES+= gptzfsboot.bin gptzfsboot.out zfsboot.o sio.o cons.o \ | ||||
drv.o gpt.o util.o ${OPENCRYPTO_XTS} | drv.o gpt.o util.o skein.o skein_block.o ${OPENCRYPTO_XTS} | ||||
gptzfsboot.bin: gptzfsboot.out | gptzfsboot.bin: gptzfsboot.out | ||||
${OBJCOPY} -S -O binary gptzfsboot.out ${.TARGET} | ${OBJCOPY} -S -O binary gptzfsboot.out ${.TARGET} | ||||
gptzfsboot.out: ${BTXCRT} zfsboot.o sio.o gpt.o drv.o cons.o util.o ${OPENCRYPTO_XTS} | gptzfsboot.out: ${BTXCRT} zfsboot.o sio.o gpt.o drv.o cons.o util.o \ | ||||
skein.o skein_block.o ${OPENCRYPTO_XTS} | |||||
${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSTAND} ${LIBGELIBOOT} | ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSTAND} ${LIBGELIBOOT} | ||||
zfsboot.o: ${.CURDIR}/../../zfs/zfsimpl.c | zfsboot.o: ${.CURDIR}/../../zfs/zfsimpl.c | ||||
.if ${MACHINE_CPUARCH} == "amd64" | .if ${MACHINE_CPUARCH} == "amd64" | ||||
beforedepend zfsboot.o: machine | beforedepend zfsboot.o: machine | ||||
CLEANFILES+= machine | CLEANFILES+= machine | ||||
machine: .NOMETA | machine: .NOMETA | ||||
ln -sf ${.CURDIR}/../../../i386/include machine | ln -sf ${.CURDIR}/../../../i386/include machine | ||||
.endif | .endif | ||||
.include <bsd.prog.mk> | .include <bsd.prog.mk> | ||||
# XXX: clang integrated-as doesn't grok .codeNN directives yet | # XXX: clang integrated-as doesn't grok .codeNN directives yet | ||||
CFLAGS.gptldr.S= ${CLANG_NO_IAS} | CFLAGS.gptldr.S= ${CLANG_NO_IAS} |