[Buildroot] [PATCH 1/1] package/util-linux: add an option to enable lscpu

Anthony Harivel aharivel at redhat.com
Thu Nov 23 15:31:31 UTC 2023


lscpu displays information about CPU architecture and needs to be
explicitly enable for compilation.

Signed-off-by: Anthony Harivel <aharivel at redhat.com>
---
 package/util-linux/Config.in     | 9 ++++++++-
 package/util-linux/util-linux.mk | 1 +
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/package/util-linux/Config.in b/package/util-linux/Config.in
index be87494b35cf..3eb1b2e1c9a3 100644
--- a/package/util-linux/Config.in
+++ b/package/util-linux/Config.in
@@ -58,7 +58,7 @@ config BR2_PACKAGE_UTIL_LINUX_BINARIES
 	  blkdiscard, blkid, blockdev, chcpu, choom, col, colcrt, colrm,
 	  column, ctrlaltdel, dmesg, fdisk, fincore, findfs, findmnt,
 	  flock, fsfreeze, fstrim, getopt, hexdump, ipcmk, isosize,
-	  ldattach, look, lsblk, lscpu, lsipc, lslocks, lsns, mcookie,
+	  ldattach, look, lsblk, lsipc, lslocks, lsns, mcookie,
 	  mkfs, mkswap, namei, prlimit, readprofile, renice, rev,
 	  rtcwake, script, scriptlive, scriptreplay, setarch, setsid,
 	  sfdisk, swaplabel, swapoff, swapon, uuidgen, uuidparse,
@@ -211,6 +211,13 @@ config BR2_PACKAGE_UTIL_LINUX_LOSETUP
 	help
 	  Set up and control loop devices
 
+config BR2_PACKAGE_UTIL_LINUX_LSCPU
+	bool "lscpu"
+	depends on BR2_USE_MMU # libsmartcols
+	select BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS
+	help
+	  Display information about the CPU architecture
+
 config BR2_PACKAGE_UTIL_LINUX_LSFD
 	bool "lsfd"
 	depends on BR2_USE_MMU # libsmartcols
diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk
index 72126adb005f..3546c07337e0 100644
--- a/package/util-linux/util-linux.mk
+++ b/package/util-linux/util-linux.mk
@@ -161,6 +161,7 @@ UTIL_LINUX_CONF_OPTS += \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_LOGGER),--enable-logger,--disable-logger) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_LOGIN),--enable-login,--disable-login) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_LOSETUP),--enable-losetup,--disable-losetup) \
+	$(if $(BR2_PACKAGE_UTIL_LINUX_LSCPU),--enable-lscpu,--disable-lscpu) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_LSFD),--enable-lsfd,--disable-lsfd) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_LSLOGINS),--enable-lslogins,--disable-lslogins) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_LSMEM),--enable-lsmem,--disable-lsmem) \
-- 
2.42.0




More information about the buildroot mailing list