. changes to enable El-Torito boot. It is disabled by default in rombios.c
This commit is contained in:
parent
d36bb4bdfd
commit
ac91aa0d3c
@ -104,10 +104,12 @@ diskc: file="30M.sample", cyl=615, heads=6, spt=17
|
||||
|
||||
#=======================================================================
|
||||
# BOOT:
|
||||
# This defines your boot drive. You can either boot from 'a' or 'c'.
|
||||
# This defines your boot drive.
|
||||
# You can either boot from 'a', 'c' or 'cdrom'
|
||||
# Examples:
|
||||
# boot: c
|
||||
# boot: a
|
||||
# boot: cdrom
|
||||
#=======================================================================
|
||||
#boot: a
|
||||
boot: c
|
||||
|
3895
bochs/bios/rombios.c
3895
bochs/bios/rombios.c
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: bochs.h,v 1.57 2001-12-14 17:55:51 cbothamy Exp $
|
||||
// $Id: bochs.h,v 1.58 2002-01-30 10:30:52 cbothamy Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -598,6 +598,7 @@ typedef struct {
|
||||
|
||||
#define BX_BOOT_FLOPPYA 0
|
||||
#define BX_BOOT_DISKC 1
|
||||
#define BX_BOOT_CDROM 2
|
||||
|
||||
#define BX_KBD_XT_TYPE 0
|
||||
#define BX_KBD_AT_TYPE 1
|
||||
|
@ -1,10 +1,10 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: siminterface.cc,v 1.38 2001-12-22 20:58:25 vruppert Exp $
|
||||
// $Id: siminterface.cc,v 1.39 2002-01-30 10:30:52 cbothamy Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/*
|
||||
* gui/siminterface.cc
|
||||
* $Id: siminterface.cc,v 1.38 2001-12-22 20:58:25 vruppert Exp $
|
||||
* $Id: siminterface.cc,v 1.39 2002-01-30 10:30:52 cbothamy Exp $
|
||||
*
|
||||
* Defines the actual link between bx_simulator_interface_c methods
|
||||
* and the simulator. This file includes bochs.h because it needs
|
||||
@ -256,8 +256,8 @@ char *floppy_type_names[] = { "none", "1.2M", "1.44M", "2.88M", "720K", NULL };
|
||||
int n_floppy_type_names = 5;
|
||||
char *floppy_status_names[] = { "ejected", "inserted", NULL };
|
||||
int n_floppy_status_names = 2;
|
||||
char *floppy_bootdisk_names[] = { "floppy", "hard", NULL };
|
||||
int n_floppy_bootdisk_names = 2;
|
||||
char *floppy_bootdisk_names[] = { "floppy", "hard","cdrom", NULL };
|
||||
int n_floppy_bootdisk_names = 3;
|
||||
char *loader_os_names[] = { "none", "linux", "nullkernel", NULL };
|
||||
int n_loader_os_names = 3;
|
||||
char *keyboard_type_names[] = { "xt", "at", "mf", NULL };
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: harddrv.cc,v 1.45 2002-01-29 17:20:11 vruppert Exp $
|
||||
// $Id: harddrv.cc,v 1.46 2002-01-30 10:30:52 cbothamy Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -128,7 +128,7 @@ bx_hard_drive_c::~bx_hard_drive_c(void)
|
||||
bx_hard_drive_c::init(bx_devices_c *d, bx_cmos_c *cmos)
|
||||
{
|
||||
BX_HD_THIS devices = d;
|
||||
BX_DEBUG(("Init $Id: harddrv.cc,v 1.45 2002-01-29 17:20:11 vruppert Exp $"));
|
||||
BX_DEBUG(("Init $Id: harddrv.cc,v 1.46 2002-01-30 10:30:52 cbothamy Exp $"));
|
||||
|
||||
/* HARD DRIVE 0 */
|
||||
|
||||
@ -290,7 +290,8 @@ bx_hard_drive_c::init(bx_devices_c *d, bx_cmos_c *cmos)
|
||||
}
|
||||
|
||||
|
||||
if ( bx_options.Obootdrive->get () == BX_BOOT_DISKC) {
|
||||
// Set the "non-extended" boot device. This will default to DISKC if cdrom
|
||||
if ( bx_options.Obootdrive->get () != BX_BOOT_FLOPPYA) {
|
||||
// system boot sequence C:, A:
|
||||
cmos->s.reg[0x2d] &= 0xdf;
|
||||
}
|
||||
@ -298,6 +299,20 @@ bx_hard_drive_c::init(bx_devices_c *d, bx_cmos_c *cmos)
|
||||
// system boot sequence A:, C:
|
||||
cmos->s.reg[0x2d] |= 0x20;
|
||||
}
|
||||
|
||||
// Set the "extended" boot device, byte 0x3D (needed for cdrom booting)
|
||||
if ( bx_options.Obootdrive->get () == BX_BOOT_FLOPPYA) {
|
||||
// system boot sequence A:
|
||||
cmos->s.reg[0x3d] = 0x01;
|
||||
}
|
||||
else if ( bx_options.Obootdrive->get () == BX_BOOT_DISKC) {
|
||||
// system boot sequence C:
|
||||
cmos->s.reg[0x3d] = 0x02;
|
||||
}
|
||||
else if ( bx_options.Obootdrive->get () == BX_BOOT_CDROM) {
|
||||
// system boot sequence cdrom
|
||||
cmos->s.reg[0x3d] = 0x03;
|
||||
}
|
||||
}
|
||||
|
||||
//switch (stat_buf.st_size) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: main.cc,v 1.84 2002-01-02 09:57:58 vruppert Exp $
|
||||
// $Id: main.cc,v 1.85 2002-01-30 10:30:52 cbothamy Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -434,12 +434,12 @@ void bx_init_options ()
|
||||
|
||||
bx_options.Obootdrive = new bx_param_enum_c (BXP_BOOTDRIVE,
|
||||
"bootdrive",
|
||||
"Boot A or C",
|
||||
"Boot A, C or CD",
|
||||
floppy_bootdisk_names,
|
||||
BX_BOOT_FLOPPYA,
|
||||
BX_BOOT_FLOPPYA);
|
||||
bx_options.Obootdrive->set_format ("Boot from: %s drive");
|
||||
bx_options.Obootdrive->set_ask_format ("Boot from floppy drive or hard drive? [%s] ");
|
||||
bx_options.Obootdrive->set_ask_format ("Boot from floppy drive, hard drive or cdrom ? [%s] ");
|
||||
// disk menu
|
||||
bx_param_c *disk_menu_init_list[] = {
|
||||
SIM->get_param (BXP_FLOPPYA),
|
||||
@ -1414,8 +1414,10 @@ parse_line_formatted(char *context, int num_params, char *params[])
|
||||
bx_options.Obootdrive->set (BX_BOOT_FLOPPYA);
|
||||
} else if (!strcmp(params[1], "c")) {
|
||||
bx_options.Obootdrive->set (BX_BOOT_DISKC);
|
||||
} else if (!strcmp(params[1], "cdrom")) {
|
||||
bx_options.Obootdrive->set (BX_BOOT_CDROM);
|
||||
} else {
|
||||
BX_PANIC(("%s: boot directive with unknown boot device '%s'. use 'a' or 'c'.", context, params[1]));
|
||||
BX_PANIC(("%s: boot directive with unknown boot device '%s'. use 'a', 'c' or 'cdrom'.", context, params[1]));
|
||||
}
|
||||
}
|
||||
else if (!strcmp(params[0], "log")) {
|
||||
|
Loading…
Reference in New Issue
Block a user