Author Topic: DSDT loading from cdboot not working  (Read 17159 times)

0 Members and 1 Guest are viewing this topic.

tempolo

  • Member
  • Posts: 82
    • My own Hackintosh page
Re: DSDT loading from cdboot not working
« Reply #15 on: June 18, 2009, 03:07:42 PM »
Thank You! The sources have allowed me to spot the bug.
Nice.

Quote
The tiny change I've made to the file 'libsaio/dsdt_patcher.c' in
function 'int setupAcpi()' has fixed it.
Would you please give the details of your fix somewhere, maybe here, maybe as a bug report in the Bugs sub-forum?

AniV

  • Observer
  • Posts: 18
Re: DSDT loading from cdboot not working
« Reply #16 on: June 18, 2009, 06:02:34 PM »
Hi again,

Here goes the tiny bit that worked for me.
Code: [Select]
//AniV: Note this NOT a valid file !!!!!

/* Setup ACPI. Replace DSDT if DSDT.aml is found */
int setupAcpi()
{
int fd, version;
void *new_dsdt;
const char *dsdt_filename;
char dirspec[512];
int len;
boolean_t drop_ssdt=NO;

//DBGDSDT ("Enter setupACPI\n");

//AniV: this will override the DSDT file name. Do not use a full-path-name (e.g. rd(0,0)\Extra\DSDT.aml),it won't work!
if (!getValueForKey("DSDT", &dsdt_filename, &len, &bootInfo->bootConfig))
dsdt_filename="DSDT.aml";

// Check booting partition
sprintf(dirspec,"/%s",dsdt_filename);
fd=open (dirspec,0);
if (fd<0)
{ // Check Extra on booting partition
sprintf(dirspec,"/Extra/%s",dsdt_filename);
fd=open (dirspec,0);
if (fd<0)
{ // Fall back to booter partition
sprintf(dirspec,"bt(0,0)/Extra/%s",dsdt_filename);
fd=open (dirspec,0);

//Aniv: Start ------------------> 18 June 09
//AniV: Have a last look in the ramdisk. Check only at the root, for simplicity!
if (fd < 0)
{
DBGDSDT ("Checking for DSDT replacement in ramdisk\n");
sprintf(dirspec,"rd(0,0)/%s",dsdt_filename);
fd=open (dirspec,0);
}
//Aniv: End <------------------
if (fd < 0)
{
verbose ("No DSDT replacement found. Leaving ACPI data as is\n");
return setupAcpiNoMod();
}
}
}


// continues untouched
//...........
//...........

}

Hope it helps someone out there.
In my opinion, this should be re-written by Zef's staff, etc.

Cheers,

And the lousy snapshot:

"Life is what happens to you while you're busy making other plans". .

DooV

  • Member
  • Posts: 34
Re: DSDT loading from cdboot not working
« Reply #17 on: June 18, 2009, 10:33:21 PM »
Great!!! You should contact Zef about it.  :)

zef

  • Administrator
  • Posts: 265
Re: DSDT loading from cdboot not working
« Reply #18 on: June 19, 2009, 02:18:09 PM »
Instead adding another possible look-up for the specified file, we should just adjust the /%s formatting and the code around. This hardcoded leading slash prevents working the passed DSDT argument correctly for different devices like rd(0,0) since the code will always look on the selected volume.

Btw we would need a more generic function to pass path + filename arguments to search for a file on different locations, this function can be used in many situations (eg. loading plists).
ASUS P8Z68-V PRO/GEN3 | i5-2500k | 16GB RAM | GTX560 | Keyboard | Mouse | Devilsound DAC

AniV

  • Observer
  • Posts: 18
Re: DSDT loading from cdboot not working
« Reply #19 on: June 19, 2009, 03:37:38 PM »
Actually that's I meant by:

"In my opinion, this should be re-written by Zef's staff, etc."

But I didn't mean to be rude. I agree with you!

Cheers.
"Life is what happens to you while you're busy making other plans". .

zef

  • Administrator
  • Posts: 265
Re: DSDT loading from cdboot not working
« Reply #20 on: June 21, 2009, 01:05:13 AM »
Ok, removed the leading slash, so device selectors - rd(0,0)/... - can be used when specifying the DSDT option.
ASUS P8Z68-V PRO/GEN3 | i5-2500k | 16GB RAM | GTX560 | Keyboard | Mouse | Devilsound DAC

DooV

  • Member
  • Posts: 34
Re: DSDT loading from cdboot not working
« Reply #21 on: June 21, 2009, 12:42:47 PM »
Solved :)
« Last Edit: July 04, 2009, 12:36:34 PM by DooV »

dwp

  • Entrant
  • Posts: 2
Re: DSDT loading from cdboot not working
« Reply #22 on: August 27, 2009, 09:36:02 PM »
Hi, I'm still a bit of a noob so I had a couple of questions to see if I've understood what I need to do.

Is it that I need to put my dsdt.aml on a ram disk and put that somehow on the boot CD? The dsdt.aml will then be loaded still when I switch to the Mac OS X DVD.

If so, are there instructions on how to make this ram disk and specify it to be loaded? I couldn't see any reading the help for chameleon.

Will this solution also work for a /extra/extensions folder? This would mean I can do away with boot123 for installation.

Thanks,

Donald

Gringo Vermelho

  • Forum Moderator
  • Posts: 611
  • The gray monster energy hat
Re: DSDT loading from cdboot not working
« Reply #23 on: August 29, 2009, 08:57:33 AM »
I posted a Chameleon 2.0 boot CD guide here a while back. Search..
10.9.5 - ASUS P8Z77-V Pro - i5 3570K - GTX 660 - Chameleon 2.3 svn-r2xxx
How to...
Install Chameleon: http://forum.voodooprojects.org/index.php/topic,649
Make your own Chameleon boot CD: http://forum.voodooprojects.org/index.php/topic,484.msg2131.html#msg2131

dwp

  • Entrant
  • Posts: 2
Re: DSDT loading from cdboot not working
« Reply #24 on: September 02, 2009, 10:10:32 PM »
Hi Gringo,

I believe I had read your posting - if there is a different one then I can't find it sorry. The posting tells how to make a bootable CD but doesn't talk about how to get extensions loaded from it before booting of the OS X DVD. My presumption is that a key similar to DSDT=rd(0,0)/Extra/DSDT.aml is required - hence my original posting.

BR,

Donald

Gringo Vermelho

  • Forum Moderator
  • Posts: 611
  • The gray monster energy hat
Re: DSDT loading from cdboot not working
« Reply #25 on: August 21, 2010, 08:31:19 PM »
You don't have to do anything special, just place your DSDT.aml in /extra on your boot CD.

Kernel extensions go in extra/extensions on the RAM disk image, preboot.dmg.

Chameleon Boot CD how-to and preboot.dmg can be found here:
http://forum.voodooprojects.org/index.php/topic,484.msg2131.html#msg2131
The how-to is still valid for Chameleon 2.0 RC5 rev xxx cdboot.
« Last Edit: August 21, 2010, 08:45:19 PM by Gringo Vermelho »
10.9.5 - ASUS P8Z77-V Pro - i5 3570K - GTX 660 - Chameleon 2.3 svn-r2xxx
How to...
Install Chameleon: http://forum.voodooprojects.org/index.php/topic,649
Make your own Chameleon boot CD: http://forum.voodooprojects.org/index.php/topic,484.msg2131.html#msg2131