mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@db180c0
This commit is contained in:
19
package/irqbalance/Config.in
Normal file
19
package/irqbalance/Config.in
Normal file
@@ -0,0 +1,19 @@
|
||||
config BR2_PACKAGE_IRQBALANCE
|
||||
bool "irqbalance"
|
||||
depends on BR2_USE_WCHAR # libglib2
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
|
||||
depends on BR2_USE_MMU # libglib2
|
||||
select BR2_PACKAGE_LIBGLIB2
|
||||
help
|
||||
Irqbalance is a daemon to help balance the cpu load generated
|
||||
by interrupts across all of a systems cpus.
|
||||
Irqbalance identifies the highest volume interrupt sources,
|
||||
and isolates them to a single unique cpu, so that load is
|
||||
spread as much as possible over an entire processor set, while
|
||||
minimizing cache hit rates for irq handlers.
|
||||
|
||||
https://github.com/Irqbalance/irqbalance
|
||||
|
||||
comment "irqbalance needs a toolchain w/ wchar, threads"
|
||||
depends on BR2_USE_MMU
|
||||
depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
|
||||
34
package/irqbalance/S13irqbalance
Normal file
34
package/irqbalance/S13irqbalance
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Starts irqbalance
|
||||
#
|
||||
|
||||
EXEC="/usr/sbin/irqbalance"
|
||||
ARGS=""
|
||||
PID="/var/run/irqbalance.pid"
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf "Starting irqbalance: "
|
||||
start-stop-daemon -S -q -x $EXEC -- $ARGS
|
||||
if [ $? != 0 ]; then
|
||||
echo "FAILED"
|
||||
exit 1
|
||||
else
|
||||
echo "OK"
|
||||
fi
|
||||
pidof irqbalance > $PID
|
||||
;;
|
||||
stop)
|
||||
printf "Stopping irqbalance: "
|
||||
start-stop-daemon -K -q -p $PID
|
||||
echo "OK"
|
||||
;;
|
||||
restart|reload)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
3
package/irqbalance/irqbalance.hash
Normal file
3
package/irqbalance/irqbalance.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 3318eddc03782cfdad22b20eff18eaf378c498c5de286e8cbaa5521ddf4f810b irqbalance-1.5.0.tar.gz
|
||||
sha256 32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670 COPYING
|
||||
63
package/irqbalance/irqbalance.mk
Normal file
63
package/irqbalance/irqbalance.mk
Normal file
@@ -0,0 +1,63 @@
|
||||
################################################################################
|
||||
#
|
||||
# irqbalance
|
||||
#
|
||||
################################################################################
|
||||
|
||||
IRQBALANCE_VERSION = 1.5.0
|
||||
IRQBALANCE_SITE = $(call github,irqbalance,irqbalance,v$(IRQBALANCE_VERSION))
|
||||
IRQBALANCE_LICENSE = GPL-2.0
|
||||
IRQBALANCE_LICENSE_FILES = COPYING
|
||||
IRQBALANCE_DEPENDENCIES = host-pkgconf libglib2
|
||||
# Autoreconf needed because package is distributed without a configure script
|
||||
IRQBALANCE_AUTORECONF = YES
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBCAP_NG),y)
|
||||
IRQBALANCE_DEPENDENCIES += libcap-ng
|
||||
IRQBALANCE_CONF_OPTS += --with-libcap-ng
|
||||
else
|
||||
IRQBALANCE_CONF_OPTS += --without-libcap-ng
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y)
|
||||
IRQBALANCE_DEPENDENCIES += ncurses
|
||||
IRQBALANCE_CONF_OPTS += --with-irqbalance-ui
|
||||
else
|
||||
IRQBALANCE_CONF_OPTS += --without-irqbalance-ui
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_NUMACTL),y)
|
||||
IRQBALANCE_DEPENDENCIES += numactl
|
||||
IRQBALANCE_CONF_OPTS += --enable-numa
|
||||
else
|
||||
IRQBALANCE_CONF_OPTS += --disable-numa
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
|
||||
IRQBALANCE_DEPENDENCIES += systemd
|
||||
IRQBALANCE_CONF_OPTS += --with-systemd
|
||||
else
|
||||
IRQBALANCE_CONF_OPTS += --without-systemd
|
||||
endif
|
||||
|
||||
# This would be done by the package's autogen.sh script
|
||||
define IRQBALANCE_PRECONFIGURE
|
||||
mkdir -p $(@D)/m4
|
||||
endef
|
||||
|
||||
IRQBALANCE_PRE_CONFIGURE_HOOKS += IRQBALANCE_PRECONFIGURE
|
||||
|
||||
define IRQBALANCE_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -D -m 755 package/irqbalance/S13irqbalance \
|
||||
$(TARGET_DIR)/etc/init.d/S13irqbalance
|
||||
endef
|
||||
|
||||
define IRQBALANCE_INSTALL_INIT_SYSTEMD
|
||||
$(INSTALL) -D -m 644 package/irqbalance/irqbalance.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/irqbalance.service
|
||||
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
||||
ln -fs ../../../../usr/lib/systemd/system/irqbalance.service \
|
||||
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/irqbalance.service
|
||||
endef
|
||||
|
||||
$(eval $(autotools-package))
|
||||
9
package/irqbalance/irqbalance.service
Normal file
9
package/irqbalance/irqbalance.service
Normal file
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=irqbalance daemon
|
||||
After=syslog.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/irqbalance --foreground
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user