Index: branches/azimutz/CleanCut/doc/BootHelp.txt =================================================================== --- branches/azimutz/CleanCut/doc/BootHelp.txt (revision 336) +++ branches/azimutz/CleanCut/doc/BootHelp.txt (revision 337) @@ -40,7 +40,8 @@ ?norescan Leaves optical drive rescan mode. Additional useful command-line options: - config= Use an alternate Boot.plist file. + config= Use an alternate Boot.plist file. + Extensions= 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. Index: branches/azimutz/CleanCut/i386/libsaio/stringTable.c =================================================================== --- branches/azimutz/CleanCut/i386/libsaio/stringTable.c (revision 336) +++ branches/azimutz/CleanCut/i386/libsaio/stringTable.c (revision 337) @@ -26,8 +26,9 @@ * 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; @@ -632,6 +633,9 @@ // enable canOverride flag config->canOverride = true; + + // disable canOverride. Remove? + getBoolForKey(kCanOverrideKey, &config->canOverride, &bootInfo->bootConfig); break; } Index: branches/azimutz/CleanCut/i386/boot2/boot.h =================================================================== --- branches/azimutz/CleanCut/i386/boot2/boot.h (revision 336) +++ branches/azimutz/CleanCut/i386/boot2/boot.h (revision 337) @@ -62,7 +62,7 @@ #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 @@ -96,6 +96,7 @@ #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". Index: branches/azimutz/CleanCut/i386/boot2/drivers.c =================================================================== --- branches/azimutz/CleanCut/i386/boot2/drivers.c (revision 336) +++ branches/azimutz/CleanCut/i386/boot2/drivers.c (revision 337) @@ -163,6 +163,8 @@ long LoadDrivers( char * dirSpec ) { char dirSpecExtra[1024]; + const char *override_pathfolder = NULL; // path to folder + int fd = 0, len = 0; if ( InitDriverSupport() != 0 ) return 0; @@ -182,7 +184,16 @@ } 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/"); @@ -224,6 +235,8 @@ } } +success_fd: + if (gMKextName[0] != '\0') { verbose("LoadDrivers: Loading from [%s]\n", gMKextName);