linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Boqun Feng <boqun.feng@gmail.com>, linuxppc-dev@lists.ozlabs.org
Cc: Paul Mackerras <paulus@samba.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Geoff Levand <geoff@infradead.org>,
	Anatolij Gustschin <agust@denx.de>,
	Alistair Popple <alistair@popple.id.au>,
	Matt Porter <mporter@kernel.crashing.org>,
	Vitaly Bordug <vitb@kernel.crashing.org>,
	Scott Wood <scottwood@freescale.com>,
	Kumar Gala <galak@kernel.crashing.org>,
	Olof Johansson <olof@lixom.net>, Arnd Bergmann <arnd@arndb.de>
Subject: Re: [Question] Is little endian supported on all the platforms?
Date: Mon, 31 Aug 2015 16:52:38 +1000	[thread overview]
Message-ID: <1441003958.2720.5.camel@kernel.crashing.org> (raw)
In-Reply-To: <20150831064453.GA1071@fixme-laptop.cn.ibm.com>

On Mon, 2015-08-31 at 14:44 +0800, Boqun Feng wrote:
> Hi all,
> 
> I hit a strange build error on v4.2, when I try to build a LE kernel
> with a slightly modification of the ppc64_defconfig. What I did is just
> make ppc64_defconfig and make menuconfig to set CPU_LITTLE_ENDIAN=y, and
> then build the kernel.
> 
> I did a little research myself, and found out the error is because of
> trying to build a LE kernel with CONFIG_PPC_PS3=y. So a simple way to
> reproduce is:

First, LE isn't supported on PS/3 :-) It's only supported on POWER8
machines (and *some* P7 machines and only when running as KVM guest).

But the specific problem you are having looks like a differnet issue
with the PS3 boot wrapper.

Cheers,
Ben
> .

> 1. make menuconfig
> 	> set CONFIG_CPU_LITTLE_ENDIAN=y
> 	> set CONFIG_PPC_PS3=y
> 	> (I will also attach the .config in the email)
> 2. make
> 
> will see make errors like:
> 
>       CALL    arch/powerpc/relocs_check.sh
>     WARNING: 1 bad relocations
>     c000000000c8c778 R_PPC64_ADDR64    __crc_TOC.
>       DTC     arch/powerpc/boot/ps3.dtb
>       WRAP    arch/powerpc/boot/dtbImage.ps3
>     ld: powerpc:common64 architecture of input file `arch/powerpc/boot/ps3-head.o' is incompatible with powerpc:common output
>     ld: powerpc:common64 architecture of input file `arch/powerpc/boot/ps3-hvcall.o' is incompatible with powerpc:common output
>     ld: powerpc:common64 architecture of input file `arch/powerpc/boot/ps3.o' is incompatible with powerpc:common output
>     ...
>     arch/powerpc/boot/wrapper.a(crt0.o): In function `p_toc':
>     (.text+0x30): undefined reference to `__toc_start'
>     arch/powerpc/boot/wrapper.a(crt0.o): In function `p_dyn':
>     (.text+0x38): undefined reference to `__dynamic_start'
>     arch/powerpc/boot/wrapper.a(crt0.o): In function `p_rela':
>     (.text+0x40): undefined reference to `__rela_dyn_start'
>     make[1]: *** [arch/powerpc/boot/dtbImage.ps3] Error 1
>     rm arch/powerpc/boot/ps3.dtb
>     make: *** [zImage] Error 2
> 
> 
> Does this error occur because little endian is not supported on PS3?
> If so, should we do something like:
> 
> config PPC_PS3
> 	> bool "Sony PS3"
> -> 	> depends on PPC64 && PPC_BOOK3S
> +> 	> depends on PPC64 && PPC_BOOK3S && CPU_BIG_ENDIAN
> 	> select PPC_CELL
> 
> ?
> 
> Besides, I don't see any platform stating "depends on CPU_BIG_ENDIAN"
> or "depends on CPU_LITTLE_ENDIAN" in its Kconfig, which means all the
> platforms support both big endian and little endian, at least, based on
> the information provided by Kconfigs.
> 
> Is this true?
> 
> Thanks and Best Regards,
> Boqun

  reply	other threads:[~2015-08-31  6:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-31  6:44 [Question] Is little endian supported on all the platforms? Boqun Feng
2015-08-31  6:52 ` Benjamin Herrenschmidt [this message]
2015-08-31  7:53   ` Boqun Feng
2015-08-31  8:31     ` Benjamin Herrenschmidt
2015-08-31 11:19     ` Michael Ellerman
2015-08-31 11:56       ` Boqun Feng
2015-09-01  1:39         ` Michael Ellerman
2015-08-31 12:12       ` Cédric Le Goater
2015-09-01  7:39         ` Boqun Feng
2015-08-31 20:40       ` Benjamin Herrenschmidt
2015-09-01  1:31         ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1441003958.2720.5.camel@kernel.crashing.org \
    --to=benh@kernel.crashing.org \
    --cc=agust@denx.de \
    --cc=alistair@popple.id.au \
    --cc=arnd@arndb.de \
    --cc=boqun.feng@gmail.com \
    --cc=galak@kernel.crashing.org \
    --cc=geoff@infradead.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=mporter@kernel.crashing.org \
    --cc=olof@lixom.net \
    --cc=paulus@samba.org \
    --cc=scottwood@freescale.com \
    --cc=vitb@kernel.crashing.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).