commit: e4165acaa8d09c4e032e992dd7d79d312bb781ea
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 16 23:04:30 2017 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> 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 <robbat2 <AT> 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..."