瀏覽代碼

board, boot, package: remove usage of startup.nsh in EFI partition

The startup.nsh file is useless to boot EFI payloads. We just need to
follow the naming detection specified in the UEFI spec.
The EFI payload need to be placed in the boot/efi folder in the EFI partition
and follow the architecture naming as described below:
32bit : bootia32.efi
x64 : bootx64.efi
aarch32 : bootarm.efi
aarch64 : bootaa64.efi

This naming is already right in the packages involved (systemd, grub2,
gummiboot), therefore we just need to drop the generation of the
startup.nsh file.

The usage of the startup.nsh in genimage is also dropped to avoid errors in
the image generation.

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Tested-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Kory Maincent 3 年之前
父節點
當前提交
3efb5e31fc

+ 0 - 3
board/aarch64-efi/genimage-efi.cfg

@@ -1,8 +1,5 @@
 image efi-part.vfat {
 image efi-part.vfat {
   vfat {
   vfat {
-    file startup.nsh {
-      image = "efi-part/startup.nsh"
-    }
     file EFI {
     file EFI {
       image = "efi-part/EFI"
       image = "efi-part/EFI"
     }
     }

+ 0 - 3
board/intel/galileo/genimage.cfg

@@ -1,9 +1,6 @@
 # Create an image of the efi partition
 # Create an image of the efi partition
 image efi-part.vfat {
 image efi-part.vfat {
 	vfat {
 	vfat {
-		file startup.nsh {
-			image = "efi-part/startup.nsh"
-		}
 		file EFI {
 		file EFI {
 			image = "efi-part/EFI"
 			image = "efi-part/EFI"
 		}
 		}

+ 0 - 3
board/minnowboard/genimage.cfg

@@ -1,9 +1,6 @@
 # Create an image of the efi partition
 # Create an image of the efi partition
 image efi-part.vfat {
 image efi-part.vfat {
 	vfat {
 	vfat {
-		file startup.nsh {
-			image = "efi-part/startup.nsh"
-		}
 		file EFI {
 		file EFI {
 			image = "efi-part/EFI"
 			image = "efi-part/EFI"
 		}
 		}

+ 0 - 3
board/pc/genimage-efi.cfg

@@ -1,8 +1,5 @@
 image efi-part.vfat {
 image efi-part.vfat {
   vfat {
   vfat {
-    file startup.nsh {
-      image = "efi-part/startup.nsh"
-    }
     file EFI {
     file EFI {
       image = "efi-part/EFI"
       image = "efi-part/EFI"
     }
     }

+ 1 - 1
board/pc/post-build.sh

@@ -5,7 +5,7 @@ set -e
 BOARD_DIR=$(dirname "$0")
 BOARD_DIR=$(dirname "$0")
 
 
 # Detect boot strategy, EFI or BIOS
 # Detect boot strategy, EFI or BIOS
-if [ -f "$BINARIES_DIR/efi-part/startup.nsh" ]; then
+if [ -d "$BINARIES_DIR/efi-part/" ]; then
     cp -f "$BOARD_DIR/grub-efi.cfg" "$BINARIES_DIR/efi-part/EFI/BOOT/grub.cfg"
     cp -f "$BOARD_DIR/grub-efi.cfg" "$BINARIES_DIR/efi-part/EFI/BOOT/grub.cfg"
 else
 else
     cp -f "$BOARD_DIR/grub-bios.cfg" "$TARGET_DIR/boot/grub/grub.cfg"
     cp -f "$BOARD_DIR/grub-bios.cfg" "$TARGET_DIR/boot/grub/grub.cfg"

+ 0 - 3
board/qemu/aarch64-sbsa/genimage.cfg

@@ -1,8 +1,5 @@
 image efi-part.vfat {
 image efi-part.vfat {
   vfat {
   vfat {
-    file startup.nsh {
-      image = "efi-part/startup.nsh"
-    }
     file EFI {
     file EFI {
       image = "efi-part/EFI"
       image = "efi-part/EFI"
     }
     }

+ 0 - 8
boot/grub2/grub2.mk

@@ -168,13 +168,5 @@ define GRUB2_INSTALL_IMAGES_CMDS
 	$(GRUB2_IMAGE_INSTALL_ELTORITO)
 	$(GRUB2_IMAGE_INSTALL_ELTORITO)
 endef
 endef
 
 
-ifeq ($(GRUB2_PLATFORM),efi)
-define GRUB2_EFI_STARTUP_NSH
-	echo $(notdir $(GRUB2_IMAGE)) > \
-		$(BINARIES_DIR)/efi-part/startup.nsh
-endef
-GRUB2_POST_INSTALL_IMAGES_HOOKS += GRUB2_EFI_STARTUP_NSH
-endif
-
 $(eval $(autotools-package))
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))
 $(eval $(host-autotools-package))

+ 0 - 2
boot/gummiboot/gummiboot.mk

@@ -32,8 +32,6 @@ GUMMIBOOT_CONF_OPTS = \
 define GUMMIBOOT_INSTALL_IMAGES_CMDS
 define GUMMIBOOT_INSTALL_IMAGES_CMDS
 	$(INSTALL) -D -m 0644 $(@D)/gummiboot$(GUMMIBOOT_IMGARCH).efi \
 	$(INSTALL) -D -m 0644 $(@D)/gummiboot$(GUMMIBOOT_IMGARCH).efi \
 		$(BINARIES_DIR)/efi-part/EFI/BOOT/boot$(GUMMIBOOT_IMGARCH).efi
 		$(BINARIES_DIR)/efi-part/EFI/BOOT/boot$(GUMMIBOOT_IMGARCH).efi
-	echo "boot$(GUMMIBOOT_IMGARCH).efi" > \
-		$(BINARIES_DIR)/efi-part/startup.nsh
 	$(INSTALL) -D -m 0644 boot/gummiboot/loader.conf \
 	$(INSTALL) -D -m 0644 boot/gummiboot/loader.conf \
 		$(BINARIES_DIR)/efi-part/loader/loader.conf
 		$(BINARIES_DIR)/efi-part/loader/loader.conf
 	$(INSTALL) -D -m 0644 boot/gummiboot/buildroot.conf \
 	$(INSTALL) -D -m 0644 boot/gummiboot/buildroot.conf \

+ 0 - 2
package/systemd/systemd.mk

@@ -514,8 +514,6 @@ SYSTEMD_BOOT_EFI_ARCH = $(call qstrip,$(BR2_PACKAGE_SYSTEMD_BOOT_EFI_ARCH))
 define SYSTEMD_INSTALL_BOOT_FILES
 define SYSTEMD_INSTALL_BOOT_FILES
 	$(INSTALL) -D -m 0644 $(@D)/build/src/boot/efi/systemd-boot$(SYSTEMD_BOOT_EFI_ARCH).efi \
 	$(INSTALL) -D -m 0644 $(@D)/build/src/boot/efi/systemd-boot$(SYSTEMD_BOOT_EFI_ARCH).efi \
 		$(BINARIES_DIR)/efi-part/EFI/BOOT/boot$(SYSTEMD_BOOT_EFI_ARCH).efi
 		$(BINARIES_DIR)/efi-part/EFI/BOOT/boot$(SYSTEMD_BOOT_EFI_ARCH).efi
-	echo "boot$(SYSTEMD_BOOT_EFI_ARCH).efi" > \
-		$(BINARIES_DIR)/efi-part/startup.nsh
 	$(INSTALL) -D -m 0644 $(SYSTEMD_PKGDIR)/boot-files/loader.conf \
 	$(INSTALL) -D -m 0644 $(SYSTEMD_PKGDIR)/boot-files/loader.conf \
 		$(BINARIES_DIR)/efi-part/loader/loader.conf
 		$(BINARIES_DIR)/efi-part/loader/loader.conf
 	$(INSTALL) -D -m 0644 $(SYSTEMD_PKGDIR)/boot-files/buildroot.conf \
 	$(INSTALL) -D -m 0644 $(SYSTEMD_PKGDIR)/boot-files/buildroot.conf \