2008-01-31 Bean <bean123ch@gmail.com>
* conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img. (cdboot_img_SOURCES): New variable. (cdboot_img_ASFLAGS): New variable. (cdboot_img_LDFLAGS): New variable. * boot/i386/pc/cdboot.S: New file. * disk/i386/pc/biosdisk.c (cd_start): New variable. (cd_count): Likewise. (grub_biosdisk_get_drive): Add support for cd device. (grub_biosdisk_call_hook): Likewise. (grub_biosdisk_iterate): Likewise. (grub_biosdisk_open): Likewise. (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro. (grub_biosdisk_rw): Support reading from cd device. (GRUB_MOD_INIT): Iterate cd devices. * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro. (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise. (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise. * kern/i386/pc/init.c (make_install_device): Check for cd device.
This commit is contained in:
parent
4020aa53c0
commit
9be665dd11
7 changed files with 317 additions and 26 deletions
|
@ -22,6 +22,7 @@
|
|||
#include <grub/machine/memory.h>
|
||||
#include <grub/machine/console.h>
|
||||
#include <grub/machine/kernel.h>
|
||||
#include <grub/machine/biosdisk.h>
|
||||
#include <grub/types.h>
|
||||
#include <grub/err.h>
|
||||
#include <grub/dl.h>
|
||||
|
@ -71,9 +72,13 @@ make_install_device (void)
|
|||
}
|
||||
else if (grub_install_dos_part != -2)
|
||||
{
|
||||
grub_sprintf (dev, "(%cd%u",
|
||||
(grub_boot_drive & 0x80) ? 'h' : 'f',
|
||||
grub_boot_drive & 0x7f);
|
||||
if (grub_boot_drive >= GRUB_BIOSDISK_MACHINE_CDROM_START)
|
||||
grub_sprintf (dev, "(cd%u",
|
||||
grub_boot_drive - GRUB_BIOSDISK_MACHINE_CDROM_START);
|
||||
else
|
||||
grub_sprintf (dev, "(%cd%u",
|
||||
(grub_boot_drive & 0x80) ? 'h' : 'f',
|
||||
grub_boot_drive & 0x7f);
|
||||
|
||||
if (grub_install_dos_part >= 0)
|
||||
grub_sprintf (dev + grub_strlen (dev), ",%u", grub_install_dos_part + 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue