kbuild: remove obj-dtb-y, pbl-dtb-y, lwl-dtb-y syntax
The embedded DTBs are compiled by the chain of pattern rules as follows:

  %.dts -> %.dtb -> %.dtb.S -> %.dtb.o       for barebox proper
  %.dts -> %.dtb -> %.dtb.S -> %.dtb.pbl.o   for pbl

Barebox introduced {obj,pbl,lwl}-dtb-y syntax to put the intermediate
files into extra-y. The purposes of doing so were:

 [1] prevent GNU Make from deleting the intermediate files
 [2] include .*.cmd files

In contrast, Linux does not use a special syntax for embedding DTBs
into the kernel.

For example, as you see in arch/sh/boot/dts/Makefile of Linux 5.6,

   obj-y += <basename>.dtb.o

... just works.

This is because scripts/Kbuild.include specifies .SECONDARY to cater
to [1], and scripts/Makefile.build adds the intermediates to 'targets'
to deal with [2].

Barebox had already imported the same code from Linux, so you can use
obj-y instead of obj-dtb-y, like Linux.

pbl-dtb-y and lwl-dtb-y are barebox-specific cases, so I added the
%.dtb.pbl.o pattern to intermediate_targets.

Going forward, please use obj-y, pbl-y, or lwl-y.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent ff04739 commit e4e36abf1cf104f5853ee828332ad28f2c9f801b
@Masahiro Yamada Masahiro Yamada authored on 19 May 2020
Sascha Hauer committed on 20 May 2020
Showing 6 changed files
View
arch/arm/dts/Makefile
View
arch/kvx/dts/Makefile
View
arch/mips/dts/Makefile
View
arch/riscv/dts/Makefile
View
scripts/Makefile.build
View
scripts/Makefile.lib