diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2017-11-16 15:04:30 -0800 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2017-11-16 15:04:30 -0800 |
commit | e4165acaa8d09c4e032e992dd7d79d312bb781ea (patch) | |
tree | 3d0a3249446102054593197ef988de6d7d78d8f2 | |
parent | gen_compile: avoid busybox CONFIG_FEATURE_MOUNT_NFS due to libtirpc (diff) | |
download | genkernel-e4165acaa8d09c4e032e992dd7d79d312bb781ea.tar.gz genkernel-e4165acaa8d09c4e032e992dd7d79d312bb781ea.tar.bz2 genkernel-e4165acaa8d09c4e032e992dd7d79d312bb781ea.zip |
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@gentoo.org>
-rwxr-xr-x | gen_cmdline.sh | 3 | ||||
-rwxr-xr-x | gen_compile.sh | 15 |
2 files changed, 11 insertions, 7 deletions
diff --git a/gen_cmdline.sh b/gen_cmdline.sh index 1091d4d8..203cae89 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 3bb80515..02f3de51 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..." |