tools/thermal/tmon: simplify Makefile and fix cross build
Subsystems (4)
PATCH RESEND 1/1 tools/thermal/tmon: simplify Makefile and fix cross build
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
Signature · 7 lines
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
PATCH 1/2 tools/thermal: tmon: simplify Makefile
--- tools/thermal/tmon/Makefile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
tools/thermal/tmon/Makefile +2 -6
@@ -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)
Signature · 10 lines
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
[thermal: thermal/next] thermal/tools/tmon: Improve the Makefile
The following commit has been merged into the thermal/next branch of thermal:
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 <[email protected]> AuthorDate: Fri, 30 Jul 2021 13:49:04 +02:00 Committer: Daniel Lezcano <[email protected]> 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
--- tools/thermal/tmon/Makefile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
tools/thermal/tmon/Makefile +2 -6
@@ -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)
PATCH 2/2 tools/thermal: tmon: default to prefixed pkg-config when crosscompiling
In reply to Rolf Eike BeerThis matches what other parts of the tools/ directory already do.
--- tools/thermal/tmon/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/thermal/tmon/Makefile +1 -1
@@ -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
Signature · 10 lines
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
[thermal: thermal/next] tools/thermal/tmon: Add cross compiling support
The following commit has been merged into the thermal/next branch of thermal:
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 <[email protected]> AuthorDate: Fri, 30 Jul 2021 13:51:54 +02:00 Committer: Daniel Lezcano <[email protected]> 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
--- tools/thermal/tmon/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/thermal/tmon/Makefile +1 -1
@@ -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
PATCH 1/1 MAINTAINERS: Add missing userspace thermal tools to the thermal section
In reply to Rolf Eike BeerPatches 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.
--- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
@@ -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 <[email protected]>
Signature · 1 line
2.25.1
Quoted 5 lines · Rolf Eike Beer
Hi,
cross-building tmon can fail because it uses the non-prefixed, i.e. host, pkg- config.
Quoted 8 lines
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 inMAINTAINERS.
That would be Daniel Lezcano. CCing.
Signature · 2 lines
Jiri Kosina SUSE Labs
Hi Jiri,
Quoted 9 lines · Jiri Kosina
Quoted 7 lines · Rolf Eike Beer
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:
Quoted 8 lines
Quoted 6 lines
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 inMAINTAINERS.That would be Daniel Lezcano. CCing.
I sent a patch for that
https://lkml.org/lkml/2021/8/14/152
and applied the series
Signature · 5 lines
<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