diff options
| author | Nir Lichtman <[email protected]> | 2025-01-10 12:05:00 +0000 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2025-02-25 20:13:33 +0000 |
| commit | e451630226bd09dc730eedb4e32cab1cc7155ae8 (patch) | |
| tree | de1030f338d1af2ce1ec5ddaae56d2803f39b926 | |
| parent | Linux 6.14-rc4 (diff) | |
| download | kernel-e451630226bd09dc730eedb4e32cab1cc7155ae8.tar.gz kernel-e451630226bd09dc730eedb4e32cab1cc7155ae8.zip | |
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 <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Ard Biesheuvel <[email protected]>
Cc: Masahiro Yamada <[email protected]>
Cc: Michal Marek <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
| -rw-r--r-- | arch/x86/boot/genimage.sh | 5 |
1 files changed, 4 insertions, 1 deletions
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 \ |
