Jump to content

How to boost the OS X boot process...


1,027 posts in this topic

Recommended Posts

BTW - I've solved my KP issue after shut down by using boot1h and boot0 from chameleon rc4 - previously using chameleon rc5. Silly me!

 

However I still get the AppleACPIExpert KP if I clear ALL caches then reboot.

It would appear Revolution isn't generating system mkext properly for me.

 

As stated before numDrivers (from debug) with mkext generated under chameleon, then reboot with Revolution, reads 313.

Having cleared caches in single user mode using 'applejack AUTO', the following boot with Revolution shows numDrivers = 154 and I get AppleACPI based KP.

 

D

Link to comment
Share on other sites

BTW - I've solved my KP issue after shut down by using boot1h and boot0 from chameleon rc4 - previously using chameleon rc5. Silly me!

I've just resolved my ACPI error. Could have sworn that my BIOS is not ACPI rev 1.0. But seems it may be. Set flag in Revo config to use ACPI-1.0, and now all is fine, some tables are patched. Can boot with or w/o use of caches.

Just have to see if I can get the 4870 going w/o needing to include GFX bin "image" (as grabbed from a Chameleon boot) as that's making the EFI DP, and hence boot file, huge!

 

However I still get the AppleACPIExpert KP if I clear ALL caches then reboot.

It would appear Revolution isn't generating system mkext properly for me.

Erm, thought that was "made" by/under OSX and you transfer it to the USB root. If you run debug drivers, do you see it's loading the mkexts (for /E/E and main system boot cache), means load status=3?

 

As stated before numDrivers (from debug) with mkext generated under chameleon, then reboot with Revolution, reads 313.

Having cleared caches in single user mode using 'applejack AUTO', the following boot with Revolution shows numDrivers = 154 and I get AppleACPI based KP.

Not very sure about my understanding of this, but I know you only need around 100 high level kexts for prelink kernel to work, so higher than that number when including the "plugins".

My "system" Extensions.mkext shows 170 kexts when unpacked (ie: qty includes "plugins"), which also includes a bunch of 3rd party ones.

Link to comment
Share on other sites

I've just resolved my ACPI error. Could have sworn that my BIOS is not ACPI rev 1.0. But seems it may be. Set flag in Revo config to use ACPI-1.0, and now all is fine, some tables are patched. Can boot with or w/o use of caches.

Just have to see if I can get the 4870 going w/o needing to include GFX bin "image" (as grabbed from a Chameleon boot) as that's making the EFI DP, and hence boot file, huge!

 

 

Erm, thought that was "made" by/under OSX and you transfer it to the USB root. If you run debug drivers, do you see it's loading the mkexts (for /E/E and main system boot cache), means load status=3?

 

 

Not very sure about my understanding of this, but I know you only need around 100 high level kexts for prelink kernel to work, so higher than that number when including the "plugins".

My "system" Extensions.mkext shows 170 kexts when unpacked (ie: qty includes "plugins"), which also includes a bunch of 3rd party ones.

 

I'm not booting from USB. Revolution is installed to single HDD.

 

I don't know if the difference between the number of kexts being loaded when booting with caches cleared and when booting with system mkext means anything either. I just noticed the obvious difference (313/ 154).

 

EDIT - However surely any bootloader (and I assume Revolution too.) should be able to dynamically create a system mkext, where one doesn't exist. i.e. without having to load a prebuilt mkext!

 

D

Link to comment
Share on other sites

Thanks FKA!

Where can I set #define LOAD_DSDT_TABLE_FROM_EXTRA_ACPI and more other options ? In settings-template.h, setting.h or another place?

 

Looking for in settings-template.h I saw:

 

#define STATIC_MAC_PRODUCT_NAME				"MacBookPro6,1"

 

If I change "MacBookPro6,1" in "MacPro3,1" Can I emulate a MacPro3,1 without this information in smbios.plist ??

Link to comment
Share on other sites

...However surely any bootloader (and I assume Revolution too.) should be able to dynamically create a system mkext, where one doesn't exist. i.e. without having to load a prebuilt mkext!

If no mkext cache exists (or not loaded due to failing some checks) then the individual kexts are loaded "one by one".

For -x, AFAIK mkexts are not loaded, and individual kexts are loaded, except those tagged as SafeBoot.

 

As you have Revo loaded to your OX HD, then I presume that the "system" mkext in /S/L/C/c.a.k.c/S/ is used, which as we know is generated automatically by OSX, or can be manually forced/rebuilt etc. If that's missing/corrupy then the main /S/L/E kexts used as would be the case for Chameleon if ignoring caches. (Similarly for kexts in /E/E).

 

As I'm still using a USB stick for Revo, I have to copy over the appropriate kexts into the appropriate folder structure on the USB.

Link to comment
Share on other sites

As you have Revo loaded to your OX HD, then I presume that the "system" mkext in /S/L/C/c.a.k.c/S/ is used, which as we know is generated automatically by OSX, or can be manually forced/rebuilt etc. If that's missing/corrupy then the main /S/L/E kexts used as would be the case for Chameleon if ignoring caches. (Similarly for kexts in /E/E).

 

exactly and for me when there is no mkext in /S/L/C/c/S and Revolution calls to load kexts from /S/L/E something goes wrong.

 

D

 

Thanks FKA!

Where can I set #define LOAD_DSDT_TABLE_FROM_EXTRA_ACPI and more other options ? In settings-template.h, setting.h or another place?

 

Looking for in settings-template.h I saw:

 

#define STATIC_MAC_PRODUCT_NAME				"MacBookPro6,1"

 

If I change "MacBookPro6,1" in "MacPro3,1" Can I emulate a MacPro3,1 without this information in smbios.plist ??

 

settings.h - and yes. I suggest you use projectrevolution!

 

D

Link to comment
Share on other sites

Good evening gentlemen,

 

Please keep your eye on the github.com/RevoGirl tree because the kext loading error bug should soon be a thing from the past. You may in fact like to join me and the others there for on-to-one conversations, to speed up the process.

 

p.s. I'm sorry for you buoo. That you had to struggle like this. I thought that I was unable to post here in a normal fashion. Making it practical impossible for me to help anyone here, but things have soon improved it seems.

 

Thank you,

 

-Sam.

Link to comment
Share on other sites

I removed all old posts because I don't want people to use an older version, mixed with newer code. This will get people confused. They may also have thought, after reading the old posts, that they have tons of work to do before it works. We don't want that. A new WiKi will include tips and everything they need to know.

 

Thanks you for your time and corporation.

Link to comment
Share on other sites

exactly and for me when there is no mkext in /S/L/C/c/S and Revolution calls to load kexts from /S/L/E something goes wrong.

Hi FKA. I think to have located the problem. Please open boot2/drivers.c and replace function loadDrivers with this one:

long loadDrivers(char * dirSpec)
{
if (initDriverSupport() != STATE_SUCCESS)
{
	return -1;
}

bool shouldLoadMKext = ((gBootMode & kBootModeSafe) == 0);

_DRIVERS_DEBUG_DUMP("shouldLoadMKext: %s\n", shouldLoadMKext ? "true" : "false");

// Load: /System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mkext 
// or the kexts in: /System/Library/Extensions/ when required (see note above).
if (shouldLoadMKext && (loadMultiKext(gPlatform.KernelCachePath) == STATE_SUCCESS))
{
	_DRIVERS_DEBUG_DUMP("loadMultiKext(System) OK.\n");
}
else if (loadKexts("/System/Library/Extensions", 0) == STATE_SUCCESS)
{
	_DRIVERS_DEBUG_DUMP("loadKexts(System) OK.\n");
}

// Load: /Extra/Extensions.mkext or the kexts in: /Extra/Extensions/
// when required (in safe boot mode and when there is no Extensions.mkext).
if (shouldLoadMKext && (loadMultiKext("/Extra") == STATE_SUCCESS))
{
	_DRIVERS_DEBUG_DUMP("loadMultiKext(Extra) OK.\n");
}
else if (loadKexts("/Extra/Extensions", 0) == STATE_SUCCESS)
{
	_DRIVERS_DEBUG_DUMP("loadKexts(Extra) OK.\n");
}

matchLibraries();
loadMatchedModules();

_DRIVERS_DEBUG_SLEEP(5);

return STATE_SUCCESS;
}

This should work for you. Please confirm. Thank you for testing this.

Link to comment
Share on other sites

Thanks :)

 

I Downloaded the Sources but I have a problem when I use RevStart.command

 

I created the RevoBoot- folder and the sub folders:

 

RevoBoot-/i386/config/ACPI

RevoBoot-/i386/config/SMBIOS

RevoBoot-/i386/config/EFI

 

now I haven't the problem "folder not found" anymore. Ok!

 

 

Now I clic on RevStart.command, I chose number 2 (config), than I set settings.h (#define DEBUG_ACPI 1)

and I close xcode.

Now I have:

 

3 new folders ACPI - STATIC - Snow_Leopard_ISO

3 data.h in RevoBoot-/i386/config/ACPI - EFI - SMBIOS

 

settings.h in RevoBoot-/i386/config

 

ok!

 

 

Where is the Makefile?

 

Advanced User!!, Auto MakeMedia Engaged!!

Using Your Project RevoBoot Extensions Folder

Compiling /Users/Francesco/Downloads/STLVNUB-ProjectRevo-37894eb/RevoBoot-...

make: *** No targets specified and no makefile found. Stop.

COMPILE ERROR!!!

I Will Wait Till You Fix The Problem

PRESS ENTER WHEN DONE!!!

 

 

help

Link to comment
Share on other sites

I didn't compile 'cuz I don't find the Makefile in the folder, and the RevStart.command doesn't find its like me.

I'm sorry if I'm a noob.

 

Hay,

 

There's no makefile in the ProjectRevolution folder.

RevStart will be looking for the makefile in the 'Revolution-Release-XXX' folder or whatever you have called the folder containing the revolution source code, I presume you've copied this into the ProjectRevolution folder?

 

From the RevStart Script does: "Source folder name: xx xx xx x x " show the correct path?

 

D

Link to comment
Share on other sites

Place the Folder

RevoGirl-RevoBoot-85ac257 Or whatever AS IT IS NAMED into ProjectRevo

Run RevStart and type in

85ac257

 

The basic idea is you can have multiple Source folders and change between them

by typing in JUST the above number.

Hi STLVNUB,

 

Can you please change your script a little bit. Make it use: RevoBoot-version/revision [extracted from the files] as directory name instead of this weird looking 85ac257 number?

 

p.s. Can one of the mods please fix/restore my name, because I cannot do that for the next... what was it? 60 days?

Link to comment
Share on other sites

Hi SG

 

I'm working today, will try this out later.

 

Cheers

D

 

Evening SG

 

Sorry but no go.

Caches are now rebuilt OK from: caches cleared in single user mode > boot revolution

But after shutdown, on reboot I get the same AppleACPIExpert KP or freeze just before it's loaded.

 

This is with the code you posted added to source taken from git this afternoon.

 

D

Link to comment
Share on other sites

Thanks!! :(

I Compiled, but the boot failed after several screenshots. Now I have to set the settings.h right!

FKA, your mobo mounts a P45 chipset like mine, may you show me your settings.h ?

And for speedstep, does the Revolution enabled and automatic P-States & C-States generation?

Link to comment
Share on other sites

here's my settings:

 

#define ACPI_10_SUPPORT						1

#define PATCH_ACPI_TABLE_DATA				1	

#define USE_STATIC_ACPI_BASE_ADDRESS		1	

#define STATIC_APIC_TABLE_INJECTION			0	
#define STATIC_APIC2_TABLE_INJECTION		0
#define STATIC_DSDT_TABLE_INJECTION			1	

#define STATIC_ECDS_TABLE_INJECTION			0	
#define STATIC_FACS_TABLE_INJECTION			0	

#define STATIC_HPET_TABLE_INJECTION			0	


#define STATIC_SSDT_TABLE_INJECTION			0	


#define STATIC_SSDT_GPU_TABLE_INJECTION		0	

#define STATIC_SSDT_PR_TABLE_INJECTION		0	
#define STATIC_SSDT_SATA_TABLE_INJECTION	0	

#define STATIC_SSDT_USB_TABLE_INJECTION		0	

#define LOAD_DSDT_TABLE_FROM_EXTRA_ACPI		0	
#define LOAD_SSDT_TABLE_FROM_EXTRA_ACPI		0	

#define LOAD_EXTRA_ACPI_TABLES				(LOAD_DSDT_TABLE_FROM_EXTRA_ACPI || LOAD_SSDT_TABLE_FROM_EXTRA_ACPI)


#define DROP_SSDT_TABLES					0	
#define REPLACE_EXISTING_SSDT_TABLES		0	

#define	APPLE_STYLE_ACPI					0	
#define DEBUG_ACPI							0	
#if USE_STATIC_ACPI_BASE_ADDRESS
#define	STATIC_ACPI_BASE_ADDRESS		0x000f9770
#endif

#define PRE_LINKED_KERNEL_SUPPORT			1	

#define MUST_ENABLE_A20						0

#define SAFE_MALLOC							0

#define DEBUG_BOOT							0	

#define USE_STATIC_CPU_DATA					0	
#define CPU_VENDOR_ID						CPU_VENDOR_INTEL // CPU_VENDOR_AMD

#define DEBUG_CPU							0	

#define EFI_SYSTEM_PARTITION_SUPPORT		0	
#define LEGACY_BIOS_READ_SUPPORT			0	

#define DEBUG_DISK							0	

//------------------------------------------------------------- DRIVERS.C -------------------------------------------------------------------


#define DEBUG_DRIVERS						0	


//---------------------------------------------------------------- EFI.C -------------------------------------------------------------------


#define APPLE_STYLE_EFI						1	

#define INJECT_EFI_DEVICE_PROPERTIES		1	

#define EFI_64_BIT							1	
#define STATIC_MODEL_NAME					{ 'i', 'M', 'a', 'c', '9', ',', '1' }

#define STATIC_SMSERIALNUMBER				"xxxxxxxxxxxx"

#define STATIC_SYSTEM_SERIAL_NUMBER			{ 'xxxxxxxxxxxxxxxxxxxxxx }

#define STATIC_SYSTEM_ID					{ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx }

#define DEBUG_EFI							0	

#define EFI_DEBUG_MODE						0	

#define USE_STATIC_SMBIOS_DATA				1	


#define OVERRIDE_DYNAMIC_MEMORY_DETECTION	0	

#define OVERRIDE_DYNAMIC_PRODUCT_DETECTION	0	

#if OVERRIDE_DYNAMIC_PRODUCT_DETECTION
#define STATIC_SMBIOS_MODEL_ID			MACBOOKPRO	
#endif

#define DEBUG_SMBIOS						0	

 

If you had speedstep enabled when you ran revstart then that data should be in either your static SSDT or DSDT data.

 

D

Link to comment
Share on other sites

If you had speedstep enabled when you ran revstart then that data should be in either your static SSDT or DSDT data.

D

 

In ACPI folder I saw SSDT and SSDT-1, they are SScode. To enable these at the boot, will I have to set #define STATIC_SSDT_PR_TABLE_INJECTION 1 ?

 

However in my daily Extra folder I don't use SSDTs but only stripped DSDT without SScode.

If I add SS code to it, will I need to set only :

 

#define ACPI_10_SUPPORT	1
#define PATCH_ACPI_TABLE_DATA			1
#define STATIC_DSDT_TABLE_INJECTION	1
#define LOAD_DSDT_TABLE_FROM_EXTRA_ACPI	1

 

??

 

My settings.h is longest than yours, I change two informations:

 

#define DEBUG_PLATFORM 1

 

#define TARGET_OS SNOW_LEOPARD

 

#define STATIC_MAC_PRODUCT_NAME "MacPro3,1"

 

#if USE_STATIC_SMBIOS_DATA

// Do nothing.

#elif OVERRIDE_DYNAMIC_MEMORY_DETECTION

// Setup RAM module info. Please note that you may have to expand this when you have more RAM modules.

#define STATIC_RAM_SLOTS 4 // Number of RAM slots on mainboard.

 

#define STATIC_RAM_VENDORS { Vendor#1, Vendor#2, 0 } // Use n/a for empty RAM banks.

 

#define STATIC_RAM_TYPE SMB_MEM_TYPE_DDR32 // See libsaio/platform.h for other values.

 

#define USE_STATIC_RAM_SIZE 0

 

#if USE_STATIC_RAM_SIZE

#define STATIC_RAM_SIZES { SMB_MEM_SIZE_2GB, SMB_MEM_SIZE_2GB, 0 } // See libsaio/platform.h for other values.

#endif

 

#define STATIC_RAM_SPEED 1066800

 

#define STATIC_RAM_PART_NUMBERS { Part#1, Part#2, 0 } // Use n/a for empty RAM banks.

 

#define STATIC_RAM_SERIAL_NUMBERS { Serial#1, Serial#2, 0 } // Use n/a for empty RAM banks.

#endif

 

I'm exaggerating with questions probably :wacko:

I'll begin with several test tomorrow!

Thanks :)

Link to comment
Share on other sites

In ACPI folder I saw SSDT and SSDT-1, they are SScode. To enable these at the boot, will I have to set #define STATIC_SSDT_PR_TABLE_INJECTION 1 ?

 

However in my daily Extra folder I don't use SSDTs but only stripped DSDT without SScode.

If I add SS code to it, will I need to set only :

 

#define ACPI_10_SUPPORT	1
#define PATCH_ACPI_TABLE_DATA			1
#define STATIC_DSDT_TABLE_INJECTION	1
#define LOAD_DSDT_TABLE_FROM_EXTRA_ACPI	1

 

??

 

no you don't need static data set unless your only injecting data that way, that's the stuff converted to little endian by projectrevolution.

if you just want to load DSDT.aml then set static to 0 and load to 1.

 

if you've previously used chameleon to generate p and c states then that code will be in 1 or 2 SSDT tables.

 

Good luck

D

Link to comment
Share on other sites

Evening SG

 

Sorry but no go.

Caches are now rebuilt OK from: caches cleared in single user mode > boot revolution

But after shutdown, on reboot I get the same AppleACPIExpert KP or freeze just before it's loaded.

 

This is with the code you posted added to source taken from git this afternoon.

 

D

One last question; You can boot with either -x or -f with Chameleon? That works? If yes then this is the only and last change I can come up with:

long loadDrivers(char * dirSpec)
{
if (initDriverSupport() != STATE_SUCCESS)
{
	return -1;
}

bool shouldLoadMKext = ((gBootMode & kBootModeSafe) == 0);

_DRIVERS_DEBUG_DUMP("shouldLoadMKext: %s\n", shouldLoadMKext ? "true" : "false");

// Load: /Extra/Extensions.mkext or the kexts in: /Extra/Extensions/
// when required (in safe boot mode and when there is no Extensions.mkext).
if (shouldLoadMKext && (loadMultiKext("/Extra") == STATE_SUCCESS))
{
	_DRIVERS_DEBUG_DUMP("loadMultiKext(Extra) OK.\n");
}
else if (loadKexts("/Extra/Extensions", 0) == STATE_SUCCESS)
{
	_DRIVERS_DEBUG_DUMP("loadKexts(Extra) OK.\n");
}

// Load: /System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mkext 
// or the kexts in: /System/Library/Extensions/ when required (see note above).
if (shouldLoadMKext && (loadMultiKext(gPlatform.KernelCachePath) == STATE_SUCCESS))
{
	_DRIVERS_DEBUG_DUMP("loadMultiKext(System) OK.\n");
}
else if (loadKexts("/System/Library/Extensions", 0) == STATE_SUCCESS)
{
	_DRIVERS_DEBUG_DUMP("loadKexts(System) OK.\n");
}

matchLibraries();
loadMatchedModules();

_DRIVERS_DEBUG_SLEEP(5);

return STATE_SUCCESS;
}

And if that doesn't work, then you have a serious problem. I mean looking at the Chameleon source code... doing the same thing. Well. This but except that we don't load any files from helper partitions. We don't need that because we are booting from a partition, USB-stick or SDcard with everything setup in the right place. That is after all the plan from the beginning.

 

BTW: I picked up development of the EFI version of Revolution weeks ago, which worked up until 10.6.6, but I ran into an issue. One that I could not solve. Asked dad for help and now Lion boots with it. Sweet. I guess we're going to have a RevoBoot EFI edition soon. The smallest EFI booter ever.

 

Sam signing off to go to school.

Link to comment
Share on other sites

Afternoon SG

 

This boots without having to clear caches (system caches remain untouched from a previous Revolution boot and AppleACPI KP.) which is promising. BUT again if I shut down I get appleACPIExp type panic at the next boot.

 

And now If I boot to single user mode (using chameleon as I get KP with revolution) and clear caches I get KP on the following Revolution boot. OR FakeSMC.kext isn't loaded from Extra on the following boot with Revolution (prelinked kernel set to 0) and system hangs at loading ACPI_SMC!

Permissions for /Extra are intact!

 

Please note: If system has KP'd with Revolution at AppleACPIExpert then I can reboot with Chameleon just fine - No need for -f or -x, although I can boot with -f, -x if I wanted to!

 

I hope you haven't run out of ideas just yet! ;)

 

Again all tests run on single HDD none EFI install boot and /Extra at /

 

EDIT - reading on GitHub - Should we not all be using a unified boot0 and boot1h?

The source for these two files has changed over the chameleon revisions!

 

D

Link to comment
Share on other sites

Good afternoon FKA,

 

So we're making progress at last. Fabulous. Uhm. Can you reboot without a KP? What about using the boot options -f or -x with RevoBoot? No KP?

 

Will have another go at it after dinner (after your reply). And again. Thank you for testing this!

 

p.s. About using unified boot files; I haven't had the time to look at it. Not yet.

Link to comment
Share on other sites

So we're making progress at last. Fabulous. Uhm. Can you reboot without a KP? What about using the boot options -f or -x with RevoBoot? No KP?

 

I'm still not sure what combination is allowing me to boot again with Revolution after KP. I think its along the lines of clear caches > boot with chameleon > restart > boot with revolution.

 

After KP holding down 'X' or 'F' at boot with Revolution gives a KP. I presume this works, as apposed to adding -f or -x to boot.plist?

 

 

P.S. I'm happy to test. I want to see this working for me!

 

D

 

Thats the reason for MacVCobbler in /Chameleon Folder.

If you want the "latest" run that command and it will "get" it for you.

Then you just need to replace boot0 and boot1 folders.

 

I'll give this a go mate. Thx

 

I'll give this a go mate. Thx

 

Hi

 

I see you script downloads source from chameleon trunk.

I've already tried boot0 and boot1h complied from latest trunk and currently with that of RC4.

I have similar issues with both.

 

D

Link to comment
Share on other sites

I'm still not sure what combination is allowing me to boot again with Revolution after KP. I think its along the lines of clear caches > boot with chameleon > restart > boot with revolution.

Not good. Got to fix this.

 

After KP holding down 'X' or 'F' at boot with Revolution gives a KP. I presume this works, as apposed to adding -f or -x to boot.plist?

The X should be pretty obvious. In verbose mode there's the text: "SAFE BOOT DETECTED" and eventually shows the same red bold text on a login dialog. And not being able to boot with -x (or holding down the X key) is definitely a serious issue. Like I said I will have another look at it tonight.

 

On a side note; What Chameleon branch are you normally using to boot? The trunk?

Link to comment
Share on other sites

 Share

×
×
  • Create New...