Jump to content

Chameleon 2.4svn Official PKG Installer


ErmaC
4,261 posts in this topic

Recommended Posts

Good news guys. I modified my private RevoBoot repository and now it boots the InstallESD.dmg without a reboot. Need to document this, but this problem sorted !!!

 

Note: I have a new born son and want to spent time with him and my wife so laters ;)

 

p.s. No. The public repository of RevoBoot cannot boot Yosemite so don't even go there. Just wait for Chameleon to support Yosemite.

 

Double Congratulations :D

 

Hope to see the changes merged into the main repository. 

Link to comment
Share on other sites

Good news guys. I modified my private RevoBoot repository and now it boots the InstallESD.dmg without a reboot. Need to document this, but this problem sorted !!!

 

Note: I have a new born son and want to spent time with him and my wife so laters ;)

 

p.s. No. The public repository of RevoBoot cannot boot Yosemite so don't even go there. Just wait for Chameleon to support Yosemite.

Oh, Congratulation to you :D

If you have free time (yep, after take care of your son) :) .Plz read this topic. I have issue with speedstep on Yosemite :) Thank you!

https://github.com/Piker-Alpha/ssdtPRGen.sh/issues/37

Link to comment
Share on other sites

Good news guys. I modified my private RevoBoot repository and now it boots the InstallESD.dmg without a reboot. Need to document this, but this problem sorted !!!

Out of curiosity, can boot using the kernel (so you have to copy by hand), or the kernelcache which is builded with it..previously made ​​by Apple?

...almost like Clover is doing now... In short .. can boot with no-cache?

 

Micky

Link to comment
Share on other sites

It stops there where I insert a breakpoint.

 

Edit: Here is a  proof of concept:

 

1) Search for (in kernel file): 48 C7 05 52 64 1E 00 00 00 00 00 5D C3 

2) Replace with: 48 C7 05 52 64 1E 00 00 00 00 00 5D F4 

3) Boot Chameleon

 

What we do here is that we change the return instruction (0xC3) at the end of _PE_init_platform into a halt instruction (0xF4).

 

Update: The reboot has been located and I am working on a fix/workaround!

 

I need at least three more IORegistryExplorer dumps (running Clover) so that I can verify stuff.

Feel free to e-mail me your dump if you don't want it exposed in public (see:ssdtPRGen.sh for my e-mail address).

 

Did you get the info you need yet?  I can provide mine if you tell me how lol

Link to comment
Share on other sites

Out of curiosity, can boot using the kernel (so you have to copy by hand), or the kernelcache which is builded with it..previously made ​​by Apple?

...almost like Clover is doing now... In short .. can boot with no-cache?

 

Micky

First. RevoBoot was the first boot loader to load the InstallESD.dmg but there was a catch. You had to replace the kernel cache by one with all your drivers – sans kext injection – notably FakeSMC.kext in it. This is no longer required. Not even with Yosemite. So here's what I did.

 

1.) Download the Yosemite DP1.app

2.) Moved it to the /Applications folder (like I always do)

3.) Fire up the installer (this copies files to your boot partition and reboots afterwards) 

4.) Finish the installation after the reboot

5.) Reboot into Yosemite, like on a Mac.

6.) nano /usr/standalone/bootcaches.plist (to change lzvn into lzss)

7.) sudo kernelcache -u /Volumes/your boot drive

 

So no. There is no need to unpack or restore anything. Not even the kernel. It just works. Even with kernel cache.

 

Also. It may seem like things are taking forever, but that's just because I want the installation process to be Mac alike.

 

Can't wait for Chameleon to boot? Then add /chosen/random-seed (64 bytes) and fill that with some random data :-)

Link to comment
Share on other sites

I'm in the same situation ADHDMedia experienced. There's absolutely nothing wrong with my Yosemite installation apart from the display which successfully shows the desktop 1/10 of the times, when it just shows a black screen, and my displays says "Cable disconnected".

 

In Mavericks, which uses Chameleon to boot, everything is perfectly fine. Although I would like to stick with that boot loader since is faster in booting than Clover, I have had less problems with that in the post-installation phase (ethernet shows as built-in automatically, RTC bios fix is already in place).

 

What I did so far was enabling Nvidia Injection and EDID Injection, but to no avail. I also went and extracted the EDID info with ioreg -l and created the needed files for a manual Display Override, but that didn't work either.

 

I was going to test Pike R. Alpha solution, by installing Yosemite directly from the app, but since I have already installed Yosemite successfully it wouldn't be bad to just solve this last issue alone.

 

Will keep you posted with updates (if any of you is interested and would like to help me, of course!)

Link to comment
Share on other sites

I was going to test Pike R. Alpha solution, by installing Yosemite directly from the app, but since I have already installed Yosemite successfully it wouldn't be bad to just solve this last issue alone.

I don't know if Chameleon can do this, already, but you certainly would want this to stop the reboot from occurring:

 

static EFI_UINT8 const RANDOM_SEED[] =
{
0x40, 0x00, 0x50, 0x00, 0x5c, 0x00, 0x53, 0x00, 0x79, 0x00, 0x73, 0x00, 0x74, 0x00, 0x65, 0x00,
0x6d, 0x00, 0x5c, 0x00, 0x4c, 0x00, 0x69, 0x00, 0x62, 0x00, 0x72, 0x00, 0x61, 0x00, 0x72, 0x00,
0x79, 0x00, 0x5c, 0x00, 0x43, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x65, 0x00, 0x53, 0x00, 0x65, 0x00,
0x72, 0x00, 0x76, 0x00, 0x69, 0x00, 0x63, 0x00, 0x65, 0x00, 0x73, 0x00, 0x5c, 0x00, 0x62, 0x00
};

DT__AddProperty(chosenNode, "random-seed", sizeof(RANDOM_SEED), (EFI_UINT8*) &RANDOM_SEED);

Paste it right after this line: http://forge.voodooprojects.org/p/chameleon/source/tree/HEAD/trunk/i386/libsaio/fake_efi.c#L681

 

Edit: You may have to swap the following two lines.

  • Like 5
Link to comment
Share on other sites

 

Thanks for reply.

 

So no. There is no need to unpack or restore anything. Not even the kernel. It just works. Even with kernel cache.

 

Also. It may seem like things are taking forever, but that's just because I want the installation process to be Mac alike.

 

Yes, but I can not play with some files as I am usually  :P

 

1.) Download the Yosemite DP1.app

2.) Moved it to the /Applications folder (like I always do)

3.) Fire up the installer (this copies files to your boot partition and reboots afterwards) 

4.) Finish the installation after the reboot

5.) Reboot into Yosemite, like on a Mac.

6.) nano /usr/standalone/bootcaches.plist (to change lzvn into lzss)

7.) sudo kernelcache -u /Volumes/your boot drive

Regarding your answers:

2) It seem that Revoboot inject a Kernel flag like:

container-dmg=file:///Applications/Install%20OS%20X%2010.10%20Developer%20Preview.app/Contents/SharedSupport/InstallESD.dmg root-dmg=file:///BaseSystem.dmg 

when a /.IABootFiles folder is present..is right? 

 

.... 2) Apple installer should therefore not necessarily be in /Applications if the Kernel Flag is read from the /.IABootFiles/com.apple.boot.plist....

 

7) why not just:

sudo kextcache -system-prelinked-kernel -uncompressed

... 6) or try to  remove the "preferred compression" key, to see if the kernelcache will not be compressed (I did not try, I can not do it today ..I'm on Linux ATM)

 

 

About Chameleon I think that to boot the OSX vanilla installer, boot.c should be amended to load kernelcache even if it is out of date (in case of installation process) editing this section:

// Check if the kernel cache file is more recent (mtime)
	// than the kernel file or the S/L/E directory
	ret = GetFileInfo(NULL, bootInfo->bootFile, &flags, &kerneltime);
	// Check if the kernel file is more recent than the cache file
	if ((ret == 0) && ((flags & kFileTypeMask) == kFileTypeFlat)
		&& (kerneltime > cachetime)) {
		verbose("Kernel file (%s) is more recent than KernelCache (%s), ignoring KernelCache\n",
				bootInfo->bootFile, kernelCacheFile);
		return -1;
	}

	ret = GetFileInfo("/System/Library/", "Extensions", &flags, &exttime);
	// Check if the S/L/E directory time is more recent than the cache file
	if ((ret == 0) && ((flags & kFileTypeMask) == kFileTypeDirectory)
		&& (exttime > cachetime)) {
		verbose("/System/Library/Extensions is more recent than KernelCache (%s), ignoring KernelCache\n",
				kernelCacheFile);
		return -1;
	}

	// Since the kernel cache file exists and is the most recent try to load it
	verbose("Loading kernel cache %s\n", kernelCachePath);

	ret = LoadThinFatFile(kernelCachePath, binary);
	return ret; // ret contain the length of the binary

certainly this in case of a non "vanilla installer" ..so restoring the BaseSystem.dmg to a USB device (This actually work with Clover).

 

What do you think? ....I'm going to play with Chameleon sources in the coming days :lol:

 

Micky

  • Like 3
Link to comment
Share on other sites

Step-2 is just a matter of housekeeping. To remember where the installer is. This is therefor not mandatory.

 

Forget the container-dmg and step-6 and step-7 is exactly what you need (converts it back to the old/supported format). Unpacking the kernel doesn't work.

 

Yes. Load the kernelcache when the 'OS X Install Data' directory is located, and the installer is about to launch, but do not load the one from the 'OS X Install Data' directory. Not for Yosemite. Not until we have lzvn support. For now just load the one from Mavericks, from the disk that is about to get updated.

 

About step-5. Boot with kernel cache disabled (I used the X key on my keyboard for this).

  • Like 3
Link to comment
Share on other sites

 

I don't know if Chameleon can do this, already, but you certainly would want this to stop the reboot from occurring:

 

static EFI_UINT8 const RANDOM_SEED[] =
{
0x40, 0x00, 0x50, 0x00, 0x5c, 0x00, 0x53, 0x00, 0x79, 0x00, 0x73, 0x00, 0x74, 0x00, 0x65, 0x00,
0x6d, 0x00, 0x5c, 0x00, 0x4c, 0x00, 0x69, 0x00, 0x62, 0x00, 0x72, 0x00, 0x61, 0x00, 0x72, 0x00,
0x79, 0x00, 0x5c, 0x00, 0x43, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x65, 0x00, 0x53, 0x00, 0x65, 0x00,
0x72, 0x00, 0x76, 0x00, 0x69, 0x00, 0x63, 0x00, 0x65, 0x00, 0x73, 0x00, 0x5c, 0x00, 0x62, 0x00
};

DT__AddProperty(chosenNode, "random-seed", sizeof(RANDOM_SEED), (EFI_UINT8*) &RANDOM_SEED);

Paste it right after this line: http://forge.voodooprojects.org/p/chameleon/source/tree/HEAD/trunk/i386/libsaio/fake_efi.c#L681

 

Edit: You may have to swap the following two lines.

 

 

Congratulations sir, Chameleon is able to boot 10.10 with those changes.

 

boot.zip

 

Use flags "/System/Library/Kernels/kernel -f -v" (assuming it's already installed)

  • Like 13
Link to comment
Share on other sites

boot.c

199 	// Jump to kernel's entry point. There's no going back now.
200	if ((checkOSVersion("10.7")) || (checkOSVersion("10.8")) || (checkOSVersion("10.9")) || (checkOSVersion("10.10")))
201	{
246		// Lion, Mountain Lion Mavericks and Yosemite prelink kernel cache file
247		if ((checkOSVersion("10.7")) || (checkOSVersion("10.8")) || (checkOSVersion("10.9")) || (checkOSVersion("10.10")))
248		{

Fabio,

although it is too early now ^_^ ,  but we are sure that the new numeration in something like 10.10.x, or there a possibilities that next Update will 10.11 and so on?

 

...10.10 already sounds bad and weird  :excl:

 

Micky

Link to comment
Share on other sites

Or maybe change chameleon's code so it will be compatible with next versions.

Instead of checking if OS is 10.7, 10.8, 10.9 and so on, check if it's not 10.4, 10.5 or 10.6. This way it should work with future releases (unless they require more changes in the code).

Example: 

boot.c
if (!((checkOSVersion("10.4")) || (checkOSVersion("10.5")) || (checkOSVersion("10.6"))) )
  {

 

bootstruct.c

if ((gMacOSVersion[0] == '1') && (gMacOSVersion[1] == '0') && (gMacOSVersion[2] == '.')
   && (gMacOSVersion[3] != '4') && (gMacOSVersion[3] != '5') && (gMacOSVersion[3] != '6'))
  • Like 2
Link to comment
Share on other sites

However, I am informed. Looking at the  OSInstall.mpkg Distribution file, a statement inside a Java function removes all doubts: 
if(my.target.systemVersion){
			if( system.compareVersions(my.target.systemVersion.ProductVersion, '10.11') >= 0){			
				my.result.message = system.localizedString('VC_Newer_message');
				my.result.type = 'Fatal';
				return false;
			}			
		}

EDIT (This function avoid a downgrade)

 

Yosemite numeration is like 10.10.x format, so the Next OSX, not an update,  will be 10.11 (already decided by Apple). For this reason the first update of Yosemite will 10.10.1

 

Micky

Link to comment
Share on other sites

Amazing work guys!

 

Thx to all involved in the research, specially Pike.

------

Bad "news" I'm unable to commit any change...

I'm out for a while... I need to "FIX" problem in real life...

So I can't predict when I will put hand on the code...

(Also I don't have any OSX ATM :(  )

 

Fabio

  • Like 5
Link to comment
Share on other sites

Congratulations sir, Chameleon is able to boot 10.10 with those changes.

 

attachicon.gifboot.zip

 

Use flags "/System/Library/Kernels/kernel -f -v" (assuming it's already installed)

Thanks for compiling it for us. You can post a diff, because I don't know how to swap the stringTable.c. I would compile it by myself. THANKS!!!

Link to comment
Share on other sites

×
×
  • Create New...