Friday, January 26, 2007

Porting uClinux to MicroBlaze

It is fun to have an opportunity to work with reconfigurable system and uClinux (you-see-linux). I had successfully ported uClinux to the Xilinx MicroBlaze development board which features Virtex-4 FPGA. Spent almost two days to map the Flash Memory due to my first impression that the Atmel Flash is compatible with Intel one. But actually it is compatible to Intel competitor, AMD! MicroBlaze is a 32-bits RISC soft processor and uClinux is Linux version for Microcontroller without MMU (see the penguin). Reconfigurable system means that you can incorporate any peripherals as you wish. These peripherals can talk to you processor via OPB, FSL or LMB. It provides a flexibility platform to the hardware designer and software designer to complete an application-specific system. I have worked with uClinux in Arcturus board before but this one is much challenging. Thanks to Dr. John Williams. It makes me a good start with such detailed information. Throughout the porting process, I have learned some new concepts, such as XIP, bFLT and flatfsd. Storing data in persistent stage using flatfsd is something news for me. It’s great to use this especially for storing the initial setting for your peripherals during startup, such as mounting the NFS for development. Ah.., a simple web server is up....

Startup Script:

Linux version 2.4.32-uc0 (root@yeow) (gcc version 3.4.1 ( Xilinx EDK 8.1 Build EDK_I.17 090206 )) #107 Fri Feb 2 14:47:37 MYT 2007
On node 0 totalpages: 16384
zone(0): 16384 pages.
zone(1): 0 pages.
zone(2): 0 pages.
CPU: MICROBLAZE
Kernel command line: ¸
Console: xmbserial on UARTLite
Calibrating delay loop... 49.66 BogoMIPS
Memory: 64MB = 64MB total
Memory: 60792KB available (1239K code, 2790K data, 52K init)
Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)
Inode cache hash table entries: 4096 (order: 3, 32768 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 4096 (order: 2, 16384 bytes)
Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Microblaze UARTlite serial driver version 1.00
ttyS0 at 0x40600000 (irq = 3) is a Microblaze UARTlite
ttyS1 at 0x40620000 (irq = 4) is a Microblaze UARTlite
Starting kswapd
xgpio #0 at 0x40000000 mapped to 0x40000000
xgpio #1 at 0x40020000 mapped to 0x40020000
xgpio #2 at 0x40040000 mapped to 0x40040000
xgpio #3 at 0x40060000 mapped to 0x40060000
Xilinx GPIO registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
eth0: using fifo mode.
eth0: Xilinx EMAC #0 at 0x40C00000 mapped to 0x40C00000, irq=0
eth0: id 2.0l; block id 11, type 1
uclinux[mtd]: RAM probe address=0x241700b4 size=0x280000
uclinux[mtd]: root filesystem index=0
MicroBlaze auto-config flash probe(0x22000000,4194304,2): 400000 at 22000000
Amd/Fujitsu Extended Query Table v1.0 at 0x0041
Flash: JEDEC Device ID is 0xC8. Assuming broken CFI table.
Flash: Swapping erase regions for broken CFI table.
number of CFI chips: 1
cfi_cmdset_0002: Disabling fast programming due to code brokenness.
Creating 8 MTD partitions on "Flash":
0x00000000-0x00004000 : "Bootloader"
0x00004000-0x00008000 : "Bootargs"
0x00008000-0x0000c000 : "MAC"
0x00010000-0x00020000 : "Config"
0x0000c000-0x00010000 : "Spare"
0x00100000-0x00400000 : "Image"
0x00400000-0x00400000 : "JFFS2"
mtd: partition "JFFS2" is out of reach -- disabled
0x00000000-0x00400000 : "Flash"
MicroBlaze auto-config ram probe(0x241700b4,2621440,4): 280000 at 241700b4
Creating 1 MTD partitions on "RAM":
0x00000000-0x00280000 : "Romfs"
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 8192)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
VFS: Mounted root (romfs filesystem) readonly.
Freeing init memory: 52K
Mounting proc:
Mounting var:
Populating /var:
Running local start scripts.
Mounting /etc/config:
Populating /etc/config:
Clock: old time 1970/01/01 - 00:00:06
Clock: new time 1970/01/01 - 00:35:27
flatfsd: Created 4 configuration files (234 bytes)
Setting hostname: uclinux-auto
Setting up interface lo:
Setting up interface eth0:
Starting portmap:
Starting thttpd:
Mounting the NFS system
Welcome to
____ _ _
_ _ / ___ (_)_ __ _ _ _ _
'_ \ < \/ >
_ ___ _ > <
__,_\_______ _\__,_/_/\_>
_)
on Microblaze.
Developer: Chun Yeow, Yeoh on Jan 2007

uclinux-auto login:

No comments: