Chameleon

Chameleon Commit Details

Date:2010-08-21 05:24:17 (8 years 10 months ago)
Author:Azimutz
Commit:402
Parents: 401
Message:Trunk it, rev 395.
Changes:
M/branches/azimutz/CleanCut/i386/boot2/options.c
M/branches/azimutz/CleanCut/doc/BootHelp.txt
M/branches/azimutz/CleanCut/i386/libsaio/disk.c
M/branches/azimutz/CleanCut/i386/boot2/boot.h

File differences

branches/azimutz/CleanCut/doc/BootHelp.txt
1414
1515
1616
17
17
18
1819
19
20
2021
2122
2223
kernel: kernel name (e.g. "mach_kernel" - must be in "/" )
flags: -v (verbose) -s (single user mode) -x (safe mode)
flags: -v (verbose) -s (single user mode)
-x (safe mode) -f (ignore caches)
-F (ignore "Kernel Flags" specified in boot configuration file)
32 (i386 arch) -legacy (no 64 bit apps - kernel flag)
32 (i386 arch) -legacy (no 64 bit apps - kernel flag)
64 (x86_64 arch)
"Graphics Mode"="WIDTHxHEIGHTxDEPTH" (e.g. "1024x768x32")
branches/azimutz/CleanCut/i386/libsaio/disk.c
14481448
14491449
14501450
1451
1452
1453
1454
1455
1456
1451
1452
1453
1454
1455
14571456
14581457
14591458
void rescanBIOSDevice(int biosdev)
{
struct DiskBVMap *oldMap = diskResetBootVolumes(biosdev);
CacheReset();
diskFreeMap(oldMap);
oldMap = NULL;
scanBootVolumes(biosdev, 0);
struct DiskBVMap *oldMap = diskResetBootVolumes(biosdev);
CacheReset();
diskFreeMap(oldMap);
oldMap = NULL;
scanBootVolumes(biosdev, 0);
}
struct DiskBVMap* diskResetBootVolumes(int biosdev)
branches/azimutz/CleanCut/i386/boot2/boot.h
101101
102102
103103
104
104105
105106
106107
*/
#define kVerboseModeFlag"-v"// options.c
#define kSafeModeFlag"-x"// options.c
#define kIgnoreCachesFlag"-f"// options.c
#define kIgnoreBootFileFlag"-F"// options.c
#define kSingleUserModeFlag"-s"// options.c
#define kArchI386Flag"32"// boot.c
branches/azimutz/CleanCut/i386/boot2/options.c
184184
185185
186186
187
187
188188
189189
190190
191191
192192
193
194
195
196
197
198
199
200
201
202
193203
194204
195205
......
436446
437447
438448
439
440
449
441450
442
451
443452
444453
445454
446
447
455
448456
449
457
450458
451459
452460
453
454
461
455462
456463
457464
......
691698
692699
693700
694
695
696
697
701
702
703
698704
699705
706
707
708
700709
701710
702711
......
726735
727736
728737
738
739
740
741
742
743
744
745
729746
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
747
748
749
753750
754
751
752
753
754
755
756
757
758
755759
756760
757761
......
13301334
13311335
13321336
1337
1338
1339
1340
13331341
13341342
13351343
{
gBootArgsPtr = gBootArgs;
memset(gBootArgs, '\0', BOOT_STRING_LEN);
if (bootArgs->Video.v_display == GRAPHICS_MODE) {
clearGraphicBootPrompt();
}
}
static void addBootArg(const char * argStr)
{
if ( (gBootArgsPtr + strlen(argStr) + 1) < gBootArgsEnd)
{
*gBootArgsPtr++ = ' ';
strcat(gBootArgs, argStr);
gBootArgsPtr += strlen(argStr);
}
}
//==========================================================================
static void showBootPrompt(int row, bool visible)
case BOOT_VERBOSE:
gVerboseMode = true;
gBootMode = kBootModeNormal;
*gBootArgsPtr++ = '-';
*gBootArgsPtr++ = 'v';
addBootArg(kVerboseModeFlag);
break;
case BOOT_IGNORECACHE:
gVerboseMode = false;
gBootMode = kBootModeNormal;
*gBootArgsPtr++ = '-';
*gBootArgsPtr++ = 'x';
addBootArg(kIgnoreCachesFlag);
break;
case BOOT_SINGLEUSER:
gVerboseMode = true;
gBootMode = kBootModeNormal;
*gBootArgsPtr++ = '-';
*gBootArgsPtr++ = 's';
addBootArg(kSingleUserModeFlag);
break;
}
}
// ensure we're in graphics mode if gui is setup
if (gui.initialised) {
if (bootArgs->Video.v_display == VGA_TEXT_MODE) {
setVideoMode(GRAPHICS_MODE, 0);
}
if (gui.initialised && bootArgs->Video.v_display == VGA_TEXT_MODE)
{
setVideoMode(GRAPHICS_MODE, 0);
}
// Clear command line boot arguments
clearBootArgs();
// Allow user to override default timeout.
if (multiboot_timeout_set) {
timeout = multiboot_timeout;
gBootMode |= kBootModeSafe;
}
// Checking user pressed keys
bool f8press = false, spress = false, vpress = false;
while (readKeyboardStatus()) {
key = bgetc ();
if (key == 0x4200) f8press = true;
if ((key & 0xff) == 's' || (key & 0xff) == 'S') spress = true;
if ((key & 0xff) == 'v' || (key & 0xff) == 'V') vpress = true;
}
// If user typed F8, abort quiet mode, and display the menu.
{
bool f8press = false, spress = false, vpress = false;
int key;
while (readKeyboardStatus()) {
key = bgetc ();
if (key == 0x4200) f8press = true;
if ((key & 0xff) == 's' || (key & 0xff) == 'S') spress = true;
if ((key & 0xff) == 'v' || (key & 0xff) == 'V') vpress = true;
}
if (f8press) {
gBootMode &= ~kBootModeQuiet;
timeout = 0;
}
if ((gBootMode & kBootModeQuiet) && firstRun && vpress && (gBootArgsPtr + 3 < gBootArgsEnd)) {
*(gBootArgsPtr++) = ' ';
*(gBootArgsPtr++) = '-';
*(gBootArgsPtr++) = 'v';
}
if ((gBootMode & kBootModeQuiet) && firstRun && spress && (gBootArgsPtr + 3 < gBootArgsEnd)) {
*(gBootArgsPtr++) = ' ';
*(gBootArgsPtr++) = '-';
*(gBootArgsPtr++) = 's';
}
if (f8press) {
gBootMode &= ~kBootModeQuiet;
timeout = 0;
}
clearBootArgs();
// If user typed 'v' or 'V', boot in verbose mode.
if ((gBootMode & kBootModeQuiet) && firstRun && vpress) {
addBootArg(kVerboseModeFlag);
}
// If user typed 's' or 'S', boot in single user mode.
if ((gBootMode & kBootModeQuiet) && firstRun && spress) {
addBootArg(kSingleUserModeFlag);
}
if (bootArgs->Video.v_display == VGA_TEXT_MODE) {
setCursorPosition(0, 0, 0);
gBootMode = ( getValueForKey( kSafeModeFlag, &val, &cnt, &bootInfo->bootConfig ) ) ?
kBootModeSafe : kBootModeNormal;
if ( getValueForKey( kIgnoreCachesFlag, &val, &cnt, &bootInfo->bootConfig ) ) {
gBootMode = kBootModeSafe;
}
}
if ( getValueForKey( kMKextCacheKey, &val, &cnt, &bootInfo->bootConfig ) )

Archive Download the corresponding diff file

Revision: 402