* [Buildroot] [PATCHv4] fs: allow filesystems to set the name of their output file
@ 2018-12-01 9:14 Yann E. MORIN
2018-12-01 10:59 ` Carlos Santos
2018-12-01 21:54 ` Thomas Petazzoni
0 siblings, 2 replies; 3+ messages in thread
From: Yann E. MORIN @ 2018-12-01 9:14 UTC (permalink / raw)
To: buildroot
From: Carlos Santos <casantos@datacom.com.br>
Some filesystems may want to tweak their output names, rather than using
the fixed "rootfs.foo" scheme. Add a ROOTFS_FOO_IMAGE_NAME variable for
this purpose.
Signed-off-by: Carlos Santos <casantos@datacom.com.br>
[yann.morin.1998 at free.fr: fix the patch]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
Changes v3 -> v4 (Yann):
- fix use of $(strip)
Changes v2->v3 (Carlos):
- Fix typo and use strip instead of qstrip, as spotted by Yann Morin.
Changes v1->v2 (Carlos):
- Prevent leading space when the filesystem gets 'imaginative', as
pointed by Yann Morin.
---
fs/common.mk | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/fs/common.mk b/fs/common.mk
index e4a6a4897b..20bf0941aa 100644
--- a/fs/common.mk
+++ b/fs/common.mk
@@ -70,6 +70,8 @@ rootfs-common-show-depends:
# all variable references except the arguments must be $$-quoted.
define inner-rootfs
+ROOTFS_$(2)_IMAGE_NAME ?= rootfs.$(1)
+ROOTFS_$(2)_FINAL_IMAGE_NAME = $$(strip $$(ROOTFS_$(2)_IMAGE_NAME))
ROOTFS_$(2)_DIR = $$(FS_DIR)/$(1)
ROOTFS_$(2)_TARGET_DIR = $$(ROOTFS_$(2)_DIR)/target
@@ -104,10 +106,10 @@ ROOTFS_$(2)_COMPRESS_EXT = .xz
ROOTFS_$(2)_COMPRESS_CMD = xz -9 -C crc32 -c
endif
-$$(BINARIES_DIR)/rootfs.$(1): ROOTFS=$(2)
-$$(BINARIES_DIR)/rootfs.$(1): FAKEROOT_SCRIPT=$$(ROOTFS_$(2)_DIR)/fakeroot
-$$(BINARIES_DIR)/rootfs.$(1): $$(ROOTFS_$(2)_DEPENDENCIES)
- @$$(call MESSAGE,"Generating root filesystem image rootfs.$(1)")
+$$(BINARIES_DIR)/$$(ROOTFS_$(2)_FINAL_IMAGE_NAME): ROOTFS=$(2)
+$$(BINARIES_DIR)/$$(ROOTFS_$(2)_FINAL_IMAGE_NAME): FAKEROOT_SCRIPT=$$(ROOTFS_$(2)_DIR)/fakeroot
+$$(BINARIES_DIR)/$$(ROOTFS_$(2)_FINAL_IMAGE_NAME): $$(ROOTFS_$(2)_DEPENDENCIES)
+ @$$(call MESSAGE,"Generating filesystem image $$(ROOTFS_$(2)_FINAL_IMAGE_NAME)")
rm -rf $$(ROOTFS_$(2)_DIR)
mkdir -p $$(ROOTFS_$(2)_DIR)
rsync -auH \
@@ -142,7 +144,7 @@ endif
rootfs-$(1)-show-depends:
@echo $$(ROOTFS_$(2)_DEPENDENCIES)
-rootfs-$(1): $$(BINARIES_DIR)/rootfs.$(1)
+rootfs-$(1): $$(BINARIES_DIR)/$$(ROOTFS_$(2)_FINAL_IMAGE_NAME)
.PHONY: rootfs-$(1) rootfs-$(1)-show-depends
--
2.14.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* [Buildroot] [PATCHv4] fs: allow filesystems to set the name of their output file
2018-12-01 9:14 [Buildroot] [PATCHv4] fs: allow filesystems to set the name of their output file Yann E. MORIN
@ 2018-12-01 10:59 ` Carlos Santos
2018-12-01 21:54 ` Thomas Petazzoni
1 sibling, 0 replies; 3+ messages in thread
From: Carlos Santos @ 2018-12-01 10:59 UTC (permalink / raw)
To: buildroot
> From: "Yann Morin" <yann.morin.1998@free.fr>
> To: "buildroot" <buildroot@buildroot.org>
> Cc: "DATACOM" <casantos@datacom.com.br>, "Yann Morin" <yann.morin.1998@free.fr>
> Sent: S?bado, 1 de dezembro de 2018 7:14:36
> Subject: [PATCHv4] fs: allow filesystems to set the name of their output file
> From: Carlos Santos <casantos@datacom.com.br>
>
> Some filesystems may want to tweak their output names, rather than using
> the fixed "rootfs.foo" scheme. Add a ROOTFS_FOO_IMAGE_NAME variable for
> this purpose.
>
> Signed-off-by: Carlos Santos <casantos@datacom.com.br>
> [yann.morin.1998 at free.fr: fix the patch]
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
>
> ---
> Changes v3 -> v4 (Yann):
> - fix use of $(strip)
Thanks!
--
Carlos Santos (Casantos) - DATACOM, P&D
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCHv4] fs: allow filesystems to set the name of their output file
2018-12-01 9:14 [Buildroot] [PATCHv4] fs: allow filesystems to set the name of their output file Yann E. MORIN
2018-12-01 10:59 ` Carlos Santos
@ 2018-12-01 21:54 ` Thomas Petazzoni
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2018-12-01 21:54 UTC (permalink / raw)
To: buildroot
Hello,
On Sat, 1 Dec 2018 10:14:36 +0100, Yann E. MORIN wrote:
> From: Carlos Santos <casantos@datacom.com.br>
>
> Some filesystems may want to tweak their output names, rather than using
> the fixed "rootfs.foo" scheme. Add a ROOTFS_FOO_IMAGE_NAME variable for
> this purpose.
>
> Signed-off-by: Carlos Santos <casantos@datacom.com.br>
> [yann.morin.1998 at free.fr: fix the patch]
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
>
> ---
> Changes v3 -> v4 (Yann):
> - fix use of $(strip)
> Changes v2->v3 (Carlos):
> - Fix typo and use strip instead of qstrip, as spotted by Yann Morin.
> Changes v1->v2 (Carlos):
> - Prevent leading space when the filesystem gets 'imaginative', as
> pointed by Yann Morin.
> ---
> fs/common.mk | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
Applied to next, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-12-01 21:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-01 9:14 [Buildroot] [PATCHv4] fs: allow filesystems to set the name of their output file Yann E. MORIN
2018-12-01 10:59 ` Carlos Santos
2018-12-01 21:54 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox