2002-07-09 Yoshinori K. Okuji <okuji@enbug.org>

From Mark Kettenis <kettenis@chello.nl>:
	* 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.
This commit is contained in:
okuji 2002-07-09 13:24:21 +00:00
parent 80d0f93b30
commit f8b4503f1b
4 changed files with 18 additions and 2 deletions

View file

@ -1,3 +1,12 @@
2002-07-09 Yoshinori K. Okuji <okuji@enbug.org>
From Mark Kettenis <kettenis@chello.nl>:
* 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 <okuji@enbug.org>
* stage2/shared.h (boot_part_offset): Removed.

1
THANKS
View file

@ -63,6 +63,7 @@ Kristoffer Branemyr <ztion@swipnet.se>
Kunihiro Ishiguro <kunihiro@zebra.org>
Leendert Meyer <leen.meyer@home.nl>
M. Meiarashi <mes@st.rim.or.jp>
Mark Kettenis <kettenis@chello.nl>
Mark Lundeberg <aa026@pgfn.bc.ca>
Matt Perry <matt@primefactor.com>
Matt Yourst <yourst@mit.edu>

View file

@ -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)

View file

@ -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
@ -51,7 +51,12 @@ typedef struct
#define EI_VERSION 6 /* version number. "e_version" must be the same */
#define EV_CURRENT 1 /* current version number */
#define EI_PAD 7 /* from here in is just padding */
#define EI_OSABI 7 /* operating system/ABI indication */
#define ELFOSABI_FREEBSD 9
#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