diff --git a/.config b/.config index e6bba2e349..bea90a28a9 100644 --- a/.config +++ b/.config @@ -1,3 +1,3 @@ PODMAN_BUILD?=0 REDBEAR_ALLOW_PROTECTED_FETCH=1 -COOKBOOK_MAKE_JOBS=32 +COOKBOOK_MAKE_JOBS=16 diff --git a/local/recipes/kde/kf6-kitemviews/source/CMakeLists.txt b/local/recipes/kde/kf6-kitemviews/source/CMakeLists.txt index 2b26af50c2..a580d81e7b 100644 --- a/local/recipes/kde/kf6-kitemviews/source/CMakeLists.txt +++ b/local/recipes/kde/kf6-kitemviews/source/CMakeLists.txt @@ -76,6 +76,7 @@ find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED) find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED) find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED) find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED) +find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED) set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].") diff --git a/local/recipes/qt/qtbase/source/src/corelib/CMakeLists.txt b/local/recipes/qt/qtbase/source/src/corelib/CMakeLists.txt index 9e3c4b1e97..a64c7d46ac 100644 --- a/local/recipes/qt/qtbase/source/src/corelib/CMakeLists.txt +++ b/local/recipes/qt/qtbase/source/src/corelib/CMakeLists.txt @@ -1271,6 +1271,13 @@ qt_internal_extend_target(Core CONDITION REDOX io/qstorageinfo_unix.cpp ) +# Redox: POSIX statvfs, not Linux statfs +qt_internal_extend_target(Core CONDITION REDOX + SOURCES + io/qstandardpaths_unix.cpp + io/qstorageinfo_unix.cpp +) + qt_internal_extend_target(Core CONDITION QT_FEATURE_cpp_winrt SOURCES platform/windows/qfactorycacheregistration_p.h @@ -1369,6 +1376,13 @@ qt_internal_extend_target(Core CONDITION REDOX io/qstorageinfo_unix.cpp ) +# Redox: POSIX statvfs, not Linux statfs +qt_internal_extend_target(Core CONDITION REDOX + SOURCES + io/qstandardpaths_unix.cpp + io/qstorageinfo_unix.cpp +) + qt_internal_extend_target(Core CONDITION QT_FEATURE_itemmodel SOURCES itemmodels/qabstractitemmodel.cpp itemmodels/qabstractitemmodel.h itemmodels/qabstractitemmodel_p.h diff --git a/local/recipes/qt/qtbase/source/src/corelib/global/qtypes.h b/local/recipes/qt/qtbase/source/src/corelib/global/qtypes.h index 8b37594efb..11d19e7af4 100644 --- a/local/recipes/qt/qtbase/source/src/corelib/global/qtypes.h +++ b/local/recipes/qt/qtbase/source/src/corelib/global/qtypes.h @@ -187,6 +187,7 @@ static_assert(std::is_signed_v, #include #include #include +#include #ifndef static_assert #define static_assert _Static_assert #endif diff --git a/local/recipes/qt/qtbase/source/src/network/socket/qnativesocketengine_unix.cpp b/local/recipes/qt/qtbase/source/src/network/socket/qnativesocketengine_unix.cpp index d1e276656a..15e8f140e1 100644 --- a/local/recipes/qt/qtbase/source/src/network/socket/qnativesocketengine_unix.cpp +++ b/local/recipes/qt/qtbase/source/src/network/socket/qnativesocketengine_unix.cpp @@ -1131,6 +1131,7 @@ qint64 QNativeSocketEnginePrivate::nativeSendDatagram(const char *data, qint64 l #ifdef IPV6_HOPLIMIT #ifdef IPV6_HOPLIMIT #ifdef IPV6_HOPLIMIT +#ifdef IPV6_HOPLIMIT #ifdef IPV6_HOPLIMIT if (header.hopLimit != -1) { msg.msg_controllen += CMSG_SPACE(sizeof(int)); @@ -1149,6 +1150,7 @@ qint64 QNativeSocketEnginePrivate::nativeSendDatagram(const char *data, qint64 l #endif #endif #endif +#endif #endif if (header.ifindex != 0 || !header.senderAddress.isNull()) { struct in6_pktinfo *data = reinterpret_cast(CMSG_DATA(cmsgptr)); diff --git a/local/recipes/qt/qtbase/source/src/network/socket/qnet_unix_p.h b/local/recipes/qt/qtbase/source/src/network/socket/qnet_unix_p.h index c45f6bb61b..b8c6801ec1 100644 --- a/local/recipes/qt/qtbase/source/src/network/socket/qnet_unix_p.h +++ b/local/recipes/qt/qtbase/source/src/network/socket/qnet_unix_p.h @@ -31,6 +31,7 @@ #include #include #include +#include #include #if defined(Q_OS_VXWORKS) diff --git a/local/recipes/qt/qtbase/source/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegration_p.h b/local/recipes/qt/qtbase/source/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegration_p.h index 0fb3f56ce8..fa9c85dfb5 100644 --- a/local/recipes/qt/qtbase/source/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegration_p.h +++ b/local/recipes/qt/qtbase/source/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegration_p.h @@ -61,6 +61,7 @@ public: #if QT_CONFIG(opengl) #if QT_CONFIG(opengl) #if QT_CONFIG(opengl) +#if QT_CONFIG(opengl) #if QT_CONFIG(opengl) virtual QPlatformOpenGLContext *createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const = 0; #endif /* QT_CONFIG(opengl) */ @@ -72,6 +73,7 @@ public: #endif /* QT_CONFIG(opengl) */ #endif /* QT_CONFIG(opengl) */ #endif /* QT_CONFIG(opengl) */ +#endif /* QT_CONFIG(opengl) */ #endif /* QT_CONFIG(opengl) */ virtual bool canCreatePlatformOffscreenSurface() const { return false; } #if QT_CONFIG(opengl) @@ -94,6 +96,7 @@ public: #if QT_CONFIG(opengl) #if QT_CONFIG(opengl) #if QT_CONFIG(opengl) +#if QT_CONFIG(opengl) #if QT_CONFIG(opengl) virtual void *nativeResourceForContext(NativeResource /*resource*/, QPlatformOpenGLContext */*context*/) { return nullptr; } #endif /* QT_CONFIG(opengl) */ @@ -106,6 +109,7 @@ public: #endif /* QT_CONFIG(opengl) */ #endif /* QT_CONFIG(opengl) */ #endif /* QT_CONFIG(opengl) */ +#endif /* QT_CONFIG(opengl) */ }; } diff --git a/local/recipes/system/redbear-power/source/src/app.rs b/local/recipes/system/redbear-power/source/src/app.rs index 5eae226779..08af88064e 100644 --- a/local/recipes/system/redbear-power/source/src/app.rs +++ b/local/recipes/system/redbear-power/source/src/app.rs @@ -106,6 +106,10 @@ pub struct App { pub msr_available: bool, pub cpufreqd_available: bool, pub thermald_available: bool, + pub pss_available: bool, + pub load_available: bool, + pub governor_available: bool, + pub hwmon_available: bool, pub pkg_thermal: PackageThermal, pub cpuid_info: CpuId, pub simd: String, @@ -144,7 +148,17 @@ impl TabId { } impl App { + /// Build an App with default platform probes (emits startup + /// diagnostic lines via `eprintln!`). Prefer this constructor + /// from `main()`. pub fn new() -> Self { + let probes = crate::platform::probe(); + Self::new_with_probes(probes) + } + + /// Build an App with a pre-computed probe result (used by tests + /// and by callers that want to suppress startup diagnostics). + pub fn new_with_probes(probes: crate::platform::Probes) -> Self { let cpus = detect_cpus(); let mut table_state = TableState::default(); table_state.select(Some(0)); @@ -188,16 +202,23 @@ impl App { } }) .collect(); - let pss_source = if cpus.iter().any(|_| { - fs::read_to_string(format!("/scheme/acpi/processor/CPU{}/pss", cpus[0])).is_ok() - }) { - "ACPI _PSS".to_string() + let pss_source = if probes.acpi_pss.is_some() { + "ACPI _PSS / sysfs".to_string() } else { - "fallback table (no ACPI _PSS)".to_string() + "fallback table (no ACPI _PSS / sysfs)".to_string() }; - let msr_available = read_msr(cpus[0], IA32_THERM_STATUS).is_some(); - let cpufreqd_available = fs::metadata("/scheme/cpufreq/state").is_ok(); + let msr_available = probes.msr.is_some(); + // Backward-compat aliases: these are the legacy "cpufreqd / thermald" + // booleans. With Phase A/B we now read cpufreq state directly + // from /sys on Linux, so the booleans reflect the *governor backend* + // (cpufreq sysfs on Linux, cpufreqd on Redox). thermald stays Redox-only + // for now. + let cpufreqd_available = probes.governor.is_some(); let thermald_available = fs::metadata("/scheme/thermal").is_ok(); + let pss_available = probes.acpi_pss.is_some(); + let load_available = probes.load.is_some(); + let governor_available = probes.governor.is_some(); + let hwmon_available = probes.hwmon.is_some(); App { cpus: rows, table_state, @@ -210,6 +231,10 @@ impl App { msr_available, cpufreqd_available, thermald_available, + pss_available, + load_available, + governor_available, + hwmon_available, pkg_thermal: PackageThermal::default(), cpuid_info, simd, diff --git a/local/recipes/system/redbear-power/source/src/main.rs b/local/recipes/system/redbear-power/source/src/main.rs index de08154371..554d17b875 100644 --- a/local/recipes/system/redbear-power/source/src/main.rs +++ b/local/recipes/system/redbear-power/source/src/main.rs @@ -160,11 +160,6 @@ fn handle_mouse(me: MouseEvent, header: &Rect, table: &Rect, controls: &Rect, ap fn main() -> io::Result<()> { let args = parse_args(); - // Probe the host kernel once at startup. Emits one diagnostic line - // per data source so the user sees at a glance which paths are live - // (matches cpu-x's MSG_VERBOSE pattern; see platform.rs). - let probes = platform::probe(); - let cfg = if let Some(p) = args.config_path.as_ref() { // When --config is given, load only that file (no system/user merge). match std::fs::read_to_string(p) { diff --git a/local/recipes/system/redbear-power/source/src/render.rs b/local/recipes/system/redbear-power/source/src/render.rs index 75524c87e4..d937420e20 100644 --- a/local/recipes/system/redbear-power/source/src/render.rs +++ b/local/recipes/system/redbear-power/source/src/render.rs @@ -143,13 +143,6 @@ pub fn render_header<'a>(app: &'a App, focused: bool) -> Paragraph<'a> { "PkgFlags: ".set_style(theme::LABEL), pkg_flags.clone().set_style(theme::STATUS_WARN), " ".into(), - "MSR: ".set_style(theme::LABEL), - if app.msr_available { - "available".set_style(theme::VALUE_OK) - } else { - "not available (QEMU?)".set_style(theme::VALUE_OFF) - }, - " ".into(), "P-state source: ".set_style(theme::LABEL), app.pss_source.as_str().into(), ]), @@ -160,6 +153,39 @@ pub fn render_header<'a>(app: &'a App, focused: bool) -> Paragraph<'a> { "Cache: ".set_style(theme::LABEL), app.cache_summary.as_str().set_style(theme::VALUE), ]), + Line::from(vec![ + "Sources: ".set_style(theme::LABEL), + "MSR=".set_style(theme::VALUE_OFF), + if app.msr_available { + "ok".set_style(theme::VALUE_OK) + } else { + "no".set_style(theme::STATUS_ERR) + }, + " PSS=".set_style(theme::VALUE_OFF), + if app.pss_available { + "ok".set_style(theme::VALUE_OK) + } else { + "no".set_style(theme::STATUS_ERR) + }, + " load=".set_style(theme::VALUE_OFF), + if app.load_available { + "ok".set_style(theme::VALUE_OK) + } else { + "no".set_style(theme::STATUS_ERR) + }, + " gov=".set_style(theme::VALUE_OFF), + if app.governor_available { + "ok".set_style(theme::VALUE_OK) + } else { + "no".set_style(theme::STATUS_ERR) + }, + " hwmon=".set_style(theme::VALUE_OFF), + if app.hwmon_available { + "ok".set_style(theme::VALUE_OK) + } else { + "no".set_style(theme::STATUS_ERR) + }, + ]), Line::from(vec![ "Hybrid: ".set_style(theme::LABEL), if app.hybrid_summary.is_empty() {