]> Git Repo - buildroot-mgba.git/blame - fs/btrfs/btrfs.mk
fs: don't use := when not needed
[buildroot-mgba.git] / fs / btrfs / btrfs.mk
CommitLineData
0aade4df
RH
1################################################################################
2#
3# Build the btrfs root filesystem image
4#
5################################################################################
6
7BTRFS_SIZE = $(call qstrip,$(BR2_TARGET_ROOTFS_BTRFS_SIZE))
8ifeq ($(BR2_TARGET_ROOTFS_BTRFS)-$(BTRFS_SIZE),y-)
9$(error BR2_TARGET_ROOTFS_BTRFS_SIZE cannot be empty)
10endif
11
12BTRFS_SIZE_NODE = $(call qstrip,$(BR2_TARGET_ROOTFS_BTRFS_SIZE_NODE))
13BTRFS_SIZE_SECTOR = $(call qstrip,$(BR2_TARGET_ROOTFS_BTRFS_SIZE_SECTOR))
14BTRFS_FEATURES = $(call qstrip,$(BR2_TARGET_ROOTFS_BTRFS_FEATURES))
15# qstrip results in stripping consecutive spaces into a single one. So the
16# variable is not qstrip-ed to preserve the integrity of the string value.
9bdc27d8 17BTRFS_LABEL = $(subst ",,$(BR2_TARGET_ROOTFS_BTRFS_LABEL))
0aade4df
RH
18# ")
19
20BTRFS_OPTS = \
21 -f \
22 -r '$(TARGET_DIR)' \
23 -L '$(BTRFS_LABEL)' \
24 --byte-count '$(BTRFS_SIZE)' \
25 $(if $(BTRFS_SIZE_NODE),--nodesize '$(BTRFS_SIZE_NODE)') \
26 $(if $(BTRFS_SIZE_SECTOR),--sectorsize '$(BTRFS_SIZE_SECTOR)') \
27 $(if $(BTRFS_FEATURES),--features '$(BTRFS_FEATURES)')
28
29ROOTFS_BTRFS_DEPENDENCIES = host-btrfs-progs
30
31define ROOTFS_BTRFS_CMD
f023810f 32 $(RM) -f $@
0aade4df
RH
33 $(HOST_DIR)/bin/mkfs.btrfs $(BTRFS_OPTS) $@
34endef
35
36$(eval $(rootfs))
This page took 0.119788 seconds and 4 git commands to generate.