[U-Boot] [PATCH 1/2] kbuild: make arch-dtbs target PHONY
Masahiro Yamada
yamada.masahiro at socionext.com
Wed Feb 27 02:36:03 UTC 2019
On Wed, Feb 27, 2019 at 11:17 AM Masahiro Yamada
<yamada.masahiro at socionext.com> wrote:
>
> On Wed, Feb 27, 2019 at 4:21 AM Stephen Warren <swarren at wwwdotorg.org> wrote:
> >
> > From: Stephen Warren <swarren at nvidia.com>
> >
> > Without this, the arch-dtbs target only gets evaluated when building
> > U-Boot the first time, not when re-building (incrementally building)
> > U-Boot. Thus incremental builds ignore changes to DTB files.
>
>
> Really?
>
> I tested "touch DT, then incremental build",
> and it correctly re-compiled device tree.
>
>
> I attached the log of the following build sequence:
>
> [1] make jetson-tk1_defconfig
> [2] make CROSS_COMPILE=arm-linux-gnueabihf-
> [3] touch arch/arm/dts/tegra124-jetson-tk1.dts
> [4] make CROSS_COMPILE=arm-linux-gnueabihf-
>
>
Hmm, OK. Understood.
The jetson DT was recompiled,
but the other tegra DT files were not.
So, I am fine with this patch,
but this Makefile is problematic already.
Looking into dts/Makefile,
I noticed there are two ways to descend into arch/*/dts.
$(DTB): $(dtb_depends)
ifeq ($(EXT_DTB),)
$(Q)$(MAKE) $(build)=$(ARCH_PATH) $@ <----- [1]
endif
$(Q)test -e $@ || ( \
echo >&2; \
echo >&2 "Device Tree Source is not correctly specified."; \
echo >&2 "Please define 'CONFIG_DEFAULT_DEVICE_TREE'"; \
echo >&2 "or build with 'DEVICE_TREE=<device_tree>' argument"; \
echo >&2; \
/bin/false)
arch-dtbs:
$(Q)$(MAKE) $(build)=$(ARCH_PATH) dtbs <----- [2]
[1] and [2] would cause a race in parallel building
and might produce an invalid DTB.
I do not understand commit 27cb7300ffda7a3f1581f0f5a2d3bfe59b97ad67
--
Best Regards
Masahiro Yamada
More information about the U-Boot
mailing list