* powerpc: 32BIT vs. 64BIT (PPC32 vs. PPC64)
@ 2018-07-05 21:30 Randy Dunlap
2018-07-07 1:45 ` Benjamin Herrenschmidt
2018-07-08 11:51 ` Michael Ellerman
0 siblings, 2 replies; 15+ messages in thread
From: Randy Dunlap @ 2018-07-05 21:30 UTC (permalink / raw)
To: linux-kbuild
Cc: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Stephen Rothwell, linuxppc-dev
Hi,
Is there a good way (or a shortcut) to do something like:
$ make ARCH=powerpc O=PPC32 [other_options] allmodconfig
to get a PPC32/32BIT allmodconfig
and also be able to do:
$make ARCH=powerpc O=PPC64 [other_options] allmodconfig
to get a PPC64/64BIT allmodconfig?
Note that arch/x86, arch/sh, and arch/sparc have ways to do
some flavor(s) of this (from Documentation/kbuild/kbuild.txt;
sh and sparc based on a recent "fix" patch from me):
x86: i386 for 32 bit, x86_64 for 64 bit
sh: sh for 32 bit, sh64 for 64 bit
sparc: sparc32 for 32 bit, sparc64 for 64 bit
thanks,
--
~Randy
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: powerpc: 32BIT vs. 64BIT (PPC32 vs. PPC64)
2018-07-05 21:30 powerpc: 32BIT vs. 64BIT (PPC32 vs. PPC64) Randy Dunlap
@ 2018-07-07 1:45 ` Benjamin Herrenschmidt
2018-07-07 4:58 ` Randy Dunlap
2018-07-08 11:51 ` Michael Ellerman
1 sibling, 1 reply; 15+ messages in thread
From: Benjamin Herrenschmidt @ 2018-07-07 1:45 UTC (permalink / raw)
To: Randy Dunlap, linux-kbuild
Cc: Paul Mackerras, Michael Ellerman, Stephen Rothwell, linuxppc-dev
On Thu, 2018-07-05 at 14:30 -0700, Randy Dunlap wrote:
> Hi,
>
> Is there a good way (or a shortcut) to do something like:
>
> $ make ARCH=powerpc O=PPC32 [other_options] allmodconfig
> to get a PPC32/32BIT allmodconfig
>
> and also be able to do:
>
> $make ARCH=powerpc O=PPC64 [other_options] allmodconfig
> to get a PPC64/64BIT allmodconfig?
Hrm... O= is for the separate build dir, so there much be something
else.
You mean having ARCH= aliases like ppc/ppc32 and ppc64 ?
That would be a matter of overriding some .config defaults I suppose, I
don't know how this is done on other archs.
I see the aliasing trick in the Makefile but that's about it.
> Note that arch/x86, arch/sh, and arch/sparc have ways to do
> some flavor(s) of this (from Documentation/kbuild/kbuild.txt;
> sh and sparc based on a recent "fix" patch from me):
I fail to see what you are actually talking about here ... sorry. Do
you have concrete examples on x86 or sparc ? From what I can tell the
"i386" or "sparc32/sparc64" aliases just change SRCARCH in Makefile and
32 vs 64-bit is just a Kconfig option...
> x86: i386 for 32 bit, x86_64 for 64 bit
> sh: sh for 32 bit, sh64 for 64 bit
> sparc: sparc32 for 32 bit, sparc64 for 64 bit
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: powerpc: 32BIT vs. 64BIT (PPC32 vs. PPC64)
2018-07-07 1:45 ` Benjamin Herrenschmidt
@ 2018-07-07 4:58 ` Randy Dunlap
2018-07-07 12:13 ` Nicholas Piggin
0 siblings, 1 reply; 15+ messages in thread
From: Randy Dunlap @ 2018-07-07 4:58 UTC (permalink / raw)
To: Benjamin Herrenschmidt, linux-kbuild
Cc: Paul Mackerras, Michael Ellerman, Stephen Rothwell, linuxppc-dev
On 07/06/2018 06:45 PM, Benjamin Herrenschmidt wrote:
> On Thu, 2018-07-05 at 14:30 -0700, Randy Dunlap wrote:
>> Hi,
>>
>> Is there a good way (or a shortcut) to do something like:
>>
>> $ make ARCH=powerpc O=PPC32 [other_options] allmodconfig
>> to get a PPC32/32BIT allmodconfig
>>
>> and also be able to do:
>>
>> $make ARCH=powerpc O=PPC64 [other_options] allmodconfig
>> to get a PPC64/64BIT allmodconfig?
>
> Hrm... O= is for the separate build dir, so there much be something
> else.
>
> You mean having ARCH= aliases like ppc/ppc32 and ppc64 ?
Yes.
> That would be a matter of overriding some .config defaults I suppose, I
> don't know how this is done on other archs.
>
> I see the aliasing trick in the Makefile but that's about it.
>
>> Note that arch/x86, arch/sh, and arch/sparc have ways to do
>> some flavor(s) of this (from Documentation/kbuild/kbuild.txt;
>> sh and sparc based on a recent "fix" patch from me):
>
> I fail to see what you are actually talking about here ... sorry. Do
> you have concrete examples on x86 or sparc ? From what I can tell the
> "i386" or "sparc32/sparc64" aliases just change SRCARCH in Makefile and
> 32 vs 64-bit is just a Kconfig option...
Yes, your summary is mostly correct.
I'm just looking for a way to do cross-compile builds that are close to
ppc32 allmodconfig and ppc64 allmodconfig.
>> x86: i386 for 32 bit, x86_64 for 64 bit
>> sh: sh for 32 bit, sh64 for 64 bit
>> sparc: sparc32 for 32 bit, sparc64 for 64 bit
I saw the powerpc merge-config targets after I sent this original email.
I can do my own homebrew that I prefer over those, though.
thanks,
--
~Randy
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: powerpc: 32BIT vs. 64BIT (PPC32 vs. PPC64)
2018-07-07 4:58 ` Randy Dunlap
@ 2018-07-07 12:13 ` Nicholas Piggin
2018-07-07 14:59 ` Randy Dunlap
2018-07-09 11:51 ` Michael Ellerman
0 siblings, 2 replies; 15+ messages in thread
From: Nicholas Piggin @ 2018-07-07 12:13 UTC (permalink / raw)
To: Randy Dunlap
Cc: Benjamin Herrenschmidt, linux-kbuild, Paul Mackerras,
linuxppc-dev, Stephen Rothwell
On Fri, 6 Jul 2018 21:58:29 -0700
Randy Dunlap <rdunlap@infradead.org> wrote:
> On 07/06/2018 06:45 PM, Benjamin Herrenschmidt wrote:
> > On Thu, 2018-07-05 at 14:30 -0700, Randy Dunlap wrote:
> >> Hi,
> >>
> >> Is there a good way (or a shortcut) to do something like:
> >>
> >> $ make ARCH=powerpc O=PPC32 [other_options] allmodconfig
> >> to get a PPC32/32BIT allmodconfig
> >>
> >> and also be able to do:
> >>
> >> $make ARCH=powerpc O=PPC64 [other_options] allmodconfig
> >> to get a PPC64/64BIT allmodconfig?
> >
> > Hrm... O= is for the separate build dir, so there much be something
> > else.
> >
> > You mean having ARCH= aliases like ppc/ppc32 and ppc64 ?
>
> Yes.
>
> > That would be a matter of overriding some .config defaults I suppose, I
> > don't know how this is done on other archs.
> >
> > I see the aliasing trick in the Makefile but that's about it.
> >
> >> Note that arch/x86, arch/sh, and arch/sparc have ways to do
> >> some flavor(s) of this (from Documentation/kbuild/kbuild.txt;
> >> sh and sparc based on a recent "fix" patch from me):
> >
> > I fail to see what you are actually talking about here ... sorry. Do
> > you have concrete examples on x86 or sparc ? From what I can tell the
> > "i386" or "sparc32/sparc64" aliases just change SRCARCH in Makefile and
> > 32 vs 64-bit is just a Kconfig option...
>
> Yes, your summary is mostly correct.
>
> I'm just looking for a way to do cross-compile builds that are close to
> ppc32 allmodconfig and ppc64 allmodconfig.
Would there a problem with adding ARCH=ppc32 / ppc64 matching? This
seems to work...
Thanks,
Nick
---
Makefile | 8 ++++++++
arch/powerpc/Kconfig | 9 +++++++++
arch/powerpc/platforms/Kconfig.cputype | 8 --------
3 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/Makefile b/Makefile
index c5ce55cbc543..f97204aed17a 100644
--- a/Makefile
+++ b/Makefile
@@ -345,6 +345,14 @@ ifeq ($(ARCH),sh64)
SRCARCH := sh
endif
+# Additional ARCH settings for powerpc
+ifeq ($(ARCH),ppc32)
+ SRCARCH := powerpc
+endif
+ifeq ($(ARCH),ppc64)
+ SRCARCH := powerpc
+endif
+
KCONFIG_CONFIG ?= .config
export KCONFIG_CONFIG
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 9f2b75fe2c2d..3405b1b122be 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -1,4 +1,13 @@
# SPDX-License-Identifier: GPL-2.0
+
+config PPC64
+ bool "64-bit kernel" if "$(ARCH)" = "powerpc"
+ default "$(ARCH)" != "ppc32"
+ select ZLIB_DEFLATE
+ help
+ This option selects whether a 32-bit or a 64-bit kernel
+ will be built.
+
source "arch/powerpc/platforms/Kconfig.cputype"
config PPC32
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index e6a1de521319..f6e5d6ef9782 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -1,12 +1,4 @@
# SPDX-License-Identifier: GPL-2.0
-config PPC64
- bool "64-bit kernel"
- default n
- select ZLIB_DEFLATE
- help
- This option selects whether a 32-bit or a 64-bit kernel
- will be built.
-
menu "Processor support"
choice
prompt "Processor Type"
--
2.17.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: powerpc: 32BIT vs. 64BIT (PPC32 vs. PPC64)
2018-07-07 12:13 ` Nicholas Piggin
@ 2018-07-07 14:59 ` Randy Dunlap
2018-07-08 15:44 ` Nicholas Piggin
2018-07-30 8:42 ` Masahiro Yamada
2018-07-09 11:51 ` Michael Ellerman
1 sibling, 2 replies; 15+ messages in thread
From: Randy Dunlap @ 2018-07-07 14:59 UTC (permalink / raw)
To: Nicholas Piggin
Cc: Benjamin Herrenschmidt, linux-kbuild, Paul Mackerras,
linuxppc-dev, Stephen Rothwell
On 07/07/2018 05:13 AM, Nicholas Piggin wrote:
> On Fri, 6 Jul 2018 21:58:29 -0700
> Randy Dunlap <rdunlap@infradead.org> wrote:
>
>> On 07/06/2018 06:45 PM, Benjamin Herrenschmidt wrote:
>>> On Thu, 2018-07-05 at 14:30 -0700, Randy Dunlap wrote:
>>>> Hi,
>>>>
>>>> Is there a good way (or a shortcut) to do something like:
>>>>
>>>> $ make ARCH=powerpc O=PPC32 [other_options] allmodconfig
>>>> to get a PPC32/32BIT allmodconfig
>>>>
>>>> and also be able to do:
>>>>
>>>> $make ARCH=powerpc O=PPC64 [other_options] allmodconfig
>>>> to get a PPC64/64BIT allmodconfig?
>>>
>>> Hrm... O= is for the separate build dir, so there much be something
>>> else.
>>>
>>> You mean having ARCH= aliases like ppc/ppc32 and ppc64 ?
>>
>> Yes.
>>
>>> That would be a matter of overriding some .config defaults I suppose, I
>>> don't know how this is done on other archs.
>>>
>>> I see the aliasing trick in the Makefile but that's about it.
>>>
>>>> Note that arch/x86, arch/sh, and arch/sparc have ways to do
>>>> some flavor(s) of this (from Documentation/kbuild/kbuild.txt;
>>>> sh and sparc based on a recent "fix" patch from me):
>>>
>>> I fail to see what you are actually talking about here ... sorry. Do
>>> you have concrete examples on x86 or sparc ? From what I can tell the
>>> "i386" or "sparc32/sparc64" aliases just change SRCARCH in Makefile and
>>> 32 vs 64-bit is just a Kconfig option...
>>
>> Yes, your summary is mostly correct.
>>
>> I'm just looking for a way to do cross-compile builds that are close to
>> ppc32 allmodconfig and ppc64 allmodconfig.
>
> Would there a problem with adding ARCH=ppc32 / ppc64 matching? This
> seems to work...
>
> Thanks,
> Nick
Yes, this mostly works and is similar to a patch (my patch) on my test machine.
And they both work for allmodconfig, which is my primary build target.
And they both have one little quirk that is confusing when the build target
is defconfig:
When ARCH=ppc32, the terminal output (stdout) is: (using O=PPC32)
make[1]: Entering directory '/home/rdunlap/lnx/lnx-418-rc3/PPC32'
GEN ./Makefile
*** Default configuration is based on 'ppc64_defconfig' <<<<< NOTE <<<<<
#
# configuration written to .config
#
make[1]: Leaving directory '/home/rdunlap/lnx/lnx-418-rc3/PPC32'
I expect that can be fixed also. :)
And the written .config file is indeed for 32BIT, not 64BIT.
Thanks, Nick.
> ---
> Makefile | 8 ++++++++
> arch/powerpc/Kconfig | 9 +++++++++
> arch/powerpc/platforms/Kconfig.cputype | 8 --------
> 3 files changed, 17 insertions(+), 8 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index c5ce55cbc543..f97204aed17a 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -345,6 +345,14 @@ ifeq ($(ARCH),sh64)
> SRCARCH := sh
> endif
>
> +# Additional ARCH settings for powerpc
> +ifeq ($(ARCH),ppc32)
> + SRCARCH := powerpc
> +endif
> +ifeq ($(ARCH),ppc64)
> + SRCARCH := powerpc
> +endif
> +
> KCONFIG_CONFIG ?= .config
> export KCONFIG_CONFIG
>
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index 9f2b75fe2c2d..3405b1b122be 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -1,4 +1,13 @@
> # SPDX-License-Identifier: GPL-2.0
> +
> +config PPC64
> + bool "64-bit kernel" if "$(ARCH)" = "powerpc"
> + default "$(ARCH)" != "ppc32"
> + select ZLIB_DEFLATE
> + help
> + This option selects whether a 32-bit or a 64-bit kernel
> + will be built.
> +
> source "arch/powerpc/platforms/Kconfig.cputype"
>
> config PPC32
> diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
> index e6a1de521319..f6e5d6ef9782 100644
> --- a/arch/powerpc/platforms/Kconfig.cputype
> +++ b/arch/powerpc/platforms/Kconfig.cputype
> @@ -1,12 +1,4 @@
> # SPDX-License-Identifier: GPL-2.0
> -config PPC64
> - bool "64-bit kernel"
> - default n
> - select ZLIB_DEFLATE
> - help
> - This option selects whether a 32-bit or a 64-bit kernel
> - will be built.
> -
> menu "Processor support"
> choice
> prompt "Processor Type"
>
--
~Randy
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: powerpc: 32BIT vs. 64BIT (PPC32 vs. PPC64)
2018-07-05 21:30 powerpc: 32BIT vs. 64BIT (PPC32 vs. PPC64) Randy Dunlap
2018-07-07 1:45 ` Benjamin Herrenschmidt
@ 2018-07-08 11:51 ` Michael Ellerman
2018-07-08 15:46 ` Randy Dunlap
2018-07-09 12:00 ` Mathieu Malaterre
1 sibling, 2 replies; 15+ messages in thread
From: Michael Ellerman @ 2018-07-08 11:51 UTC (permalink / raw)
To: Randy Dunlap, linux-kbuild
Cc: Benjamin Herrenschmidt, Paul Mackerras, Stephen Rothwell,
linuxppc-dev
Randy Dunlap <rdunlap@infradead.org> writes:
> Hi,
>
> Is there a good way (or a shortcut) to do something like:
The best I know of is:
> $ make ARCH=powerpc O=PPC32 [other_options] allmodconfig
> to get a PPC32/32BIT allmodconfig
$ echo CONFIG_PPC64=n > allmod.config
$ KCONFIG_ALLCONFIG=1 make allmodconfig
$ grep PPC32 .config
CONFIG_PPC32=y
Which is still a bit clunky.
I looked at this a while back and the problem we have is that the 32-bit
kernel is not a single thing. There are multiple 32-bit platforms which
are mutually exclusive.
eg, from menuconfig:
- 512x/52xx/6xx/7xx/74xx/82xx/83xx/86xx
- Freescale 85xx
- Freescale 8xx
- AMCC 40x
- AMCC 44x, 46x or 47x
- Freescale e200
So we could have a 32-bit allmodconfig, but we'd need to chose one of
the above, and we'd still only be testing some of the code.
Having said that you're the 2nd person to ask about this, so we should
clearly do something to make a 32-bit allmodconfig easier, even if it's
not perfect.
cheers
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: powerpc: 32BIT vs. 64BIT (PPC32 vs. PPC64)
2018-07-07 14:59 ` Randy Dunlap
@ 2018-07-08 15:44 ` Nicholas Piggin
2018-07-30 8:42 ` Masahiro Yamada
1 sibling, 0 replies; 15+ messages in thread
From: Nicholas Piggin @ 2018-07-08 15:44 UTC (permalink / raw)
To: Randy Dunlap
Cc: Benjamin Herrenschmidt, linux-kbuild, Paul Mackerras,
linuxppc-dev, Stephen Rothwell
On Sat, 7 Jul 2018 07:59:49 -0700
Randy Dunlap <rdunlap@infradead.org> wrote:
> On 07/07/2018 05:13 AM, Nicholas Piggin wrote:
> > On Fri, 6 Jul 2018 21:58:29 -0700
> > Randy Dunlap <rdunlap@infradead.org> wrote:
> >
> >> On 07/06/2018 06:45 PM, Benjamin Herrenschmidt wrote:
> >>> On Thu, 2018-07-05 at 14:30 -0700, Randy Dunlap wrote:
> >>>> Hi,
> >>>>
> >>>> Is there a good way (or a shortcut) to do something like:
> >>>>
> >>>> $ make ARCH=powerpc O=PPC32 [other_options] allmodconfig
> >>>> to get a PPC32/32BIT allmodconfig
> >>>>
> >>>> and also be able to do:
> >>>>
> >>>> $make ARCH=powerpc O=PPC64 [other_options] allmodconfig
> >>>> to get a PPC64/64BIT allmodconfig?
> >>>
> >>> Hrm... O= is for the separate build dir, so there much be something
> >>> else.
> >>>
> >>> You mean having ARCH= aliases like ppc/ppc32 and ppc64 ?
> >>
> >> Yes.
> >>
> >>> That would be a matter of overriding some .config defaults I suppose, I
> >>> don't know how this is done on other archs.
> >>>
> >>> I see the aliasing trick in the Makefile but that's about it.
> >>>
> >>>> Note that arch/x86, arch/sh, and arch/sparc have ways to do
> >>>> some flavor(s) of this (from Documentation/kbuild/kbuild.txt;
> >>>> sh and sparc based on a recent "fix" patch from me):
> >>>
> >>> I fail to see what you are actually talking about here ... sorry. Do
> >>> you have concrete examples on x86 or sparc ? From what I can tell the
> >>> "i386" or "sparc32/sparc64" aliases just change SRCARCH in Makefile and
> >>> 32 vs 64-bit is just a Kconfig option...
> >>
> >> Yes, your summary is mostly correct.
> >>
> >> I'm just looking for a way to do cross-compile builds that are close to
> >> ppc32 allmodconfig and ppc64 allmodconfig.
> >
> > Would there a problem with adding ARCH=ppc32 / ppc64 matching? This
> > seems to work...
> >
> > Thanks,
> > Nick
>
> Yes, this mostly works and is similar to a patch (my patch) on my test machine.
> And they both work for allmodconfig, which is my primary build target.
>
> And they both have one little quirk that is confusing when the build target
> is defconfig:
>
> When ARCH=ppc32, the terminal output (stdout) is: (using O=PPC32)
>
> make[1]: Entering directory '/home/rdunlap/lnx/lnx-418-rc3/PPC32'
> GEN ./Makefile
> *** Default configuration is based on 'ppc64_defconfig' <<<<< NOTE <<<<<
> #
> # configuration written to .config
> #
> make[1]: Leaving directory '/home/rdunlap/lnx/lnx-418-rc3/PPC32'
>
>
> I expect that can be fixed also. :)
It can, we'd just have to choose one of the many 32-bit configs to be
the default config in that case. I don't know much about 32 bit ppc,
so I don't know what would be the most useful for allmodconfig type of
build tests.
Even 64 bit have a bunch of major variants that are exclusive at build
time (Server vs embedded, endian, etc). So maybe the simple ppc64/ppc32
is not enough. Not sure.
Thanks,
Nick
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: powerpc: 32BIT vs. 64BIT (PPC32 vs. PPC64)
2018-07-08 11:51 ` Michael Ellerman
@ 2018-07-08 15:46 ` Randy Dunlap
2018-07-09 12:00 ` Mathieu Malaterre
1 sibling, 0 replies; 15+ messages in thread
From: Randy Dunlap @ 2018-07-08 15:46 UTC (permalink / raw)
To: Michael Ellerman, linux-kbuild
Cc: Benjamin Herrenschmidt, Paul Mackerras, Stephen Rothwell,
linuxppc-dev
On 07/08/2018 04:51 AM, Michael Ellerman wrote:
> Randy Dunlap <rdunlap@infradead.org> writes:
>> Hi,
>>
>> Is there a good way (or a shortcut) to do something like:
>
> The best I know of is:
>
>> $ make ARCH=powerpc O=PPC32 [other_options] allmodconfig
>> to get a PPC32/32BIT allmodconfig
>
> $ echo CONFIG_PPC64=n > allmod.config
> $ KCONFIG_ALLCONFIG=1 make allmodconfig
> $ grep PPC32 .config
> CONFIG_PPC32=y
>
> Which is still a bit clunky.
>
That's close to what I already do. And it's very script-able.
>
> I looked at this a while back and the problem we have is that the 32-bit
> kernel is not a single thing. There are multiple 32-bit platforms which
> are mutually exclusive.
>
> eg, from menuconfig:
>
> - 512x/52xx/6xx/7xx/74xx/82xx/83xx/86xx
> - Freescale 85xx
> - Freescale 8xx
> - AMCC 40x
> - AMCC 44x, 46x or 47x
> - Freescale e200
>
>
> So we could have a 32-bit allmodconfig, but we'd need to chose one of
> the above, and we'd still only be testing some of the code.
>
> Having said that you're the 2nd person to ask about this, so we should
> clearly do something to make a 32-bit allmodconfig easier, even if it's
> not perfect.
Thanks.
--
~Randy
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: powerpc: 32BIT vs. 64BIT (PPC32 vs. PPC64)
2018-07-07 12:13 ` Nicholas Piggin
2018-07-07 14:59 ` Randy Dunlap
@ 2018-07-09 11:51 ` Michael Ellerman
1 sibling, 0 replies; 15+ messages in thread
From: Michael Ellerman @ 2018-07-09 11:51 UTC (permalink / raw)
To: Nicholas Piggin, Randy Dunlap
Cc: Stephen Rothwell, Paul Mackerras, linuxppc-dev, linux-kbuild
Nicholas Piggin <npiggin@gmail.com> writes:
> On Fri, 6 Jul 2018 21:58:29 -0700
> Randy Dunlap <rdunlap@infradead.org> wrote:
>
>> On 07/06/2018 06:45 PM, Benjamin Herrenschmidt wrote:
>> > On Thu, 2018-07-05 at 14:30 -0700, Randy Dunlap wrote:
>> >> Hi,
>> >>
>> >> Is there a good way (or a shortcut) to do something like:
>> >>
>> >> $ make ARCH=powerpc O=PPC32 [other_options] allmodconfig
>> >> to get a PPC32/32BIT allmodconfig
>> >>
>> >> and also be able to do:
>> >>
>> >> $make ARCH=powerpc O=PPC64 [other_options] allmodconfig
>> >> to get a PPC64/64BIT allmodconfig?
>> >
>> > Hrm... O= is for the separate build dir, so there much be something
>> > else.
>> >
>> > You mean having ARCH= aliases like ppc/ppc32 and ppc64 ?
>>
>> Yes.
>>
>> > That would be a matter of overriding some .config defaults I suppose, I
>> > don't know how this is done on other archs.
>> >
>> > I see the aliasing trick in the Makefile but that's about it.
>> >
>> >> Note that arch/x86, arch/sh, and arch/sparc have ways to do
>> >> some flavor(s) of this (from Documentation/kbuild/kbuild.txt;
>> >> sh and sparc based on a recent "fix" patch from me):
>> >
>> > I fail to see what you are actually talking about here ... sorry. Do
>> > you have concrete examples on x86 or sparc ? From what I can tell the
>> > "i386" or "sparc32/sparc64" aliases just change SRCARCH in Makefile and
>> > 32 vs 64-bit is just a Kconfig option...
>>
>> Yes, your summary is mostly correct.
>>
>> I'm just looking for a way to do cross-compile builds that are close to
>> ppc32 allmodconfig and ppc64 allmodconfig.
>
> Would there a problem with adding ARCH=ppc32 / ppc64 matching? This
> seems to work...
It's a cute trick but I'd rather avoid it.
It overloads ARCH which can be confusing to people and tools. For
example I'd have to special case it in kisskb.
I think we can achieve a similar result by having more PHONY defconfig
targets.
eg, we can do ppc32_allmodconfig like below. And if there's interest we
could do a 4xx_allmodconfig etc.
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 2ea575cb3401..2556c2182789 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -354,6 +354,11 @@ mpc86xx_smp_defconfig:
$(call merge_into_defconfig,mpc86xx_basic_defconfig,\
86xx-smp 86xx-hw fsl-emb-nonhw)
+PHONY += ppc32_allmodconfig
+ppc32_allmodconfig:
+ $(Q)$(MAKE) KCONFIG_ALLCONFIG=$(srctree)/arch/powerpc/configs/book3s_32.config \
+ -f $(srctree)/Makefile allmodconfig
+
define archhelp
@echo '* zImage - Build default images selected by kernel config'
@echo ' zImage.* - Compressed kernel image (arch/$(ARCH)/boot/zImage.*)'
diff --git a/arch/powerpc/configs/book3s_32.config b/arch/powerpc/configs/book3s_32.config
new file mode 100644
index 000000000000..8721eb7b1294
--- /dev/null
+++ b/arch/powerpc/configs/book3s_32.config
@@ -0,0 +1,2 @@
+CONFIG_PPC64=n
+CONFIG_PPC_BOOK3S_32=y
cheers
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: powerpc: 32BIT vs. 64BIT (PPC32 vs. PPC64)
2018-07-08 11:51 ` Michael Ellerman
2018-07-08 15:46 ` Randy Dunlap
@ 2018-07-09 12:00 ` Mathieu Malaterre
2018-07-13 11:41 ` CONFIG_ANDROID_BINDER_IPC=y (Re: powerpc: 32BIT vs. 64BIT (PPC32 vs. PPC64)) Mathieu Malaterre
1 sibling, 1 reply; 15+ messages in thread
From: Mathieu Malaterre @ 2018-07-09 12:00 UTC (permalink / raw)
To: Michael Ellerman
Cc: Randy Dunlap, linux-kbuild, Paul Mackerras, linuxppc-dev,
Stephen Rothwell
On Sun, Jul 8, 2018 at 1:53 PM Michael Ellerman <mpe@ellerman.id.au> wrote:
>
> Randy Dunlap <rdunlap@infradead.org> writes:
> > Hi,
> >
> > Is there a good way (or a shortcut) to do something like:
>
> The best I know of is:
>
> > $ make ARCH=powerpc O=PPC32 [other_options] allmodconfig
> > to get a PPC32/32BIT allmodconfig
>
> $ echo CONFIG_PPC64=n > allmod.config
> $ KCONFIG_ALLCONFIG=1 make allmodconfig
> $ grep PPC32 .config
> CONFIG_PPC32=y
>
> Which is still a bit clunky.
>
>
> I looked at this a while back and the problem we have is that the 32-bit
> kernel is not a single thing. There are multiple 32-bit platforms which
> are mutually exclusive.
>
> eg, from menuconfig:
>
> - 512x/52xx/6xx/7xx/74xx/82xx/83xx/86xx
> - Freescale 85xx
> - Freescale 8xx
> - AMCC 40x
> - AMCC 44x, 46x or 47x
> - Freescale e200
Most Linux distro seems to have drop support for ppc32. So I'd suggest
to pick Debian powperc default config (but I agree that I am a little
biased here).
>
> So we could have a 32-bit allmodconfig, but we'd need to chose one of
> the above, and we'd still only be testing some of the code.
>
> Having said that you're the 2nd person to ask about this, so we should
> clearly do something to make a 32-bit allmodconfig easier, even if it's
> not perfect.
>
> cheers
^ permalink raw reply [flat|nested] 15+ messages in thread
* CONFIG_ANDROID_BINDER_IPC=y (Re: powerpc: 32BIT vs. 64BIT (PPC32 vs. PPC64))
2018-07-09 12:00 ` Mathieu Malaterre
@ 2018-07-13 11:41 ` Mathieu Malaterre
2018-07-13 23:24 ` Randy Dunlap
0 siblings, 1 reply; 15+ messages in thread
From: Mathieu Malaterre @ 2018-07-13 11:41 UTC (permalink / raw)
To: Randy Dunlap; +Cc: Michael Ellerman, linuxppc-dev
Randy,
On Mon, Jul 9, 2018 at 2:00 PM Mathieu Malaterre <malat@debian.org> wrote:
>
> On Sun, Jul 8, 2018 at 1:53 PM Michael Ellerman <mpe@ellerman.id.au> wrote:
> >
> > Randy Dunlap <rdunlap@infradead.org> writes:
> > > Hi,
> > >
> > > Is there a good way (or a shortcut) to do something like:
> >
> > The best I know of is:
> >
> > > $ make ARCH=powerpc O=PPC32 [other_options] allmodconfig
> > > to get a PPC32/32BIT allmodconfig
> >
> > $ echo CONFIG_PPC64=n > allmod.config
> > $ KCONFIG_ALLCONFIG=1 make allmodconfig
> > $ grep PPC32 .config
> > CONFIG_PPC32=y
> >
> > Which is still a bit clunky.
> >
> >
> > I looked at this a while back and the problem we have is that the 32-bit
> > kernel is not a single thing. There are multiple 32-bit platforms which
> > are mutually exclusive.
> >
> > eg, from menuconfig:
> >
> > - 512x/52xx/6xx/7xx/74xx/82xx/83xx/86xx
> > - Freescale 85xx
> > - Freescale 8xx
> > - AMCC 40x
> > - AMCC 44x, 46x or 47x
> > - Freescale e200
>
> Most Linux distro seems to have drop support for ppc32. So I'd suggest
> to pick Debian powperc default config (but I agree that I am a little
> biased here).
I tried an allmode as suggest by Michael (above). But I get a build error:
MODPOST vmlinux.o
drivers/android/binder.o: In function `binder_thread_write':
binder.c:(.text+0xc750): undefined reference to `__get_user_bad'
binder.c:(.text+0xc76c): undefined reference to `__get_user_bad'
binder.c:(.text+0xc790): undefined reference to `__get_user_bad'
binder.c:(.text+0xc7d4): undefined reference to `__get_user_bad'
binder.c:(.text+0xc7f4): undefined reference to `__get_user_bad'
So for now I need to do: CONFIG_ANDROID_BINDER_IPC=n
How did you get passed this build failure ?
> >
> > So we could have a 32-bit allmodconfig, but we'd need to chose one of
> > the above, and we'd still only be testing some of the code.
> >
> > Having said that you're the 2nd person to ask about this, so we should
> > clearly do something to make a 32-bit allmodconfig easier, even if it's
> > not perfect.
> >
> > cheers
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: CONFIG_ANDROID_BINDER_IPC=y (Re: powerpc: 32BIT vs. 64BIT (PPC32 vs. PPC64))
2018-07-13 11:41 ` CONFIG_ANDROID_BINDER_IPC=y (Re: powerpc: 32BIT vs. 64BIT (PPC32 vs. PPC64)) Mathieu Malaterre
@ 2018-07-13 23:24 ` Randy Dunlap
2018-07-20 17:28 ` Randy Dunlap
0 siblings, 1 reply; 15+ messages in thread
From: Randy Dunlap @ 2018-07-13 23:24 UTC (permalink / raw)
To: Mathieu Malaterre; +Cc: Michael Ellerman, linuxppc-dev
On 07/13/2018 04:41 AM, Mathieu Malaterre wrote:
> Randy,
>
> On Mon, Jul 9, 2018 at 2:00 PM Mathieu Malaterre <malat@debian.org> wrote:
>>
>> On Sun, Jul 8, 2018 at 1:53 PM Michael Ellerman <mpe@ellerman.id.au> wrote:
>>>
>>> Randy Dunlap <rdunlap@infradead.org> writes:
>>>> Hi,
>>>>
>>>> Is there a good way (or a shortcut) to do something like:
>>>
>>> The best I know of is:
>>>
>>>> $ make ARCH=powerpc O=PPC32 [other_options] allmodconfig
>>>> to get a PPC32/32BIT allmodconfig
>>>
>>> $ echo CONFIG_PPC64=n > allmod.config
>>> $ KCONFIG_ALLCONFIG=1 make allmodconfig
>>> $ grep PPC32 .config
>>> CONFIG_PPC32=y
>>>
>>> Which is still a bit clunky.
>>>
>>>
>>> I looked at this a while back and the problem we have is that the 32-bit
>>> kernel is not a single thing. There are multiple 32-bit platforms which
>>> are mutually exclusive.
>>>
>>> eg, from menuconfig:
>>>
>>> - 512x/52xx/6xx/7xx/74xx/82xx/83xx/86xx
>>> - Freescale 85xx
>>> - Freescale 8xx
>>> - AMCC 40x
>>> - AMCC 44x, 46x or 47x
>>> - Freescale e200
>>
>> Most Linux distro seems to have drop support for ppc32. So I'd suggest
>> to pick Debian powperc default config (but I agree that I am a little
>> biased here).
>
> I tried an allmode as suggest by Michael (above). But I get a build error:
>
> MODPOST vmlinux.o
> drivers/android/binder.o: In function `binder_thread_write':
> binder.c:(.text+0xc750): undefined reference to `__get_user_bad'
> binder.c:(.text+0xc76c): undefined reference to `__get_user_bad'
> binder.c:(.text+0xc790): undefined reference to `__get_user_bad'
> binder.c:(.text+0xc7d4): undefined reference to `__get_user_bad'
> binder.c:(.text+0xc7f4): undefined reference to `__get_user_bad'
>
>
> So for now I need to do: CONFIG_ANDROID_BINDER_IPC=n
>
> How did you get passed this build failure ?
Hi,
I am not seeing an error on that driver build.
I am using gcc 8.1.0 from kernel.org:
https://mirrors.edge.kernel.org/pub/tools/crosstool/
and building on x86_64.
--
~Randy
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: CONFIG_ANDROID_BINDER_IPC=y (Re: powerpc: 32BIT vs. 64BIT (PPC32 vs. PPC64))
2018-07-13 23:24 ` Randy Dunlap
@ 2018-07-20 17:28 ` Randy Dunlap
0 siblings, 0 replies; 15+ messages in thread
From: Randy Dunlap @ 2018-07-20 17:28 UTC (permalink / raw)
To: Mathieu Malaterre; +Cc: Michael Ellerman, linuxppc-dev
On 07/13/2018 04:24 PM, Randy Dunlap wrote:
> On 07/13/2018 04:41 AM, Mathieu Malaterre wrote:
>> Randy,
>>
>> On Mon, Jul 9, 2018 at 2:00 PM Mathieu Malaterre <malat@debian.org> wrote:
>>>
>>> On Sun, Jul 8, 2018 at 1:53 PM Michael Ellerman <mpe@ellerman.id.au> wrote:
>>>>
>>>> Randy Dunlap <rdunlap@infradead.org> writes:
>>>>> Hi,
>>>>>
>>>>> Is there a good way (or a shortcut) to do something like:
>>>>
>>>> The best I know of is:
>>>>
>>>>> $ make ARCH=powerpc O=PPC32 [other_options] allmodconfig
>>>>> to get a PPC32/32BIT allmodconfig
>>>>
>>>> $ echo CONFIG_PPC64=n > allmod.config
>>>> $ KCONFIG_ALLCONFIG=1 make allmodconfig
>>>> $ grep PPC32 .config
>>>> CONFIG_PPC32=y
>>>>
>>>> Which is still a bit clunky.
>>>>
>>>>
>>>> I looked at this a while back and the problem we have is that the 32-bit
>>>> kernel is not a single thing. There are multiple 32-bit platforms which
>>>> are mutually exclusive.
>>>>
>>>> eg, from menuconfig:
>>>>
>>>> - 512x/52xx/6xx/7xx/74xx/82xx/83xx/86xx
>>>> - Freescale 85xx
>>>> - Freescale 8xx
>>>> - AMCC 40x
>>>> - AMCC 44x, 46x or 47x
>>>> - Freescale e200
>>>
>>> Most Linux distro seems to have drop support for ppc32. So I'd suggest
>>> to pick Debian powperc default config (but I agree that I am a little
>>> biased here).
>>
>> I tried an allmode as suggest by Michael (above). But I get a build error:
>>
>> MODPOST vmlinux.o
>> drivers/android/binder.o: In function `binder_thread_write':
>> binder.c:(.text+0xc750): undefined reference to `__get_user_bad'
>> binder.c:(.text+0xc76c): undefined reference to `__get_user_bad'
>> binder.c:(.text+0xc790): undefined reference to `__get_user_bad'
>> binder.c:(.text+0xc7d4): undefined reference to `__get_user_bad'
>> binder.c:(.text+0xc7f4): undefined reference to `__get_user_bad'
>>
>>
>> So for now I need to do: CONFIG_ANDROID_BINDER_IPC=n
>>
>> How did you get passed this build failure ?
>
> Hi,
>
> I am not seeing an error on that driver build.
>
> I am using gcc 8.1.0 from kernel.org:
> https://mirrors.edge.kernel.org/pub/tools/crosstool/
>
> and building on x86_64.
Hi Mathieu,
I do see this build error (slightly different undefined reference though)
when I do an arch/microblaze/ cross-build:
drivers/android/binder.o: In function `binder_thread_write':
drivers/android/.tmp_gl_binder.o:(.text+0xcba8): undefined reference to `__user_bad'
drivers/android/.tmp_gl_binder.o:(.text+0xcbd4): undefined reference to `__user_bad'
drivers/android/.tmp_gl_binder.o:(.text+0xcfbc): undefined reference to `__user_bad'
drivers/android/.tmp_gl_binder.o:(.text+0xd648): undefined reference to `__user_bad'
drivers/android/.tmp_gl_binder.o:(.text+0xdbc0): undefined reference to `__user_bad'
--
~Randy
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: powerpc: 32BIT vs. 64BIT (PPC32 vs. PPC64)
2018-07-07 14:59 ` Randy Dunlap
2018-07-08 15:44 ` Nicholas Piggin
@ 2018-07-30 8:42 ` Masahiro Yamada
2018-07-31 9:57 ` Michael Ellerman
1 sibling, 1 reply; 15+ messages in thread
From: Masahiro Yamada @ 2018-07-30 8:42 UTC (permalink / raw)
To: Randy Dunlap
Cc: Nicholas Piggin, Benjamin Herrenschmidt, linux-kbuild,
Paul Mackerras, linuxppc-dev, Stephen Rothwell
2018-07-07 23:59 GMT+09:00 Randy Dunlap <rdunlap@infradead.org>:
> On 07/07/2018 05:13 AM, Nicholas Piggin wrote:
>> On Fri, 6 Jul 2018 21:58:29 -0700
>> Randy Dunlap <rdunlap@infradead.org> wrote:
>>
>>> On 07/06/2018 06:45 PM, Benjamin Herrenschmidt wrote:
>>>> On Thu, 2018-07-05 at 14:30 -0700, Randy Dunlap wrote:
>>>>> Hi,
>>>>>
>>>>> Is there a good way (or a shortcut) to do something like:
>>>>>
>>>>> $ make ARCH=powerpc O=PPC32 [other_options] allmodconfig
>>>>> to get a PPC32/32BIT allmodconfig
>>>>>
>>>>> and also be able to do:
>>>>>
>>>>> $make ARCH=powerpc O=PPC64 [other_options] allmodconfig
>>>>> to get a PPC64/64BIT allmodconfig?
>>>>
>>>> Hrm... O= is for the separate build dir, so there much be something
>>>> else.
>>>>
>>>> You mean having ARCH= aliases like ppc/ppc32 and ppc64 ?
>>>
>>> Yes.
>>>
>>>> That would be a matter of overriding some .config defaults I suppose, I
>>>> don't know how this is done on other archs.
>>>>
>>>> I see the aliasing trick in the Makefile but that's about it.
>>>>
>>>>> Note that arch/x86, arch/sh, and arch/sparc have ways to do
>>>>> some flavor(s) of this (from Documentation/kbuild/kbuild.txt;
>>>>> sh and sparc based on a recent "fix" patch from me):
>>>>
>>>> I fail to see what you are actually talking about here ... sorry. Do
>>>> you have concrete examples on x86 or sparc ? From what I can tell the
>>>> "i386" or "sparc32/sparc64" aliases just change SRCARCH in Makefile and
>>>> 32 vs 64-bit is just a Kconfig option...
>>>
>>> Yes, your summary is mostly correct.
>>>
>>> I'm just looking for a way to do cross-compile builds that are close to
>>> ppc32 allmodconfig and ppc64 allmodconfig.
>>
>> Would there a problem with adding ARCH=ppc32 / ppc64 matching? This
>> seems to work...
>>
>> Thanks,
>> Nick
>
> Yes, this mostly works and is similar to a patch (my patch) on my test machine.
> And they both work for allmodconfig, which is my primary build target.
>
> And they both have one little quirk that is confusing when the build target
> is defconfig:
>
> When ARCH=ppc32, the terminal output (stdout) is: (using O=PPC32)
>
> make[1]: Entering directory '/home/rdunlap/lnx/lnx-418-rc3/PPC32'
> GEN ./Makefile
> *** Default configuration is based on 'ppc64_defconfig' <<<<< NOTE <<<<<
> #
> # configuration written to .config
> #
> make[1]: Leaving directory '/home/rdunlap/lnx/lnx-418-rc3/PPC32'
>
Maybe, we can set one of ppc32 defconfigs to KBUILD_DEFCONFIG
if ARCH is ppc32 ?
ifeq ($(ARCH),ppc32)
KBUILD_DEFCONFIG := (some reasonable 32bit machine _defconfig)
else
KBUILD_DEFCONFIG := ppc64_defconfig
endif
ifeq ($(CROSS_COMPILE),)
KBUILD_DEFCONFIG := $(shell uname -m)_defconfig
endif
> I expect that can be fixed also. :)
>
> And the written .config file is indeed for 32BIT, not 64BIT.
>
> Thanks, Nick.
>
>> ---
>> Makefile | 8 ++++++++
>> arch/powerpc/Kconfig | 9 +++++++++
>> arch/powerpc/platforms/Kconfig.cputype | 8 --------
>> 3 files changed, 17 insertions(+), 8 deletions(-)
>>
>> diff --git a/Makefile b/Makefile
>> index c5ce55cbc543..f97204aed17a 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -345,6 +345,14 @@ ifeq ($(ARCH),sh64)
>> SRCARCH := sh
>> endif
>>
>> +# Additional ARCH settings for powerpc
>> +ifeq ($(ARCH),ppc32)
>> + SRCARCH := powerpc
>> +endif
>> +ifeq ($(ARCH),ppc64)
>> + SRCARCH := powerpc
>> +endif
>> +
>> KCONFIG_CONFIG ?= .config
>> export KCONFIG_CONFIG
>>
>> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
>> index 9f2b75fe2c2d..3405b1b122be 100644
>> --- a/arch/powerpc/Kconfig
>> +++ b/arch/powerpc/Kconfig
>> @@ -1,4 +1,13 @@
>> # SPDX-License-Identifier: GPL-2.0
>> +
>> +config PPC64
>> + bool "64-bit kernel" if "$(ARCH)" = "powerpc"
>> + default "$(ARCH)" != "ppc32"
>> + select ZLIB_DEFLATE
>> + help
>> + This option selects whether a 32-bit or a 64-bit kernel
>> + will be built.
>> +
>> source "arch/powerpc/platforms/Kconfig.cputype"
>>
>> config PPC32
>> diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
>> index e6a1de521319..f6e5d6ef9782 100644
>> --- a/arch/powerpc/platforms/Kconfig.cputype
>> +++ b/arch/powerpc/platforms/Kconfig.cputype
>> @@ -1,12 +1,4 @@
>> # SPDX-License-Identifier: GPL-2.0
>> -config PPC64
>> - bool "64-bit kernel"
>> - default n
>> - select ZLIB_DEFLATE
>> - help
>> - This option selects whether a 32-bit or a 64-bit kernel
>> - will be built.
>> -
>> menu "Processor support"
>> choice
>> prompt "Processor Type"
>>
>
>
> --
> ~Randy
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: powerpc: 32BIT vs. 64BIT (PPC32 vs. PPC64)
2018-07-30 8:42 ` Masahiro Yamada
@ 2018-07-31 9:57 ` Michael Ellerman
0 siblings, 0 replies; 15+ messages in thread
From: Michael Ellerman @ 2018-07-31 9:57 UTC (permalink / raw)
To: Masahiro Yamada, Randy Dunlap
Cc: Stephen Rothwell, linux-kbuild, Nicholas Piggin, linuxppc-dev
Masahiro Yamada <yamada.masahiro@socionext.com> writes:
> 2018-07-07 23:59 GMT+09:00 Randy Dunlap <rdunlap@infradead.org>:
>> On 07/07/2018 05:13 AM, Nicholas Piggin wrote:
>>> On Fri, 6 Jul 2018 21:58:29 -0700
>>> Randy Dunlap <rdunlap@infradead.org> wrote:
>>>
>>>> On 07/06/2018 06:45 PM, Benjamin Herrenschmidt wrote:
>>>>> On Thu, 2018-07-05 at 14:30 -0700, Randy Dunlap wrote:
>>>>>> Hi,
>>>>>>
>>>>>> Is there a good way (or a shortcut) to do something like:
>>>>>>
>>>>>> $ make ARCH=powerpc O=PPC32 [other_options] allmodconfig
>>>>>> to get a PPC32/32BIT allmodconfig
>>>>>>
>>>>>> and also be able to do:
>>>>>>
>>>>>> $make ARCH=powerpc O=PPC64 [other_options] allmodconfig
>>>>>> to get a PPC64/64BIT allmodconfig?
>>>>>
>>>>> Hrm... O= is for the separate build dir, so there much be something
>>>>> else.
>>>>>
>>>>> You mean having ARCH= aliases like ppc/ppc32 and ppc64 ?
>>>>
>>>> Yes.
>>>>
>>>>> That would be a matter of overriding some .config defaults I suppose, I
>>>>> don't know how this is done on other archs.
>>>>>
>>>>> I see the aliasing trick in the Makefile but that's about it.
>>>>>
>>>>>> Note that arch/x86, arch/sh, and arch/sparc have ways to do
>>>>>> some flavor(s) of this (from Documentation/kbuild/kbuild.txt;
>>>>>> sh and sparc based on a recent "fix" patch from me):
>>>>>
>>>>> I fail to see what you are actually talking about here ... sorry. Do
>>>>> you have concrete examples on x86 or sparc ? From what I can tell the
>>>>> "i386" or "sparc32/sparc64" aliases just change SRCARCH in Makefile and
>>>>> 32 vs 64-bit is just a Kconfig option...
>>>>
>>>> Yes, your summary is mostly correct.
>>>>
>>>> I'm just looking for a way to do cross-compile builds that are close to
>>>> ppc32 allmodconfig and ppc64 allmodconfig.
>>>
>>> Would there a problem with adding ARCH=ppc32 / ppc64 matching? This
>>> seems to work...
>>
>> Yes, this mostly works and is similar to a patch (my patch) on my test machine.
>> And they both work for allmodconfig, which is my primary build target.
>>
>> And they both have one little quirk that is confusing when the build target
>> is defconfig:
>>
>> When ARCH=ppc32, the terminal output (stdout) is: (using O=PPC32)
>>
>> make[1]: Entering directory '/home/rdunlap/lnx/lnx-418-rc3/PPC32'
>> GEN ./Makefile
>> *** Default configuration is based on 'ppc64_defconfig' <<<<< NOTE <<<<<
>> #
>> # configuration written to .config
>> #
>> make[1]: Leaving directory '/home/rdunlap/lnx/lnx-418-rc3/PPC32'
>>
>
>
> Maybe, we can set one of ppc32 defconfigs to KBUILD_DEFCONFIG
> if ARCH is ppc32 ?
We could, but as I said in another reply I'd rather we didn't play
tricks with ARCH.
I've merged a patch to add three new allmodconfig targets for ppc32,
ppc64le and ppc64_book3e:
https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=54457&state=*
cheers
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2018-07-31 9:57 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-05 21:30 powerpc: 32BIT vs. 64BIT (PPC32 vs. PPC64) Randy Dunlap
2018-07-07 1:45 ` Benjamin Herrenschmidt
2018-07-07 4:58 ` Randy Dunlap
2018-07-07 12:13 ` Nicholas Piggin
2018-07-07 14:59 ` Randy Dunlap
2018-07-08 15:44 ` Nicholas Piggin
2018-07-30 8:42 ` Masahiro Yamada
2018-07-31 9:57 ` Michael Ellerman
2018-07-09 11:51 ` Michael Ellerman
2018-07-08 11:51 ` Michael Ellerman
2018-07-08 15:46 ` Randy Dunlap
2018-07-09 12:00 ` Mathieu Malaterre
2018-07-13 11:41 ` CONFIG_ANDROID_BINDER_IPC=y (Re: powerpc: 32BIT vs. 64BIT (PPC32 vs. PPC64)) Mathieu Malaterre
2018-07-13 23:24 ` Randy Dunlap
2018-07-20 17:28 ` Randy Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).