diff mbox

[OpenWrt-Devel] image.mk: Add NOTPARALLEL flag to fix parallel build breakage

Message ID 5633E453.9060106@openwrt.org
State RFC
Headers show

Commit Message

Felix Fietkau Oct. 30, 2015, 9:42 p.m. UTC
On 2015-10-30 22:20, Petr Štetiar wrote:
> Felix Fietkau <nbd@openwrt.org> [2015-10-30 16:14:49]:
> 
> Hi,
> 
>> I'd like to find out where the real bug is - what target are you
>> building where you hit this error?
> 
> it's imx6 target, but probably kirkwood, lantiq, mxs and oxnas are affected
> also (just by guessing by output from 'git grep Image/InstallKernel/Template').
> 
> I think, that the problem is lying in include/image.mk:
> 
> 556   kernel_prepare: mkfs_prepare
> 557         $(call Image/BuildKernel)
> 558         $(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(if $(IB),,$(call Image/BuildKernel/Initramfs)))
> 559         $(call Image/InstallKernel)
> 560 
> 561   $(foreach device,$(TARGET_DEVICES),$(call Device,$(device)))
> 562   $(foreach fs,$(TARGET_FILESYSTEMS) $(fs-subtypes-y),$(call BuildImage/mkfs,$(fs)))
> 
> where probably Image/InstallKernel is run in parallel with BuildImage/mkfs and
> Image/InstallKernel then touches $(TARGET_DIR)/boot which Image/mkfs/targz is
> compressing in another job.
Does this patch fix things for you?
---

Comments

Petr Štetiar Oct. 30, 2015, 10 p.m. UTC | #1
Felix Fietkau <nbd@openwrt.org> [2015-10-30 22:42:43]:

> Does this patch fix things for you?

It does, thanks!

> ---
> --- a/include/image.mk
> +++ b/include/image.mk
> @@ -282,7 +282,7 @@ endef
>  define BuildImage/mkfs
>    install: mkfs-$(1)
>    .PHONY: mkfs-$(1)
> -  mkfs-$(1): mkfs_prepare
> +  mkfs-$(1): kernel_prepare
>  	$(Image/mkfs/$(1))
>  	$(call Build/mkfs/default,$(1))
>  	$(call Build/mkfs/$(1),$(1))

-- ynezz
diff mbox

Patch

--- a/include/image.mk
+++ b/include/image.mk
@@ -282,7 +282,7 @@  endef
 define BuildImage/mkfs
   install: mkfs-$(1)
   .PHONY: mkfs-$(1)
-  mkfs-$(1): mkfs_prepare
+  mkfs-$(1): kernel_prepare
 	$(Image/mkfs/$(1))
 	$(call Build/mkfs/default,$(1))
 	$(call Build/mkfs/$(1),$(1))