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
|
|
|
|
2005-02-12 05:32:17 +01:00
|
|
|
EXT2_OPTS :=
|
2002-10-23 09:56:20 +02:00
|
|
|
|
2005-02-12 05:32:17 +01:00
|
|
|
ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_BLOCKS)),0)
|
2008-12-08 09:15:58 +01:00
|
|
|
EXT2_OPTS += -b $(BR2_TARGET_ROOTFS_EXT2_BLOCKS)
|
2005-01-23 11:53:06 +01:00
|
|
|
endif
|
|
|
|
|
2005-02-12 05:32:17 +01:00
|
|
|
ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_INODES)),0)
|
2008-12-08 09:15:58 +01:00
|
|
|
EXT2_OPTS += -N $(BR2_TARGET_ROOTFS_EXT2_INODES)
|
2005-01-23 11:53:06 +01:00
|
|
|
endif
|
|
|
|
|
2010-04-19 11:03:45 +02:00
|
|
|
ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)),0)
|
2008-12-08 09:15:58 +01:00
|
|
|
EXT2_OPTS += -m $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)
|
2005-01-23 11:53:06 +01:00
|
|
|
endif
|
|
|
|
|
2013-04-11 14:17:51 +02:00
|
|
|
ROOTFS_EXT2_DEPENDENCIES = host-genext2fs host-e2fsprogs
|
|
|
|
|
2013-04-11 14:17:53 +02:00
|
|
|
EXT2_ENV = GEN=$(BR2_TARGET_ROOTFS_EXT2_GEN)
|
|
|
|
EXT2_ENV += REV=$(BR2_TARGET_ROOTFS_EXT2_REV)
|
2005-01-23 11:53:06 +01:00
|
|
|
|
2010-03-10 00:15:15 +01:00
|
|
|
define ROOTFS_EXT2_CMD
|
2013-04-11 14:17:51 +02:00
|
|
|
PATH=$(TARGET_PATH) $(EXT2_ENV) fs/ext2/genext2fs.sh -d $(TARGET_DIR) $(EXT2_OPTS) $@
|
2010-03-10 00:15:15 +01:00
|
|
|
endef
|
2002-04-26 13:45:55 +02:00
|
|
|
|
2013-04-11 14:17:52 +02:00
|
|
|
define ROOTFS_EXT2_HOOK_SYMLINK
|
|
|
|
ln -sf rootfs.ext2 $(BINARIES_DIR)/rootfs.ext$(BR2_TARGET_ROOTFS_EXT2_GEN)
|
|
|
|
endef
|
|
|
|
ifneq ($(BR2_TARGET_ROOTFS_EXT2_GEN),2)
|
|
|
|
ROOTFS_EXT2_POST_GEN_HOOKS += ROOTFS_EXT2_HOOK_SYMLINK
|
|
|
|
endif
|
|
|
|
|
2010-04-19 14:24:11 +02:00
|
|
|
$(eval $(call ROOTFS_TARGET,ext2))
|