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 http://svn.nslu2-linux.org/svnroot/optware/trunk optware
[ ]# cd optware

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

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

Reference:
1. http://trac.nslu2-linux.org/optware
2. http://peter.korsgaard.com/articles/debian-nslu2.php

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 http://rpms.famillecollet.com/fc6.i386/firefox2-2.0.0.14-1.fc6.remi.i386.rpm
[ ]# rpm -Uvh firefox2-2.0.0.14-1.fc6.remi.i386.rpm

Other RPM source:
firefox2-2.0.0.14-1.fc6.remi.i386.rpm
firefox2-devel-2.0.0.14-1.fc6.remi.i386.rpm

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

SLAB, SLUB, SLOB

SLAB

SLUB

SLOB -- For Embedded System

Working...

Thursday, December 25, 2008

HOWTO compile OpenWrt (Kamikaze) on Fedora Core 9

1. Checkout Kamikaze from https://dev.openwrt.org/
Development branch:
[ ]$ mkdir /home/scott/Kamikaze
[ ]$ cd /home/scott/Kamikaze
[ ]$ svn co https://svn.openwrt.org/openwrt/trunk/
[ ]$ 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-0.9.9.043-2.fc9.i386.rpm
[ ]$ rpm -ivh ecore-0.9.9.043-1.fc9.i386.rpm
[ ]$ rpm -ivh embryo-0.9.9.043-1.fc9.i386.rpm
[ ]$ rpm -ivh edje-0.9.9.043-1.fc9.i386.rpm

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

6. That's it.

Wednesday, December 24, 2008

CFI-compliant NOR Flash Device Driver

CFI-compliant NOR Flash Device Driver

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

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

Description:
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
flash_init()
flash_print_info()
write_buff()
flash_erase()

(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)

Reference:
1. JEDEC

Wednesday, December 17, 2008

JTAG

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

USB JTAG Cable
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 -

JTAGER -

Reference:
Wiki
fpga4fun

Here is what I used to try -- $800 NT
OpenJTAG ARM JTAG USB

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

Example:
[ ]# insmod /lib/modules/2.6.25.3-18.fc9.i686/kernel/drivers/uio/uio.ko
[ ]# insmod uXXX.ko

References:
Linux Magazine - Driver Shift (PDF) (Sample Code)
LWN.net - UIO: user-space drivers

Monday, December 15, 2008

iPhone 3G Video Converter

Apex iPhone Video Converter
Performance:
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
Performance:
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.

Contents
  • 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

FPGA

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

Cancel

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