public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
* [PATCH] cdrom: Use uppercase EFI boot filename on LoongArch
@ 2026-11-06  5:36 Vincent Li
  0 siblings, 0 replies; only message in thread
From: Vincent Li @ 2026-11-06  5:36 UTC (permalink / raw)
  To: development; +Cc: michael.tremer, Vincent Li

Some Loongson 3A6000 firmware reads the ISO9660 filesystem
case-sensitively and fails to find bootLOONGARCH64.efi. The
uppercase BOOTLOONGARCH64.EFI is valid UEFI naming and works
on unaffected firmware too, so use it on LoongArch only.
x86, ARM and RISC-V are unchanged.

Tested on a Morefine M700S (Loongson 3A6000).

Tested-by: Vincent Li <vincent.mc.li@gmail.com>
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
---
 lfs/cdrom | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/lfs/cdrom b/lfs/cdrom
index 11604b722..20d067613 100644
--- a/lfs/cdrom
+++ b/lfs/cdrom
@@ -66,6 +66,12 @@ ISO_ARGS += \
 
 ISO_FILE = $(IMAGES_DIR)/$(SNAME)-$(VERSION)-core$(CORE)-$(BUILD_ARCH).iso
 
+ifeq "$(EFI_ARCH)" "LOONGARCH64"
+	EFI_BOOT_FILE = BOOT$(EFI_ARCH).EFI
+else
+	EFI_BOOT_FILE = boot$(EFI_ARCH).efi
+endif
+
 # Dracut modules that the installer does not need
 INSTALLER_OMIT_MODULES = \
 	cifs \
@@ -185,7 +191,7 @@ endif
 
 	# Build a GRUB EFI image
 	mkdir -pv $(DIR_TMP)/cdrom/EFI/BOOT
-	$(call GRUB_MKIMAGE,$(GRUB_ARCH)-efi,/EFI/BOOT,$(DIR_TMP)/grub-efi.cfg,$(DIR_TMP)/cdrom/EFI/BOOT/boot$(EFI_ARCH).efi)
+	$(call GRUB_MKIMAGE,$(GRUB_ARCH)-efi,/EFI/BOOT,$(DIR_TMP)/grub-efi.cfg,$(DIR_TMP)/cdrom/EFI/BOOT/$(EFI_BOOT_FILE))
 
 	# Install GRUB configuration
 	mkdir -pv $(DIR_TMP)/cdrom/EFI/BOOT
@@ -199,7 +205,7 @@ endif
 	# Copy the bootloader into the image
 	mmd -i $(DIR_TMP)/cdrom/boot/isolinux/efiboot.img ::/EFI ::/EFI/BOOT
 	mcopy -i $(DIR_TMP)/cdrom/boot/isolinux/efiboot.img \
-		$(DIR_TMP)/cdrom/EFI/BOOT/boot$(EFI_ARCH).efi ::/EFI/BOOT/boot$(EFI_ARCH).efi
+		$(DIR_TMP)/cdrom/EFI/BOOT/$(EFI_BOOT_FILE) ::/EFI/BOOT/$(EFI_BOOT_FILE)
 
 	# Show what has been copied
 	mdir -/ -i $(DIR_TMP)/cdrom/boot/isolinux/efiboot.img ::
-- 
2.38.1



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-06  5:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-06  5:36 [PATCH] cdrom: Use uppercase EFI boot filename on LoongArch Vincent Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox