]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
linux: add BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 4 Mar 2018 21:31:15 +0000 (22:31 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Tue, 6 Mar 2018 14:25:08 +0000 (15:25 +0100)
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>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
linux/Config.in
linux/linux.mk

index bc6cd1b5f75918eefd71391abaa2381d2ff85d2e..57bb11c2cd7b5140f40dc7661d1108d1821098f7 100644 (file)
@@ -407,6 +407,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"
 
index 3b695246639ca1cdbe8e13838345610ac5c2fa66..91d8751a712bf720a15729f652980eaa798cf6af 100644 (file)
@@ -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)