Signed-off-by: Jonas Rebmann <[email protected]>
---
rules/util-linux.in | 12 ++++++++++++
rules/util-linux.make | 3 ++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/rules/util-linux.in b/rules/util-linux.in
index
8bf035f3901ef415faafd9502f8d23cc2841711f..58bd21100a9ea5e094a4121c489868d756ac2470
100644
--- a/rules/util-linux.in
+++ b/rules/util-linux.in
@@ -290,6 +290,18 @@ comment "BusyBox' taskset is selected!"
comment "sys-utils"
+config UTIL_LINUX_BLKDISCARD
+ bool
+ depends on !BUSYBOX_BLKDISCARD || ALLYES
+ prompt "blkdiscard"
+ help
+ blkdiscard is used to discard device sectors. This is useful for
+ solid-state drivers (SSDs) and thinly-provisioned storage. Unlike
+ fstrim, this command is used directly on the block device.
+
+comment "BusyBox' blkdiscard is selected!"
+ depends on BUSYBOX_BLKDISCARD
+
config UTIL_LINUX_CHMEM
bool
prompt "chmem"
diff --git a/rules/util-linux.make b/rules/util-linux.make
index
579c165e6edb03221125de9d5b338c5452eb2107..c98200a52258f930e08a3d4cedc3f1b001432d0a
100644
--- a/rules/util-linux.make
+++ b/rules/util-linux.make
@@ -54,7 +54,7 @@ UTIL_LINUX_CONF_OPT := \
-Dbuild-agetty=$(call ptx/endis, PTXCONF_UTIL_LINUX_AGETTY)d \
-Dbuild-bash-completion=disabled \
-Dbuild-bfs=disabled \
- -Dbuild-blkdiscard=disabled \
+ -Dbuild-blkdiscard=$(call ptx/endis, PTXCONF_UTIL_LINUX_BLKDISCARD)d \
-Dbuild-blkpr=disabled \
-Dbuild-blkzone=disabled \
-Dbuild-blockdev=disabled \
@@ -223,6 +223,7 @@ UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_CHRT) +=
bin/chrt
UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_IONICE) += bin/ionice
UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_TASKSET) += bin/taskset
# sys-utils
+UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_BLKDISCARD) +=
sbin/blkdiscard
UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_CHMEM) += bin/chmem
UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_DMESG) += bin/dmesg
UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_FLOCK) += bin/flock
---
base-commit: 1b82c74e1f1f2048cb08a381def774ea2f8e7227
change-id: 20250123-blkdiscard-96ec7df07d6d
Best regards,
--
Jonas Rebmann <[email protected]>