Jump to content

Chameleon won't load modules?

chameleon modules

  • Please log in to reply
18 replies to this topic

#1
omni

omni

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 286 posts
  • Gender:Male

I have a latest r2345 of chameleon installed and prior to that I had a r2286, neither of which load modules from the /Extra/modules/ folder.

 

I've placed the latest FileNVRAM.dylib into the modules/ folder it does not load. I wrote my own module as a test and that does not load either.

 

Any help would be appreciated.

 

Thanks.

 



#2
Gringo Vermelho

Gringo Vermelho

    The Jan Bird fix

  • Supervisors
  • 6,046 posts
  • Gender:Male
  • Location:Brazil

Works fine for me.

 

Report the issue here.



#3
omni

omni

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 286 posts
  • Gender:Male

Thanks, I filed an issue.

 

I'm not sure why it does not work, there are no errors I can see and everything appears in order...



#4
Gringo Vermelho

Gringo Vermelho

    The Jan Bird fix

  • Supervisors
  • 6,046 posts
  • Gender:Male
  • Location:Brazil

It's not just you, someone else here had the same problem a while back, I tried to find the topic but I can't.

 

You didn't format your drive with case-sensitive HFS+J did you? That's a pain.

 

There's no mention of the modules at all in your bdmesg output?

 

(If you don't have it, bdmesg comes with the Chameleon source, copy to /usr/bin, reboot and run from Terminal)



#5
omni

omni

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 286 posts
  • Gender:Male

Just a standard HFS+ journaled

 

my related bdmesg

 

Read HFS+ file: [hd(2,5)/System/Library/CoreServices/SystemVersion.plist] 478 bytes.
Read HFS+ file: [hd(2,4)/System/Library/CoreServices/SystemVersion.plist] 478 bytes.
Module 'Symbols.dylib' by 'Chameleon' Loaded.
        Description: Chameleon symbols for linking
        Version: 0
        Compat:  0
 
Darwin/x86 boot v5.0.132 - Chameleon v2.2svn r2345
Build date: 2014-01-23 01:29:44
 
I have a number of drives in this hack, would that matter?


#6
Gringo Vermelho

Gringo Vermelho

    The Jan Bird fix

  • Supervisors
  • 6,046 posts
  • Gender:Male
  • Location:Brazil

Symbols.dylib is embedded so that doesn't count.

 

I have 4 drives myself and no issues with modules. Chameleon is installed to the same drive as the OS X installation that it is booting.

 

Are you using the EFI partition for Chameleon or /Extra at the root of the system you're booting?

 

I saw your bug report, you mentioned using Chameleon Wizard.

Chameleon Wizard promotes copying only /boot when upgrading Chameleon. But that's not always enough.

 

Try installing Chameleon manually. Directions are here - replace the disk identifiers as required, you don't have to use the EFI partition if you don't want to.

(meaning, assuming disk 0, instead of dd if=boot1h of=/dev/rdisk0s1 which is the EFI partition, you'd dd boot1h onto rdisk0s2 which is your system partition)

 

Ideally you should install Chameleon on top of where it's already installed.

 

I haven't gotten around to updating the attached archive to latest svn.



#7
omni

omni

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 286 posts
  • Gender:Male

I'm booting legacy mode as far as I can tell (/Extra folder) because I don't want to muck around with EFI when I'm testing things.

 

I do have an EFI partition so I'll check that and see what's in it and clear it up.

 

I'll report here about the outcome.

 

Thanks again.



#8
Gringo Vermelho

Gringo Vermelho

    The Jan Bird fix

  • Supervisors
  • 6,046 posts
  • Gender:Male
  • Location:Brazil

You'd still be using legacy mode if Chameleon was installed to the EFI partition.

 

Installing it to the EFI partition was a "lifestyle" choice :P and all it does is making it more difficult to access /Extra. It doesn't make any difference otherwise.

 

If you get a message saying that the EFI partition needs to be initialized, then just leave it. That means there's nothing there.



#9
omni

omni

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 286 posts
  • Gender:Male

I did a quick reinstall of boot0md and boot1h from the svn version I compiled last night...and after a reboot it looked like my bootloader got hosed:

 

boot0: init

boot0: done

b1f: init

b1f: error

 

Turns out I forgot I had remnants of Clover on my EFI partition and that was getting hit first before my OS X one. Quick zeroing the boot sector of the EFI partition and voila:

 

Module 'Symbols.dylib' by 'Chameleon' Loaded.
        Description: Chameleon symbols for linking
        Version: 0
        Compat:  0
Read HFS+ file: [hd(0,2)/Extra/modules/FileNVRAM.dylib] 56136 bytes.
Module 'FileNVRAM.dylib' by 'Unknown' Loaded.
        Description: 
        Version: 0
        Compat:  0
 
Darwin/x86 boot v5.0.132 - Chameleon v2.2svn r 
Build date: 2014-01-26 11:28:48
 
Interestingly enough, it does not show "r2345" just "r", weird. Maybe a bug?
 
In any case, looks like it's working. Thanks for the pointers!

One more thing...

 

Is it a normal behaviour to ignore the /Extra/modules folder in a disk/partition I'm booting to?

 

What I mean is I have multiple OS X installs on multiple disks, but it seems that modules are only loaded from the primary location (where Chameleon /boot) is installed.

 

Chameleon will load smbios.plist and org.chameleon.Boot.plist from those drives/partitions, but only appears to load modules from primary/install drive/partition.



#10
meklort

meklort

    InsanelyMac Geek

  • Developers
  • 136 posts
  • Gender:Male

Yes, modules are only loaded from the partition that chameleon is booted from.



#11
Gringo Vermelho

Gringo Vermelho

    The Jan Bird fix

  • Supervisors
  • 6,046 posts
  • Gender:Male
  • Location:Brazil

Thanks boss!

 

Nice omni...yes, the b1f messages are a dead giveaway. And you're welcome.

 

Weird thing with the lone r, I'll check later if it does the same thing here.

 

If that's on the drive selection screen in the Chameleon GUI, I guess it could be a setting in theme.plist or a bug in the design of the theme you're using.

 

But if it's doing it in the bdmesg output then I don't know.



#12
omni

omni

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 286 posts
  • Gender:Male

It's doing it in the bdmesg and the drive selection screen (I'm using no GUI)

 

Is there a way to get Chameleon to respect the modules/ sub-folder per-drive/partition and load it there?

 

For example, I'm testing a module right now and I don't want it hosing my boot setup of the main OS X. I want it to apply only to the drive/partition I put it in so that I can easily remove it in case it hangs.

 

As it is, it applies to everything so I have to always keep a USB boot stick handy. :)



#13
Gringo Vermelho

Gringo Vermelho

    The Jan Bird fix

  • Supervisors
  • 6,046 posts
  • Gender:Male
  • Location:Brazil

Can't you place the module in /Extra/Modules on your flash drive and use that to boot your test install?



#14
meklort

meklort

    InsanelyMac Geek

  • Developers
  • 136 posts
  • Gender:Male

Another option is to add a flag to disable the module at load time (assuming it runs after the command line).

You can also update the load_all_modules function in modules.c to do what you want.



#15
omni

omni

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 286 posts
  • Gender:Male

Thanks, these are good ideas and I should've thought of them myself.

 

I have no excuse, lol. :)



#16
Gringo Vermelho

Gringo Vermelho

    The Jan Bird fix

  • Supervisors
  • 6,046 posts
  • Gender:Male
  • Location:Brazil

You haven't even said what's cooking....what is it?



#17
omni

omni

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 286 posts
  • Gender:Male

Cooking where, with me messing with Chameleon? :)

 

I'm writing a module that patches specific CPU MSRs so that things get initialized for Power Management.

 

If you look at my other thread, I've posted a test module already that sets couple of values, which I hope will help people with their Power Management.

 

The idea is to ultimately have a config file with the module so it can do this arbitrarily, per user needs, but I'm a n00b with writing modules so one step at a time. :D



#18
Gringo Vermelho

Gringo Vermelho

    The Jan Bird fix

  • Supervisors
  • 6,046 posts
  • Gender:Male
  • Location:Brazil

Very cool!

I can see a looo000ng line forming behind you already, lots of people can't use the 1-2 punch, pmpatch and ssdtPRGen.sh for various reasons.

Hackintosh power management is and always was a challenge...and now xcpm is in the mix, with its own set of issues to deal with..it never stops lol

 

Cheers and good luck with it.



#19
meklort

meklort

    InsanelyMac Geek

  • Developers
  • 136 posts
  • Gender:Male

If you do plan on using a config file... I'm going to suggest using just using a plist. It's already built into chameleon (and *please* use the full plist capabilities, don't stuff integers in strings like chameleon tends to do... just use <integer>some_num</integer>.








0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy