2013-06-06 23:54:13 +02:00
|
|
|
################################################################################
|
2002-04-26 13:45:55 +02:00
|
|
|
#
|
|
|
|
# Build the ext2 root filesystem image
|
|
|
|
#
|
2013-06-06 23:54:13 +02:00
|
|
|
################################################################################
|
2002-04-26 13:45:55 +02:00
|
|
|
|
2014-12-06 23:40:05 +01:00
|
|
|
EXT2_OPTS = -G $(BR2_TARGET_ROOTFS_EXT2_GEN) -R $(BR2_TARGET_ROOTFS_EXT2_REV)
|
2002-10-23 09:56:20 +02:00
|
|
|
|
2008-12-08 09:15:58 +01:00
|
|
|
EXT2_OPTS += -b $(BR2_TARGET_ROOTFS_EXT2_BLOCKS)
|
2005-01-23 11:53:06 +01:00
|
|
|
|
2005-02-12 05:32:17 +01:00
|
|
|
ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_INODES)),0)
|
2014-12-06 23:40:05 +01:00
|
|
|
EXT2_OPTS += -i $(BR2_TARGET_ROOTFS_EXT2_INODES)
|
2005-01-23 11:53:06 +01:00
|
|
|
endif
|
2015-10-29 21:10:36 +01:00
|
|
|
EXT2_OPTS += -I $(BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES)
|
2005-01-23 11:53:06 +01:00
|
|
|
|
2010-04-19 11:03:45 +02:00
|
|
|
ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)),0)
|
2014-12-06 23:40:05 +01:00
|
|
|
EXT2_OPTS += -r $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)
|
2005-01-23 11:53:06 +01:00
|
|
|
endif
|
|
|
|
|
2016-11-21 17:15:29 +01:00
|
|
|
# qstrip results in stripping consecutive spaces into a single one. So the
|
|
|
|
# variable is not qstrip-ed to preserve the integrity of the string value.
|
|
|
|
EXT2_LABEL := $(subst ",,$(BR2_TARGET_ROOTFS_EXT2_LABEL))
|
|
|
|
ifneq ($(EXT2_LABEL),)
|
|
|
|
EXT2_OPTS += -l "$(EXT2_LABEL)"
|
2014-12-06 23:40:06 +01:00
|
|
|
endif
|
|
|
|
|
2014-12-06 23:40:05 +01:00
|
|
|
ROOTFS_EXT2_DEPENDENCIES = host-mke2img
|
2005-01-23 11:53:06 +01:00
|
|
|
|
2010-03-10 00:15:15 +01:00
|
|
|
define ROOTFS_EXT2_CMD
|
2014-12-06 23:40:05 +01:00
|
|
|
PATH=$(BR_PATH) mke2img -d $(TARGET_DIR) $(EXT2_OPTS) -o $@
|
2010-03-10 00:15:15 +01:00
|
|
|
endef
|
2002-04-26 13:45:55 +02:00
|
|
|
|
2013-11-07 00:12:29 +01:00
|
|
|
rootfs-ext2-symlink:
|
2013-11-07 00:12:33 +01:00
|
|
|
ln -sf rootfs.ext2$(ROOTFS_EXT2_COMPRESS_EXT) $(BINARIES_DIR)/rootfs.ext$(BR2_TARGET_ROOTFS_EXT2_GEN)$(ROOTFS_EXT2_COMPRESS_EXT)
|
2013-11-07 00:12:29 +01:00
|
|
|
|
2015-04-12 18:37:46 +02:00
|
|
|
.PHONY: rootfs-ext2-symlink
|
|
|
|
|
2013-04-11 14:17:52 +02:00
|
|
|
ifneq ($(BR2_TARGET_ROOTFS_EXT2_GEN),2)
|
2013-11-07 00:12:29 +01:00
|
|
|
ROOTFS_EXT2_POST_TARGETS += rootfs-ext2-symlink
|
2013-04-11 14:17:52 +02:00
|
|
|
endif
|
|
|
|
|
2010-04-19 14:24:11 +02:00
|
|
|
$(eval $(call ROOTFS_TARGET,ext2))
|