blob: 808d168db9a6805ce6683612592aee05d326c35f [file] [log] [blame]
developer538f2d12024-11-05 15:54:46 +08001From: Weijie Gao <weijie.gao@mediatek.com>
2Subject: [PATCH] fstools: add support to build libfstools-bootparam
3 library
4
5The libfstools-bootparam is used for dual-image support.
6
7Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
8
9--- a/package/system/fstools/Makefile
10+++ b/package/system/fstools/Makefile
11@@ -31,14 +31,21 @@ PKG_MAINTAINER:=John Crispin <john@phrozen.org>
12 include $(INCLUDE_DIR)/package.mk
13 include $(INCLUDE_DIR)/cmake.mk
14
15+#TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-ldl)
16 CMAKE_OPTIONS += $(if $(CONFIG_FSTOOLS_UBIFS_EXTROOT),-DCMAKE_UBIFS_EXTROOT=y)
17 CMAKE_OPTIONS += $(if $(CONFIG_FSTOOLS_OVL_MOUNT_FULL_ACCESS_TIME),-DCMAKE_OVL_MOUNT_FULL_ACCESS_TIME=y)
18 CMAKE_OPTIONS += $(if $(CONFIG_FSTOOLS_OVL_MOUNT_COMPRESS_ZLIB),-DCMAKE_OVL_MOUNT_COMPRESS_ZLIB=y)
19
20+define Package/libfstools-bootparam
21+ SECTION:=libs
22+ CATEGORY:=Libraries
23+ TITLE:=Boot parameter library for OpenWrt filesystem tools
24+endef
25+
26 define Package/fstools
27 SECTION:=base
28 CATEGORY:=Base system
29- DEPENDS:=+ubox +NAND_SUPPORT:ubi-utils
30+ DEPENDS:=+ubox +NAND_SUPPORT:ubi-utils +libfstools-bootparam
31 TITLE:=OpenWrt filesystem tools
32 MENU:=1
33 endef
34@@ -82,7 +89,7 @@ define Package/block-mount
35 SECTION:=base
36 CATEGORY:=Base system
37 TITLE:=Block device mounting and checking
38- DEPENDS:=+ubox +libubox +libuci +libblobmsg-json +libjson-c
39+ DEPENDS:=+ubox +libubox +libuci +libblobmsg-json +libjson-c +libfstools-bootparam
40 endef
41
42 define Package/blockd
43@@ -92,6 +99,12 @@ define Package/blockd
44 DEPENDS:=+block-mount +fstools +libubus +kmod-fs-autofs4 +libblobmsg-json +libjson-c
45 endef
46
47+define Package/libfstools-bootparam/install
48+ $(INSTALL_DIR) $(1)/lib
49+
50+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libfstools-bootparam.so $(1)/lib/
51+endef
52+
53 define Package/fstools/install
54 $(INSTALL_DIR) $(1)/sbin $(1)/lib
55
56@@ -135,6 +148,7 @@ define Build/InstallDev
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libubi-utils.a $(1)/usr/lib/
58 endef
59
60+$(eval $(call BuildPackage,libfstools-bootparam))
61 $(eval $(call BuildPackage,fstools))
62 $(eval $(call BuildPackage,snapshot-tool))
63 $(eval $(call BuildPackage,block-mount))