mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
x86/build: Fix broken copy command in genimage.sh when making isoimage
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 <nir@lichtman.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Michal Marek <michal.lkml@markovi.net> Link: https://lore.kernel.org/r/20250110120500.GA923218@lichtman.org
This commit is contained in:
parent
d082ecbc71
commit
e451630226
@ -22,6 +22,7 @@
|
|||||||
# This script requires:
|
# This script requires:
|
||||||
# bash
|
# bash
|
||||||
# syslinux
|
# syslinux
|
||||||
|
# genisoimage
|
||||||
# mtools (for fdimage* and hdimage)
|
# mtools (for fdimage* and hdimage)
|
||||||
# edk2/OVMF (for hdimage)
|
# edk2/OVMF (for hdimage)
|
||||||
#
|
#
|
||||||
@ -251,7 +252,9 @@ geniso() {
|
|||||||
cp "$isolinux" "$ldlinux" "$tmp_dir"
|
cp "$isolinux" "$ldlinux" "$tmp_dir"
|
||||||
cp "$FBZIMAGE" "$tmp_dir"/linux
|
cp "$FBZIMAGE" "$tmp_dir"/linux
|
||||||
echo default linux "$KCMDLINE" > "$tmp_dir"/isolinux.cfg
|
echo default linux "$KCMDLINE" > "$tmp_dir"/isolinux.cfg
|
||||||
|
if [ ${#FDINITRDS[@]} -gt 0 ]; then
|
||||||
cp "${FDINITRDS[@]}" "$tmp_dir"/
|
cp "${FDINITRDS[@]}" "$tmp_dir"/
|
||||||
|
fi
|
||||||
genisoimage -J -r -appid 'LINUX_BOOT' -input-charset=utf-8 \
|
genisoimage -J -r -appid 'LINUX_BOOT' -input-charset=utf-8 \
|
||||||
-quiet -o "$FIMAGE" -b isolinux.bin \
|
-quiet -o "$FIMAGE" -b isolinux.bin \
|
||||||
-c boot.cat -no-emul-boot -boot-load-size 4 \
|
-c boot.cat -no-emul-boot -boot-load-size 4 \
|
||||||
|
Loading…
Reference in New Issue
Block a user