add stage2 id

This commit is contained in:
okuji 1999-06-27 08:34:46 +00:00
parent 6336679de2
commit fc6fa9d5e2
5 changed files with 49 additions and 5 deletions

View file

@ -1,3 +1,22 @@
1999-06-27 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
* stage2/shared.h (STAGE2_STAGE2_ID): New macro.
(STAGE2_VER_STR_OFFS): Set to 0xd.
(STAGE2_ID_STAGE2): New macro.
(STAGE2_ID_FFS_STAGE1_5): Likewise.
(STAGE2_ID_E2FS_STAGE1_5): Likewise.
(STAGE2_ID_FAT_STAGE1_5): Likewise.
(STAGE2_ID) [!STAGE1_5]: Defined as STAGE2_ID_STAGE2.
(STAGE2_ID) [STAGE1_5] [FSYS_FFS]: Defined as
STAGE2_ID_FFS_STAGE1_5.
(STAGE2_ID) [STAGE1_5] [FSYS_EXT2FS]: Defined as
STAGE2_ID_STAGE1_5.
(STAGE2_ID) [STAGE1_5] [FSYS_FAT]: Defined as
STAGE2_ID_FAT_STAGE1_5.
(COMPAT_VERSION_MINOR): Set to 1.
* stage2/asm.S (stage2_id): New variable.
* stage1/stage1.S: Change the minor version to 1.
1999-06-27 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp> 1999-06-27 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
* configure.in (CFLAGS): Set to "-g", since only this flag is * configure.in (CFLAGS): Set to "-g", since only this flag is

View file

@ -1385,7 +1385,7 @@ entry is an offset number):
This is the major version byte (should be 2). This is the major version byte (should be 2).
@item @dfn{minor version} (0x1bd) @item @dfn{minor version} (0x1bd)
This is the minor version byte (should be 0). This is the minor version byte (should be 1).
@item @dfn{stage2 start address} (0x1b8) @item @dfn{stage2 start address} (0x1b8)
This is the data for the @code{ljmp} command to the starting address of This is the data for the @code{ljmp} command to the starting address of
@ -1453,7 +1453,10 @@ If a @dfn{stage1.5} is being used, it will pass its own
@dfn{install_partition} to any @dfn{stage2} it loads, therefore @dfn{install_partition} to any @dfn{stage2} it loads, therefore
overwriting the one present in the @dfn{stage2}. overwriting the one present in the @dfn{stage2}.
@item @dfn{version_string} (0xc) @item @dfn{stage2_id} (0xc)
This is the @dfn{stage1.5} or @dfn{stage2} identifier.
@item @dfn{version_string} (0xd)
This is the @dfn{stage1.5} or @dfn{stage2} version string. It isn't This is the @dfn{stage1.5} or @dfn{stage2} version string. It isn't
meant to be changed, simply easy to find. meant to be changed, simply easy to find.

View file

@ -444,7 +444,7 @@ bootit:
* *
* DO NOT MOVE THIS!!! * DO NOT MOVE THIS!!!
*/ */
.byte 2, 0 .byte 2, 1
/* /*
* This is where an MBR would go if on a hard disk. The code * This is where an MBR would go if on a hard disk. The code

View file

@ -61,6 +61,8 @@ _start:
VARIABLE(install_partition) VARIABLE(install_partition)
.long 0x020000 .long 0x020000
VARIABLE(stage2_id)
.byte STAGE2_ID
VARIABLE(version_string) VARIABLE(version_string)
.string VERSION .string VERSION
VARIABLE(config_file) VARIABLE(config_file)

View file

@ -117,7 +117,7 @@ extern char *grub_scratch_mem;
*/ */
#define COMPAT_VERSION_MAJOR 2 #define COMPAT_VERSION_MAJOR 2
#define COMPAT_VERSION_MINOR 0 #define COMPAT_VERSION_MINOR 1
#define COMPAT_VERSION ((COMPAT_VERSION_MINOR<<8)|COMPAT_VERSION_MAJOR) #define COMPAT_VERSION ((COMPAT_VERSION_MINOR<<8)|COMPAT_VERSION_MAJOR)
#define STAGE1_VER_MAJ_OFFS 0x1bc #define STAGE1_VER_MAJ_OFFS 0x1bc
@ -127,8 +127,28 @@ extern char *grub_scratch_mem;
#define STAGE2_VER_MAJ_OFFS 0x6 #define STAGE2_VER_MAJ_OFFS 0x6
#define STAGE2_INSTALLPART 0x8 #define STAGE2_INSTALLPART 0x8
#define STAGE2_VER_STR_OFFS 0xc #define STAGE2_STAGE2_ID 0xc
#define STAGE2_VER_STR_OFFS 0xd
/* Stage 2 identifiers */
#define STAGE2_ID_STAGE2 0
#define STAGE2_ID_FFS_STAGE1_5 1
#define STAGE2_ID_E2FS_STAGE1_5 2
#define STAGE2_ID_FAT_STAGE1_5 3
#ifndef STAGE1_5
#define STAGE2_ID STAGE2_ID_STAGE2
#else
#if defined(FSYS_FFS)
#define STAGE2_ID STAGE2_ID_FFS_STAGE1_5
#elif defined(FSYS_EXT2FS)
#define STAGE2_ID STAGE2_ID_E2FS_STAGE1_5
#elif defined(FSYS_FAT)
#define STAGE2_ID STAGE2_ID_FAT_STAGE1_5
#else
#error "unknown Stage 2"
#endif
#endif
/* /*
* defines for use when switching between real and protected mode * defines for use when switching between real and protected mode