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

powerpc/boot: Expose Kconfig symbols to wrapper

Currently the wrapper is built without including anything in
$(src)/include/, which means there are no CONFIG_ symbols defined.
This means the platform specific serial drivers were never enabled.

We now copy the definitions into the boot directory, so any C file can
now include autoconf.h to depend on configuration options.

Fixes: 866bfc75f40e ("powerpc: conditionally compile platform-specific serial drivers")
Signed-off-by: Joel Stanley <joel@jms.id.au>
[mpe: Fix to use $(objtree) to find autoconf.h]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Joel Stanley and committed by
Michael Ellerman
5e9dcb61 719736e1

+8 -1
+1
arch/powerpc/boot/.gitignore
··· 44 44 fdt_wip.c 45 45 libfdt.h 46 46 libfdt_internal.h 47 + autoconf.h 47 48
+6 -1
arch/powerpc/boot/Makefile
··· 197 197 $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds : $(obj)/%: $(srctree)/$(src)/%.S 198 198 $(Q)cp $< $@ 199 199 200 + $(obj)/serial.c: $(obj)/autoconf.h 201 + 202 + $(obj)/autoconf.h: $(obj)/%: $(objtree)/include/generated/% 203 + $(Q)cp $< $@ 204 + 200 205 clean-files := $(zlib-) $(zlibheader-) $(zliblinuxheader-) \ 201 206 $(zlib-decomp-) $(libfdt) $(libfdtheader) \ 202 - empty.c zImage.coff.lds zImage.ps3.lds zImage.lds 207 + autoconf.h empty.c zImage.coff.lds zImage.ps3.lds zImage.lds 203 208 204 209 quiet_cmd_bootcc = BOOTCC $@ 205 210 cmd_bootcc = $(BOOTCC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $<
+1
arch/powerpc/boot/serial.c
··· 18 18 #include "stdio.h" 19 19 #include "io.h" 20 20 #include "ops.h" 21 + #include "autoconf.h" 21 22 22 23 static int serial_open(void) 23 24 {