My Bootloader, Chameleon 2 based |
|
|

Apr 8 2010, 10:40 AM




- Advanced Member
- Group: Developer
- Posts: 5,566
I am not a member of Chameleon team but work with a help of Applelife.ru community.
-------------------------
Now RC5 based look below
-------------------------
I want to propose you my revision of bootloader based on Chameleon-2RC4-684. I take into account opensource additions by Recursor, Duvel, AsereBLN to make something working. I eliminated warnings, code doubles, logics mismatches.
About warning: take care about conversion from 32bit to 64bit.
About doubles: smbios.plist loaded twice or more in previous sources.
About logics. It has to be the follow: system uses a value from smbios.plist else default value. User can override it by boot-flag.
Correct mkext location in the case of Snow or Leopard/Tiger there are different.
Correct hibernation. This is an error in RC4 while good in RC3.
And my five cents:
- modern CPU detection, including i5, i7
- system-type written into registry
and into FACP: desktop, mobile, workstation, server.
- create ACPI20 structure for older computers having only ACPI10 pointer.
- OEMID = "Apple " for all ACPI tables

As well as MacModel and revision.
- ability to load multiple SSDT table. Details:
This feature made by Mozodojo (other russian programmer).
You may place SSDT.aml, SSDT-1.aml,... SSDT-9.aml into /Extra and bootloader takes all of them.
If you set
DropSSDT=YES then all previous SSDT tables will be dropped.
If you set
oemSSDT=YES then your tables don't be applied.
Else your SSDT entries will be added to RSDT/XSDT tables.
We propose that no need to patch DSDT for new inserted devices. It is better for any new device just add its own SSDT table. Aka driver.
And I am thinking about to make universal SSDT for USB. It is more simple for novices to add this SSDT into /Extra then patch DSDT.
Here it is. Sources and binaries. (Ya, as I take open source I must publish my sources)
Cham2RC4_sl_v4.zip ( 1.67MB )
Number of downloads: 517 - sources
I think I need no provide explanation about old smbios and boot keys as well as "How to install".
07.04.2010
It seems RestartFix can't be applied to ACPI_10 structure. Use RestartFix=NO if you have a problem.
-------------------------------------------------------------------------------
05.12.2010
As I see Chameleon team is not interesting in my corrections. RC5 is still without its.
So I have to propose my version based on RC5-rev650. My sources located at Assembla, same place as FakeSMC
https://www.assembla.com/code/fakesmc/subve...ameleon?rev=428and I have new revision numeration. Now RC5s-428.
Change log:
- all corrections that I said above;
- new devIDs for NVidia and ATI for CraphicsEnabler feature;
- "display-cfg" property injecting as
suggested by Jingu- no more messages like "Read HFS+ file [xxx]xxx.kext....". It was too slow and no infos!
- correct PMProfile 1=Desktop, 2=Mobile.
- correct BusSpeed, CurrectCPUSpeed, MaxCPUSpeed
- correct NoCores, NoThreads
- correct UUID to String conversions (for a what?

)
- correct SMBIOS reading and patching procedures, other cleanup.
The job is not finished. I know mistakes about boot-order, GUI quirks, UUID problems.
I have ideas about NVRAM, SMBIOS, BootOrder.
But I need feedback. Please inform me about bugs, your suggestions, ideas.
Attach
QUOTE
bdmesg >bdmesgUSER.txt
ioreg -pIODeviceTree -lxw0 >ioregUSER.txt
Use your Nick instead of
USERHere is my Extra folder with my sample smbios.plist, Boot.plist and themes. Inside you find a folder
i386 where is my Bootloader and tools.
Look also fdisk, it is better then vanilla 10.6.5.
Extra_RC5s_428.zip ( 2.33MB )
Number of downloads: 226I think Meklort is creating the best bootloader ever been. So I decided to apply my patches to his branch.
And now I have my own branch at VoodooProjects
CODE
svn co -r HEAD http://forge.voodooprojects.org/svn/chameleon/branches/slice
RC5m_659.zip ( 1.52MB )
Number of downloads: 139It works also for Tiger.
31.01.2011
Now kernelchache is loaded. Also beta attempt for OHCI reset as proposed by THeKiNG. (USB.dylib)
New modules structure as Meklort did: now modules Symbols.dylib and ACPIPatcher.dykib are embedded and you can boot without any modules. Only boot file and themes, boot.plist and smbios.plist.
22.03.2011
There is a last version with GUI corrections.
RC5m_749.zip ( 1.6MB )
Number of downloads: 270Not for LION!22.07.2011
Now the version for Lion as well as for Snow, Leo and even for Tiger. It is based on Chameleon 2 RC5-rev1200 with differencies explained in the thread
http://www.projectosx.com/forum/index.php?...ost&p=1544606.08.2011
i hope it is my final version. After some testing I exclude instant reboot on some CPU. It was XCode bug.
Now I have working modules Resolution, NVRAM and KernelPatcher (by Meklort with cparm corrections).
The last one is not tested. It is intended for Atom CPU and lapic patches on the fly.
Package
Chameleon_2.0_RC5m_r1291.tar.gz ( 768.33K )
Number of downloads: 302Bootable CD/DVD
Chameleon_2.0_RC5m_r1291.iso.zip ( 776.31K )
Number of downloads: 177

Apr 13 2010, 09:17 PM

- Initiate
- Group: Comrade
- Posts: 3
Thank u for this Slice
btw: what about SBST, can u please do something about it (have no one, maybe we could get rid of voodoobattery with this). I know it's more complicated than that, but !
// Staff: Do not quote a whole(long) post unless is relevant for you question.

May 25 2010, 04:18 PM

- Initiate
- Group: Comrade
- Posts: 18
is there anyway to make this fix in the boot-loader, not editing the vanillia kernel
this will solve CPUS=1 in all i7,i5 insyde bios hp users
any help will be appreciated
that's the kernel fix
download the xnu source for 10.6.3 form opensource apple and unpack it
find the problematic file lapic.c in the path xnu-1504.3.12/osmfk/i386/lapic.c
use search to find : /* ExtINT */ and after the third instance [inside the lapic_configure() ] you add 2 lines of code :
/* NMI: ummasked, off course */
LAPIC_WRITE(LVT_LINT1, LAPIC_LVT_DM_NMI);
soo the code will look like this:
----------------------------------------------------------
/* ExtINT */
if (get_cpu_number() == master_cpu) {
value = LAPIC_READ(LVT_LINT0);
value &= ~LAPIC_LVT_MASKED;
value |= LAPIC_LVT_DM_EXTINT;
LAPIC_WRITE(LVT_LINT0, value);
}
/* NMI: ummasked, off course */
LAPIC_WRITE(LVT_LINT1, LAPIC_LVT_DM_NMI);
/* Timer: unmasked, one-shot */
LAPIC_WRITE(LVT_TIMER, LAPIC_VECTOR(TIMER));
-----------------------------------------------------------------
save the file and compile the kernel.
you should have xcode installed
N.B:
i have already tried a modded apic.aml file with Anv bootloader, as the original one from Pavilion was missing some parts at the end compared to the MacBook Pro apic.aml (related to NMI too !!!)
[0CCh 0204 1] Subtable Type : 04 <Local APIC NMI>
[0CDh 0205 1] Length : 06
[0CEh 0206 1] Processor ID : 00
[0CFh 0207 2] Flags (decoded below) : 0005
Polarity : 1
Trigger Mode : 1
[0D1h 0209 1] Interrupt Input LINT : 01
the modded file is loading fine but i still have the Panic with the vanilla kernel

Dec 5 2010, 10:42 AM




- Advanced Member
- Group: Developer
- Posts: 5,566
I still don't know how to make this patch, but with new bootloader may be some other observations?
As I see Chameleon team (is it a team or just some people?) didn't here me about mistakes in RC4 and made RC5 with the same quirks. But my version is only working version for Tiger.
So I decided to make my bootloader again based on RC5-650 working for Tiger, Leo and Snow.
It topic I said about what news and uploaded working version.
I don't like to work lonely and I need discussions, bug reports, ideas.
TODO
1.
AppleSMBIOS uses tables of types 0,1,2,3,4,6,7,9,16,17,128,130,131,132 but not all of them usually presents in PC BIOS, and often is not correctly filled. It is not a big problem to fill all of then automatically and by smbios.plist. Not done yet.
2.
bless tool asked for properties FirmwareFeature, FirmwareFeatureMask, BootOrder, boot#, boot-args. I can implement it at boot stage but some discussion needed. Also StartupDisk.prefPane depends on its.
3. I encountered some graphics problem in gui.
4. I have not modern ATIRadeon so I can't check what is the influence of ATY,RefCLK and so on properties, but RC5 injected wrong values. And not all DeviceID is present in native ATI*.kexts so it will be good to inject fakeDeviceID for each Radeon family.
5. I can read previous values of NVRAM so it is possible to implement default boot order settings by StartupDiskPrefPane. It is also possible to make VoodooHDA settings saved during reboot. New version of VoodooHDA needed.
6. Include GMA into graphics enabler. Initial version present by Nawcom and found in Meklort branch is wrong.
CODE
uint8_t GMAX3100_vals[22][4] = {
Contains only 20x4 values.
And most of the values wrong or not needed.
Chameleon team is going ignore me again and release rc6? Lets go.

Dec 5 2010, 05:12 PM

- Advanced Member
- Group: Staff
- Posts: 714
Nobody is ignoring you...
But you should start a branch on official chameleon repo:
http://forge.voodooprojects.org and summit bug reports like other does..
That way everybody can see them w/o jumping b/w forums and add them to trunk.

Dec 5 2010, 07:27 PM




- Advanced Member
- Group: Developer
- Posts: 5,566
My sources downloaded 333 times. I don't think voodoo never saw it.
But bug report is a very long and questional story. One thinks a bug, other has own opinion. Ultimate result will be a full bug report.

Dec 6 2010, 06:47 AM

- Advanced Member
- Group: Staff
- Posts: 714
QUOTE (Slice @ Dec 5 2010, 09:27 PM)

My sources downloaded 333 times. I don't think voodoo never saw it.
But bug report is a very long and questional story. One thinks a bug, other has own opinion. Ultimate result will be a full bug report.
I understand what you mean and also understand that you like to work alone, but you must understand how things goes with chameleon...
Join the happy crew, make your own branch like most did, and put your stuff there and I'm sure if you have something good to show it will be noticed and added to trunk.
You can also join on
irc.voodooprojects.org #chameleon and talk there your opinions with faster response...
I really hate how things
are NOT organized over the osx86 world, source all over, is damn hard to keep a track or to find a good source. :|

Dec 6 2010, 11:26 AM




- Advanced Member
- Group: Developer
- Posts: 5,566
No I do not like to work alone. VoodooHDA with AutumnRain until he disappeared, FakeSMC with Mojodojo and Usr-sse2.
This project is also with Mojodojo who is a member of voodoo team. But when I was trying to speak with someone of the team I encounter a hard wall.
And, as usual, I decided to make my own version. Thus it's here.

Dec 6 2010, 04:44 PM

- Advanced Member
- Group: Staff
- Posts: 714
I think you should try again...

Dec 8 2010, 03:27 PM



- Member
- Group: Comrade
- Posts: 67
Slice,
How about kernel auto patching for Atom processor?
The reason I am using meklort's branch on HP Mini 311 because it has this feature.
We need it to boot with vanilla mach_kernel.
Meklort is using modules/dynamic library approach, the idea is good, means one can add feature to the booter without modifying boot.c.
Cheers
MacBookMini 311-1000, 1 + Kingston 2GB, HP BCM94322, OCZSSD2-1VTX120G, 10.6.8 i386, Chameleon RC5 Meklort's rev 747 (
info)
GigaMacPro GA-EX58-UD5, Core™ i7-920 2.66GHz Bloomfield, Corsair XMS3 6x2GB, Sapphire ATI HD4870 1GB, 10.8.2 x86_64, Chameleon 2.0 rev 1997 (
info)

Dec 8 2010, 08:01 PM




- Advanced Member
- Group: Developer
- Posts: 5,566
QUOTE (aikidoka25 @ Dec 8 2010, 07:27 PM)

Slice,
How about kernel auto patching for Atom processor?
The reason I am using meklort's branch on HP Mini 311 because it has this feature.
We need it to boot with vanilla mach_kernel.
Meklort is using modules/dynamic library approach, the idea is good, means one can add feature to the booter without modifying boot.c.
Cheers
Not sure that one can create dyld but can't rebuild boot. The same procedure.
A sense may be with less memory. I don't know. May be later I accept the module idea but now I just want to have full working bootloader.
About Atom CPU yes, I can include it if Meklort has no objections. Or just include copyright?

Dec 8 2010, 08:49 PM



- Member
- Group: Comrade
- Posts: 67
QUOTE (Slice @ Dec 8 2010, 03:01 PM)

Not sure that one can create dyld but can't rebuild boot. The same procedure.
A sense may be with less memory. I don't know. May be later I accept the module idea but now I just want to have full working bootloader.
About Atom CPU yes, I can include it if Meklort has no objections. Or just include copyright?
Before using modules, the patch was done directly in boot.c, and i remember seeing teateam name in that particular function.
As for the new one, I am not sure anymore who the author is. But it is open source anyway and it should be no problem if you are incorporating it, like you said, just include copyright.
I am agree with the idea to create a branch at voodooprojects svn, if you guys could settle all the differences, i think you will get more exposure for your talent and the community will get benefits from it too.
I didn't aware you have another branch here until you replied my post on insanelymac! Only hardcore users visited projectosx!
This post has been edited by aikidoka25: Dec 8 2010, 08:51 PM
MacBookMini 311-1000, 1 + Kingston 2GB, HP BCM94322, OCZSSD2-1VTX120G, 10.6.8 i386, Chameleon RC5 Meklort's rev 747 (
info)
GigaMacPro GA-EX58-UD5, Core™ i7-920 2.66GHz Bloomfield, Corsair XMS3 6x2GB, Sapphire ATI HD4870 1GB, 10.8.2 x86_64, Chameleon 2.0 rev 1997 (
info)

Dec 8 2010, 10:42 PM

- Advanced Member
- Group: Root Administrators
- Posts: 146
QUOTE (aikidoka25 @ Dec 8 2010, 09:49 PM)

Only hardcore users visited projectosx! :)
OT: thank god! :)

Dec 10 2010, 05:09 AM


- Member
- Group: Comrade
- Posts: 29
Great project Slice, I like a lot your post in general but this is spectacular

I'll try it as soon as I learn how to download sources from assembla...
by the way, the RC5s-428 binaries are posted somewhere? In the download section of assembla I haven't seen them.
Snow Leo 10.6.2 ASUS P5KC P35-ICH9 Intel E6750 @ 2.66Ghz 4x2GB DDR2 800 NVIDIA 8600GT 256MB ALC883 HD+DVD SATA
DSDT: SATA, HPET, SBUS, GFX, RTC, USB, AUDIO, Speedstep .kext only for jmicron, audio, lan, smc, no disabler.

Dec 10 2010, 10:31 AM


- Initiate
- Group: Comrade
- Posts: 18
Hi Slice.
I just downloaded and compiled the last revision (428),
And from (very) first look... appear all perfect! (more test needed)...
I have a question
(relate to "cosmetics" inside the system profiler)(I copy and paste one my old post from InsanelyMac)QUOTE
I was convinced that the "
Serial Number (system): xxxxxxxxxxx" & "
SMC Version (processor tray): X.XXXX"
was only available on dual-processor motherboards, I was wrong.
CODE
Model Name: Mac Pro
Model Identifier: MacPro4,1
Processor Name: Quad-Core Intel Xeon
Processor Speed: 2.66 GHz
Number Of Processors: 1
Total Number Of Cores: 4
L2 Cache (per core): 256 KB
L3 Cache: 8 MB
Memory: 16 GB
Processor Interconnect Speed: 4.8 GT/s
Boot ROM Version: MP41.0081.B03
SMC Version (system): 1.39f5
SMC Version (processor tray): 1.39f5
Serial Number (system): xxxxxxxxxxx
Serial Number (processor tray): xxxxxxxxxxxxx
Hardware UUID: xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
I saw that other bootloader, using the key
SMproccessortray inside smbios.plist for add this value for the processor tray (Serial number).
We could also use it on Chameleon 2 RC5?
Other cosmetic gadgets... I know.
I know is pure cosmetics... but...
Is possible add this two "keys" into the smbios_patcher.c/.h ?
For a "similar" result? -->
look the first post of this link or
look the post #57 of this...
other Example here...
Thanks.
Fabio
This post has been edited by iFabio: Dec 10 2010, 10:36 AM
MotherBoard: Asus P6T Deluxe V.1 BIOS version 2101
CPU: Intel Core i7 940 @2.93 stock speed
RAM: (12GB) Corsair Dominator DDR3 1600MHz TR3X6G1600C8D
GPU: Nvidia Quadro FX 5600 1,5 Gb DDR3 (id: 0x10de 0x019d)
BURNER: LG GGW-H20L (SATA-4)
OS: (OSX 10.5.8 / 10.6.2) Bootloader: (Chameleon 2 RC5pre8 SATA-1)/ (AsereBNL v.1.1.9 SATA-2)/ My custom DSDT v3.1.4
Geekbench (64 bit mode): OSX 10.5.8 stock speed 10313 / OSX 10.6.2 stock speed 10616

Dec 10 2010, 01:33 PM




- Advanced Member
- Group: Developer
- Posts: 5,566
QUOTE (iFabio @ Dec 10 2010, 02:31 PM)

Hi Slice.
I just downloaded and compiled the last revision (428),
And from (very) first look... appear all perfect! (more test needed)...
I have a question
(relate to "cosmetics" inside the system profiler)(I copy and paste one my old post from InsanelyMac)I know is pure cosmetics... but...
Is possible add this two "keys" into the smbios_patcher.c/.h ?
For a "similar" result? -->
look the first post of this link or
look the post #57 of this...
other Example here...
Thanks.
Fabio
Yes, it is possible, but... there is no such field in SMBIOS.
http://www.dmtf.org/standards/smbioshttp://opensource.apple.com/source/AppleSM...AppleSMBIOS-41/or it has another name?
CODE
struct SMBProcessorInformation {
// 2.0+ spec (26 bytes)
SMB_STRUCT_HEADER // Type 4
SMBString socketDesignation;
SMBByte processorType; // CPU = 3
SMBByte processorFamily; // processor family enum
SMBString manufacturer;
SMBQWord processorID; // based on CPUID
SMBString processorVersion;
SMBByte voltage; // bit7 cleared indicate legacy mode
SMBWord externalClock; // external clock in MHz
SMBWord maximumClock; // max internal clock in MHz
SMBWord currentClock; // current internal clock in MHz
SMBByte status;
SMBByte processorUpgrade; // processor upgrade enum
// 2.1+ spec (32 bytes)
SMBWord L1CacheHandle;
SMBWord L2CacheHandle;
SMBWord L3CacheHandle;
// 2.3+ spec (35 bytes)
SMBString serialNumber; // seems to be Serial Number (processor tray). In my case empty.
SMBString assetTag;
SMBString partNumber;
};
I think I need to remake my bootloader to Meklort structure. He made best bootloader so far.

Dec 11 2010, 03:23 PM



- Member
- Group: Comrade
- Posts: 25
Tiger 10.4.11 test results.
Issues(IMHO):
BootScreen.jpg ( 63.66K )
Number of downloads: 90Apple logo seems stretched
Hardware UUID is not show correctly or not shown at all
Retart/Shutdown doesn't work (no complete power-off)
OS info:
Vanilla OS X (MacBookPro2,2 Install DVD image used) restored to a separate partition then installed to a target partition using flash (USB) boot drive with the above boot loader.
Vanilla kernel.
Extra: PS2 driver, fakeSMC (tiger version from the link)
/S/L/E extra: AppleAzaliaAudio.kext, IONetworking with DEV/VEN ID added.
HW info:
HP Pavilion DV1660seCPU: CoreDuo T2500 (not stock - upgraded)
RAM: 2Gb
Chipset: Intel 945GM (Calistoga-GM) + ICH7-M/U
Audio: Conexant CX20551 (Waikiki) (works with AZAL instead of HDEF in DSDT and Azal kext)
LAN: Intel PRO/100 VE (not working - driver fails to load properly)
WLAN: Atheros AR5001 (not working - driver fails to load properly)
Report info:
Includs: DSDT, IOreg
info3.14r.zip ( 18.58K )
Number of downloads: 12bdmesg not included as bash says - "Bad CPU type in executable"
This post has been edited by 3.14r: Dec 11 2010, 03:57 PM

Dec 11 2010, 08:50 PM




- Advanced Member
- Group: Developer
- Posts: 5,566
Thanks.
QUOTE (3.14r @ Dec 11 2010, 07:23 PM)

Tiger 10.4.11 test results.
Issues(IMHO):
BootScreen.jpg ( 63.66K )
Number of downloads: 90Apple logo seems stretched
Hardware UUID is not show correctly or not shown at all
Retart/Shutdown doesn't work (no complete power-off)
BootScreen needs to be adjusted by themes.plist. But I know, there are GUI mistakes.
About UUID the work in progress. There are many related things like "/options"
Retart/Shutdown never works in Tiger with vanilla kernel. Needs patched kernel or OpenHaltRestart_Tiger version.
QUOTE
Report info:
Includs: DSDT, IOreg
info3.14r.zip ( 18.58K )
Number of downloads: 12bdmesg not included as bash says - "Bad CPU type in executable"
bdmesgTiger.zip ( 2.42K )
Number of downloads: 22
iaslTiger.zip ( 217.62K )
Number of downloads: 9

Dec 11 2010, 09:47 PM



- Member
- Group: Comrade
- Posts: 25
Welcom!
There is bdmesg.
bdmesg3.14r.txt ( 4.53K )
Number of downloads: 21

Dec 12 2010, 04:00 PM

- Initiate
- Group: Comrade
- Posts: 20
Were changes from forge.voodooprojects.org's RC5 build 643 made to other than the boot file code?
I compiled Slice's www.assembla.com RC5 build 438, then replaced just the boot file on my EVGA and got a KP with either 32 or 64bit boot;
AppleACPIPlatformExpert::start failed
"Unable to find driver for this platform: \"ACPI\".\n"
This post has been edited by d00d: Dec 12 2010, 04:00 PM