From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 48A691396D9 for ; Thu, 16 Nov 2017 23:08:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 69DAEE0BFD; Thu, 16 Nov 2017 23:08:41 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3B42DE0BFD for ; Thu, 16 Nov 2017 23:08:41 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AD4EC33BF0B for ; Thu, 16 Nov 2017 23:08:39 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 546099D26 for ; Thu, 16 Nov 2017 23:08:38 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1510873470.e4165acaa8d09c4e032e992dd7d79d312bb781ea.robbat2@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_cmdline.sh gen_compile.sh X-VCS-Directories: / X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: e4165acaa8d09c4e032e992dd7d79d312bb781ea X-VCS-Branch: master Date: Thu, 16 Nov 2017 23:08:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 3a79dbb4-14a8-4d5a-be4c-3ed056a8739e X-Archives-Hash: 43c6f5c58b386fea1c8281dfbf287b42 commit: e4165acaa8d09c4e032e992dd7d79d312bb781ea Author: Robin H. Johnson gentoo org> AuthorDate: Thu Nov 16 23:04:30 2017 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Thu Nov 16 23:04:30 2017 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=e4165aca gen_compile: firmware-install is obsolete upstream. Linux, as of v4.14, no longer includes firmware in the source package, and has completely removed the firmware_install target. Users should install the sys-apps/linux-firmware package instead. Signed-off-by: Robin H. Johnson gentoo.org> gen_cmdline.sh | 3 ++- gen_compile.sh | 15 +++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/gen_cmdline.sh b/gen_cmdline.sh index 1091d4d..203cae8 100755 --- a/gen_cmdline.sh +++ b/gen_cmdline.sh @@ -171,7 +171,8 @@ longusage() { echo " overrides --firmware-dir. For multiple files," echo " separate the filenames with a comma" echo " --firmware-install" - echo " Enable installation firmware onto root filesystem." + echo " Enable installing firmware onto root filesystem" + echo " (only available for kernels older than v4.14)" echo " --integrated-initramfs, --no-integrated-initramfs" echo " Include/exclude the generated initramfs in the kernel" echo " instead of keeping it as a separate file" diff --git a/gen_compile.sh b/gen_compile.sh index 3bb8051..02f3de5 100755 --- a/gen_compile.sh +++ b/gen_compile.sh @@ -346,16 +346,19 @@ compile_kernel() { compile_generic "${KERNEL_MAKE_DIRECTIVE_2}" kernel fi - if isTrue "${FIRMWARE_INSTALL}" ; then - local firmware_in_kernel_line=`fgrep CONFIG_FIRMWARE_IN_KERNEL "${KERNEL_OUTPUTDIR}"/.config` - if [ -n "${firmware_in_kernel_line}" -a "${firmware_in_kernel_line}" != CONFIG_FIRMWARE_IN_KERNEL=y ] - then + if isTrue "${FIRMWARE_INSTALL}" && [ ! -e "${KERNEL_DIR}/ihex2fw.c" ] ; then + # Kernel v4.14 removed firmware from the kernel sources, including the + # ihex2fw.c tool source. Try and detect the tool to see if we are in >=v4.14 + print_warning 1 " >> Linux v4.14 removed in-kernel firmware, you MUST install the sys-kernel/linux-firmware package!" + elif isTrue "${FIRMWARE_INSTALL}" ; then + local cfg_CONFIG_FIRMWARE_IN_KERNEL=$(kconfig_get_opt "${KERNEL_OUTPUTDIR}/.config" CONFIG_FIRMWARE_IN_KERNEL) + if isTrue "$cfg_CONFIG_FIRMWARE_IN_KERNEL"; then + print_info 1 " >> Not installing firmware as it's included in the kernel already (CONFIG_FIRMWARE_IN_KERNEL=y)..." + else print_info 1 " >> Installing firmware ('make firmware_install') due to CONFIG_FIRMWARE_IN_KERNEL != y..." [ "${INSTALL_MOD_PATH}" != '' ] && export INSTALL_MOD_PATH [ "${INSTALL_FW_PATH}" != '' ] && export INSTALL_FW_PATH MAKEOPTS="${MAKEOPTS} -j1" compile_generic "firmware_install" kernel - else - print_info 1 " >> Not installing firmware as it's included in the kernel already (CONFIG_FIRMWARE_IN_KERNEL=y)..." fi else print_info 1 " >> Not installing firmware as requested by configuration FIRMWARE_INSTALL=no..."