Skip to content

Commit eb59d4c

Browse files
masahir0ymaddy-kerneldev
authored andcommitted
powerpc: use always-y instead of extra-y in Makefiles
The extra-y syntax is planned for deprecation because it is similar to always-y. When building the boot wrapper, always-y and extra-y are equivalent. Use always-y instead. In arch/powerpc/kernel/Makefile, I added ifdef KBUILD_BUILTIN to keep the current behavior: prom_init_check is skipped when building only modular objects. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20250602163302.478765-1-masahiroy@kernel.org
1 parent 8b5d86a commit eb59d4c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

arch/powerpc/boot/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,13 @@ $(obj)/wrapper.a: $(obj-wlib) FORCE
243243
hostprogs := addnote hack-coff mktree
244244

245245
targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a) zImage.lds
246-
extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \
246+
always-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \
247247
$(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds
248248

249249
dtstree := $(src)/dts
250250

251251
wrapper := $(src)/wrapper
252-
wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \
252+
wrapperbits := $(always-y) $(addprefix $(obj)/,addnote hack-coff mktree) \
253253
$(wrapper) FORCE
254254

255255
#############
@@ -456,7 +456,7 @@ WRAPPER_DTSDIR := /usr/lib/kernel-wrapper/dts
456456
WRAPPER_BINDIR := /usr/sbin
457457
INSTALL := install
458458

459-
extra-installed := $(patsubst $(obj)/%, $(DESTDIR)$(WRAPPER_OBJDIR)/%, $(extra-y))
459+
extra-installed := $(patsubst $(obj)/%, $(DESTDIR)$(WRAPPER_OBJDIR)/%, $(always-y))
460460
hostprogs-installed := $(patsubst %, $(DESTDIR)$(WRAPPER_BINDIR)/%, $(hostprogs))
461461
wrapper-installed := $(DESTDIR)$(WRAPPER_BINDIR)/wrapper
462462
dts-installed := $(patsubst $(dtstree)/%, $(DESTDIR)$(WRAPPER_DTSDIR)/%, $(wildcard $(dtstree)/*.dts))

arch/powerpc/kernel/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,9 @@ obj-$(CONFIG_ALTIVEC) += vector.o
199199

200200
obj-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE) += prom_init.o
201201
obj64-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE) += prom_entry_64.o
202-
extra-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE) += prom_init_check
202+
ifdef KBUILD_BUILTIN
203+
always-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE) += prom_init_check
204+
endif
203205

204206
obj-$(CONFIG_PPC64) += $(obj64-y)
205207
obj-$(CONFIG_PPC32) += $(obj32-y)

0 commit comments

Comments
 (0)