My Bootloader, Chameleon 2 based |
|
|

Jul 27 2011, 06:41 AM




- Advanced Member
- Group: Developer
- Posts: 5,543
QUOTE (nobb1x @ Jul 26 2011, 02:20 PM)

hello, i'm trying rev1208 with lion. i get a immediate reset after the initial loading,i tried erasing cache,with -x,with -f, with no changes. currently i'm using a usb stick for boot and the bootloader is installed on it.
Using -v i can see (until it reboot)
(...smbios infos...)
Actual modelname is 'N/A
/ (i see some activity on the hdd)
Starting darwin kernel (immediate reboot)
the smbios infos appear as parsed correctly,cpu recognized too with correct clock.
my system (a laptop) boot ok with chameleon v1187.
this is the Extra folder i use with the loader.
[attachment=3682:Extra.zip]
fakesmc and ps2 support are on S/L/E.
Exclude KernelPatcher.dylib. It is not work yet.

Aug 1 2011, 01:25 AM




- Advanced Member
- Group: Comrade
- Posts: 387
Hy Slice!!!
I did a test with your Bootloader and a strange thing happened ...
System performance in general improved, however, I was slow video...
Actually I was very confused, QE/CI were fully active, the system started much more faster, as the applications, but the video slow ...
Here are my details if you need >
http://www.mediafire.com/file/u6478vq09f01bh5/Slice.zipThank you.
GA-P67A-D3-B3 Firmware Ua5 / Core i5-2300 Sandy Bridge / Geekbench

Aug 1 2011, 12:04 PM




- Advanced Member
- Group: Developer
- Posts: 5,543
Compared to?
1. Other OS version
2. Other Chameleon version
3. XPC bootloader

Aug 1 2011, 02:19 PM




- Advanced Member
- Group: Comrade
- Posts: 387
QUOTE (Slice @ Aug 1 2011, 09:04 AM)

Compared to?
1. Other OS version
2. Other Chameleon version
3. XPC bootloader
Compared with the same OS version (Lion) and the currently Build that i'm using 1187.
GA-P67A-D3-B3 Firmware Ua5 / Core i5-2300 Sandy Bridge / Geekbench

Aug 2 2011, 05:54 AM




- Advanced Member
- Group: Developer
- Posts: 5,543
So it seems to be an GPUPM that is switched on on my version of Chameleon vs off in trunk version.
my propositions:
Try to tune
/System/Library/Extensions/AppleGraphicsControl.kext
/System/Library/Extensions/AppleGraphicsPowerManagement.kext
/System/Library/Extensions/IOPlatformPluginFamily.kext/Contents/PlugIns/ACPI_SMC_PlatformPlugin.kext/Contents/Resources
Or I can remake my Chameleon if you are interesting.

Aug 3 2011, 06:40 PM




- Advanced Member
- Group: Comrade
- Posts: 387
QUOTE (Slice @ Aug 2 2011, 02:54 AM)

So it seems to be an GPUPM that is switched on on my version of Chameleon vs off in trunk version.
my propositions:
Try to tune
/System/Library/Extensions/AppleGraphicsControl.kext
/System/Library/Extensions/AppleGraphicsPowerManagement.kext
/System/Library/Extensions/IOPlatformPluginFamily.kext/Contents/PlugIns/ACPI_SMC_PlatformPlugin.kext/Contents/Resources
Or I can remake my Chameleon if you are interesting.
Wow!
Do not need all this work ...
You've helped me a lot to show me the way ...
If I can make the adjustments I tell you the result ...
Thanks...
GA-P67A-D3-B3 Firmware Ua5 / Core i5-2300 Sandy Bridge / Geekbench

Aug 6 2011, 05:19 PM




- Advanced Member
- Group: Developer
- Posts: 5,543
After testing with www.applelife.ru I made working version 1291.
Downloads in topic.
Modules NVRAM and KernelPatcher has special assignment.
NVRAM creates an ability to store variables during reboot. With the module you may see UUID as Mac-address.
KernelPatcher is intended for Atom CPU and for lapic patch. It is not my sources, I just made it starting. May be after some testing we can make it fully working.

Aug 11 2011, 04:17 PM


- Initiate
- Group: Comrade
- Posts: 21
Hi, Slice. I need your help. I adpot your RestartFix code, but I am sure it can't be load correctly, I add some verbose line and the output show fail:
CODE
/**********************************/
// Restart Fix
if (Platform.CPU.Vendor == 0x756E6547) { /* Intel */
fix_restart = true;
value = getStringForKey(kRestartFix, &bootInfo->chameleonConfig);
verbose("value[0] is \n", value[0], "Key is \n", kRestartFix);
if (value[0] == 'A') {
fix_restart_acpi = true;
verbose("FADT: ACPI\n");
} else if (value[0] == 'P') {
fix_restart_acpi = false;
verbose("FADT: PS2\n");
} else {
fix_restart = false;
verbose("FADT: Fail\n");
}
} else {
verbose ("Not an Intel platform: Restart Fix not applied !!!\n");
fix_restart = false;
}
/**********************************/
Output as below:
/**********************************/
value[0] is
FADT: Fail
FADT: Using custom DSDT!
value[0] is
FADT: Fail
FADT: Using custom DSDT!
/**********************************/
I add your changes base on the latest trunk source
acpi_patcher.txt ( 36.92K )
Number of downloads: 7 This post has been edited by kingoffright: Aug 11 2011, 04:18 PM

Aug 11 2011, 07:35 PM




- Advanced Member
- Group: Developer
- Posts: 5,543
Your mistake is here
CODE
verbose("value[0] is \n", value[0], "Key is \n", kRestartFix);
Should be
CODE
verbose("value[0] is %c \n Key is %s\n", value[0], kRestartFix);

Aug 12 2011, 05:01 AM


- Initiate
- Group: Comrade
- Posts: 21
Hi, Slice, thanks for the debug code. Now the output as below, I don't know why it get the 'S' value?!
CODE
value[0] is S
Key is RestartFix
FADT: Fail
FADT: Using custom DSDT!
value[0] is S
Key is RestartFix
FADT: Fail
FADT: Using custom DSDT!
And my RestartFix value is PS2
CODE
<key>RestartFix</key>
<string>PS2</string>

Aug 12 2011, 06:45 AM




- Advanced Member
- Group: Developer
- Posts: 5,543
Hmm. It looks like value[1]... I can propose that
CODE
value = getStringForKey(kRestartFix, &bootInfo->chameleonConfig);
makes a shifted value.
Try to print the whole string
CODE
verbose("value is %s \n Key is %s\n", value, kRestartFix);
May be the problem that your config file saved as Unicode?

Aug 12 2011, 11:07 AM


- Initiate
- Group: Comrade
- Posts: 21
seems the value array get from wrong place? Cause I change the key value to ABCDEFG, it still get 'S'
CODE
<key>RestartFix</key>
<string>ABCDEFG</string>
I show the whole value of value, but seems it only get one element?
IMG_0031_19_04_32_.jpg ( 67.42K )
Number of downloads: 25and my plist is same format as yours, it's unicode(UTF-8)
Also I see all the source which will use getStringForKey return as a bool value
CODE
const char *boardid = getStringForKey("SMboardproduct", &bootInfo->smbiosConfig);
if (boardid)
DT__AddProperty(node, BOARDID_PROP, strlen(boardid)+1, (EFI_CHAR16*)boardid);
This post has been edited by kingoffright: Aug 12 2011, 11:24 AM

Aug 14 2011, 07:06 PM




- Advanced Member
- Group: Developer
- Posts: 5,543
CODE
if (boardid)
means if boardid is not zero. But it doesn't mean that the type is Boolean.
It looks like trunk sources is not good enough to do such patch.

Aug 15 2011, 05:53 AM


- Initiate
- Group: Comrade
- Posts: 21
QUOTE (Slice @ Aug 14 2011, 07:06 PM)

CODE
if (boardid)
means if boardid is not zero. But it doesn't mean that the type is Boolean.
It looks like trunk sources is not good enough to do such patch.
Hi, Slice, it solved. The reason is my boot plist has some comments like <!-- ... -->, this cause the XML praser fail to get the correct keey, now it raised as issue 137 pending be solved. Thanks

Aug 15 2011, 10:40 AM



- Member
- Group: Comrade
- Posts: 55
Hi slice, I am very interest in your revision of bootloader, but when i install it on my laptop, stopped by auto reboot. By using the -f option, it shows actual mod:xxx
Here is my information:
Archive.zip ( 394.33K )
Number of downloads: 9
Windows 7 SP1+ Snow leopard 10.6.8
CPU : T2390 Ram : 2G=2*1G Graphics : Intel X3100 Ethernet: BCM5906 Wireless: BCM4312 Audio Card: ALC861-VD (Fully working)
.

Aug 15 2011, 01:51 PM




- Advanced Member
- Group: Developer
- Posts: 5,543
QUOTE (tmacyunn1 @ Aug 15 2011, 02:40 PM)

Hi slice, I am very interest in your revision of bootloader, but when i install it on my laptop, stopped by auto reboot. By using the -f option, it shows actual mod:xxx
Here is my information:
Archive.zip ( 394.33K )
Number of downloads: 9I see no mistakes.
Try to exclude my modules from Extra to check if you can boot without.

Aug 15 2011, 04:37 PM



- Member
- Group: Comrade
- Posts: 55
QUOTE (Slice @ Aug 15 2011, 01:51 PM)

I see no mistakes.
Try to exclude my modules from Extra to check if you can boot without.
I try to exclude the modules but no luck, still auto reboot.
Windows 7 SP1+ Snow leopard 10.6.8
CPU : T2390 Ram : 2G=2*1G Graphics : Intel X3100 Ethernet: BCM5906 Wireless: BCM4312 Audio Card: ALC861-VD (Fully working)
.

Aug 16 2011, 06:22 AM




- Advanced Member
- Group: Developer
- Posts: 5,543
QUOTE (tmacyunn1 @ Aug 15 2011, 08:37 PM)

I try to exclude the modules but no luck, still auto reboot.
Clear kernelcache and start with -v -f. What is the stop point?

Aug 16 2011, 06:49 AM



- Member
- Group: Comrade
- Posts: 55
QUOTE (Slice @ Aug 16 2011, 06:22 AM)

Clear kernelcache and start with -v -f. What is the stop point?
I do it as you said, when using -v -f , it prints the cpu info and memory slot info, after the "Actual mode is XXXX" appears it stopped and auto reboot . It seems like the bootloader can't read information from hardware drive, here is my HDD partition table is MBR structure, the output result is :
CODE
yuns-MacBook:~ zpRood$ diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *320.1 GB disk0
1: Windows_NTFS System 116.0 GB disk0s1
2: Apple_HFS Macintosh 150.3 GB disk0s2
3: Linux 26.8 GB disk0s3
4: Linux 26.9 GB disk0s5
yuns-MacBook:~ zpRood$
Windows 7 SP1+ Snow leopard 10.6.8
CPU : T2390 Ram : 2G=2*1G Graphics : Intel X3100 Ethernet: BCM5906 Wireless: BCM4312 Audio Card: ALC861-VD (Fully working)
.

Aug 16 2011, 11:33 AM




- Advanced Member
- Group: Developer
- Posts: 5,543
Next message may be wake from hibernate... Try "Use ForceWake=y to override" or something with SleepImage.
My bootloader vs trunk will try to wake from hibernate.