2008-11-19 16:39:01 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2010-09-24 19:49:12 +00:00
|
|
|
.PATH: ${.CURDIR}/../boot2 ${.CURDIR}/../gptboot \
|
|
|
|
${.CURDIR}/../zfsboot ${.CURDIR}/../common \
|
Add SHA512, skein, large blocks support for loader zfs.
Updated sha512 from illumos.
Using skein from freebsd crypto tree.
Since loader itself is using 64MB memory for heap, updated zfsboot to
use same, and this also allows to support zfs large blocks.
Note, adding additional features does increate zfsboot code, therefore
this update does increase zfsboot code to 128k, also I have ported gptldr.S
update to zfsldr.S to support 64k+ code.
With this update, boot1.efi has almost reached the current limit of the size
set for it, so one of the future patches for boot1.efi will need to
increase the limit.
Currently known missing zfs features in boot loader are edonr and gzip support.
Reviewed by: delphij, imp
Approved by: imp (mentor)
Obtained from: sha256.c update and skein_zfs.c stub from illumos.
Differential Revision: https://reviews.freebsd.org/D7418
2016-08-18 00:37:07 +00:00
|
|
|
${.CURDIR}/../../common ${.CURDIR}/../../../crypto/skein
|
2008-11-19 16:39:01 +00:00
|
|
|
|
|
|
|
FILES= gptzfsboot
|
2014-09-15 06:21:28 +00:00
|
|
|
MAN= gptzfsboot.8
|
2008-11-19 16:39:01 +00:00
|
|
|
|
|
|
|
NM?= nm
|
|
|
|
|
|
|
|
BOOT_COMCONSOLE_PORT?= 0x3f8
|
|
|
|
BOOT_COMCONSOLE_SPEED?= 9600
|
|
|
|
B2SIOFMT?= 0x3
|
|
|
|
|
|
|
|
REL1= 0x700
|
|
|
|
ORG1= 0x7c00
|
|
|
|
ORG2= 0x0
|
|
|
|
|
2010-09-24 19:49:12 +00:00
|
|
|
CFLAGS= -DBOOTPROG=\"gptzfsboot\" \
|
2011-09-13 14:03:55 +00:00
|
|
|
-O1 \
|
2008-11-19 16:39:01 +00:00
|
|
|
-DGPT -DBOOT2 \
|
|
|
|
-DSIOPRT=${BOOT_COMCONSOLE_PORT} \
|
|
|
|
-DSIOFMT=${B2SIOFMT} \
|
|
|
|
-DSIOSPD=${BOOT_COMCONSOLE_SPEED} \
|
|
|
|
-I${.CURDIR}/../../common \
|
2010-09-24 19:49:12 +00:00
|
|
|
-I${.CURDIR}/../common \
|
2008-11-19 16:39:01 +00:00
|
|
|
-I${.CURDIR}/../../zfs \
|
|
|
|
-I${.CURDIR}/../../../cddl/boot/zfs \
|
Add SHA512, skein, large blocks support for loader zfs.
Updated sha512 from illumos.
Using skein from freebsd crypto tree.
Since loader itself is using 64MB memory for heap, updated zfsboot to
use same, and this also allows to support zfs large blocks.
Note, adding additional features does increate zfsboot code, therefore
this update does increase zfsboot code to 128k, also I have ported gptldr.S
update to zfsldr.S to support 64k+ code.
With this update, boot1.efi has almost reached the current limit of the size
set for it, so one of the future patches for boot1.efi will need to
increase the limit.
Currently known missing zfs features in boot loader are edonr and gzip support.
Reviewed by: delphij, imp
Approved by: imp (mentor)
Obtained from: sha256.c update and skein_zfs.c stub from illumos.
Differential Revision: https://reviews.freebsd.org/D7418
2016-08-18 00:37:07 +00:00
|
|
|
-I${.CURDIR}/../../../crypto/skein \
|
2008-11-19 16:39:01 +00:00
|
|
|
-I${.CURDIR}/../btx/lib -I. \
|
|
|
|
-I${.CURDIR}/../boot2 \
|
2011-02-27 19:41:40 +00:00
|
|
|
-I${.CURDIR}/../../.. \
|
Add SHA512, skein, large blocks support for loader zfs.
Updated sha512 from illumos.
Using skein from freebsd crypto tree.
Since loader itself is using 64MB memory for heap, updated zfsboot to
use same, and this also allows to support zfs large blocks.
Note, adding additional features does increate zfsboot code, therefore
this update does increase zfsboot code to 128k, also I have ported gptldr.S
update to zfsldr.S to support 64k+ code.
With this update, boot1.efi has almost reached the current limit of the size
set for it, so one of the future patches for boot1.efi will need to
increase the limit.
Currently known missing zfs features in boot loader are edonr and gzip support.
Reviewed by: delphij, imp
Approved by: imp (mentor)
Obtained from: sha256.c update and skein_zfs.c stub from illumos.
Differential Revision: https://reviews.freebsd.org/D7418
2016-08-18 00:37:07 +00:00
|
|
|
-Wall -Waggregate-return -Wbad-function-cast -Wno-cast-align \
|
2008-11-19 16:39:01 +00:00
|
|
|
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
|
|
|
|
-Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \
|
Add SHA512, skein, large blocks support for loader zfs.
Updated sha512 from illumos.
Using skein from freebsd crypto tree.
Since loader itself is using 64MB memory for heap, updated zfsboot to
use same, and this also allows to support zfs large blocks.
Note, adding additional features does increate zfsboot code, therefore
this update does increase zfsboot code to 128k, also I have ported gptldr.S
update to zfsldr.S to support 64k+ code.
With this update, boot1.efi has almost reached the current limit of the size
set for it, so one of the future patches for boot1.efi will need to
increase the limit.
Currently known missing zfs features in boot loader are edonr and gzip support.
Reviewed by: delphij, imp
Approved by: imp (mentor)
Obtained from: sha256.c update and skein_zfs.c stub from illumos.
Differential Revision: https://reviews.freebsd.org/D7418
2016-08-18 00:37:07 +00:00
|
|
|
-Winline -Wno-tentative-definition-incomplete-type -Wno-pointer-sign
|
2014-01-05 21:03:49 +00:00
|
|
|
|
2016-03-16 23:12:19 +00:00
|
|
|
.if !defined(LOADER_NO_GELI_SUPPORT)
|
|
|
|
CFLAGS+= -DLOADER_GELI_SUPPORT
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../geli
|
|
|
|
LIBGELIBOOT= ${.OBJDIR}/../../geli/libgeliboot.a
|
|
|
|
.PATH: ${.CURDIR}/../../../opencrypto
|
|
|
|
OPENCRYPTO_XTS= xform_aes_xts.o
|
|
|
|
.endif
|
|
|
|
|
2014-01-05 21:03:49 +00:00
|
|
|
CFLAGS.gcc+= --param max-inline-insns-single=100
|
2008-11-19 16:39:01 +00:00
|
|
|
|
2016-09-03 15:26:28 +00:00
|
|
|
LD_FLAGS=${LD_FLAGS_BIN}
|
2008-11-19 16:39:01 +00:00
|
|
|
|
2014-02-06 21:54:21 +00:00
|
|
|
LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a
|
|
|
|
|
2008-11-19 16:39:01 +00:00
|
|
|
# Pick up ../Makefile.inc early.
|
|
|
|
.include <bsd.init.mk>
|
|
|
|
|
|
|
|
CLEANFILES= gptzfsboot
|
|
|
|
|
|
|
|
gptzfsboot: gptldr.bin gptzfsboot.bin ${BTXKERN}
|
|
|
|
btxld -v -E ${ORG2} -f bin -b ${BTXKERN} -l gptldr.bin \
|
|
|
|
-o ${.TARGET} gptzfsboot.bin
|
|
|
|
|
|
|
|
CLEANFILES+= gptldr.bin gptldr.out gptldr.o
|
|
|
|
|
|
|
|
gptldr.bin: gptldr.out
|
2015-04-02 06:58:17 +00:00
|
|
|
${OBJCOPY} -S -O binary gptldr.out ${.TARGET}
|
2008-11-19 16:39:01 +00:00
|
|
|
|
|
|
|
gptldr.out: gptldr.o
|
2013-12-30 19:05:50 +00:00
|
|
|
${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o
|
2008-11-19 16:39:01 +00:00
|
|
|
|
2011-04-21 14:17:36 +00:00
|
|
|
CLEANFILES+= gptzfsboot.bin gptzfsboot.out zfsboot.o sio.o cons.o \
|
Add SHA512, skein, large blocks support for loader zfs.
Updated sha512 from illumos.
Using skein from freebsd crypto tree.
Since loader itself is using 64MB memory for heap, updated zfsboot to
use same, and this also allows to support zfs large blocks.
Note, adding additional features does increate zfsboot code, therefore
this update does increase zfsboot code to 128k, also I have ported gptldr.S
update to zfsldr.S to support 64k+ code.
With this update, boot1.efi has almost reached the current limit of the size
set for it, so one of the future patches for boot1.efi will need to
increase the limit.
Currently known missing zfs features in boot loader are edonr and gzip support.
Reviewed by: delphij, imp
Approved by: imp (mentor)
Obtained from: sha256.c update and skein_zfs.c stub from illumos.
Differential Revision: https://reviews.freebsd.org/D7418
2016-08-18 00:37:07 +00:00
|
|
|
drv.o gpt.o util.o skein.o skein_block.o ${OPENCRYPTO_XTS}
|
2008-11-19 16:39:01 +00:00
|
|
|
|
|
|
|
gptzfsboot.bin: gptzfsboot.out
|
2015-04-02 06:58:17 +00:00
|
|
|
${OBJCOPY} -S -O binary gptzfsboot.out ${.TARGET}
|
2008-11-19 16:39:01 +00:00
|
|
|
|
Add SHA512, skein, large blocks support for loader zfs.
Updated sha512 from illumos.
Using skein from freebsd crypto tree.
Since loader itself is using 64MB memory for heap, updated zfsboot to
use same, and this also allows to support zfs large blocks.
Note, adding additional features does increate zfsboot code, therefore
this update does increase zfsboot code to 128k, also I have ported gptldr.S
update to zfsldr.S to support 64k+ code.
With this update, boot1.efi has almost reached the current limit of the size
set for it, so one of the future patches for boot1.efi will need to
increase the limit.
Currently known missing zfs features in boot loader are edonr and gzip support.
Reviewed by: delphij, imp
Approved by: imp (mentor)
Obtained from: sha256.c update and skein_zfs.c stub from illumos.
Differential Revision: https://reviews.freebsd.org/D7418
2016-08-18 00:37:07 +00:00
|
|
|
gptzfsboot.out: ${BTXCRT} zfsboot.o sio.o gpt.o drv.o cons.o util.o \
|
|
|
|
skein.o skein_block.o ${OPENCRYPTO_XTS}
|
2016-03-16 23:12:19 +00:00
|
|
|
${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSTAND} ${LIBGELIBOOT}
|
2008-11-19 16:39:01 +00:00
|
|
|
|
|
|
|
zfsboot.o: ${.CURDIR}/../../zfs/zfsimpl.c
|
|
|
|
|
2010-08-23 01:42:09 +00:00
|
|
|
.if ${MACHINE_CPUARCH} == "amd64"
|
2008-11-22 14:24:55 +00:00
|
|
|
beforedepend zfsboot.o: machine
|
2008-11-19 16:39:01 +00:00
|
|
|
CLEANFILES+= machine
|
2016-03-11 23:45:51 +00:00
|
|
|
machine: .NOMETA
|
2008-11-19 16:39:01 +00:00
|
|
|
ln -sf ${.CURDIR}/../../../i386/include machine
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|
2012-02-28 18:30:18 +00:00
|
|
|
|
|
|
|
# XXX: clang integrated-as doesn't grok .codeNN directives yet
|
|
|
|
CFLAGS.gptldr.S= ${CLANG_NO_IAS}
|