From: Joel Stanley <joel@jms.id.au> Date: 2018-10-09 23:30:37
While doing some work on the wrapper I noticed we no longer get serial
output on a powernv system. This is because we compile out the opal
code.
As it turns out, none of the system-specific serial outputs will be
compiled in. This series fixes that. Tested on Qemu powernv, Romulus and
Palmetto.
Joel Stanley (2):
powerpc/boot: Expose Kconfig symbols to wrapper
powerpc/boot: Fix opal console in boot wrapper
arch/powerpc/boot/.gitignore | 1 +
arch/powerpc/boot/Makefile | 7 ++++++-
arch/powerpc/boot/opal.c | 8 --------
arch/powerpc/boot/serial.c | 1 +
4 files changed, 8 insertions(+), 9 deletions(-)
--
2.17.1
From: Joel Stanley <joel@jms.id.au> Date: 2018-10-09 23:33:07
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(-)
From: Joel Stanley <joel@jms.id.au> Date: 2018-10-09 23:35:28
As of commit 10c77dba40ff ("powerpc/boot: Fix build failure in 32-bit
boot wrapper") the opal code is hidden behind CONFIG_PPC64_BOOT_WRAPPER,
but the boot wrapper avoids include/linux, so it does not get the normal
Kconfig flags.
We can drop the guard entirely as in commit f8e8e69cea49 ("powerpc/boot:
Only build OPAL code when necessary") the makefile only includes opal.c
in the build if CONFIG_PPC64_BOOT_WRAPPER is set.
Fixes: 10c77dba40ff ("powerpc/boot: Fix build failure in 32-bit boot wrapper")
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
I wrote this patch before the kconfig one. We could use autoconf.h, or
fold this in, but I think the clean up of the redundant ifdef is cleaner.
arch/powerpc/boot/opal.c | 8 --------
1 file changed, 8 deletions(-)
@@ -13,8 +13,6 @@#include<libfdt.h>#include"../include/asm/opal-api.h"-#ifdef CONFIG_PPC64_BOOT_WRAPPER-/* Global OPAL struct used by opal-call.S */structopal{u64base;
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
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
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.
From: Michael Ellerman <hidden> Date: 2018-10-15 04:35:22
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>