pipedal_kconfig (GRUB bootloader)

This commit is contained in:
Robin E. R. Davies
2024-11-29 10:45:46 -05:00
parent 245a47fe81
commit efe8775713
7 changed files with 226 additions and 49 deletions
+25
View File
@@ -28,6 +28,7 @@
#include "RegDb.hpp"
#include "Locale.hpp"
#include "Finally.hpp"
#include "BootConfig.hpp"
#include <filesystem>
#include <stdlib.h>
@@ -1026,6 +1027,28 @@ bool SetWebServerPort(std::string portOption)
return true;
}
void CheckPreemptDynamicConfig()
{
try {
BootConfig bootConfig;
if (bootConfig.KernelType() == "PREEMPT_DYNAMIC")
{
if (bootConfig.DynamicScheduler() != BootConfig::DynamicSchedulerT::Full)
{
cout << endl;
cout << "Warning: PREEMPT_DYNAMIC kernel has not been configured for 'preempt=full'" << endl;
cout << "Run pipedal_kconfig to configure the kernel for real-time audio." << endl;
cout << endl;
}
}
} catch(const std::exception& /* ignore */)
{
}
}
void Install(const fs::path &programPrefix, const std::string endpointAddress)
{
cout << "Configuring pipedal" << endl;
@@ -1257,6 +1280,8 @@ void Install(const fs::path &programPrefix, const std::string endpointAddress)
// Restart Wi-Fi Direct if neccessary.
OnWifiReinstall();
CheckPreemptDynamicConfig();
}
catch (const std::exception &e)
{