mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-25 20:26:34 +00:00
fs/common: allow filesystems to set the name of their output file
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@free.fr: fix the patch] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
parent
8ee0e2e17b
commit
21c6fb2589
12
fs/common.mk
12
fs/common.mk
@ -107,6 +107,8 @@ rootfs-common-show-depends:
|
|||||||
# all variable references except the arguments must be $$-quoted.
|
# all variable references except the arguments must be $$-quoted.
|
||||||
define inner-rootfs
|
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)_DIR = $$(FS_DIR)/$(1)
|
||||||
ROOTFS_$(2)_TARGET_DIR = $$(ROOTFS_$(2)_DIR)/target
|
ROOTFS_$(2)_TARGET_DIR = $$(ROOTFS_$(2)_DIR)/target
|
||||||
|
|
||||||
@ -141,10 +143,10 @@ ROOTFS_$(2)_COMPRESS_EXT = .xz
|
|||||||
ROOTFS_$(2)_COMPRESS_CMD = xz -9 -C crc32 -c
|
ROOTFS_$(2)_COMPRESS_CMD = xz -9 -C crc32 -c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$$(BINARIES_DIR)/rootfs.$(1): ROOTFS=$(2)
|
$$(BINARIES_DIR)/$$(ROOTFS_$(2)_FINAL_IMAGE_NAME): ROOTFS=$(2)
|
||||||
$$(BINARIES_DIR)/rootfs.$(1): FAKEROOT_SCRIPT=$$(ROOTFS_$(2)_DIR)/fakeroot
|
$$(BINARIES_DIR)/$$(ROOTFS_$(2)_FINAL_IMAGE_NAME): FAKEROOT_SCRIPT=$$(ROOTFS_$(2)_DIR)/fakeroot
|
||||||
$$(BINARIES_DIR)/rootfs.$(1): $$(ROOTFS_$(2)_DEPENDENCIES)
|
$$(BINARIES_DIR)/$$(ROOTFS_$(2)_FINAL_IMAGE_NAME): $$(ROOTFS_$(2)_DEPENDENCIES)
|
||||||
@$$(call MESSAGE,"Generating root filesystem image rootfs.$(1)")
|
@$$(call MESSAGE,"Generating filesystem image $$(ROOTFS_$(2)_FINAL_IMAGE_NAME)")
|
||||||
mkdir -p $$(@D)
|
mkdir -p $$(@D)
|
||||||
rm -rf $$(ROOTFS_$(2)_DIR)
|
rm -rf $$(ROOTFS_$(2)_DIR)
|
||||||
mkdir -p $$(ROOTFS_$(2)_DIR)
|
mkdir -p $$(ROOTFS_$(2)_DIR)
|
||||||
@ -166,7 +168,7 @@ endif
|
|||||||
rootfs-$(1)-show-depends:
|
rootfs-$(1)-show-depends:
|
||||||
@echo $$(ROOTFS_$(2)_DEPENDENCIES)
|
@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
|
.PHONY: rootfs-$(1) rootfs-$(1)-show-depends
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user