From: Michael Ellerman <mpe@ellerman.id.au> Date: 2019-02-07 05:18:28
Add a generic 32-bit defconfig called ppc_defconfig. This means we'll
have a defconfig matching "uname -m" for all cases.
This config is mostly intended for build testing but if someone wants
to tweak it to get it booting on something that would be fine too.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/Makefile | 4 ++++
1 file changed, 4 insertions(+)
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2019-02-07 05:20:16
Our logic for choosing defconfig doesn't work well in some situations.
For example if you're on a ppc64le machine but you specify a non-empty
CROSS_COMPILE, in order to use a non-default toolchain, then defconfig
will give you ppc64_defconfig (big endian):
$ make CROSS_COMPILE=~/toolchains/gcc-8/bin/powerpc-linux- defconfig
*** Default configuration is based on 'ppc64_defconfig'
This is because we assume that CROSS_COMPILE being set means we
can't be on a ppc machine and rather than checking we just default to
ppc64_defconfig.
We should just ignore CROSS_COMPILE, instead check the machine with
uname and if it's one of ppc, ppc64 or ppc64le then use that
defconfig. If it's none of those then we fall back to ppc64_defconfig.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/Makefile | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
@@ -34,11 +34,10 @@ ifdef CONFIG_PPC_BOOK3S_32KBUILD_CFLAGS+=-mcpu=powerpcendif-ifeq ($(CROSS_COMPILE),)-KBUILD_DEFCONFIG:=$(shelluname-m)_defconfig-else-KBUILD_DEFCONFIG:=ppc64_defconfig-endif+# If we're on a ppc/ppc64/ppc64le machine use that defconfig, otherwise just use+# ppc64_defconfig because we have nothing better to go on.+uname:=$(shelluname-m)+KBUILD_DEFCONFIG:=$(if$(filterppc%,$(uname)),$(uname),ppc64)_defconfigifdef CONFIG_PPC64new_nm:=$(shellif$(NM)--help2>&1|grep--'--synthetic'>/dev/null;thenechoy;elseechon;fi)
On Thu, Feb 7, 2019 at 6:18 AM Michael Ellerman [off-list ref] wrote:
Add a generic 32-bit defconfig called ppc_defconfig. This means we'll
have a defconfig matching "uname -m" for all cases.
Looks good to me:
$ make defconfig
*** Default configuration is based on 'ppc_defconfig'
arch/powerpc/configs/ppc_defconfig:175:warning: symbol value 'm'
invalid for NF_TABLES_INET
arch/powerpc/configs/ppc_defconfig:176:warning: symbol value 'm'
invalid for NF_TABLES_NETDEV
arch/powerpc/configs/ppc_defconfig:304:warning: symbol value 'm'
invalid for NF_TABLES_ARP
arch/powerpc/configs/ppc_defconfig:358:warning: symbol value 'm'
invalid for NF_TABLES_BRIDGE
arch/powerpc/configs/ppc_defconfig:1427:warning: symbol value 'm'
invalid for LIRC
#
# configuration written to .config
#
Tested-by: Mathieu Malaterre <redacted>
quoted hunk
This config is mostly intended for build testing but if someone wants
to tweak it to get it booting on something that would be fine too.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/Makefile | 4 ++++
1 file changed, 4 insertions(+)
On Thu, Feb 7, 2019 at 6:20 AM Michael Ellerman [off-list ref] wrote:
Our logic for choosing defconfig doesn't work well in some situations.
For example if you're on a ppc64le machine but you specify a non-empty
CROSS_COMPILE, in order to use a non-default toolchain, then defconfig
will give you ppc64_defconfig (big endian):
$ make CROSS_COMPILE=~/toolchains/gcc-8/bin/powerpc-linux- defconfig
*** Default configuration is based on 'ppc64_defconfig'
This is because we assume that CROSS_COMPILE being set means we
can't be on a ppc machine and rather than checking we just default to
ppc64_defconfig.
We should just ignore CROSS_COMPILE, instead check the machine with
uname and if it's one of ppc, ppc64 or ppc64le then use that
defconfig. If it's none of those then we fall back to ppc64_defconfig.
@@ -34,11 +34,10 @@ ifdef CONFIG_PPC_BOOK3S_32KBUILD_CFLAGS+=-mcpu=powerpcendif-ifeq ($(CROSS_COMPILE),)-KBUILD_DEFCONFIG:=$(shelluname-m)_defconfig-else-KBUILD_DEFCONFIG:=ppc64_defconfig-endif+# If we're on a ppc/ppc64/ppc64le machine use that defconfig, otherwise just use+# ppc64_defconfig because we have nothing better to go on.+uname:=$(shelluname-m)+KBUILD_DEFCONFIG:=$(if$(filterppc%,$(uname)),$(uname),ppc64)_defconfigifdef CONFIG_PPC64new_nm:=$(shellif$(NM)--help2>&1|grep--'--synthetic'>/dev/null;thenechoy;elseechon;fi)--
From: Michael Ellerman <hidden> Date: 2019-04-21 14:25:21
On Thu, 2019-02-07 at 05:16:51 UTC, Michael Ellerman wrote:
Add a generic 32-bit defconfig called ppc_defconfig. This means we'll
have a defconfig matching "uname -m" for all cases.
This config is mostly intended for build testing but if someone wants
to tweak it to get it booting on something that would be fine too.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Tested-by: Mathieu Malaterre <redacted>