diff options
author | Dirk Brenken <dev@brenken.org> | 2018-01-12 12:57:39 +0100 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2018-01-18 08:04:18 +0100 |
commit | ef8cd6be1eab8bfeca77b1117b7a22c35dbae2ec (patch) | |
tree | 6d9bec7793b5faf486e8a31ed55154d012ab65a0 | |
parent | a7e62b4be1dac8e98a816ad9b11d0b8ff7620dd7 (diff) | |
download | mtk-20170518-ef8cd6be1eab8bfeca77b1117b7a22c35dbae2ec.zip mtk-20170518-ef8cd6be1eab8bfeca77b1117b7a22c35dbae2ec.tar.gz mtk-20170518-ef8cd6be1eab8bfeca77b1117b7a22c35dbae2ec.tar.bz2 |
util-linux: add fstrim support
This PR adds optional fstrim support
Signed-off-by: Dirk Brenken <dev@brenken.org>
-rw-r--r-- | package/utils/util-linux/Makefile | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/package/utils/util-linux/Makefile b/package/utils/util-linux/Makefile index 88cb314..9270dd5 100644 --- a/package/utils/util-linux/Makefile +++ b/package/utils/util-linux/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2015 OpenWrt.org +# Copyright (C) 2007-2018 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=util-linux PKG_VERSION:=2.30.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.30 @@ -205,6 +205,19 @@ define Package/flock/description manages flock locks from within shell scripts or the command line endef +define Package/fstrim +$(call Package/util-linux/Default) + TITLE:=discard unused blocks on a mounted filesystem + DEPENDS:= +libblkid +libuuid +libsmartcols +libmount + SUBMENU=Filesystem +endef + +define Package/fstrim/description + fstrim is used on a mounted filesystem to discard (or "trim") blocks + which are not in use by the filesystem. This is useful for solid- + state drives (SSDs) and thinly-provisioned storage. +endef + define Package/getopt $(call Package/util-linux/Default) TITLE:=parse command options (enhanced) @@ -553,6 +566,11 @@ define Package/flock/install $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/flock $(1)/usr/bin/ endef +define Package/fstrim/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fstrim $(1)/usr/sbin/ +endef + define Package/getopt/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/getopt $(1)/usr/bin/ @@ -678,6 +696,7 @@ $(eval $(call BuildPackage,dmesg)) $(eval $(call BuildPackage,fdisk)) $(eval $(call BuildPackage,findfs)) $(eval $(call BuildPackage,flock)) +$(eval $(call BuildPackage,fstrim)) $(eval $(call BuildPackage,getopt)) $(eval $(call BuildPackage,hwclock)) $(eval $(call BuildPackage,logger)) |