From c9bf8a1efa111e16bf7579e0dd32daf82d222857 Mon Sep 17 00:00:00 2001 From: Vasilito Date: Sun, 3 May 2026 16:00:59 +0100 Subject: [PATCH] fix: thermal daemon workspace integration (19 patches) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed common dependency path (../../common → ../common). Added workspace member entry for drivers/thermald. thermald now builds as part of base recipe. 19/19 patches. base + base-initfs build. --- local/patches/base/P4-thermal-daemon.patch | 24 +++++++++++-------- .../patches/base/P4-thermald-workspace.patch | 10 ++++++++ recipes/core/base/P4-thermald-workspace.patch | 1 + recipes/core/base/recipe.toml | 2 ++ 4 files changed, 27 insertions(+), 10 deletions(-) create mode 100644 local/patches/base/P4-thermald-workspace.patch create mode 120000 recipes/core/base/P4-thermald-workspace.patch diff --git a/local/patches/base/P4-thermal-daemon.patch b/local/patches/base/P4-thermal-daemon.patch index ba692bb3..9a3263f1 100644 --- a/local/patches/base/P4-thermal-daemon.patch +++ b/local/patches/base/P4-thermal-daemon.patch @@ -1,5 +1,5 @@ --- a/drivers/thermald/Cargo.toml 1970-01-01 00:00:00.000000000 +0000 -+++ b/drivers/thermald/Cargo.toml 2026-05-03 15:36:46.091061688 +0100 ++++ b/drivers/thermald/Cargo.toml 2026-05-03 15:54:52.487976196 +0100 @@ -0,0 +1,12 @@ +[package] +name = "thermald" @@ -9,13 +9,13 @@ +[dependencies] +log.workspace = true +anyhow.workspace = true -+common = { path = "../../common" } ++common = { path = "../common" } + +[lints] +workspace = true --- a/drivers/thermald/src/main.rs 1970-01-01 00:00:00.000000000 +0000 -+++ b/drivers/thermald/src/main.rs 2026-05-03 15:36:46.091037823 +0100 -@@ -0,0 +1,32 @@ ++++ b/drivers/thermald/src/main.rs 2026-05-03 15:54:52.488780946 +0100 +@@ -0,0 +1,30 @@ +use anyhow::{Context, Result}; +use std::{thread, time}; + @@ -41,14 +41,18 @@ + log::error!("thermald: CRITICAL {:.1}C", temp); + } else if temp > 70.0 { + log::warn!("thermald: WARNING {:.1}C", temp); -+ } else { -+ log::info!("thermald: {:.1}C", temp); + } + } + thread::sleep(time::Duration::from_secs(5)); + } +} ---- a/.gitkeep 2026-05-03 15:36:46.091061688 +0100 -+++ b/.gitkeep 1970-01-01 00:00:00.000000000 +0000 -@@ -1 +0,0 @@ -- +--- a/init.d/30_thermald.service 1970-01-01 00:00:00.000000000 +0000 ++++ b/init.d/30_thermald.service 2026-05-03 15:54:52.489441597 +0100 +@@ -0,0 +1,7 @@ ++[unit] ++description = "CPU Thermal Monitor" ++requires_weak = ["00_base.target"] ++ ++[service] ++cmd = "thermald" ++type = "oneshot_async" diff --git a/local/patches/base/P4-thermald-workspace.patch b/local/patches/base/P4-thermald-workspace.patch new file mode 100644 index 00000000..d0298236 --- /dev/null +++ b/local/patches/base/P4-thermald-workspace.patch @@ -0,0 +1,10 @@ +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -46,6 +46,7 @@ + "drivers/input/ps2d", + "drivers/input/usbhidd", ++ "drivers/thermald", + + "drivers/net/driver-network", + "drivers/net/e1000d", + "drivers/net/ixgbed", diff --git a/recipes/core/base/P4-thermald-workspace.patch b/recipes/core/base/P4-thermald-workspace.patch new file mode 120000 index 00000000..0a06fcd9 --- /dev/null +++ b/recipes/core/base/P4-thermald-workspace.patch @@ -0,0 +1 @@ +../../../local/patches/base/P4-thermald-workspace.patch \ No newline at end of file diff --git a/recipes/core/base/recipe.toml b/recipes/core/base/recipe.toml index 33b28863..82912f6b 100644 --- a/recipes/core/base/recipe.toml +++ b/recipes/core/base/recipe.toml @@ -20,6 +20,7 @@ patches = [ "P4-initfs-dbus-services.patch", "P4-fbcond-scrollback.patch", "P4-thermal-daemon.patch", + "P4-thermald-workspace.patch", ] [build] @@ -67,6 +68,7 @@ BINS=( rtl8168d usbctl usbhidd + thermald usbhubd ucsid usbscsid