MPC5200 Linux Init Problem
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
Quoted 5 lines · Frank Beesley
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
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
Quoted 51 lines · 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/initOops: kernel access of bad area, sig: 11 NIP: C0011030 XER: 00000000 LR: C00112AC SP: C03BBEB0 REGS: c03bbe00 TRAP: 0300dMSR: 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 00000000Kernel 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 signalOops: machine check, sig: 7 NIP: C0010FD0 XER: 00000000 LR: C0010F34 SP: C03BBE40 REGS: c03bbd90 TRAP: 0200dMSR: 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 00000000Kernel 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
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Quoted 8 lines
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.
Quoted 9 lines
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