Chameleon Applications

Chameleon Applications Commit Details

Date:2011-05-22 03:34:55 (12 years 11 months ago)
Author:ErmaC
Commit:277
Parents: 276
Message:More thing: -added the module full choice (added a for cycle do build it). -added description for module title & descriptions. -the postinstall for manage the module are empty (just make a place holder). -latest official chameleon trunk change (863).
Changes:
A/branches/iFabio/Chameleon/package/Scripts/Modules
A/branches/iFabio/Chameleon/package/Scripts/Modules/Module_uClibc/postinstall
A/branches/iFabio/Chameleon/package/Scripts/Modules/Module_Resolution/postinstall
A/branches/iFabio/Chameleon/package/Scripts/Modules/Module_klibc/postinstall
A/branches/iFabio/Chameleon/package/Scripts/Modules/Module_uClibc
A/branches/iFabio/Chameleon/package/Scripts/Modules/Module_Resolution
A/branches/iFabio/Chameleon/package/Scripts/Modules/Module_klibc
M/branches/iFabio/Chameleon/i386/libsaio/smbios.c
M/branches/iFabio/Chameleon/package/Resources/English.lproj/Localizable.strings
M/branches/iFabio/Chameleon/package/buildpkg
M/branches/iFabio/Chameleon/i386/libsaio/spd.c
M/branches/iFabio/Chameleon/i386/libsaio/smbios_getters.c

File differences

branches/iFabio/Chameleon/i386/libsaio/spd.c
361361
362362
363363
364
365
366
367
368
369
370
371
372
373
374
375
364
365
366
367
368
369
370
371
372
373
374
375
376
376377
377378
378379
static struct smbus_controllers_t smbus_controllers[] = {
{0x8086, 0x269B, "ESB2", read_smb_intel },
{0x8086, 0x25A4, "6300ESB", read_smb_intel },
{0x8086, 0x24C3, "ICH4", read_smb_intel },
{0x8086, 0x24D3, "ICH5", read_smb_intel },
{0x8086, 0x266A, "ICH6", read_smb_intel },
{0x8086, 0x27DA, "ICH7", read_smb_intel },
{0x8086, 0x283E, "ICH8", read_smb_intel },
{0x8086, 0x2930, "ICH9", read_smb_intel },
{0x8086, 0x3A30, "ICH10R", read_smb_intel },
{0x8086, 0x3A60, "ICH10B", read_smb_intel },
{0x8086, 0x3B30, "P55", read_smb_intel },
{0x8086, 0x5032, "EP80579", read_smb_intel }
{0x8086, 0x269B, "ESB2",read_smb_intel },
{0x8086, 0x25A4, "6300ESB",read_smb_intel },
{0x8086, 0x24C3, "ICH4",read_smb_intel },
{0x8086, 0x24D3, "ICH5",read_smb_intel },
{0x8086, 0x266A, "ICH6",read_smb_intel },
{0x8086, 0x27DA, "ICH7",read_smb_intel },
{0x8086, 0x283E, "ICH8",read_smb_intel },
{0x8086, 0x2930, "ICH9",read_smb_intel },
{0x8086, 0x3A30, "ICH10R",read_smb_intel },
{0x8086, 0x3A60, "ICH10B",read_smb_intel },
{0x8086, 0x3B30, "5 Series",read_smb_intel },
{0x8086, 0x1C22, "6 Series",read_smb_intel },
{0x8086, 0x5032, "EP80579",read_smb_intel }
};
branches/iFabio/Chameleon/i386/libsaio/smbios.c
148148
149149
150150
151
152
151
152
153153
154154
155155
......
193193
194194
195195
196
196
197197
198
198
199199
200
200
201201
202
202
203203
204204
205205
......
541541
542542
543543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
544566
545567
546568
......
585607
586608
587609
610
611
588612
589613
590614
......
615639
616640
617641
618
642
619643
620644
621645
......
770794
771795
772796
773
797
774798
775
799
776800
777801
778802
char**defaultValue;
} SMBValueSetter;
SMBValueSetter SMBSetters[] =
{
SMBValueSetter SMBSetters[] =
{
//-------------------------------------------------------------------------------------------------------------------------
// BIOSInformation
//-------------------------------------------------------------------------------------------------------------------------
{kSMBTypeBaseBoard,kSMBString,getFieldOffset(SMBBaseBoard, product),kSMBBaseBoardProductKey,
NULL,&defaultBaseBoard.product},
{kSMBTypeBaseBoard,kSMBString,getFieldOffset(SMBBaseBoard, version),NULL,NULL,NULL},
{kSMBTypeBaseBoard,kSMBString,getFieldOffset(SMBBaseBoard, version),NULL,NULL,NULL},
{kSMBTypeBaseBoard,kSMBString,getFieldOffset(SMBBaseBoard, serialNumber),NULL,NULL,NULL},
{kSMBTypeBaseBoard,kSMBString,getFieldOffset(SMBBaseBoard, serialNumber),NULL,NULL,NULL},
{kSMBTypeBaseBoard,kSMBString,getFieldOffset(SMBBaseBoard, assetTagNumber),NULL,NULL,NULL},
{kSMBTypeBaseBoard,kSMBString,getFieldOffset(SMBBaseBoard, assetTagNumber),NULL,NULL,NULL},
{kSMBTypeBaseBoard,kSMBString,getFieldOffset(SMBBaseBoard, locationInChassis),NULL,NULL,NULL},
{kSMBTypeBaseBoard,kSMBString,getFieldOffset(SMBBaseBoard, locationInChassis),NULL,NULL,NULL},
//-------------------------------------------------------------------------------------------------------------------------
{
SMBOemProcessorBusSpeed *p = (SMBOemProcessorBusSpeed *)structPtr->new;
switch (Platform.CPU.Family)
{
case 0x06:
{
switch (Platform.CPU.Model)
{
case 0x19:// Intel Core i5 650 @3.20 Ghz
case CPU_MODEL_FIELDS:// Intel Core i5, i7 LGA1156 (45nm)
case CPU_MODEL_DALES:// Intel Core i5, i7 LGA1156 (45nm) ???
case CPU_MODEL_DALES_32NM:// Intel Core i3, i5, i7 LGA1156 (32nm)
case CPU_MODEL_NEHALEM:// Intel Core i7 LGA1366 (45nm)
case CPU_MODEL_NEHALEM_EX:// Intel Core i7 LGA1366 (45nm) 6 Core ???
case CPU_MODEL_WESTMERE:// Intel Core i7 LGA1366 (32nm) 6 Core
case CPU_MODEL_WESTMERE_EX:// Intel Core i7 LGA1366 (45nm) 6 Core ???
break;
default:
return;
}
}
}
p->header.type= kSMBTypeOemProcessorBusSpeed;
p->header.length= sizeof(SMBOemProcessorBusSpeed);
p->header.handle= handle++;
for (i = 0; i < numOfSetters; i++)
if (structPtr->orig->type == SMBSetters[i].type)
{
if (SMBSetters[i].fieldOffset > structPtr->orig->length)
continue;
setterFound = true;
setSMBValue(structPtr, i, (returnType *)((uint8_t *)structPtr->new + SMBSetters[i].fieldOffset));
}
tableLength += structSize;
if (structSize > maxStructSize)
if (structSize > maxStructSize)
maxStructSize = structSize;
structureCount++;
case kSMBTypeMemoryDevice:
Platform.DMI.CntMemorySlots++;
if (((SMBMemoryDevice *)structHeader)->memorySize != 0)
if (((SMBMemoryDevice *)structHeader)->memorySize != 0)
Platform.DMI.MemoryModules++;
if (((SMBMemoryDevice *)structHeader)->memorySpeed > 0)
if (((SMBMemoryDevice *)structHeader)->memorySpeed > 0)
Platform.RAM.DIMM[dimmnbr].Frequency = ((SMBMemoryDevice *)structHeader)->memorySpeed;
dimmnbr++;
break;
branches/iFabio/Chameleon/i386/libsaio/smbios_getters.c
4848
4949
5050
51
52
5351
5452
5553
......
247245
248246
249247
250
251
252
248
249
250
253251
254252
255253
......
269267
270268
271269
272
273
274
270
271
272
275273
276274
277275
......
291289
292290
293291
294
295
296
292
293
294
297295
298296
299297
return false;
case 0x19:// Intel Core i5 650 @3.20 Ghz
case CPU_MODEL_SANDY:// Intel Core i5, i7 LGA1155 sandy bridge
case CPU_MODEL_SANDY_XEON:
case CPU_MODEL_NEHALEM:// Intel Core i7 LGA1366 (45nm)
case CPU_MODEL_FIELDS:// Intel Core i5, i7 LGA1156 (45nm)
case CPU_MODEL_DALES:// Intel Core i5, i7 LGA1156 (45nm) ???
}
}
//return false;
value->string = NOT_AVAILABLE;
return true;
return false;
//value->string = NOT_AVAILABLE;
//return true;
}
bool getSMBMemoryDeviceSerialNumber(returnType *value)
}
}
//return false;
value->string = NOT_AVAILABLE;
return true;
return false;
//value->string = NOT_AVAILABLE;
//return true;
}
bool getSMBMemoryDevicePartNumber(returnType *value)
}
}
//return false;
value->string = NOT_AVAILABLE;
return true;
return false;
//value->string = NOT_AVAILABLE;
//return true;
}
branches/iFabio/Chameleon/package/buildpkg
4646
4747
4848
49
49
5050
5151
5252
......
6464
6565
6666
67
67
6868
6969
7070
......
8888
8989
9090
91
92
91
92
9393
9494
9595
......
9797
9898
9999
100
101
100
101
102
102103
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
104
105
106
107
108
109
110
111
112
113
114
154115
155116
156
157
117
158118
159119
160120
......
174134
175135
176136
177
137
178138
179139
180140
181141
182142
183143
184
144
185145
186146
187147
188148
189149
190150
191
151
192152
193153
194154
......
307267
308268
309269
310
270
311271
312272
313
314
273
274
315275
316276
317277
outline[$((outlinecount++))]="${indent[$xmlindent]}<choices-outline>"
# build core package
echo "================= core ================="
echo "================= Core ================="
((xmlindent++))
packagesidentity="org.chameleon.core.pkg"
mkdir -p ${1}/Core/Root/usr/sbin
cp -f ${pkgroot}/fdisk ${1}/Core/Root/usr/sbin
cp -f ${1%/*}/i386/bdmesg ${1}/Core/Root/usr/sbin
local coresize=$( du -hkc "${1}/Core/Root" | tail -n1 | awk {'print $1'} )
echo "[BUILD] core "
echo "[BUILD] i386 "
buildpackage "${1}/Core" "/tmpcham" "0" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1
# build Chameleon package
ditto --arch i386 `which SetFile` ${1}/EFI/Scripts/Tools/SetFile
echo "[BUILD] EFI "
buildpackage "${1}/EFI" "/tmpcham" "${coresize}" "start_visible=\"systemHasGPT()\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) &amp;&amp; exclusive(choices['noboot'])\"" >/dev/null 2>&1
# End build efi package
# End build efi package
# build reset choice package
mkdir -p ${1}/noboot/Root
echo "[BUILD] Reset choice "
# End build reset choice package
# build Modules package
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Modules\">"
choices[$((choicescount++))]="<choice\n\tid=\"Modules\"\n\ttitle=\"Modules_title\"\n\tdescription=\"Modules_description\"\n>\n</choice>\n"
echo "================= Modules ================="
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Module\">"
choices[$((choicescount++))]="<choice\n\tid=\"Module\"\n\ttitle=\"Module_title\"\n\tdescription=\"Module_description\"\n>\n</choice>\n"
((xmlindent++))
packagesidentity="org.chameleon.modules.pkg"
# build Module Resolution
mkdir -p ${1}/ModResolution/Root
# mkdir -p ${1}/ModResolution/Scripts/Tools
# cp -f ${pkgroot}/Scripts/ModResolution/* ${1}/ModResolution/Scripts
# ditto --arch i386 `which SetFile` ${1}/ModResolution/Scripts/Tools/SetFile
echo "[BUILD] Module Resolution "
buildpackage "${1}/ModResolution" "/Extra/modules" "${coresize}" "" "start_selected=\"false\"" >/dev/null 2>&1
# End build Module Resolution
# build Module-Two
mkdir -p ${1}/Module-Two/Root
# mkdir -p ${1}/Module-Two/Scripts/Tools
# cp -f ${pkgroot}/Scripts/Module-Two/* ${1}/Module-n/Scripts
# ditto --arch i386 `which SetFile` ${1}/Module-Two/Scripts/Tools/SetFile
echo "[BUILD] Modules Empy choice "
buildpackage "${1}/Module-Two" "/Extra/modules" "${coresize}" "" "start_selected=\"false\"" >/dev/null 2>&1
# End build Module-Two
# build Dependencies Modules package
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Modklibc\">"
choices[$((choicescount++))]="<choice\n\tid=\"Modklibc\"\n\ttitle=\"Modklibc_title\"\n\tdescription=\"Modklibc_description\"\n>\n</choice>\n"
((xmlindent++))
packagesidentity="org.chameleon.modules.klibc.pkg"
echo "[BUILD] Module klibc "
# build Module klibc
mkdir -p ${1}/Modklibc/Root
# mkdir -p ${1}/klibc/Scripts/Tools
# cp -f ${pkgroot}/Scripts/klibc/* ${1}/klibc/Scripts
# ditto --arch i386 `which SetFile` ${1}/klibc/Scripts/Tools/SetFile
# buildpackage "${1}/klibc" "/Extra/modules" "${coresize}" "" "start_selected=\"false\"" >/dev/null 2>&1
# End build Module klibc
# choices[$((choicescount++))]="<choice\n\tid=\"klibc\"\n\ttitle=\"klibc_title\"\n\tdescription=\"klibc_description\"\n>\n</choice>\n"
# build Module uClibc++
mkdir -p ${1}/ModuClibc++/Root
# mkdir -p ${1}/uClibc++/Scripts/Tools
# cp -f ${pkgroot}/Scripts/uClibc++/* ${1}/uClibc++/Scripts
# ditto --arch i386 `which SetFile` ${1}/uClibc++/Scripts/Tools/SetFile
echo "[BUILD] Module uClibc++ "
buildpackage "${1}/ModuClibc++" "/Extra/modules" "${coresize}" "" "start_selected=\"false\"" >/dev/null 2>&1
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# End build Module-n
packagesidentity="org.chameleon.module"
modules=($( find "${pkgroot}/Scripts/Modules" -type d -depth 1 -not -name '.svn' ))
for (( i = 0 ; i < ${#modules[@]} ; i++ ))
do
mkdir -p "${1}/${modules[$i]##*/}/Root"
mkdir -p "${1}/${modules[$i]##*/}/Scripts"
ditto --noextattr --noqtn "${modules[$i]}/postinstall" "${1}/${modules[$i]##*/}/Scripts/postinstall"
echo "[BUILD] ${modules[$i]##*/} "
buildpackage "${1}/${modules[$i]##*/}" "/tmpcham" "" "start_selected=\"false\"" >/dev/null 2>&1
rm -R -f "${1}/${i##*/}"
done
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# End utility package
# End build Dependencies Modules package
# End build Modules packages
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
packagesidentity="org.chameleon.utility.com"
# build package for Chameleon PrefPanel
mkdir -p "${1}/PrefPanel/Root/"
mkdir -p "${1}/PrefPanel/Root"
ditto --noextattr --noqtn "${pkgroot}/Configuration/PrefPanel/Chameleon.prefPane" "${1}/PrefPanel/Root"
echo "[BUILD] Chameleon Preference Panel "
buildpackage "${1}/PrefPanel" "/Library/PreferencePanes/Chameleon.prefPane" "" "start_selected=\"false\"" >/dev/null 2>&1
# End build package for Chameleon PrefPanel
# build package for SMBIOSDefault
mkdir -p "${1}/SMBIOSDefault/Root/"
mkdir -p "${1}/SMBIOSDefault/Root"
ditto --noextattr --noqtn "${pkgroot}/Configuration/SMBIOSDefault/smbios.plist" "${1}/SMBIOSDefault/Root"
echo "[BUILD] SMBIOSDefault "
buildpackage "${1}/SMBIOSDefault" "/Extra/Example" "" "start_selected=\"false\"" >/dev/null 2>&1
# End build package for SMBIOSDefault
# build package for EFIMounter
mkdir -p "${1}/EFIMounter/Root/"
mkdir -p "${1}/EFIMounter/Root"
ditto --noextattr --noqtn "${pkgroot}/Configuration/EFIMounter/EFI Mounter.app" "${1}/EFIMounter/Root"
echo "[BUILD] EFIMounter "
buildpackage "${1}/EFIMounter" "/Applications/EFI Mounter.app" "" "start_selected=\"false\"" >/dev/null 2>&1
for (( i = 0 ; i < ${#kexts[@]} ; i++ ))
do
filename="${kexts[$i]##*/}"
mkdir -p "${1}/${filename%.kext}/Root/"
mkdir -p "${1}/${filename%.kext}/Root"
ditto --noextattr --noqtn --arch i386 "${kexts[$i]}" "${1}/${filename%.kext}/Root/${filename}"
find "${1}/${filename%.kext}" -name '.DS_Store' -or -name '.svn' -exec rm -R -f {} \; 2>/dev/null
fixperms "${1}/${filename%.kext}/Root/"
chown 501:20 "${1}/${filename%.kext}/Root/"
fixperms "${1}/${filename%.kext}/Root"
chown 501:20 "${1}/${filename%.kext}/Root"
echo "[BUILD] ${filename%.kext} "
buildpackage "${1}/${filename%.kext}" "/Extra/Extensions" "" "start_selected=\"false\"" >/dev/null 2>&1
rm -R -f "${1}/${filename%.kext}"
branches/iFabio/Chameleon/package/Scripts/Modules/Module_uClibc/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
#
# $1: the full path to the installation package; for example:
# /Volumes/Projects/Testing/Simple_Carbon_App.pkg
#
# $2: the full path to the installation destination; for example:
# /Applications
#
# $3: the mountpoint of the destination volume; for example:
# / or /Volumes/External_Drive
#
# $4: the root directory for the current System folder:
# /
echo "preinstall: Path to installer....... $1"
echo "preinstall: Path to destination..... $2"
echo "preinstall: Path to dest volume..... $3"
echo "preinstall: Root of system folder... $4"
echo "Done..."
branches/iFabio/Chameleon/package/Scripts/Modules/Module_Resolution/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
#
# $1: the full path to the installation package; for example:
# /Volumes/Projects/Testing/Simple_Carbon_App.pkg
#
# $2: the full path to the installation destination; for example:
# /Applications
#
# $3: the mountpoint of the destination volume; for example:
# / or /Volumes/External_Drive
#
# $4: the root directory for the current System folder:
# /
echo "preinstall: Path to installer....... $1"
echo "preinstall: Path to destination..... $2"
echo "preinstall: Path to dest volume..... $3"
echo "preinstall: Root of system folder... $4"
echo "Done..."
branches/iFabio/Chameleon/package/Scripts/Modules/Module_klibc/postinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
#
# $1: the full path to the installation package; for example:
# /Volumes/Projects/Testing/Simple_Carbon_App.pkg
#
# $2: the full path to the installation destination; for example:
# /Applications
#
# $3: the mountpoint of the destination volume; for example:
# / or /Volumes/External_Drive
#
# $4: the root directory for the current System folder:
# /
echo "preinstall: Path to installer....... $1"
echo "preinstall: Path to destination..... $2"
echo "preinstall: Path to dest volume..... $3"
echo "preinstall: Root of system folder... $4"
echo "Done..."

Archive Download the corresponding diff file

Revision: 277