Author Topic: Revisit Chameleon's package builder  (Read 144447 times)

0 Members and 2 Guests are viewing this topic.

Blackosx

  • Forum Moderator
  • Posts: 1150
Re: Revisit Chameleon's package builder
« Reply #180 on: May 20, 2011, 08:34:28 AM »
Well done Fabio. Keep going with the research :)
I'm going away for a week tomorrow so hopefully I find time to I'll test your installer when I get back.
10.10.5 / 10.11 GM1 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

ErmaC

  • Resident
  • Posts: 134
Re: Revisit Chameleon's package builder
« Reply #181 on: May 20, 2011, 02:57:12 PM »
Commit 274
Play with the buildpkg script... a pretty print now also for this script like the main chameleon

Commit 275
Added a "empty" choice for modules
And reworked the package identity for the creation of the metapkg, inspired from a Packagemaker structure name.

Fabio

For the rebuid extensions.mkext
maybe is better add a hidden&active choice into the "kext" choice for do the job.
?

EDIT commit 276
Create a structure choice for modules with "names"
« Last Edit: May 20, 2011, 04:13:57 PM by iFabio »
P6T Deluxe v1 i7 940 Quadro Fx 5600
P6T SE i7 920 GeForce GT 240

ErmaC

  • Resident
  • Posts: 134
Re: Revisit Chameleon's package builder
« Reply #182 on: May 22, 2011, 03:41:28 AM »
commit 277

Finish the creation of module choice.. that choice is now integrated into the main chameleon binary config choice menu.

I add a "for" cycle for automate the process, it based on the number of folder into Script/Modules/ folders,
so is easy add a new module-choice in future adding a module-foldername.



Fabio
« Last Edit: May 22, 2011, 03:50:45 AM by iFabio »
P6T Deluxe v1 i7 940 Quadro Fx 5600
P6T SE i7 920 GeForce GT 240

ErmaC

  • Resident
  • Posts: 134
Re: Revisit Chameleon's package builder
« Reply #183 on: May 30, 2011, 08:09:20 PM »
commit 302:
merge chameleon trunk's 921 changes.

Todo.
- create a script for each module (just for copy from the pkg "tempdir" into DestinationVolume/Extra/module)
- I upload a "slim" buildpkg version of that script, it will include into a future DMG build script, the slim  "version" just have the bin boot file & modules.
- A script for build/rebuild the E/E mkext
- I need a background for the windows DMG (the dimension are not so important 800x600 will be fine.

done.
- The module are compiled and included into the pkg correctly, also I add the "extra" module from the Azimutz branch (THX)
AMD,Intel,nvidia.Ati/GraphicsEnabler.
- At the moment:
make pkg build the pkg (6 MB) with themes
make dmg build a slim pkg with defined file name Chameleon.pkg I plan to add (after the slim pkg build process) to move that file into the dmg.

Need.
I have "fix" the openUp.c file discussed long time ago, will be nice to add this into the i386/util , with this little "program" we can show (pop up) a text when a dmg is mounted (I think this for the Chameleon DMG), I compile and use that "code" in my local machine and works well.

here the edited openUp.c file
Code: [Select]
/*
 * Copyright (c) 2001 Apple Computer, Inc. All rights reserved.
 * 
 * @APPLE_LICENSE_HEADER_START@
 *
 * The contents of this file constitute Original Code as defined in and
 * are subject to the Apple Public Source License Version 1.1 (the
 * "License").  You may not use this file except in compliance with the
 * License.  Please obtain a copy of the License at
 * http://www.apple.com/publicsource and read it before using this file.
 *
 * This Original Code and all software distributed under the License are
 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
 * License for the specific language governing rights and limitations
 * under the License.
 *
 * @APPLE_LICENSE_HEADER_END@
 */
/*
 * Shantonu Sen <<EMAIL REMOVED>>
 * openUp.c - program to set the "first-open-window" field of a volume
 *
 * Get the directory ID for the first argument, and set it as word 2
 * of the Finder Info fields for the volume it lives on
 *
 * cc -o openUp openUp.c
 * Usage: openUp /Volumes/Foo/OpenMe/
 *
 */

#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/attr.h>
#include <sys/stat.h>
#include <sys/mount.h>
#include <memory.h>

struct directoryinfo {
long unsigned length;
uintptr_t dirid; // changed from: u_int32_t dirid;
};

struct volumeinfo {
long unsigned length;
uintptr_t finderinfo[8]; // changed from: u_int32_t finderinfo[8];
};


int main(int argc, char *argv[]) {
char *path = NULL;
struct attrlist alist;
struct directoryinfo dirinfo;
struct volumeinfo volinfo;
struct statfs sfs;

path = argv[1];

bzero(&alist, sizeof(alist));
alist.bitmapcount = 5;
alist.commonattr = ATTR_CMN_OBJID;

getattrlist(path, &alist, &dirinfo, sizeof(dirinfo), 0);

printf("directory id: %lu\n", dirinfo.dirid);

statfs(path, &sfs);

printf("mountpoint: %s\n", sfs.f_mntonname);

alist.commonattr = ATTR_CMN_FNDRINFO;
alist.volattr = ATTR_VOL_INFO;

getattrlist(sfs.f_mntonname, &alist, &volinfo, sizeof(volinfo), 0);
volinfo.finderinfo[2] = dirinfo.dirid;
setattrlist(sfs.f_mntonname, &alist, volinfo.finderinfo, sizeof(volinfo.finderinfo), 0);

return EXIT_SUCCESS;
}

Fabio
« Last Edit: May 30, 2011, 08:17:59 PM by iFabio »
P6T Deluxe v1 i7 940 Quadro Fx 5600
P6T SE i7 920 GeForce GT 240

ErmaC

  • Resident
  • Posts: 134
Re: Revisit Chameleon's package builder
« Reply #184 on: June 02, 2011, 03:31:32 AM »
Need.
I have "fix" the openUp.c file discussed long time ago, will be nice to add this into the i386/util , with this little "program" we can show (pop up) a text when a dmg is mounted (I think this for the Chameleon DMG), I compile and use that "code" in my local machine and works well.

Thx a lot meklort!
Quote
924 by meklort
Added openUp utility. Will be used in the pkg build script
P6T Deluxe v1 i7 940 Quadro Fx 5600
P6T SE i7 920 GeForce GT 240

ErmaC

  • Resident
  • Posts: 134
Re: Revisit Chameleon's package builder
« Reply #185 on: July 16, 2011, 03:12:03 AM »
Commit 324.
- Update to Main Chameleon 2 RC5 r.1162.
- update also the GraphicsEnabler modules from Azimutz sub-branch (test purpose for the pkg).
- Update the Options script (correct from com.apple.Boot.plist to org.chameleon.Boot.plist).
- Add 2 more script into "boot" Options (ShowInfo and CSTUsingSystemIO).
- Update the (English) Localizable.strings.
- Some "problem" with the Rez and DeRez tools with Xcode4 so I comment out the add Icon pkg stuff.. for the moment.
- The dmg script "works" (need more deep test).

TODO.
- relate to dmg... I need to edit a work "license".r file, and this will be add to openup command.
- create (empty for now) a script for each module (to just copy the module into the TARGET/Extra/Modules/).
- Update (and test) the other Language (Some double/duplicate _title & _descriptions can cause random crash)

Fabio
« Last Edit: July 16, 2011, 03:43:34 AM by iFabio »
P6T Deluxe v1 i7 940 Quadro Fx 5600
P6T SE i7 920 GeForce GT 240

Azimutz

  • VoodooLabs
  • Posts: 420
  • Paranoid Android
Re: Revisit Chameleon's package builder
« Reply #186 on: July 17, 2011, 11:27:46 PM »
Hi iFabio,

something just came to my mind about the GraphicsEnabler modules; i assume you are adding them
to the trunk binaries; that's not good :P the trunk still has the code that the modules use in boot2 so,
the modules will conflict with it and... kaput!
I know that meklort already talked to you about the package;
i'll join you in this stuff soon to help test... this time i really mean it!

See ya later...
 System & Patches: http://goo.gl/i961
 Chameleon:
- trunk builds: http://goo.gl/9G1Hq
- pref pane: http://goo.gl/OL2UT

ErmaC

  • Resident
  • Posts: 134
Re: Revisit Chameleon's package builder
« Reply #187 on: July 18, 2011, 12:32:36 AM »
Azi surely you're right!

As you well know, I understand very little about the code (C ,C++, etc...)
The purpose of the integration and creation of all the modules, is to check the management of it by scripts, and pkg ...

As meklort suggest me, I edited (in the makefile) and suppressed the "sudo"
and now I'm with.. side effects .. "chown"
Help and advice are always welcome!

Fabio
« Last Edit: July 18, 2011, 12:35:49 AM by iFabio »
P6T Deluxe v1 i7 940 Quadro Fx 5600
P6T SE i7 920 GeForce GT 240

Azimutz

  • VoodooLabs
  • Posts: 420
  • Paranoid Android
Re: Revisit Chameleon's package builder
« Reply #188 on: July 20, 2011, 01:32:31 AM »
My knowledge of coding is also limited; i may know a bit more than you about C/C++ but you certaily
know more than me about other stuff ;)
Sure, you can add the modules for testing the package, but be careful not to share it.
Can you point me the "sudo" thing... my knowledge of coding doesn't have comparison with Mek's;
he must have a reason for telling you that!?

p.s.: ok, i see the sudo stuff on r1178 and the comment to remove it, but it's still there, so use it for now :)
« Last Edit: July 20, 2011, 02:26:26 AM by Azimutz »
 System & Patches: http://goo.gl/i961
 Chameleon:
- trunk builds: http://goo.gl/9G1Hq
- pref pane: http://goo.gl/OL2UT

meklort

  • VoodooLabs
  • Posts: 65
Re: Revisit Chameleon's package builder
« Reply #189 on: July 20, 2011, 06:52:35 AM »
Main reason for not using sudo, is I shouldn't have to use sudo to compile a package.... That and I don't want to have to give the buildbot root access...

Anyway, for chameleon, permissions don't matter, so we don't actually need to chown anything to root. *But* if you want to, we can use a postinstall script that chowns everything to root after the install instead.
return c ? c : !c;

Azimutz

  • VoodooLabs
  • Posts: 420
  • Paranoid Android
Re: Revisit Chameleon's package builder
« Reply #190 on: July 24, 2011, 08:52:06 PM »
Main reason for not using sudo, is I shouldn't have to use sudo to compile a package....
Agree!... I still didn't had time to look at this properly; two days without modem messed up my up to date
status completely :P
 System & Patches: http://goo.gl/i961
 Chameleon:
- trunk builds: http://goo.gl/9G1Hq
- pref pane: http://goo.gl/OL2UT

ErmaC

  • Resident
  • Posts: 134
Re: Revisit Chameleon's package builder
« Reply #191 on: August 02, 2011, 12:09:32 AM »
Hello everyone.
I have a suggestion or question to ask, concerning the kext and the use of most of them.
What do you think if we "edit" the Info.plist directly involved in the kext?
Maybe by adding or modifying the contents of .plist files with scripts?

I write a small example to make the marvell 88E8086 recognized (edit already known by many).
System/Library/Extensions/IONetworkingFamily.kext/Contents/PlugIns/AppleYukon2.kext/Contents/Info.plist
Quote
...
                <key>Yukon-88E8055-B0</key>
                <dict>
                        <key>CFBundleIdentifier</key>
                        <string>com.apple.iokit.AppleYukon2</string>
                        <key>EnableLowPwr</key>
                        <integer>1</integer>
                        <key>IOClass</key>
                        <string>yukon2osx</string>
                        <key>IOPCIPrimaryMatch</key>
                        <string>0x436a11ab</string>
                        <key>IOPCISecondaryMatch</key>
                        <string>0x00ba11ab</string>
                        <key>IOProviderClass</key>
                        <string>IOPCIDevice</string>
                        <key>InitialWaitForLinkUp</key>
                        <integer>6000</integer>
                        <key>MACNumber</key>
                        <integer>1</integer>
                        <key>Model</key>
                        <string>Yukon Gigabit Adapter 88E8055 Singleport Copper SA</string>
                        <key>NetworkNumber</key>
                        <integer>1</integer>
                        <key>RxDeadman</key>
                        <integer>0</integer>
                        <key>RxRingGrowOnPause</key>
                        <integer>10</integer>
                        <key>RxRingSize</key>
                        <integer>0</integer>
                        <key>RxRingSize_100MBit</key>
                        <integer>128</integer>
                        <key>RxRingSize_10MBit</key>
                        <integer>64</integer>
                        <key>RxRingSize_GigaBit</key>
                        <integer>256</integer>
                        <key>TxRingSize</key>
                        <integer>256</integer>
                        <key>Vendor</key>
                        <string>Marvell</string>
                        <key>WaitForLinkUp</key>
                        <key>WaitForLinkUp</key>
                        <integer>6000</integer>
                </dict>
                <key>Yukon-88E8056</key>
                <dict>
                        <key>CFBundleIdentifier</key>
                        <string>com.apple.iokit.AppleYukon2</string>
                        <key>EnableLowPwr</key>
                        <integer>1</integer>
                        <key>IOClass</key>
                        <string>yukon2osx</string>
                        <key>IOPCIPrimaryMatch</key>
                        <string>0x436411ab</string>
                        <key>IOProviderClass</key>
                        <string>IOPCIDevice</string>
                        <key>MACNumber</key>
                        <integer>1</integer>
                        <key>Model</key>
                        <string>Yukon Gigabit Adapter 88E8056 Singleport Copper SA</string>
                        <key>NetworkNumber</key>
                        <integer>1</integer>
                        <key>RxDeadman</key>
                        <integer>60</integer>
                        <key>RxRingGrowOnPause</key>
                        <integer>10</integer>
                        <key>RxRingSize</key>
                        <integer>0</integer>
                        <key>RxRingSize_100MBit</key>
                        <integer>128</integer>
                        <key>RxRingSize_10MBit</key>
                        <integer>64</integer>
                        <key>RxRingSize_GigaBit</key>
                        <integer>256</integer>
                        <key>TxRingSize</key>
                        <integer>256</integer>
                        <key>Vendor</key>
                        <string>Marvell</string>
                </dict>

                <key>Yukon-88E8061</key>
                <dict>
                        <key>CFBundleIdentifier</key>
...
Similar thinks for JMicron, BlockStorage, ACHIPort, and so on...

So the only Kext needed is (now) FakeSMC.

Let me know

Fabio
P6T Deluxe v1 i7 940 Quadro Fx 5600
P6T SE i7 920 GeForce GT 240

Azimutz

  • VoodooLabs
  • Posts: 420
  • Paranoid Android
Re: Revisit Chameleon's package builder
« Reply #192 on: August 18, 2011, 07:40:50 PM »
Yay... iFabio, finally ;D
Check r1429; that fixes EFI install. Still there are some unfinished business, like copy Extra to EFI partition,
were to place the tools (fdisk440, bdmesg, etc...), etc...
Will leave that for later, after taking care of the Standard script, to get a better notion of what needs to be done.
I hate this stuff :P
 System & Patches: http://goo.gl/i961
 Chameleon:
- trunk builds: http://goo.gl/9G1Hq
- pref pane: http://goo.gl/OL2UT

ErmaC

  • Resident
  • Posts: 134
Re: Revisit Chameleon's package builder
« Reply #193 on: August 18, 2011, 11:56:52 PM »
Hi Azi!

Nice to see you here... (in actions !! :P)

I take a look at you commit.

A note for you...
I commit into the trunk a split version of Localizable.strings file
In my branch there are the complete version of it (for each language)...
I do this because into the (trunk) buildpkg.sh the script not include all the possible(know) module/s
Maybe is a good point for your branch(GraphicsEnabler) use that localized file instead of trunk's localize... same things for the buildpkg.sh... 3 module are always out for the pkg we split out part of code... I preserve this part of code.

Fabio
P6T Deluxe v1 i7 940 Quadro Fx 5600
P6T SE i7 920 GeForce GT 240

Azimutz

  • VoodooLabs
  • Posts: 420
  • Paranoid Android
Re: Revisit Chameleon's package builder
« Reply #194 on: August 19, 2011, 01:44:50 AM »
Yeah, i already had thought about the package for the trunkGraphicsEnablerModules, but
now that i really think about it, i don't know if i want to maintain specific packages for those folders :P
it's more work... i might even delete "package" on those.
Chazi it's another story... we'll see on that.
Anyway, thanks for the info... we can always adapt it to other modules, if these end up not being used.

Will be back soon with more pkg stuff...
« Last Edit: August 19, 2011, 02:02:52 AM by Azimutz »
 System & Patches: http://goo.gl/i961
 Chameleon:
- trunk builds: http://goo.gl/9G1Hq
- pref pane: http://goo.gl/OL2UT