Saturday, August 30, 2008

Git -- Version Control System

Git is more and more popular now so I plan to write a note about it. However, there already exist many great articles on the Internet.

1. Git - SVN Crash Course
3. Everyday GIT With 20 Commands Or So

Related Blog :
SubVersion Quick Guide

ARM RealView PB11MPCore (4.1) - Network performance Testing

I would like to introduce you some of tools for measuring network performance here. They are pretty simple and useful.

Iperf is a tool to measure maximum TCP bandwidth, allowing the tuning of various parameters and UDP characteristics. Iperf reports bandwidth, delay jitter, datagram loss.

Scott's slide about iperf.

nuttcp is a TCP/UDP network testing tool, much like iperf. I think it's the best such tool available, for its simplicity, ease of use, and feature set.

Netperf is a benchmark that can be used to measure the performance of many different types of networking. It provides tests for both unidirecitonal throughput, and end-to-end latency.





Related Blog :
Network Performance

Monday, August 25, 2008

ARM RealView PB11MPCore (4) - Testing


[ ]# cd lmbench3/src
[ ]# make
. . . . . .
gmake[1]: *** No rule to make target `../SCCS/s.ChangeSet', needed by `bk.ver'. Stop.
gmake[1]: Leaving directory `/root/Desktop/lmbench3/src'
make: *** [lmbench] Error 2

In the lmbench2 or lmbench3 directory:

[ ]# mkdir ./SCCS
[ ]# touch ./SCCS/s.ChangeSet


[ ]# make OS=arm-none-linux-gnueabi CC=arm-none-linux-gnueabi-gcc AR=arm-none-linux-gnueabi-ar

1) lmbench – an extensible micro-benchmark suite (2004)
2) lmbench3: measuring scalability (2002)
3) lmbench: Portable Tools for Performance Analysis (1996)

Friday, August 22, 2008

ARM RealView PB11MPCore (3) - Troubleshooting

Bug! Bug! Bug!
1) Flash
2) Ethernet (SMSC LAN9118)
3) PCI
4) PCI Express
5) USB (NXP ISP1761) (doc)

ARM RealView PB11MPCore (2) - Installation

Power on evaluation board. Switch to the "Flash" submenu of the Boot Monitor:
K:\> flash

Burn u-boot, Linux kernel and root filesystem
Flash> write image U-BOOT.AXF
Flash> write binary UIMAGE
Flash> write binary BASE.RFS

Display flash layout
Flash> list images
Flash Area Base 0x40000000

Address Name
------- ----
0x40000000 Boot_Monitor
0x40040000 NFU
0x40080000 SYSTEM.DAT
0x400C0000 U-BOOT
0x40100000 UIMAGE
0x402C0000 BASE

Flash Area Base 0x43FC0000
Flash Area Base 0x44000000
Flash Area Base 0x47FC0000

Flash> exit

Run u-boot
> flash run U-BOOT

Set some environment variable for u-boot
RealView_PB # setenv bootargs root=/dev/mtdblock0 mtdparts=armflash.0:7268k@0x2C0000(cramfs) ip=dhcp mem=128M console=ttyAMA0
RealView_PB # setenv bootcmd cp 0x40100000 0x7fc0 0x100000\; bootm
RealView_PB # saveenv

reset, bootup Linux

ARM RealView PB11MPCore (1) - Compile

Install Toolchain
[ ]# mkdir -p /home/MPCore/toolchain
[ ]# cd /home/MPCore/toolchain
[ ]# wget
[ ]# tar jxvf arm-2007q1-21-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
[ ]# export PATH=/home/MPCore/toolchain/arm-2007q1/bin:$PATH

[ ]# mkdir -p /home/MPCore/u-boot
[ ]# cd /home/MPCore/u-boot
[ ]# wget
[ ]# tar zxvf U-Boot-src.tar.gz
[ ]# cd projects/prd33_ael/overnight/src/
[ ]# make realview_pb11mp_config
[ ]# make

Linux Kernel 2.6.24-arm2

[ ]# mkdir -p /home/MPCore/linux
[ ]# cd /home/MPCore/linux
[ ]# wget
[ ]# ;; Download kernel_src_patch-2.6.24-arm2.gz
[ ]# ;; Download default linux kernel configuration file

[ ]# tar jxvf linux-2.6.24.tar.bz2
[ ]# cd linux-2.6.24
[ ]# zcat ../kernel_src_patch-2.6.24-arm2.gz | patch -p1
[ ]# cp ../config-2.6.24-arm2-realview-v6-smp .config
[ ]# make menuconfig
[ ]# make
[ ]# make uImage

After the build has completed, the resulting uImage will be located in the arch/arm/boot directory.

Image Name: Linux-2.6.24-arm2
Created: Fri Aug 22 05:09:41 2008
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1684912 Bytes = 1645.42 kB = 1.61 MB
Load Address: 0x00008000
Entry Point: 0x00008000
Image arch/arm/boot/uImage is ready

Root File System
Download source code, pre-built filesystem images (full or base)
[ ]# wget
[ ]# wget
[ ]# wget

ARM RealView PB11MPCore (0)

I got the evaluation board (PB11MPCore) yesterday. Basically, this "Symmetric Multi-Processing" platform is my first SMP project for embedded system. That would be fun.

Linux's gonna be port to this platform and our next generation SoC. Cool!

I would like to share all my experience about this. Let's get start it. :)

Wednesday, August 20, 2008

USB OTG on the Linux Kernel


Some background
USB 1.0 - 1996, 01.
USB 2.0 - 2000, 04.
OTG 1.0 - 2001, 12. Supplement to the USB 2.0 Specification
OTG 1.3 - 2006, 12. Supplement to the USB 2.0 Specification

On-The-Go Supplement to the USB 2.0 Specification, Revision 1.3
(TOC, 53 pages)
1. Introduction
2. Acronyms and Terms
3. Significant Features
4. Cables and Connectors
5. Electrical Requirements
5.1 A-Device Electrical Requirements
5.2 B-Device Electrical Requirements
5.3 Session Request Protocol
5.4 Electrical Characteristics
5.5 Device Timings
6. Host Negotiation Protocol

Something new in OTG 1.0
Session Request Protocol (SRP)
USB OTG uses the SRP to establish a session (connection) between two USB devices.

Host Negotiation Protocol (HNP)
Once connected, OTG dual-role devices can exchange roles—host and peripheral—by using HNP.

Targeted Peripheral List (TPL)

No Silent Failures

Mini-AB Receptacle

Mini-A Plug and Mini-A Receptacle

USB OTG on the Linux Kernel

(1) SMC WSKP100 Wi-Fi Phone

USB On-The-Go

Related Blog:
USB Mass Storage Device Descriptor

PCI Express Subsystem on the Linux Kernel

PCI Express subsystem on the Linux kernel

Scott's slide Draft

Reading List
1. PCI Express System Architecture, MindShare. Inc. (PDF)
2. Introduction to PCI Express - A Hardware and Software Developer's Guide (PDF)

Tuesday, August 12, 2008

IEEE 1588 - 2008

I gonna study this week. It's about "Precision Clock Synchronization Protocol".
Scott's slide.

Linux ptp: IEEE 1588 hardware clock support (patch)