Friday, September 26, 2008

USB on the Linux Kernel

When I was a BIOS engineer in Compal Electronics about 9 years ago, I first met USB in notebook. My assigned job is USB legacy support in the system BIOS, so it's an old friend to me. Definitely, USB is an excellent component and a must have function for some consumer product today. For example, PDA, iPod, Wi-Fi phone, etc. Fortunately, USB OTG makes it's possible for me to study and read USB again.

USB Reading Book List:
1. Universal Serial Bus System Architecture, Mindshare Inc.
2. Synopsys DesignWare Cores USB 2.0 Hi-Speed On-The-Go, Synopsys
3. USB 2.0 Specification, USB-IF (Download)
4. On-The-Go Supplement to the USB 2.0 Specification, USB-IF
5. ISP1761 Linux Programming Guide, NXP (PB11MPCore)
6. USB Complete: Everything You Need to Develop Custom USB Peripherals, Lakeview Research
7. USB Mass Storage: Designing and Programming Devices and Embedded Hosts, Lakeview Research

Internet Resource:
1. USB Made Simple
2. USB in a NutShell - a little journey through the USB 2.0 Spec.

Tuesday, September 23, 2008

SoC Bus


AMBA 1.0
1. ASB (Advanced System Bus)
2. APB (Advanced Peripheral Bus)

AMBA 2.0
1. AHB (Advanced High-performance Bus)
2. ASB
3. APB (Advanced Peripheral Bus)

AMBA 3.0
1. AXI (Advanced eXtensible Interface)
2. APB
3. AHB-lite
4. ATB (Advanced Trace Bus)

1. PLB (Processor Local Bus)
2. OPB (On-chip Peripheral Bus)
3. DCR (Device Control Register)

OCP (Open Core Protocol)


Introduction to AMBA Bus System (Chinese)
ARM AMBA Overview

Thursday, September 18, 2008

Top 10 Free Software on Windows

These tools maybe are not the best but are very useful to me.

01. CCleaner - It’s a system optimization and privacy tool.
02. Virtual CloneDrive - Virtual CD/DVD drive
04. Ashampoo Burning Studio Free
05. EasyShutSys
The first cracked program in my life. Ha! No more ads.
06. DVD Shrink - a software to backup DVD discs.
07. ImgBurn - a lightweight CD/DVD/HD DVD/Blu-ray burning application.
08. nrg2iso - this program converts Nero CD images into ISO-9660 CD images.
09. EasyCapture - a easy-to-use free screen capture software
10. WinSnap - Taking and editing screenshots

01. FlashGet - download manager
02. Cerberus FTP Server - FTP Server
03. HFS - HTTP File Server
06. NetMeter - bandwidth monitor
07. NetSetMan - a network settings manager which can easily switch between 6 different profiles.
09. Mac MakeUp
10. Technitium MAC Address Changer

01. VLC media player - a multimedia player
02. MPCSTAR - a package of video player and many codecs
02. VUPlayer - a multi-format audio player
03. DivX Video Player - a high-quality DivX video player
04. Matroska Pack - an extensible open standard Audio/Video container.
05. AVIcodec - a free multimedia file analyser
06. Icy Radio - a internet radio player
07. Clone2Go Video Converter (Audio Convert)
08. Free WMA to MP3 Converter
09. Flash Movie Player
10. FLV Player

Hard Disk/File Manager
01. HDD Low Level Format Tool
03. Total Commander
04. FFSJ - the Fastest File Splitter and Joiner
05. HJSplit - file splitter and joiner
06. Arpoon Checksum - checksum

01. Adobe Reader
02. CutePDF Writer - PDF creation software
03. PDFill PDF Tools
05. Free PDF to Word Doc Converter
06. Paint.NET - a image and photo editing software

Software Developer/Debug
01. TeraTerm Pro Web - It's a tool for connecting with remote Telnet and SSH hosts.
02. Tftpd32 - TFTP Server, DHCP Server
03. SolarWinds - TFTP Server, Subnet Calculator, Wake-on-LAN
04. TortoiseSVN - a revision/version/source control software.
05. IP->Com - RS232 ports on your PC to interface directly to a TCP/IP network.
06. Wireshark - Sniffer
10. SNMPView - SNMPView shows fast and simple values from SNMP devices.

Other Software Ranking:
1. TOP 300 Freeware software!

Monday, September 15, 2008


What is the world's most widely used operating system? It's not Windows, Unix or Linux, but ITRON, a Japanese real-time kernel for small-scale embedded systems.


TRON is an acronym for "The Real-time Operating system Nucleus". First heard from LinuxLink Radio Episode 10.

  • ITRON (Industrial TRON)
  • ITRON runs on mobile phones, digital cameras, CD players and countless other electronic devices.

  • BTRON (Business TRON)

  • CTRON (Central and Communications TRON)

  • MTRON (Macro TRON)

The speaker said that it was very popular in Japan. Maybe I can spend a little time on it. Hopefully.


System Performance Counter

These utilities or patch files measure the performance of the system.

Adding Performance Counters to the Kernel

Sunday, September 14, 2008

C libraries for multiple-precision computations

The GMP library is a C library for multiple-precision computations.
The MPFR library is a C library for multiple-precision floating-point computations with correct rounding.

MPFR is based on the GMP multiple-precision library.

Thursday, September 11, 2008

[Software] netsh

HOWTO: Disable/Enable network interface from command line

Platform: Windows XP, Server 2003


The original version of netsh on Windows XP can not work like that. These files are copy from Windows Server 2003. They can be used on Windows XP platform without any problem.


Monday, September 8, 2008

ARM RealView PB11MPCore (7.1) Bootloader (big-endian)

u-boot version 1.3.1
  1. u-boot source code
  2. apply ARM patch (same as ARM RealView PB11MPCore (7) Bootloader)
  3. apply endian patch
  4. make xxx_config
  5. make

Related Blog :
ARM RealView PB11MPCore (7) Bootloader

ARM RealView PB11MPCore (6.1) BootMonitor (big-endian)


Copy from "ARM Versatile Family CD Version 3.4"

ARM RealView PB11MPCore (1.2) - Toolchain (big-endian)

buildroot (version 20080824 snapshots)
[ ]# wget buildroot-20080824.tar.bz2
[ ]# tar jxvf buildroot-20080824.tar.bz2
[ ]# cd buildroot

Configuration file: .config
[ ]# wget buildroot-20080824-gcc-4.1.2.config
[ ]# mv buildroot-20080824-gcc-4.1.2.config .config

Remove lzo patches which aren't required with latest liblzo package updates.
[ ]# rm package/mtd/mtd-utils/mtd-utils-1.1.0-target-llzo.patch
[ ]# rm package/mtd/mtd-utils/mtd-utils-1.1.0-target-lzo-header.patch

[ ]# make menuconfig
[ ]# make

ARM RealView PB11MPCore (1.1) - Toolchain (little-endian)

buildroot (version 20080824 snapshots)
[ ]# wget buildroot-20080824.tar.bz2
[ ]# tar jxvf buildroot-20080824.tar.bz2
[ ]# cd buildroot

Configuration file: .config
[ ]# wget buildroot-20080824-gcc-4.1.2-armle.config.gz
[ ]# gunzip buildroot-20080824-gcc-4.1.2-armle.config.gz
[ ]# mv buildroot-20080824-gcc-4.1.2-armle.config .config

Remove lzo patches which aren't required with latest liblzo package updates.
[ ]# rm package/mtd/mtd-utils/mtd-utils-1.1.0-target-llzo.patch
[ ]# rm package/mtd/mtd-utils/mtd-utils-1.1.0-target-lzo-header.patch

[ ]# make menuconfig
[ ]# make

Wednesday, September 3, 2008

GNU Compiler


It's really hard to build a robust cross-compiler toolchain for ARM/MIPS platform. That's also a tough decision to choose the right distribution. So far, no one is perfect. We have to build our own toolchain by ourself.

I would like to introduce you some toolchain that I have used before.

This toolchain is good, however its C library is newlib. I hope they will release uclibc version in the future.

I used this one to build our own uclibc-based toolchain for ARM platform long time ago. Basically, it's workable for many different processor. The only problem is it change all the time.

They provide uclibc-based toolchain for ARM/MIPS/PPC platforms.

I have used this toolchain for Intel IXPxxx project.

I have used this suite long long time ago. If you are willing to give it a try, please check the build results first. Your life will be easier.

From Scratch (manuality)

gcc-3.4 (3.4.6)
gcc-4.3 (4.3.2)

GCC online documentation

What's difference?

CE Linux Forum

Tuesday, September 2, 2008

ARM RealView PB11MPCore (9) Root File System


ARM RealView PB11MPCore (8) Linux Kernel

Linux Kernel

Linux kernel 2.6.24 Series (patch) (.config)

Linux kernel 2.6.26 Series (patch) (.config)

Boot-up Procedure

ARM RealView PB11MPCore (7) Bootloader


  • How to port u-boot to a new platform

Project Name: realview_pb11mp

ARCH: arm
CPU: armct_rv

Board Name: realview_pb

Porting Procedure

In Brief :
[ ]# wget
[ ]# wget u-boot-mpcore.patch.gz
[ ]# tar jxvf u-boot-1.3.1.tar.bz2
[ ]# mv u-boot-1.3.1 u-boot-1.3.1-mpcore
[ ]# cd u-boot-1.3.1-mpcore
[ ]# zcat ../u-boot-mpcore.patch.gz | patch -p1
[ ]# make realview_pb11mp_config
[ ]# make
[ ]# cp u-boot u-boot.axf

Patched Files List :
patching file board/realview_pb/
patching file board/realview_pb/lowlevel_init.S
patching file board/realview_pb/Makefile
patching file board/realview_pb/realview_pb.c
patching file board/realview_pb/
patching file board/realview_pb/
patching file cpu/armct_rv/
patching file cpu/armct_rv/cpu.c
patching file cpu/armct_rv/interrupts.c
patching file cpu/armct_rv/Makefile
patching file cpu/armct_rv/start.S
patching file doc/README-realview_pb
patching file drivers/net/Makefile
patching file drivers/net/smc9118.c
patching file drivers/net/smc9118.h
patching file drivers/net/smc_rv.c
patching file drivers/net/smc_rv.h
patching file include/armsupplied.h
patching file include/asm-arm/div64.h
patching file include/asm-arm/mach-types.h
patching file include/configs/realview_pb.h
patching file lib_arm/armlinux.c
patching file lib_arm/div64.S
patching file lib_arm/Makefile
patching file MAKEALL
patching file Makefile

In Detail :

Affected directories in porting a new ARM processor design are:
board, cpu, include, and lib_arm. (and maybe drivers) All other directories remain the same for any architectures.

mkconfig -a realview_pb arm armct_rv realview_pb


A board/realview_pb/
A nclude/config.h
A include/
L include/asm -> include/asm-arm
L include/asm-arm/arch -> include/asm-arm/arch-armct_rv
L include/asm-arm/proc -> include/asm-arm/proc-armv

ARM RealView PB11MPCore (6) BootMonitor


ARM PB11MPCore Boot Monitor
Version: V4.1
Build Date: Oct 24 2007
Tile Site : Tile Not Fitted
Endian: Little
K:\> flash list image
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

Address Name
------- ----

Flash Area Base 0x44000000

Address Name
------- ----

Flash Area Base 0x47FC0000

Address Name
------- ----

Monday, September 1, 2008

The host, Ladislav Bodnar, is a colleagues of mine in Linpus, built this website couple years ago. There are some interesting statistic about Linux distributions in the world.