summaryrefslogtreecommitdiff
path: root/arch/x86/Makefile
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2021-05-10 01:28:40 -0700
committerIngo Molnar <mingo@kernel.org>2021-05-10 12:27:50 +0200
commitf279b49f13bd2151bbe402a1d812c1e3646c4bbb (patch)
treefcbc15dd44b104062096366b399d380acab8b374 /arch/x86/Makefile
parent6efb943b8616ec53a5e444193dccf1af9ad627b5 (diff)
downloadlinux-f279b49f13bd2151bbe402a1d812c1e3646c4bbb.tar.gz
x86/boot: Modernize genimage script; hdimage+EFI support
The image generation scripts in arch/x86/boot are pretty out of date, except for the isoimage target. Update and clean up the genimage.sh script, and make it support an arbitrary number of initramfs files in the image. Add a "hdimage" target, which can be booted by either BIOS or EFI (if the kernel is compiled with the EFI stub.) For EFI to be able to pass the command line to the kernel, we need the EFI shell, but the firmware builtin EFI shell, if it even exists, is pretty much always the last resort boot option, so search for OVMF or EDK2 and explicitly include a copy of the EFI shell. To make this all work, use bash features in the script. Furthermore, this version of the script makes use of some mtools features, especially mpartition, that might not exist in very old version of mtools, but given all the other dependencies on this script this doesn't seem such a big deal. Finally, put a volume label ("LINUX_BOOT") on all generated images. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20210510082840.628372-1-hpa@zytor.com
Diffstat (limited to 'arch/x86/Makefile')
-rw-r--r--arch/x86/Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index c77c5d8a7b3e..d42764c60a0a 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -256,7 +256,7 @@ drivers-$(CONFIG_FB) += arch/x86/video/
boot := arch/x86/boot
-BOOT_TARGETS = bzdisk fdimage fdimage144 fdimage288 isoimage
+BOOT_TARGETS = bzdisk fdimage fdimage144 fdimage288 hdimage isoimage
PHONY += bzImage $(BOOT_TARGETS)
@@ -314,8 +314,9 @@ define archhelp
echo ' fdimage - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)'
echo ' fdimage144 - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)'
echo ' fdimage288 - Create 2.8MB boot floppy image (arch/x86/boot/fdimage)'
+ echo ' hdimage - Create a BIOS/EFI hard disk image (arch/x86/boot/hdimage)'
echo ' isoimage - Create a boot CD-ROM image (arch/x86/boot/image.iso)'
- echo ' bzdisk/fdimage*/isoimage also accept:'
+ echo ' bzdisk/fdimage*/hdimage/isoimage also accept:'
echo ' FDARGS="..." arguments for the booted kernel'
echo ' FDINITRD=file initrd for the booted kernel'
echo ''