]> git.ipfire.org Git - people/mfischer/ipfire-2.x.git/commitdiff
images: Ensure that all mount points are created
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 9 Jul 2024 17:51:37 +0000 (17:51 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 22 Jul 2024 15:21:20 +0000 (15:21 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/Config
lfs/cdrom
lfs/flash-images

index 6914298a1bfd8d590c65a45cdc7df2ca7a3e039d..baf2bdbc034506f13ea819b314369ae19d1cf9fb 100644 (file)
@@ -382,6 +382,9 @@ __COMPRESS = \
 COMPRESS_XZ   = $(call __COMPRESS,$(1),$(2),xz $(XZ_OPT))
 COMPRESS_ZSTD = $(call __COMPRESS,$(1),$(2),zstd $(ZSTD_OPT))
 
+# Helper function to make sure that we have all sorts of mountpoints in the images
+CREATE_MOUNTPOINTS = mkdir -pv $(1)/dev $(1)/proc $(1)/sys
+
 define PAK
        # Bringing the files to their right place.
        @rm -rf $(DIR_TMP_PAK) && mkdir -p $(DIR_TMP_PAK)
index 33dc31400be95f76b34e910da28875e8e665f1b5..3681b0588031d6dd2397dbad842087a6c81682cd 100644 (file)
--- a/lfs/cdrom
+++ b/lfs/cdrom
@@ -150,7 +150,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        # Copy all files that we want
        $(call COPY_FILES,$(DIR_SRC)/config/rootfiles/common,$(DIR_TMP)/root)
 
-       mkdir $(DIR_TMP)/root/sys
+       # Create mountpoints
+       $(call CREATE_MOUNTPOINTS,$(DIR_TMP)/root)
 
        # Create the archive
        $(call COMPRESS_ZSTD,$(DIR_TMP)/root,$(DIR_TMP)/cdrom/distro.img)
index 18745c6a83b661f0846f4cba6faec288a8d88ef8..367dc149afdfdd8b0a87fb6912f9739a68ef8101 100644 (file)
@@ -142,8 +142,11 @@ endif
        # Copy all files
        $(call COPY_FILES,$(DIR_SRC)/config/rootfiles/common,$(MNThdd))
 
+       # Create mount points
+       $(call CREATE_MOUNTPOINTS,$(MNThdd))
+
        -touch $(MNThdd)/lib/modules/$(KVER)-ipfire/modules.dep
-       mkdir $(MNThdd)/proc
+
        mount --bind /proc $(MNThdd)/proc
        mount --bind /dev  $(MNThdd)/dev
        mount --bind /sys  $(MNThdd)/sys