Discussion:
[Buildroot] [PATCH 04/23] configs/qemu_x86_64_defconfig: remove kernel options that need openssl/libelf
Thomas Petazzoni
2018-03-04 21:31:18 UTC
Permalink
The ORC unwinder requires libelf to be available on the host, so use
the frame pointer unwinder instead. Using the frame pointer unwinder
is probably good enough in our default Qemu configurations.

Wireless support ends up enabling CONFIG_SYSTEM_TRUSTED_KEYRING, which
requires openssl to be available on the host, so disable wireless
support, which isn't needed in Qemu.

Signed-off-by: Thomas Petazzoni <***@bootlin.com>
---
board/qemu/x86_64/linux-4.15.config | 3 +++
1 file changed, 3 insertions(+)

diff --git a/board/qemu/x86_64/linux-4.15.config b/board/qemu/x86_64/linux-4.15.config
index 0e59b87bd6..5fa33d4424 100644
--- a/board/qemu/x86_64/linux-4.15.config
+++ b/board/qemu/x86_64/linux-4.15.config
@@ -9,6 +9,7 @@ CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_INET=y
+# CONFIG_WIRELESS is not set
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_VIRTIO_BLK=y
@@ -20,6 +21,7 @@ CONFIG_NETDEVICES=y
CONFIG_VIRTIO_NET=y
CONFIG_NE2K_PCI=y
CONFIG_8139CP=y
+# CONFIG_WLAN is not set
CONFIG_INPUT_EVDEV=y
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
@@ -47,3 +49,4 @@ CONFIG_EXT4_FS=y
CONFIG_AUTOFS4_FS=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
+CONFIG_UNWINDER_FRAME_POINTER=y
--
2.14.3
Thomas Petazzoni
2018-03-04 21:31:16 UTC
Permalink
Some Linux kernel configuration options (such as CONFIG_UNWINDER_ORC)
require building a host program that needs libelf.

Users who have libelf installed on their system won't see a problem,
but users who don't have libelf installed will get a build
failure. Therefore, this commit adds an option that allows a user to
indicate that his Linux kernel configuration requires libelf. When
this option is enabled, we add host-elfutils to the dependencies of
the linux package (host-elfutils provides the libelf library).

Signed-off-by: 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 663a4063e2..d1d99b2810 100644
--- a/linux/Config.in
+++ b/linux/Config.in
@@ -425,6 +425,19 @@ config BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL
such as "scripts/extract-cert.c:21:25: fatal error:
openssl/bio.h: No such file or directory".

+config BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF
+ bool "Needs host libelf"
+ help
+ Some Linux kernel configuration options (such as
+ CONFIG_UNWINDER_ORC) require building a host program that
+ needs libelf. Enabling this option will ensure host-elfutils
+ (which provides libelf) gets built before the Linux kernel.
+
+ Enable this option if you get a Linux kernel build failure
+ such as "Cannot generate ORC metadata for
+ CONFIG_UNWINDER_ORC=y, please install libelf-dev,
+ libelf-devel or elfutils-libelf-devel".
+
# Linux extensions
source "linux/Config.ext.in"

diff --git a/linux/linux.mk b/linux/linux.mk
index 83c57b60ad..76bf2c2ea7 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -84,6 +84,10 @@ ifeq ($(BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL),y)
LINUX_DEPENDENCIES += host-openssl
endif

+ifeq ($(BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF),y)
+LINUX_DEPENDENCIES += host-elfutils
+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
Thomas Petazzoni
2018-03-04 21:31:15 UTC
Permalink
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 <***@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
Thomas Petazzoni
2018-03-04 21:31:21 UTC
Permalink
Fixes:

https://gitlab.com/buildroot.org/buildroot/-/jobs/55306885

Signed-off-by: Thomas Petazzoni <***@bootlin.com>
---
configs/orangepi_pc_plus_defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/configs/orangepi_pc_plus_defconfig b/configs/orangepi_pc_plus_defconfig
index 053c3bffbd..edc3909ae7 100644
--- a/configs/orangepi_pc_plus_defconfig
+++ b/configs/orangepi_pc_plus_defconfig
@@ -13,6 +13,7 @@ BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-h3-orangepi-pc-plus"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/orangepi/orangepi-pc-plus/linux-extras.config"
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
# BR2_TARGET_ROOTFS_TAR is not set
--
2.14.3
Thomas Petazzoni
2018-03-04 21:31:20 UTC
Permalink
Fixes:

https://gitlab.com/buildroot.org/buildroot/-/jobs/55306889

Signed-off-by: Thomas Petazzoni <***@bootlin.com>
---
configs/orangepi_zero_defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/configs/orangepi_zero_defconfig b/configs/orangepi_zero_defconfig
index 2efccc0ced..fcf9b325cd 100644
--- a/configs/orangepi_zero_defconfig
+++ b/configs/orangepi_zero_defconfig
@@ -14,6 +14,7 @@ BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-h2-plus-orangepi-zero"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/orangepi/orangepi-zero/linux-extras.config"
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
# BR2_TARGET_ROOTFS_TAR is not set
--
2.14.3
Thomas Petazzoni
2018-03-04 21:31:24 UTC
Permalink
Fixes:

https://gitlab.com/buildroot.org/buildroot/-/jobs/55306856

Signed-off-by: Thomas Petazzoni <***@bootlin.com>
---
configs/mx53loco_defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/configs/mx53loco_defconfig b/configs/mx53loco_defconfig
index aaba4767ed..8bb4014178 100644
--- a/configs/mx53loco_defconfig
+++ b/configs/mx53loco_defconfig
@@ -32,3 +32,4 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15.1"
BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx53-qsb imx53-qsrb"
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
--
2.14.3
Thomas Petazzoni
2018-03-04 21:31:22 UTC
Permalink
Fixes:

https://gitlab.com/buildroot.org/buildroot/-/jobs/55306944

Signed-off-by: Thomas Petazzoni <***@bootlin.com>
---
configs/snps_archs38_axs103_defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/configs/snps_archs38_axs103_defconfig b/configs/snps_archs38_axs103_defconfig
index 42a4feaba8..39ceeae433 100644
--- a/configs/snps_archs38_axs103_defconfig
+++ b/configs/snps_archs38_axs103_defconfig
@@ -17,6 +17,7 @@ BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15"
BR2_LINUX_KERNEL_DEFCONFIG="axs103_smp"
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y

# Bootloader
BR2_TARGET_UBOOT=y
--
2.14.3
Thomas Petazzoni
2018-03-04 21:31:23 UTC
Permalink
Fixes:

https://gitlab.com/buildroot.org/buildroot/-/jobs/55306946

Signed-off-by: Thomas Petazzoni <***@bootlin.com>
---
configs/snps_archs38_vdk_defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/configs/snps_archs38_vdk_defconfig b/configs/snps_archs38_vdk_defconfig
index 434ed37a9e..46b539beec 100644
--- a/configs/snps_archs38_vdk_defconfig
+++ b/configs/snps_archs38_vdk_defconfig
@@ -17,3 +17,4 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15"
BR2_LINUX_KERNEL_DEFCONFIG="vdk_hs38_smp"
BR2_LINUX_KERNEL_VMLINUX=y
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
--
2.14.3
Thomas Petazzoni
2018-03-04 21:31:19 UTC
Permalink
Wireless support ends up enabling CONFIG_SYSTEM_TRUSTED_KEYRING, which
requires openssl to be available on the host, so disable wireless
support, which isn't needed in Qemu.

Signed-off-by: Thomas Petazzoni <***@bootlin.com>
---
board/qemu/x86/linux-4.15.config | 2 ++
1 file changed, 2 insertions(+)

diff --git a/board/qemu/x86/linux-4.15.config b/board/qemu/x86/linux-4.15.config
index 0e59b87bd6..79f7537d80 100644
--- a/board/qemu/x86/linux-4.15.config
+++ b/board/qemu/x86/linux-4.15.config
@@ -9,6 +9,7 @@ CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_INET=y
+# CONFIG_WIRELESS is not set
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_VIRTIO_BLK=y
@@ -20,6 +21,7 @@ CONFIG_NETDEVICES=y
CONFIG_VIRTIO_NET=y
CONFIG_NE2K_PCI=y
CONFIG_8139CP=y
+# CONFIG_WLAN is not set
CONFIG_INPUT_EVDEV=y
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
--
2.14.3
Thomas Petazzoni
2018-03-04 21:31:26 UTC
Permalink
Fixes:

https://gitlab.com/buildroot.org/buildroot/-/jobs/55306943

Signed-off-by: Thomas Petazzoni <***@bootlin.com>
---
configs/snps_arc700_axs101_defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/configs/snps_arc700_axs101_defconfig b/configs/snps_arc700_axs101_defconfig
index daa8ebb8f0..0fefaf4aa8 100644
--- a/configs/snps_arc700_axs101_defconfig
+++ b/configs/snps_arc700_axs101_defconfig
@@ -16,6 +16,7 @@ BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15"
BR2_LINUX_KERNEL_DEFCONFIG="axs101"
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y

# Bootloader
BR2_TARGET_UBOOT=y
--
2.14.3
Thomas Petazzoni
2018-03-04 21:31:25 UTC
Permalink
Fixes:

https://gitlab.com/buildroot.org/buildroot/-/jobs/55306836

Signed-off-by: Thomas Petazzoni <***@bootlin.com>
---
configs/imx6-sabresd_defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/configs/imx6-sabresd_defconfig b/configs/imx6-sabresd_defconfig
index edb4d7ed10..9999513914 100644
--- a/configs/imx6-sabresd_defconfig
+++ b/configs/imx6-sabresd_defconfig
@@ -36,3 +36,4 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15"
BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6q-sabresd imx6dl-sabresd imx6qp-sabresd"
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
--
2.14.3
Fabio Estevam
2018-03-04 23:24:52 UTC
Permalink
Hi Thomas,

On Sun, Mar 4, 2018 at 6:31 PM, Thomas Petazzoni
Post by Thomas Petazzoni
https://gitlab.com/buildroot.org/buildroot/-/jobs/55306836
---
configs/imx6-sabresd_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/configs/imx6-sabresd_defconfig b/configs/imx6-sabresd_defconfig
index edb4d7ed10..9999513914 100644
--- a/configs/imx6-sabresd_defconfig
+++ b/configs/imx6-sabresd_defconfig
@@ -36,3 +36,4 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15"
BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6q-sabresd imx6dl-sabresd imx6qp-sabresd"
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
It seems that all kernels >= 4.15 need to have
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL selected, right?

Can we have this selection made on a common place?

Thanks
Thomas Petazzoni
2018-03-05 07:57:21 UTC
Permalink
Hello,
Post by Fabio Estevam
It seems that all kernels >= 4.15 need to have
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL selected, right?
No, as explained in PATCH 1 of the series, it depends on your kernel
configuration. If you have wireless enabled, a chain of dependency
results in the need for host-openssl. If you don't have wireless
enabled, you don't necessarily need host-openssl.

Patch 4 in the series shows for example how the host-openssl dependency
can be avoided for a Linux 4.15 configuration, by simply disabling
wireless support (which isn't terribly useful for a Qemu emulation).
Post by Fabio Estevam
Can we have this selection made on a common place?
I'm afraid we can't, without enforcing this dependency for a number of
users who don't need it.

Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com
Thomas Petazzoni
2018-03-04 21:31:27 UTC
Permalink
Fixes:

https://gitlab.com/buildroot.org/buildroot/-/jobs/55306948

Signed-off-by: Thomas Petazzoni <***@bootlin.com>
---
configs/solidrun_macchiatobin_mainline_defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/configs/solidrun_macchiatobin_mainline_defconfig b/configs/solidrun_macchiatobin_mainline_defconfig
index 526c021fe7..dd797d709c 100644
--- a/configs/solidrun_macchiatobin_mainline_defconfig
+++ b/configs/solidrun_macchiatobin_mainline_defconfig
@@ -31,6 +31,7 @@ BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="marvell/armada-8040-mcbin"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/solidrun/macchiatobin/linux-extras.config"
BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y

# rootfs
BR2_TARGET_ROOTFS_TAR=y
--
2.14.3
Thomas Petazzoni
2018-03-04 21:31:28 UTC
Permalink
Fixes:

https://gitlab.com/buildroot.org/buildroot/-/jobs/55306820

Signed-off-by: Thomas Petazzoni <***@bootlin.com>
---
configs/freescale_imx6qsabreauto_defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/configs/freescale_imx6qsabreauto_defconfig b/configs/freescale_imx6qsabreauto_defconfig
index f03b7101fb..bc333e1a37 100644
--- a/configs/freescale_imx6qsabreauto_defconfig
+++ b/configs/freescale_imx6qsabreauto_defconfig
@@ -40,3 +40,4 @@ BR2_TARGET_UBOOT_FORMAT_IMX=y
BR2_TARGET_UBOOT_CUSTOM_GIT=y
BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx.git"
BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_4.9.x_1.0.0_ga"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
--
2.14.3
Thomas Petazzoni
2018-03-04 21:31:30 UTC
Permalink
Fixes:

https://gitlab.com/buildroot.org/buildroot/-/jobs/55306822

Signed-off-by: Thomas Petazzoni <***@bootlin.com>
---
configs/freescale_imx6sololiteevk_defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/configs/freescale_imx6sololiteevk_defconfig b/configs/freescale_imx6sololiteevk_defconfig
index 1b3546255a..b840f2f185 100644
--- a/configs/freescale_imx6sololiteevk_defconfig
+++ b/configs/freescale_imx6sololiteevk_defconfig
@@ -36,3 +36,4 @@ BR2_TARGET_UBOOT_FORMAT_IMX=y
BR2_TARGET_UBOOT_CUSTOM_GIT=y
BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx.git"
BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_4.9.x_1.0.0_ga"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
--
2.14.3
Thomas Petazzoni
2018-03-04 21:31:29 UTC
Permalink
Fixes:

https://gitlab.com/buildroot.org/buildroot/-/jobs/55306949

Signed-off-by: Thomas Petazzoni <***@bootlin.com>
---
configs/solidrun_macchiatobin_marvell_defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/configs/solidrun_macchiatobin_marvell_defconfig b/configs/solidrun_macchiatobin_marvell_defconfig
index 1e747c344a..5489136e1c 100644
--- a/configs/solidrun_macchiatobin_marvell_defconfig
+++ b/configs/solidrun_macchiatobin_marvell_defconfig
@@ -22,6 +22,7 @@ BR2_TARGET_UBOOT_CUSTOM_GIT=y
BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/MarvellEmbeddedProcessors/u-boot-marvell"
BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="u-boot-2017.03-armada-17.10"
BR2_TARGET_UBOOT_BOARDNAME="mvebu_mcbin-88f8040"
+BR2_TARGET_UBOOT_NEEDS_DTC=y

# Kernel
BR2_LINUX_KERNEL=y
--
2.14.3
Thomas Petazzoni
2018-03-04 21:31:32 UTC
Permalink
Fixes:

https://gitlab.com/buildroot.org/buildroot/-/jobs/55306818

Signed-off-by: Thomas Petazzoni <***@bootlin.com>
---
configs/freescale_imx6dlsabreauto_defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/configs/freescale_imx6dlsabreauto_defconfig b/configs/freescale_imx6dlsabreauto_defconfig
index 19c1cc286a..55db461f44 100644
--- a/configs/freescale_imx6dlsabreauto_defconfig
+++ b/configs/freescale_imx6dlsabreauto_defconfig
@@ -40,3 +40,4 @@ BR2_TARGET_UBOOT_FORMAT_IMX=y
BR2_TARGET_UBOOT_CUSTOM_GIT=y
BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx.git"
BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_4.9.x_1.0.0_ga"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
--
2.14.3
Thomas Petazzoni
2018-03-04 21:31:33 UTC
Permalink
Fixes:

https://gitlab.com/buildroot.org/buildroot/-/jobs/55306825

Signed-off-by: Thomas Petazzoni <***@bootlin.com>
---
configs/freescale_imx7dsabresd_defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/configs/freescale_imx7dsabresd_defconfig b/configs/freescale_imx7dsabresd_defconfig
index 844b547670..3563d1e1b2 100644
--- a/configs/freescale_imx7dsabresd_defconfig
+++ b/configs/freescale_imx7dsabresd_defconfig
@@ -28,6 +28,7 @@ BR2_TARGET_UBOOT_CUSTOM_GIT=y
BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx.git"
BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_4.9.x_1.0.0_ga"
BR2_TARGET_UBOOT_FORMAT_IMX=y
+BR2_TARGET_UBOOT_NEEDS_DTC=y

# required tools to create the microSD image
BR2_PACKAGE_HOST_DOSFSTOOLS=y
--
2.14.3
Thomas Petazzoni
2018-03-04 21:31:34 UTC
Permalink
Fixes:

https://gitlab.com/buildroot.org/buildroot/-/jobs/55306824

Signed-off-by: Thomas Petazzoni <***@bootlin.com>
---
configs/imx6ulevk_defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/configs/imx6ulevk_defconfig b/configs/imx6ulevk_defconfig
index 0ae6b5308e..069f8cfc5e 100644
--- a/configs/imx6ulevk_defconfig
+++ b/configs/imx6ulevk_defconfig
@@ -25,6 +25,7 @@ BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2017.11"
BR2_TARGET_UBOOT_FORMAT_IMG=y
BR2_TARGET_UBOOT_SPL=y
BR2_TARGET_UBOOT_SPL_NAME="SPL"
+BR2_TARGET_UBOOT_NEEDS_DTC=y

# required tools to create the SD card image
BR2_PACKAGE_HOST_DOSFSTOOLS=y
--
2.14.3
Thomas Petazzoni
2018-03-04 21:31:31 UTC
Permalink
Fixes:

https://gitlab.com/buildroot.org/buildroot/-/jobs/55306819

Signed-off-by: Thomas Petazzoni <***@bootlin.com>
---
configs/freescale_imx6dlsabresd_defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/configs/freescale_imx6dlsabresd_defconfig b/configs/freescale_imx6dlsabresd_defconfig
index a5c0aa6090..dc9b498aa4 100644
--- a/configs/freescale_imx6dlsabresd_defconfig
+++ b/configs/freescale_imx6dlsabresd_defconfig
@@ -39,3 +39,4 @@ BR2_TARGET_UBOOT_FORMAT_IMX=y
BR2_TARGET_UBOOT_CUSTOM_GIT=y
BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx.git"
BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_4.9.x_1.0.0_ga"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
--
2.14.3
Thomas Petazzoni
2018-03-04 21:31:17 UTC
Permalink
We were passing HOSTCFLAGS="$(HOSTCFLAGS)" to Linux. However:

- HOSTCFLAGS in Buildroot doesn't exist, and is empty, so this
assignment never did anything. The name of the variable in
Buildroot in HOST_CFLAGS.

- HOSTCFLAGS in Linux isn't used everywhere, and passing it overrides
the default HOSTCFLAGS value defined in the main Linux kernel
Makefile.

In addition, there is no way to pass additional host LDFLAGS in the
Linux kernel build system.

Therefore, we simply shoehorn our HOST_CFLAGS and HOST_LDFLAGS while
passing HOSTCC to the Linux kernel build system. This has been tested
to work fine with host OpenSSL and host libelf only available in
$(HOST_DIR).

Signed-off-by: Thomas Petazzoni <***@bootlin.com>
---
linux/linux.mk | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/linux/linux.mk b/linux/linux.mk
index 76bf2c2ea7..bedc89cad8 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -103,8 +103,7 @@ LINUX_EXTRA_DOWNLOADS += $(ARCH_XTENSA_OVERLAY_URL)
endif

LINUX_MAKE_FLAGS = \
- HOSTCC="$(HOSTCC)" \
- HOSTCFLAGS="$(HOSTCFLAGS)" \
+ HOSTCC="$(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS)" \
ARCH=$(KERNEL_ARCH) \
INSTALL_MOD_PATH=$(TARGET_DIR) \
CROSS_COMPILE="$(TARGET_CROSS)" \
--
2.14.3
Frank Hunleth
2018-03-06 01:15:34 UTC
Permalink
On Sun, Mar 4, 2018 at 4:31 PM, Thomas Petazzoni
Post by Thomas Petazzoni
- HOSTCFLAGS in Buildroot doesn't exist, and is empty, so this
assignment never did anything. The name of the variable in
Buildroot in HOST_CFLAGS.
- HOSTCFLAGS in Linux isn't used everywhere, and passing it overrides
the default HOSTCFLAGS value defined in the main Linux kernel
Makefile.
In addition, there is no way to pass additional host LDFLAGS in the
Linux kernel build system.
Therefore, we simply shoehorn our HOST_CFLAGS and HOST_LDFLAGS while
passing HOSTCC to the Linux kernel build system. This has been tested
to work fine with host OpenSSL and host libelf only available in
$(HOST_DIR).
Tested-by: Frank Hunleth <***@troodon-software.com>

I ran into the ORC/libelf issue when upgrading to 2018.02 on a custom
x86_64 defconfig, and this patch plus the previous one fixed the issue
for me.

Thanks,
Frank
Post by Thomas Petazzoni
---
linux/linux.mk | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/linux/linux.mk b/linux/linux.mk
index 76bf2c2ea7..bedc89cad8 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -103,8 +103,7 @@ LINUX_EXTRA_DOWNLOADS += $(ARCH_XTENSA_OVERLAY_URL)
endif
LINUX_MAKE_FLAGS = \
- HOSTCC="$(HOSTCC)" \
- HOSTCFLAGS="$(HOSTCFLAGS)" \
+ HOSTCC="$(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS)" \
ARCH=$(KERNEL_ARCH) \
INSTALL_MOD_PATH=$(TARGET_DIR) \
CROSS_COMPILE="$(TARGET_CROSS)" \
--
2.14.3
_______________________________________________
buildroot mailing list
http://lists.busybox.net/mailman/listinfo/buildroot
Thomas Petazzoni
2018-03-04 21:31:36 UTC
Permalink
Fixes:

https://gitlab.com/buildroot.org/buildroot/-/jobs/55306823

Signed-off-by: Thomas Petazzoni <***@bootlin.com>
---
configs/freescale_imx6sxsabresd_defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/configs/freescale_imx6sxsabresd_defconfig b/configs/freescale_imx6sxsabresd_defconfig
index 01e13143b2..eb11fb8ae1 100644
--- a/configs/freescale_imx6sxsabresd_defconfig
+++ b/configs/freescale_imx6sxsabresd_defconfig
@@ -39,3 +39,4 @@ BR2_TARGET_UBOOT_CUSTOM_GIT=y
BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx.git"
BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_4.9.x_1.0.0_ga"
BR2_TARGET_UBOOT_FORMAT_IMX=y
+BR2_TARGET_UBOOT_NEEDS_DTC=y
--
2.14.3
Thomas Petazzoni
2018-03-04 21:31:37 UTC
Permalink
The ts4900 defconfig currently fails to build because it selects
kernel headers 4.12, but doesn't specify a kernel version, and
therefore 4.15 is built causing the following error:

Incorrect selection of kernel headers: expected 4.12.x, got 4.15.x

In commit 7c3a7d808e751d4b608a4c50a0ae4d13dedebab7 ("configs/ts4900:
bump kernel version to 4.12"), when this defconfig was switched from
using a vendor provided kernel to the mainline kernel, the kernel
version was no longer explicitly specified.

Since this commit indicated 4.12, and the kernel headers version
selected is also 4.12, we also use that as the fixed kernel version.

Fixes:

https://gitlab.com/buildroot.org/buildroot/-/jobs/55306955

Signed-off-by: Thomas Petazzoni <***@bootlin.com>
---
configs/ts4900_defconfig | 2 ++
1 file changed, 2 insertions(+)

diff --git a/configs/ts4900_defconfig b/configs/ts4900_defconfig
index 082234fcad..e7950cea4b 100644
--- a/configs/ts4900_defconfig
+++ b/configs/ts4900_defconfig
@@ -3,6 +3,8 @@ BR2_cortex_a9=y
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_12=y
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/technologic/ts4900/post-image.sh"
BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.12"
BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7"
BR2_LINUX_KERNEL_UIMAGE=y
BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x10008000"
--
2.14.3
Thomas Petazzoni
2018-03-04 21:31:35 UTC
Permalink
Fixes:

https://gitlab.com/buildroot.org/buildroot/-/jobs/55306821

Signed-off-by: Thomas Petazzoni <***@bootlin.com>
---
configs/freescale_imx6qsabresd_defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/configs/freescale_imx6qsabresd_defconfig b/configs/freescale_imx6qsabresd_defconfig
index 613b48a913..e0ef20c578 100644
--- a/configs/freescale_imx6qsabresd_defconfig
+++ b/configs/freescale_imx6qsabresd_defconfig
@@ -40,3 +40,4 @@ BR2_TARGET_UBOOT_FORMAT_IMX=y
BR2_TARGET_UBOOT_CUSTOM_GIT=y
BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx.git"
BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_4.9.x_1.0.0_ga"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
--
2.14.3
Peter Korsgaard
2018-03-06 14:32:50 UTC
Permalink
Post by Thomas Petazzoni
Hello,
- Some defconfigs have a Linux kernel that needs openssl on the
host. This requires adding a mechanism to add host-openssl as a
dependency of the linux package. This is done by introducing
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL in patch 1.
Then, numerous defconfigs are fixed to use
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL: patches 6 to 13.
The qemu_x86_defconfig and qemu_x86_64_defconfig are however
changed in a different way: by removing wireless support, which is
the reason why host-openssl becomes necessary in recent kernel
versions. Since Qemu doesn't emulate a wireless interface, it
didn't make much sense to have this additional dependency. See
patch 4 and 5.
For all other defconfigs, we erred on the safe side, and kept the
configuration as-is, and simply added
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL.
- Some defconfigs have a Linux kernel that needs libelf on the
host. Like host-openssl, we added a new option
BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF. See patch 2.
In practice, only qemu_x86_64_defconfig needed libelf and the host,
and instead of bringing this dependency, we have disabled the ORC
Unwinder from the kernel defconfig. See patch 4.
Therefore, there are no in-tree defconfig that uses
BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF.
- In order to make the host openssl and host libelf usable by the
Linux kernel build system, we had to ensure that HOST_CFLAGS and
HOST_LDFLAGS were properly taken into account. This is done in
patch 3.
- Some defconfigs have a U-Boot that needs dtc on the host. For
these, the fix is simple: add BR2_TARGET_UBOOT_NEEDS_DTC=y in the
defconfig. Patches 14 to 22.
- Finally, one defconfig, ts4900_defconfig, had a separate issue: it
wasn't explicitly specifying a kernel version, causing a mismatch
with the selected kernel headers version.
Best regards,
Thomas
linux: add BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL
linux: add BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF
linux: fix passing of host CFLAGS and LDFLAGS
I've put this patch in front of the rest and committed the entire
series, thanks!

I'll also backport to 2018.02.x once we've verified that it doesn't
break anything.
--
Bye, Peter Korsgaard
Peter Korsgaard
2018-03-30 19:29:50 UTC
Permalink
Post by Thomas Petazzoni
Hello,
- Some defconfigs have a Linux kernel that needs openssl on the
host. This requires adding a mechanism to add host-openssl as a
dependency of the linux package. This is done by introducing
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL in patch 1.
Then, numerous defconfigs are fixed to use
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL: patches 6 to 13.
The qemu_x86_defconfig and qemu_x86_64_defconfig are however
changed in a different way: by removing wireless support, which is
the reason why host-openssl becomes necessary in recent kernel
versions. Since Qemu doesn't emulate a wireless interface, it
didn't make much sense to have this additional dependency. See
patch 4 and 5.
For all other defconfigs, we erred on the safe side, and kept the
configuration as-is, and simply added
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL.
- Some defconfigs have a Linux kernel that needs libelf on the
host. Like host-openssl, we added a new option
BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF. See patch 2.
In practice, only qemu_x86_64_defconfig needed libelf and the host,
and instead of bringing this dependency, we have disabled the ORC
Unwinder from the kernel defconfig. See patch 4.
Therefore, there are no in-tree defconfig that uses
BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF.
- In order to make the host openssl and host libelf usable by the
Linux kernel build system, we had to ensure that HOST_CFLAGS and
HOST_LDFLAGS were properly taken into account. This is done in
patch 3.
- Some defconfigs have a U-Boot that needs dtc on the host. For
these, the fix is simple: add BR2_TARGET_UBOOT_NEEDS_DTC=y in the
defconfig. Patches 14 to 22.
- Finally, one defconfig, ts4900_defconfig, had a separate issue: it
wasn't explicitly specifying a kernel version, causing a mismatch
with the selected kernel headers version.
Best regards,
Thomas
linux: add BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL
linux: add BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF
linux: fix passing of host CFLAGS and LDFLAGS
configs/qemu_x86_64_defconfig: remove kernel options that need
openssl/libelf
configs/qemu_x86_defconfig: remove kernel options that need openssl
configs/orangepi_zero: needs host-openssl for the Linux kernel build
configs/orangepi_pc_plus: needs host-openssl for the Linux kernel
build
configs/snps_archs38_axs103: needs host-openssl for the Linux kernel
build
configs/snps_archs38_vdk: needs host-openssl for the Linux kernel
build
configs/mx53loco: needs host-openssl for the Linux kernel build
configs/imx6-sabresd: needs host-openssl for the Linux kernel build
configs/snps_arc700_axs101: needs host-openssl for the Linux kernel
build
configs/solidrun_macchiatobin_mainline: needs host-openssl for the
Linux kernel build
configs/freescale_imx6qsabreauto: U-Boot needs host-dtc
configs/solidrun_macchiatobin_marvell: U-Boot needs host-dtc
configs/freescale_imx6sololiteevk: U-Boot needs host-dtc
configs/freescale_imx6dlsabresd: U-Boot needs host-dtc
configs/freescale_imx6dlsabreauto: U-Boot needs host-dtc
configs/freescale_imx7dsabresd: U-Boot needs host-dtc
configs/imx6ulevk: U-Boot needs host-dtc
configs/freescale_imx6qsabresd: U-Boot needs host-dtc
configs/freescale_imx6sxsabresd: U-Boot needs host-dtc
configs/ts4900: explicitly specify Linux kernel version
Committed all of these to 2018.02.x, thanks.
--
Bye, Peter Korsgaard
Loading...