From: Mike Gilbert <floppym@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [PATCH 1/2 v2] kernel-build.eclass: add IUSE="+strip modules-sign", install generated keys
Date: Thu, 15 Jun 2023 09:46:32 -0400 [thread overview]
Message-ID: <CAJ0EP426px_7tssr1XAgAQ-dzXKvg+UxG+bHQX-fQmAPF2h8gw@mail.gmail.com> (raw)
In-Reply-To: <fd911b23-dfeb-e8ca-3fac-8ad5bb405de8@gentoo.org>
On Thu, Jun 15, 2023 at 9:06 AM Andrew Ammerlaan
<andrewammerlaan@gentoo.org> wrote:
> # @FUNCTION: kernel-build_merge_configs
> @@ -270,16 +354,39 @@ kernel-build_merge_configs() {
> local user_configs=( "${BROOT}"/etc/kernel/config.d/*.config )
> shopt -u nullglob
>
> + local merge_configs=( "${@}" )
> +
> + if [[ -n "${ALLOW_MODULES_SIGN}" ]]; then
> + if use modules-sign; then
> + : "${MODULES_SIGN_HASH:=sha512}"
> + cat <<-EOF > "${WORKDIR}/modules-sign.config" || die
> + ## Enable module signing
> + CONFIG_MODULE_SIG=y
> + CONFIG_MODULE_SIG_ALL=y
> + CONFIG_MODULE_SIG_FORCE=y
> + CONFIG_MODULE_SIG_${MODULES_SIGN_HASH^^}=y
I'm not sure if it matters, but menuconfig would also set
CONFIG_MODULE_SIG_HASH. eg.
CONFIG_MODULE_SIG=y
CONFIG_MODULE_SIG_FORCE=y
CONFIG_MODULE_SIG_ALL=y
# CONFIG_MODULE_SIG_SHA1 is not set
# CONFIG_MODULE_SIG_SHA224 is not set
# CONFIG_MODULE_SIG_SHA256 is not set
# CONFIG_MODULE_SIG_SHA384 is not set
CONFIG_MODULE_SIG_SHA512=y
CONFIG_MODULE_SIG_HASH="sha512"
next prev parent reply other threads:[~2023-06-15 13:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-15 9:50 [gentoo-dev] [PATCH 1/2] kernel-build.eclass: add IUSE="strip", install generated keys Andrew Ammerlaan
2023-06-15 13:06 ` [gentoo-dev] [PATCH 1/2 v2] kernel-build.eclass: add IUSE="+strip modules-sign", " Andrew Ammerlaan
2023-06-15 13:46 ` Mike Gilbert [this message]
2023-06-15 13:53 ` Andrew Ammerlaan
2023-06-17 18:12 ` [gentoo-dev] [PATCH 1/2 v3] kernel-build.eclass: add IUSE="strip", " Andrew Ammerlaan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJ0EP426px_7tssr1XAgAQ-dzXKvg+UxG+bHQX-fQmAPF2h8gw@mail.gmail.com \
--to=floppym@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox