Merge tag 'x86-boot-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 28 Jun 2021 20:05:09 +0000 (13:05 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 28 Jun 2021 20:05:09 +0000 (13:05 -0700)
Pull x86 boot update from Ingo Molnar:
 "Modernize the genimage.sh script, add a 'hdimage' target and EFI
  support"

* tag 'x86-boot-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/boot: Modernize genimage script; hdimage+EFI support

1  2 
arch/x86/Makefile

diff --combined arch/x86/Makefile
@@@ -178,6 -178,11 +178,6 @@@ ifeq ($(ACCUMULATE_OUTGOING_ARGS), 1
        KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args,)
  endif
  
 -ifdef CONFIG_LTO_CLANG
 -KBUILD_LDFLAGS        += -plugin-opt=-code-model=kernel \
 -                 -plugin-opt=-stack-alignment=$(if $(CONFIG_X86_32),4,8)
 -endif
 -
  # Workaround for a gcc prelease that unfortunately was shipped in a suse release
  KBUILD_CFLAGS += -Wno-sign-compare
  #
@@@ -197,13 -202,7 +197,13 @@@ ifdef CONFIG_RETPOLIN
    endif
  endif
  
 -KBUILD_LDFLAGS := -m elf_$(UTS_MACHINE)
 +KBUILD_LDFLAGS += -m elf_$(UTS_MACHINE)
 +
 +ifdef CONFIG_LTO_CLANG
 +ifeq ($(shell test $(CONFIG_LLD_VERSION) -lt 130000; echo $$?),0)
 +KBUILD_LDFLAGS        += -plugin-opt=-stack-alignment=$(if $(CONFIG_X86_32),4,8)
 +endif
 +endif
  
  ifdef CONFIG_X86_NEED_RELOCS
  LDFLAGS_vmlinux := --emit-relocs --discard-none
@@@ -257,7 -256,7 +257,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)
  
@@@ -315,8 -314,9 +315,9 @@@ define archhel
    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  ''