From: Michael Tremer Date: Tue, 9 Jul 2024 17:51:37 +0000 (+0000) Subject: images: Ensure that all mount points are created X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a4e0089049fc9dc2b068121679377243fde56de4;p=people%2Fms%2Fipfire-2.x.git images: Ensure that all mount points are created Signed-off-by: Michael Tremer --- diff --git a/lfs/Config b/lfs/Config index 6914298a1..baf2bdbc0 100644 --- a/lfs/Config +++ b/lfs/Config @@ -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) diff --git a/lfs/cdrom b/lfs/cdrom index 33dc31400..3681b0588 100644 --- 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) diff --git a/lfs/flash-images b/lfs/flash-images index 18745c6a8..367dc149a 100644 --- a/lfs/flash-images +++ b/lfs/flash-images @@ -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