Richard Bair

MCF5329 w/ ucLinux Kernel Panic

Discussion created by Richard Bair on Aug 7, 2010
Latest reply on May 17, 2011 by Massimo Ruo Roch

Hello & thanks for reading.


I've been working on a persistent kernel panic for the last week or so and seem to have hit a wall so any advice is much appreciated.




This is a custom board with MCF5329, 32MB of SDRAM, Flash, SD Card and an LCD.  U-boot is being used to boot ucLinux.  ucLinux kernel is being created using LTIB (from Freescale site).




The kernel continues to panic.  From the console perspective this can happen just as u-boot completes uncompressing the kernel, mid kernel bring up and sometimes 15s into a stable prompt.  Via trial and error, I've noticied that if I comment out 1 line in the mcf-fb.c (.../drivers/vided/mfc-fb.c) module I can reach a stable kernel.  This is the line in which LCDCHEN in MISCCR is set to a 1.  If I comment out this line, I can get to a stable prompt but as you can imagine...the LCD is *not* functional.  In general, after the panic, I see my first screen on the LCD.




1) Using ./ltib -c I changed the kernel configuration from a 4k to 8k stack.  The thougth here was to rule out a stack overflow.  Btw, it seems I should be able to set the stack to whatever value I want but I can't seem to determne how to accomplish this.


2) I've tried activating LCDCHEN in a totally different location.  For example, I moved this line to the SD module which comes up later in stable versions with LCDCHEN deactivated.  This tends to shift the kernel panic out later in the bring up process.


3) I noted that ucLinux seems to be reserving the frambuffer at 0x40400000 for 0x96000 length.  Thus, I went to a CodeWarrior program trying to run setting LCD-SSAR to that address.  This test hasn't worked yet.  I can't seem to figure out the syntax to change the following:



unsigned char my_image[] {0x00, 0xAA, .....};




to (2 attempts made)



unsigned char my_image[] @0x40400000 {0x00, 0xAA, .....};unsigned char my_image[] : 0x40400000 {0x00, 0xAA, .....};

So this test isn't complete.  I have tried u-boot memtest functions in that area and in general have checked the timing of SDRAM and don't believe I have any problems accessing memory in this area.




Well, I'm late getting this board working!  I'm new to ucLinux and suspect when LCDCHEN is activated that I'm creating some type of memory conflict but I've had no luck decoding the panic messages or deciphering /var/log.  I haven't ruled out a HW problem as this is a rev1 of a rev0 board.  The rev0 board used a PCF5328 and I've converted over to a MCF5329.  The rev0 version is functional and of course every change is under scrutiny; however, I can't seem to find the issue.


Any takers on this one for advice on next steps?