summaryrefslogtreecommitdiff
path: root/stand
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2018-06-18 16:24:42 +0000
committerWarner Losh <imp@FreeBSD.org>2018-06-18 16:24:42 +0000
commit62bd02cee5752592d6f284a61759fb398a3ea8ff (patch)
tree32eedb3a151d0f460a2aa131e69f5c53b43dcc03 /stand
parentff150bea297adebe1aa532894006b56b8af1c749 (diff)
downloadsrc-test2-62bd02cee5752592d6f284a61759fb398a3ea8ff.tar.gz
src-test2-62bd02cee5752592d6f284a61759fb398a3ea8ff.zip
Notes
Diffstat (limited to 'stand')
-rw-r--r--stand/Makefile2
-rw-r--r--stand/defs.mk3
-rw-r--r--stand/geli/Makefile.depend15
-rw-r--r--stand/i386/gptboot/Makefile2
-rw-r--r--stand/i386/gptzfsboot/Makefile2
-rw-r--r--stand/i386/isoboot/Makefile2
-rw-r--r--stand/i386/loader/Makefile4
-rw-r--r--stand/i386/zfsboot/Makefile2
-rw-r--r--stand/libsa/Makefile5
-rw-r--r--stand/libsa/geli/Makefile.inc (renamed from stand/geli/Makefile)19
-rw-r--r--stand/libsa/geli/geliboot.c (renamed from stand/geli/geliboot.c)0
-rw-r--r--stand/libsa/geli/geliboot.h (renamed from stand/geli/geliboot.h)0
-rw-r--r--stand/libsa/geli/geliboot_crypto.c (renamed from stand/geli/geliboot_crypto.c)2
-rw-r--r--stand/libsa/geli/geliboot_internal.h (renamed from stand/geli/geliboot_internal.h)0
-rw-r--r--stand/libsa/geli/pwgets.c (renamed from stand/geli/pwgets.c)0
15 files changed, 21 insertions, 37 deletions
diff --git a/stand/Makefile b/stand/Makefile
index 59eb324a8258..c676ded44ce2 100644
--- a/stand/Makefile
+++ b/stand/Makefile
@@ -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
diff --git a/stand/defs.mk b/stand/defs.mk
index d62957629f66..e3c143952ced 100644
--- a/stand/defs.mk
+++ b/stand/defs.mk
@@ -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
diff --git a/stand/geli/Makefile.depend b/stand/geli/Makefile.depend
deleted file mode 100644
index 106f2f62b86c..000000000000
--- a/stand/geli/Makefile.depend
+++ /dev/null
@@ -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
diff --git a/stand/i386/gptboot/Makefile b/stand/i386/gptboot/Makefile
index fb9bc4997432..fde938f87405 100644
--- a/stand/i386/gptboot/Makefile
+++ b/stand/i386/gptboot/Makefile
@@ -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>
diff --git a/stand/i386/gptzfsboot/Makefile b/stand/i386/gptzfsboot/Makefile
index 3d8bf1bc1389..928ecf5ba840 100644
--- a/stand/i386/gptzfsboot/Makefile
+++ b/stand/i386/gptzfsboot/Makefile
@@ -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
diff --git a/stand/i386/isoboot/Makefile b/stand/i386/isoboot/Makefile
index a2cb1447860d..cc7e34fc6dee 100644
--- a/stand/i386/isoboot/Makefile
+++ b/stand/i386/isoboot/Makefile
@@ -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>
diff --git a/stand/i386/loader/Makefile b/stand/i386/loader/Makefile
index ac30415dfd7f..f34831466720 100644
--- a/stand/i386/loader/Makefile
+++ b/stand/i386/loader/Makefile
@@ -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
diff --git a/stand/i386/zfsboot/Makefile b/stand/i386/zfsboot/Makefile
index 1d2f6d69503f..cb10d96a33dd 100644
--- a/stand/i386/zfsboot/Makefile
+++ b/stand/i386/zfsboot/Makefile
@@ -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
diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile
index c34bf697cf9f..8d01d9b7f6e9 100644
--- a/stand/libsa/Makefile
+++ b/stand/libsa/Makefile
@@ -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>
diff --git a/stand/geli/Makefile b/stand/libsa/geli/Makefile.inc
index fa77b19d8a7e..610590a0031f 100644
--- a/stand/geli/Makefile
+++ b/stand/libsa/geli/Makefile.inc
@@ -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>
diff --git a/stand/geli/geliboot.c b/stand/libsa/geli/geliboot.c
index 9ae8fcaab775..9ae8fcaab775 100644
--- a/stand/geli/geliboot.c
+++ b/stand/libsa/geli/geliboot.c
diff --git a/stand/geli/geliboot.h b/stand/libsa/geli/geliboot.h
index 788b82c574ac..788b82c574ac 100644
--- a/stand/geli/geliboot.h
+++ b/stand/libsa/geli/geliboot.h
diff --git a/stand/geli/geliboot_crypto.c b/stand/libsa/geli/geliboot_crypto.c
index 4187e97390b8..2c7270b846ee 100644
--- a/stand/geli/geliboot_crypto.c
+++ b/stand/libsa/geli/geliboot_crypto.c
@@ -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;
diff --git a/stand/geli/geliboot_internal.h b/stand/libsa/geli/geliboot_internal.h
index ac28db1fd658..ac28db1fd658 100644
--- a/stand/geli/geliboot_internal.h
+++ b/stand/libsa/geli/geliboot_internal.h
diff --git a/stand/geli/pwgets.c b/stand/libsa/geli/pwgets.c
index 450255f1ee36..450255f1ee36 100644
--- a/stand/geli/pwgets.c
+++ b/stand/libsa/geli/pwgets.c