2 # Copyright (C) 2014-2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
11 PKG_RELEASE
:=$(AUTORELEASE
)
14 PKG_SOURCE_URL
=$(PROJECT_GIT
)/project
/fstools.git
15 PKG_MIRROR_HASH
:=03abdf55e2ea32e4e82784c82bb357ab93d62a09966ef1ccacc3de9e45d44614
16 PKG_SOURCE_DATE
:=2023-01-20
17 PKG_SOURCE_VERSION
:=e9b59f063bb333df6d58bf434554753d123a713f
26 PKG_BUILD_DEPENDS
:= util-linux
27 PKG_CONFIG_DEPENDS
:= CONFIG_NAND_SUPPORT CONFIG_FSTOOLS_UBIFS_EXTROOT
29 PKG_MAINTAINER
:=John Crispin
<john@phrozen.org
>
31 include $(INCLUDE_DIR
)/package.mk
32 include $(INCLUDE_DIR
)/cmake.mk
34 CMAKE_OPTIONS
+= $(if
$(CONFIG_FSTOOLS_UBIFS_EXTROOT
),-DCMAKE_UBIFS_EXTROOT
=y
)
35 CMAKE_OPTIONS
+= $(if
$(CONFIG_FSTOOLS_OVL_MOUNT_FULL_ACCESS_TIME
),-DCMAKE_OVL_MOUNT_FULL_ACCESS_TIME
=y
)
36 CMAKE_OPTIONS
+= $(if
$(CONFIG_FSTOOLS_OVL_MOUNT_COMPRESS_ZLIB
),-DCMAKE_OVL_MOUNT_COMPRESS_ZLIB
=y
)
38 define Package
/fstools
41 DEPENDS
:=+ubox
+NAND_SUPPORT
:ubi-utils
42 TITLE
:=OpenWrt filesystem tools
46 define Package
/fstools
/config
47 config FSTOOLS_UBIFS_EXTROOT
48 depends on PACKAGE_fstools
49 depends on NAND_SUPPORT
50 bool
"Support extroot functionality with UBIFS"
53 This option makes it possible to use extroot functionality if the root filesystem resides on an UBIFS partition
55 config FSTOOLS_OVL_MOUNT_FULL_ACCESS_TIME
56 depends on PACKAGE_fstools
57 bool
"Full access time accounting"
60 This option enables the full access time accounting
(warning
: it will increase the flash writes
).
62 config FSTOOLS_OVL_MOUNT_COMPRESS_ZLIB
63 depends on PACKAGE_fstools
64 bool
"Compress using zlib"
67 This option enables the compression using zlib on the storage device.
70 define Package
/snapshot-tool
73 TITLE
:=rootfs snapshoting tool
74 DEPENDS
:=+libubox
+fstools
77 define Package
/block-mount
/conffiles
81 define Package
/block-mount
84 TITLE
:=Block device mounting and checking
85 DEPENDS
:=+ubox
+libubox
+libuci
+libblobmsg-json
+libjson-c
91 TITLE
:=Block device automounting
92 DEPENDS
:=+block-mount
+fstools
+libubus
+kmod-fs-autofs4
+libblobmsg-json
+libjson-c
95 define Package
/fstools
/install
96 $(INSTALL_DIR
) $(1)/sbin
$(1)/lib
98 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/{mount_root
,jffs2reset
} $(1)/sbin
/
99 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfstools.so
$(1)/lib
/
100 $(LN
) jffs2reset
$(1)/sbin
/jffs2mark
103 define Package
/snapshot-tool
/install
104 $(INSTALL_DIR
) $(1)/sbin
106 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/snapshot_tool
$(1)/sbin
/
107 $(INSTALL_BIN
) .
/files
/snapshot
$(1)/sbin
/
110 define Package
/block-mount
/install
111 $(INSTALL_DIR
) $(1)/sbin
$(1)/lib
$(1)/usr
/sbin
$(1)/etc
/hotplug.d
/block
$(1)/etc
/init.d
/ $(1)/etc
/uci-defaults
/
113 $(INSTALL_BIN
) .
/files
/fstab.init
$(1)/etc
/init.d
/fstab
114 $(INSTALL_CONF
) .
/files
/fstab.default
$(1)/etc
/uci-defaults
/10-fstab
115 $(INSTALL_CONF
) .
/files
/mount.hotplug
$(1)/etc
/hotplug.d
/block
/10-mount
116 $(INSTALL_CONF
) .
/files
/media-change.hotplug
$(1)/etc
/hotplug.d
/block
/00-media-change
118 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/block
$(1)/sbin
/
119 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/lib
/libblkid-tiny.so
$(1)/lib
/
120 $(LN
) ..
/..
/sbin
/block
$(1)/usr
/sbin
/swapon
121 $(LN
) ..
/..
/sbin
/block
$(1)/usr
/sbin
/swapoff
125 define Package
/blockd
/install
126 $(INSTALL_DIR
) $(1)/sbin
$(1)/etc
/init.d
/
127 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/blockd
$(1)/sbin
/
128 $(INSTALL_BIN
) .
/files
/blockd.init
$(1)/etc
/init.d
/blockd
131 define Build
/InstallDev
132 $(INSTALL_DIR
) $(1)/usr
/include
133 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/*.h
$(1)/usr
/include/
134 $(INSTALL_DIR
) $(1)/usr
/lib
/
135 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libubi-utils.a
$(1)/usr
/lib
/
138 $(eval
$(call BuildPackage
,fstools
))
139 $(eval
$(call BuildPackage
,snapshot-tool
))
140 $(eval
$(call BuildPackage
,block-mount
))
141 $(eval
$(call BuildPackage
,blockd
))