Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

x86/kbuild: Incorporate boot/startup/ via Kbuild makefile

Using core-y is not the correct way to get kbuild to descend into
arch/x86/boot/startup. For instance, building an individual object does
not work as expected when the pattern rule is local to the Makefile

$ make arch/x86/boot/startup/map_kernel.pi.o
GEN Makefile
CALL /home/ardb/linux/scripts/checksyscalls.sh
DESCEND objtool
INSTALL libsubcmd_headers
make[3]: *** No rule to make target 'arch/x86/boot/startup/map_kernel.pi.o'. Stop.
make[2]: *** [/home/ardb/linux/scripts/Makefile.build:461: arch/x86] Error 2
make[1]: *** [/home/ardb/linux/Makefile:2011: .] Error 2
make: *** [/home/ardb/linux/Makefile:248: __sub-make] Error 2

So use obj-y from arch.x86/Kbuild instead, which makes things work as
expected.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/20250828102202.1849035-42-ardb+git@google.com

authored by

Ard Biesheuvel and committed by
Borislav Petkov (AMD)
749627c3 2578560d

+2 -1
+2
arch/x86/Kbuild
··· 3 3 # Branch profiling isn't noinstr-safe. Disable it for arch/x86/* 4 4 subdir-ccflags-$(CONFIG_TRACE_BRANCH_PROFILING) += -DDISABLE_BRANCH_PROFILING 5 5 6 + obj-y += boot/startup/ 7 + 6 8 obj-$(CONFIG_ARCH_HAS_CC_PLATFORM) += coco/ 7 9 8 10 obj-y += entry/
-1
arch/x86/Makefile
··· 286 286 ### 287 287 # Kernel objects 288 288 289 - core-y += arch/x86/boot/startup/ 290 289 libs-y += arch/x86/lib/ 291 290 292 291 # drivers-y are linked after core-y