linux: ensure images/ exist before creatign files there
PATCH 1/1 linux: ensure images/ exist before creatign 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.
--- linux/linux.mk | 1 + 1 file changed, 1 insertion(+)
linux/linux.mk +1 -0
@@ -311,6 +311,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)
Signature · 1 line
2.14.1
PATCH 1/1 linux: ensure images/ exist before creatign files there
All,
Quoted 14 lines · Yann E. MORIN
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_CMDSsteps.However, the linux build is not a
_INSTALL_IMAGES_CMDSstep, so there is no guarantee that images/ already exist at that time.
Quoted 6 lines
Fix that by explicitly creating images/ before touching the dummy cpio.
Reported-by Matthew Weber <[email protected]>Signed-off-by "Yann E. MORIN" <[email protected]>Cc Matthew Weber <[email protected]>Cc Thomas Petazzoni <[email protected]>
Thanks Yann!
Thomas Petazzoni
AppliedPATCH 1/1 linux: ensure images/ exist before creatign files there
In reply to Yann E. MORINHello,
Quoted 15 lines · Yann E. MORIN
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_CMDSsteps.However, the linux build is not a
_INSTALL_IMAGES_CMDSstep, so there is no guarantee that images/ already exist at that time.Fix that by explicitly creating images/ before touching the dummy cpio.
Quoted 7 lines
Reported-by Matthew Weber <[email protected]>Signed-off-by "Yann E. MORIN" <[email protected]>Cc Matthew Weber <[email protected]>Cc Thomas Petazzoni <[email protected]>--- linux/linux.mk | 1 + 1 file changed, 1 insertion(+)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 linux: ensure images/ exist before creatign files there
In reply to Yann E. MORINQuoted 15 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
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_CMDSsteps.However, the linux build is not a
_INSTALL_IMAGES_CMDSstep, so there is no guarantee that images/ already exist at that time.
Quoted 6 lines
Fix that by explicitly creating images/ before touching the dummy cpio.
Reported-by Matthew Weber <[email protected]>Signed-off-by "Yann E. MORIN" <[email protected]>Cc Matthew Weber <[email protected]>Cc Thomas Petazzoni <[email protected]>
Committed to 2018.02.x, 2018.08.x and 2018.11.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard