X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Ffs%2Fext2%2Fext2.mk;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Ffs%2Fext2%2Fext2.mk;h=cab66a5e2458cd231c9b6519a1f3b325d084eeb2;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/fs/ext2/ext2.mk b/cirros-testvm/src-cirros/buildroot-2015.05/fs/ext2/ext2.mk new file mode 100644 index 0000000..cab66a5 --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/fs/ext2/ext2.mk @@ -0,0 +1,44 @@ +################################################################################ +# +# Build the ext2 root filesystem image +# +################################################################################ + +EXT2_OPTS = -G $(BR2_TARGET_ROOTFS_EXT2_GEN) -R $(BR2_TARGET_ROOTFS_EXT2_REV) + +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 += -i $(BR2_TARGET_ROOTFS_EXT2_INODES) +endif + +ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)),0) +EXT2_OPTS += -r $(BR2_TARGET_ROOTFS_EXT2_RESBLKS) +endif + +# Not qstrip-ing the variable, because it may contain spaces, but we must +# qstrip it when checking. Furthermore, we need to further quote it, so +# that the quotes do not get eaten by the echo statement when creating the +# fakeroot script +ifneq ($(call qstrip,$(BR2_TARGET_ROOTFS_EXT2_LABEL)),) +EXT2_OPTS += -l '$(BR2_TARGET_ROOTFS_EXT2_LABEL)' +endif + +ROOTFS_EXT2_DEPENDENCIES = host-mke2img + +define ROOTFS_EXT2_CMD + PATH=$(BR_PATH) mke2img -d $(TARGET_DIR) $(EXT2_OPTS) -o $@ +endef + +rootfs-ext2-symlink: + ln -sf rootfs.ext2$(ROOTFS_EXT2_COMPRESS_EXT) $(BINARIES_DIR)/rootfs.ext$(BR2_TARGET_ROOTFS_EXT2_GEN)$(ROOTFS_EXT2_COMPRESS_EXT) + +.PHONY: rootfs-ext2-symlink + +ifneq ($(BR2_TARGET_ROOTFS_EXT2_GEN),2) +ROOTFS_EXT2_POST_TARGETS += rootfs-ext2-symlink +endif + +$(eval $(call ROOTFS_TARGET,ext2))