New Linux BSP for MCS5485EVB troubles booting...

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

New Linux BSP for MCS5485EVB troubles booting...

2,634 Views
jkimble
Contributor III

I'm attempting to port U-Boot to a custom board based on the M5485EVB and having some trouble getting the new Linux kernel to boot. My board has more and different SDRAM and Flash than the eval board. 128Mb of Ram (same type as eval board) and 64Mb in a 32 bit (CS tied together on two chips) configuration with Intel P33 Flash.

Because of the flash size I've had to adjust the flash base address from 0xFF80 0000 to 0xF000 0000 and I've moved the MBAR to 0x1000 0000. I've made the changes needed for Flash and SDRAM to the M5485evb.h file and U-Boot comes up and appears to function normally (though I can't write to flash so somethings not exactly right). I can tftp my uImage but when I go to run bootm the kernel starts to load, gets to the point it trys to start NTFS and just freezes never continuing. I removed the NTFS driver to get past that point but it just goes one more step (DMA startup) and freezes again. This leads me to thing I've got a memory configuration issue that the kernel is bumping up against. Not sure where to look though.

BTW I can boot this kernel with Colilo from the old BSP but I really want to get on U-Boot.

Any suggestions appreciated.

Labels (1)
0 Kudos
11 Replies

908 Views
kmahan
Contributor I
I'd check arch/m68k/coldfire/head.S to make sure the ACRs are being setup correctly -- especially since you've moved the MBAR. 

The ACRs are initialized to:
#define ACR0_DEFAULT    #0xF00FA048   /* System Regs */
#define ACR1_DEFAULT    #0x000FA048   /* SDRAM uncached */
#define ACR2_DEFAULT    #0x00000000   /* Not mapped */
#define ACR3_DEFAULT    #0x000FA008   /* SDRAM cached */

So you'll definitely need to move the mapping of the System regs -- probably something along the lines of
#define ACR0_DEFAULT    #0x100FA048   /* System Regs */

--Kurt
0 Kudos

908 Views
jkimble
Contributor III
Is this something new? I didn't have to do anything with this on the 2.6.10 kernel and I made the same changes to Colilo. Is this something that was changed between kernel revs (Lord knows a lot of other stuff did...).
 
I'm just trying to understand.
 
Thanks
 
 
0 Kudos

908 Views
kmahan
Contributor I
A lot of things have changed.

The 547x/548x 2.6.25 kernel code is the same codebase as what I use for the 5445x processors.

--Kurt
0 Kudos

908 Views
jkimble
Contributor III

Ok. Instead of changing MBAR (which does seem problematic) I went back and the ONLY changes I'm making for my board is to change:
  
from
   #define CFG_CS0_BASE 0xFF800000
to
    #define CFG_CS0_BASE 0xFC000000  for my 64 MB flash.

Changed CFG_MAX_FLASH_SECT from 139 to 259

Also changed in /board/freescale/m548xevb/config.mk   
from
    TEXT_BASE := 0xFF800000
to
     TEXT_BASE := 0xFC000000

Now I'm getting no boot of the kernel at all. U-Boot comes up, tftp works but boot sequence looks like:

-> bdinfo                                                                      
memstart    = 0x00000000                                                       
memsize     = 0x08000000                                                       
flashstart  = 0xFC000000                                                       
flashsize   = 0x04000000                                                       
flashoffset = 0x00000000                                                       
sramstart   = 0xF2000000                                                       
sramsize    = 0x00001000                                                       
mbar        = 0xF0000000                                                       
busfreq     =    100 MHz                                                       
pcifreq     =      0 MHz                                                       
ethaddr     = 00:E0:0C:BC:E5:60                                                
eth1addr    = 00:E0:0C:BC:E5:61                                                
ip_addr     = 137.237.242.175                                                  
baudrate    = 115200 bps                                                       
-> tftp 02000000 uImage                                                        
Using FEC0 device                                                              
TFTP from server 137.237.242.42; our IP address is 137.237.242.175             
Filename 'uImage'.                                                             
Load address: 0x2000000                                                        
Loading: #################################################################     
         #################################################################     
         #################################################################     
         #############################                                         
done                                                                           
Bytes transferred = 3285056 (322040 hex)                                       
-> bootm 02000000                                                              
## Booting kernel from Legacy Image at 02000000 ...                            
   Image Name:   Linux Kernel Image                                            
   Image Type:   M68K Linux Kernel Image (uncompressed)                        
   Data Size:    3284992 Bytes =  3.1 MB                                       
   Load Address: 00020000                                                      
   Entry Point:  00020000                                                      
   Verifying Checksum ... OK                                                   
   Loading Kernel Image ... OK                                                 
OK                                                                             

Any ideas? Hints? Suggestions....

0 Kudos

908 Views
kmahan
Contributor I
Do you have a BDM for debugging?  When I get to something like this I start dropping halt instructions in the code (head.S) and working my way through the kernel initialization.

No output doesn't necessarily mean you are totally dead.  A lot happens before anything comes out to the console.
0 Kudos

908 Views
jkimble
Contributor III
Well the original problem was a dumb thing. Forgot I changed ACR0 because I had change MBAR. Once that was restored the kernel begins to boot but hangs at:

-> bootm 02000000                                                              
## Booting kernel from Legacy Image at 02000000 ...                            
   Image Name:   Linux Kernel Image                                            
   Image Type:   M68K Linux Kernel Image (uncompressed)                        
   Data Size:    2768896 Bytes =  2.6 MB                                       
   Load Address: 00020000                                                      
   Entry Point:  00020000                                                      
   Verifying Checksum ... OK                                                   
   Loading Kernel Image ... OK                                                 
OK                                                                             
Linux version 2.6.25 (jkimble@localhost.localdomain) (gcc version 4.2.3 (Source8
starting up linux startmem 0x302000, endmem 0x4000000,          size 60MB      
console [ttyS0] enabled                                                        
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8156      
Kernel command line: root=/dev/nfs rw nfsroot=172.27.163.2:/tftpboot/ltib ip=17)
PID hash table entries: 256 (order: 8, 1024 bytes)                             
Console: colour dummy device 80x25                                             
Dentry cache hash table entries: 8192 (order: 2, 32768 bytes)                  
Inode-cache hash table entries: 4096 (order: 1, 16384 bytes)                   
Memory: 62056k/62056k available (2056k kernel code, 1328k data, 88k init)      
SLUB: Genslabs=13, HWalign=16, Order=0-2, MinObjects=8, CPUs=1, Nodes=1        
Mount-cache hash table entries: 1024                                           
net_namespace: 152 bytes                                                       
NET: Registered protocol family 16                                             
MCF5485x INIT_DEVICES                                                          
SCSI subsystem initialized                                                     
NET: Registered protocol family 23                                             
NET: Registered protocol family 2                                              
IP route cache hash table entries: 2048 (order: 0, 8192 bytes)                 
TCP established hash table entries: 2048 (order: 1, 16384 bytes)               
TCP bind hash table entries: 2048 (order: 0, 8192 bytes)                       
TCP: Hash tables configured (established 2048 bind 2048)                       
TCP reno registered                                                            
m547x_8x DMA: Initialize Multi-channel DMA API v1.0                           

I've looked further and still not getting this. As I said before the only change to U-Boot was to increase the size and type of flash but this was done in a way that I know works. I'm going to start putting some debug in the kernel to see what's happening but I have no debugger so it's going to be painful. The size of SDRAM has also changed to 128Mb. I made the change in the /include/config.h file. Is there another place to change this in U-Boot? The kernel?

This is sooo frustrating. I feel like I'm so close to getting this up!!

Thanks for any help you can give.
0 Kudos

908 Views
jkimble
Contributor III

Well the original problem was a dumb thing. Forgot I changed ACR0 because I had change MBAR. Once that was restored the kernel begins to boot but hangs at:

-> bootm 02000000                                                              
## Booting kernel from Legacy Image at 02000000 ...                            
   Image Name:   Linux Kernel Image                                            
   Image Type:   M68K Linux Kernel Image (uncompressed)                        
   Data Size:    2768896 Bytes =  2.6 MB                                       
   Load Address: 00020000                                                      
   Entry Point:  00020000                                                      
   Verifying Checksum ... OK                                                   
   Loading Kernel Image ... OK                                                 
OK                                                                             
Linux version 2.6.25 (jkimble@localhost.localdomain) (gcc version 4.2.3 (Source8
starting up linux startmem 0x302000, endmem 0x4000000,          size 60MB      
console [ttyS0] enabled                                                        
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8156      
Kernel command line: root=/dev/nfs rw nfsroot=172.27.163.2:/tftpboot/ltib ip=17)
PID hash table entries: 256 (order: 8, 1024 bytes)                             
Console: colour dummy device 80x25                                             
Dentry cache hash table entries: 8192 (order: 2, 32768 bytes)                  
Inode-cache hash table entries: 4096 (order: 1, 16384 bytes)                   
Memory: 62056k/62056k available (2056k kernel code, 1328k data, 88k init)      
SLUB: Genslabs=13, HWalign=16, Order=0-2, MinObjects=8, CPUs=1, Nodes=1        
Mount-cache hash table entries: 1024                                           
net_namespace: 152 bytes                                                       
NET: Registered protocol family 16                                             
MCF5485x INIT_DEVICES                                                          
SCSI subsystem initialized                                                     
NET: Registered protocol family 23                                             
NET: Registered protocol family 2                                              
IP route cache hash table entries: 2048 (order: 0, 8192 bytes)                 
TCP established hash table entries: 2048 (order: 1, 16384 bytes)               
TCP bind hash table entries: 2048 (order: 0, 8192 bytes)                       
TCP: Hash tables configured (established 2048 bind 2048)                       
TCP reno registered                                                            
m547x_8x DMA: Initialize Multi-channel DMA API v1.0                            


This is not a DMA thing. It was originally hanging of JFSS2 so or deselected MTD. Then is was hanging at NTFS so I turned that off. Now it hangs here. Obviously it's hitting some memory limit but I don't know what.

Any ideas?

0 Kudos

908 Views
jkimble
Contributor III

My BDM doesn't allow debugging on Linux.

I'll start working in head.S to see what's going on. This is really odd though. I mean the only difference here is CS0's configuration on the flex bus. The configuration I'm using is known good from working with Colilo and the 2.6.10 kernel. In fact, with a single change to the linux vmlinux-cf.lds this same kernel boots from my modified version of Colilo. Very weird. I may be doing or missing something dumb. Just have to keep looking.

Thanks for your help.
0 Kudos

908 Views
Dave_SC
Contributor I
Hi JKimble,

I am trying to boot the new 547x_8x 2008 BSP with my old colilo.  You mentioned that you got your old colilo running with just a 1 line change to linux vmlinux-cf.lds.  Can you tell me what that was??  I want to use my modded colilo for now to boot the new bsp but it doesn't work as it.

Thanks,
Dave


Message Edited by Dave_SC on 2009-01-20 08:43 PM
0 Kudos

908 Views
jkimble
Contributor III
 
In /linux-2.6.25/arch/m68k/coldfire/vmlinux-cf.lds modify the definition of
 
START_OFFSET from 0x20000 to 0x1000.
 
You will also need to modify Colilo's console rate to 115K from the origninal 19.2K (this kernel's console is faster!!).
 
As far as I remember that was all I needed to do. Hope that helps.
 
James
0 Kudos

908 Views
Dave_SC
Contributor I
Hi jkimble,

Thanks *very* much for the reply. 
As you know the waiting for responses are "frustrating" :smileywink:

Funny thing that happens, many times you post a question and then figure it out immediately after the post.  I and I reduced my console speed to keep the loader the same for now.   I figured out those changes after my post, but now I have 2 more issues...

1) Old Colilo now places my commandline not at the end of the linux image, so the boot record is not found.  I have posted new thread regarding this issue.
2) Next I get an error on kernel boot in the init/start_kernel() function:
...
start_kernel(): console_init()
Console: colour dummy device 80x25
start_kernel(): vfs_caches_init_early()
__alloc_bootmem_core(): zero-sized request

...the joys of upgrading...

Have you run into these issues?

I wanted ask you about trading direct emails for mutual benefit since we both seem to be playing with similar hardware, but I don't know how to do that without posting email addrs cleartext to the rest of the planet.

Thanks again,
Dave



Message Edited by Dave_SC on 2009-01-20 08:42 PM
0 Kudos