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
|
|
|
|
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))
|
2017-07-04 00:50:58 +02:00
|
|
|
#" Syntax highlighting... :-/ )
|
|
|
|
|
2017-07-04 00:51:00 +02:00
|
|
|
EXT2_OPTS = \
|
|
|
|
-G $(BR2_TARGET_ROOTFS_EXT2_GEN) \
|
|
|
|
-R $(BR2_TARGET_ROOTFS_EXT2_REV) \
|
2017-07-04 00:51:01 +02:00
|
|
|
-B 1024 \
|
2017-07-04 00:51:00 +02:00
|
|
|
-b $(BR2_TARGET_ROOTFS_EXT2_BLOCKS) \
|
|
|
|
-i $(BR2_TARGET_ROOTFS_EXT2_INODES) \
|
|
|
|
-I $(BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES) \
|
|
|
|
-r $(BR2_TARGET_ROOTFS_EXT2_RESBLKS) \
|
|
|
|
-l "$(EXT2_LABEL)"
|
2014-12-06 23:40:06 +01:00
|
|
|
|
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))
|