mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 06:06:32 +00:00
fs: prepare temp directory before running PRE_GEN hooks
Some filesystems have PRE_GEN hooks that create a directory structure under the temporary directory. For example, iso9660 will create a sub-directory where it stores the kernel (in case of initramfs or initrd). So, we must run the PRE_GEN hooks after we cleanup/create the temporary directory. Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/42835965 https://gitlab.com/buildroot.org/buildroot/-/jobs/42835967 Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
a59e4b0dd8
commit
423b01ecc2
@ -69,9 +69,9 @@ endif
|
|||||||
|
|
||||||
$$(BINARIES_DIR)/rootfs.$(1): target-finalize $$(ROOTFS_$(2)_DEPENDENCIES)
|
$$(BINARIES_DIR)/rootfs.$(1): target-finalize $$(ROOTFS_$(2)_DEPENDENCIES)
|
||||||
@$$(call MESSAGE,"Generating root filesystem image rootfs.$(1)")
|
@$$(call MESSAGE,"Generating root filesystem image rootfs.$(1)")
|
||||||
$$(foreach hook,$$(ROOTFS_$(2)_PRE_GEN_HOOKS),$$(call $$(hook))$$(sep))
|
|
||||||
rm -rf $(FS_DIR)
|
rm -rf $(FS_DIR)
|
||||||
mkdir -p $(FS_DIR)
|
mkdir -p $(FS_DIR)
|
||||||
|
$$(foreach hook,$$(ROOTFS_$(2)_PRE_GEN_HOOKS),$$(call $$(hook))$$(sep))
|
||||||
echo '#!/bin/sh' > $$(FAKEROOT_SCRIPT)
|
echo '#!/bin/sh' > $$(FAKEROOT_SCRIPT)
|
||||||
echo "set -e" >> $$(FAKEROOT_SCRIPT)
|
echo "set -e" >> $$(FAKEROOT_SCRIPT)
|
||||||
echo "chown -h -R 0:0 $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT)
|
echo "chown -h -R 0:0 $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user