public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Robin H. Johnson" <robbat2@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/genkernel:master commit in: /, doc/
Date: Wed, 12 Oct 2016 13:52:38 +0000 (UTC)	[thread overview]
Message-ID: <1476280110.c9855842ac422b8d3a6e7265b6a3c00efe3891e7.robbat2@gentoo> (raw)

commit:     c9855842ac422b8d3a6e7265b6a3c00efe3891e7
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 12 13:48:30 2016 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> 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 <robbat2 <AT> 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


             reply	other threads:[~2016-10-12 13:52 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-12 13:52 Robin H. Johnson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-01-19 20:11 [gentoo-commits] proj/genkernel:master commit in: /, doc/ Ben Kohler
2021-09-13  5:08 Matt Turner
2021-03-15 20:02 Thomas Deutschmann
2020-05-24 22:27 Thomas Deutschmann
2019-12-05 23:52 Thomas Deutschmann
2019-07-29 20:10 Thomas Deutschmann
2019-07-29 20:10 Thomas Deutschmann
2019-07-23 19:47 Thomas Deutschmann
2017-11-15  3:08 Robin H. Johnson
2017-07-14 18:50 Robin H. Johnson
2016-01-24  5:50 Robin H. Johnson
2015-02-08 21:39 Christoph Junghans
2012-10-16  0:01 Robin H. Johnson
2012-10-13 23:31 Robin H. Johnson
2012-09-30 19:28 Sebastian Pipping
2012-07-17 20:05 Richard Yao
2012-07-16  2:08 Robin H. Johnson
2012-02-06  9:42 Robin H. Johnson
2011-07-31  3:47 Sebastian Pipping
2011-06-07 19:14 Sebastian Pipping
2011-06-07  0:29 Sebastian Pipping
2011-05-31  1:48 Sebastian Pipping

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=1476280110.c9855842ac422b8d3a6e7265b6a3c00efe3891e7.robbat2@gentoo \
    --to=robbat2@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /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