mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-25 11:55:28 +01:00
autofill SMBIOS in the case of manual change product
Signed-off-by: Slice <sergey.slice@gmail.com>
This commit is contained in:
parent
b7b5037d67
commit
e8933cda38
@ -990,6 +990,8 @@
|
||||
<false/>
|
||||
<key>ExternalDiskIcons</key>
|
||||
<false/>
|
||||
<key>ForceAquantiaEthernet</key>
|
||||
<false/>
|
||||
<key>ForceExitBootServices</key>
|
||||
<false/>
|
||||
<key>ForceOcWriteFlash</key>
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 8865f874167989c020973b467dacf4461f7298f6
|
||||
Subproject commit 5f5428cc8b9ad2ad0ce0d416d5dd24ad5f6a15a2
|
6
buildme
6
buildme
@ -126,7 +126,7 @@ if [[ "$SYSNAME" == Darwin ]]; then
|
||||
if [[ $MYTOOLCHAIN == GCC* ]] && [[ ! -x "${GCC131_BIN}" ]]; then
|
||||
if [[ $MYTOOLCHAIN == GCC131 ]]; then
|
||||
cd "${CLOVERROOT}"
|
||||
./build_gcc13.sh
|
||||
./build_gcc14.sh
|
||||
else
|
||||
MYTOOLCHAIN=XCODE8
|
||||
fi
|
||||
@ -264,7 +264,7 @@ BLC() {
|
||||
if [[ ! -d "${CLOVERROOT}"/CloverPackage/BootLoaderChooser ]]; then
|
||||
mkdir -p "${CLOVERROOT}"/CloverPackage/BootLoaderChooser
|
||||
fi
|
||||
curl -sLq https://github.com/jief666/BootloaderChooser/releases/download/0.5/BootX64.efi > "${CLOVERROOT}"/CloverPackage/BootLoaderChooser/BootX64.efi
|
||||
curl -sLq https://github.com/jief666/BootloaderChooser/releases/download/1.4/BootX64.efi > "${CLOVERROOT}"/CloverPackage/BootLoaderChooser/BootX64.efi
|
||||
chmod 775 "${CLOVERROOT}"/CloverPackage/BootLoaderChooser/BootX64.efi
|
||||
}
|
||||
|
||||
@ -846,7 +846,7 @@ done
|
||||
Extra
|
||||
}
|
||||
|
||||
menu() {
|
||||
menu()
|
||||
#clear
|
||||
echo
|
||||
echo -e $COL_GREEN" ---------------------------------------------------------------------------------"
|
||||
|
@ -804,8 +804,9 @@ XString8 GetReleaseDate(MacModel Model)
|
||||
|
||||
void SetDMISettingsForModel(MacModel Model, SETTINGS_DATA* settingsData)
|
||||
{
|
||||
// GlobalConfig.CurrentModel = Model; // 2022-05 Not using Goblal config to avoid inter-dependancy. CCPV wouldn't compile anymore.
|
||||
// be sure to to assign GlobalConfig.CurrentModel if you need to.
|
||||
// GlobalConfig.CurrentModel = Model; // 2022-05 Not using Goblal config to avoid inter-dependancy.
|
||||
// CCPV wouldn't compile anymore.
|
||||
// be sure to to assign GlobalConfig.CurrentModel if you need to.
|
||||
settingsData->Smbios.BiosVersion = ApplePlatformDataArray[Model].firmwareVersion;
|
||||
settingsData->Smbios.BiosReleaseDate = GetReleaseDate(Model);
|
||||
settingsData->Smbios.EfiVersion = ApplePlatformDataArray[Model].efiversion;
|
||||
|
@ -599,16 +599,17 @@ EFI_STATUS ConfigManager::LoadSMBIOSPlist(const XStringW& ConfName)
|
||||
void ConfigManager::ReloadSmbios(XStringW& str)
|
||||
{
|
||||
size_t N = SmbiosList.size();
|
||||
if (OldChosenSmbios == 0) {
|
||||
if (OldChosenSmbios == 0) { // this is auto fill by OSName
|
||||
for (size_t i=1; i<N; i++) {
|
||||
if (SmbiosList[i].contains(str)) {
|
||||
OldChosenSmbios = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
FillSmbiosWithDefaultValue(GlobalConfig.CurrentModel, configPlist.getSMBIOS());
|
||||
DBG("SMBIOS reloaded with model %s\n", gSettings.Smbios.ProductName.c_str());
|
||||
}
|
||||
FillSmbiosWithDefaultValue(GlobalConfig.CurrentModel, configPlist.getSMBIOS());
|
||||
DBG("SMBIOS reloaded with model %s\n", gSettings.Smbios.ProductName.c_str());
|
||||
|
||||
}
|
||||
|
||||
void ConfigManager::FillSmbiosWithDefaultValue(MacModel Model, const SmbiosPlistClass::SmbiosDictClass& smbiosDictClass)
|
||||
|
@ -101,6 +101,7 @@ XBool gResetSMC = false;
|
||||
extern APPLE_SMC_IO_PROTOCOL *gAppleSmc;
|
||||
extern ConfigManager gConf;
|
||||
|
||||
|
||||
void FillInputs(XBool New)
|
||||
{
|
||||
UINTN i,j; //for loops
|
||||
@ -790,6 +791,7 @@ void ApplyInputs(void)
|
||||
if (Model != MaxMacModel) {
|
||||
GlobalConfig.CurrentModel = Model;
|
||||
SetDMISettingsForModel(Model, &gSettings);
|
||||
FillInputs(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user