Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 01/23] linux: add BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL
Date: Sun,  4 Mar 2018 22:31:15 +0100	[thread overview]
Message-ID: <20180304213137.24681-2-thomas.petazzoni@bootlin.com> (raw)
In-Reply-To: <20180304213137.24681-1-thomas.petazzoni@bootlin.com>

Some Linux kernel configuration options (such as
CONFIG_SYSTEM_TRUSTED_KEYRING) require building a host program called
extract-cert, which itself needs OpenSSL.

Users having OpenSSL installed on their system won't see a problem,
but users who don't have OpenSSL installed will get a build
failure. This commit adds a new option that allows users to indicate
that their Linux configuration requires building host-openssl.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 linux/Config.in | 13 +++++++++++++
 linux/linux.mk  |  4 ++++
 2 files changed, 17 insertions(+)

diff --git a/linux/Config.in b/linux/Config.in
index 5afd620d98..663a4063e2 100644
--- a/linux/Config.in
+++ b/linux/Config.in
@@ -412,6 +412,19 @@ config BR2_LINUX_KERNEL_INSTALL_TARGET
 	  /boot if DTBs have been generated by the kernel build
 	  process.
 
+config BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL
+	bool "Needs host OpenSSL"
+	help
+	  Some Linux kernel configuration options (such as
+	  CONFIG_SYSTEM_TRUSTED_KEYRING) require building a host
+	  program called extract-cert, which itself needs
+	  OpenSSL. Enabling this option will ensure host-openssl gets
+	  built before the Linux kernel.
+
+	  Enable this option if you get a Linux kernel build failure
+	  such as "scripts/extract-cert.c:21:25: fatal error:
+	  openssl/bio.h: No such file or directory".
+
 # Linux extensions
 source "linux/Config.ext.in"
 
diff --git a/linux/linux.mk b/linux/linux.mk
index 5300b9cfc5..83c57b60ad 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -80,6 +80,10 @@ LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZMA) += CONFIG_KERNEL_LZMA
 LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZO) += CONFIG_KERNEL_LZO
 LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_XZ) += CONFIG_KERNEL_XZ
 
+ifeq ($(BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL),y)
+LINUX_DEPENDENCIES += host-openssl
+endif
+
 # If host-uboot-tools is selected by the user, assume it is needed to
 # create a custom image
 ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS),y)
-- 
2.14.3

  reply	other threads:[~2018-03-04 21:31 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-04 21:31 [Buildroot] [PATCH 00/23] Fix numerous defconfig build failures Thomas Petazzoni
2018-03-04 21:31 ` Thomas Petazzoni [this message]
2018-03-04 21:31 ` [Buildroot] [PATCH 02/23] linux: add BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF Thomas Petazzoni
2018-03-04 21:31 ` [Buildroot] [PATCH 03/23] linux: fix passing of host CFLAGS and LDFLAGS Thomas Petazzoni
2018-03-06  1:15   ` Frank Hunleth
2018-03-04 21:31 ` [Buildroot] [PATCH 04/23] configs/qemu_x86_64_defconfig: remove kernel options that need openssl/libelf Thomas Petazzoni
2018-03-04 21:31 ` [Buildroot] [PATCH 05/23] configs/qemu_x86_defconfig: remove kernel options that need openssl Thomas Petazzoni
2018-03-04 21:31 ` [Buildroot] [PATCH 06/23] configs/orangepi_zero: needs host-openssl for the Linux kernel build Thomas Petazzoni
2018-03-04 21:31 ` [Buildroot] [PATCH 07/23] configs/orangepi_pc_plus: " Thomas Petazzoni
2018-03-04 21:31 ` [Buildroot] [PATCH 08/23] configs/snps_archs38_axs103: " Thomas Petazzoni
2018-03-04 21:31 ` [Buildroot] [PATCH 09/23] configs/snps_archs38_vdk: " Thomas Petazzoni
2018-03-04 21:31 ` [Buildroot] [PATCH 10/23] configs/mx53loco: " Thomas Petazzoni
2018-03-04 21:31 ` [Buildroot] [PATCH 11/23] configs/imx6-sabresd: " Thomas Petazzoni
2018-03-04 23:24   ` Fabio Estevam
2018-03-05  7:57     ` Thomas Petazzoni
2018-03-04 21:31 ` [Buildroot] [PATCH 12/23] configs/snps_arc700_axs101: " Thomas Petazzoni
2018-03-04 21:31 ` [Buildroot] [PATCH 13/23] configs/solidrun_macchiatobin_mainline: " Thomas Petazzoni
2018-03-04 21:31 ` [Buildroot] [PATCH 14/23] configs/freescale_imx6qsabreauto: U-Boot needs host-dtc Thomas Petazzoni
2018-03-04 21:31 ` [Buildroot] [PATCH 15/23] configs/solidrun_macchiatobin_marvell: " Thomas Petazzoni
2018-03-04 21:31 ` [Buildroot] [PATCH 16/23] configs/freescale_imx6sololiteevk: " Thomas Petazzoni
2018-03-04 21:31 ` [Buildroot] [PATCH 17/23] configs/freescale_imx6dlsabresd: " Thomas Petazzoni
2018-03-04 21:31 ` [Buildroot] [PATCH 18/23] configs/freescale_imx6dlsabreauto: " Thomas Petazzoni
2018-03-04 21:31 ` [Buildroot] [PATCH 19/23] configs/freescale_imx7dsabresd: " Thomas Petazzoni
2018-03-04 21:31 ` [Buildroot] [PATCH 20/23] configs/imx6ulevk: " Thomas Petazzoni
2018-03-04 21:31 ` [Buildroot] [PATCH 21/23] configs/freescale_imx6qsabresd: " Thomas Petazzoni
2018-03-04 21:31 ` [Buildroot] [PATCH 22/23] configs/freescale_imx6sxsabresd: " Thomas Petazzoni
2018-03-04 21:31 ` [Buildroot] [PATCH 23/23] configs/ts4900: explicitly specify Linux kernel version Thomas Petazzoni
2018-03-06 14:32 ` [Buildroot] [PATCH 00/23] Fix numerous defconfig build failures Peter Korsgaard
2018-03-30 19:29 ` Peter Korsgaard

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=20180304213137.24681-2-thomas.petazzoni@bootlin.com \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /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