Pages

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:

Wednesday, January 24, 2007

Malaysia Football, Going No Where?

If you have ever had an opportunity to watch Malaysia play, don’t expect too much. This is my only advice to those who love the game. I considered myself a fanatic fan for local football during my early days, but no more now! I went to stadium to watch Penang play in City Stadium and almost all the matches involving Malaysia in Klang Valley. However, I feel sick each time watching them play in the stadium. Yesterday, it was a match between Malaysia versus Singapore in Asean Cup competition. I had managed to catch a few minutes of the match after coming out from the barber shop. My colleagues actually invited me to the stadium but I’m in no mood to go there. You won’t believe that after football turning professional for almost 10 years here. (The first professional league in Asia, but Japan does it much better than us in such a short time frame) Our national players still could not apply the basic skills, such as passing, holding and shooting the ball properly. Terrible!!! Our striker even balloons the ball without any pressure from the opponents. And until today, we still use the technique “hit-and-run”, too many long ball and too direct. This technique is not suitable for Asian team since we could not physically match the European players. Asian teams, such as Korea and Japan, have starting to look for new technique but Malaysia is far away behind. I promise myself if Malaysia enters the World Cup Final I will go to watch them no matter where. But it will not materialize if this is same team I watched yesterday! Look at the world ranking, where is Malaysia?

38 Iran
47 Japan
51 Korea Republic
111 Singapore
117 Hong Kong
126 Lebanon
135 Kazakhstan
137 Thailand
139 Kyrgyzstan
141 Yamen
144 Bangladesh
145 Sri Lanka
151 Laos
152 Malaysia

We are below Laos!!!! This year, we are going to hold the Asian Cup and again we qualify because we are the host nation, not based on merit. Is this going to be the same for World Cup Final? Lack of professional management in local league, majority of players with no attitude and desire, bias in selection of team players….. Malaysia football is going nowhere!

Thursday, January 18, 2007

PIC & Technical Talks

I have written a simple NE2000-clone driver for the PIC16 micro-controller. The driver provides two mechanisms: Polling and Interrupt based packet reception. Polling is based on the observation on the two pointers in the receive buffer ring. Interrupt is based on the triggering interrupt signal coming from the Ethernet controller. This task is similar to what I have done for my master thesis. I actually transferred most of code from AVR Atmel micro-controller to PIC micro-controller. I found out that the PIC16 uses the 8-level deep hardware stack, thus overflow can be occurred after more than 8 nested function calls. At the same time, all RAM location required by a function are statically linked to a specific address at link time and RAM is reused for functions not active at the same time. So, no recursive calls are allowed. Quite different with the Atmel microcontroller which I have used before.


We had successfully organized two IEEE ComSoc Technical Talks at MCMC (12th Jan) and TMRND (17th Jan). The talk in MCMC was all about Cyberspace Security and MCMC will held a series of technical talks in this year. Dr Jeffrey Bannister spoke about the Fixed Mobile Convergence (FMC) and 3G IP Multimedia Subsystem (IMS), FMC and IMS will move current telecommunication system towards to a full IP based system. Peoples in Telco site have to start understand the network characteristic of IP instead of just 64 kbps time slot. I agree that the IMS is hard to deploy mainly due to difficulty of finding a business model which could benefit the content developer and also the network operator. Who should bear the cost if a content developer has developed a fantastic application and would like to put its application on the network operator site? The network operator argues that the content developer must pay for the service offered by him. However, the developer thinks that the operator is doing nothing and simply gains from the application that he/she develops. It is hard to push the IMS if there is no suitable content for the end user. A big pipe or high bandwidth is simply useless. This is the same story to 3G.

Wednesday, January 17, 2007

IL Divo Live in KL


A fascinating night in KLCC Plenary for “IL Divo Live in KL” with my partner. My dear had introduced this operatic pop vocal group to me last year. Thanks to my dear. I have their first and second album songs ripped in my notebook. The quartet decided to kick start their world tour 2007 in KL. I can’t remember how many songs had been performed yesterday. The entire concert took around 1 hour 45 minutes accompanied by a live band and small orchestra. They performed the song in Spanish, Italian, English and France with their powerful vocal. Songs such as “Hero” and “Unbreak My Heart” are performed not in English. Maybe that’s true that “Love is the same, no matter in which language”. But actually I can’t differentiate the songs in Spanish and Italian. My girlfriend was almost “out-of-control” at the end of the concert. Luckily, we sat in upstairs and were no-way near the stage. Otherwise, I think that she will even slap me if I ever ask her to stay calm

Tuesday, January 16, 2007

Submarine Cable

We had encountered severe internet congestion last two weeks due to earthquake in Taiwan. But my company also faced the problem on unnecessary packet transmission from the Internet Messaging Service (IMS). Statement below from Jame Seng clarifies my understanding on submarine cable. I first thought that the cable is laid under the seabed.

“Submarine cables are not under the seabed. It is just laid across the sea. It is only when it crosses major shipping lines and fishing zones (mostly near the coast) that it is lay (5 to 10m below) under the seabed. Therefore, it is not unusual for submarine cable to be cut, mostly due to deep-sea fishing”

Some pictures regarding the submarine cable route.....




Thursday, January 11, 2007

5 things that you didn't know about me

Just saw that Sooth tagged me. Let's go straight to the point.

  1. I am a right-handed guy but I do wear my watch on my right as well.
  2. My grandma had to accompany me to the school for the opening week in kindergarten and also standard one. She had to stay until my class and brought me home. Why? My mum said that she can’t resist herself to see me cry in the class.
  3. I won a badminton tournament without wining a single game. It was a team event in my company and I was field for the single and double against all the opponents. I lost all my matches but my teammates won the championship trophy for me. Not bad heh ;) After the tournament, my team manager said to me that I was “umpan” to other teams and he was correct! Thinking about Kwan Yoke Meng. Do you remember him? 1992 Thomas Cup?
  4. The only subject which I failed in my primary school was Music. But I joined the school band in my secondary and played Euphonium (a kind of musical instruments similar to Tuba – small size Tuba). Eventually, I became the leader for the Euphonium group :)
  5. I had never stayed away from home until the age of 18. The first outing was KL trip with my friends.

If we would like to have a deadlock, then I will tag Sooth back, but I choose to tag Sooth’s sister.