Chameleon

Chameleon Commit Details

Date:2010-08-10 04:39:54 (13 years 8 months ago)
Author:Azimutz
Commit:337
Parents: 336
Message:Start "search algo" related stuff. This was what motivated me initially to look at Chameleon code with learning eyes. I had two problems: - the booter "always" checks selected volume for drivers, invalidating any drivers on rescue media. - the other is the Boot.plist override (loadOverrideConfig) that i was completely unaware of, until i checked the code. So, this was the first stuff that i came up with: - CanOverride=n disables overriding of the default Boot.plist (it doesn't stop the file from loading). - Extensions=/path-to-folder/ loads drivers from an alternate folder. The drives override key only got this format after i found the dsdt search also on search_and_get_acpi_fd; when i first added it was when i found that the selected volume drivers were always loaded :)
Changes:
M/branches/azimutz/CleanCut/i386/libsaio/stringTable.c
M/branches/azimutz/CleanCut/i386/boot2/drivers.c
M/branches/azimutz/CleanCut/doc/BootHelp.txt
M/branches/azimutz/CleanCut/i386/boot2/boot.h

File differences

branches/azimutz/CleanCut/doc/BootHelp.txt
4040
4141
4242
43
43
44
4445
4546
4647
?norescan Leaves optical drive rescan mode.
Additional useful command-line options:
config=<file> Use an alternate Boot.plist file.
config=<file> Use an alternate Boot.plist file.
Extensions=<folder> Use an alternate folder with drivers, kext or mkext.
Options useful in the com.apple.Boot.plist file:
Wait=Yes|No Prompt for a key press before starting the kernel.
branches/azimutz/CleanCut/i386/libsaio/stringTable.c
2626
2727
2828
29
2930
30
31
3132
3233
3334
......
632633
633634
634635
636
637
638
635639
636640
637641
* All rights reserved.
*/
#include "boot.h"
#include "bootstruct.h"
#include "libsaio.h"
#include "libsaio.h" //Azi: this is included on boot.h - just a reminder.
#include "xml.h"
extern char *Language;
// enable canOverride flag
config->canOverride = true;
// disable canOverride. Remove?
getBoolForKey(kCanOverrideKey, &config->canOverride, &bootInfo->bootConfig);
break;
}
branches/azimutz/CleanCut/i386/boot2/boot.h
6262
6363
6464
65
65
6666
6767
6868
......
9696
9797
9898
99
99100
100101
101102
#define kGUIKey"GUI"// boot.c
#define kBootBannerKey"Boot Banner"// options.c
#define kWaitForKeypressKey"Wait"// boot.c
/* AsereBLN: added the other keys */
#define kExtensionsKey"kext"// drivers.c
#define kUseAtiROM"UseAtiROM"// ati.c
#define kWake"Wake"// boot.c
#define kForceWake"ForceWake"// boot.c
#define kEHCIhard"EHCIhard"// usb.c
#define kDefaultPartition"Default Partition"// sys.c
#define kMD0Image"md0"// ramdisk.h
#define kCanOverrideKey"CanOverride"// stringTable.c
/*
* Flags to the booter and/or kernel - these end with "Flag".
branches/azimutz/CleanCut/i386/boot2/drivers.c
163163
164164
165165
166
167
166168
167169
168170
......
182184
183185
184186
185
187
188
189
190
191
192
193
194
195
196
186197
187198
188199
......
224235
225236
226237
238
239
227240
228241
229242
long LoadDrivers( char * dirSpec )
{
char dirSpecExtra[1024];
const char *override_pathfolder = NULL; // path to folder
intfd = 0, len = 0;
if ( InitDriverSupport() != 0 )
return 0;
}
else if ( gBootFileType == kBlockDeviceType )
{
// First try to load Extra extensions from the ramdisk if isn't aliased as bt(0,0).
// Take in account user overriding.
if (getValueForKey(kExtensionsKey, &override_pathfolder, &len, &bootInfo->bootConfig))
{
// Specify a path to a folder, ending with / e.g. /Extra/testkext/
strcpy(dirSpecExtra, override_pathfolder);
fd = FileLoadDrivers(dirSpecExtra, 0);
if (fd >= 0) goto success_fd;
}
// First try to load Extra extensions from the ramdisk if isn't aliased as bt(0,0).
if (gRAMDiskVolume && !gRAMDiskBTAliased)
{
strcpy(dirSpecExtra, "rd(0,0)/Extra/");
}
}
success_fd:
if (gMKextName[0] != '\0')
{
verbose("LoadDrivers: Loading from [%s]\n", gMKextName);

Archive Download the corresponding diff file

Revision: 337