stand: move libgeliboot into libsa.

Reduce by 1 the number of crazy libraries we need in stand by moving
geli into libsa (where architecturally it belonged all along). This
just moves things around without any code changes.
This commit is contained in:
Warner Losh 2018-06-18 16:24:42 +00:00
parent ff150bea29
commit 62bd02cee5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=335321
15 changed files with 21 additions and 37 deletions

View file

@ -21,8 +21,6 @@ S.${MK_ZFS}+= zfs
S.yes+= defaults
S.yes+= man
S.${MK_LOADER_GELI}+= geli
.include <bsd.arch.inc.mk>
S.${MK_EFI}+= efi

View file

@ -67,8 +67,7 @@ MK_LOADER_GELI=yes
.endif
.if ${MK_LOADER_GELI} == "yes"
CFLAGS+= -DLOADER_GELI_SUPPORT
CFLAGS+= -I${BOOTSRC}/geli
LIBGELIBOOT= ${BOOTOBJ}/geli/libgeliboot.a
CFLAGS+= -I${SASRC}/geli
.endif # MK_LOADER_GELI
.endif # HAVE_GELI

View file

@ -1,15 +0,0 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
include \
include/xlocale \
lib/libmd \
secure/lib/libcrypto \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View file

@ -64,7 +64,7 @@ gptboot.bin: gptboot.out
${OBJCOPY} -S -O binary gptboot.out ${.TARGET}
gptboot.out: ${BTXCRT} gptboot.o sio.o crc32.o drv.o cons.o ${OPENCRYPTO_XTS}
${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBGELIBOOT} ${LIBSA32}
${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSA32}
.include <bsd.prog.mk>

View file

@ -75,7 +75,7 @@ gptzfsboot.bin: gptzfsboot.out
gptzfsboot.out: ${BTXCRT} zfsboot.o sio.o gpt.o drv.o cons.o \
${OPENCRYPTO_XTS}
${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBGELIBOOT} ${LIBZFSBOOT} ${LIBSA32}
${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBZFSBOOT} ${LIBSA32}
zfsboot.o: ${ZFSSRC}/zfsimpl.c

View file

@ -66,6 +66,6 @@ isoboot.bin: isoboot.out
${OBJCOPY} -S -O binary isoboot.out ${.TARGET}
isoboot.out: ${BTXCRT} isoboot.o sio.o crc32.o drv.o cons.o ${OPENCRYPTO_XTS}
${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBGELIBOOT} ${LIBSA32}
${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSA32}
.include <bsd.prog.mk>

View file

@ -71,8 +71,8 @@ FILESMODE_${LOADER}= ${BINMODE} -b
# XXX crt0.o needs to be first for pxeboot(8) to work
OBJS= ${BTXCRT}
DPADD= ${LDR_INTERP32} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBGELIBOOT} ${LIBSA32}
LDADD= ${LDR_INTERP32} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBGELIBOOT} ${LIBSA32}
DPADD= ${LDR_INTERP32} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBSA32}
LDADD= ${LDR_INTERP32} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBSA32}
.if ${MACHINE_CPUARCH} == "amd64"
CFLAGS+= -DLOADER_PREFER_AMD64

View file

@ -82,7 +82,7 @@ zfsboot.bin: zfsboot.out
${OBJCOPY} -S -O binary zfsboot.out ${.TARGET}
zfsboot.out: ${BTXCRT} zfsboot.o sio.o drv.o cons.o
${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBZFSBOOT} ${LIBGELIBOOT} ${LIBSA32}
${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBZFSBOOT} ${LIBSA32}
SRCS= zfsboot.c

View file

@ -151,4 +151,9 @@ CFLAGS.bzipfs.c+= -I${SRCTOP}/contrib/bzip2
.PATH: ${SYSDIR}/libkern
SRCS+= explicit_bzero.c
# Maybe GELI
.if ${MK_LOADER_GELI} == "yes"
.include "${SASRC}/geli/Makefile.inc"
.endif
.include <bsd.lib.mk>

View file

@ -1,11 +1,9 @@
# $FreeBSD$
# libgeliboot
# Extra stuff for GELI
DO32=1
.PATH: ${SASRC}/geli
.include <bsd.init.mk>
LIB= geliboot
CFLAGS+= -I${LDRSRC}
# Our password input method
SRCS+= pwgets.c
@ -21,10 +19,11 @@ SRCS+= md5c.c
# AES implementation from sys/crypto
.PATH: ${SYSDIR}/crypto/rijndael
CFLAGS+= -I${LDRSRC}
# Remove asserts
CFLAGS+= -DNDEBUG
SRCS+= rijndael-alg-fst.c rijndael-api-fst.c rijndael-api.c
.for i in rijndael-alg-fst.c rijndael-api-fst.c rijndael-api.c
# Remove asserts XXX BAD
CFLAGS.${i}+= -DNDEBUG
SRCS+= ${i}
.endfor
# local GELI Implementation
.PATH: ${SYSDIR}/geom/eli
@ -33,5 +32,3 @@ SRCS+= geliboot_crypto.c g_eli_hmac.c g_eli_key.c g_eli_key_cache.c pkcs5v2.c
# aes
.PATH: ${SYSDIR}/opencrypto
SRCS+= xform_aes_xts.c
.include <bsd.lib.mk>

View file

@ -71,7 +71,7 @@ geliboot_crypt(u_int algo, int enc, u_char *data, size_t datasize,
}
if (datasize != (blks / 8)) {
printf("Failed to decrypt the entire input: "
"%u != %u\n", blks, datasize);
"%u != %zu\n", blks, datasize);
return (1);
}
break;