Monday, December 29, 2008

HOWTO compile Optware on Fedora Core 9

1. Checkout source code from SVN server
[ ]# mkdir /home/NSLU2-Linux
[ ]# cd /home/NSLU2-Linux
[ ]# svn co optware
[ ]# cd optware

2.1 For Linksys NSLU2 platform:
[ ]# make nslu2-target
[ ]# make

2.2 For ts72xx platform:
[ ]# make ts72xx-target
[ ]# make
-- Failed


Friday, December 26, 2008

HOWTO install/upgrade firefox-2 on Fedora Core 6 (FC6)

FC6 uses Firefox 1.5 by default. If you want to use Firefox 2, this blog is for you.

[ ]# wget
[ ]# rpm -Uvh firefox2-

Other RPM source:

1. HOWTO: Install Firefox 2.0 on Fedora Core 6
2. Installing Firefox 2 on Fedora Core 6




SLOB -- For Embedded System


Thursday, December 25, 2008

HOWTO compile OpenWrt (Kamikaze) on Fedora Core 9

1. Checkout Kamikaze from
Development branch:
[ ]$ mkdir /home/scott/Kamikaze
[ ]$ cd /home/scott/Kamikaze
[ ]$ svn co
[ ]$ cd trunk

2. Checkout more packages (for Xorg...)

[ ]$ make package/symlinks

3. Enter menuconfig-style menu, enable X.

4. Install some RPMs
[ ]$ rpm -ivh eet-1.0.1-1.fc9.i386.rpm
[ ]$ rpm -ivh evas-
[ ]$ rpm -ivh ecore-
[ ]$ rpm -ivh embryo-
[ ]$ rpm -ivh edje-

5. Compile OpenWrt!
[ ]$ make
[ ]$ make V=99

6. That's it.

Wednesday, December 24, 2008

CFI-compliant NOR Flash Device Driver

CFI-compliant NOR Flash Device Driver

Example: MXIC MX29LV640D T/B (Parallel, Top Boot Flash)

Bootloader: u-boot-2008.10 (tar.bz2)

You can implement the driver in two different ways. The first one is a standalone driver and the second one is based on CFI (Common Flash Interface).
(1) You have to implement at least four functions in flash.c

(2) Use the common CFI flash driver
You just need to do some patch work about flash chip.

Patch File:
(1) Standalone Device Driver (source code)
(2) CFI (patch file)

Querying the flash information on u-boot
[]# flinfo
Bank # 1: MXIC 29LV640DT FLASH (8 x 8) Size: 8 MB in 135 Sectors
   AMD Legacy command set, Manufacturer ID: 0xC2, Device ID: 0xC9
   Erase timeout: 30000 ms, write timeout: 100 ms

   Sector Start Addresses:
   10000000 ......

CFI Specifications:
1. Common Flash Memory Interface Specification, Release 2.0, AMD, 2001 (Download)
2. Common Flash Interface (CFI) JEDEC Standard, JESD 68.01, 2003 (Download) (2)
3. Common Flash Interface ID Codes, JEP 137B, 2004 (Download) (2)


Wednesday, December 17, 2008


Parallel JTAG Cable
1. How To Do Jtag Cable
2. Benjamin Henrion Web Space

1. Gateworks USB JTAG Programmer
2. USB JTAG adapter
3. Bus_Blaster

Here is the thing that I would like to program on-board flash in embedded device. Is it possible to use this cable and a programming utility running on a Windows/Linux PC enables me to do this?

Wiggler JTAG Cable
This kind of cable is the most simple one and can be make by yourself. Check Benjamin Henrion's Web Space for more information. You can also buy one from OLIMEX or TechToys.

How to use the JTAG flash utility

H-JTAG - a free JTAG debug agent for ARM
JTAG Tools -
UrJTAG - Universal JTAG library, server and tools
PortTalk - A Windows NT I/O Port Device Driver
Amontec JTAGkey -



Here is what I used to try -- $800 NT

Tuesday, December 16, 2008

User-space Linux Device Drivers

I'm not sure this is a good idea to debug or test hardware and Linux kernel. Maybe!

OS: Linux Kernel 2.6.23 or later

[ ]# insmod /lib/modules/
[ ]# insmod uXXX.ko

Linux Magazine - Driver Shift (PDF) (Sample Code) - UIO: user-space drivers

Monday, December 15, 2008

iPhone 3G Video Converter

Apex iPhone Video Converter
Input Format - 233MB, 576x432 Frame size, AVI
Output Video Format - Bitrate 900 kbps, 232MB, H.264 480x320, MP4
Output Audio Format - AAC, Stereo 192 kbps, Sample 44100 Hz
Total Time - 22 minutes

Easy Video to iPod Converter
Input Format - 233MB, 576x432 Frame size, AVI
Output Video Format - 214MB, H.264 480x360, MP4
Output Audio Format - AAC, Stereo, Sample 44100 Hz
Total Time - 27 minutes

Cheetah iPod Video Converter It's Free

Thursday, December 11, 2008

IRQ Subsystem on Linux Kernel 2.6

OS: Linux Kernel 2.6.24 or later
Platform: ARM11 MPCore

There are two important data structures of interrupts.
(1) The Interrupt Controller
hw_interrupt_type [include/linux/irq.h]
(2) The description for each IRQ (interrupt handler, interrupt status)
irq_desc [include/linux/irq.h]

The whole IRQs is defined in a global array
struct irq_desc irq_desc[NR_IRQS] [kernel/irq/handle.c]
where NR_IRQS is the maximum number of IRQs [arch/arm/mach-cns3000/include/mach/board-vega.h]

Monday, December 8, 2008

Professional Linux Kernel Architecture

Professional Linux Kernel Architecture (PDF)

Based on Linux 2.6.24, this book give us a detailed look of the kernel.

  • Chapter 1 provides an overview of the Linux kernel and describes the big picture that is investigated more closely in the following chapters.
  • Chapter 2 talks about the basics of multitasking, scheduling, and process management, and investigates how these fundamental techniques and abstractions are implemented.
  • Chapter 3 discusses how physical memory is managed. Both the interaction with hardware and the in-kernel distribution of RAM via the buddy system and the slab allocator are covered.
  • Chapter 4 proceeds to describe how userland processes experience virtual memory, and the comprehensive data structures and actions required from the kernel to implement this view.
  • Chapter 5 introduces the mechanisms required to ensure proper operation of the kernel on multiprocessor systems. Additionally, it covers the related question of how processes can communicate with each other.
  • Chapter 6 walks you through the means for writing device drivers that are required to add support for new hardware to the kernel.
  • Chapter 7 explains how modules allow for dynamically adding new functionality to the kernel.
  • Chapter 8 discusses the virtual filesystem, a generic layer of the kernel that allows for supporting a wide range of different filesystems, both physical and virtual.
  • Chapter 9 describes the extended filesystem family, that is, the Ext2 and Ext3 filesystems that are the standard workhorses of many Linux installations.
  • Chapter 10 goes on to discuss procfs and sysfs, two filesystems that are not designed to store information, but to present meta-information about the kernel to userland. Additionally, a number of means to ease writing filesystems are presented.
  • Chapter 11 shows how extended attributes and access control lists that can help to improve system security are implemented.
  • Chapter 12 discusses the networking implementation of the kernel, with a specific focus on IPv4, TCP, UDP, and netfilter.
  • Chapter 13 introduces how systems calls that are the standard way to request a kernel action from userland are implemented.
  • Chapter 14 analyzes how kernel activities are triggered with interrupts, and presents means of deferring work to a later point in time.
  • Chapter 15 shows how the kernel handles all time-related requirements, both with low and high resolution.
  • Chapter 16 talks about speeding up kernel operations with the help of the page and buffer caches.
  • Chapter 17 discusses how cached data in memory are synchronized with their sources on persistent storage devices.
  • Chapter 18 introduces how page reclaim and swapping work.
  • Chapter 19 gives an introduction to the audit implementation, which allows for observing in detail what the kernel is doing.
  • Appendix A discusses peculiarities of various architectures supported by the kernel.
  • Appendix B walks through various tools and means of working efficiently with the kernel sources.
  • Appendix C provides some technical notes about the programming language C, and also
  • discusses how the GNU C compiler is structured.
  • Appendix D describes how the kernel is booted.
  • Appendix E gives an introduction to the ELF binary format.
  • Appendix F discusses numerous social aspects of kernel development and the Linux kernel community.

Tuesday, December 2, 2008


1. Digital Systems Design with FPGAs and CPLDs Newnes, 2008 (PDF)

2. Designi with FPGAs and CPLDs CMP, 2002 (PDF)

Linux kernel bring up on ARM11 MPCore


In detail. (Non-Published Document) (PDF) (SDR, Powered by SmartDraw)