Index: branches/azimutz/CleanCut/i386/boot2/boot.c =================================================================== --- branches/azimutz/CleanCut/i386/boot2/boot.c (revision 359) +++ branches/azimutz/CleanCut/i386/boot2/boot.c (revision 360) @@ -66,7 +66,6 @@ //char *gPlatformName = gCacheNameAdler; disabled char gRootDevice[512]; char gMKextName[512]; -char gMacOSVersion[8]; bool gEnableCDROMRescan; bool gScanSingleDrive; @@ -346,7 +345,8 @@ bool tryresumedefault; bool forceresume; - config_file_t systemVersion; // system.plist of booting partition + config_file_t systemVersion; // system.plist of booting partition + char osxVersion[8]; // replaces gMacOSVersion here, for now. // additional variable for testing alternate kernel image locations on boot helper partitions. char bootFileSpec[512]; @@ -359,6 +359,18 @@ status = getBootOptions(firstRun); firstRun = false; if (status == -1) continue; + + //Azi: doing this earlier to get the verbose from loadOverrideConfig. + // Draw background, turn off any GUI elements and update VRAM. + if ( bootArgs->Video.v_display == GRAPHICS_MODE ) + { + drawBackground(); // order matters!! + gui.devicelist.draw = false; // Needed when the verbose "flips" the screen. + gui.bootprompt.draw = false; // ? + gui.menu.draw = false; // ? + gui.infobox.draw = false; // Enter doesn't work with this drawn; most probably it's not needed!? + updateVRAM(); + } status = processBootOptions(); // Status==1 means to chainboot @@ -381,30 +393,17 @@ } // Other status (e.g. 0) means that we should proceed with boot. - - if( bootArgs->Video.v_display == GRAPHICS_MODE ) - drawBackground(); - // Found and loaded a config file. Proceed with boot. - - // Turn off any GUI elements - if( bootArgs->Video.v_display == GRAPHICS_MODE ) - { - gui.devicelist.draw = false; - gui.bootprompt.draw = false; - gui.menu.draw = false; - gui.infobox.draw = false; - drawBackground(); - updateVRAM(); - } + //Azi: still calling this here. The call on processBootOptions() gets hidden from verbose and + // for some reason gMacOSVersion doesn't get initialized on boot.c like on the others. Later... // Find out which version mac os we're booting. if (!loadConfigFile("System/Library/CoreServices/SystemVersion.plist", &systemVersion)) { if (getValueForKey(kProductVersion, &val, &len, &systemVersion)) { // getValueForKey uses const char for val // so copy it and trim - strncpy(gMacOSVersion, val, MIN(len, 4)); - gMacOSVersion[MIN(len, 4)] = '\0'; + strncpy(osxVersion, val, MIN(len, 4)); + osxVersion[MIN(len, 4)] = '\0'; } } @@ -493,7 +492,7 @@ (gMKextName[0] == '\0') && (gBootKernelCacheFile[0] != '\0')); - verbose("Loading Darwin %s\n", gMacOSVersion); + verbose("Loading Darwin %s\n", osxVersion); if (trycache) do { Index: branches/azimutz/CleanCut/i386/boot2/options.c =================================================================== --- branches/azimutz/CleanCut/i386/boot2/options.c (revision 359) +++ branches/azimutz/CleanCut/i386/boot2/options.c (revision 360) @@ -29,6 +29,7 @@ #include "gui.h" #include "embedded.h" #include "pci.h" +#include "sl.h" static bool shouldboot = false; @@ -39,6 +40,7 @@ //extern int menucount; extern int gDeviceCount; +char gMacOSVersion[8]; int selectIndex = 0; MenuItem * menuItems = NULL; @@ -1129,6 +1131,8 @@ const char * cp = gBootArgs; const char * val = 0; const char * kernel; + const char *value; + int len; int cnt; int userCnt; int cntRemaining; @@ -1137,6 +1141,7 @@ bool uuidSet = false; char * configKernelFlags; char * valueBuffer; + config_file_t systemVersion; valueBuffer = malloc(VALUE_SIZE); @@ -1170,6 +1175,19 @@ else return -1; + // Needed to enable search for override Boot.plist on OS specific folders + // from loadOverrideConfig(). Find out which version mac os we're booting. + if (!loadConfigFile("/System/Library/CoreServices/SystemVersion.plist", &systemVersion)) + { + if (getValueForKey(kProductVersion, &value, &len, &systemVersion)) + { + // getValueForKey uses const char for val + // so copy it and trim + strncpy(gMacOSVersion, value, MIN(len, 4)); + gMacOSVersion[MIN(len, 4)] = '\0'; + } + } // doesn't print to screen here! + //Azi: implemented at loadOverrideConfig. // Load config table specified by the user, or use the default. //if (!getValueForBootKey(cp, "config", &val, &cnt)) {