Forum Archive Old/outdated threads will end up here.

 
 
LinkBack Thread Tools Display Modes
  (#151) Old
Junior Member
 
Posts: 5
Join Date: Nov 2009
Default 11-12-2009, 01:27 PM

Quote:
Originally Posted by meklort View Post
As stated in my blog, I'm going to upload all of the source changes to Chameleon as well as SleepEnabler later today, but the patch consists of this (more or less). It's not very nice, but it works. I've also modified ThinFatFile to set binaryOffset to the x84 offset of the mach file. I finally call patch_kernel after LoadThinFatFile is called with the kernel path.

Code:
/*
 * Copyright (c) 2009 Evan Lojewski. All rights reserved.
 *
 */

#include "libsaio.h"
#include "patch.h"

extern void* binaryOffset;

struct patch_entry
{
	char *addr;
	char byte;
	char oldByte;
};

// Kernel path by tea
struct patch_entry patch_table[] =
{
	{ (char*) 0x005E6A8A, 0x31, 0x83 },
	{ (char*) 0x005E6A8B, 0xC0, 0xE8 },
	{ (char*) 0x005E6A8C, 0x40, 0x0D },
	{ (char*) 0x00000000, 0x00, 0x00 }
};
	


void patch_kernel(void* kernel_addr)
{
	int i;
	
	for(i = 0; patch_table[i].addr != 0; i++)
	{
		char* addr = (unsigned long)kernel_addr + patch_table[i].addr - (unsigned long)binaryOffset;
		if(((*addr) & 0xFF) != (patch_table[i].oldByte & 0xFF)) 
		{
			verbose("Failed to match 0x%X with 0x%X\n", *addr & 0xFF, patch_table[i].oldByte & 0xFF);

			return;
		}
	}
	
	for(i = 0; patch_table[i].addr != 0; i++)
	{
		char* addr = (unsigned long)kernel_addr + patch_table[i].addr - (unsigned long)binaryOffset;

		verbose("Replacing 0x%X with 0x%X at 0x%X\n", *addr & 0xFF, patch_table[i].byte & 0xFF, addr, patch_table[i].byte & 0xFF);
		*(addr) = (patch_table[i].byte & 0xFF);
	}
}
Thanks a heaps. Appreciate it - kudos for your fast reply

Edit : makes sense why it idd not work on Atom 3xx series , its specific for Atom N270 series :P
  (#152) Old
Guru
 
meklort's Avatar
 
Posts: 1,353
Join Date: Feb 2009
Location: Colorado, USA
Send a message via AIM to meklort Send a message via MSN to meklort Send a message via Yahoo to meklort
Default 11-12-2009, 01:27 PM

I didn't figure out the patch for the cpu, just patched chameleon. Credit should go to tea.


Dell Mini 9 | Mac OS X 10.6.5 | 2 GB RAM | 32 GB Buffalo SSD | BIOS A05
Dell Mini 10v | Mac OS X 10.6.5 | 1 GB RAM | 160 GB HDD | BIOS A06
My Blog | NetbookInstaller code repository | NetbookInstaller Website | Want a Lockerz.com invite? message me.
  (#153) Old
Junior Member
 
Posts: 5
Join Date: Nov 2009
Default 11-12-2009, 01:41 PM

Quote:
Originally Posted by meklort View Post
I didn't figure out the patch for the cpu, just patched chameleon. Credit should go to tea.
Credits to you too for figuring out on how to play nice with chameleon. I guess i'll have to ask modbin or someone whos good in hacking the binaries to figure that out. Thanks again meklort for your speed reply. i thought you managed to do CPUID patching on the fly for Atom series and other processors. Anyway great job on slicing it up together with chameleon :P
  (#154) Old
Guru
 
meklort's Avatar
 
Posts: 1,353
Join Date: Feb 2009
Location: Colorado, USA
Send a message via AIM to meklort Send a message via MSN to meklort Send a message via Yahoo to meklort
Default 11-12-2009, 01:48 PM

It actually wouldn't be *too* hard to do that. I could have chameleon look for the cpuid_set_info and change the function to the version included in an older kernel (or just patch the section that calls cpuid_set_generic_info / patch that functions itself...

Hmm... Now I'm going to have to do that (after all, it'd support new versions of OS X and old ones...)


Dell Mini 9 | Mac OS X 10.6.5 | 2 GB RAM | 32 GB Buffalo SSD | BIOS A05
Dell Mini 10v | Mac OS X 10.6.5 | 1 GB RAM | 160 GB HDD | BIOS A06
My Blog | NetbookInstaller code repository | NetbookInstaller Website | Want a Lockerz.com invite? message me.
  (#155) Old
Super Moderator
 
bmcclure937's Avatar
 
Posts: 1,420
Join Date: Mar 2009
Location: United States
Send a message via AIM to bmcclure937
Default 11-12-2009, 06:44 PM

*Thread Closed*

There is no longer any need to discuss rumors about 10.6.2 since Meklort has released NBI .8.3RC4, which handles the 10.6.2 kernel issues. Please refer to the .8.3RC4 announcement thread for further discussions about getting OSX 10.6.2 running on your Mini

http://www.mydellmini.com/forum/mac-...4-testing.html

If you have installed OSX 10.6.2 and are unable to boot, follow the recovery procedures found HERE!!


 Mini 10v  | 2Gb RAM | 320 Gb HDD | Ubuntu 10.04 | OSX 10.6.3 | NBI .8.4RC1 | Chameleon Bullet Theme | BIOS A05 | USB Wake : OFF | USB Legacy : ON | No BlueTooth
Meklort's Blog | NBI Google Code Page | osx.mechdrew.com -- the best OSX installation guides
 

« *OLD* NetbookInstaller .8.3 RC3 [testing] | Wireless TV tuner? »
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


LinkBacks (?)
LinkBack to this Thread: http://www.mydellmini.com/forum/forum-archive/15050-osx-10-6-2-a.html
Posted By For Type Date
fscklog: Sammelsurium: iPhone/Privacy.A, Netbook-Kerneleien für 10.6.2, GPS-Halterung für iPod touch, Psystar-Sage, etc. This thread Refback 11-12-2009 08:44 AM
Osx 10.6.2 - Page 13 This thread Refback 11-12-2009 08:12 AM
Lenovo IdeaPad S Series Forum • View topic - Snow Leopard Installation Guide with NetbookBootMaker This thread Refback 11-12-2009 07:51 AM
Fix for Netbook Hackintoshes in the Works, Temporary Fix Already Available - NetBooks - Lifehacker This thread Refback 11-12-2009 06:59 AM
Acer Aspire One User Forum • View topic - Snow Leopard D250 the-kn3pp-way This thread Refback 11-12-2009 05:28 AM
Bloggliv – Hackintosh slutar fungera med OS X 10.6.2 – det finns en lsning Post #19 Pingback 11-12-2009 04:35 AM
Google Reader - Lifehacker This thread Refback 11-11-2009 10:17 PM

Copyright © 2008-2011 MyDellMini.com.