[uClinux-dev] Boot uCLinux 2.4.x from ROM with MCF5206e

H. Holfelder h.holfelder at tde-online.de
Mon Aug 8 02:42:28 EDT 2005


Hi,
I have a problem with a new board with MCF5206e processor, porting
uCLinux 2.4.x. There is no development Kit, only a loader which writes
the image to the flash.
Therefor i need to boot from ROM.
I have successfully ported uCLinux 2.0.38 to the board, booting from ROM
with a ROMFS. Does someone knows a Realtime extension for uCLinux 2.0.x 
for Coldfire?

For the RTAI we need uCLinux 2.4.x and there are some problems while 
porting. (Just porting uCLinux2.4.x, not RTAI.)

I have read a lot of articles here in the Newsgroup with similar
problems, but I haven't found the answer.

The kernel starts and I see some outputs. When the start_kernel function
goes to idle and do a task switch to init the system crashes.

I found out that this happens when 'rts' is called in function 'resume'
in Entry.S witch is called by switch_to (prev, next, prev) called from
sched.c

I found out, that the prev->mm, the prev->active_mm and the next->mm
aren't initialized and next->active_mm only some parts are OK

Here is the dump of the next->active_mm:
TEXT=00020040-0008b478 DATA=00000000-70016000 BSS=70016000-00000000
USER-STACK=00000000  KERNEL-STACK=701ee000

Memory:
Flash (ROM) 0x00000000 - 0x00200000
MCF_MBAR    0x20000000
RAM         0x70000000 - 0x70200000
Other areas are unused for this time.


The boards RAM start at 0x70000000, the code in flash is placed at 0x20040.
I think there is no (or wrong) initialization of the task_struct. But
where or when is this done?

I append the output (with several debug information) while starting the
  Linux:

Linux version 2.4.27-uc1 (uclinux at pc-luebbers) (gcc version 2.95.3
20010315 (release)(ColdFire patches - 20010318 from
http://fiddes.net/coldfire/)(uClinux XIP
and shared lib patches from http://www.snapgear.com/)) #184 Do Aug 4
15:45:28 CEST 2005

uClinux/COLDFIRE(m5206e)
COLDFIRE port done by Greg Ungerer, gerg at snapgear.com
Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne
KERNEL -> TEXT=0x020040-0x08b478 DATA=0x70000400-0x70016000
BSS=0x70016000-0x700280f4
KERNEL -> ROMFS=0x0a1078-0x0bff68 MEM=0x70029000-0x701f0400
STACK=0x701f0400-0x701f0400
called init_bootmem_node (0x70005df4, 0x70029, 0x70000, 0x701f0)
   setup arch: bootmap_size=0x40
On node 0 totalpages: 496
zone(0): 0 pages.
zone(1): 496 pages.
zone(2): 0 pages.
Kernel command line:
Calibrating delay loop... 35.53 BogoMIPS
Memory available: 1784k/1984k RAM, 0k/0k ROM (429k kernel code, 159k data)
kmem_create: Forcing size word alignment - vm_area_struct
kmem_create: Forcing size word alignment - mm_struct
kmem_create: Forcing size word alignment - filp
Dentry cache hash table entries: 512 (order: 0, 4096 bytes)
Inode cache hash table entries: 512 (order: 0, 4096 bytes)
kmem_create: Forcing size word alignment - inode_cache
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
kmem_create: Forcing size word alignment - bdev_cache
kmem_create: Forcing size word alignment - cdev_cache
kmem_create: Forcing size word alignment - kiobuf
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 1024 (order: 0, 4096 bytes)
  --> do kern mount: filesystem List:
nodev   rootfs
nodev   bdev
nodev   proc

POSIX conformance testing by UNIFIX
Invoking rest_init...
Kernel_thread Adresse:00074482h
Kernel_thread ENDE retval = 69376 , fs = 0x1
rest_init goes cpuidle...
cpu_idle called
idle call schedule
Welcome to G:\uClinux-dist\linux-2.4.x\kernel\sched.c!
schedule check BUG_ON, current = 0x70014000
schedule BUG_ON passed, current = 0x70014000
schedule release_kernel_lock, prev = 0x70014000
schedule set sched_data
schedule mark repeat_schedule
schedule: Prozess found at: 701EC000h
schedule call prepare to switch
prev->active_mm
TEXT=2e303300-28632920 DATA=32303034-20546563 BSS=20546563-732e001d
USER-STACK=00001000  KERNEL-STACK=70016000

next->active_mm
TEXT=00020040-0008b478 DATA=00000000-70016000 BSS=70016000-00000000
USER-STACK=00000000  KERNEL-STACK=701ee000


I have tried several rom.ld and crt0_rom.S posted here, but still have 
the problem.

I hope someone can help me.
Please apologize my english isn't very good.

Thanks a lot,
Holger

-----------------------------------------------------------
H.Holfelder at tde-online.de
============================================================




More information about the uClinux-dev mailing list