From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lichtman.org (lichtman.org [149.28.33.109]) (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 270D419ABDE for ; Fri, 10 Jan 2025 12:05:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=149.28.33.109 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736510709; cv=none; b=lJWkwhoRuA+KNer8fZeXtUVJFpfr33Qmk4LdOFdiNlPQhblyqyVsq7760fw6zMvWe8hOWv8CbUJSpWKXSCThaSVbEfP1bdOuonn3pGNJV8Pyck+1XGWSWbPEr+OPhUSmKd7D8T3p1+X2wBSsao0Bj775G06NwylKAIABBDzQahk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736510709; c=relaxed/simple; bh=WAkFHX2ogFanTDWDFoYW8krCKEE2crX6rcnIyzCYQAY=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=icX0JF//+js0qZ2RPDsWd6BOYq6MVP4khSDGLYwTPd8MIcKX/dcxb5Q/rf3o5pQeXyLLJX40GZsd6ArXV4mlaha4nY00L/SgAear8Xt21oNK4VrawdX/gu8TFhS4ytpOw6HQU4aRCLimTbF9EXrXRrJmKcq7lgeWbOqvm8vIBDc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lichtman.org; spf=pass smtp.mailfrom=lichtman.org; dkim=pass (2048-bit key) header.d=lichtman.org header.i=@lichtman.org header.b=anD8VPfc; arc=none smtp.client-ip=149.28.33.109 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lichtman.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lichtman.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lichtman.org header.i=@lichtman.org header.b="anD8VPfc" Received: by lichtman.org (Postfix, from userid 1000) id 022FE17710F; Fri, 10 Jan 2025 12:05:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=lichtman.org; s=mail; t=1736510701; bh=WAkFHX2ogFanTDWDFoYW8krCKEE2crX6rcnIyzCYQAY=; h=Date:From:To:Subject:From; b=anD8VPfcRf96J9suzJKjEguAsDsQemkTrWnfcbCmK8T89gh3yl2Fy1nGKucV/FbI4 Ju+w07D3Gtj4ykppx0zTWTnNi20K67sZTS2OHMF81nCyrL7PYW6LU7l1OPlgXE1ajl vmZ6Y1NtO5RAob+hfWQxsHPWHQ4W2E6YXXt716PAQe005GWzkoabkS4J8T7DO6DTC3 7Pq0qvgyw0FCC5A8omQETDY7b4O996HEi5B9yfHsuLvpsYoQAz79fbcUQ0iMLjzNwq i4Ei/So6PzO2xhSxA2n0mCWceFqSZr1PaxVlA+Xbd88Dpr+5yJaC2T0SYdv2BjZ57J ElaX29ir9go8Q== Date: Fri, 10 Jan 2025 12:05:00 +0000 From: Nir Lichtman To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org Subject: [PATCH] x86: Fix broken copy command in genimage when making isoimage Message-ID: <20250110120500.GA923218@lichtman.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 the 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 --- 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 c9299aeb7333..3882ead513f7 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