Skip to contentSkip to conversation

powerpc/boot: add DTB to 'targets'

PATCH In review Masahiro Yamada 2 participants 2 messages Jul 13, 2020 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/boot: add DTB to 'targets'

PowerPC always re-builds DTB even if nothing has been changed.

As for other architectures, arch/*/boot/dts/Makefile builds DTB by using the dtb-y syntax.

In contrast, arch/powerpc/boot/dts/(fsl/)Makefile does nothing unless CONFIG_OF_ALL_DTBS is defined. Instead, arch/powerpc/boot/Makefile builds DTB on demand. You need to add DTB to 'targets' explicitly so .*.cmd files are included.

---

I want to apply this to kbuild tree because this is needed to fix the build error caused by another kbuild patch:

https://lkml.org/lkml/2020/7/7/134

 arch/powerpc/boot/Makefile | 2 ++
 1 file changed, 2 insertions(+)
arch/powerpc/boot/Makefile +2 -0
index 63d7456b9518..8792323707fd 100644
@@ -366,6 +366,8 @@ initrd-y := $(patsubst zImage%, zImage.initrd%, \
 		$(patsubst treeImage%, treeImage.initrd%, $(image-y)))))
 initrd-y := $(filter-out $(image-y), $(initrd-y))
 targets	+= $(image-y) $(initrd-y)
+targets += $(foreach x, dtbImage uImage cuImage simpleImage treeImage, \
+		$(patsubst $(x).%, dts/%.dtb, $(filter $(x).%, $(image-y))))
 
 $(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz
 
Signature · 1 line
2.25.1
reviewer Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Masahiro Yamada

PowerPC always re-builds DTB even if nothing has been changed.

As for other architectures, arch/*/boot/dts/Makefile builds DTB by using the dtb-y syntax.

In contrast, arch/powerpc/boot/dts/(fsl/)Makefile does nothing unless CONFIG_OF_ALL_DTBS is defined. Instead, arch/powerpc/boot/Makefile builds DTB on demand. You need to add DTB to 'targets' explicitly so .*.cmd files are included.

Quoted 7 lines

---

I want to apply this to kbuild tree because this is needed to fix the build error caused by another kbuild patch:

https://lkml.org/lkml/2020/7/7/134

OK.

cheers

Quoted 15 lines
arch/powerpc/boot/Makefile +2 -0
index 63d7456b9518..8792323707fd 100644
@@ -366,6 +366,8 @@ initrd-y := $(patsubst zImage%, zImage.initrd%, \
 		$(patsubst treeImage%, treeImage.initrd%, $(image-y)))))
 initrd-y := $(filter-out $(image-y), $(initrd-y))
 targets	+= $(image-y) $(initrd-y)
+targets += $(foreach x, dtbImage uImage cuImage simpleImage treeImage, \
+		$(patsubst $(x).%, dts/%.dtb, $(filter $(x).%, $(image-y))))
 
 $(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz
 
Signature · 1 line
2.25.1