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 3DD03138330 for ; Wed, 12 Oct 2016 13:52:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 44E55E0B32; Wed, 12 Oct 2016 13:52:42 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 17CFEE0B32 for ; Wed, 12 Oct 2016 13:52:42 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C33E034119A for ; Wed, 12 Oct 2016 13:52:39 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 782862F4 for ; Wed, 12 Oct 2016 13:52: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: <1476280110.c9855842ac422b8d3a6e7265b6a3c00efe3891e7.robbat2@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: /, doc/ X-VCS-Repository: proj/genkernel X-VCS-Files: doc/genkernel.8.txt gen_cmdline.sh gen_compile.sh gen_determineargs.sh genkernel.conf X-VCS-Directories: doc/ / X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: c9855842ac422b8d3a6e7265b6a3c00efe3891e7 X-VCS-Branch: master Date: Wed, 12 Oct 2016 13:52: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: bfc3854b-2fbf-4e34-b126-dbaa2eeb0eb6 X-Archives-Hash: 15bab43045af18ac98bbddaf46285ffa commit: c9855842ac422b8d3a6e7265b6a3c00efe3891e7 Author: Robin H. Johnson gentoo org> AuthorDate: Wed Oct 12 13:48:30 2016 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Wed Oct 12 13:48:30 2016 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=c9855842 FIRMWARE_INSTALL control option. Prefer sys-kernel/linux-firmware to be installed and used rather than always running firmware_install and overwriting the root copy. Defaults to FIRMWARE_INSTALL=no, with ebuild updated to RDEPEND on sys-kernel/linux-firmware, via IUSE='+firmware' Signed-off-by: Robin H. Johnson gentoo.org> doc/genkernel.8.txt | 4 ++++ gen_cmdline.sh | 6 ++++++ gen_compile.sh | 20 ++++++++++++-------- gen_determineargs.sh | 1 + genkernel.conf | 4 ++++ 5 files changed, 27 insertions(+), 8 deletions(-) diff --git a/doc/genkernel.8.txt b/doc/genkernel.8.txt index bab1034..071eecc 100644 --- a/doc/genkernel.8.txt +++ b/doc/genkernel.8.txt @@ -384,6 +384,10 @@ OUTPUT SETTINGS Specifies specific firmware files to copy. This overrides *--firmware-dir*. For multiple files, separate the filenames with a comma. +*--*[*no-*]*firmware-install*:: + Enable or disables installation of firmware onto root filesystem. + Installing sys-kernel/linux-firmware should be preferred instead. + *--*[*no-*]*integrated-initramfs*:: Builds or does not build the generated initramfs into the kernel instead of keeping it as a separate file. diff --git a/gen_cmdline.sh b/gen_cmdline.sh index 94ff68c..e9f323c 100755 --- a/gen_cmdline.sh +++ b/gen_cmdline.sh @@ -160,6 +160,8 @@ longusage() { echo " Specifies specific firmware files to copy. This" 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 " --integrated-initramfs, --no-integrated-initramfs" echo " Include/exclude the generated initramfs in the kernel" echo " instead of keeping it as a separate file" @@ -600,6 +602,10 @@ parse_cmdline() { CMD_FIRMWARE=1 print_info 2 "CMD_FIRMWARE_FILES: ${CMD_FIRMWARE_FILES}" ;; + --firmware-install|--no-firmware-install) + CMD_FIRMWARE_INSTALL=`parse_optbool "$*"` + print_info 2 "CMD_FIRMWARE_INSTALL: ${CMD_FIRMWARE_INSTALL}" + ;; --integrated-initramfs|--no-integrated-initramfs) CMD_INTEGRATED_INITRAMFS=`parse_optbool "$*"` print_info 2 "CMD_INTEGRATED_INITRAMFS=${CMD_INTEGRATED_INITRAMFS}" diff --git a/gen_compile.sh b/gen_compile.sh index 0bb1399..3a77a75 100755 --- a/gen_compile.sh +++ b/gen_compile.sh @@ -333,15 +333,19 @@ compile_kernel() { compile_generic "${KERNEL_MAKE_DIRECTIVE_2}" kernel fi - 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 - 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 + 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 + 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 it's included in the kernel already (CONFIG_FIRMWARE_IN_KERNEL=y)..." + print_info 1 " >> Not installing firmware as requested by configuration FIRMWARE_INSTALL=no..." fi local tmp_kernel_binary=$(find_kernel_binary ${KERNEL_BINARY_OVERRIDE:-${KERNEL_BINARY}}) diff --git a/gen_determineargs.sh b/gen_determineargs.sh index 522996d..5402b45 100755 --- a/gen_determineargs.sh +++ b/gen_determineargs.sh @@ -132,6 +132,7 @@ determine_real_args() { set_config_with_override BOOL FIRMWARE CMD_FIRMWARE set_config_with_override STRING FIRMWARE_DIR CMD_FIRMWARE_DIR "/lib/firmware" set_config_with_override STRING FIRMWARE_FILES CMD_FIRMWARE_FILES + set_config_with_override BOOL FIRMWARE_INSTALL CMD_FIRMWARE_INSTALL "no" set_config_with_override BOOL INTEGRATED_INITRAMFS CMD_INTEGRATED_INITRAMFS set_config_with_override BOOL WRAP_INITRD CMD_WRAP_INITRD set_config_with_override BOOL GENZIMAGE CMD_GENZIMAGE diff --git a/genkernel.conf b/genkernel.conf index 6b974e1..e62d294 100644 --- a/genkernel.conf +++ b/genkernel.conf @@ -102,6 +102,10 @@ USECOLOR="yes" # Add BTRFS support. #BTRFS="no" +# Install firmware onto root filesystem +# Will conflict with sys-kernel/linux-firmware package +#FIRMWARE_INSTALL="no" + # Enable copying of firmware into initramfs #FIRMWARE="no" # Specify directory to pull from