public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Vincent Li <vincent.mc.li@gmail.com>
To: development@lists.ipfire.org
Cc: michael.tremer@ipfire.org, Vincent Li <vincent.mc.li@gmail.com>
Subject: [PATCH] cdrom: Use uppercase EFI boot filename on LoongArch
Date: Fri,  6 Nov 2026 05:36:59 +0000	[thread overview]
Message-ID: <20261106053659.1881811-1-vincent.mc.li@gmail.com> (raw)

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



                 reply	other threads:[~2026-11-06  5:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261106053659.1881811-1-vincent.mc.li@gmail.com \
    --to=vincent.mc.li@gmail.com \
    --cc=development@lists.ipfire.org \
    --cc=michael.tremer@ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox