Skip to contentSkip to conversation

bsd: Fix type passed for the kernel

PATCH Superseded Vladimir Serbinenko 2 participants 4 messages Mar 2, 2025 – Mar 4, 2025

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bsd: Fix type passed for the kernel

FreeBSD loader always passes "elf kernel". -CURRENT kernel accepts only "elf kernel", older kernel accepts either.

Tested on FreeBSD and DragonFlyBSD

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

---
 grub-core/loader/i386/bsd.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
grub-core/loader/i386/bsd.c +1 -3
index dd1024d4b..ac70dde8c 100644
@@ -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);
Signature · 7 lines
2.48.1


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#1 lore raw
Quoted 1 line · Vladimir Serbinenko

FreeBSD loader always passes "elf kernel". -CURRENT kernel accepts only

What is "-CURRENT"?

Quoted 1 line

"elf kernel", older kernel accepts either.

You repeat "elf kernel" twice. I think something is off here...

Quoted 5 lines

Tested on FreeBSD and DragonFlyBSD

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

Daniel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#2 lore raw
Quoted 5 lines · Daniel Kiper
Quoted 1 line · Vladimir Serbinenko

FreeBSD loader always passes "elf kernel". -CURRENT kernel accepts only

What is "-CURRENT"?

Basically HEAD/master in FreeBSD world.

Quoted 5 lines
Quoted 2 lines

"elf kernel", older kernel accepts either.

You repeat "elf kernel" twice. I think something is off here...

No, it's correct. We pass elf64 kernel but FreeBSD passes and across only elf kernel

Quoted 10 lines
Quoted 4 lines

Tested on FreeBSD and DragonFlyBSD

Reference:

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

Quoted 2 lines

Daniel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#3 lore raw
Quoted 7 lines · Vladimir 'phcoder' Serbinenko

Le mar. 4 mars 2025, 16:25, Daniel Kiper <[email protected]> a écrit :
On Mon, Mar 03, 2025 at 12:04:31AM +0300, Vladimir Serbinenko wrote:
> FreeBSD loader always passes "elf kernel". -CURRENT kernel accepts only

What is "-CURRENT"?
Basically HEAD/master in FreeBSD world.

Could you use HEAD/master then? For those less familiar with FreeBSD world...

Quoted 5 lines

> "elf kernel", older kernel accepts either.

You repeat "elf kernel" twice. I think something is off here...
No, it's correct. We pass elf64 kernel but FreeBSD passes and across only elf kernel

It would be nice if you put that in the commit message too.

Daniel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel