Well now, that wasn’t that hard was it?
Well actually yes, and no. Originally I tried to get Linux on my coldfire board (5251) and I discovered I needed a new dbug monitor version, I thought I’d uploaded it correctly and hosed my debug monitor.
Thanks to a friend, I received a PNE USB Multilink programmer, which let’s me reflash the flash with anything I want (yay!), including a new version of the debug monitor. So, that done. I set about getting linux into the coldfire.
Now the instructions say I can do “dnfl 0×20000″ which tells it to download it, then flash it, perfect. Except it doesn’t work. It downloads it but gives an error saying it can’t flash it, humph. Now this might be because the only debug monitor I could find online was for the 5253 Evaluation board, and mine is the 5251 board. The main difference is the lack of ethernet and the addition of audio ins and outs.
Not to give in, I decided to try a straight ‘dl 0×20000′ which just downloads it to ram. you then type ‘go’ and off you jolly well. And guess what, it worked !
booted up, dropped me at a nice # prompt.
Here’s what dmesg had to say ;-
# dmesg
Linux version 2.6.17.7-uc1 (mattw@kea) (collect2: ld returned 1 exit status) #1 Thu Mar 1 16:27:22 MST 2007
uClinux/COLDFIRE(m5253)
COLDFIRE port done by Greg Ungerer, gerg@snapgear.com
Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne
On node 0 totalpages: 4096
Normal zone: 4096 pages, LIFO batch:0
Built 1 zonelists
Kernel command line: rootfstype=romfs
PID hash table entries: 128 (order: 7, 512 bytes)
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory available: 13532k/16384k RAM, (1052k kernel code, 225k data)
Calibrating delay loop… 92.56 BogoMIPS (lpj=462848)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
USB-MCF5253: (HOST module) EHCI device is registered
USB-MCF5253: (OTG module) EHCI device is registered
USB-MCF5253: (OTG module) UDC device is registered
USB-MCF5253: (OTG module) ULPI device is registered
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
io scheduler noop registered
io scheduler cfq registered (default)
Generic RTC Driver v1.07
ISA-Philips-Basic-CAN memory mapped CAN Driver 3.0_ColdFire_FlexCAN (c) Mar 1 2007 16:26:21
ColdFire internal UART serial driver version 1.00
ttyS0 at 0×100001c0 (irq = 154) is a builtin ColdFire UART
ttyS1 at 0×10000200 (irq = 155) is a builtin ColdFire UART
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
uclinux[mtd]: RAM probe address=0×15f6f4 size=0×143000
Creating 1 MTD partitions on “RAM”:
0×00000000-0×00143000 : “ROMfs”
uclinux[mtd]: set ROMfs to be root filesystem
MCF5253EVB flash device: 200000 at ffe00000 Partition number 3
MCF5253EVB Flash Map Info: Found 1 x16 devices at 0×0 in 16-bit bank
Amd/Fujitsu Extended Query Table at 0×0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Creating 3 MTD partitions on “MCF5253EVB Flash Map Info”:
0×00000000-0×00030000 : “dBUG partition”
0×00030000-0×00040000 : “Date partition”
0×00040000-0×00200000 : “Kernel partition”
MCF5253EVB flash device initialized
QSPI device driver installed OK
ColdFire QSPI (at 0×000c9e6a) called request_irq without a dev_id!
MCF5253 QSPI driver ok
usbmon: debugfs is not available
Initializing USB Mass Storage driver…
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usbcore: registered new driver libusual
usbcore: registered new driver hiddev
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
NET: Registered protocol family 1
VFS: Mounted root (romfs filesystem) readonly.
Freeing unused kernel memory: 48k freed (0×137000 - 0×142000)
WARN: Real-time clock power loss.
Date information may be corrupt!
WARN: Real-time clock power loss.
Date information may be corrupt!
#
Cracking stuff! And just for completeness here’s some other extracts ;-
#uname -a
uClinux (none) 2.6.17.7-uc1 #1 Thu Mar 1 16:27:22 MST 2007 m68knommu unknown
# cd /dev
# ls
audio input mtdblock0 ptyp4 random sdc1 ttyp6
audio1 ipsec mtdblock1 ptyp5 rom0 sdd ttyp7
can0 kmem mtdblock2 ptyp6 rom1 sdd1 ttyp8
can1 log mtdblock3 ptyp7 rom2 shm ttyp9
console loop0 mtdblock4 ptyp8 rom3 tty ttypa
cua0 loop1 mtdblock5 ptyp9 rom4 tty0 ttypb
cua1 md0 mtdblock6 ptypa rom5 tty1 ttypc
dsp md1 net ptypb rom6 tty2 ttypd
dsp1 mem null ptypc rom7 tty3 ttype
event0 mtab ppp ptypd rom8 ttyS0 ttypf
fb0 mtd0 psaux ptype rom9 ttyS1 urandom
hda mtd1 ptmx ptypf rtc ttyp0 zero
hda1 mtd2 pts qspi sda ttyp1
hdb mtd3 ptyp0 ram0 sda1 ttyp2
hdb1 mtd4 ptyp1 ram1 sdb ttyp3
i2c0 mtd5 ptyp2 ram2 sdb1 ttyp4
image mtd6 ptyp3 ram3 sdc ttyp5
# df -k
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/rom0 1289 1289 0 100% /
# ps -aux
PID Uid VmSize Stat Command
1 root SW init
2 root RWN [ksoftirqd/0]
3 root SW< [events/0]
4 root SW< [khelper]
5 root SW< [kthread]
6 root SW< [kblockd/0]
7 root SW< [khubd]
8 root SW< [kseriod]
9 root SW [pdflush]
10 root SW [pdflush]
11 root SW [kswapd0]
12 root SW< [aio/0]
13 root SW [mtdblockd]
57 root SW /sbin/syslogd -n
60 root SW /sbin/klogd -n
86 root SW -sh
101 root RW ps -aux
The next Challenge is going to be getting it into flash and booting when I switch it on, rather than waiting the 15 minutes to download it via serial port! From there, getting the second serial port (ttyS1) to work so I can use that for Midi. Then finally getting it to look at the SD card so I can use that to load apps. I’d also *really* like to get it to boot from SD, but I suspect that’s a way off yet.
Anyway, for now, Linux is running!