mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-29 01:21:02 +02:00
sys-boot/shim: Add a use flag to use a DER files for shim builds
Signed-off-by: Sayan Chowdhury <schowdhury@microsoft.com>
This commit is contained in:
parent
d18a373cb7
commit
b8f290bae4
@ -11,7 +11,7 @@ KEYWORDS="amd64 arm64"
|
|||||||
|
|
||||||
LICENSE="BSD"
|
LICENSE="BSD"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
IUSE=""
|
IUSE="official"
|
||||||
|
|
||||||
RDEPEND=""
|
RDEPEND=""
|
||||||
# TODO: Would be ideal to depend on sys-boot/gnu-efi package, but
|
# TODO: Would be ideal to depend on sys-boot/gnu-efi package, but
|
||||||
@ -41,8 +41,16 @@ src_compile() {
|
|||||||
elif use arm64; then
|
elif use arm64; then
|
||||||
emake_args+=( ARCH=aarch64 )
|
emake_args+=( ARCH=aarch64 )
|
||||||
fi
|
fi
|
||||||
emake_args+=( ENABLE_SBSIGN=1 )
|
emake_args+=( ENABLE_SBSIGN=1 )
|
||||||
|
|
||||||
|
if use official; then
|
||||||
|
if [ -z "${SHIM_SIGNING_CERTIFICATE}" ]; then
|
||||||
|
die "use production flag needs env SHIM_SIGNING_CERTIFICATE"
|
||||||
|
fi
|
||||||
|
emake_args+=( VENDOR_CERT_FILE="${SHIM_SIGNING_CERTIFICATE}" )
|
||||||
|
else
|
||||||
emake_args+=( VENDOR_CERT_FILE="/usr/share/sb_keys/shim.der" )
|
emake_args+=( VENDOR_CERT_FILE="/usr/share/sb_keys/shim.der" )
|
||||||
|
fi
|
||||||
emake "${emake_args[@]}" || die
|
emake "${emake_args[@]}" || die
|
||||||
}
|
}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user