aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Yann E. MORIN <yann.morin.1998@free.fr>2018-12-03 20:12:19 +0100
committerGravatar Peter Korsgaard <peter@korsgaard.com>2018-12-16 16:01:21 +0100
commit21a231e10425be0429643f904f9f441c92ed9fc0 (patch)
treef95efc5516448aced6c5b3350501831e8ac1a978
parent46433b998a419566125b57e709ee0afa776ac585 (diff)
downloadbuildroot-21a231e10425be0429643f904f9f441c92ed9fc0.tar.gz
buildroot-21a231e10425be0429643f904f9f441c92ed9fc0.tar.bz2
linux: ensure images/ exist before creating files there
When using an initramfs, on the first-pass build, we create a dummy cpio so that the build succeeeds. The real cpio will come later, and we'll do a second-pass build to use the actual cpio. However, when we touch that dummy cpio, the images/ directory may not yet exist, since commit d0f4f95e39 (Makefile: rework main directory creation logic) removed its creation at the begining of the build, to only at the moment we need it, i.e. during the *_INSTALL_IMAGES_CMDS steps. However, the linux build is not a _INSTALL_IMAGES_CMDS step, so there is no guarantee that images/ already exist at that time. Fix that by explicitly creating images/ before touching the dummy cpio. Reported-by: Matthew Weber <matthew.weber@rockwellcollins.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Matthew Weber <matthew.weber@rockwellcollins.com> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Reviewed-by: Matthew Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> (cherry picked from commit 524fb10bbe2038ea7ca45493193073d31732d1de) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rw-r--r--linux/linux.mk1
1 files changed, 1 insertions, 0 deletions
diff --git a/linux/linux.mk b/linux/linux.mk
index 38a67edcd1..f1a34d4fe0 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -278,6 +278,7 @@ define LINUX_KCONFIG_FIXUP_CMDS
# replaced later by the real cpio archive, and the kernel will be
# rebuilt using the linux-rebuild-with-initramfs target.
$(if $(BR2_TARGET_ROOTFS_INITRAMFS),
+ mkdir -p $(BINARIES_DIR)
touch $(BINARIES_DIR)/rootfs.cpio
$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,"$${BR_BINARIES_DIR}/rootfs.cpio",$(@D)/.config)
$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_UID,0,$(@D)/.config)