All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][RESEND] tools/thermal/tmon: simplify Makefile and fix cross build
@ 2021-07-30 11:47 Rolf Eike Beer
  2021-07-30 11:49 ` [PATCH 1/2] tools/thermal: tmon: simplify Makefile Rolf Eike Beer
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Rolf Eike Beer @ 2021-07-30 11:47 UTC (permalink / raw)
  To: linux-acpi
  Cc: Zhang Rui, Markus Mayer, linux-kbuild, linux-kernel, Jiri Olsa,
	Arnaldo Carvalho de Melo, Jiri Kosina

[-- Attachment #1: Type: text/plain, Size: 759 bytes --]

Hi,

cross-building tmon can fail because it uses the non-prefixed, i.e. host, pkg-
config.

If you prefer a merge the code is also available at:

   https://github.com/emlix/linux thermal-makefile

Would be nice if someone could finally pick this up, it's almost 3 years now…

If someone knows anyone who better fits into these reviews please add CC's, 
sadly tools/thermal/ is not covered in MAINTAINERS.

Eike
-- 
Rolf Eike Beer, emlix GmbH, http://www.emlix.com
Fon +49 551 30664-0, Fax +49 551 30664-11
Gothaer Platz 3, 37083 Göttingen, Germany
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
Geschäftsführung: Heike Jordan, Dr. Uwe Kracke – Ust-IdNr.: DE 205 198 055

emlix - smart embedded open source

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 313 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/2] tools/thermal: tmon: simplify Makefile
  2021-07-30 11:47 [PATCH][RESEND] tools/thermal/tmon: simplify Makefile and fix cross build Rolf Eike Beer
@ 2021-07-30 11:49 ` Rolf Eike Beer
  2021-09-09 14:38   ` [thermal: thermal/next] thermal/tools/tmon: Improve the Makefile thermal-bot for Rolf Eike Beer
  2021-07-30 11:51 ` [PATCH 2/2] tools/thermal: tmon: default to prefixed pkg-config when crosscompiling Rolf Eike Beer
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Rolf Eike Beer @ 2021-07-30 11:49 UTC (permalink / raw)
  To: linux-acpi
  Cc: Zhang Rui, Markus Mayer, linux-kbuild, linux-kernel, Jiri Olsa,
	Arnaldo Carvalho de Melo, Jiri Kosina

Signed-off-by: Rolf Eike Beer <eb@emlix.com>
---
 tools/thermal/tmon/Makefile | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/tools/thermal/tmon/Makefile b/tools/thermal/tmon/Makefile
index 9db867df76794..3e650878ea824 100644
--- a/tools/thermal/tmon/Makefile
+++ b/tools/thermal/tmon/Makefile
@@ -13,7 +13,6 @@ CC?= $(CROSS_COMPILE)gcc
 PKG_CONFIG?= pkg-config
 
 override CFLAGS+=-D VERSION=\"$(VERSION)\"
-LDFLAGS+=
 TARGET=tmon
 
 INSTALL_PROGRAM=install -m 755 -p
@@ -33,7 +32,6 @@ override CFLAGS += $(shell $(PKG_CONFIG) --cflags $(STATIC) panelw ncursesw 2> /
 		     $(PKG_CONFIG) --cflags $(STATIC) panel ncurses 2> /dev/null)
 
 OBJS = tmon.o tui.o sysfs.o pid.o
-OBJS +=
 
 tmon: $(OBJS) Makefile tmon.h
 	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS)  -o $(TARGET) $(TMON_LIBS)
@@ -42,15 +40,13 @@ valgrind: tmon
 	 sudo valgrind -v --track-origins=yes --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes ./$(TARGET)  1> /dev/null
 
 install:
-	- mkdir -p $(INSTALL_ROOT)/$(BINDIR)
-	- $(INSTALL_PROGRAM) "$(TARGET)" "$(INSTALL_ROOT)/$(BINDIR)/$(TARGET)"
+	- $(INSTALL_PROGRAM) -D "$(TARGET)" "$(INSTALL_ROOT)/$(BINDIR)/$(TARGET)"
 
 uninstall:
 	$(DEL_FILE) "$(INSTALL_ROOT)/$(BINDIR)/$(TARGET)"
 
 clean:
-	find . -name "*.o" | xargs $(DEL_FILE)
-	rm -f $(TARGET)
+	rm -f $(TARGET) $(OBJS)
 
 dist:
 	git tag v$(VERSION)
-- 
2.32.0

-- 
Rolf Eike Beer, emlix GmbH, http://www.emlix.com
Fon +49 551 30664-0, Fax +49 551 30664-11
Gothaer Platz 3, 37083 Göttingen, Germany
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
Geschäftsführung: Heike Jordan, Dr. Uwe Kracke – Ust-IdNr.: DE 205 198 055

emlix - smart embedded open source




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] tools/thermal: tmon: default to prefixed pkg-config when  crosscompiling
  2021-07-30 11:47 [PATCH][RESEND] tools/thermal/tmon: simplify Makefile and fix cross build Rolf Eike Beer
  2021-07-30 11:49 ` [PATCH 1/2] tools/thermal: tmon: simplify Makefile Rolf Eike Beer
@ 2021-07-30 11:51 ` Rolf Eike Beer
  2021-09-09 14:38   ` [thermal: thermal/next] tools/thermal/tmon: Add cross compiling support thermal-bot for Rolf Eike Beer
  2021-08-14 11:18 ` [PATCH] MAINTAINERS: Add missing userspace thermal tools to the thermal section Daniel Lezcano
  2021-08-19  9:40 ` [PATCH][RESEND] tools/thermal/tmon: simplify Makefile and fix cross build Jiri Kosina
  3 siblings, 1 reply; 8+ messages in thread
From: Rolf Eike Beer @ 2021-07-30 11:51 UTC (permalink / raw)
  To: linux-acpi
  Cc: Zhang Rui, Markus Mayer, linux-kbuild, linux-kernel, Jiri Olsa,
	Arnaldo Carvalho de Melo, Jiri Kosina

This matches what other parts of the tools/ directory already do.

Signed-off-by: Rolf Eike Beer <eb@emlix.com>
Cc: stable@vger.kernel.org
---
 tools/thermal/tmon/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/thermal/tmon/Makefile b/tools/thermal/tmon/Makefile
index 3e650878ea824..f9c52b7fab7bc 100644
--- a/tools/thermal/tmon/Makefile
+++ b/tools/thermal/tmon/Makefile
@@ -10,7 +10,7 @@ override CFLAGS+= $(call cc-option,-O3,-O1) ${WARNFLAGS}
 # Add "-fstack-protector" only if toolchain supports it.
 override CFLAGS+= $(call cc-option,-fstack-protector-strong)
 CC?= $(CROSS_COMPILE)gcc
-PKG_CONFIG?= pkg-config
+PKG_CONFIG?= $(CROSS_COMPILE)pkg-config
 
 override CFLAGS+=-D VERSION=\"$(VERSION)\"
 TARGET=tmon
-- 
2.32.0

-- 
Rolf Eike Beer, emlix GmbH, http://www.emlix.com
Fon +49 551 30664-0, Fax +49 551 30664-11
Gothaer Platz 3, 37083 Göttingen, Germany
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
Geschäftsführung: Heike Jordan, Dr. Uwe Kracke – Ust-IdNr.: DE 205 198 055

emlix - smart embedded open source




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] MAINTAINERS: Add missing userspace thermal tools to the thermal section
  2021-07-30 11:47 [PATCH][RESEND] tools/thermal/tmon: simplify Makefile and fix cross build Rolf Eike Beer
  2021-07-30 11:49 ` [PATCH 1/2] tools/thermal: tmon: simplify Makefile Rolf Eike Beer
  2021-07-30 11:51 ` [PATCH 2/2] tools/thermal: tmon: default to prefixed pkg-config when crosscompiling Rolf Eike Beer
@ 2021-08-14 11:18 ` Daniel Lezcano
  2021-08-19  9:40 ` [PATCH][RESEND] tools/thermal/tmon: simplify Makefile and fix cross build Jiri Kosina
  3 siblings, 0 replies; 8+ messages in thread
From: Daniel Lezcano @ 2021-08-14 11:18 UTC (permalink / raw)
  To: rui.zhang, daniel.lezcano; +Cc: linux-kernel, eb, mmayer, jolsa, acme, jkosina

Patches related to the tmon which is in tools/thermal are floating around
since years because it is unclear who takes care of it.

Add the missing userspace tools directory related to thermal to fix the
situation.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index a61f4f3b78a9..a78f490fd128 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -18358,6 +18358,7 @@ F:	drivers/thermal/
 F:	include/linux/cpu_cooling.h
 F:	include/linux/thermal.h
 F:	include/uapi/linux/thermal.h
+F:	tools/thermal/
 
 THERMAL DRIVER FOR AMLOGIC SOCS
 M:	Guillaume La Roque <glaroque@baylibre.com>
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH][RESEND] tools/thermal/tmon: simplify Makefile and fix cross build
  2021-07-30 11:47 [PATCH][RESEND] tools/thermal/tmon: simplify Makefile and fix cross build Rolf Eike Beer
                   ` (2 preceding siblings ...)
  2021-08-14 11:18 ` [PATCH] MAINTAINERS: Add missing userspace thermal tools to the thermal section Daniel Lezcano
@ 2021-08-19  9:40 ` Jiri Kosina
  2021-08-19 10:02   ` Daniel Lezcano
  3 siblings, 1 reply; 8+ messages in thread
From: Jiri Kosina @ 2021-08-19  9:40 UTC (permalink / raw)
  To: Rolf Eike Beer
  Cc: linux-acpi, Zhang Rui, Markus Mayer, linux-kbuild, linux-kernel,
	Jiri Olsa, Arnaldo Carvalho de Melo, Daniel Lezcano

On Fri, 30 Jul 2021, Rolf Eike Beer wrote:

> Hi,
> 
> cross-building tmon can fail because it uses the non-prefixed, i.e. host, pkg-
> config.
> 
> If you prefer a merge the code is also available at:
> 
>    https://github.com/emlix/linux thermal-makefile
> 
> Would be nice if someone could finally pick this up, it's almost 3 years now…
> 
> If someone knows anyone who better fits into these reviews please add CC's, 
> sadly tools/thermal/ is not covered in MAINTAINERS.

That would be Daniel Lezcano. CCing.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH][RESEND] tools/thermal/tmon: simplify Makefile and fix cross build
  2021-08-19  9:40 ` [PATCH][RESEND] tools/thermal/tmon: simplify Makefile and fix cross build Jiri Kosina
@ 2021-08-19 10:02   ` Daniel Lezcano
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Lezcano @ 2021-08-19 10:02 UTC (permalink / raw)
  To: Jiri Kosina, Rolf Eike Beer
  Cc: linux-acpi, Zhang Rui, Markus Mayer, linux-kbuild, linux-kernel,
	Jiri Olsa, Arnaldo Carvalho de Melo


Hi Jiri,

On 19/08/2021 11:40, Jiri Kosina wrote:
> On Fri, 30 Jul 2021, Rolf Eike Beer wrote:
> 
>> Hi,
>>
>> cross-building tmon can fail because it uses the non-prefixed, i.e. host, pkg-
>> config.
>>
>> If you prefer a merge the code is also available at:
>>
>>    https://github.com/emlix/linux thermal-makefile
>>
>> Would be nice if someone could finally pick this up, it's almost 3 years now…
>>
>> If someone knows anyone who better fits into these reviews please add CC's, 
>> sadly tools/thermal/ is not covered in MAINTAINERS.
> 
> That would be Daniel Lezcano. CCing.

I sent a patch for that

https://lkml.org/lkml/2021/8/14/152

and applied the series


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [thermal: thermal/next] tools/thermal/tmon: Add cross compiling support
  2021-07-30 11:51 ` [PATCH 2/2] tools/thermal: tmon: default to prefixed pkg-config when crosscompiling Rolf Eike Beer
@ 2021-09-09 14:38   ` thermal-bot for Rolf Eike Beer
  0 siblings, 0 replies; 8+ messages in thread
From: thermal-bot for Rolf Eike Beer @ 2021-09-09 14:38 UTC (permalink / raw)
  To: linux-pm; +Cc: Rolf Eike Beer, stable, Daniel Lezcano, rui.zhang, amitk

The following commit has been merged into the thermal/next branch of thermal:

Commit-ID:     b5f7912bb604b47a0fe024560488a7556dce8ee7
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//b5f7912bb604b47a0fe024560488a7556dce8ee7
Author:        Rolf Eike Beer <eb@emlix.com>
AuthorDate:    Fri, 30 Jul 2021 13:51:54 +02:00
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Sat, 14 Aug 2021 15:33:19 +02:00

tools/thermal/tmon: Add cross compiling support

Default to prefixed pkg-config when crosscompiling, this matches what
other parts of the tools/ directory already do.

[dlezcano] : Reworked description

Signed-off-by: Rolf Eike Beer <eb@emlix.com>
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/31302992.qZodDJZGDc@devpool47
---
 tools/thermal/tmon/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/thermal/tmon/Makefile b/tools/thermal/tmon/Makefile
index 3e65087..f9c52b7 100644
--- a/tools/thermal/tmon/Makefile
+++ b/tools/thermal/tmon/Makefile
@@ -10,7 +10,7 @@ override CFLAGS+= $(call cc-option,-O3,-O1) ${WARNFLAGS}
 # Add "-fstack-protector" only if toolchain supports it.
 override CFLAGS+= $(call cc-option,-fstack-protector-strong)
 CC?= $(CROSS_COMPILE)gcc
-PKG_CONFIG?= pkg-config
+PKG_CONFIG?= $(CROSS_COMPILE)pkg-config
 
 override CFLAGS+=-D VERSION=\"$(VERSION)\"
 TARGET=tmon

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [thermal: thermal/next] thermal/tools/tmon: Improve the Makefile
  2021-07-30 11:49 ` [PATCH 1/2] tools/thermal: tmon: simplify Makefile Rolf Eike Beer
@ 2021-09-09 14:38   ` thermal-bot for Rolf Eike Beer
  0 siblings, 0 replies; 8+ messages in thread
From: thermal-bot for Rolf Eike Beer @ 2021-09-09 14:38 UTC (permalink / raw)
  To: linux-pm; +Cc: Rolf Eike Beer, Daniel Lezcano, rui.zhang, amitk

The following commit has been merged into the thermal/next branch of thermal:

Commit-ID:     99d88c30055376b56316d3c431c9873e88208348
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//99d88c30055376b56316d3c431c9873e88208348
Author:        Rolf Eike Beer <eb@emlix.com>
AuthorDate:    Fri, 30 Jul 2021 13:49:04 +02:00
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Sat, 14 Aug 2021 15:30:11 +02:00

thermal/tools/tmon: Improve the Makefile

 - Remove empty macros assignments
 - Use directory creation parameter for the install tool
 - Use $OBJ instead of building the list of object for the 'clean' target

[dlezcano] : Changed title and description

Signed-off-by: Rolf Eike Beer <eb@emlix.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/1951386.ZPQrlMDjM2@devpool47
---
 tools/thermal/tmon/Makefile | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/tools/thermal/tmon/Makefile b/tools/thermal/tmon/Makefile
index 9db867d..3e65087 100644
--- a/tools/thermal/tmon/Makefile
+++ b/tools/thermal/tmon/Makefile
@@ -13,7 +13,6 @@ CC?= $(CROSS_COMPILE)gcc
 PKG_CONFIG?= pkg-config
 
 override CFLAGS+=-D VERSION=\"$(VERSION)\"
-LDFLAGS+=
 TARGET=tmon
 
 INSTALL_PROGRAM=install -m 755 -p
@@ -33,7 +32,6 @@ override CFLAGS += $(shell $(PKG_CONFIG) --cflags $(STATIC) panelw ncursesw 2> /
 		     $(PKG_CONFIG) --cflags $(STATIC) panel ncurses 2> /dev/null)
 
 OBJS = tmon.o tui.o sysfs.o pid.o
-OBJS +=
 
 tmon: $(OBJS) Makefile tmon.h
 	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS)  -o $(TARGET) $(TMON_LIBS)
@@ -42,15 +40,13 @@ valgrind: tmon
 	 sudo valgrind -v --track-origins=yes --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes ./$(TARGET)  1> /dev/null
 
 install:
-	- mkdir -p $(INSTALL_ROOT)/$(BINDIR)
-	- $(INSTALL_PROGRAM) "$(TARGET)" "$(INSTALL_ROOT)/$(BINDIR)/$(TARGET)"
+	- $(INSTALL_PROGRAM) -D "$(TARGET)" "$(INSTALL_ROOT)/$(BINDIR)/$(TARGET)"
 
 uninstall:
 	$(DEL_FILE) "$(INSTALL_ROOT)/$(BINDIR)/$(TARGET)"
 
 clean:
-	find . -name "*.o" | xargs $(DEL_FILE)
-	rm -f $(TARGET)
+	rm -f $(TARGET) $(OBJS)
 
 dist:
 	git tag v$(VERSION)

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-09-09 14:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-30 11:47 [PATCH][RESEND] tools/thermal/tmon: simplify Makefile and fix cross build Rolf Eike Beer
2021-07-30 11:49 ` [PATCH 1/2] tools/thermal: tmon: simplify Makefile Rolf Eike Beer
2021-09-09 14:38   ` [thermal: thermal/next] thermal/tools/tmon: Improve the Makefile thermal-bot for Rolf Eike Beer
2021-07-30 11:51 ` [PATCH 2/2] tools/thermal: tmon: default to prefixed pkg-config when crosscompiling Rolf Eike Beer
2021-09-09 14:38   ` [thermal: thermal/next] tools/thermal/tmon: Add cross compiling support thermal-bot for Rolf Eike Beer
2021-08-14 11:18 ` [PATCH] MAINTAINERS: Add missing userspace thermal tools to the thermal section Daniel Lezcano
2021-08-19  9:40 ` [PATCH][RESEND] tools/thermal/tmon: simplify Makefile and fix cross build Jiri Kosina
2021-08-19 10:02   ` Daniel Lezcano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.