From c83fa6b0af75650724208598628058802d2f7192 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Sat, 6 Dec 2014 23:40:06 +0100 Subject: [PATCH] fs/ext2: add option to specify a filesystem label MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Filesystems of the ext familly can carry a filesystem label. Add an option for the user to specify such a label. Signed-off-by: "Yann E. MORIN" Cc: Thomas Petazzoni Cc: Károly Kasza Tested-by: Karoly Kasza Reviewed-by: Karoly Kasza Reviewed-by: Thomas Petazzoni Tested-by: Thomas Petazzoni Signed-off-by: Thomas Petazzoni --- fs/ext2/Config.in | 3 +++ fs/ext2/ext2.mk | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/fs/ext2/Config.in b/fs/ext2/Config.in index 8751b621e..5b1cd0cd9 100644 --- a/fs/ext2/Config.in +++ b/fs/ext2/Config.in @@ -41,6 +41,9 @@ config BR2_TARGET_ROOTFS_EXT2_REV default 0 if BR2_TARGET_ROOTFS_EXT2_2r0 default 1 if !BR2_TARGET_ROOTFS_EXT2_2r0 +config BR2_TARGET_ROOTFS_EXT2_LABEL + string "filesystem label" + config BR2_TARGET_ROOTFS_EXT2_BLOCKS int "size in blocks (leave at 0 for auto calculation)" default 0 diff --git a/fs/ext2/ext2.mk b/fs/ext2/ext2.mk index 96b7a4a7f..1cac72e0d 100644 --- a/fs/ext2/ext2.mk +++ b/fs/ext2/ext2.mk @@ -18,6 +18,14 @@ 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