From nobody Sun Oct 5 01:49:23 2025 Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 44D9B2D8DC2 for ; Mon, 11 Aug 2025 06:59:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754895600; cv=none; b=f+d6JNaUWRZ2DkLT0UKOctsHnA+gyMusGgbRmZX9NcsbeRRFCgz2RdgZDKCXAWQRCnqKGKIxhrlrZdWhsRIL//TXya9cyIR/zZmPCMWF7s+YjBeavy8WBZEKn+41gOXfAG4syRtFn/BN1sRp+4QZnvoMJwe6vtDcBmqYs8FxN04= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754895600; c=relaxed/simple; bh=SjJhb9CtuJxPb/S2Z0mHEwXzWQgumrJpI93kJdVN0IE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=P/QuLAI8JBxLEG2nJWS1Gl3tKz2GPK7rT5wIYh37JIi2rbfrA2sKko9BAMASQdXboLmUaiFbkW479WSNdKbUfNPkJdUVUFCjsnC6M+4VHGy5gUHd8HODgNfpjjYONOA5+yZKfE23bwzqlJY+D64ClIvpWaAfk8Z4UhPAZbaTe1Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=uyhfMLrT; arc=none smtp.client-ip=209.85.218.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="uyhfMLrT" Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-af90fd52147so599216866b.3 for ; Sun, 10 Aug 2025 23:59:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1754895597; x=1755500397; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VMVpB2gF5xo34wUJzhKOG6ELwA0I40ZxfSZXRPOtdH8=; b=uyhfMLrTS7oEQy7epkfXwIV4+lzGFgesKkp4Dbu5fm+el4Jn0kpZDRLJZuzM/Qz4t9 hw9gmfHabdp+kX0EtUSslp0hj2QiXqX6Cmg/aHOImfvzcw/y/CCGBEqtxH4BPV5qbQ4Q zcNSjt5eYUDm7Y+xWoCWTTjGzcpESUW3G4Q/9FBk+rufBELAmHlpIeWzJx9rgzUhhkQt rE8LSf9K2ck3bG9LbMUDy2qFZNTzlfwKnw/p6BiqoguiRE2igVBrGWVaUU7B+Y/xOgZj z7TYoqX9WqzpgtcuF2XkONm3wH3jrpLkbX1sG+hgbjjKpl8RbK9MYRqWVEUxA1GDIQhb 4Gvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754895597; x=1755500397; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VMVpB2gF5xo34wUJzhKOG6ELwA0I40ZxfSZXRPOtdH8=; b=JbHZiV/CLC4H/wpF03JeE4Ay8p2PLjMfwDZzs38AUEh1L4uqE8HW7Pg/fpeo/p/ZC9 0L4fbacioKryT72BWqfTL1UDsAmMs0HKg6fV8z8oFmJBDgY6Hugw2vUmKtVTTet9OXDY RW/JFNUP1CklgTvf70MVn79dv9xfOFR2CWfjXrlI/ViOWKNq+zxDZYV9VY+dZ+zYBG2S BP3vdE3I3uZ5T5w34wm70BiQiHjGNrMq2kZCZIxTOkW8fQp996sISep0IPU78E3bv4sx msgC9+gjycf5lSqBG4KxwN865+pUmy2CdcYWfkkLRTXErfXBRbetlc7IxntluRIBg2jV gqrw== X-Gm-Message-State: AOJu0YzR9tSw8LU4cZqS4SKySSMWGt2tLPVLJgY973uZ5pyKPz2NSA/K oVrnKPQ68SJnTRkOSnb8uhi9we/GxoH1GVPXtd9Y31pKmuRr95FB5qPhS8BZL/03lcs= X-Gm-Gg: ASbGncv3sVM3grI07Wn6cJG1gLOEM9dV7rexRvjLrf95ocr76KikMTN+sj5L4dsTBSh FL4j4Zqfm05as+xSyg2oGxh5/mWIlhd3e7U/sAX+qbU1u9Hs9AN7GQSzkL6k+ukdB6BLCZ4n7Fb wYg33aSFSHWOYqebVDVb0I3g5wyx5XJ7lcJwDzCUPlPvN45B6NmcPp7eiB6zhrGaj/qCcXigM+O jUY3SlSKSJ2Bf1nzUWuhMIkve/lrQheCOpoJDeGV9CpNUx9aM2WG3kOWV2qmE65IV30JHldtxeP P3zZA0Fu9HiQy37jWSImF7D9vwef8eAix6edlMWlSn+8UZHkvSRjPD3+FuW6H4PbDJM9f38OV0S pEBcb3mPThEqAG5HvcYb0UXOAZ+Uky4k= X-Google-Smtp-Source: AGHT+IG59zAaGN05gxf1a3fNAJiiYDiuMx9Ck7HsUXcL2Cg/rpXGrAeDxDRSfbPv3qvDB1v99j//Rw== X-Received: by 2002:a17:907:7247:b0:af9:6813:892e with SMTP id a640c23a62f3a-af9c653ab3dmr1088021866b.51.1754895597382; Sun, 10 Aug 2025 23:59:57 -0700 (PDT) Received: from eugen-station.. ([82.79.215.22]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-af99604e648sm971793266b.6.2025.08.10.23.59.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Aug 2025 23:59:57 -0700 (PDT) From: Eugen Hristev To: rafael@kernel.org, daniel.lezcano@linaro.org, linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Eugen Hristev Subject: [PATCH 1/6] tools/Makefile: Add dependency on thermal for thermal-engine Date: Mon, 11 Aug 2025 09:59:10 +0300 Message-ID: <20250811065915.3333142-2-eugen.hristev@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250811065915.3333142-1-eugen.hristev@linaro.org> References: <20250811065915.3333142-1-eugen.hristev@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" thermal-engine requires thermal to build, and the dependency is in place. It is then obvious that install and clean targets should also depend on the corresponding thermal target. Signed-off-by: Eugen Hristev --- tools/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index c31cbbd12c45..a4f5577210f1 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -152,7 +152,7 @@ tmon_install: thermometer_install: $(call descend,thermal/$(@:_install=3D),install) =20 -thermal-engine_install: +thermal-engine_install: thermal_install $(call descend,thermal/$(@:_install=3D),install) =20 freefall_install: @@ -209,7 +209,7 @@ turbostat_clean x86_energy_perf_policy_clean intel-spee= d-select_clean: thermometer_clean: $(call descend,thermal/thermometer,clean) =20 -thermal-engine_clean: +thermal-engine_clean: thermal_clean $(call descend,thermal/thermal-engine,clean) =20 tmon_clean: --=20 2.43.0 From nobody Sun Oct 5 01:49:23 2025 Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 065452D8DC8 for ; Mon, 11 Aug 2025 06:59:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754895601; cv=none; b=NBuUZXws6tTi8RIdMe/kKx0NRKwlf5nFTcHEmE7/pHpq+/5bH0zUjv6gDzQAfJfYcfvemWeGUIAfk+srq/llo5L2Sg5MyeJxmownfSSDH8nNtQj46oRQuCqPQ9ADbZXs3ko5CqdnPTv56AeekzmFV4OO6okJrbyfmRSIkObtfRk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754895601; c=relaxed/simple; bh=3yZG1w4E8aqqoqQW5zLOvh3uvnyaBxVEiamqN5NZMSc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=r9OI+a54JOCtq+RelY7NRSaVa1X5Z1XHOtyxKLZGb7wNsNtYDASnTVtO1M2KrOwCvoddGjiLsT/jQ8lT+hjvloGYhWmn9GkUoBMyvJ0nU0fyj7ccj+gWshjytcX82DRcuRJ/PNw3f8cnYDhuGU5dhXop4gHd1n6tOuA//FsUDAo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=c8ZpoHVe; arc=none smtp.client-ip=209.85.208.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="c8ZpoHVe" Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-6157ed5dc51so6169609a12.1 for ; Sun, 10 Aug 2025 23:59:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1754895598; x=1755500398; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GSWS63dgKn7kFeQEdpGLXWVaoXQGy0K+bkkJl1msO+c=; b=c8ZpoHVe6+yDJLWGzQcJ0DcVril5cFSaGzxOOqRtxVyzGgBlKi1b8H3sJMCJbKCs7A yVtGrc9ZuSns0CB6tjemLv0PUoy74g5RAR5gLgEKvK5yZjv5QpbL1X5MzHjnfDV482ez 0K3L+RlZRsTb4gZxbSInOf5CsCND3vSZg1flTdlOp6j2djw42ZBfLkHi7O0ufIQnT085 XIj+1aADYKySmCMI7rN0vc7CZOYdVVy3e2McTSCPvpIB98V4zC8wNoGeaCtvJsJAnVWq seC5nHaMkvrcbEXjoOgndTSOOUN2gS6mEAVRu6tdDGWhFmzxwV12K+b6G+xeHAR18W8l SgHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754895598; x=1755500398; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GSWS63dgKn7kFeQEdpGLXWVaoXQGy0K+bkkJl1msO+c=; b=gnAYnyfdWWVnHK1+LiZGk3RcUl1X+YA+XKW6IMfwkaYK0otszQGO3NI2lSoM8TsoP6 1q9qj+SS+9dufcOeesyxboxdxtJzXoBb9pz2kfqwAUAiJMBFXoREM9kQ9gwWEu7B8rdM gsu9ZFym47bNcXEd6beBOBn1GLhFTIf0hTwIACErelVlLEQz/YLyLuNDAGOzA9eRJ0fz EZyy7kgtIDUu4WnL2yA/WQHac9NdqYlS3Mnf98qv9BUD3QArsMxHW28JwpuO4pZkPHIX sO828ACNUw5YX1UTlMK7XRFJeno3t6GX5oQCRDmBu10stDAg5cRsWrV8q3r1IDdpcRMI YzQQ== X-Gm-Message-State: AOJu0YzYxtqfk6V4yuaIiaBIEEvOcBz5nx3gbgqhCQwtGlKCAxE6x1V/ pUPZjYHuvDyTqa7CBrRVh3VnW36doYRkZWqM7Kyn9UO9cCv2ywVcL0H+rG+bSf55LJ4= X-Gm-Gg: ASbGnctE2kdm8ARz6Fcf004xE5i+AfVAxjVcCfAbH3Y0RWKylwzeoBXS90ePb/P2MHx pQRDJGsLxBfpuSASJ/EOMtO0Xp3BfCbMoJSx6bYOfj0EcaTpFITpsPzg6w9d/lJFl4g8Zy8pRKm 5j4+ypIrA6JyhA16vSadvVXjqgqbAzObEwlTWr0JmVbGE1IetyGvFYhHYRWnV4rs6+wFK/8FsCk sFUskWmmQnYrUTXDWXFjXIcRfAuZhIEukuLXge5vjV61EqIerb1lYjhnOspWvtUAQJarOdWKYkJ WDmD9P0d/NIymFlG40qUpYLBIwMEdtPxxnRn66lmg1H+x+Mn9ts0pZlPo2Ka+/X5YNWWE8GtNs2 pbaLqzhnx9rZxdWw/pmpP1rjrmzfYfjk= X-Google-Smtp-Source: AGHT+IFA5uwA/OJXYyO9fAVmjzSH1NeaCu1TKHlEdpmXOJBGeW8JH3l9EsOujXZG+RsuHLVxaosWXA== X-Received: by 2002:a17:906:eecd:b0:ae6:f564:18b5 with SMTP id a640c23a62f3a-af9c64525famr1132639966b.19.1754895598260; Sun, 10 Aug 2025 23:59:58 -0700 (PDT) Received: from eugen-station.. ([82.79.215.22]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-af99604e648sm971793266b.6.2025.08.10.23.59.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Aug 2025 23:59:57 -0700 (PDT) From: Eugen Hristev To: rafael@kernel.org, daniel.lezcano@linaro.org, linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Eugen Hristev Subject: [PATCH 2/6] tools/lib/thermal: Fix dependency to host libnl Date: Mon, 11 Aug 2025 09:59:11 +0300 Message-ID: <20250811065915.3333142-3-eugen.hristev@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250811065915.3333142-1-eugen.hristev@linaro.org> References: <20250811065915.3333142-1-eugen.hristev@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The include path should be created according to host pkg-config especially when building with a different sysroot or cross compiling. Thus, call the pkg-config to obtain the correct path instead of accessing directly from root host file system, which is incorrect. Fixes: 47c4b0de080a ("tools/lib/thermal: Add a thermal library") Signed-off-by: Eugen Hristev --- tools/lib/thermal/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/lib/thermal/Makefile b/tools/lib/thermal/Makefile index a1f5e388644d..ea56b55c9fcb 100644 --- a/tools/lib/thermal/Makefile +++ b/tools/lib/thermal/Makefile @@ -47,7 +47,6 @@ else endif =20 INCLUDES =3D \ --I/usr/include/libnl3 \ -I$(srctree)/tools/lib/thermal/include \ -I$(srctree)/tools/lib/ \ -I$(srctree)/tools/include \ @@ -55,6 +54,12 @@ INCLUDES =3D \ -I$(srctree)/tools/arch/$(SRCARCH)/include/uapi \ -I$(srctree)/tools/include/uapi =20 +VAR_INCLUDES =3D $(shell pkg-config --cflags libnl-3.0 libnl-genl-3.0 2>/d= ev/null) +ifeq ($(VAR_INCLUDES),) +VAR_INCLUDES =3D -I/usr/include/libnl3 +endif +override CFLAGS +=3D $(VAR_INCLUDES) + # Append required CFLAGS override CFLAGS +=3D $(EXTRA_WARNINGS) override CFLAGS +=3D -Werror -Wall --=20 2.43.0 From nobody Sun Oct 5 01:49:23 2025 Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D6A9E2D8DDD for ; Mon, 11 Aug 2025 07:00:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754895602; cv=none; b=hyG6M0YAlQW6uGYlNPUv51NGu3w1WWX7N1JbMLtYNSbQuULHTEbS7FJlY/dyJGynB9Ioehxz1ke9lZQL7RGCeS6fcLsTWbiZP3KNq2a8gc2aImfW5vCxaJAAkwkWRTgqen7miSzYoiO+FDhkMno/bLp7BEPDt5Awi3o+lV3vxos= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754895602; c=relaxed/simple; bh=KvFKeOUgAv5xTieNT78OQsqgL/nxGh1DVLUIu8ihqrM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Z32YkX76w3fVt9cpMVWULSbEwYVmWQ1kHNFWG/LIQiVkK5D4oF9bEaXYQWBkOSZuKB392wGItgtEyP8pvNuyBPUERxSP+2+OOdwtBpcFeG65EDGvpbI1U7VZyrAfdt+fAQL0qrVH6bOZnsNuIJvK4sAgxPTiGbiClRux/dL887I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=hPuAdGfw; arc=none smtp.client-ip=209.85.218.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="hPuAdGfw" Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-af958127df5so605416966b.2 for ; Mon, 11 Aug 2025 00:00:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1754895599; x=1755500399; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1yH1Zfwk4M7pUV4TKZjHnni/k3y7gfw5Y8QnaMyZmAI=; b=hPuAdGfw+qYOJnHPWV8xhrt8fF0V5ZrUirrtIoFNsUm+Q1PtU5dB9gF+LjjT9RoSCJ d2NP+1d8iKuKPi5m4hqCXftggn/D+qChsNG3pSxiUn6B694Xw1mOCnJjJt5rrRTNjlLa S6nO6Doouh8VZUjVEjnDW0ZuVBtHIybzHl0mjX4hNS1qbS7+jKF3cJBOMaOGeRldlBze tt+bdQDoxn8qCMdT7kLcXSVkAShBCwGC92VkW9zVdLdI6nOgdX/jzEvhOavaFrFm6M1Q CN4ig8XlELuy1ElSXITe2Yx/t88gO7oLhkR3+DzcqiA/XyEn+FUOSucHRw3kb5uxzEhi xzCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754895599; x=1755500399; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1yH1Zfwk4M7pUV4TKZjHnni/k3y7gfw5Y8QnaMyZmAI=; b=gk+WN8NePd5OqScDwx5CddSynjUqYJPMPmXd5kSnDQbFZ+Os7iSh91zsiWCj8lNNRD merCqeMvuLzUgm6MLriSRkv79u14uW69K05GMCgKfTINKmF4d74XSX7Ci5K4aUJDB+0/ eCbOZScT2vLnR8uClZqTBE20K+wtXX8+/LyJhB/tJXZKm9iMNwpyl2RSKXmlPWwrCZ9t x49ey7+5XuHFCDMmrkseDBHCTi7CvONLgQOookRMVknHjqaBBEIwOtEWgtGHTi1cSbyG LIBtKR4krtYvAGKoYx8IlcwyTKohPNjf+x+md153z1vM3eoOF9p4TrJPe4NYyeySGSRf tPEg== X-Gm-Message-State: AOJu0Yw5RSVwMbi2jt7weQj9szxbGyAkv4vPQhy3/PkoFtVpgTFJ+d6s Imk4cbqPJT0f4IzIOTxQc6rKlk66ZxCceqhPDjGgTNjY3/O8bY0sSMrSxhqRJ7Gnf2M= X-Gm-Gg: ASbGncsaXYx5rTGJLtNk/qx3Kp7n60/55htn4uHu3pKdH70ZRWDrQF9IBrPL5nQuQrU kYW2ZLgTZlVNXNIyOZDyt5im1l1jYynS3KdviEut0XWQKXN7PpI/my6dsz5EELhSQfCsCWIyEj9 LT/37OoogjvbqQaTV1/3KQSKfiafPCXAi1FTkRFpdLmEmEFQCm56uV9Asw182SG6BdxNEiB06Dl G0krLQf3OU9QG+1/90fkHfVLnJzZmm2ILapbR7u3ku1I0p4jYbSMMXmevUYHC3OvJ1zxx4ir04P cf24Rpm/OSauAAqrqOAKX7j0H7WjHQrIdTMFcK2jh3wJCgW5YtEJaVEDVjJJBdUXIJZQwXUP8uS O0MagmRY1u2TnQyI9EFW0T4utii0ZMPk= X-Google-Smtp-Source: AGHT+IGN+cgo4XlhoYRFNuK+84w1+noJNCVLJZxTCxe+T8UmaEJsfGzVSe/O7t9sBEWtkuxLD8SWPA== X-Received: by 2002:a17:907:3d55:b0:af9:613b:3055 with SMTP id a640c23a62f3a-af9c63b0941mr994855766b.2.1754895599094; Sun, 10 Aug 2025 23:59:59 -0700 (PDT) Received: from eugen-station.. ([82.79.215.22]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-af99604e648sm971793266b.6.2025.08.10.23.59.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Aug 2025 23:59:58 -0700 (PDT) From: Eugen Hristev To: rafael@kernel.org, daniel.lezcano@linaro.org, linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Eugen Hristev Subject: [PATCH 3/6] tools/thermal/lib: Fix header file installation Date: Mon, 11 Aug 2025 09:59:12 +0300 Message-ID: <20250811065915.3333142-4-eugen.hristev@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250811065915.3333142-1-eugen.hristev@linaro.org> References: <20250811065915.3333142-1-eugen.hristev@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The header file created by this lib is thermal-tools.h and not thermal.h Fix it accordingly. Fixes: 3b7c5e8adf9c ("tools/thermal: Add util library") Signed-off-by: Eugen Hristev --- tools/thermal/lib/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/thermal/lib/Makefile b/tools/thermal/lib/Makefile index 056d212f25cf..b8fded7f22b8 100644 --- a/tools/thermal/lib/Makefile +++ b/tools/thermal/lib/Makefile @@ -128,7 +128,7 @@ install_lib: libs =20 install_headers: $(call QUIET_INSTALL, headers) \ - $(call do_install,include/thermal.h,$(prefix)/include/thermal,644); \ + $(call do_install,thermal-tools.h,$(prefix)/include/thermal,644); \ =20 install_pkgconfig: $(LIBTHERMAL_TOOLS_PC) $(call QUIET_INSTALL, $(LIBTHERMAL_TOOLS_PC)) \ --=20 2.43.0 From nobody Sun Oct 5 01:49:23 2025 Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3EA1E13AD1C for ; Mon, 11 Aug 2025 07:00:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754895613; cv=none; b=oTtIL/b8NXEnwLsTC7+p/jkqpLDBtZue4GJ1mxfX4MEApvg0lzx63eOVvj6Pp8eOa1qy4kZKwyb/SnVvqgidzlGEjwH/c3Ptm5mdTRyoSwBUrq8R6YCFoObDiuIYxzWJyBoUrlQ9MdB5lhNsOzvsJUOr3tuSMZaslPJWPiwVExs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754895613; c=relaxed/simple; bh=DcAe9wT6QC5QyxeiRgMQA8wNpqFV14uYDM6dcM6/kxQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=l8U1+9CTtDhl5x0S5xg7QNgHIYtbR88q9466KP8XjwFJ9PC7ZybKelgslKnhgbHRhedWVMeamdclL9ajxfRlXuN0Em8hgsdv42E2PZwnwmHLjNuo13vGR7j7G9osYz0tXfHJ0AA21CE1wUYdQVDo0QBbKysmjGcRy0oA+BZXcps= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=wsEuCQ5b; arc=none smtp.client-ip=209.85.218.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="wsEuCQ5b" Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-af96d097df5so733398766b.3 for ; Mon, 11 Aug 2025 00:00:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1754895600; x=1755500400; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uJU4sqEwL+qXvcHvb/mnK0Ms4HACkHUUGa4uEQrj1+w=; b=wsEuCQ5btj+I44s1w7tK0zLMF4ecGe3SlRFC2endUZB/W8/uCeEqJyge8Do3QbZ/7r 5Ht0+EVx4h2Ol51FiWuLKtKvxRalgQKWHqBCHiDwkE9v4TEJ3dBLzZs3mUzIP0GUWmij 9Gy/TuYoODoXDo7FHr7fx13zpLyXexu4y//HpfH1ZN+WKv8f6Lz0F9yNBnSW6ICuBq0f 5nQCD7+W+psvHjo1+x6Bq/TEx8AVUbuh6HBFcC4vSn8abCXuCOPNlENjz1R/xT9V1KeG iCPZHIFd3VdKBR2HhEbfPdV6iKLmMiptBI8cOGN8Umm1Mp3643QCJBg9p5FkywUW9yAh QIhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754895600; x=1755500400; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uJU4sqEwL+qXvcHvb/mnK0Ms4HACkHUUGa4uEQrj1+w=; b=gi05JmBHh+fi3jTVK9gUg4+oAHt+/Wk2hpVCuRXeuJxknI3LB00tOz4nNtzkjMFE2H GakQt2u2nBq74V9F8pX0wpq2nhwJTY8g8eEZlgK7D002Uchb5ppQzEBSKLFmoS3CFdeH JqTBKDb59m9987a6/15LfzyKZHomz0T1qigW5MUT1vzby/MDVsrogAaG5QXwzpgDrCZK cStcJtxe1tX8tShAMOR2NC6Ep7mo473pgNnw1g/Hop+25aMJpTqVYBmnEzVhn9mBDFCB 8U7Aff0HBtkDhp6UJ87x90tFfy6N88/x/R2egw4bKYOtYXENQdGWIUBnFWONsug2mang Hq2g== X-Gm-Message-State: AOJu0Ywe3xSWyuwVAxINmGryGxMuwV1KAiOTAdPR+xZ9UmjOwiMWVd+5 1UMQIGzCan3WQHrVigETU4d6V2u9oNN777/NLfD9LTpv1FCI0toDfw16bu0991DCn34= X-Gm-Gg: ASbGnctedRrhAouXxUIeXnStJXc6Ls0rqpIuJzMF4EXzY1J5a4w3PQNzbZ4Oz+8ev0s PsFmzzEDk0KasQaHKNXZhUHpV6aTBNCSiumx4eDSH7xGlsmyLAau75kKqQw0cqTjD957lFf0onG IzQq3Imva7WLV1PWmqsu7+tIaJuHla+1KSoHLl/W8ioMvoAhXzpg6wG5s3lW2AAsqcsnFkEax7r ax2CeSHe8wkupUjkHRSCaFxVwv+YATa7smoqray9dGcKyVIzzv7Uv9tYyc2lAAknS+TfeHiBojL pBeycUzivBMYqqWm6P7mSA9ynnuhWEuU1BJIkc+rDBF38UgQhduZX4LZr025eTyZ7Kn/IoFC9OO cbMkIeJSpvZq8EwKxyuq6Q/AwnESGyhk= X-Google-Smtp-Source: AGHT+IGTU1SlnJAzBr7ngcTzox/8GCPXwlpgRLhzLsNN44/ljJtO9ZCxmOJsox/oA4D7YHsrf8RWJg== X-Received: by 2002:a17:906:c113:b0:aeb:fc49:3f56 with SMTP id a640c23a62f3a-af9c645da46mr1126322466b.15.1754895600428; Mon, 11 Aug 2025 00:00:00 -0700 (PDT) Received: from eugen-station.. ([82.79.215.22]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-af99604e648sm971793266b.6.2025.08.10.23.59.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Aug 2025 23:59:59 -0700 (PDT) From: Eugen Hristev To: rafael@kernel.org, daniel.lezcano@linaro.org, linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Eugen Hristev Subject: [PATCH 4/6] tools/thermal/lib: Fix dependency to host libnl Date: Mon, 11 Aug 2025 09:59:13 +0300 Message-ID: <20250811065915.3333142-5-eugen.hristev@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250811065915.3333142-1-eugen.hristev@linaro.org> References: <20250811065915.3333142-1-eugen.hristev@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The include path should be created according to host pkg-config especially when building with a different sysroot or cross compiling. Thus, call the pkg-config to obtain the correct path instead of accessing directly from root host file system, which is incorrect. Fixes: 3b7c5e8adf9c ("tools/thermal: Add util library") Signed-off-by: Eugen Hristev --- tools/thermal/lib/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/thermal/lib/Makefile b/tools/thermal/lib/Makefile index b8fded7f22b8..51a2a2ab7de8 100644 --- a/tools/thermal/lib/Makefile +++ b/tools/thermal/lib/Makefile @@ -47,7 +47,6 @@ else endif =20 INCLUDES =3D \ --I/usr/include/libnl3 \ -I$(srctree)/tools/lib/thermal/include \ -I$(srctree)/tools/lib/ \ -I$(srctree)/tools/include \ @@ -55,6 +54,12 @@ INCLUDES =3D \ -I$(srctree)/tools/arch/$(SRCARCH)/include/uapi \ -I$(srctree)/tools/include/uapi =20 +VAR_INCLUDES =3D $(shell pkg-config --cflags libnl-3.0 libnl-genl-3.0 2>/d= ev/null) +ifeq ($(VAR_INCLUDES),) +VAR_INCLUDES =3D -I/usr/include/libnl3 +endif +override CFLAGS +=3D $(VAR_INCLUDES) + # Append required CFLAGS override CFLAGS +=3D $(EXTRA_WARNINGS) override CFLAGS +=3D -Werror -Wall --=20 2.43.0 From nobody Sun Oct 5 01:49:23 2025 Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 207662D9797 for ; Mon, 11 Aug 2025 07:00:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754895613; cv=none; b=V4WTVOusTh0tX6zsdigSRYFWFaE04FipLz4VLnuXQ5z6Qpn3wLysXwYv8G9tSMIfFJ065e9lSrEf8HFXAIhDtoNnX5XNwet34GF9D2duowAW7NSmQ3VHqoylOHRwRujTs3vbYuEOjJqXuj6GFa2M4bE8Ek/0Sji0NX7CMOjLxC8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754895613; c=relaxed/simple; bh=c89j4EY7hDQL8ksYXICLyPLxPExiEVG6FrPm7HouZf4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TyXPotDyfg5MRwHLE7va1f5bmjU1XQ51KyZ2P6vrNK4nE/di0Ws/BTKFuC39q3ee6BZpz1kQs+RrGjxy4Iq09job5gtt7bWF88/FBP2jNIcIIVDNGBKNgt3eJPDzounsuRlb5PsbaZ02JnB8AdMtViA394AFgnp8/Pq5D3NijI4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=SpPWb/4X; arc=none smtp.client-ip=209.85.208.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="SpPWb/4X" Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-6182ea5a6c0so889493a12.0 for ; Mon, 11 Aug 2025 00:00:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1754895601; x=1755500401; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GxFM3KEowHZ9Np37d1Ahrypz2fgPPBHOq5fRBicy60E=; b=SpPWb/4XMpyc/tJm6w0I4KWDxAEXCvXX2MQsyD73mBRogeOdRlOMGdunrqZpeBtXYX qhYu428+HytLyl+7jUF6dmy2MkAj1/2AvIoCqlAqL0g96yepeWXT9hY082t5iGDpyX/m hrioWQGfj3V3/UJTPQ4XTOzhfwrAnZ7bgwBrmWLjtM5MBn81Bo1JSQyp81x+8hh/5aO2 KECIyQIBVUZVBe2vHc+dUH8rFXTfMjaPxVrNM7xCRsDocJImxMQXtHeEVcn1swZkaWgF u2z2ZGijGRhuzMqOgIxslwH5F2hqUN0vkY0l1HcRaM8PopobyhNSHMX7iOJeTbTKLRnB Qs4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754895601; x=1755500401; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GxFM3KEowHZ9Np37d1Ahrypz2fgPPBHOq5fRBicy60E=; b=TBC4i47ljY0dQq6wvF748MyicbFCQLz9vIXPWtA0b2s3x256LZj92VOHwvOGwrl8QC CuFafh9zJXmTz1JaaPiVEBU2qd8OAFLgGUqg/sLhSuVZ32mWpX3LWb7XVhIWlWZ/gqWY Hr30ZnlATcPIjLAK4x2wM2vq2kD2d6BqSRgUJ9UJMgGCTjprRDwRpRzseQMOLOd5HjA7 7dSO4qN0fPTx9ozPdoOCggNSVTtyhu8h8mexk4DQiTWjbMd+HUrKz3fzrtvNyMqoDwfx HjjTcq9wgYAi497Biq5RkBcpdb9MwH2E2FxdMKIczsuFYRprX+2gCpwNovPDYu9V0Ppv cuuA== X-Gm-Message-State: AOJu0YxziRC4JHPnC9yBzEuY0FoVrG5aGx/va4A/UNMQRnFrHxhJ2dxG avn5g+j+M5BEPJKue1x4IuDDioVqwHxsN5Es/9dduIrLQ5VD1XJRyh902uC3iodxyFE= X-Gm-Gg: ASbGncuUL3Et9G3djDJdPh9xoIdjgo7KyZx5LFIZcL/AqksVlCvbHjyHYoBTKqv7eGM xhqK/GavOpiw39jwuosqWOJjxmu6v4HMVF0EV7266enmt4vO2ZBY9c8QpImqafR2HajUT1uHF45 l4gINkpxUzYQPr8H3jTxF5eOFZAGdPWtKRe9wAgHyFFQqbgtWhAUY0Bbio1QT4K03tFFhJ/Slwy z2MR0lR4JRgVW8uYWEhDXaxBntyMHb3qix+gxNsOKIZCHt8axde+xi3UGdE8CiFY8k7ZX92Av/k OTAtwbhxhwpwQ9Ooh15nzdjFlmUxNGhlhUP1k+CXXiA5D/O2/1u700Tkki5gr9zfuS6cttVBt0U zgJYBoxw7lMuP34SfuQikdkHg2AcShEY= X-Google-Smtp-Source: AGHT+IFStzTtotqZ1x8RtkFHasRBLezl/MmS+Mh21B3OJrF9cx9oMuSnWhZUtyCl9adlZ9MKETng5g== X-Received: by 2002:a17:907:1ca9:b0:ade:405:9e38 with SMTP id a640c23a62f3a-af9c63d47a6mr1133777666b.24.1754895601414; Mon, 11 Aug 2025 00:00:01 -0700 (PDT) Received: from eugen-station.. ([82.79.215.22]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-af99604e648sm971793266b.6.2025.08.11.00.00.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Aug 2025 00:00:00 -0700 (PDT) From: Eugen Hristev To: rafael@kernel.org, daniel.lezcano@linaro.org, linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Eugen Hristev Subject: [PATCH 5/6] tools/thermal: Fix thermometer/thermal-engine thermal tools dependency Date: Mon, 11 Aug 2025 09:59:14 +0300 Message-ID: <20250811065915.3333142-6-eugen.hristev@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250811065915.3333142-1-eugen.hristev@linaro.org> References: <20250811065915.3333142-1-eugen.hristev@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Thermometer and thermal engine depend on thermal tools library. This lib should be built and installed accordingly. Fixes: 110acbc6a451 ("tools/thermal: Add a temperature capture tool") Fixes: 077df623c834 ("tools/thermal: Add thermal daemon skeleton") Signed-off-by: Eugen Hristev --- tools/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/Makefile b/tools/Makefile index a4f5577210f1..9cc71b302b19 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -108,9 +108,11 @@ tmon: FORCE $(call descend,thermal/$@) =20 thermometer: FORCE + $(call descend,thermal/lib) $(call descend,thermal/$@) =20 thermal-engine: FORCE thermal + $(call descend,thermal/lib) $(call descend,thermal/$@) =20 freefall: FORCE @@ -150,9 +152,11 @@ tmon_install: $(call descend,thermal/$(@:_install=3D),install) =20 thermometer_install: + $(call descend,thermal/lib/,install) $(call descend,thermal/$(@:_install=3D),install) =20 thermal-engine_install: thermal_install + $(call descend,thermal/lib/,install) $(call descend,thermal/$(@:_install=3D),install) =20 freefall_install: @@ -207,9 +211,11 @@ turbostat_clean x86_energy_perf_policy_clean intel-spe= ed-select_clean: $(call descend,power/x86/$(@:_clean=3D),clean) =20 thermometer_clean: + $(call descend,thermal/lib,clean) $(call descend,thermal/thermometer,clean) =20 thermal-engine_clean: thermal_clean + $(call descend,thermal/lib,clean) $(call descend,thermal/thermal-engine,clean) =20 tmon_clean: --=20 2.43.0 From nobody Sun Oct 5 01:49:23 2025 Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3A4202D8DC5 for ; Mon, 11 Aug 2025 07:00:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754895614; cv=none; b=hJtT2msn6Ucpvw/mQaHEzPrgHAxwDqEDngvcRmnaIJ7x3bXmJBMuBPVKhdTttVuU7jsRcNmlUTRbliXD2+99jIDYTsRU6qeKaK5KoYKhvvSqyGKTp5OxGFFXMsxJsD0P5+gecV2xdDkcAq7FKz9YPBe1hiBcKncUY1avElCRzV0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754895614; c=relaxed/simple; bh=5OKV3YFVx9AV+VrVYyDRsVXxPu+Il1+rJhjHmNszp7s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AEos/eOWYTGIi0CCl+HdHEUl+WMIIGux61nTL7RWM6jBFLGfy1gs/wzCq1eoVHUukgxd4cxyJXzEaV2/KPZC2Ea4M4WqKnriuJiVUbVDc0I1TPWZgorzW8YOORyUvyHr7wlWrLUOzftanx/k+070ag6xSo+WycqSxzK1DDfqfT8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=QwKMp+JE; arc=none smtp.client-ip=209.85.218.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="QwKMp+JE" Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-af98841b4abso665658666b.0 for ; Mon, 11 Aug 2025 00:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1754895602; x=1755500402; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=q6cSDcWJHXC805rmzke8t+NltGzFkInjNHEHN1KN3O4=; b=QwKMp+JEC/rzLrqw7jqG2U0M2vWR/9rlbJ4JPpfMO0OHcbhB0YtqpPuPJjcTDSpuIQ v0SD3llARKuP6NCkF4yRV+qQbkMUYgdw/9AAEPBC2DMKqdD6Pms9Eq132AVL9MvUIYCO XYRv1E8HtD75Q5qz3w1UKk0qCh1VPaENSHfz2KrpaGaSnAxtnpZQEk/HHsw7pStvJLat /WcLTWvilb1VOrGNrXUsYFzrot1e3Dx5khXoQnD6H/Nq6uRExczhVJFcnj8y9WpKiMPf uyIxhDC9wfLhDjlcbV5KDhmQd2Qi3vaGIgeusqf/m1GYzc+Ve+Cjy/Ao1rQAvRMohJcO xlsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754895602; x=1755500402; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=q6cSDcWJHXC805rmzke8t+NltGzFkInjNHEHN1KN3O4=; b=ezetnbaLAIOhTlvOwGTF+v9w4gR7wR3t6ildkrD/hgjoOLnpoyqfTSwzgLVWxXSYZX ScriXJ5xLG/sA44C5q/f2WpDbVJ5zBooi7qtROAH4tfc1l5jFH0CuTpXCJlaiDKPrYoG Ju9b5BVr86vAzpXZ0sZCuSGpx/gXaHS2DFy01Th/5LcsnunfZnZskC+eQ+PrpHvu8q4T kxfjBDWHldKJe1Yen3JxHpWbOKyNyAEpciz71Yd/WHAOi3WwvIv/0A0FGJPJk2uzdHAC 09G06HcLxCKBW3ER/0U1E7IPD6E4iucFQVCuL1iTYgctmv0r/QkwseJEoL4K0bOvqr+Y K+qw== X-Gm-Message-State: AOJu0Yy1Ff4o0b69ERgRG8YQ489EheJGeKlE+J2HS+DkzeXc1dWrksJW AeLV+rZMAL6BnFJRY/+jpwxhtEFhS6lU2ND4RYc/sndGQIxlnt5oYqQERTh063WHwx8= X-Gm-Gg: ASbGncuuniPKUqj0EcH8jF270wksze0dbszNVnZkHBr9o8Xh/gnhB6qPq1PLc3BJKPn z0M9W40yr1EmSc0W3bKvHkvNvgUIf41JNKYudmsu1/SoPwAVD1rNg0gEj1/Tbv3RiZ1Wse81im+ JfiGniNaZva9Ra2r+gzW2E8PQVUvvOXlbuJa7RLV/AERcqv9MUi8btewiCQRrhsl0Oj0Y5rV12K c1/QEu8T2ZffzwynBbxkzuOB3VPF+19VbUbCLqPXrJUE/vadnz1vdUfgT48zo9Dc2HvNNZvcSYn sGHY2HX4/ilHYfBBeSQiJl1XfElETmohnh7tiKAMXxaUiyY0zafvy4ycUU68zLsb5K1V4E7uJ2u N20q+t3+A54LWlcijS2oNj09RD4GABPuBEPEx+bcalA== X-Google-Smtp-Source: AGHT+IFRZfmnNAudk0i8fMFKOOnhnp75F3E/Nb1oPrto+I24ExyKtbRZtnEWr0MjZ5tCu9kYF/fTWw== X-Received: by 2002:a17:907:d23:b0:ae3:635c:53c1 with SMTP id a640c23a62f3a-af9c6518c68mr1144071966b.54.1754895602457; Mon, 11 Aug 2025 00:00:02 -0700 (PDT) Received: from eugen-station.. ([82.79.215.22]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-af99604e648sm971793266b.6.2025.08.11.00.00.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Aug 2025 00:00:01 -0700 (PDT) From: Eugen Hristev To: rafael@kernel.org, daniel.lezcano@linaro.org, linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Eugen Hristev Subject: [PATCH 6/6] tools/thermal/thermal-engine: Add cross compile support Date: Mon, 11 Aug 2025 09:59:15 +0300 Message-ID: <20250811065915.3333142-7-eugen.hristev@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250811065915.3333142-1-eugen.hristev@linaro.org> References: <20250811065915.3333142-1-eugen.hristev@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Adapt the Makefile for cross compilation. Took tmon as reference, and adapted the Makefile for thermal-engine. Signed-off-by: Eugen Hristev --- tools/thermal/thermal-engine/Makefile | 60 ++++++++++++++++++++------- 1 file changed, 45 insertions(+), 15 deletions(-) diff --git a/tools/thermal/thermal-engine/Makefile b/tools/thermal/thermal-= engine/Makefile index 6bd05ff89485..539c643804fb 100644 --- a/tools/thermal/thermal-engine/Makefile +++ b/tools/thermal/thermal-engine/Makefile @@ -1,5 +1,8 @@ # SPDX-License-Identifier: GPL-2.0 -# Makefile for thermal tools +# Makefile for thermal engine +include ../../build/Build.include + +VERSION =3D 0.0.1 =20 ifeq ($(srctree),) srctree :=3D $(patsubst %/,%,$(dir $(CURDIR))) @@ -8,21 +11,48 @@ srctree :=3D $(patsubst %/,%,$(dir $(srctree))) # $(info Determined 'srctree' to be $(srctree)) endif =20 -CFLAGS =3D -Wall -Wextra -CFLAGS +=3D -I$(srctree)/tools/thermal/lib -CFLAGS +=3D -I$(srctree)/tools/lib/thermal/include +BINDIR=3Dusr/bin +WARNFLAGS=3D-Wall -Wshadow -W -Wformat -Wimplicit-function-declaration -Wi= mplicit-int +override CFLAGS+=3D $(call cc-option,-O3,-O1) ${WARNFLAGS} +# Add "-fstack-protector" only if toolchain supports it. +override CFLAGS+=3D $(call cc-option,-fstack-protector-strong) +CC?=3D $(CROSS_COMPILE)gcc +PKG_CONFIG?=3D $(CROSS_COMPILE)pkg-config =20 -LDFLAGS =3D -L$(srctree)/tools/thermal/lib -LDFLAGS +=3D -L$(srctree)/tools/lib/thermal -LDFLAGS +=3D -lthermal_tools -LDFLAGS +=3D -lthermal -LDFLAGS +=3D -lconfig -LDFLAGS +=3D -lnl-genl-3 -lnl-3 +override CFLAGS+=3D-D VERSION=3D\"$(VERSION)\" +TARGET=3Dthermal-engine =20 -VERSION =3D 0.0.1 +override CFLAGS +=3D -I$(srctree)/tools/thermal/lib +override CFLAGS +=3D -I$(srctree)/tools/lib/thermal/include + +override LDFLAGS +=3D -L$(srctree)/tools/thermal/lib +override LDFLAGS +=3D -L$(srctree)/tools/lib/thermal + +INSTALL_PROGRAM=3Dinstall -m 755 -p +DEL_FILE=3Drm -f + +# Static builds might require -ltinfo, for instance +ifneq ($(findstring -static, $(LDFLAGS)),) +STATIC :=3D --static +endif + +THERMAL_ENGINE_LIBS=3D-lconfig -lnl-genl-3 -lnl-3 -lthermal -lthermal_tools + +OBJS =3D thermal-engine.o + +thermal-engine: $(OBJS) Makefile + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $(TARGET) $(THERMAL_ENGINE_LIBS) + +install: + - $(INSTALL_PROGRAM) -D "$(TARGET)" "$(INSTALL_ROOT)/$(BINDIR)/$(TARGET)" + +uninstall: + $(DEL_FILE) "$(INSTALL_ROOT)/$(BINDIR)/$(TARGET)" =20 -all: thermal-engine -%: %.c - $(CC) $(CFLAGS) -D VERSION=3D\"$(VERSION)\" -o $@ $^ $(LDFLAGS) clean: - $(RM) thermal-engine + rm -f $(TARGET) $(OBJS) + +dist: + git tag v$(VERSION) + git archive --format=3Dtar --prefix=3D"$(TARGET)-$(VERSION)/" v$(VERSION)= | \ + gzip > $(TARGET)-$(VERSION).tar.gz --=20 2.43.0