From a7d47860f3233659aa2b8491fe8f35a5cd212184 Mon Sep 17 00:00:00 2001 From: Fengwei Tan Date: Thu, 1 Oct 2026 00:11:07 +0800 Subject: [PATCH] package/btop: new package Btop++ is a resource monitor that shows usage and stats for processor, memory, disks, network and processes. https://github.com/aristocratos/btop Signed-off-by: Fengwei Tan [Julien: move the "v" from _VERSION to _SITE] Signed-off-by: Julien Olivain --- DEVELOPERS | 1 + package/Config.in | 1 + package/btop/Config.in | 36 ++++++++++++++++++++++++++++++++++++ package/btop/btop.hash | 5 +++++ package/btop/btop.mk | 29 +++++++++++++++++++++++++++++ 5 files changed, 72 insertions(+) create mode 100644 package/btop/Config.in create mode 100644 package/btop/btop.hash create mode 100644 package/btop/btop.mk diff --git a/DEVELOPERS b/DEVELOPERS index 090bb58200..32ac338dc8 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1130,6 +1130,7 @@ N: Falco Hyfing F: package/python-pymodbus/ N: Fengwei Tan +F: package/btop/ F: support/testing/tests/core/test_flat_stacksize.py N: Fiona Klute diff --git a/package/Config.in b/package/Config.in index dc829675ff..a82e369aff 100644 --- a/package/Config.in +++ b/package/Config.in @@ -2802,6 +2802,7 @@ menu "System tools" source "package/attr/Config.in" source "package/audit/Config.in" source "package/balena-engine/Config.in" + source "package/btop/Config.in" source "package/bubblewrap/Config.in" source "package/cgroupfs-mount/Config.in" source "package/cgroupfs-v2-mount/Config.in" diff --git a/package/btop/Config.in b/package/btop/Config.in new file mode 100644 index 0000000000..fe4be53454 --- /dev/null +++ b/package/btop/Config.in @@ -0,0 +1,36 @@ +config BR2_PACKAGE_BTOP + bool "btop" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_WCHAR + depends on BR2_ENABLE_LOCALE + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_14 + depends on !BR2_TOOLCHAIN_USES_UCLIBC # no quick_exit() + help + Resource monitor that shows usage and stats for processor, + memory, disks, network and processes. + + https://github.com/aristocratos/btop + +if BR2_PACKAGE_BTOP + +config BR2_PACKAGE_BTOP_GPU + bool "GPU monitoring support" + depends on !BR2_STATIC_LIBS # dlopen() + help + Enable GPU monitoring. Intel i915 GPUs are accessed through + the kernel perf interface. NVIDIA and AMD GPUs additionally + require NVML and ROCm SMI respectively at runtime. + +comment "GPU monitoring needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +endif + +comment "btop needs a glibc or musl toolchain w/ C++, threads, wchar, locale, gcc >= 14" + depends on BR2_TOOLCHAIN_USES_UCLIBC \ + || !BR2_INSTALL_LIBSTDCPP \ + || !BR2_TOOLCHAIN_HAS_THREADS \ + || !BR2_USE_WCHAR \ + || !BR2_ENABLE_LOCALE \ + || !BR2_TOOLCHAIN_GCC_AT_LEAST_14 diff --git a/package/btop/btop.hash b/package/btop/btop.hash new file mode 100644 index 0000000000..e748dbb373 --- /dev/null +++ b/package/btop/btop.hash @@ -0,0 +1,5 @@ +# Locally computed +sha256 933de2e4d1b2211a638be463eb6e8616891bfba73aef5d38060bd8319baeefc6 btop-1.4.7.tar.gz +sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE +sha256 07580f2a3b35709ce703d523f447b242f6dfec7582a8c0df102c7fa2849375f8 include/fmt/LICENSE.rst +sha256 e0309e3ea5d2c839946816c557ac8da5ec022b3f0bb26a5b5de0f709567902b3 src/linux/intel_gpu_top/intel_gpu_top.c diff --git a/package/btop/btop.mk b/package/btop/btop.mk new file mode 100644 index 0000000000..50cdca90d8 --- /dev/null +++ b/package/btop/btop.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# btop +# +################################################################################ + +BTOP_VERSION = 1.4.7 +BTOP_SITE = $(call github,aristocratos,btop,v$(BTOP_VERSION)) +BTOP_LICENSE = Apache-2.0, MIT with exception (fmt) +BTOP_LICENSE_FILES = LICENSE include/fmt/LICENSE.rst + +BTOP_SUPPORTS_IN_SOURCE_BUILD = NO + +BTOP_CONF_OPTS = \ + -DBTOP_GPU=$(if $(BR2_PACKAGE_BTOP_GPU),ON,OFF) \ + -DBTOP_LTO=$(if $(BR2_ENABLE_LTO),ON,OFF) \ + -DBTOP_RSMI_STATIC=OFF \ + -DBTOP_STATIC=$(if $(BR2_STATIC_LIBS),ON,OFF) + +ifeq ($(BR2_PACKAGE_BTOP_GPU),y) +BTOP_LICENSE += , MIT (intel_gpu_top) +BTOP_LICENSE_FILES += src/linux/intel_gpu_top/intel_gpu_top.c +endif + +ifneq ($(BR2_TOOLCHAIN_HAS_SSP),y) +BTOP_CONF_OPTS += -DHAS_FSTACK_PROTECTOR=OFF +endif + +$(eval $(cmake-package))