kumquat-buildroot/fs/ext2/ext2.mk
Peter Korsgaard fb951b9342 fs/ext2: fix blocks/inodes calculation
With the ROOTFS_TARGET conversion, EXT2_OPTS gets evaluated very early
(before TARGET_DIR is populated with files), so the calculated
blocks/inodes numbers are wrong.

Fix it by moving the calculation to a shell script wrapper around
genext2fs, so it only gets executed just before genext2fs runs.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-04-19 14:33:14 +02:00

32 lines
757 B
Makefile

#############################################################
#
# Build the ext2 root filesystem image
#
#############################################################
EXT2_OPTS :=
ifeq ($(BR2_TARGET_ROOTFS_EXT2_SQUASH),y)
EXT2_OPTS += -U
endif
ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_BLOCKS)),0)
EXT2_OPTS += -b $(BR2_TARGET_ROOTFS_EXT2_BLOCKS)
endif
ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_INODES)),0)
EXT2_OPTS += -N $(BR2_TARGET_ROOTFS_EXT2_INODES)
endif
ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)),0)
EXT2_OPTS += -m $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)
endif
ROOTFS_EXT2_DEPENDENCIES = host-genext2fs
define ROOTFS_EXT2_CMD
PATH=$(TARGET_PATH) fs/ext2/genext2fs.sh -d $(TARGET_DIR) $(EXT2_OPTS) $$@
endef
$(eval $(call ROOTFS_TARGET,ext2))