docs/manual: document the br2-external desc: field
[buildroot-gz.git] / fs / ext2 / ext2.mk
blob7417f81cf0eac44a2e7f54c6b5277bce831daaa2
1 ################################################################################
3 # Build the ext2 root filesystem image
5 ################################################################################
7 EXT2_OPTS = -G $(BR2_TARGET_ROOTFS_EXT2_GEN) -R $(BR2_TARGET_ROOTFS_EXT2_REV)
9 ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_BLOCKS)),0)
10 EXT2_OPTS += -b $(BR2_TARGET_ROOTFS_EXT2_BLOCKS)
11 endif
12 EXT2_OPTS += -B $(BR2_TARGET_ROOTFS_EXT2_EXTRA_BLOCKS)
14 ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_INODES)),0)
15 EXT2_OPTS += -i $(BR2_TARGET_ROOTFS_EXT2_INODES)
16 endif
17 EXT2_OPTS += -I $(BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES)
19 ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)),0)
20 EXT2_OPTS += -r $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)
21 endif
23 # Not qstrip-ing the variable, because it may contain spaces, but we must
24 # qstrip it when checking. Furthermore, we need to further quote it, so
25 # that the quotes do not get eaten by the echo statement when creating the
26 # fakeroot script
27 ifneq ($(call qstrip,$(BR2_TARGET_ROOTFS_EXT2_LABEL)),)
28 EXT2_OPTS += -l '$(BR2_TARGET_ROOTFS_EXT2_LABEL)'
29 endif
31 ROOTFS_EXT2_DEPENDENCIES = host-mke2img
33 define ROOTFS_EXT2_CMD
34 PATH=$(BR_PATH) mke2img -d $(TARGET_DIR) $(EXT2_OPTS) -o $@
35 endef
37 rootfs-ext2-symlink:
38 ln -sf rootfs.ext2$(ROOTFS_EXT2_COMPRESS_EXT) $(BINARIES_DIR)/rootfs.ext$(BR2_TARGET_ROOTFS_EXT2_GEN)$(ROOTFS_EXT2_COMPRESS_EXT)
40 .PHONY: rootfs-ext2-symlink
42 ifneq ($(BR2_TARGET_ROOTFS_EXT2_GEN),2)
43 ROOTFS_EXT2_POST_TARGETS += rootfs-ext2-symlink
44 endif
46 $(eval $(call ROOTFS_TARGET,ext2))