Jump to content

How to boost the OS X boot process...


1,027 posts in this topic

Recommended Posts

I have not done all picture because my battery get empty, but this time I had a different KP about bad CPU config.

there is another problem i noticed every time i rebbot after KP I have the bios booting into safe mode and it ask me to check CPU freq in bios settings but they are ok.

Note it not reset the bios settings but it thinks that the cpu settings are wrong...

here the only picture I had:

post-464373-1298483865_thumb.jpg

when batteries are recharged i'll put the other part.

 

I have the smbios data dumped with your first script for this but with a line added because if you remember we noticed that line in the chameleons ioreg

 

maybe the STATIC_SMBIOS_SM_MAX_STRUCTURE_SIZE need to be changed also?

here attached the other config files

SMBIOSdata.txt

EFIdata.txt

ACPIdata.txt

Link to comment
Share on other sites

@DB1 - You're using the Advent 4211?

@Humph - you are using a netbook too?

 

Can I ask how you are both getting on with them and are they pretty much fully supported? Just as I'm thinking about maybe getting something similar as a friend showed me yesterday his Dell Mini 10v running 10.6.6 which made me think I could use a little portable machine like that. However, the trackpad was pants so I'm just doing some searching around for a decent, cheap netbook which runs OS X well.

 

Thanks.

 

The Advent is fully functioning but the stock battery life on them is miserable about 2 hrs at best, you get a beefed up one which gives up to 6 hours. I can use stock kernel with a patched Chameleon bootloader but with Revolution I need a patched one. Handles 10.6.6 very well. The web cam is a bit on the poor side. But all things considered a good value mini macbook.

Link to comment
Share on other sites

Thank you for this confirmation. Was wondering about it. Why nobody confirmed it so thank again. And as a reminder; using static SMBIOS data will always be faster.

 

I should be able, with a little luck that is, to finish the new SMBIOS patcher today. Yah!

 

p.s. I wish it was tomorrow already. I'm so exited about the news of tomorrow. This day can't go by fast enough :(

 

All working fine here too, though I did not have a problem previous with static memory.

 

Looking forward to the new SMBIOS patcher.

 

1st team call up?

Link to comment
Share on other sites

check CPU freq in bios settings but they are ok.

Note it not reset the bios settings but it thinks that the cpu settings are wrong...

 

Are you using static CPU data, I sure that is causing this part of the problem, as DHP said above, use dynamic to start of with

Link to comment
Share on other sites

So when that shows up now in the debug output – as being found – then you should be able to undo the change in the source code and boot with a UUID set in com.apple.Boot.plist.

 

Thanks FKA. Got it. Looked at it and I can tell that there are a few files that will be ignored by Revolution, like:

 

/Extra/com.apple.Boot.plist

/System/Library/CoreServices/com.apple.Boot.plist

/System/Library/CoreServices/SystemVersion.plist

com.apple.boot.P

 

But I reckon you have that in place for Chameleon ;)

 

Also. Adding the pre-linked kernel to /System/Library/Caches/com.apple.kext.cache/Startup/ will make things a lot faster.

 

Good day to you!

 

Yes that is the old folder structure from Chameleon.

 

I'll test without the changes to the code and will also copy the prelinked kernel over to /S/L/C/c/S on both helper partitions.

Then I think I'll post a little request-ett over on Taruga's RAID0 Updater thread :(

 

Be seeing you.

D

Link to comment
Share on other sites

I made a little step in finding solutions to my problem that to me it looks related to cpu configurations.

I deleted AppleIntelCPUPowerManagement.kext and I have no more the KP I had with that but instead I get another KP that i'll post asap about ACPI device driver not found for device iMac11,1

 

Are you using static CPU data, I sure that is causing this part of the problem, as DHP said above, use dynamic to start of with

I have posted the static but i'm already booting with dinamic (and static are the same dinamic shows in debug) so that's why i thik they are not the correct one.

 

Here all the debug dump I can picture, this time same settings but no KP only the old hang... ??post-464373-1298495593_thumb.jpg

Link to comment
Share on other sites

@DB1 - You're using the Advent 4211?

@Humph - you are using a netbook too?

 

Can I ask how you are both getting on with them and are they pretty much fully supported?

Thanks.

Yes, using Lenovo S12. The ION one is a bit better esp for flash videos, but I got the GMA950 version on an offer (else not worth it). Trackpad is quite OK, but nowhere as good (big) as apple. Everything is working AFAIK except LAN and camera needs camtwist to enable. Only other issue is the USB-eject issue on sleep that I had fixed in past is back due to excessive DSDT hacking! Or perhaps it's just the card reader as never used to use that. I also have P55 desktop but it's in storage at the moment (so looking forward to getting that back and sticking Revolution on it - and when the RAID support is done!). These days I find myself using the netbook for day to day stuff more than my MBP, as it's so small and light! Makes me want an 11" Air!

Link to comment
Share on other sites

Good day to you!

 

Yes that is the old folder structure from Chameleon.

 

I'll test without the changes to the code and will also copy the prelinked kernel over to /S/L/C/c/S on both helper partitions.

Then I think I'll post a little request-ett over on Taruga's RAID0 Updater thread ;)

 

Be seeing you.

D

 

Hi DHP

 

I've removed all edits from boot.c and disk.c and am now booting with no problems with:

rd=uuid boot-uuid=xxxxxxxxxxxxxxxxxxxxxx in boot.plist and Mach_Kernel in /System/Library/Caches/com.apple.kext.cache/Startup/

 

Booting from 2 disk software RAID with a whopping 10 turns, from 20+ previously :P !

 

Top stuff!

Link to comment
Share on other sites

Good afternoon blackosx,

 

But of course. Not doing so, after his generous offer, would be offensive. We are however not going to use it. Not because it's no good or anything, but we need a different approach.

../snip/...

So was Kabyl's offer useless? No sir! But I try to learn something from him – and I did.

Hi DHP.

 

Cool. I was just asking as I know he posted here about it so it's good you at least found it helpful. I do wonder if somehow maybe you would consider liaising with some of the other devs to discuss future plans for booting OS X. There have been attempts to organise some place to do this over at the voodooproject's forum but I don't think anything has been finalised as of yet. I think your input would definitely be worthwhile....

 

This is what I usually do:

 

1.) Read a file/function and try to understand it.

2.) Fix indention and other style nits.

3.) Add comments.

4.) Strip the code to a bare minimum.

5.) Change it to make it faster.

6.) Remove global dependencies as much as possible.

7.) Rename function names and variables so that they tell us what they're about.

8.) Combine functions into one (reduce memory usage and to speed it up).

9.) Strip unused / unwanted function arguments.

 

And this is usually when I am starting to feel confident enough to make some really big changes. After nine iterations and days/weeks of fine-tuning. That's also how I learn something. Not by doing a simple copy / paste because the first time I run into some kind of bug, I am forced to start doing the same things anyway.

This is very true and and you say, if you/we/anybody wants to understand how all this works then those steps give good guidance as to how.

 

 

@DB1 and humph.

Thanks for your replies. They've given me food for thought about these netbooks. B)

Link to comment
Share on other sites

Nope. I got to use the new 17-inch MacBookPro (top specs) with the new Intel Thunderbolt I/O connection setup to an external drive enclosure, plus OS X Lion running on it i.e. dad left with an empty box ;)

 

Note: I can't reveal anything except confirm the things that will undoubtedly come out soon.

 

I was hoping for good news today or tomorrow :)

Link to comment
Share on other sites

Ok Here goes.. Not the same as it was, but in some spots this one is even better.

 

1.) Functions smbiosDryRun and smbiosRealRun are no more (eliminating code replications).

2.) Function setupSMBIOS is a one stop all solution.

3.) Dynamic runs now even less memory than a static run.

4.) The boot file is smaller (for both dynamic and static builds).

5.) We now drop everything (tables and string data) we don't need.

6.) We now use a turbo index lookup pointer (eliminating useless index loops).

7.) Expanding the array with required structures is easy.

8.) We now use a micro SMBIOS table (never been this small before).

 

Todo: Add more comments (maybe later today) and test a new approach in patching lapic.c (experimental).

 

Now I will go and play with a new toy. See ya...

 

Sweet! all working fine here, seems quicker on the SDCard than previous, have tried dynamic and static. On dynamic only memory not reading in but not an issue. Will try on EFI next. Works fine on EFi.

 

As usual great work. Enjoy playing with the new toy. I want one! Can you give feedback on Lion?

Link to comment
Share on other sites

Good evening DB1,

 

Good to hear that. And attached you'll find a slightly improved debug output (DEBUG_PLATFORM 1) to help you track down the problem.

 

 

Thanks. I better not. Won't run on your Atom anyway :P

 

Will need a new toy then when Lion released!

 

Thanx, debug pic's attached.

Seems size is not being picked up. If I set to dynamic I don't get any ram detect data in the debug at all.

 

post-170015-1298579683_thumb.jpg post-170015-1298579702_thumb.jpg post-170015-1298579719_thumb.jpg

 

post-170015-1298579736_thumb.jpg post-170015-1298579752_thumb.jpg

post-170015-1298580825_thumb.png post-170015-1298580837_thumb.png

Link to comment
Share on other sites

That's a bummer. Please check this:

2.) Set USE_STATIC_RAM_SIZE to 1.

Should work. Can do more testing later tonight. Let me know if this helped, or not of course.

 

No further testing needed!

 

:) How stupid of me, I did not have USE_STATIC_RAM_SIZE set to 1. Everything sorted now. Thanx again.

Link to comment
Share on other sites

Ok Here goes.. Not the same as it was, but in some spots this one is even better.

Another progression DHP. Well done. :)

I'll try it now. Back in a bit....

 

EDIT: After first successful boot, I see you have magically upgraded my system :)

post-331032-1298582073_thumb.png

 

EDIT 0.5: The debug for the above shows:

In getCPUType() = 1897

And I normally use 0x769 in my static CPU data (which is also 1897 decimal) so my cpu type is being detected correctly?

 

I'll keep testing....

 

EDIT2:

With the new files, everything works as it did before.

• Relying on complete dynamic smbios settings means memory detection ends with 'There was an error while gathering this information.' in System Profiler/Memory, and my Model is named as iMac11,1.

• Enabling #define OVERRIDE_DYNAMIC_MEMORY_DETECTION with my own static memory values works fine.

• Enabling #if OVERRIDE_DYNAMIC_PRODUCT_DETECTION works to change my Model to MacPro3,1.

 

The only issue is my processor is no longer shown as a core2duo.

 

Now to try going back to static SMBIOS data.

 

EDIT3: Using my static SMBIOS data works just fine and my processor is shown as a core2duo again.

Link to comment
Share on other sites

Cool.

 

 

Yes. Must be something in your SMBIOS table. Please copy it from IORegistryExplorer and attach it here. Thanks.

 

p.s. The About This Mac dialog is ok? Oh and the output of smbios2struct2 might also be helpful.

 

Update:

Good morning blackosx,

 

Attached are two files to fix the System Profiler for dynamic runs – should fix the: 'There was an error while gathering this information' (we don't want people to see this error).

Good morning dutchhockeypro,

 

The 'About this Mac' box shows the same as System Profiler for both CPU and memory.

 

Thanks for the file updates. I've tested them with dynamic data in settings.h and the Memory error is now gone, with System Profiler/Memory now populated with the correct two banks identified with the right size, but showing speed of 1066Mhz and type DDR3 as opposed to my 800Mhz DDR2. My CPU is still detected as a Core i7.

 

Here's my output from smbios2struct2 v1.03 with debug and verbose enabled:

Have AppleSMBIOS
Have SMBIOS-EPS dataRef

eps.anchor            : _SM_
eps.checksum          : 0x020
eps.entryPointLength  : 0x1f
eps.majorVersion      : 0x02
eps.minorVersion      : 0x03
eps.maxStructureSize  : 0x0000
eps.entryPointRevision: 0x00
eps.formattedArea     : 

eps.dmi.anchor        : _DMI_
eps.dmi.checksum      : 0x00
eps.dmi.tableLength   : 0x022c
eps.dmi.tableAddress  : 0x020b201f
eps.dmi.structureCount: 0x000a
eps.dmi.bcdRevision   : 0x23

Have SMBIOS dataRef

Number of bytes: 556 (Original SMBIOS table)
Table: 131                    OEM Processor Type  @0x100108b70  Formatted area:  6 bytes  Structure length:   8 bytes.
Table: 132               OEM Processor Bus Speed  @0x100108b78  Formatted area:  6 bytes  Structure length:   8 bytes.
Table:   0                      BIOS Information  @0x100108b80  Formatted area: 24 bytes  Structure length:  86 bytes.
Table:   1                    System Information  @0x100108bd6  Formatted area: 27 bytes  Structure length:  82 bytes.
Table:   2      Base Board or Module Information  @0x100108c28  Formatted area:  8 bytes  Structure length:  43 bytes.
Table:   4                 Processor Information  @0x100108c53  Formatted area: 35 bytes  Structure length:  93 bytes.
Table:  17                         Memory Device  @0x100108cb0  Formatted area: 27 bytes  Structure length:  59 bytes.
Table:  17                         Memory Device  @0x100108ceb  Formatted area: 27 bytes  Structure length:  59 bytes.
Table:  17                         Memory Device  @0x100108d26  Formatted area: 27 bytes  Structure length:  59 bytes.
Table:  17                         Memory Device  @0x100108d61  Formatted area: 27 bytes  Structure length:  55 bytes.

Dropped tables:  0.

#define	STATIC_SMBIOS_SM_MAX_STRUCTURE_SIZE	93

#define	STATIC_SMBIOS_DMI_STRUCTURE_COUNT	10

#define STATIC_SMBIOS_DATA \
/* SMBIOS data (0x0228 / 552 bytes) converted with smbios2struct2 into little endian format. */ \
/* 0x0000 */	0x00000683, 0x00000769, 0x00010684, 0x00000000, 0x00021800, 0xe0000201, 0x9e800f03, 0x00007fc9, \
/* 0x0020 */	0x05330000, 0xffffffff, 0x6c707041, 0x6f432065, 0x7475706d, 0x202c7265, 0x2e636e49, 0x33504d00, \
/* 0x0040 */	0x38382e31, 0x30302e5a, 0x422e4336, 0x302e3530, 0x32323038, 0x31343139, 0x34300030, 0x2f31302f, \
/* 0x0060 */	0x38303032, 0x1b010000, 0x02010003, 0x00000403, 0x00000000, 0x00000000, 0x8ad01f00, 0x0506d410, \
/* 0x0080 */	0x70704105, 0x4320656c, 0x75706d6f, 0x2c726574, 0x636e4920, 0x614d002e, 0x6f725063, 0x00312c33, \
/* 0x00a0 */	0x00302e31, 0x30383847, 0x34563431, 0x004b5958, 0x5063614d, 0x00006f72, 0x00040802, 0x04030201, \
/* 0x00c0 */	0x6c707041, 0x6f432065, 0x7475706d, 0x202c7265, 0x2e636e49, 0x63614d00, 0x3234462d, 0x43443830, \
/* 0x00e0 */	0x04000038, 0x01000523, 0x76020103, 0xff000106, 0x03bfebfb, 0x6a010a8a, 0x410a6a0a, 0x0b000a0f, \
/* 0x0100 */	0x04ffff00, 0x6f530605, 0x74656b63, 0x35373720, 0x746e4900, 0x49006c65, 0x6c65746e, 0x20295228, \
/* 0x0120 */	0x65726f43, 0x294d5428, 0x75442032, 0x5043206f, 0x20002055, 0x20002000, 0x20002000, 0x00002000, \
/* 0x0140 */	0x00061b11, 0xfffe0019, 0x00400040, 0x00090800, 0x00180201, 0x07042a00, 0x41090508, 0x61420030, \
/* 0x0160 */	0x2f306b6e, 0x00200031, 0x00200020, 0x2f4e0020, 0x2f4e0041, 0x2f4e0041, 0x11000041, 0x1900071b, \
/* 0x0180 */	0xfffffe00, 0x00ffffff, 0x01000900, 0x00001802, 0x0807042a, 0x31410905, 0x6e614200, 0x332f326b, \
/* 0x01a0 */	0x20002000, 0x20002000, 0x412f4e00, 0x412f4e00, 0x412f4e00, 0x1b110000, 0x00190008, 0x0040fffe, \
/* 0x01c0 */	0x08000040, 0x02010009, 0x2a000018, 0x05080704, 0x00324109, 0x6b6e6142, 0x00352f34, 0x00200020, \
/* 0x01e0 */	0x00200020, 0x00412f4e, 0x00412f4e, 0x00412f4e, 0x091b1100, 0xfe001900, 0xffffffff, 0x090000ff, \
/* 0x0200 */	0x18020100, 0x042a0000, 0x09050807, 0x42003341, 0x366b6e61, 0x2000372f, 0x20002000, 0x4e002000, \
/* 0x0220 */	0x4e00412f, 0x4e00412f, 0x00000000

 

Here's my SMBIOS Data and SMBIOS-EPS Data from ioreg when booted using dynamic settings.

SMBIOS_data_from_ioreg_booted_with_dynamic.txt

 

Hope this helps. I'm going out today, so leaving shortly. I'll check back in tonight. :)

Link to comment
Share on other sites

Hi DHP. Just did the updates since 645 release package, and booting OK.

Am using override on model type for initial tests, but rest is dynamic.

 

As others, now I get the memory section in SysProf showing the two slots. But type and speed is I think wrong. Shows 1066 DDR3 when AFAIK is 667 DDR2. Did not yet try running detection override and manual enter data (am sure that'll work!). Oh, and CPU is back at 800MHz. Saw your earlier comment about nothing changed there, so I can only think that since I generally use static CPU data, that at some point I "lost track" of fact that perhaps dynamic never showed 1.6Ghz for this CPU/machine. Minor issue, esp as Revolution is not really targeting for netbooks.

 

(Shame about Lion and Atom vs C2D+. Would have been nice to have full disk encryption on this machine!).

Link to comment
Share on other sites

That's fine. Just default values in getter.h We have to give it something after all, but maybe not. Have to look into it at a later time.

No problem. That explains the values I see.

 

Your CPU type must be set to 0x301 (769) not 0x769.

Can I just clarify. Are you saying I need to set my static CPU type to 0x301? I ask as the value of 0x769 I got from Revolutions' CPU debug when I first started out here.

 

EDIT: I've just tried using 0x301 and I now have my Core2Duo back. Thanks DHP :)

 

The SMBIOS data looks a little strange. Do you have Everest? Can you make a dump from either Windows or Linux of the SMBIOS data, so that we can rule out errors? Thanks.

No problem. Here are dumps from Windows using AIDA64 (Successor to Everest) and a dmidecode dump from Linux. Hope I've done the right dumps.

DMI_report_from_AIDA64.txt dmidecode_dump_from_Linux.txt

 

A clean one from Chameleon or an old version of Revolution might also be usable, but I'm not 100% sure about it.

If you need one from those then let me know, but I'm banking on the above two dumps to give you the required info.

 

Oh and have fun!

We did thanks. Went to the outdoor leisure / camping / caravan / motorhome / boat show at the NEC in Birmingham. It was good fun with some fantastic exhibits, displays, products etc. Shame the drive back wasn't that much fun though due to the rain, spray and mist.

Link to comment
Share on other sites

@blackosx

Here's Revstart1.8.command.

I've re-did MakeMedia.Took out edit from MakeStructs and a couple of other things.

Sorry don't comment much stuff.

Thanks. I'll take a look.

 

I changed your settings.h configuration gizmo to just copy setting_template.h to settings.h and manually editing it when MakeMedia runs before compiling.Probably just as easy doing it that way at the moment.

Okay. That'll be fine if the user knows what to add in to settings.h. My original idea of RevStart was to try to populate settings.h for the user to help them get up to speed with Revolution.

 

I'm surprised no one has said anything about the iso function, bar you saying it works.

 

There's 2 very good reasons for it.

 

1.By adding System.dmg (Retail dmg) to ISO folder and rp=file:///System.dmg to c.a.B.plist we can make a Revolution Based Installer iso or USB.

 

2.With a couple of extra files even a LIVE system is possible.

Absolutely. I have successfully booted from an .iso. and I once tried booting from a USB with a restored retail DVD image, but I can't remember if it actually booted or not but I can't see why it wouldn't in future.

 

 

As I'm the only one commenting about it, I'll take it that no one else has any problems, so I will leave it at that.

I haven't had any issues with the patches / updates DHP has been supplying, but I guess that's down to the fact that I read this topic everyday and follow closely what's in progress etc. However, if I didn't do this, then maybe I would find issue with working out what files go where? I don't know.

Link to comment
Share on other sites

At the moment this is broken,you need to update (will need to keep updating) the code to reflect new/added options in settings.h, thats why I'm doing it this way.

Good point in that it does need updating everytime DHP makes a change, but that's evolution I guess. But when all the required settings are eventually settled upon with Revolution then I can update it one final time.

 

This is the version that I've been working on. It's not finished by any means but it builds the latest style of settings.h file and uses the latest smbios2struct v1.0.3. I'd been making many tweaks and changes from your RevStart1.7b7Fixed version and this is where's it's currently at.

 

Note: to anyone who tries this, don't count on it making a 100% bootable USB or .iso file just yet.

 

EDIT: Replaced with a version without debug enabled.

 

Link to comment
Share on other sites

Yes sir. And looking at your dumps... I think we can make life a lot easier. Will have a go at it later tonight.

Cool. Let me know when you have something for me to test.

 

Thanks. I used them to check the RAM size, speed and type info. Seems to be ok so why not use it from the SMBIOS :)

I'm not sure what you mean, can you please give me some more details? as I have my static SMBIOS data which I currently use to boot from and it works fine.

 

Hey I know Birmingham. Well a bit of it. Was there last year visiting a friend of my father – more like his son really :D

Sometimes, it's a small world :(

Link to comment
Share on other sites

Thanks blackosx, will give it a go...

Okay. It will look a bit different to what you know, so I hope you don't think I've ruined your script. Also , it's my own test version so some of the code might be a bit messy :D

 

Note: The version you downloaded had my testing debug enabled. I've replaced the upload with a version without debug enabled.

 

Best to keep the whole structure together as a package, too easy to break with on misplaced file/version etc.

No problem. But do I detect a hint of sarcasm towards DHP's Revolution patches? If so, I think DHP is doing a great job. It's her project so however she want's to do it is up to her.

 

Now to try LION!!

Be out for rest of day...

Have fun. I'll be interested to hear your feedback after watching some of the videos on Apple's website. It looks like Gestures are taking over big time!!

Link to comment
Share on other sites

From what I see it looks great, although I usually worry about the Interface last, getting the code to do the right thing is my priority.

 

Will try the newer Version.

That's a good point STLVNUB and you're right, but I couldn't resist trying to make it more friendly. Whether or not it actually is more friendly is open to debate.

 

re: Updates

No sarcasm intended, No more words from me on THAT subject.

Lol.. okay no problem :P

 

re: Lion

BaseSystem.pkg NOW is BaseSystem.dmg on root..

boot.efi and kernelcache are on root as well NOT in the usual spot.

Packages Folder is in root too, hard linked to System/Installation.

BaseSystem.pkg in Packages is just links to the filesystem in BaseSystem.dmg, which saves about 1.3 gig in files.

I was thinking of implementing something similar in INSTAHackintosh.

 

This is the c.a.B.plist entry, very interesting.

.<key>Kernel Flags</key>

<string>root-dmg=file:///BaseSystem.dmg</string>

<key>Kernel Cache</key>

<string>\kernelcache</string>

Using ImageBoot to boot BaseSystem.dmg

Looks like it MAY be easier to get a LIVE system up and running using this.

Just need to boot it and thats the problem at the time being, but no great drama.

This will come in time.

Thanks for the info. I've since been having a look around and I see that Apple really have changed quite a few things.. Just as MC predicted in December 2009:

Here's a very important note: I'm told, by Apple employees, that they are going to change the boot process in 10.7. To speed it up. Basically invalidating Chameleon, BootTink and any other bootloader available in the scene!

 

This means that all hard work will be void one day soon, and that we have to start on back porting stuff into kexts again. Or at least be ready for it by getting EFI to work properly. Which may also be void when they start signing the boot code. Just bad news :(

 

@STLVNUB: I'll be holding off all public work towards getting OS X Lion to boot on a Hackintosh until after it is released and someone else made it work first. Can't be involved because that might put me and my family at risk. And we don't want that.

I fully understand.

 

We may want / be able to use the BIOS data from kSMBTypeMemoryDevice (type 17) and use that instead of using "N/A" for dynamic runs without OVERRIDE_DYNAMIC_MEMORY_DETECTION and/or USE_STATIC_RAM_SIZE set to 1. Much cleaner, but it requires a few new lines of source code

I like it DHP. You're clever with your source code. Let me know if you need anything else supplied. :)

Link to comment
Share on other sites

 Share

×
×
  • Create New...