OpenWrt – Diff between revs 2 and 3
?pathlinks?
Rev 2 | Rev 3 | |||
---|---|---|---|---|
1 | # |
1 | # |
|
2 | # Copyright (C) 2014-2015 OpenWrt.org |
2 | # Copyright (C) 2014-2015 OpenWrt.org |
|
3 | # |
3 | # |
|
4 | # This is free software, licensed under the GNU General Public License v2. |
4 | # This is free software, licensed under the GNU General Public License v2. |
|
5 | # See /LICENSE for more information. |
5 | # See /LICENSE for more information. |
|
6 | # |
6 | # |
|
7 | |
7 | |
|
8 | include $(TOPDIR)/rules.mk |
8 | include $(TOPDIR)/rules.mk |
|
9 | |
9 | |
|
10 | PKG_NAME:=fstools |
10 | PKG_NAME:=fstools |
|
11 | PKG_RELEASE:=4 |
11 | PKG_RELEASE:=1 |
|
12 | |
12 | |
|
13 | PKG_SOURCE_PROTO:=git |
13 | PKG_SOURCE_PROTO:=git |
|
14 | PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git |
14 | PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git |
|
15 | PKG_SOURCE_DATE:=2018-12-28 |
15 | PKG_SOURCE_DATE:=2018-04-16 |
|
16 | PKG_SOURCE_VERSION:=af93f4b8dc32cf1320dfe8f4b93bb3a12606fc33 |
16 | PKG_SOURCE_VERSION:=e24368361db166cf369a19cea773bd54f9d854b1 |
|
17 | PKG_MIRROR_HASH:=a2d8c2500fe75014ef16c039d8cdb276c1d5c066f8bce6550a3ecf46a9a411a9 |
17 | PKG_MIRROR_HASH:=8b483e752578683224245a6d77b3d7172b7cf7a8c3b959e21c47ff18aefc2464 |
|
18 | CMAKE_INSTALL:=1 |
18 | CMAKE_INSTALL:=1 |
|
19 | |
19 | |
|
20 | PKG_LICENSE:=GPL-2.0 |
20 | PKG_LICENSE:=GPL-2.0 |
|
21 | PKG_LICENSE_FILES:= |
21 | PKG_LICENSE_FILES:= |
|
22 | |
22 | |
|
23 | PKG_USE_MIPS16:=0 |
23 | PKG_USE_MIPS16:=0 |
|
24 | PKG_FLAGS:=nonshared |
24 | PKG_FLAGS:=nonshared |
|
25 | |
25 | |
|
26 | PKG_BUILD_DEPENDS := util-linux |
26 | PKG_BUILD_DEPENDS := util-linux |
|
27 | PKG_CONFIG_DEPENDS := CONFIG_NAND_SUPPORT CONFIG_FSTOOLS_UBIFS_EXTROOT |
27 | PKG_CONFIG_DEPENDS := CONFIG_NAND_SUPPORT CONFIG_FSTOOLS_UBIFS_EXTROOT |
|
28 | |
28 | |
|
29 | PKG_MAINTAINER:=John Crispin <john@phrozen.org> |
29 | PKG_MAINTAINER:=John Crispin <john@phrozen.org> |
|
30 | |
30 | |
|
31 | include $(INCLUDE_DIR)/package.mk |
31 | include $(INCLUDE_DIR)/package.mk |
|
32 | include $(INCLUDE_DIR)/cmake.mk |
32 | include $(INCLUDE_DIR)/cmake.mk |
|
33 | |
33 | |
|
34 | TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lrt) |
34 | TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lrt) |
|
35 | CMAKE_OPTIONS += $(if $(CONFIG_FSTOOLS_UBIFS_EXTROOT),-DCMAKE_UBIFS_EXTROOT=y) |
35 | CMAKE_OPTIONS += $(if $(CONFIG_FSTOOLS_UBIFS_EXTROOT),-DCMAKE_UBIFS_EXTROOT=y) |
|
36 | CMAKE_OPTIONS += $(if $(CONFIG_FSTOOLS_OVL_MOUNT_FULL_ACCESS_TIME),-DCMAKE_OVL_MOUNT_FULL_ACCESS_TIME=y) |
- | ||
37 | CMAKE_OPTIONS += $(if $(CONFIG_FSTOOLS_OVL_MOUNT_COMPRESS_ZLIB),-DCMAKE_OVL_MOUNT_COMPRESS_ZLIB=y) |
- | ||
38 | |
36 | |
|
39 | define Package/fstools |
37 | define Package/fstools |
|
40 | SECTION:=base |
38 | SECTION:=base |
|
41 | CATEGORY:=Base system |
39 | CATEGORY:=Base system |
|
42 | DEPENDS:=+ubox +USE_GLIBC:librt +NAND_SUPPORT:ubi-utils |
40 | DEPENDS:=+ubox +USE_GLIBC:librt +NAND_SUPPORT:ubi-utils |
|
43 | TITLE:=OpenWrt filesystem tools |
41 | TITLE:=OpenWrt filesystem tools |
|
44 | MENU:=1 |
42 | MENU:=1 |
|
45 | endef |
43 | endef |
|
46 | |
44 | |
|
47 | define Package/fstools/config |
45 | define Package/fstools/config |
|
48 | config FSTOOLS_UBIFS_EXTROOT |
46 | config FSTOOLS_UBIFS_EXTROOT |
|
49 | depends on PACKAGE_fstools |
47 | depends on PACKAGE_fstools |
|
50 | depends on NAND_SUPPORT |
48 | depends on NAND_SUPPORT |
|
51 | bool "Support extroot functionality with UBIFS" |
49 | bool "Support extroot functionality with UBIFS" |
|
52 | default y |
50 | default y |
|
53 | help |
51 | help |
|
54 | This option makes it possible to use extroot functionality if the root filesystem resides on an UBIFS partition |
52 | This option makes it possible to use extroot functionality if the root filesystem resides on an UBIFS partition |
|
55 | |
- | ||
56 | config FSTOOLS_OVL_MOUNT_FULL_ACCESS_TIME |
- | ||
57 | depends on PACKAGE_fstools |
- | ||
58 | bool "Full access time accounting" |
- | ||
59 | default n |
- | ||
60 | help |
- | ||
61 | This option enables the full access time accounting (warning: it will increase the flash writes). |
- | ||
62 | |
- | ||
63 | config FSTOOLS_OVL_MOUNT_COMPRESS_ZLIB |
- | ||
64 | depends on PACKAGE_fstools |
- | ||
65 | bool "Compress using zlib" |
- | ||
66 | default n |
- | ||
67 | help |
- | ||
68 | This option enables the compression using zlib on the storage device. |
- | ||
69 | endef |
53 | endef |
|
70 | |
54 | |
|
71 | define Package/snapshot-tool |
55 | define Package/snapshot-tool |
|
72 | SECTION:=base |
56 | SECTION:=base |
|
73 | CATEGORY:=Base system |
57 | CATEGORY:=Base system |
|
74 | TITLE:=rootfs snapshoting tool |
58 | TITLE:=rootfs snapshoting tool |
|
75 | DEPENDS:=+libubox +fstools |
59 | DEPENDS:=+libubox +fstools |
|
76 | endef |
60 | endef |
|
77 | |
61 | |
|
78 | define Package/block-mount |
62 | define Package/block-mount |
|
79 | SECTION:=base |
63 | SECTION:=base |
|
80 | CATEGORY:=Base system |
64 | CATEGORY:=Base system |
|
81 | TITLE:=Block device mounting and checking |
65 | TITLE:=Block device mounting and checking |
|
82 | DEPENDS:=+ubox +libubox +libuci |
66 | DEPENDS:=+ubox +libubox +libuci |
|
83 | endef |
67 | endef |
|
84 | |
68 | |
|
85 | define Package/blockd |
69 | define Package/blockd |
|
86 | SECTION:=base |
70 | SECTION:=base |
|
87 | CATEGORY:=Base system |
71 | CATEGORY:=Base system |
|
88 | TITLE:=Block device automounting |
72 | TITLE:=Block device automounting |
|
89 | DEPENDS:=+block-mount +fstools +libubus +kmod-fs-autofs4 |
73 | DEPENDS:=+block-mount +fstools +libubus +kmod-fs-autofs4 |
|
90 | endef |
74 | endef |
|
91 | |
75 | |
|
92 | define Package/fstools/install |
76 | define Package/fstools/install |
|
93 | $(INSTALL_DIR) $(1)/sbin $(1)/lib |
77 | $(INSTALL_DIR) $(1)/sbin $(1)/lib |
|
94 | |
78 | |
|
95 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{mount_root,jffs2reset} $(1)/sbin/ |
79 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{mount_root,jffs2reset} $(1)/sbin/ |
|
96 | $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libfstools.so $(1)/lib/ |
80 | $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libfstools.so $(1)/lib/ |
|
97 | $(LN) jffs2reset $(1)/sbin/jffs2mark |
81 | $(LN) jffs2reset $(1)/sbin/jffs2mark |
|
98 | endef |
82 | endef |
|
99 | |
83 | |
|
100 | define Package/snapshot-tool/install |
84 | define Package/snapshot-tool/install |
|
101 | $(INSTALL_DIR) $(1)/sbin |
85 | $(INSTALL_DIR) $(1)/sbin |
|
102 | |
86 | |
|
103 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/snapshot_tool $(1)/sbin/ |
87 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/snapshot_tool $(1)/sbin/ |
|
104 | $(INSTALL_BIN) ./files/snapshot $(1)/sbin/ |
88 | $(INSTALL_BIN) ./files/snapshot $(1)/sbin/ |
|
105 | endef |
89 | endef |
|
106 | |
90 | |
|
107 | define Package/block-mount/install |
91 | define Package/block-mount/install |
|
108 | $(INSTALL_DIR) $(1)/sbin $(1)/lib $(1)/usr/sbin $(1)/etc/hotplug.d/block $(1)/etc/init.d/ $(1)/etc/uci-defaults/ |
92 | $(INSTALL_DIR) $(1)/sbin $(1)/lib $(1)/usr/sbin $(1)/etc/hotplug.d/block $(1)/etc/init.d/ $(1)/etc/uci-defaults/ |
|
109 | |
93 | |
|
110 | $(INSTALL_BIN) ./files/fstab.init $(1)/etc/init.d/fstab |
94 | $(INSTALL_BIN) ./files/fstab.init $(1)/etc/init.d/fstab |
|
111 | $(INSTALL_CONF) ./files/fstab.default $(1)/etc/uci-defaults/10-fstab |
95 | $(INSTALL_DATA) ./files/fstab.default $(1)/etc/uci-defaults/10-fstab |
|
112 | $(INSTALL_CONF) ./files/mount.hotplug $(1)/etc/hotplug.d/block/10-mount |
96 | $(INSTALL_DATA) ./files/mount.hotplug $(1)/etc/hotplug.d/block/10-mount |
|
113 | $(INSTALL_CONF) ./files/media-change.hotplug $(1)/etc/hotplug.d/block/00-media-change |
- | ||
114 | |
97 | |
|
115 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/block $(1)/sbin/ |
98 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/block $(1)/sbin/ |
|
116 | $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libblkid-tiny.so $(1)/lib/ |
99 | $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libblkid-tiny.so $(1)/lib/ |
|
117 | $(LN) ../../sbin/block $(1)/usr/sbin/swapon |
100 | $(LN) ../../sbin/block $(1)/usr/sbin/swapon |
|
118 | $(LN) ../../sbin/block $(1)/usr/sbin/swapoff |
101 | $(LN) ../../sbin/block $(1)/usr/sbin/swapoff |
|
119 | |
102 | |
|
120 | endef |
103 | endef |
|
121 | |
104 | |
|
122 | define Package/blockd/install |
105 | define Package/blockd/install |
|
123 | $(INSTALL_DIR) $(1)/sbin $(1)/etc/init.d/ |
106 | $(INSTALL_DIR) $(1)/sbin $(1)/etc/init.d/ |
|
124 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/blockd $(1)/sbin/ |
107 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/blockd $(1)/sbin/ |
|
125 | $(INSTALL_BIN) ./files/blockd.init $(1)/etc/init.d/blockd |
108 | $(INSTALL_BIN) ./files/blockd.init $(1)/etc/init.d/blockd |
|
126 | endef |
109 | endef |
|
127 | |
110 | |
|
128 | define Build/InstallDev |
111 | define Build/InstallDev |
|
129 | $(INSTALL_DIR) $(1)/usr/include |
112 | $(INSTALL_DIR) $(1)/usr/include |
|
130 | $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ |
113 | $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ |
|
131 | $(INSTALL_DIR) $(1)/usr/lib/ |
114 | $(INSTALL_DIR) $(1)/usr/lib/ |
|
132 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/libubi-utils.a $(1)/usr/lib/ |
115 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/libubi-utils.a $(1)/usr/lib/ |
|
133 | endef |
116 | endef |
|
134 | |
117 | |
|
135 | $(eval $(call BuildPackage,fstools)) |
118 | $(eval $(call BuildPackage,fstools)) |
|
136 | $(eval $(call BuildPackage,snapshot-tool)) |
119 | $(eval $(call BuildPackage,snapshot-tool)) |
|
137 | $(eval $(call BuildPackage,block-mount)) |
120 | $(eval $(call BuildPackage,block-mount)) |
|
138 | $(eval $(call BuildPackage,blockd)) |
121 | $(eval $(call BuildPackage,blockd)) |
|
139 | |
122 | |