2010-01-26 Robert Millan <rmh.grub@aybabtu.com>
* include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_PXE_DL): New macro. * boot/i386/pc/pxeboot.S: Include `<grub/machine/boot.h>'. (_start): Macroify `0x7F'. * kern/i386/pc/init.c: Include `<grub/machine/boot.h>'. (make_install_device): Use "(pxe)" as fallback prefix when booting via PXE.
This commit is contained in:
parent
59cad637ae
commit
3973a59a34
4 changed files with 39 additions and 17 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
||||||
|
2010-01-26 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_PXE_DL): New macro.
|
||||||
|
|
||||||
|
* boot/i386/pc/pxeboot.S: Include `<grub/machine/boot.h>'.
|
||||||
|
(_start): Macroify `0x7F'.
|
||||||
|
|
||||||
|
* kern/i386/pc/init.c: Include `<grub/machine/boot.h>'.
|
||||||
|
(make_install_device): Use "(pxe)" as fallback prefix when booting
|
||||||
|
via PXE.
|
||||||
|
|
||||||
2010-01-26 Vladimir Serbinenko <phcoder@gmail.com>
|
2010-01-26 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* configure.ac: Reset LIBS after check for libgcc symbols.
|
* configure.ac: Reset LIBS after check for libgcc symbols.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* GRUB -- GRand Unified Bootloader
|
* GRUB -- GRand Unified Bootloader
|
||||||
* Copyright (C) 2000,2005,2007,2008,2009 Free Software Foundation, Inc.
|
* Copyright (C) 2000,2005,2007,2008,2009,2010 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* GRUB is free software: you can redistribute it and/or modify
|
* GRUB is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -16,6 +16,8 @@
|
||||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <grub/machine/boot.h>
|
||||||
|
|
||||||
.file "pxeboot.S"
|
.file "pxeboot.S"
|
||||||
.text
|
.text
|
||||||
|
|
||||||
|
@ -28,7 +30,7 @@ _start:
|
||||||
start:
|
start:
|
||||||
|
|
||||||
/* Use drive number 0x7F for PXE */
|
/* Use drive number 0x7F for PXE */
|
||||||
movb $0x7F, %dl
|
movb $GRUB_BOOT_MACHINE_PXE_DL, %dl
|
||||||
|
|
||||||
/* Jump to the real world */
|
/* Jump to the real world */
|
||||||
ljmp $0, $0x8200
|
ljmp $0, $0x8200
|
||||||
|
|
|
@ -66,6 +66,8 @@
|
||||||
/* The size of a block list used in the kernel startup code. */
|
/* The size of a block list used in the kernel startup code. */
|
||||||
#define GRUB_BOOT_MACHINE_LIST_SIZE 12
|
#define GRUB_BOOT_MACHINE_LIST_SIZE 12
|
||||||
|
|
||||||
|
#define GRUB_BOOT_MACHINE_PXE_DL 0x7f
|
||||||
|
|
||||||
#ifndef ASM_FILE
|
#ifndef ASM_FILE
|
||||||
|
|
||||||
/* This is the blocklist used in the diskboot image. */
|
/* This is the blocklist used in the diskboot image. */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* GRUB -- GRand Unified Bootloader
|
* GRUB -- GRand Unified Bootloader
|
||||||
* Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
|
* Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* GRUB is free software: you can redistribute it and/or modify
|
* GRUB is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
#include <grub/kernel.h>
|
#include <grub/kernel.h>
|
||||||
#include <grub/mm.h>
|
#include <grub/mm.h>
|
||||||
|
#include <grub/machine/boot.h>
|
||||||
#include <grub/machine/init.h>
|
#include <grub/machine/init.h>
|
||||||
#include <grub/machine/memory.h>
|
#include <grub/machine/memory.h>
|
||||||
#include <grub/machine/console.h>
|
#include <grub/machine/console.h>
|
||||||
|
@ -62,22 +63,28 @@ make_install_device (void)
|
||||||
{
|
{
|
||||||
/* No hardcoded root partition - make it from the boot drive and the
|
/* No hardcoded root partition - make it from the boot drive and the
|
||||||
partition number encoded at the install time. */
|
partition number encoded at the install time. */
|
||||||
grub_snprintf (dev, sizeof (dev),
|
if (grub_boot_drive == GRUB_BOOT_MACHINE_PXE_DL)
|
||||||
"(%cd%u", (grub_boot_drive & 0x80) ? 'h' : 'f',
|
{
|
||||||
grub_boot_drive & 0x7f);
|
grub_strcpy (dev, "(pxe");
|
||||||
ptr += grub_strlen (ptr);
|
ptr += sizeof ("(pxe") - 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
grub_snprintf (dev, sizeof (dev),
|
||||||
|
"(%cd%u", (grub_boot_drive & 0x80) ? 'h' : 'f',
|
||||||
|
grub_boot_drive & 0x7f);
|
||||||
|
ptr += grub_strlen (ptr);
|
||||||
|
|
||||||
if (grub_install_dos_part >= 0)
|
if (grub_install_dos_part >= 0)
|
||||||
grub_snprintf (ptr, sizeof (dev) - (ptr - dev),
|
grub_snprintf (ptr, sizeof (dev) - (ptr - dev),
|
||||||
",%u", grub_install_dos_part + 1);
|
",%u", grub_install_dos_part + 1);
|
||||||
|
ptr += grub_strlen (ptr);
|
||||||
|
|
||||||
ptr += grub_strlen (ptr);
|
if (grub_install_bsd_part >= 0)
|
||||||
|
grub_snprintf (ptr, sizeof (dev) - (ptr - dev), ",%c",
|
||||||
if (grub_install_bsd_part >= 0)
|
grub_install_bsd_part + 'a');
|
||||||
grub_snprintf (ptr, sizeof (dev) - (ptr - dev), ",%c",
|
ptr += grub_strlen (ptr);
|
||||||
grub_install_bsd_part + 'a');
|
}
|
||||||
|
|
||||||
ptr += grub_strlen (ptr);
|
|
||||||
|
|
||||||
grub_snprintf (ptr, sizeof (dev) - (ptr - dev), ")%s", grub_prefix);
|
grub_snprintf (ptr, sizeof (dev) - (ptr - dev), ")%s", grub_prefix);
|
||||||
grub_strcpy (grub_prefix, dev);
|
grub_strcpy (grub_prefix, dev);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue