freebsd-skq/stand/libsa/geli/Makefile.inc
ian ee0f4764cc Extend loader(8) geli support to all architectures and all disk-like devices.
This moves the bulk of the geli support from lib386/biosdisk.c into a new
geli/gelidev.c which implements a devsw-type device whose dv_strategy()
function handles geli decryption. Support for all arches comes from moving
the taste-and-attach code to the devopen() function in libsa.

After opening any DEVT_DISK device, devopen() calls the new function
geli_probe_and_attach(), which will "attach" the geli code to the open_file
struct by creating a geli_devdesc instance to replace the disk_devdesc
instance in the open_file. That routes all IO for the device through the
geli code.

A new public geli_add_key() function is added, to allow arch/vendor-specific
code to add keys obtained from custom hardware or other sources.

With these changes, geli support will be compiled into all variations of
loader(8) on all arches because the default is WITH_LOADER_GELI.

Relnotes:	yes
Sponsored by:	Microchip Technology Inc
Differential Revision:	https://reviews.freebsd.org/D15743
2018-07-13 17:50:25 +00:00

43 lines
768 B
Makefile

# $FreeBSD$
# Extra stuff for GELI
.PATH: ${SASRC}/geli
CFLAGS+= -I${LDRSRC}
# Our password input method
SRCS+= pwgets.c
# sha256 and sha512 from sys/crypto
.PATH: ${SYSDIR}/crypto/sha2
CFLAGS+= -DWEAK_REFS
SRCS+= sha256c.c sha512c.c
# md5 from libmd
.PATH: ${SRCTOP}/lib/libmd
SRCS+= md5c.c
# AES implementation from sys/crypto
.PATH: ${SYSDIR}/crypto/rijndael
.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
SRCS+= \
geliboot.c \
geliboot_crypto.c \
gelidev.c \
geli_metadata.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