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 62B0D138334 for ; Sun, 29 Dec 2019 04:04:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1D605E0AFF; Sun, 29 Dec 2019 04:04:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B5D5FE0AF8 for ; Sun, 29 Dec 2019 04:04:00 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5284E34DCA9 for ; Sun, 29 Dec 2019 04:03:59 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C44BD3C for ; Sun, 29 Dec 2019 04:03:56 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1577591878.53161dfada35f9d5a766a74413341c69cde0a67a.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_initramfs.sh genkernel X-VCS-Directories: / X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 53161dfada35f9d5a766a74413341c69cde0a67a X-VCS-Branch: master Date: Sun, 29 Dec 2019 04:03:56 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 42d16cb9-72a0-4d69-8fcc-cc52c4acd200 X-Archives-Hash: b0126b46955d1a693456c7dd04aff954 commit: 53161dfada35f9d5a766a74413341c69cde0a67a Author: Thomas Deutschmann gentoo org> AuthorDate: Sun Dec 29 03:57:58 2019 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Sun Dec 29 03:57:58 2019 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=53161dfa gen_initramfs.sh: create_initramfs(): Fix integrated initramfs creation - CONFIG_INITRAMFS_SOURCE value must be quoted. - CONFIG_INITRAMFS_COMPRESSION_* is only available in >=linux-4.10. - Use CONFIG_RD_* for gentoo.org> gen_initramfs.sh | 21 +++++++++++++++++++-- genkernel | 7 +++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 38c77d0..283e308 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -1890,7 +1890,8 @@ create_initramfs() { print_info 1 "$(get_indent 1)>> --integrated-initramfs is set; Setting CONFIG_INITRAMFS_* options ..." [ -f "${KCONFIG_MODIFIED_MARKER}" ] && rm "${KCONFIG_MODIFIED_MARKER}" - kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_INITRAMFS_SOURCE" "${CPIO_ARCHIVE}.cpio" + kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_BLK_DEV_INITRD" "y" + kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_INITRAMFS_SOURCE" "\"${CPIO_ARCHIVE}.cpio\"" kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_INITRAMFS_ROOT_UID" "0" kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_INITRAMFS_ROOT_GID" "0" @@ -1904,7 +1905,23 @@ create_initramfs() { KOPTION_VALUE=y fi - kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_INITRAMFS_COMPRESSION_${KNOWN_INITRAMFS_COMPRESSION_TYPE}" "${KOPTION_VALUE}" + if [ ${KV_NUMERIC} -ge 4010 ] + then + kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_INITRAMFS_COMPRESSION_${KNOWN_INITRAMFS_COMPRESSION_TYPE}" "${KOPTION_VALUE}" + + if [[ "${KOPTION_VALUE}" == "y" && "${KNOWN_INITRAMFS_COMPRESSION_TYPE}" != "NONE" ]] + then + # Make sure that the kernel can decompress our initramfs + kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_RD_${KNOWN_INITRAMFS_COMPRESSION_TYPE}" "${KOPTION_VALUE}" + fi + else + [[ "${KNOWN_INITRAMFS_COMPRESSION_TYPE}" == "NONE" ]] && continue + + # In