Message ID | 20181009232803.15072-2-joel@jms.id.au (mailing list archive) |
---|---|
State | Accepted |
Commit | 5e9dcb6188a40e604e66dc30fab30c2be89aa1cc |
Headers | show |
Series | powerpc/boot: Fix serial output in boot wrapper | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | next/apply_patch Successfully applied |
snowpatch_ozlabs/checkpatch | success | Test checkpatch on branch next |
Joel Stanley <joel@jms.id.au> writes: > diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile > index 0fb96c26136f..eeed74e0dfca 100644 > --- a/arch/powerpc/boot/Makefile > +++ b/arch/powerpc/boot/Makefile > @@ -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)/%: $(srctree)/include/generated/% > + $(Q)cp $< $@ > + This gives me: make[2]: *** No rule to make target '../include/generated/autoconf.h', needed by 'arch/powerpc/boot/autoconf.h'. Stop. The ../ is $(srctree). cheers
Michael Ellerman <mpe@ellerman.id.au> writes: > Joel Stanley <joel@jms.id.au> writes: >> diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile >> index 0fb96c26136f..eeed74e0dfca 100644 >> --- a/arch/powerpc/boot/Makefile >> +++ b/arch/powerpc/boot/Makefile >> @@ -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)/%: $(srctree)/include/generated/% >> + $(Q)cp $< $@ >> + > > This gives me: > make[2]: *** No rule to make target '../include/generated/autoconf.h', needed by 'arch/powerpc/boot/autoconf.h'. Stop. > > The ../ is $(srctree). Seems autoconf.h is in objtree: ~/linux$ make O=build prepare ... ~/linux$ find . -name autoconf.h ./drivers/staging/rtl8723bs/include/autoconf.h ./tools/testing/radix-tree/generated/autoconf.h ./build/include/generated/autoconf.h So I'll fix that up. cheers
On Thu, 11 Oct 2018 at 10:32, Michael Ellerman <mpe@ellerman.id.au> wrote: > > Michael Ellerman <mpe@ellerman.id.au> writes: > > Joel Stanley <joel@jms.id.au> writes: > >> diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile > >> index 0fb96c26136f..eeed74e0dfca 100644 > >> --- a/arch/powerpc/boot/Makefile > >> +++ b/arch/powerpc/boot/Makefile > >> @@ -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)/%: $(srctree)/include/generated/% > >> + $(Q)cp $< $@ > >> + > > > > This gives me: > > make[2]: *** No rule to make target '../include/generated/autoconf.h', needed by 'arch/powerpc/boot/autoconf.h'. Stop. > > > > The ../ is $(srctree). > > Seems autoconf.h is in objtree: > > ~/linux$ make O=build prepare > ... > ~/linux$ find . -name autoconf.h > ./drivers/staging/rtl8723bs/include/autoconf.h > ./tools/testing/radix-tree/generated/autoconf.h > ./build/include/generated/autoconf.h Ah. That's obvious now that you point it out. Obviously myself and 0day do in-tree builds. > So I'll fix that up. Thanks!
On Tue, 2018-10-09 at 23:28:02 UTC, Joel Stanley wrote: > 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> Series applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/5e9dcb6188a40e604e66dc30fab30c cheers
diff --git a/arch/powerpc/boot/.gitignore b/arch/powerpc/boot/.gitignore index f92d0530ceb1..32034a0cc554 100644 --- a/arch/powerpc/boot/.gitignore +++ b/arch/powerpc/boot/.gitignore @@ -44,4 +44,5 @@ fdt_sw.c fdt_wip.c libfdt.h libfdt_internal.h +autoconf.h diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 0fb96c26136f..eeed74e0dfca 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -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)/%: $(srctree)/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 $@ $< diff --git a/arch/powerpc/boot/serial.c b/arch/powerpc/boot/serial.c index 48e3743faedf..f045f8494bf9 100644 --- a/arch/powerpc/boot/serial.c +++ b/arch/powerpc/boot/serial.c @@ -18,6 +18,7 @@ #include "stdio.h" #include "io.h" #include "ops.h" +#include "autoconf.h" static int serial_open(void) {
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> --- arch/powerpc/boot/.gitignore | 1 + arch/powerpc/boot/Makefile | 7 ++++++- arch/powerpc/boot/serial.c | 1 + 3 files changed, 8 insertions(+), 1 deletion(-)