From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 673371397E2 for ; Tue, 18 Aug 2015 03:35:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6FD9D141CD; Tue, 18 Aug 2015 03:35:24 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DCEEA141CD for ; Tue, 18 Aug 2015 03:35:23 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id ADD5C34078E for ; Tue, 18 Aug 2015 03:35:22 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 75C7415A for ; Tue, 18 Aug 2015 03:35:17 +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: <1439868897.a79ecbd06cf71b3ac5abd2675601a0d750a9908c.robbat2@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_compile.sh gen_initramfs.sh gen_moddeps.sh X-VCS-Directories: / X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: a79ecbd06cf71b3ac5abd2675601a0d750a9908c X-VCS-Branch: master Date: Tue, 18 Aug 2015 03:35:17 +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: f835a26a-567b-49c3-a44c-300d0b2ca1b3 X-Archives-Hash: 1136f63fc8ce44e719e52e470b2e3315 commit: a79ecbd06cf71b3ac5abd2675601a0d750a9908c Author: Robin H. Johnson gentoo org> AuthorDate: Tue Aug 18 03:31:59 2015 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Tue Aug 18 03:34:57 2015 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=a79ecbd0 Support compressed modules: both XZ & GZIP. Newer kernels support compressed modules directly. It's not ideal for genkernel, since it would be double-compressed, but since genkernel takes the modules the module destination directory after modules_install, it's the quickest way to a working system again (because the non-compressed modules aren't installed). Signed-off-by: Robin H. Johnson gentoo.org> gen_compile.sh | 6 ++++-- gen_initramfs.sh | 9 +++++---- gen_moddeps.sh | 4 ++++ 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/gen_compile.sh b/gen_compile.sh index 04ed8d6..97bd36e 100755 --- a/gen_compile.sh +++ b/gen_compile.sh @@ -683,11 +683,13 @@ compile_iscsi() { # if kernel modules exist, copy them to initramfs, otherwise it will be compiled into the kernel mkdir -p "${TEMP}/initramfs-iscsi-temp/lib/modules/${KV}/kernel/drivers/scsi/" + KEXT=$(modules_kext) for modname in iscsi_tcp libiscsi scsi_transport_iscsi do - if [ -e "${CMD_KERNEL_DIR}/drivers/scsi/${modname}.ko" ] + module=${CMD_KERNEL_DIR}/drivers/scsi/${modname}${KEXT} + if [ -e "${module}" ] then - cp ${CMD_KERNEL_DIR}/drivers/scsi/${modname}.ko "${TEMP}/initramfs-iscsi-temp/lib/modules/${KV}/kernel/drivers/scsi/" + cp $module "${TEMP}/initramfs-iscsi-temp/lib/modules/${KV}/kernel/drivers/scsi/" fi done diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 4ec5fea..e7f72df 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -293,11 +293,12 @@ append_dmraid(){ /bin/tar -jxpf "${DMRAID_BINCACHE}" -C "${TEMP}/initramfs-dmraid-temp" || gen_die "Could not extract dmraid binary cache!"; cd "${TEMP}/initramfs-dmraid-temp/" - RAID456=`find . -type f -name raid456.ko` + module_ext=$(modules_kext) + RAID456=`find . -type f -name raid456${module_ext}` if [ -n "${RAID456}" ] then - cd "${RAID456/raid456.ko/}" - ln -sf raid456.kp raid45.ko + cd "${RAID456/raid456${module_ext}/}" + ln -sf raid456.kp $(basename ${RAID456}) cd "${TEMP}/initramfs-dmraid-temp/" fi log_future_cpio_content @@ -614,7 +615,7 @@ print_list() append_modules() { local group local group_modules - local MOD_EXT=".ko" + local MOD_EXT="$(modules_kext)" print_info 2 "initramfs: >> Searching for modules..." if [ "${INSTALL_MOD_PATH}" != '' ] diff --git a/gen_moddeps.sh b/gen_moddeps.sh index 0867b56..415e095 100755 --- a/gen_moddeps.sh +++ b/gen_moddeps.sh @@ -4,6 +4,10 @@ modules_kext() { KEXT=".ko" + if grep -sq '^CONFIG_MODULE_COMPRESS=y' "${KERNEL_DIR}"/.config; then + grep -sq '^CONFIG_MODULE_COMPRESS_XZ=y' "${KERNEL_DIR}"/.config && KEXT='.ko.xz' + grep -sq '^CONFIG_MODULE_COMPRESS_GZIP=y' "${KERNEL_DIR}"/.config && KEXT='.ko.gz' + fi echo ${KEXT} }