All of lore.kernel.org
 help / color / mirror / Atom feed
* MPC5200 Linux Init Problem
@ 2005-09-07 22:42 Frank Beesley
  2005-09-07 23:29 ` Jeff Angielski
  2005-09-08 14:18 ` Bob Peterson
  0 siblings, 2 replies; 4+ messages in thread
From: Frank Beesley @ 2005-09-07 22:42 UTC (permalink / raw)
  To: linuxppc-embedded; +Cc: frank.beesley

I am bringing up a custom board using the MPC5200 and based on the 
Lite5200. We changed from SDR to 128MB of DDR SDRAM and the flash 
interface is now a 32MB, 32-bit wide bus using 2 Strata flash parts. I 
have u-boot-1.1.3 up and running just fine. I have three partitions on 
the flash: 0-uboot, 1-kernel image, 2-jffs file system. The linux kernel 
(DENX based 2.4.25) starts with all the normal messages plus some that I 
added for debugging. It should then start running /sbin/init 
(busybox-1.00, dynamically linked)  but instead I get the following Oops:

VFS: Mounted root (jffs filesystem) 
readonly.                                  
Freeing unused kernel memory: 60k 
init                                                
init 
filename=/sbin/init                                                       
Oops: kernel access of bad area, sig: 
11                                       
NIP: C0011030 XER: 00000000 LR: C00112AC SP: C03BBEB0 REGS: c03bbe00 
TRAP: 0300d
MSR: 00001032 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 
11                                
DAR: 80820000, DSISR: 
20000000                                                 
TASK = c03ba000[1] '    nit' Last syscall: 
11                                  
last math 00000000 last altivec 
00000000                                       
GPR00: 80820000 C03BBEB0 C03BA000 C01780A0 00001032 0000000B C0160BA4 
00000000 
GPR08: 0000001B 80820000 C0160968 C013D954 00000000 00000000 00000000 
00000000 
GPR16: 00000000 00000000 00000000 00000000 C0170000 C0190000 C0160000 
C0160000 
GPR24: C000E8CC 00000000 00000000 00000000 C03BA000 C016F920 00000000 
C03BBEB0 
Call 
backtrace:                                                                
00000000 C0005D04 
00000000                                                     
Kernel panic: Attempted to kill 
init!                                          
 <0>Rebooting in 180 
seconds..                                                 


When I change busybox to statically linked I get the following (notice 
some of my debug messages from within busybox showing up now):
VFS: Mounted root (jffs filesystem) 
readonly.                                  
Freeing unused kernel memory: 60k 
init                                         
init 
filename=/sbin/init                                                       
init started:  BusyBox v1.00 (2005.09.07-14:56+0000) multi-call 
binary         
Machine check in kernel 
mode.                                                  
Caused by (from SRR1=41030): Transfer error ack 
signal                         
Oops: machine check, sig: 
7                                                    
NIP: C0010FD0 XER: 00000000 LR: C0010F34 SP: C03BBE40 REGS: c03bbd90 
TRAP: 0200d
MSR: 00041030 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 
11                                
TASK = c03ba000[1] '    nit' Last syscall: 
162                                 
last math 00000000 last altivec 
00000000                                       
GPR00: 7C691B78 C03BBE40 C03BA000 C01790A0 00001032 00000000 C0160BA4 
00000000 
GPR08: 00000017 4BFFFFAC C001BF1C 80620464 100823E4 1010D01C 00000000 
00000000 
GPR16: 00000000 00000000 00000000 00000000 C0170000 C0190000 C0160000 
C0160000 
GPR24: C0005A40 00000001 100D3E28 C0180000 C7E38000 C016F920 00000000 
C03BBE40 
Call 
backtrace:                                                                
C000EA78 C0010E3C C001C0EC C0005A9C 10082408 10027000 
10000960                 
10000338 10051284 
00000000                                                     
Kernel panic: Attempted to kill 
init!                                          
 <0>Rebooting in 180 
seconds..                                                 
                        

1) Why am i getting machine check message - also see the task name is 
messed up.

2) Why are dynamic linking not working, is this a problem with my 
library loader.

3) Why is my init failing to load. this is the same binary and config 
files that was used on a Lite5200 and worked fine.

Any clues to help debug this would be greatly appreciated. I have built 
several different kernel and busybox images with different debug prints 
to help figure this out and I am at a loss. Please CC me as I am not on 
the mailing list OR directly email me and we can post the solution back 
to the list.

Thanks
Frank

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: MPC5200 Linux Init Problem
  2005-09-07 22:42 MPC5200 Linux Init Problem Frank Beesley
@ 2005-09-07 23:29 ` Jeff Angielski
  2005-09-08 14:18 ` Bob Peterson
  1 sibling, 0 replies; 4+ messages in thread
From: Jeff Angielski @ 2005-09-07 23:29 UTC (permalink / raw)
  To: Frank Beesley; +Cc: linuxppc-embedded

On Wed, 2005-09-07 at 17:42 -0500, Frank Beesley wrote:
> Any clues to help debug this would be greatly appreciated. I have built 
> several different kernel and busybox images with different debug prints 
> to help figure this out and I am at a loss. Please CC me as I am not on 
> the mailing list OR directly email me and we can post the solution back 
> to the list.

Have you compared the stack trace and instruction pointers to the maps
to see which functions are causing the issue?  Are they the same ones?

You are using jffs as your rootfs?  Are you sure the MTD is fully
functional?  Did you port your flash configuration to your kernel
correctly?  Have you tried NFS mounting a rootfs and then playing games
with a jffs filesystem to make sure it is working?

As for things to try, compile Busybox statically and work from there.
Once you get that working, you can play with the dynamic libraries,
making sure the right ones are on your rootfs.


Jeff Angielski
The PTR Group

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: MPC5200 Linux Init Problem
  2005-09-07 22:42 MPC5200 Linux Init Problem Frank Beesley
  2005-09-07 23:29 ` Jeff Angielski
@ 2005-09-08 14:18 ` Bob Peterson
  2005-09-08 22:19   ` Frank Beesley
  1 sibling, 1 reply; 4+ messages in thread
From: Bob Peterson @ 2005-09-08 14:18 UTC (permalink / raw)
  To: Frank Beesley, linuxppc-embedded; +Cc: frank.beesley

Hi Frank,

I recommend you first try to boot using tftp to get your kernel and nfs to get
your root filesystem.  Once that boots, you can play with MTD to make sure
your flash chips have full addressability and all, and you can mount your
jffs partition manually and look at it from the client.

Also, it would be interesting to see what u-boot messages you receive at
power-on.  You may also want to do a printenv command in u-boot and
post what your u-boot settings are.

Regards,

Bob Peterson
Advanced Communication Design

At 05:42 PM 9/7/2005, Frank Beesley wrote:
>I am bringing up a custom board using the MPC5200 and based on the 
>Lite5200. We changed from SDR to 128MB of DDR SDRAM and the flash 
>interface is now a 32MB, 32-bit wide bus using 2 Strata flash parts. 
>I have u-boot-1.1.3 up and running just fine. I have three 
>partitions on the flash: 0-uboot, 1-kernel image, 2-jffs file 
>system. The linux kernel (DENX based 2.4.25) starts with all the 
>normal messages plus some that I added for debugging. It should then 
>start running /sbin/init (busybox-1.00, dynamically linked)  but 
>instead I get the following Oops:
>
>VFS: Mounted root (jffs filesystem) 
>readonly.
>Freeing unused kernel memory: 60k 
>init
>init 
>filename=/sbin/init
>Oops: kernel access of bad area, sig: 
>11
>NIP: C0011030 XER: 00000000 LR: C00112AC SP: C03BBEB0 REGS: c03bbe00 
>TRAP: 0300d
>MSR: 00001032 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 
>11
>DAR: 80820000, DSISR: 
>20000000
>TASK = c03ba000[1] '    nit' Last syscall: 
>11
>last math 00000000 last altivec 
>00000000
>GPR00: 80820000 C03BBEB0 C03BA000 C01780A0 00001032 0000000B 
>C0160BA4 00000000 GPR08: 0000001B 80820000 C0160968 C013D954 
>00000000 00000000 00000000 00000000 GPR16: 00000000 00000000 
>00000000 00000000 C0170000 C0190000 C0160000 C0160000 GPR24: 
>C000E8CC 00000000 00000000 00000000 C03BA000 C016F920 00000000 
>C03BBEB0 Call 
>backtrace:
>00000000 C0005D04 
>00000000
>Kernel panic: Attempted to kill 
>init!
><0>Rebooting in 180 seconds..
>
>
>When I change busybox to statically linked I get the following 
>(notice some of my debug messages from within busybox showing up now):
>VFS: Mounted root (jffs filesystem) 
>readonly.
>Freeing unused kernel memory: 60k 
>init
>init 
>filename=/sbin/init
>init started:  BusyBox v1.00 (2005.09.07-14:56+0000) multi-call 
>binary
>Machine check in kernel 
>mode.
>Caused by (from SRR1=41030): Transfer error ack 
>signal
>Oops: machine check, sig: 
>7
>NIP: C0010FD0 XER: 00000000 LR: C0010F34 SP: C03BBE40 REGS: c03bbd90 
>TRAP: 0200d
>MSR: 00041030 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 
>11
>TASK = c03ba000[1] '    nit' Last syscall: 
>162
>last math 00000000 last altivec 
>00000000
>GPR00: 7C691B78 C03BBE40 C03BA000 C01790A0 00001032 00000000 
>C0160BA4 00000000 GPR08: 00000017 4BFFFFAC C001BF1C 80620464 
>100823E4 1010D01C 00000000 00000000 GPR16: 00000000 00000000 
>00000000 00000000 C0170000 C0190000 C0160000 C0160000 GPR24: 
>C0005A40 00000001 100D3E28 C0180000 C7E38000 C016F920 00000000 
>C03BBE40 Call 
>backtrace:
>C000EA78 C0010E3C C001C0EC C0005A9C 10082408 10027000 
>10000960
>10000338 10051284 
>00000000
>Kernel panic: Attempted to kill 
>init!
><0>Rebooting in 180 seconds..
>
>
>1) Why am i getting machine check message - also see the task name 
>is messed up.
>
>2) Why are dynamic linking not working, is this a problem with my 
>library loader.
>
>3) Why is my init failing to load. this is the same binary and 
>config files that was used on a Lite5200 and worked fine.
>
>Any clues to help debug this would be greatly appreciated. I have 
>built several different kernel and busybox images with different 
>debug prints to help figure this out and I am at a loss. Please CC 
>me as I am not on the mailing list OR directly email me and we can 
>post the solution back to the list.
>
>Thanks
>Frank
>
>_______________________________________________
>Linuxppc-embedded mailing list
>Linuxppc-embedded@ozlabs.org
>https://ozlabs.org/mailman/listinfo/linuxppc-embedded

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: MPC5200 Linux Init Problem
  2005-09-08 14:18 ` Bob Peterson
@ 2005-09-08 22:19   ` Frank Beesley
  0 siblings, 0 replies; 4+ messages in thread
From: Frank Beesley @ 2005-09-08 22:19 UTC (permalink / raw)
  To: Bob Peterson; +Cc: Jeff Angielski, linuxppc-embedded


> Hi Frank,
>
> I recommend you first try to boot using tftp to get your kernel and 
> nfs to get
> your root filesystem.  Once that boots, you can play with MTD to make 
> sure
> your flash chips have full addressability and all, and you can mount your
> jffs partition manually and look at it from the client.
>
> Also, it would be interesting to see what u-boot messages you receive at
> power-on.  You may also want to do a printenv command in u-boot and
> post what your u-boot settings are.
>
> Regards,
>
> Bob Peterson
> Advanced Communication Design
>
Here is the Uboot message and env:

U-Boot 1.1.3-ppc-0_3 (Aug 31 2005 - 17:55:35)                         
                                                                                

CPU:   MPC5200 v1.2 at 396 
MHz                                                 
       Bus 132 MHz, IPB 66 MHz, PCI 66 
MHz                                     
Board: Aeroflex-Wichita 
CAI                                                    
DRAM:  128 
MB                                                                  
FLASH: 32 
MB                                                                   
Using default 
environment                                                      
                                                                                

In:    
serial                                                                  
Out:   
serial                                                                  
Err:   
serial                                                                  
                                                                                

Autostarting. Press any key to 
abort..                                         
                                                                                

Hit any key to stop autoboot:  
0                                               
Eric-CAI=> 
printenv                                                            
bootcmd=bootm 
FA200000                                                         
bootdelay=10                                                                    

baudrate=115200                                                                 

preboot=echo;echo Autostarting.  Press any key to 
abort..;echo                 
bootargs=root=/dev/mtdblock2                                                    

                                                                                

Environment size: 144/65532 bytes


I don't have an ethernet connection on my custom board - bummer. TFTP 
and NFS are out. To further explain my custom board, I have an Intel 
host (running linux also) that is connected to an FPGA over the PCI bus. 
The FPGA then shares the flash interface with the MPC5200. The Intel 
host maps the flash using MTD drivers, writes the images, then releases 
the flash to the MPC5200. At that point the MPC5200 is brought out of 
reset and boots from flash. I have the flash partitioned for uboot, 
kernel, rootfs, and a spare data partition. Uboot is at FA000000 (CS1 
after initial assembly setup), kernel is at FA200000, rootfs is at 
FA800000, spare is at FB800000.
0x00000000-0x00200000 : 
"UBoot"                                                
0x00200000-0x00800000 : 
"Kernel"                                               
0x00800000-0x01800000 : 
"Rootfs"                                               
0x01800000-0x02000000 : 
"Cals"                                                 

The rootfs is crossing my CS1-CS2 boundary (FA000000, FB000000). I tried 
putting my rootfs image in the cals partitions and changed my boot args 
to /dev/mtdblock3. This didn't seem to change things. I believe my chip 
selects are working properly - this does not rule out the MTD driver 
though. I am working on a test now that tests (from uboot) the 30 MB of 
flash area beyond uboot.

Any other ideas?

Frank

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-09-08 22:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-07 22:42 MPC5200 Linux Init Problem Frank Beesley
2005-09-07 23:29 ` Jeff Angielski
2005-09-08 14:18 ` Bob Peterson
2005-09-08 22:19   ` Frank Beesley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.