Monday, June 2, 2008

How to build eCos 2.x for ARM platform



Build Linux Kernel/Module in Fedora Core 9

# Build Linux Kernel
[ ]# yum install yum-utils
[ ]# yumdownloader --source kernel

# Download Linux Kernel Source RPM
[ ]# yum install kernel-headers

# Install Linux Kernel source and patch files to "/usr/src/redhat/SOURCES/"
[ ]# rpm -ivh kernel-2.6.25.3-18.fc9.src.rpm

# Prepare to build Linux Kernel
[ ]# cd /usr/src/redhat/SPECS
[ ]# rpmbuild -bp --target=i686 kernel.spec
[ ]# cd ../BUILD/kernel-2.6.25/linux-2.6.25.i686/
[ ]# cp configs/kernel-2.6.25.3-i686.config .config

# Edit "EXTRAVERSION" in "/usr/src/redhat/BUILD/kernel-2.6.25/linux-2.6.25.i686/Makefile" file
# (example)
-EXTRAVERSION = .3
+EXTRAVERSION = .3-18.fc9.i686

# Build Linux Kernel
[ ]# make
[ ]# make modules
[ ]# make modules_install
[ ]# make install

# Check "GRUB" configuration file "/etc/grub.conf"
# (example)
+title Fedora (2.6.25.3-18.fc9.i686)
+ root (hd0,1)
+ kernel /vmlinuz-2.6.25.3-18.fc9.i686 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
+ initrd /initrd-2.6.25.3-18.fc9.i686.img

# reboot.

# Check Linux Kernel Version
[ ]# uname -a

# Compile module - via-rhine NIC
(example)
1. via-rhine.c
2. Makefile
============================================================
ifneq ($(KERNELRELEASE),)
obj-m := via-rhine.o

else
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
rm -r -f .tmp_versions *.mod.c .*.cmd *.o *.symvers

endif

clean:
rm -rf via-rhine.ko

============================================================
3. [ ]# make

# Install module
4. [ ]# insmod via-rhine.ko

# Remove module
5. [ ]# rmmod via-rhine

Troubleshot
1Q:
[ ]# insmod via-rhine.ko
insmod: error inserting 'via-rhine.ko': -1 Unknown symbol in module

1A:
1A.1 - Check module dependence
[ ]# modinfo via-rhine.ko
filename: via-rhine.ko
license: GPL
description: VIA Rhine PCI Fast Ethernet driver
author: Donald Becker
srcversion: 8158094F4B64FDC36073DA7
alias: pci:v00001106d00003053sv*sd*bc*sc*i*
alias: pci:v00001106d00003106sv*sd*bc*sc*i*
alias: pci:v00001106d00003065sv*sd*bc*sc*i*
alias: pci:v00001106d00003043sv*sd*bc*sc*i*
depends: mii
vermagic: 2.6.25.3-18.fc9.i686 SMP mod_unload 686 4KSTACKS
parm: max_interrupt_work:VIA Rhine maximum events handled per interrupt (int)
parm: debug:VIA Rhine debug level (0-7) (int)
parm: rx_copybreak:VIA Rhine copy breakpoint for copy-only-tiny-frames (int)
parm: avoid_D3:Avoid power state D3 (work-around for broken BIOSes) (bool)

1A.2 - Check "depends" field for other modules
[ ]# insmod /lib/modules/2.6.25.3-18.fc9.i686/kernel/drivers/net/mii.ko
[ ]# insmod via-rhine.ko

Download Sample Code

Great site: http://www.mjmwired.net/resources/mjm-fedora-f8.html

Friday, November 9, 2007

Sample C Code

Sample C Code - about point

Friday, November 2, 2007

Auto-Speaking System


Auto-Speaking System-

Wednesday, October 17, 2007

Wireless Standards


IEEE Wireless Standards

Monday, October 15, 2007

Wireless Router Solution - WRT

Open Source Solution for Wireless Router.

Thursday, September 20, 2007

Network Performance

  • Throughput [Tools: Qcheck, IxChariot]

In communication networks, throughput is the amount of digital data per time unit that is delivered over a physical or logical link, or that is passing through a certain network node. For example, it may be the amount of data that is delivered to a certain network terminal or host computer, or between two specific computers. The throughput is usually measured in bit per second (bit/s or bps), occasionally in data packets per second or data packets per timeslot. The term corresponds to digital bandwidth consumption.

It is the amount of data per second that was successfully sent between the two endpoints.

  • Packet Loss [Tools: Qcheck, IxChariot]

Packet loss occurs when one or more packets of data traveling across a computer network fail to reach their destination.

Packet loss can be caused by a number of factors, including signal degradation over the network medium, oversaturated network links, corrupted packets rejected in-transit, faulty networking hardware, maligned system drivers or network applications, or normal routing routines.

  • Latency [Tools: IxChariot]

Latency (delay) is an expression of how much time it takes for a packet of data to get from one designated point to another.

  • Jitter [Tools: IxChariot]

Jitter is the variations of delay.

  • Response Time [Tools: Qcheck, IxChariot]

It is the number of seconds it took to complete a transaction.

A transaction means a sequence of information exchange and related work that is treated as a unit for the purposes of satisfying a request.

  • Transaction Rate [Tools: IxChariot]

It would be calibrated in transactions per second.

Tools

(1) Qcheck (Free, from IXIA)

http://www.ixiacom.com/products/display?skey=qcheck

(2) IxChariot ($$$, from IXIA)

(3) Endpoint (Free, from IXIA. Can be used by Qcheck & IxChariot)

http://www.ixiacom.com/support/endpoint_library/