autofill SMBIOS in the case of manual change product

Signed-off-by: Slice <sergey.slice@gmail.com>
This commit is contained in:
Slice 2024-06-05 22:15:32 +03:00
parent b7b5037d67
commit e8933cda38
6 changed files with 15 additions and 9 deletions

View File

@ -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

View File

@ -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" ---------------------------------------------------------------------------------"

View File

@ -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;

View File

@ -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)

View File

@ -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);
}
}