From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 428052EC28D; Mon, 5 May 2025 23:10:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746486620; cv=none; b=bWkdPKNuxoOcTccwYdV/SQuTyzN4WPVN3q8fFPpgxnh0mndqSN/8YZ53kc/WX8G2fOg4zYkKhZaT2TDBFkrKEAfjCBvgsvFSaACltFRb1lEEbw9ppb/BaXAtDqTY/XdcBTAj/yFwZ/c7M3G4FS1kbiXeiAFDTWNcdBpDF4czgbw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746486620; c=relaxed/simple; bh=Svz4wnp7COiUCkLASvgsNelQAE+ZagYIac/R1LzByOo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=YKoA3dYXv0ZIoid3AoAQ/AU5QPIL3tBEJxxkqTsycwFkUEv259NROd3zWvm0FkzKpWOAhg4SzIcbpUSFLi9eDF+qTbOIbC+IrQxPqHftjS1BTYZfEZbEdf0J5BMbDFKl3ueRjZGHk49ipRB5e4rqwJdInapJBVaidlil9h2JehA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WDgZZ6ss; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WDgZZ6ss" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F93FC4CEE4; Mon, 5 May 2025 23:10:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1746486620; bh=Svz4wnp7COiUCkLASvgsNelQAE+ZagYIac/R1LzByOo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WDgZZ6sssf6EQAFMUgdyZRhfeVdR6klxHhkRV9GMBhr+tJciygoLqTtB68mHV4F8r XkWYO4FI9tNU46LyRHi5PnKjrQoTenD7bODkk5N04y7iMp1i6hMZi6SwkGpKWOgiKO HjVnS3vEXE+44QBxSJkiF/g103FLcq8VaZarzdd7ys/msR6rby6LjaRONi3AMkrDri UQekHNmgJyweB0M84P3KuHMkAwZVpONNW+aJh4BT/hrXjSAahp7UhkticWB5vSCSZL vmnd+9V+ngK/4uru63ocb8eySmA+XOG46+iysi7ZKsdF1wm/BxT0yJm4BsprJb2eFt Q/Ywo8DKfEDdA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Nir Lichtman , Ingo Molnar , "H. Peter Anvin" , Ard Biesheuvel , Masahiro Yamada , Michal Marek , Sasha Levin , tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org Subject: [PATCH AUTOSEL 6.1 122/212] x86/build: Fix broken copy command in genimage.sh when making isoimage Date: Mon, 5 May 2025 19:04:54 -0400 Message-Id: <20250505230624.2692522-122-sashal@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250505230624.2692522-1-sashal@kernel.org> References: <20250505230624.2692522-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.1.136 Content-Transfer-Encoding: 8bit From: Nir Lichtman [ Upstream commit e451630226bd09dc730eedb4e32cab1cc7155ae8 ] Problem: Currently when running the "make isoimage" command there is an error related to wrong parameters passed to the cp command: "cp: missing destination file operand after 'arch/x86/boot/isoimage/'" This is caused because FDINITRDS is an empty array. Solution: Check if FDINITRDS is empty before executing the "cp" command, similar to how it is done in the case of hdimage. Signed-off-by: Nir Lichtman Signed-off-by: Ingo Molnar Cc: "H. Peter Anvin" Cc: Ard Biesheuvel Cc: Masahiro Yamada Cc: Michal Marek Link: https://lore.kernel.org/r/20250110120500.GA923218@lichtman.org Signed-off-by: Sasha Levin --- arch/x86/boot/genimage.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/x86/boot/genimage.sh b/arch/x86/boot/genimage.sh index c9299aeb7333e..3882ead513f74 100644 --- a/arch/x86/boot/genimage.sh +++ b/arch/x86/boot/genimage.sh @@ -22,6 +22,7 @@ # This script requires: # bash # syslinux +# genisoimage # mtools (for fdimage* and hdimage) # edk2/OVMF (for hdimage) # @@ -251,7 +252,9 @@ geniso() { cp "$isolinux" "$ldlinux" "$tmp_dir" cp "$FBZIMAGE" "$tmp_dir"/linux echo default linux "$KCMDLINE" > "$tmp_dir"/isolinux.cfg - cp "${FDINITRDS[@]}" "$tmp_dir"/ + if [ ${#FDINITRDS[@]} -gt 0 ]; then + cp "${FDINITRDS[@]}" "$tmp_dir"/ + fi genisoimage -J -r -appid 'LINUX_BOOT' -input-charset=utf-8 \ -quiet -o "$FIMAGE" -b isolinux.bin \ -c boot.cat -no-emul-boot -boot-load-size 4 \ -- 2.39.5