ProjectOSX

Welcome Guest!

Returning User? Login here.

Want membership privileges? Register here.

8 Pages V   1 2 3 > »   
Start a new topicClosed
> My Bootloader, Chameleon 2 based
Slice
post Apr 8 2010, 10:40 AM
Post #1
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 rolleyes.gif 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)
Attached File  Cham2RC4_sl_v4.zip ( 1.67MB ) Number of downloads: 553
- 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=428
and 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? unsure.gif )
- 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 USER
Here 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.
Attached File  Extra_RC5s_428.zip ( 2.33MB ) Number of downloads: 251


I 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

Attached File  RC5m_659.zip ( 1.52MB ) Number of downloads: 161

It 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.
Attached File  RC5m_749.zip ( 1.6MB ) Number of downloads: 278

Not 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=15446

06.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
Attached File  Chameleon_2.0_RC5m_r1291.tar.gz ( 768.33K ) Number of downloads: 342

Bootable CD/DVD
Attached File  Chameleon_2.0_RC5m_r1291.iso.zip ( 776.31K ) Number of downloads: 209
i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.7), OS⌘10.9.5, OS⌘ 10.7.5 Clover HWSensors3 Realtek LAN v3.1.2
codex
post Apr 13 2010, 09:17 PM
Post #2
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 ! rolleyes.gif

// Staff: Do not quote a whole(long) post unless is relevant for you question.
yehia2amer
post May 25 2010, 04:18 PM
Post #3
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
Slice
post Dec 5 2010, 10:42 AM
Post #4
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.
i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.7), OS⌘10.9.5, OS⌘ 10.7.5 Clover HWSensors3 Realtek LAN v3.1.2
THe KiNG
post Dec 5 2010, 05:12 PM
Post #5
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.
Slice
post Dec 5 2010, 07:27 PM
Post #6
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.
i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.7), OS⌘10.9.5, OS⌘ 10.7.5 Clover HWSensors3 Realtek LAN v3.1.2
THe KiNG
post Dec 6 2010, 06:47 AM
Post #7
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. :|
Slice
post Dec 6 2010, 11:26 AM
Post #8
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. cool.gif
And, as usual, I decided to make my own version. Thus it's here.
i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.7), OS⌘10.9.5, OS⌘ 10.7.5 Clover HWSensors3 Realtek LAN v3.1.2
THe KiNG
post Dec 6 2010, 04:44 PM
Post #9
I think you should try again...
aikidoka25
post Dec 8 2010, 03:27 PM
Post #10
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)
Slice
post Dec 8 2010, 08:01 PM
Post #11
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?
i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.7), OS⌘10.9.5, OS⌘ 10.7.5 Clover HWSensors3 Realtek LAN v3.1.2
aikidoka25
post Dec 8 2010, 08:49 PM
Post #12
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! smile.gif

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)
aprodigy
post Dec 8 2010, 10:42 PM
Post #13
QUOTE (aikidoka25 @ Dec 8 2010, 09:49 PM) *
Only hardcore users visited projectosx! :)


OT: thank god! :)
scrax
post Dec 10 2010, 05:09 AM
Post #14
Great project Slice, I like a lot your post in general but this is spectacular smile.gif 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.
iFabio
post Dec 10 2010, 10:31 AM
Post #15
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
Slice
post Dec 10 2010, 01:33 PM
Post #16
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/smbios
http://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.
i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.7), OS⌘10.9.5, OS⌘ 10.7.5 Clover HWSensors3 Realtek LAN v3.1.2
3.14r
post Dec 11 2010, 03:23 PM
Post #17
Tiger 10.4.11 test results.

Issues(IMHO):
Attached File  BootScreen.jpg ( 63.66K ) Number of downloads: 92

Apple 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 DV1660se
CPU: 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 Attached File  info3.14r.zip ( 18.58K ) Number of downloads: 12

bdmesg not included as bash says - "Bad CPU type in executable"

This post has been edited by 3.14r: Dec 11 2010, 03:57 PM
some old harware
Slice
post Dec 11 2010, 08:50 PM
Post #18
Thanks.
QUOTE (3.14r @ Dec 11 2010, 07:23 PM) *
Tiger 10.4.11 test results.

Issues(IMHO):
Attached File  BootScreen.jpg ( 63.66K ) Number of downloads: 92

Apple 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 Attached File  info3.14r.zip ( 18.58K ) Number of downloads: 12

bdmesg not included as bash says - "Bad CPU type in executable"

Attached File  bdmesgTiger.zip ( 2.42K ) Number of downloads: 23

Attached File  iaslTiger.zip ( 217.62K ) Number of downloads: 9
i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.7), OS⌘10.9.5, OS⌘ 10.7.5 Clover HWSensors3 Realtek LAN v3.1.2
3.14r
post Dec 11 2010, 09:47 PM
Post #19
Welcom!
There is bdmesg. Attached File  bdmesg3.14r.txt ( 4.53K ) Number of downloads: 24
some old harware
d00d
post Dec 12 2010, 04:00 PM
Post #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
10.6.7:64:C2RC5:MacPro5,1:270-WS-W555-A1:A50:2xX5650@3.7GHz:GTX285:33066
10.6.4:64:C2RC5:MacPro4,1:GA-EX58-UD5:F12:W3520@4.1GHz:GTX285:14725
10.6.7:32:EFI:MacPro1,1:MA356LL/A:1.7f10:2x5150@2.66GHz:7300GT
10.6.3:32:C2RC4:MacBook3,1:T61:2.26:T7300@2GHz:X3100

8 Pages V   1 2 3 > » 
ClosedStart a new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members: