Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
From 95382246ddd889839633aa0da800a03936b93986 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Sun, 31 Oct 2021 18:26:01 +0100
|
||||
Subject: [PATCH] add --disable-stack-protector option
|
||||
|
||||
Allow the user to disable stack-protector as not all toolchains support
|
||||
this feature
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Upstream: https://github.com/fenrus75/powertop/pull/138
|
||||
---
|
||||
configure.ac | 4 ++++
|
||||
src/Makefile.am | 5 ++++-
|
||||
2 files changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 37c1304..69160d5 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -43,6 +43,10 @@ AX_ADD_FORTIFY_SOURCE
|
||||
AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory])
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
+AC_ARG_ENABLE([stack-protector],
|
||||
+ AS_HELP_STRING([--disable-stack-protector], [Disable stack-protector]))
|
||||
+AM_CONDITIONAL([ENABLE_STACK_PROTECTOR], [test x$enable_stack_protector != xno])
|
||||
+
|
||||
# Checks for libraries.
|
||||
AX_PTHREAD([
|
||||
LIBS="$PTHREAD_LIBS $LIBS"
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index 6b523f6..ca30d20 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -138,13 +138,16 @@ powertop_CXXFLAGS = \
|
||||
-Wformat \
|
||||
-Wshadow \
|
||||
-fno-omit-frame-pointer \
|
||||
- -fstack-protector \
|
||||
$(GLIB2_CFLAGS) \
|
||||
$(LIBNL_CFLAGS) \
|
||||
$(NCURSES_CFLAGS) \
|
||||
$(PCIUTILS_CFLAGS) \
|
||||
$(PTHREAD_CFLAGS)
|
||||
|
||||
+if ENABLE_STACK_PROTECTOR
|
||||
+powertop_CXXFLAGS += \
|
||||
+ -fstack-protector
|
||||
+endif
|
||||
|
||||
powertop_CPPFLAGS = \
|
||||
-DLOCALEDIR=\"$(localedir)\" \
|
||||
--
|
||||
2.33.0
|
||||
|
||||
16
package/powertop/Config.in
Normal file
16
package/powertop/Config.in
Normal file
@@ -0,0 +1,16 @@
|
||||
config BR2_PACKAGE_POWERTOP
|
||||
bool "powertop"
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # libnl
|
||||
depends on BR2_USE_WCHAR
|
||||
select BR2_PACKAGE_NCURSES
|
||||
select BR2_PACKAGE_LIBNL
|
||||
help
|
||||
A tool to diagnose issues with power consumption and power
|
||||
management
|
||||
|
||||
https://github.com/fenrus75/powertop/
|
||||
|
||||
comment "powertop needs a toolchain w/ C++, threads, wchar"
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
|
||||
!BR2_USE_WCHAR
|
||||
3
package/powertop/powertop.hash
Normal file
3
package/powertop/powertop.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 e58ab3fd7b8ff5f4dd0d17f11848817e7d83c0a6918145ac81de03b5dccf8f49 powertop-2.15.tar.gz
|
||||
sha256 b499eddebda05a8859e32b820a64577d91f1de2b52efa2a1575a2cb4000bc259 COPYING
|
||||
42
package/powertop/powertop.mk
Normal file
42
package/powertop/powertop.mk
Normal file
@@ -0,0 +1,42 @@
|
||||
################################################################################
|
||||
#
|
||||
# powertop
|
||||
#
|
||||
################################################################################
|
||||
|
||||
POWERTOP_VERSION = 2.15
|
||||
POWERTOP_SITE = $(call github,fenrus75,powertop,v$(POWERTOP_VERSION))
|
||||
POWERTOP_LICENSE = GPL-2.0
|
||||
POWERTOP_LICENSE_FILES = COPYING
|
||||
|
||||
POWERTOP_DEPENDENCIES = \
|
||||
host-autoconf-archive \
|
||||
host-pkgconf \
|
||||
libnl \
|
||||
ncurses \
|
||||
$(if $(BR2_PACKAGE_PCIUTILS),pciutils) \
|
||||
$(TARGET_NLS_DEPENDENCIES)
|
||||
|
||||
# 0001-add-disable-stack-protector-option.patch
|
||||
POWERTOP_AUTOPOINT = YES
|
||||
POWERTOP_AUTORECONF = YES
|
||||
POWERTOP_AUTORECONF_OPTS = --include=$(HOST_DIR)/share/autoconf-archive
|
||||
|
||||
POWERTOP_CONF_ENV = LIBS=$(TARGET_NLS_LIBS)
|
||||
POWERTOP_CONF_OPTS = --disable-stack-protector
|
||||
|
||||
# fix missing config.rpath (needed for autoreconf) in the codebase
|
||||
define POWERTOP_TOUCH_CONFIG_RPATH
|
||||
touch $(@D)/config.rpath
|
||||
endef
|
||||
POWERTOP_PRE_CONFIGURE_HOOKS += POWERTOP_TOUCH_CONFIG_RPATH
|
||||
|
||||
# Help powertop at finding the right ncurses library depending on
|
||||
# which one is available.
|
||||
ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y)
|
||||
POWERTOP_CONF_ENV += ac_cv_search_delwin="-lncursesw"
|
||||
else
|
||||
POWERTOP_CONF_ENV += ac_cv_search_delwin="-lncurses"
|
||||
endif
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user