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 DD5B3138334 for ; Sun, 21 Jul 2019 16:26:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 17ED5E087D; Sun, 21 Jul 2019 16:26:44 +0000 (UTC) Received: from smtp.gentoo.org (mail.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 E0EC5E087E for ; Sun, 21 Jul 2019 16:26:43 +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 6F34B3483EE for ; Sun, 21 Jul 2019 16:26:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 614A1748 for ; Sun, 21 Jul 2019 16:26:38 +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: <1563725385.6d10b53f0f8dd8044a506a0896cc8dda656bbd65.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: 6d10b53f0f8dd8044a506a0896cc8dda656bbd65 X-VCS-Branch: master Date: Sun, 21 Jul 2019 16:26:38 +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: acfb7a81-9f09-4a1f-b0cd-996bc1d81165 X-Archives-Hash: 2fe5b028aeaef6ba4ed61c4137752ec0 commit: 6d10b53f0f8dd8044a506a0896cc8dda656bbd65 Author: Thomas Deutschmann gentoo org> AuthorDate: Sat Jul 20 22:43:05 2019 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Sun Jul 21 16:09:45 2019 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=6d10b53f gen_initramfs.sh: create_initramfs(): Fix CPIO archive naming Even when we not install, make sure that the archive file has the correct final name. Signed-off-by: Thomas Deutschmann gentoo.org> gen_initramfs.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 5b30b7a..696125b 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -1532,7 +1532,7 @@ create_initramfs() { print_info 1 "initramfs: >> Initializing ..." # Create empty cpio - CPIO="${TMPDIR}/initramfs-${KV}" + CPIO="${TMPDIR}/initramfs-${KNAME}-${ARCH}-${KV}" append_data 'devices' # WARNING, must be first! append_data 'base_layout' append_data 'auxilary' "${BUSYBOX}" @@ -1637,7 +1637,7 @@ create_initramfs() { then # Explicitly do not compress if we are integrating into the kernel. # The kernel will do a better job of it than us. - mv ${TMPDIR}/initramfs-${KV} ${TMPDIR}/initramfs-${KV}.cpio + mv "${CPIO}" "${CPIO}.cpio" sed -i '/^.*CONFIG_INITRAMFS_SOURCE=.*$/d' "${KERNEL_OUTPUTDIR}/.config" \ || gen_die "failed to delete CONFIG_INITRAMFS_SOURCE from '${KERNEL_OUTPUTDIR}/.config'" @@ -1655,7 +1655,7 @@ create_initramfs() { # All N default except XZ, so there it gets used if the kernel does # compression on it's own. cat >>${KERNEL_OUTPUTDIR}/.config <<-EOF - CONFIG_INITRAMFS_SOURCE="${TMPDIR}/initramfs-${KV}.cpio${compress_ext}" + CONFIG_INITRAMFS_SOURCE="${CPIO}.cpio${compress_ext}" CONFIG_INITRAMFS_ROOT_UID=0 CONFIG_INITRAMFS_ROOT_GID=0 CONFIG_INITRAMFS_COMPRESSION_NONE=n @@ -1822,8 +1822,8 @@ create_initramfs() { [[ -z ${mkimage_cmd} ]] && gen_die "mkimage is not available. Please install package 'dev-embedded/u-boot-tools'." local mkimage_args="-A ${ARCH} -O linux -T ramdisk -C ${compression:-none} -a 0x00000000 -e 0x00000000" print_info 1 "$(get_indent 1)>> Wrapping initramfs using mkimage ..." - print_info 2 "$(get_indent 1)${mkimage_cmd} ${mkimage_args} -n initramfs-${KV} -d ${CPIO} ${CPIO}.uboot" - ${mkimage_cmd} ${mkimage_args} -n "initramfs-${KV}" -d "${CPIO}" "${CPIO}.uboot" >> ${LOGFILE} 2>&1 || gen_die "Wrapping initramfs using mkimage failed" + print_info 2 "$(get_indent 1)${mkimage_cmd} ${mkimage_args} -n initramfs-${KNAME}-${ARCH}-${KV} -d ${CPIO} ${CPIO}.uboot" + ${mkimage_cmd} ${mkimage_args} -n "initramfs-${KNAME}-${ARCH}-${KV}" -d "${CPIO}" "${CPIO}.uboot" >> ${LOGFILE} 2>&1 || gen_die "Wrapping initramfs using mkimage failed" mv -f "${CPIO}.uboot" "${CPIO}" || gen_die "Rename failed" fi fi @@ -1834,7 +1834,7 @@ create_initramfs() { then copy_image_with_preserve \ "initramfs" \ - "${TMPDIR}/initramfs-${KV}" \ + "${CPIO}" \ "initramfs-${KNAME}-${ARCH}-${KV}" fi fi