mirror of
https://github.com/openwrt/packages.git
synced 2025-12-22 01:44:32 +04:00
btrfs-progs: use box version of btrfs tool (busybox like)
This instead of building every tool separately builds one btrfs binary and additional tools are links to this binary. This is same approach as busybox is using. This splits list of tools to two. boxprogs are tools that are boxed to code btrfs binary and progs are tools that are not. This also overload default all make target of Build/Compile and instead builds (unified) btrfs.progs and separate progs. Signed-off-by: Karel Kočí <karel.koci@nic.cz>
This commit is contained in:
committed by
Josef Schlehofer
parent
d7bdd9045b
commit
d9020050b3
@@ -44,8 +44,8 @@ define Package/btrfs-progs/config
|
|||||||
source "$(SOURCE)/Config.in"
|
source "$(SOURCE)/Config.in"
|
||||||
endef
|
endef
|
||||||
|
|
||||||
progs = btrfs btrfs-find-root btrfs-image btrfs-map-logical \
|
boxprogs = btrfsck mkfs.btrfs btrfs-image btrfstune btrfs-find-root
|
||||||
btrfs-select-super btrfstune mkfs.btrfs
|
progs = btrfs-map-logical btrfs-select-super
|
||||||
|
|
||||||
TARGET_CFLAGS += -ffunction-sections -fdata-sections
|
TARGET_CFLAGS += -ffunction-sections -fdata-sections
|
||||||
TARGET_LDFLAGS += -Wl,--gc-sections -Wl,--as-needed
|
TARGET_LDFLAGS += -Wl,--gc-sections -Wl,--as-needed
|
||||||
@@ -61,6 +61,10 @@ ifneq ($(CONFIG_BTRFS_PROGS_ZSTD),y)
|
|||||||
CONFIGURE_ARGS += --disable-zstd
|
CONFIGURE_ARGS += --disable-zstd
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
MAKE_INSTALL_FLAGS += BUILD_PROGRAMS=0
|
||||||
|
|
||||||
|
Build/Compile=$(call Build/Compile/Default,btrfs.box $(progs))
|
||||||
|
|
||||||
define Build/InstallDev
|
define Build/InstallDev
|
||||||
$(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
|
$(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
|
||||||
@@ -72,8 +76,9 @@ define Package/btrfs-progs/install
|
|||||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libbtrfs.so* $(1)/usr/lib
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libbtrfs.so* $(1)/usr/lib
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libbtrfsutil.so* $(1)/usr/lib
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libbtrfsutil.so* $(1)/usr/lib
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
$(INSTALL_BIN) $(addprefix $(PKG_INSTALL_DIR)/usr/bin/, $(progs)) $(1)/usr/bin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/btrfs.box $(1)/usr/bin/btrfs
|
||||||
$(LN) btrfs $(1)/usr/bin/btrfsck
|
$(foreach prog,$(boxprogs),$(LN) btrfs $(1)/usr/bin/$(prog);)
|
||||||
|
$(foreach prog,$(progs),$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(prog) $(1)/usr/bin/;)
|
||||||
$(INSTALL_DIR) $(1)/etc/init.d
|
$(INSTALL_DIR) $(1)/etc/init.d
|
||||||
$(INSTALL_BIN) ./files/btrfs-scan.init $(1)/etc/init.d/btrfs-scan
|
$(INSTALL_BIN) ./files/btrfs-scan.init $(1)/etc/init.d/btrfs-scan
|
||||||
endef
|
endef
|
||||||
|
|||||||
Reference in New Issue
Block a user