Jump to content

How to boost the OS X boot process...


1,027 posts in this topic

Recommended Posts

I've managed to grab 10 minutes to test out Revolution 633.

 

Okay.. noob hour alert!

 

make ended with:

smbios_patcher.c:11:35: error: ../../../private_data.h: No such file or directory

 

Looking back to previous posts here I see DHP added all personal data to this file to keep everything in one place and separate from the main sources. This is a good idea, however, I don't have a private_data.h so is there a template I can use to create one?

 

Then once I have one, I guess I replace the path in the source to where I have it saved?

Link to comment
Share on other sites

Dang. See attachments.

 

The path I use is: ~/Projects/private_data.h where the source code of Revolution resides in: ~/Projects/Revolution-NNN

Thanks - I'll go and try it again.

 

Yep - That builds now.. Thanks.

However, I am not at my hack so I won't be able to test if it boots until tonight.

 

Next noob question.

SMBIOS DATA? Can I find the required information of how to fill this in, in this topic?

 

EDIT - found it here

Link to comment
Share on other sites

Yup. The file is also part of the releases (in the SMBIOS folder). Compiler instructions can be found at the top of this file aka:

cc -I . smbios2struct.c -o smbios2struct -Wall -framework IOKit -framework CoreFoundation

Thanks for that, but I'll just stick with the binary posted in the previous link for now and come back to that later.

 

I've experimented adding the required info in to private_data.h but I'll have to wait until I get back to my hack before adding the correct data. However my girlfriend has her nieces staying tonight so I don't think there'll be any time for me to play with this.. and then it's Christmas Eve tomorrow and so on, so I'll just have to comeback to this when I can.

 

So thanks for your help DHP and if I don't return here before Christmas then I wish you a Merry Christmas now. ;)

Link to comment
Share on other sites

The nieces are watching a movie.. he he.. so I've grabbed some quick play time ;)

 

I have built a bootable revolution USB stick and have tried booting.. I get to see the grey screen with the Apple logo, but I don't see the kernel spinner at all. Then after maybe two or three seconds I see a scambled screen at which point the machine has frozen. So I'm getting somewhere :P

 

I've attached a screenshot.

post-331032-1293139762_thumb.jpg

 

EDIT:

I applied the diff.txt posted above and now the system doesn't freeze, in that I can still use the keyboard to ctrl-alt-delete to reset. But I still don't get to see the throbber / spinner when at the grey screen with Apple logo. Am I right from reading dgsga's post above that I should be able to press v at boot to enter verbose mode?

Link to comment
Share on other sites

Let's start with the USB-stick.

 

1.) What format is it? GUID Partition Table (Mac OS Extended Journaled)?

2.) The checkbox with the text: "Ignore ownership on this volume" (Get Info dialog) is not be ticked?

3.) You have the files I mentioned in post #135?

- Make sure to include S*/L*/C*/c*/S*/Extensions.mkext (the OS X one) and to have com.apple.Boot.plist in the right spot.

4.) Have you checked the group/ownership of the files?

5.) Do you have: /Extra/ACPI/dsdt.aml or can you normally boot without it?

 

Note: See also post #64

 

And yes. Verbose mode from keyboard is broken (if you look at boot2/options.c you'll understand why). Sorry. Use Kernel Flags in com.apple.Boot.plist for now.

Hi DHP - Thanks for you reply.

Yep - I've done all those things but can you check my settings from the attached zip archive?

I'll also PM you my private_data.h file as maybe that's the issue?

 

blackosx_report_For_DHP.zip

Link to comment
Share on other sites

Hi blackosx,

 

I just received your private_data.h and looked at it, and like I replied to you per PM, your SMBIOS data structure appears to be invalid – two first lines. That will make it break.

Hi dutchhockeypro

 

Thanks for the reply and well spotted with the first line of the SMBIOS data, yep that's my error as I left it in to remind me to add the backslash at the end of each line.. I'll remove that.

 

and yes, the PUT_YOUR_STATIC_ACPI_BASE_ADDRESS_HERE value. I'm not sure about where to find that so I just used your value.. maybe that's one key cause for me not having a successful boot?

 

Notes to everyone: Start with the dynamic CPU, SMBIOS and ACPI patching first, and then continue with the far more restrictive way of forwarding your data since the slightest error will make it break.

Dynamic patching? how does that work exactly? - I guess it's noob hour again :)

do I just remove the SMBIOS data from my private_data.h ?

 

But thinking about me not seeing the spinner / throbber - I guess it means the booter is not finding the kernel, even though it's on my USB?

Link to comment
Share on other sites

Thanks for the details.

Normally yes (I think) but why don't you boot in verbose mode to see what is going on?

I added -v to the kernel flags in my com.apple.boot.plist but it made no difference and all I saw was the grey screen with the Apple Logo. I'll try it again when I get a chance.

 

But no problems - there's no immediate rush with this.. and as you've said it's Christmas Eve today so in about an hour I'll be leaving work and not touching my computers for a short period.. :)

Link to comment
Share on other sites

Oh that settles it. It can't even locate com.apple.Boot.plist Must be the way your USB-stick is setup, or should I say the very very restrictive way of Revolution dealing with stuff like this – written to become the in-BIOS version, eventually.

Lol.. Yeah - I've probably done something wrong with my setup. But the process is simple and straightforward for you as you're familiar with it, though for me I'm still wandering about in the dark..

 

I'll re-visit it another time, but for now let's enjoy our Christmas :)

Link to comment
Share on other sites

I see different numbers in kernel.log.

 

For example:

Aug 20 18:26:52 localhost kernel[0]: vm_page_bootstrap: 964981 free pages and 83595 wired pages

 

And today:

Dec 25 01:47:34 localhost kernel[0]: vm_page_bootstrap: 1021899 free pages and 18485 wired pages

 

Though it is with different flavours of Chameleon.

"Waiting for DSMOS..." sometimes is there, sometimes not.

 

Dec 25 01:52:47 Macintosh kernel[0]: Waiting for DSMOS...

Dec 25 01:52:54 Macintosh kernel[0]: DSMOS has arrived

 

Note that there is other host name when "Waiting for DSMOS..." line is present.

Link to comment
Share on other sites

Well, I can't remember what it was back then, maybe it was AsereBLN or AnVAL, maybe something else. Now I'm using latest official trunk with hardcoded checksum of kernel cache as there's still no solution to get it on the fly. IMHO Adler32 is not getting right values to work with, should be "boot-device-path" and "boot-file" according to Apple sources.

http://www.opensource.apple.com/source/kex...extcache_main.c

Sadly I'm not a coder ;)

As for Geekbench score, it's always +/- the same, drops only if power management is not working and CPU speed locks at 2GHz.

Link to comment
Share on other sites

Though it is with different flavours of Chameleon.

"Waiting for DSMOS..." sometimes is there, sometimes not.

 

Dec 25 01:52:47 Macintosh kernel[0]: Waiting for DSMOS...

Dec 25 01:52:54 Macintosh kernel[0]: DSMOS has arrived

 

Note that there is other host name when "Waiting for DSMOS..." line is present.

I used to have "Waiting for DSMOS" message appear on Console, which had disappeared after adding OSBundleLibraries to my legacy ACPI_SMC_PlatformPlugin.

 

Recently, I updated to the latest version of AnVAL and started to have this message back but after repair permission it is now gone. I only have "DSMOS has arrived".

Link to comment
Share on other sites

Which usually means that your CPU was running a lot slower, and possibly very hot too. I had the same problem, but I'm not using MC's legacy kext – the Geekbench score dropped on the HP from 4040 to a low 1600 and was running very hot.

 

And you used "Safe Boot" like IOPlatformPluginFamily.kext and ACPI_SMC_PlatformPlugin.kext? Now try Safe Boot (-x) mode :D

Not really. It didn't affect the functionality or the performance as far as the Geekbench scores and temperature are concerned. Most of the time, it delayed the boot. Actually, my temperatures values, which are floating between 46-55 on load, are almost the same with or without Legacy ACPI_SMC_PlatformPlugin, especially after the most recent version of AnVaL.

 

For a very long time I had MacbookPro5,4 as my mac model but with the new features of AnVaL, I have to use MacbookPro5,5 as otherwise I lose stability. Also, I used SMbiosproduct key to override motherboard of the mac model, which increased my Geekbench score alongside with a surprise by Apple offering me efi firmware upgrade (: This showed me that putting just mac model to smbios.plist might not be enough.

 

I can't speak with a scientific mind but all I can say about this CPU thing is that while using OSX on battery mode, it seems to me that CPU can goes into deeper states than it does on AC Power. So, I think although I have C-States working I doubt that I have all of them enabled.

Link to comment
Share on other sites

I used SMbiosproduct key to override motherboard of the mac model, which increased my Geekbench score alongside with a surprise by Apple offering me efi firmware upgrade

You can "fix" this by using the correct SMC version key in fakesmc.kext. You need to find out what the latest SMC version is for the MacbookPro5,5.

If you use Apple's plist editor, enable "view raw keys/values" to see the version number in FakeSMC's info.plist.

http://prasys.info/2009/11/editing-fakesmc/

Link to comment
Share on other sites

Hi All

 

Back after the Christmas break, hope you've had a good one! Have tried 633 from a USB stick with correct file structure but all I get is the boot graphics loading, no throbbing spinner. DHP, I also found that 630 works on my internal (RAID) drive but not on my external USB backup drive. Here I get the waiting for root device error. I have never used any boot-uuid flag in com.apple.boot.plist. I haven't a clue about why these things are happening, I'm relying on your infinite wisdom!

Link to comment
Share on other sites

You can "fix" this by using the correct SMC version key in fakesmc.kext. You need to find out what the latest SMC version is for the MacbookPro5,5.

If you use Apple's plist editor, enable "view raw keys/values" to see the version number in FakeSMC's info.plist.

http://prasys.info/2009/11/editing-fakesmc/

I'd already done that by changing the default one to 0.147f2 with the help of above-mentioned guide.

Let me add a handy link for that.

 

Here's mine for the MacBookPro6,1 (as a reference):

	{"SMbiosversion",	 "MBP61.88Z.0057.B0C.1007261552" },
{"SMbiosdate",		"07/26/2010"					},
...
// smc-version: 1.58f15 / EFI: 1.9.0027.0

Note the date, which is part of SMBiosversion.

 

p.s. I didn't knew what to do until today. After reading this info. Inspired me to give it a try and stop the annoying EFI 1.9 update offerings, but I had to change the SMBIOS values. I've taken care of it now. Sweet. Learning something new again. Thanks!

 

Update: The checksum generation (Adler32) bug appears to be fixed and generates the same value as kextcache. Should be fine now.

In my case, it appears that the problem was the outdated Boot ROM Version which was MBP55.88Z.00AC.B02.0905060849. I changed it to MBP55.88Z.00AC.B03.0905060849 which is the most recent version I could find. I did select to hide the efi upgrade before so I don't know if this change did any effect on it.

 

@dutchhockeypro, are there any problems with the followings that might need fixing. Speed up the process etc.

Dec 27 20:10:43 localhost kernel[0]: From path: "uuid", 
Dec 27 20:10:43 localhost kernel[0]: Waiting for boot volume with UUID ***
Dec 27 20:10:43 localhost kernel[0]: Waiting on <dict ID="0"><key>IOProviderClass</key><string ID="1">IOResources</string><key>IOResourceMatch</key><string ID="2">boot-uuid-media</string></dict>
Dec 27 20:10:43 localhost kernel[0]: Can't get kextd port.
AppleRTL8169Ethernet: phyWaitForAutoNegotiation TIMEOUT

 

Thanks,

Link to comment
Share on other sites

I'd already done that by changing the default one to 0.147f2 with the help of above-mentioned guide.

In my case, it appears that the problem was the outdated Boot ROM Version which was MBP55.88Z.00AC.B02.0905060849. I changed it to MBP55.88Z.00AC.B03.0905060849 which is the most recent version I could find.

You're right, I forgot to mention that, you must use the latest boot ROM version as well as the latest smc version for the model you have chosen to "fake".

 

For anyone wondering how to find this information, google macmodelx,y DMI and follow any hits to Linux bug report sites until you hit jackpot. You can usually find all the data you need for your smbios.plist on those sites, and sometimes even LSPCI and DSDT dumps and other goodies from real Macs.

 

In JBraddock's example, MBP55.88Z.00AC.B03.0905060849 (the numbers I've highlighted are the boot ROM release year, month and date) there is actually a newer version available - MBP55.88Z.00AC.B03.0906151708 - dmi.bios.date: 06/15/09. I don't know if that is the latest one though.

Link to comment
Share on other sites

You're right, I forgot to mention that, you must use the latest boot ROM version as well as the latest smc version for the model you have chosen to "fake".

 

For anyone wondering how to find this information, google macmodelx,y DMI and follow any hits to Linux bug report sites until you hit jackpot. You can usually find all the data you need for your smbios.plist on those sites, and sometimes even LSPCI and DSDT dumps and other goodies from real Macs.

 

In JBraddock's example, MBP55.88Z.00AC.B03.0905060849 (the numbers I've highlighted are the boot ROM release year, month and date) there is actually a newer version available - MBP55.88Z.00AC.B03.0906151708 - dmi.bios.date: 06/15/09. I don't know if that is the latest one though.

Actually, that was actually how I'd got the other values in the first place (: I've updated with the one you provided. Also there is already a topic in the forum where all those information you'd mentioned is shared.

Thank you.

Link to comment
Share on other sites

Thanks DHP for looking into this. Attached is my com.apple.boot.plist, I ran 'diskutil list' in terminal to show all partitions and the raid0 bootable volume came up as:

/dev/disk2
  #:                       TYPE NAME                    SIZE       IDENTIFIER
  0:      GUID_partition_scheme                        *119.9 GB   disk2
  1:                        EFI                         209.7 MB   disk2s1
  2:                  Apple_HFS Morgaine                119.5 GB   disk2s2

Morgaine is the system partition.

 

The external USB drive comes up as:

/dev/disk4
  #:                       TYPE NAME                    SIZE       IDENTIFIER
  0:      GUID_partition_scheme                        *2.0 TB     disk4
  1:                        EFI                         209.7 MB   disk4s1
  2:                  Apple_HFS System                  118.3 GB   disk4s2
  3:                  Apple_HFS Backup                  1.9 TB     disk4s3

 

The USB stick comes up as:

/dev/disk1
  #:                       TYPE NAME                    SIZE       IDENTIFIER
  0:      GUID_partition_scheme                        *129.0 MB   disk1
  1:                  Apple_HFS Boot                    128.9 MB   disk1s1

 

I will test the code you suggested adding later and will report back on the output. The plot continues......

com.apple.Boot.plist.zip

Link to comment
Share on other sites

@JBraddock:

 

Well. For a starter. You'll have at least one less "Waiting..." when the Chameleon developers adopt my work. And I'm sure they eventually will. But more important is this "Can't get kextd port." which I only see when I boot into Safe Boot mode. And about this AppleRTL8169Ethernet timeout. What driver are you using? I'm using this one btw.

I was actually using that driver before 10.6.5 came out. Now I reinstalled it again but the message didn't disappear. This started to happen after 10.6.5. I couldn't find anything that might be related to Can't get kextd port.

 

Thanks,

Link to comment
Share on other sites

Well after a good Christmas, I thought I'd come back and try this again ;)

Back after the Christmas break, hope you've had a good one! Have tried 633 from a USB stick with correct file structure but all I get is the boot graphics loading, no throbbing spinner.

Same symptoms here.. So at least I know it's not just me.

 

In short: The line above screams for a change... Try this:

#define NO_BOOT_UUID_GIVEN				rootUUID[0] == '\0'
#define NOT_BOOTING_FROM_SYSTEM_VOLUME	((gBootVolume->flags & kBVFlagSystemVolume) == 0)
bool noTargetUUID = (NO_BOOT_UUID_GIVEN || NOT_BOOTING_FROM_SYSTEM_VOLUME);

n.b. Verified with my USB-stick and external USB-drive though I don't have a drive setup with only a system volume.

Hi DHP - i've read back from when I last tried and a few fixes suggested since including this latest one but still with no luck. So as I can't boot in verbose mode, as the com.apple.Boot.plist doesn't get detected, I commented out the call to showbootLogo in boot.c here:

	initKernelBootConfig();

//showBootLogo();

which at least allowed me to see some feedback from the booter so maybe this can help you?

After boot1: /bootUUID readout I see:

gBootVolume: hd(1363, - 268370092)
rootVolume : hd(2,3)
bvChain	: hd (1363, -268370092)

before it then goes into a loop telling me it can't find mach_kernel.

 

For reference, here's my diskutil list:

/dev/disk0
  #:					   TYPE NAME					SIZE	   IDENTIFIER
  0:	  GUID_partition_scheme						*500.1 GB   disk0
  1:						EFI						 209.7 MB   disk0s1
  2:				  Apple_HFS PILOT				   1.1 GB	 disk0s2
  3:				  Apple_HFS OSX1					120.0 GB   disk0s3
  4:	   Microsoft Basic Data						 80.0 GB	disk0s4
  5:				  Apple_HFS OSXBACKUP			   40.0 GB	disk0s5
  6:				  Apple_HFS STORAGE				 258.3 GB   disk0s6
/dev/disk1
  #:					   TYPE NAME					SIZE	   IDENTIFIER
  0:	  GUID_partition_scheme						*500.1 GB   disk1
  1:						EFI						 209.7 MB   disk1s1
  2:				  Apple_HFS Booter				  1.1 GB	 disk1s2
  3:				  Apple_HFS Mac					 120.0 GB   disk1s3
  4:	   Microsoft Basic Data						 80.0 GB	disk1s4
  5:				  Apple_HFS Backup				  32.0 GB	disk1s5
  6:				  Apple_HFS Data					266.3 GB   disk1s6
/dev/disk2
  #:					   TYPE NAME					SIZE	   IDENTIFIER
  0:	  GUID_partition_scheme						*1.0 GB	 disk2
  1:				  Apple_HFS Revolution			  1.0 GB	 disk2s1

 

I hope this helps throw some light on the situation. Thanks

Link to comment
Share on other sites

I wonder what the following output is:

printf("gBIOSDev: %d\n", gBIOSDev);
printf("bvCount: %d\n", bvCount);
printf("(gBootVolume == NULL) : %s \n", (gBootVolume == NULL) ? "true" : "false");
printf("(gBIOSBootVolume == NULL) : %s \n", (gBIOSBootVolume == NULL) ? "true" : "false");

Gives the following:

gBIOSDev: 128
bvCount: 0
(gBootVolume == NULL) : true
(gBIOSBootVolume = NULL) : true

 

And Revolution is copied onto a partition flagged as bootable I hope?

Yep - the revolution partition is active

BlackSnowMain:~ blackosx$ fdisk /dev/disk2
Disk: /dev/disk2	geometry: 1007/32/63 [2030592 sectors]
Signature: 0xAA55
	 Starting	   Ending
#: id  cyl  hd sec -  cyl  hd sec [	 start -	   size]
------------------------------------------------------------------------
*1: EE 1023 254  63 - 1023 254  63 [		 1 -	2030591] <Unknown ID>
2: 00	0   0   0 -	0   0   0 [		 0 -		  0] unused	  
3: 00	0   0   0 -	0   0   0 [		 0 -		  0] unused	  
4: 00	0   0   0 -	0   0   0 [		 0 -		  0] unused

Link to comment
Share on other sites

Please use the second one (there are two) by commenting out the first one, and changing the directive #if CHAMELEON into #if 1 // CHAMELEON I moved it into a proper #if ... #else ... #endif combo already for Revolution-634.

...

Oh and let it print the #if DEBUG data also by doing the same trick. Thanks.

I now see the following:

boot1: /bootgptBlock: 2
gptCount: 128
gptSize : 128
biffersize: 0x4000

which then waits for a key press. This loops for three times before then looping through the message 'can't find mach_kernel'.

Link to comment
Share on other sites

Overclocking problem solved: Needed to enter frequencies in cpu/static_data.h in Hz as unsigned long integers:

p->CPU.TSCFrequency = 3627000000UL;
p->CPU.FSBFrequency = 181350000;
p->CPU.CPUFrequency = 3627000000UL;

 

DHP, is there anything I can do to help with the disk problem??

Link to comment
Share on other sites

 Share

×
×
  • Create New...