Index: branches/iFabio/Chameleon/i386/libsaio/spd.c =================================================================== --- branches/iFabio/Chameleon/i386/libsaio/spd.c (revision 276) +++ branches/iFabio/Chameleon/i386/libsaio/spd.c (revision 277) @@ -361,18 +361,19 @@ 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 } }; Index: branches/iFabio/Chameleon/i386/libsaio/smbios.c =================================================================== --- branches/iFabio/Chameleon/i386/libsaio/smbios.c (revision 276) +++ branches/iFabio/Chameleon/i386/libsaio/smbios.c (revision 277) @@ -148,8 +148,8 @@ char **defaultValue; } SMBValueSetter; -SMBValueSetter SMBSetters[] = -{ +SMBValueSetter SMBSetters[] = +{ //------------------------------------------------------------------------------------------------------------------------- // BIOSInformation //------------------------------------------------------------------------------------------------------------------------- @@ -193,13 +193,13 @@ {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}, //------------------------------------------------------------------------------------------------------------------------- @@ -541,6 +541,28 @@ { 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++; @@ -585,6 +607,8 @@ 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)); } @@ -615,7 +639,7 @@ tableLength += structSize; - if (structSize > maxStructSize) + if (structSize > maxStructSize) maxStructSize = structSize; structureCount++; @@ -770,9 +794,9 @@ 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; Index: branches/iFabio/Chameleon/i386/libsaio/smbios_getters.c =================================================================== --- branches/iFabio/Chameleon/i386/libsaio/smbios_getters.c (revision 276) +++ branches/iFabio/Chameleon/i386/libsaio/smbios_getters.c (revision 277) @@ -48,8 +48,6 @@ 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) ??? @@ -247,9 +245,9 @@ } } -// return false; - value->string = NOT_AVAILABLE; - return true; + return false; +// value->string = NOT_AVAILABLE; +// return true; } bool getSMBMemoryDeviceSerialNumber(returnType *value) @@ -269,9 +267,9 @@ } } -// return false; - value->string = NOT_AVAILABLE; - return true; + return false; +// value->string = NOT_AVAILABLE; +// return true; } bool getSMBMemoryDevicePartNumber(returnType *value) @@ -291,9 +289,9 @@ } } -// return false; - value->string = NOT_AVAILABLE; - return true; + return false; +// value->string = NOT_AVAILABLE; +// return true; } Index: branches/iFabio/Chameleon/package/buildpkg =================================================================== --- branches/iFabio/Chameleon/package/buildpkg (revision 276) +++ branches/iFabio/Chameleon/package/buildpkg (revision 277) @@ -46,7 +46,7 @@ outline[$((outlinecount++))]="${indent[$xmlindent]}" # build core package - echo "================= core =================" + echo "================= Core =================" ((xmlindent++)) packagesidentity="org.chameleon.core.pkg" mkdir -p ${1}/Core/Root/usr/sbin @@ -64,7 +64,7 @@ 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 @@ -88,8 +88,8 @@ 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']) && 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 " @@ -97,64 +97,24 @@ # End build reset choice package # build Modules package - outline[$((outlinecount++))]="${indent[$xmlindent]}\t" - choices[$((choicescount++))]="\n\n" + echo "================= Modules =================" + outline[$((outlinecount++))]="${indent[$xmlindent]}\t" + choices[$((choicescount++))]="\n\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" - choices[$((choicescount++))]="\n\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++))]="\n\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" - # 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" - # End utility package - # End build Dependencies Modules package + # End build Modules packages ((xmlindent--)) outline[$((outlinecount++))]="${indent[$xmlindent]}\t" @@ -174,21 +134,21 @@ 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 @@ -307,11 +267,11 @@ 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}" Index: branches/iFabio/Chameleon/package/Scripts/Modules/Module_uClibc/postinstall =================================================================== --- branches/iFabio/Chameleon/package/Scripts/Modules/Module_uClibc/postinstall (revision 0) +++ branches/iFabio/Chameleon/package/Scripts/Modules/Module_uClibc/postinstall (revision 277) @@ -0,0 +1,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..." \ No newline at end of file Property changes on: branches/iFabio/Chameleon/package/Scripts/Modules/Module_uClibc/postinstall ___________________________________________________________________ Added: svn:executable + * Index: branches/iFabio/Chameleon/package/Scripts/Modules/Module_Resolution/postinstall =================================================================== --- branches/iFabio/Chameleon/package/Scripts/Modules/Module_Resolution/postinstall (revision 0) +++ branches/iFabio/Chameleon/package/Scripts/Modules/Module_Resolution/postinstall (revision 277) @@ -0,0 +1,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..." \ No newline at end of file Property changes on: branches/iFabio/Chameleon/package/Scripts/Modules/Module_Resolution/postinstall ___________________________________________________________________ Added: svn:executable + * Index: branches/iFabio/Chameleon/package/Scripts/Modules/Module_klibc/postinstall =================================================================== --- branches/iFabio/Chameleon/package/Scripts/Modules/Module_klibc/postinstall (revision 0) +++ branches/iFabio/Chameleon/package/Scripts/Modules/Module_klibc/postinstall (revision 277) @@ -0,0 +1,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..." \ No newline at end of file Property changes on: branches/iFabio/Chameleon/package/Scripts/Modules/Module_klibc/postinstall ___________________________________________________________________ Added: svn:executable + * Index: branches/iFabio/Chameleon/package/Resources/English.lproj/Localizable.strings =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream