mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
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: 866bfc75f4
("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>
This commit is contained in:
parent
719736e1cc
commit
5e9dcb6188
3 changed files with 8 additions and 1 deletions
1
arch/powerpc/boot/.gitignore
vendored
1
arch/powerpc/boot/.gitignore
vendored
|
@ -44,4 +44,5 @@ fdt_sw.c
|
|||
fdt_wip.c
|
||||
libfdt.h
|
||||
libfdt_internal.h
|
||||
autoconf.h
|
||||
|
||||
|
|
|
@ -197,9 +197,14 @@ $(obj)/empty.c:
|
|||
$(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds : $(obj)/%: $(srctree)/$(src)/%.S
|
||||
$(Q)cp $< $@
|
||||
|
||||
$(obj)/serial.c: $(obj)/autoconf.h
|
||||
|
||||
$(obj)/autoconf.h: $(obj)/%: $(objtree)/include/generated/%
|
||||
$(Q)cp $< $@
|
||||
|
||||
clean-files := $(zlib-) $(zlibheader-) $(zliblinuxheader-) \
|
||||
$(zlib-decomp-) $(libfdt) $(libfdtheader) \
|
||||
empty.c zImage.coff.lds zImage.ps3.lds zImage.lds
|
||||
autoconf.h empty.c zImage.coff.lds zImage.ps3.lds zImage.lds
|
||||
|
||||
quiet_cmd_bootcc = BOOTCC $@
|
||||
cmd_bootcc = $(BOOTCC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $<
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "stdio.h"
|
||||
#include "io.h"
|
||||
#include "ops.h"
|
||||
#include "autoconf.h"
|
||||
|
||||
static int serial_open(void)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue