Eliminate unnecessary code and add the command configfile.
This commit is contained in:
parent
2430aa08f4
commit
6ec8139b75
9 changed files with 84 additions and 14 deletions
21
ChangeLog
21
ChangeLog
|
@ -1,3 +1,24 @@
|
||||||
|
1999-09-06 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
||||||
|
|
||||||
|
* stage2/builtins.c (configfile_func): New function.
|
||||||
|
(builtin_configfile): New variable.
|
||||||
|
(builtin_table): Added the pointer to BUILTIN_CONFIGFILE.
|
||||||
|
|
||||||
|
1999-09-06 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
||||||
|
|
||||||
|
From Pavel Roskin:
|
||||||
|
* stage2/asm.S [!STAGE1_5] (chain_stage2): Deleted.
|
||||||
|
[STAGE1_5] (get_code_end): Likewise.
|
||||||
|
* stage2/char_io.c (grub_strncat): Likewise.
|
||||||
|
* stage2/common.c [STAGE1_5] (saved_mem_upper): Likewise.
|
||||||
|
* stage2/smp-imps.c (imps_release_cpus): Likewise.
|
||||||
|
(imps_any_new_apics): Made static.
|
||||||
|
(imps_enabled): Likewise.
|
||||||
|
(imps_num_cpus): Likewise.
|
||||||
|
(imps_lapic_addr): Likewise.
|
||||||
|
(imps_cpu_apic_map): Likewise.
|
||||||
|
(imps_apic_cpu_map): Likewise.
|
||||||
|
|
||||||
1999-09-06 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
1999-09-06 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
||||||
|
|
||||||
* stage2/builtins.c (testload_func): Fix the typos: 0x2000000 ->
|
* stage2/builtins.c (testload_func): Fix the typos: 0x2000000 ->
|
||||||
|
|
1
NEWS
1
NEWS
|
@ -13,6 +13,7 @@ New in 0.5.93:
|
||||||
* The command "help" displays helpful information about builtin
|
* The command "help" displays helpful information about builtin
|
||||||
commands.
|
commands.
|
||||||
* The command "geometry" displays the information of a drive specified.
|
* The command "geometry" displays the information of a drive specified.
|
||||||
|
* The command "configfile" loads a configuration file interactively.
|
||||||
|
|
||||||
New in 0.5.92 - 1999-07-26:
|
New in 0.5.92 - 1999-07-26:
|
||||||
* Bug fixes (i.e. Stage 1.5 can work fine again).
|
* Bug fixes (i.e. Stage 1.5 can work fine again).
|
||||||
|
|
2
TODO
2
TODO
|
@ -27,8 +27,6 @@ larger than 16MB can be read.
|
||||||
|
|
||||||
Fix-up FreeBSD, NetBSD (and OpenBSD ?) command-line boot parameters
|
Fix-up FreeBSD, NetBSD (and OpenBSD ?) command-line boot parameters
|
||||||
|
|
||||||
Add ``configfile'' command, in a clean way.
|
|
||||||
|
|
||||||
Add keyboard layout configuration support.
|
Add keyboard layout configuration support.
|
||||||
|
|
||||||
Clean up and enhance the manuals, especially concept indexes.
|
Clean up and enhance the manuals, especially concept indexes.
|
||||||
|
|
|
@ -175,6 +175,7 @@ ENTRY(chain_stage1)
|
||||||
#endif /* STAGE1_5 */
|
#endif /* STAGE1_5 */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef STAGE1_5
|
||||||
/*
|
/*
|
||||||
* chain_stage2(segment, offset)
|
* chain_stage2(segment, offset)
|
||||||
*
|
*
|
||||||
|
@ -212,6 +213,7 @@ ENTRY(chain_stage2)
|
||||||
DATA32 ADDR32 ljmp (offset)
|
DATA32 ADDR32 ljmp (offset)
|
||||||
|
|
||||||
.code32
|
.code32
|
||||||
|
#endif /* STAGE1_5 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These next two routines, "real_to_prot" and "prot_to_real" are structured
|
* These next two routines, "real_to_prot" and "prot_to_real" are structured
|
||||||
|
@ -766,6 +768,7 @@ pc_notnewline:
|
||||||
pop %ebp
|
pop %ebp
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
#ifndef STAGE1_5
|
||||||
/* get_code_end() : return the address of the end of the code
|
/* get_code_end() : return the address of the end of the code
|
||||||
* This is here so that it can be replaced by asmstub.c.
|
* This is here so that it can be replaced by asmstub.c.
|
||||||
*/
|
*/
|
||||||
|
@ -775,6 +778,7 @@ ENTRY(get_code_end)
|
||||||
incl %eax
|
incl %eax
|
||||||
shll $2, %eax
|
shll $2, %eax
|
||||||
ret
|
ret
|
||||||
|
#endif /* ! STAGE1_5 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
|
|
|
@ -197,6 +197,42 @@ static struct builtin builtin_color =
|
||||||
" blinks."
|
" blinks."
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/* configfile */
|
||||||
|
static int
|
||||||
|
configfile_func (char *arg, int flags)
|
||||||
|
{
|
||||||
|
char *new_config = config_file;
|
||||||
|
|
||||||
|
/* Check if the file ARG is present. */
|
||||||
|
if (! grub_open (arg))
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
/* Copy ARG to CONFIG_FILE. */
|
||||||
|
while ((*new_config++ = *arg++) != 0)
|
||||||
|
;
|
||||||
|
|
||||||
|
#ifdef GRUB_UTIL
|
||||||
|
/* Force to load the configuration file. */
|
||||||
|
use_config_file = 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Restart cmain. */
|
||||||
|
cmain ();
|
||||||
|
|
||||||
|
/* Never reach here. */
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct builtin builtin_configfile =
|
||||||
|
{
|
||||||
|
"configfile",
|
||||||
|
configfile_func,
|
||||||
|
BUILTIN_CMDLINE,
|
||||||
|
"configfile FILE",
|
||||||
|
"Load the file FILE as the configuration file."
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/* debug */
|
/* debug */
|
||||||
static int
|
static int
|
||||||
|
@ -1173,7 +1209,7 @@ static struct builtin builtin_rootnoverify =
|
||||||
"rootnoverify",
|
"rootnoverify",
|
||||||
rootnoverify_func,
|
rootnoverify_func,
|
||||||
BUILTIN_CMDLINE,
|
BUILTIN_CMDLINE,
|
||||||
"rootnoverify device [hdbias]",
|
"rootnoverify DEVICE [HDBIAS]",
|
||||||
"Similar to `root=', but don't attempt to mount the partition. This"
|
"Similar to `root=', but don't attempt to mount the partition. This"
|
||||||
" is useful for when an OS is outside of the area of the disk that"
|
" is useful for when an OS is outside of the area of the disk that"
|
||||||
" GRUB can read, but setting the correct root partition is still"
|
" GRUB can read, but setting the correct root partition is still"
|
||||||
|
@ -1333,7 +1369,7 @@ static struct builtin builtin_unhide =
|
||||||
"unhide",
|
"unhide",
|
||||||
unhide_func,
|
unhide_func,
|
||||||
BUILTIN_CMDLINE | BUILTIN_MENU,
|
BUILTIN_CMDLINE | BUILTIN_MENU,
|
||||||
"unhide drive",
|
"unhide DRIVE",
|
||||||
"Unhide the drive DRIVE by subtracting 0x10 from the partition type."
|
"Unhide the drive DRIVE by subtracting 0x10 from the partition type."
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1354,7 +1390,7 @@ static struct builtin builtin_uppermem =
|
||||||
"uppermem",
|
"uppermem",
|
||||||
uppermem_func,
|
uppermem_func,
|
||||||
BUILTIN_CMDLINE,
|
BUILTIN_CMDLINE,
|
||||||
"uppermem kbytes",
|
"uppermem KBYTES",
|
||||||
"Force GRUB to ignore what it found during the autoprobe of the"
|
"Force GRUB to ignore what it found during the autoprobe of the"
|
||||||
" memory available to the system, and to use KBYTES as the number of"
|
" memory available to the system, and to use KBYTES as the number of"
|
||||||
" kilobytes of upper memory installed. Any address range maps of the"
|
" kilobytes of upper memory installed. Any address range maps of the"
|
||||||
|
@ -1368,6 +1404,7 @@ struct builtin *builtin_table[] =
|
||||||
&builtin_boot,
|
&builtin_boot,
|
||||||
&builtin_chainloader,
|
&builtin_chainloader,
|
||||||
&builtin_color,
|
&builtin_color,
|
||||||
|
&builtin_configfile,
|
||||||
&builtin_debug,
|
&builtin_debug,
|
||||||
&builtin_default,
|
&builtin_default,
|
||||||
&builtin_displaymem,
|
&builtin_displaymem,
|
||||||
|
|
|
@ -521,7 +521,7 @@ grub_isspace (int c)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifndef STAGE1_5
|
#if 0
|
||||||
int
|
int
|
||||||
grub_strncat (char *s1, const char *s2, int n)
|
grub_strncat (char *s1, const char *s2, int n)
|
||||||
{
|
{
|
||||||
|
@ -540,8 +540,9 @@ grub_strncat (char *s1, const char *s2, int n)
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef STAGE1_5
|
||||||
int
|
int
|
||||||
grub_strcmp (const char *s1, const char *s2)
|
grub_strcmp (const char *s1, const char *s2)
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,7 +28,9 @@
|
||||||
struct multiboot_info mbi;
|
struct multiboot_info mbi;
|
||||||
unsigned long saved_drive;
|
unsigned long saved_drive;
|
||||||
unsigned long saved_partition;
|
unsigned long saved_partition;
|
||||||
|
#ifndef STAGE1_5
|
||||||
unsigned long saved_mem_upper;
|
unsigned long saved_mem_upper;
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Error code stuff.
|
* Error code stuff.
|
||||||
|
@ -194,7 +196,9 @@ init_bios_info (void)
|
||||||
mbi.mem_upper = memtmp;
|
mbi.mem_upper = memtmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef STAGE1_5
|
||||||
saved_mem_upper = mbi.mem_upper;
|
saved_mem_upper = mbi.mem_upper;
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize other Multiboot Info flags.
|
* Initialize other Multiboot Info flags.
|
||||||
|
|
|
@ -407,7 +407,9 @@ extern int filemax;
|
||||||
extern struct multiboot_info mbi;
|
extern struct multiboot_info mbi;
|
||||||
extern unsigned long saved_drive;
|
extern unsigned long saved_drive;
|
||||||
extern unsigned long saved_partition;
|
extern unsigned long saved_partition;
|
||||||
|
#ifndef STAGE1_5
|
||||||
extern unsigned long saved_mem_upper;
|
extern unsigned long saved_mem_upper;
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Error variables.
|
* Error variables.
|
||||||
|
|
|
@ -249,13 +249,15 @@ defconfig =
|
||||||
* Exported globals here.
|
* Exported globals here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int imps_any_new_apics = 0;
|
static int imps_any_new_apics = 0;
|
||||||
|
#if 0
|
||||||
volatile int imps_release_cpus = 0;
|
volatile int imps_release_cpus = 0;
|
||||||
int imps_enabled = 0;
|
#endif
|
||||||
int imps_num_cpus = 1;
|
static int imps_enabled = 0;
|
||||||
unsigned imps_lapic_addr = ((unsigned) (&lapic_dummy)) - LAPIC_ID;
|
static int imps_num_cpus = 1;
|
||||||
unsigned char imps_cpu_apic_map[IMPS_MAX_CPUS];
|
static unsigned imps_lapic_addr = ((unsigned) (&lapic_dummy)) - LAPIC_ID;
|
||||||
unsigned char imps_apic_cpu_map[IMPS_MAX_CPUS];
|
static unsigned char imps_cpu_apic_map[IMPS_MAX_CPUS];
|
||||||
|
static unsigned char imps_apic_cpu_map[IMPS_MAX_CPUS];
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue