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 2785F138334 for ; Tue, 16 Jul 2019 14:54:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6698AE0822; Tue, 16 Jul 2019 14:54:35 +0000 (UTC) Received: from smtp.gentoo.org (dev.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 3C9C8E0822 for ; Tue, 16 Jul 2019 14:54:35 +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 E3972347D27 for ; Tue, 16 Jul 2019 14:54:33 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8BE395F1 for ; Tue, 16 Jul 2019 14:54:31 +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: <1563288518.e4cf87fe9c39e792d8975c90c3dd47ac70adb669.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_initramfs.sh X-VCS-Directories: / X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: e4cf87fe9c39e792d8975c90c3dd47ac70adb669 X-VCS-Branch: master Date: Tue, 16 Jul 2019 14:54:31 +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: d351be32-9ad5-47fe-836e-c158ebf8f0f4 X-Archives-Hash: 0dfdeaafffb9310d10f9aa023f12b47f commit: e4cf87fe9c39e792d8975c90c3dd47ac70adb669 Author: Thomas Deutschmann gentoo org> AuthorDate: Tue Jul 16 14:48:38 2019 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Tue Jul 16 14:48:38 2019 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=e4cf87fe initramfs: Add meta files used by dracut's lsinitrd This will allow dracut's lsinitrd to process our initramfs. Signed-off-by: Thomas Deutschmann gentoo.org> gen_initramfs.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 6085ee8..3203cac 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -226,6 +226,7 @@ append_base_layout() { etc \ etc/mdev/helpers \ lib \ + lib/dracut \ mnt \ proc \ run \ @@ -283,6 +284,38 @@ append_base_layout() { echo "Genkernel $GK_V" > "${TDIR}"/etc/build_id \ || gen_die "Failed to create '${TDIR}/etc/build_id'!" + # Allow lsinitrd from dracut to process our initramfs + echo "$(cat "${TDIR}/etc/build_id") ($(cat "${TDIR}/etc/build_date"))" > "${TDIR}"/lib/dracut/dracut-gk-version.info \ + || gen_die "Failed to create '${TDIR}/lib/dracut/dracut-gk-version.info'!" + + local -a build_parameters + isTrue "${COMPRESS_INITRD}" && build_parameters+=( --compress-initramfs ) || build_parameters+=( --no-compress-initramfs ) + isTrue "${MICROCODE_INITRAMFS}" && build_parameters+=( --microcode-initramfs ) || build_parameters+=( --no-microcode-initramfs ) + isTrue "${RAMDISKMODULES}" && build_parameters+=( --ramdisk-modules ) || build_parameters+=( --no-ramdisk-modules ) + isTrue "${BUSYBOX}" && build_parameters+=( --busybox ) || build_parameters+=( --no-busybox ) + isTrue "${DISKLABEL}" && build_parameters+=( --disklabel ) || build_parameters+=( --no-disklabel ) + isTrue "${BTRFS}" && build_parameters+=( --btrfs ) || build_parameters+=( --no-btrfs ) + isTrue "${ISCSI}" && build_parameters+=( --iscsi ) || build_parameters+=( --no-iscsi ) + isTrue "${MULTIPATH}" && build_parameters+=( --multipath ) || build_parameters+=( --no-multipath ) + isTrue "${DMRAID}" && build_parameters+=( --dmraid ) || build_parameters+=( --no-dmraid ) + isTrue "${MDADM}" && build_parameters+=( --mdadm ) || build_parameters+=( --no-mdadm ) + isTrue "${LVM}" && build_parameters+=( --lvm ) || build_parameters+=( --no-lvm ) + isTrue "${UNIONFS}" && build_parameters+=( --unionfs ) || build_parameters+=( --no-unionfs ) + isTrue "${ZFS}" && build_parameters+=( --zfs ) || build_parameters+=( --no-zfs ) + isTrue "${SPLASH}" && build_parameters+=( --splash ) || build_parameters+=( --no-splash ) + isTrue "${STRACE}" && build_parameters+=( --strace ) || build_parameters+=( --no-strace ) + isTrue "${GPG}" && build_parameters+=( --gpg ) || build_parameters+=( --no-gpg ) + isTrue "${LUKS}" && build_parameters+=( --luks ) || build_parameters+=( --no-luks ) + isTrue "${FIRMWARE}" && build_parameters+=( --firmware ) || build_parameters+=( --no-firmware ) + [ -n "${FIRMWARE_DIR}" ] && build_parameters+=( --firmware-dir="${FIRMWARE_DIR}" ) + [ -n "${FIRMWARE_FILES}" ] && build_parameters+=( --firmware-files="${FIRMWARE_FILES}" ) + isTrue "${SSH}" && build_parameters+=( --ssh ) || build_parameters+=( --no-ssh ) + isTrue "${E2FSPROGS}" && build_parameters+=( --e2fsprogs ) || build_parameters+=( --no-e2fsprogs ) + isTrue "${XFSPROGS}" && build_parameters+=( --xfsprogs ) || build_parameters+=( --no-xfsprogs ) + + echo "${build_parameters[@]}" > "${TDIR}"/lib/dracut/build-parameter.txt \ + || gen_die "Failed to create '${TDIR}/lib/dracut/build-parameter.txt'!" + dd if=/dev/zero of="${TDIR}/var/log/lastlog" bs=1 count=0 seek=0 &>/dev/null \ || die "Failed to create '${TDIR}/var/log/lastlog'!" @@ -1701,6 +1734,7 @@ create_initramfs() { print_info 1 "$(get_indent 1)>> Adding early-microcode support ..." local UCODEDIR="${TEMP}/ucode_tmp/kernel/x86/microcode/" mkdir -p "${UCODEDIR}" || gen_die "Failed to create '${UCODEDIR}'!" + echo 1 > "${TEMP}/ucode_tmp/early_cpio" if [[ "${cfg_CONFIG_MICROCODE_INTEL}" == "y" ]] then