board/csky: fixup gdb instructions in readme.txt
[buildroot-gz.git] / fs / ext2 / ext2.mk
blobcfb34c456580762e3a23d9fb059533bb18856a70
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 # qstrip results in stripping consecutive spaces into a single one. So the
24 # variable is not qstrip-ed to preserve the integrity of the string value.
25 EXT2_LABEL := $(subst ",,$(BR2_TARGET_ROOTFS_EXT2_LABEL))
26 ifneq ($(EXT2_LABEL),)
27 EXT2_OPTS += -l "$(EXT2_LABEL)"
28 endif
30 ROOTFS_EXT2_DEPENDENCIES = host-mke2img
32 define ROOTFS_EXT2_CMD
33 PATH=$(BR_PATH) mke2img -d $(TARGET_DIR) $(EXT2_OPTS) -o $@
34 endef
36 rootfs-ext2-symlink:
37 ln -sf rootfs.ext2$(ROOTFS_EXT2_COMPRESS_EXT) $(BINARIES_DIR)/rootfs.ext$(BR2_TARGET_ROOTFS_EXT2_GEN)$(ROOTFS_EXT2_COMPRESS_EXT)
39 .PHONY: rootfs-ext2-symlink
41 ifneq ($(BR2_TARGET_ROOTFS_EXT2_GEN),2)
42 ROOTFS_EXT2_POST_TARGETS += rootfs-ext2-symlink
43 endif
45 $(eval $(call ROOTFS_TARGET,ext2))