* [Buildroot] Unable to boot Arm926t with big endian support
@ 2014-11-18 11:22 Peder Alm
2014-11-18 12:36 ` Thomas Petazzoni
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Peder Alm @ 2014-11-18 11:22 UTC (permalink / raw)
To: buildroot
I'm trying to NFS-boot my Buildroot build for Arm926t with big endian support without success. I have tried Buildroot version 2013.05 and 2014.08 with the same result. With little endian support I can boot successfully for both versions. How can I fix this?
v2013.05 - big endian
-------------------------------
...
Linux version 3.9.4 (mrlinux at computer) (gcc version 4.7.3 (Buildroot 2013.05) ) #1 Mon Nov 17 11:26:40 CET 2014
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
...
VFS: Mounted root (nfs filesystem) on device 0:10.
Freeing init memory: 140K
request_module: runaway loop modprobe binfmt-464c
Failed to execute /sbin/init. Attempting defaults...
request_module: runaway loop modprobe binfmt-464c
request_module: runaway loop modprobe binfmt-464c
Kernel panic - not syncing: No init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[<c00136fc>] (unwind_backtrace+0x0/0xf0) from [<c02a2d88>] (panic+0x80/0x1d0)
[<c02a2d88>] (panic+0x80/0x1d0) from [<c02a1e80>] (kernel_init+0xc0/0xe4)
[<c02a1e80>] (kernel_init+0xc0/0xe4) from [<c000edb0>] (ret_from_fork+0x14/0x24)
v2014.08 - big endian
-------------------------------
...
Linux version 3.16.1 (mrlinux at computer) (gcc version 4.8.3 (Buildroot 2014.08) ) #1 Mon Nov 17 17:14:17 CET 2014
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
...
VFS: Mounted root (nfs filesystem) on device 0:12.
devtmpfs: mounted
Freeing unused kernel memory: 132K (c03c5000 - c03e6000)
request_module: runaway loop modprobe binfmt-464c
Failed to execute /sbin/init (error -8). Attempting defaults...
request_module: runaway loop modprobe binfmt-464c
Starting init: /sbin/init exists but couldn't execute it (error -8)
request_module: runaway loop modprobe binfmt-464c
Starting init: /bin/sh exists but couldn't execute it (error -8)
Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
CPU: 0 PID: 1 Comm: swapper Not tainted 3.16.1 #1
[<c000dba0>] (unwind_backtrace) from [<c000bfc4>] (show_stack+0x10/0x14)
[<c000bfc4>] (show_stack) from [<c02cec8c>] (panic+0x84/0x1e0)
[<c02cec8c>] (panic) from [<c02ce40c>] (kernel_init+0xc8/0xec)
[<c02ce40c>] (kernel_init) from [<c0009770>] (ret_from_fork+0x14/0x24)
---[ end Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
/Peder
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] Unable to boot Arm926t with big endian support
2014-11-18 11:22 [Buildroot] Unable to boot Arm926t with big endian support Peder Alm
@ 2014-11-18 12:36 ` Thomas Petazzoni
2014-11-18 13:20 ` Peder Alm
2014-11-18 13:14 ` Peter Korsgaard
2014-11-18 13:57 ` Laurent GONZALEZ
2 siblings, 1 reply; 13+ messages in thread
From: Thomas Petazzoni @ 2014-11-18 12:36 UTC (permalink / raw)
To: buildroot
Dear Peder Alm,
On Tue, 18 Nov 2014 11:22:19 +0000, Peder Alm wrote:
> I'm trying to NFS-boot my Buildroot build for Arm926t with big endian
> support without success. I have tried Buildroot version 2013.05 and
> 2014.08 with the same result. With little endian support I can boot
> successfully for both versions. How can I fix this?
Thanks for the report. On which platform are you testing this? I do
have some ARMv7 platforms to test BE on, but not ARMv5.
Do you know if it's possible to test ARMv5 BE under Qemu for example,
so that we could reproduce those issues?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] Unable to boot Arm926t with big endian support
2014-11-18 11:22 [Buildroot] Unable to boot Arm926t with big endian support Peder Alm
2014-11-18 12:36 ` Thomas Petazzoni
@ 2014-11-18 13:14 ` Peter Korsgaard
2014-11-18 13:43 ` Peder Alm
2014-11-18 13:57 ` Laurent GONZALEZ
2 siblings, 1 reply; 13+ messages in thread
From: Peter Korsgaard @ 2014-11-18 13:14 UTC (permalink / raw)
To: buildroot
>>>>> "Peder" == Peder Alm <peder.alm@semcon.com> writes:
> I'm trying to NFS-boot my Buildroot build for Arm926t with big endian
> support without success. I have tried Buildroot version 2013.05 and
> 2014.08 with the same result. With little endian support I can boot
> successfully for both versions. How can I fix this?
> v2013.05 - big endian
> -------------------------------
> ...
> Linux version 3.9.4 (mrlinux at computer) (gcc version 4.7.3 (Buildroot 2013.05) ) #1 Mon Nov 17 11:26:40 CET 2014
> CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
> ...
> VFS: Mounted root (nfs filesystem) on device 0:10.
> Freeing init memory: 140K
> request_module: runaway loop modprobe binfmt-464c
> Failed to execute /sbin/init. Attempting defaults...
> request_module: runaway loop modprobe binfmt-464c
> request_module: runaway loop modprobe binfmt-464c
> Kernel panic - not syncing: No init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
> [<c00136fc>] (unwind_backtrace+0x0/0xf0) from [<c02a2d88>] (panic+0x80/0x1d0)
> [<c02a2d88>] (panic+0x80/0x1d0) from [<c02a1e80>] (kernel_init+0xc0/0xe4)
> [<c02a1e80>] (kernel_init+0xc0/0xe4) from [<c000edb0>] (ret_from_fork+0x14/0x24)
> v2014.08 - big endian
> -------------------------------
> ...
> Linux version 3.16.1 (mrlinux at computer) (gcc version 4.8.3 (Buildroot 2014.08) ) #1 Mon Nov 17 17:14:17 CET 2014
> CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
> ...
> VFS: Mounted root (nfs filesystem) on device 0:12.
> devtmpfs: mounted
> Freeing unused kernel memory: 132K (c03c5000 - c03e6000)
> request_module: runaway loop modprobe binfmt-464c
> Failed to execute /sbin/init (error -8). Attempting defaults...
> request_module: runaway loop modprobe binfmt-464c
> Starting init: /sbin/init exists but couldn't execute it (error -8)
> request_module: runaway loop modprobe binfmt-464c
> Starting init: /bin/sh exists but couldn't execute it (error -8)
> Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
-8 is ENOEXEC, E.G. most likely invalid ELF variant.
Your kernel is running in big endian mode, right?
It's been quite some years since I've last used the armeb stuff, but it
should work (barring any bugs).
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] Unable to boot Arm926t with big endian support
2014-11-18 12:36 ` Thomas Petazzoni
@ 2014-11-18 13:20 ` Peder Alm
2014-11-18 22:00 ` Grant Edwards
0 siblings, 1 reply; 13+ messages in thread
From: Peder Alm @ 2014-11-18 13:20 UTC (permalink / raw)
To: buildroot
Dear Thomas
> Thanks for the report. On which platform are you testing this? I do
> have some ARMv7 platforms to test BE on, but not ARMv5.
I'm using the Olimex board SAM9-L9260 and XUbuntu 14.04 on my PC.
> Do you know if it's possible to test ARMv5 BE under Qemu for example,
> so that we could reproduce those issues?
I have to take a look at Qemu to give you an answer to this.
/Peder
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] Unable to boot Arm926t with big endian support
2014-11-18 13:14 ` Peter Korsgaard
@ 2014-11-18 13:43 ` Peder Alm
2014-11-18 13:51 ` Peter Korsgaard
0 siblings, 1 reply; 13+ messages in thread
From: Peder Alm @ 2014-11-18 13:43 UTC (permalink / raw)
To: buildroot
Dear Peter
> -8 is ENOEXEC, E.G. most likely invalid ELF variant.
>
> Your kernel is running in big endian mode, right?
How do I know if my kernel is running in BE mode? I have just changed the settings in Buildroot configuration. I found no settings for BE mode in the Linux kernel configuration when I added support for NFS.
I found this:
- ELF file magic:
- "\x7F""ELF"
- 0x464C457F on little endian machine
- 0x7F454C46 on big endian machine
It feels like modprobe is trying to load binfmt-464c to read the "inverted" ELF file (46='F', 4c='L').
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] Unable to boot Arm926t with big endian support
2014-11-18 13:43 ` Peder Alm
@ 2014-11-18 13:51 ` Peter Korsgaard
2014-11-18 14:48 ` Peder Alm
0 siblings, 1 reply; 13+ messages in thread
From: Peter Korsgaard @ 2014-11-18 13:51 UTC (permalink / raw)
To: buildroot
>>>>> "Peder" == Peder Alm <peder.alm@semcon.com> writes:
> Dear Peter
>> -8 is ENOEXEC, E.G. most likely invalid ELF variant.
>>
>> Your kernel is running in big endian mode, right?
> How do I know if my kernel is running in BE mode? I have just changed
> the settings in Buildroot configuration. I found no settings for BE
> mode in the Linux kernel configuration when I added support for NFS.
For ARM the config option is CPU_BIG_ENDIAN:
git grep -A2 BIG_ENDIAN arch/arm/mm/Kconfig | head -n 3
arch/arm/mm/Kconfig:config CPU_BIG_ENDIAN
arch/arm/mm/Kconfig- bool "Build big-endian kernel"
arch/arm/mm/Kconfig: depends on ARCH_SUPPORTS_BIG_ENDIAN
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] Unable to boot Arm926t with big endian support
2014-11-18 11:22 [Buildroot] Unable to boot Arm926t with big endian support Peder Alm
2014-11-18 12:36 ` Thomas Petazzoni
2014-11-18 13:14 ` Peter Korsgaard
@ 2014-11-18 13:57 ` Laurent GONZALEZ
2 siblings, 0 replies; 13+ messages in thread
From: Laurent GONZALEZ @ 2014-11-18 13:57 UTC (permalink / raw)
To: buildroot
On 18/11/2014 12:22, Peder Alm wrote:
> CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
If cr is the ARM926 control register, cr[7] is a bit that indicates you are running in little endian.
--
Laurent
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] Unable to boot Arm926t with big endian support
2014-11-18 13:51 ` Peter Korsgaard
@ 2014-11-18 14:48 ` Peder Alm
2014-11-18 14:54 ` Peter Korsgaard
0 siblings, 1 reply; 13+ messages in thread
From: Peder Alm @ 2014-11-18 14:48 UTC (permalink / raw)
To: buildroot
>> Dear Peter
>>> -8 is ENOEXEC, E.G. most likely invalid ELF variant.
>>>
>>> Your kernel is running in big endian mode, right?
>> How do I know if my kernel is running in BE mode? I have just changed
>> the settings in Buildroot configuration. I found no settings for BE
>> mode in the Linux kernel configuration when I added support for NFS.
> For ARM the config option is CPU_BIG_ENDIAN:
> git grep -A2 BIG_ENDIAN arch/arm/mm/Kconfig | head -n 3
> arch/arm/mm/Kconfig:config CPU_BIG_ENDIAN
> arch/arm/mm/Kconfig- bool "Build big-endian kernel"
> arch/arm/mm/Kconfig: depends on ARCH_SUPPORTS_BIG_ENDIAN
Running make linux-menuconfig and searching for CPU_BIG_ENDIAN I find that it is set to 'n' and I have no possibility to change this. It looks like Buildroot never enables big endian for the kernel despite of the ARM (big endian) selection in Buildroot configuration.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] Unable to boot Arm926t with big endian support
2014-11-18 14:48 ` Peder Alm
@ 2014-11-18 14:54 ` Peter Korsgaard
2014-11-18 15:45 ` Peder Alm
0 siblings, 1 reply; 13+ messages in thread
From: Peter Korsgaard @ 2014-11-18 14:54 UTC (permalink / raw)
To: buildroot
>>>>> "Peder" == Peder Alm <peder.alm@semcon.com> writes:
>>> Dear Peter
>>>> -8 is ENOEXEC, E.G. most likely invalid ELF variant.
>>>>
>>>> Your kernel is running in big endian mode, right?
>>> How do I know if my kernel is running in BE mode? I have just changed
>>> the settings in Buildroot configuration. I found no settings for BE
>>> mode in the Linux kernel configuration when I added support for NFS.
>> For ARM the config option is CPU_BIG_ENDIAN:
>> git grep -A2 BIG_ENDIAN arch/arm/mm/Kconfig | head -n 3
>> arch/arm/mm/Kconfig:config CPU_BIG_ENDIAN
>> arch/arm/mm/Kconfig- bool "Build big-endian kernel"
>> arch/arm/mm/Kconfig: depends on ARCH_SUPPORTS_BIG_ENDIAN
> Running make linux-menuconfig and searching for CPU_BIG_ENDIAN I find
> that it is set to 'n' and I have no possibility to change this.
So that means that your ARM variant doesn't have any big endian support.
git grep ARCH_SUPPORTS_BIG_ENDIAN ~/source/linux-2.6/arch/arm
Kconfig: select ARCH_SUPPORTS_BIG_ENDIAN
mach-highbank/Kconfig: select ARCH_SUPPORTS_BIG_ENDIAN
mach-keystone/Kconfig: select ARCH_SUPPORTS_BIG_ENDIAN
mach-mvebu/Kconfig: select ARCH_SUPPORTS_BIG_ENDIAN
mach-vexpress/Kconfig: select ARCH_SUPPORTS_BIG_ENDIAN
mach-zynq/Kconfig: select ARCH_SUPPORTS_BIG_ENDIAN
So big endian is only supported for ixp4xx, highbank, keystone, mvebu,
vexpress and zynq.
> It looks like Buildroot never enables big endian for the kernel
> despite of the ARM (big endian) selection in Buildroot configuration.
No, we indeed don't do that. We could (patches are welcome), but it
wouldn't have helped you as your ARM variant doesn't support it.
Why do you want to run in big endian mode?
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] Unable to boot Arm926t with big endian support
2014-11-18 14:54 ` Peter Korsgaard
@ 2014-11-18 15:45 ` Peder Alm
2014-11-18 15:51 ` Peter Korsgaard
2014-11-18 22:02 ` Grant Edwards
0 siblings, 2 replies; 13+ messages in thread
From: Peder Alm @ 2014-11-18 15:45 UTC (permalink / raw)
To: buildroot
> So that means that your ARM variant doesn't have any big endian support.
> git grep ARCH_SUPPORTS_BIG_ENDIAN ~/source/linux-2.6/arch/arm
> Kconfig: select ARCH_SUPPORTS_BIG_ENDIAN
> mach-highbank/Kconfig: select ARCH_SUPPORTS_BIG_ENDIAN
> mach-keystone/Kconfig: select ARCH_SUPPORTS_BIG_ENDIAN
> mach-mvebu/Kconfig: select ARCH_SUPPORTS_BIG_ENDIAN
> mach-vexpress/Kconfig: select ARCH_SUPPORTS_BIG_ENDIAN
> mach-zynq/Kconfig: select ARCH_SUPPORTS_BIG_ENDIAN
> So big endian is only supported for ixp4xx, highbank, keystone, mvebu, vexpress and zynq.
As I read the Atmel documenation for my CPU it tells me that it does support both little and big endian. Found this on at.com:
--------------------------------------------------------------------------------------------
Look at the bottom of page 40 in the doc6221.pdf doc,it says
"For more details, see Chapter 2 in ARM926EJ-S TRM, ref. DDI0198B."
Looking in the "ARM926EJ-S Technical Reference Manual" on page 2-13,
located at:
http://www.atmel.com/dyn/resources/prod_documents/arm_926ejs_trm.pdf
we find:
Table 2-11 Control bit functions register c1 (continued)
[7] B bit Endianness: 0 = Little-endian operation 1 = Big-endian operation. Set to
the value of BIGENDINIT on reset.
--------------------------------------------------------------------------------------------
/Peder
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] Unable to boot Arm926t with big endian support
2014-11-18 15:45 ` Peder Alm
@ 2014-11-18 15:51 ` Peter Korsgaard
2014-11-18 22:02 ` Grant Edwards
1 sibling, 0 replies; 13+ messages in thread
From: Peter Korsgaard @ 2014-11-18 15:51 UTC (permalink / raw)
To: buildroot
>>>>> "Peder" == Peder Alm <peder.alm@semcon.com> writes:
Hi,
>> So big endian is only supported for ixp4xx, highbank, keystone,
>> mvebu, vexpress and zynq.
> As I read the Atmel documenation for my CPU it tells me that it does
> support both little and big endian. Found this on at.com:
The CPU core may support it, but there's currently no support for
running that variant in big endian mode under Linux.
--
Peter Korsgaard
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] Unable to boot Arm926t with big endian support
2014-11-18 13:20 ` Peder Alm
@ 2014-11-18 22:00 ` Grant Edwards
0 siblings, 0 replies; 13+ messages in thread
From: Grant Edwards @ 2014-11-18 22:00 UTC (permalink / raw)
To: buildroot
On 2014-11-18, Peder Alm <peder.alm@semcon.com> wrote:
> Dear Thomas
>
>> Thanks for the report. On which platform are you testing this? I do
>> have some ARMv7 platforms to test BE on, but not ARMv5.
> I'm using the Olimex board SAM9-L9260 and XUbuntu 14.04 on my PC.
AFAIK, the AT91 family only work in little-endian mode. The CPU core
can be switched, but the rest of the part is designed specifically for
little-endian mode, and many/some of the peripherals are not going to
work right. At least that's what the Atmel FAE told me when I
asked....
--
Grant Edwards grant.b.edwards Yow! I feel like I am
at sharing a ``CORN-DOG''
gmail.com with NIKITA KHRUSCHEV ...
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] Unable to boot Arm926t with big endian support
2014-11-18 15:45 ` Peder Alm
2014-11-18 15:51 ` Peter Korsgaard
@ 2014-11-18 22:02 ` Grant Edwards
1 sibling, 0 replies; 13+ messages in thread
From: Grant Edwards @ 2014-11-18 22:02 UTC (permalink / raw)
To: buildroot
On 2014-11-18, Peder Alm <peder.alm@semcon.com> wrote:
>> So that means that your ARM variant doesn't have any big endian support.
>
>> git grep ARCH_SUPPORTS_BIG_ENDIAN ~/source/linux-2.6/arch/arm
>> Kconfig: select ARCH_SUPPORTS_BIG_ENDIAN
>> mach-highbank/Kconfig: select ARCH_SUPPORTS_BIG_ENDIAN
>> mach-keystone/Kconfig: select ARCH_SUPPORTS_BIG_ENDIAN
>> mach-mvebu/Kconfig: select ARCH_SUPPORTS_BIG_ENDIAN
>> mach-vexpress/Kconfig: select ARCH_SUPPORTS_BIG_ENDIAN
>> mach-zynq/Kconfig: select ARCH_SUPPORTS_BIG_ENDIAN
>
>> So big endian is only supported for ixp4xx, highbank, keystone, mvebu, vexpress and zynq.
>
> As I read the Atmel documenation for my CPU it tells me that it does support both little and big endian. Found this on at.com:
> --------------------------------------------------------------------------------------------
> Look at the bottom of page 40 in the doc6221.pdf doc,it says
> "For more details, see Chapter 2 in ARM926EJ-S TRM, ref. DDI0198B."
>
> Looking in the "ARM926EJ-S Technical Reference Manual" on page 2-13,
> located at:
> http://www.atmel.com/dyn/resources/prod_documents/arm_926ejs_trm.pdf
>
> we find:
> Table 2-11 Control bit functions register c1 (continued)
> [7] B bit Endianness: 0 = Little-endian operation 1 = Big-endian operation. Set to
> the value of BIGENDINIT on reset.
> --------------------------------------------------------------------------------------------
The ARM926EJ-S supports bigendian operation. I believe that the Atmel
AT91SAM9260 does not.
--
Grant Edwards grant.b.edwards Yow! ... he dominates the
at DECADENT SUBWAY SCENE.
gmail.com
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2014-11-18 22:02 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-18 11:22 [Buildroot] Unable to boot Arm926t with big endian support Peder Alm
2014-11-18 12:36 ` Thomas Petazzoni
2014-11-18 13:20 ` Peder Alm
2014-11-18 22:00 ` Grant Edwards
2014-11-18 13:14 ` Peter Korsgaard
2014-11-18 13:43 ` Peder Alm
2014-11-18 13:51 ` Peter Korsgaard
2014-11-18 14:48 ` Peder Alm
2014-11-18 14:54 ` Peter Korsgaard
2014-11-18 15:45 ` Peder Alm
2014-11-18 15:51 ` Peter Korsgaard
2014-11-18 22:02 ` Grant Edwards
2014-11-18 13:57 ` Laurent GONZALEZ
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox