All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Serbinenko <phcoder@gmail.com>
To: grub-devel@gnu.org
Cc: Vladimir Serbinenko <phcoder@gmail.com>
Subject: [PATCH v2] bsd: Fix type passed for the kernel
Date: Tue,  4 Mar 2025 21:46:30 +0300	[thread overview]
Message-ID: <20250304184641.203917-1-phcoder@gmail.com> (raw)

FreeBSD loader always passes "elf kernel". We currently pass
"elf64 kernel" when loading 64-bit kernel. -CURRENT (HEAD) kernel
accepts only "elf kernel", older kernel accepts either.

Tested with FreeBSD and DragonFlyBSD

Reference: https://cgit.freebsd.org/src/commit/?id=b72ae900d4348118829fe04abdc11b620930c30f

Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
---
 grub-core/loader/i386/bsd.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/grub-core/loader/i386/bsd.c b/grub-core/loader/i386/bsd.c
index dd1024d4b..ac70dde8c 100644
--- a/grub-core/loader/i386/bsd.c
+++ b/grub-core/loader/i386/bsd.c
@@ -1876,9 +1876,7 @@ grub_cmd_freebsd (grub_extcmd_context_t ctxt, int argc, char *argv[])
 	  grub_file_t file;
 	  int len = is_64bit ? 8 : 4;
 
-	  err = grub_freebsd_add_meta_module (argv[0], is_64bit
-					      ? FREEBSD_MODTYPE_KERNEL64
-					      : FREEBSD_MODTYPE_KERNEL,
+	  err = grub_freebsd_add_meta_module (argv[0], FREEBSD_MODTYPE_KERNEL,
 					      argc - 1, argv + 1,
 					      kern_start,
 					      kern_end - kern_start);
-- 
2.48.1


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

             reply	other threads:[~2025-03-04 18:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-04 18:46 Vladimir Serbinenko [this message]
2025-03-05 20:23 ` [PATCH v2] bsd: Fix type passed for the kernel Daniel Kiper

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=20250304184641.203917-1-phcoder@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.