diff --git a/ChangeLog b/ChangeLog index d7e6df037..52dab6484 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2002-07-09 Yoshinori K. Okuji + + From Mark Kettenis : + * stage2/boot.c (load_image): Recognize newer FreeBSD kernels. + * stage2/i386-elf.h (EI_OSABI): New macro. + (EI_ABIVERSION): Likewise. + (ELFOSABI_FREEBSD): Likewise. + (EI_PAD): Set to 9. + 2002-07-06 Yoshinori K. Okuji * stage2/shared.h (boot_part_offset): Removed. diff --git a/THANKS b/THANKS index a63436575..4232236da 100644 --- a/THANKS +++ b/THANKS @@ -63,6 +63,7 @@ Kristoffer Branemyr Kunihiro Ishiguro Leendert Meyer M. Meiarashi +Mark Kettenis Mark Lundeberg Matt Perry Matt Yourst diff --git a/stage2/boot.c b/stage2/boot.c index 065bb2473..3e39099e8 100644 --- a/stage2/boot.c +++ b/stage2/boot.c @@ -97,6 +97,7 @@ load_image (char *kernel, char *arg, kernel_t suggested_type, /* ELF loading supported if multiboot, FreeBSD and NetBSD. */ if ((type == KERNEL_TYPE_MULTIBOOT + || pu.elf->e_ident[EI_OSABI] == ELFOSABI_FREEBSD || grub_strcmp (pu.elf->e_ident + EI_BRAND, "FreeBSD") == 0 || suggested_type == KERNEL_TYPE_NETBSD) && len > sizeof (Elf32_Ehdr) diff --git a/stage2/i386-elf.h b/stage2/i386-elf.h index 6e50d7df4..7162e3de8 100644 --- a/stage2/i386-elf.h +++ b/stage2/i386-elf.h @@ -1,6 +1,6 @@ /* * GRUB -- GRand Unified Bootloader - * Copyright (C) 2001 Free Software Foundation, Inc. + * Copyright (C) 2001,2002 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -50,8 +50,13 @@ typedef struct #define EI_VERSION 6 /* version number. "e_version" must be the same */ #define EV_CURRENT 1 /* current version number */ + +#define EI_OSABI 7 /* operating system/ABI indication */ +#define ELFOSABI_FREEBSD 9 -#define EI_PAD 7 /* from here in is just padding */ +#define EI_ABIVERSION 8 /* ABI version */ + +#define EI_PAD 9 /* from here in is just padding */ #define EI_BRAND 8 /* start of OS branding (This is obviously illegal against the ELF