Monday, March 23, 2009

Endianness

  • Little-endian

  • Big-endian

Monday, February 9, 2009

LCD Driver for u-boot and Linux

LCD Controller:
LCD Panel:

LCD Driver for u-boot



LCD Driver for Linux

Sunday, February 1, 2009

Linux Kernel boot-up messages on ARM11 MPCore based Platform

Today is the day I successfully port Linux kernel 2.6.27.4 to our own ARM11MPCore based SoC.

Linux version 2.6.27-arm1 (scott.shu@gmail.com) (gcc version 4.1.2)
#3 PREEMPT Tue Feb 10 05:
38:07 CST 2009
CPU: ARMv6-compatible processor [410fb020] revision 0 (ARMv7), cr=00c5387f
Machine: S----- ARM11 MPCore
Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 65536
free_area_init_node: node 0, pgdat c021fc50, node_mem_map c0255000
DMA zone: 65024 pages, LIFO batch:15
CPU0: D VIPT write-back cache
CPU0: I cache: 32768 bytes, associativity 4, 32 byte lines, 256 sets
CPU0: D cache: 32768 bytes, associativity 4, 32 byte lines, 256 sets
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024
Kernel command line: root=/dev/ram0 rw init=/linuxrc mem=256M
console=ttyS0,38400
PID hash table entries: 1024 (order: 10, 4096 bytes)
Console: colour dummy device 80x30
console [ttyS0] enabled
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 256MB = 256MB total
Memory: 254848KB available (1980K code, 273K data, 88K init)
SLUB: Genslabs=12, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Calibrating delay loop... 73.11 BogoMIPS (lpj=365568)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 288 bytes
NET: Registered protocol family 16
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
NET: Registered protocol family 1
checking if image is initramfs...it isn't (no cpio magic); looks like an
initrd
Freeing initrd memory: 2379K
JFFS2 version 2.2. (NAND) i??Ac 2001-2006 Red Hat, Inc.
msgmni has been set to 502
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver1 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x78000000 (irq = 37) is a 16550A
brd: module loaded
loop: module loaded
TCP cubic registered
NET: Registered protocol family 17
VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 3
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
Freeing init memory: 88K
#
#

Friday, January 16, 2009

DMA Controller

DMA
DMA Read Operation:
1. DMAC transfers the data from the I/O device into the main memory.
2. DMAC issues an interrupt to the CPU signaling the reception of data.
3. CPU accesses the main memory and processes the received data

DMA Write Operation:
1. CPU writes the data into the main memory.
2. CPU signals the DMAC to start the transaction.
3. DMAC transfers the data from the main memory into the I/O device.

Two important properties of memory systems
Coherence and Consistency

Coherence
concerns only one memory location
Consistency concerns apparent ordering for all locations

Coherence defines the behavior of reads and writes to the same memory location.
Consistency defines the behavior of reads and writes with respect to accesses to other memory locations.

Friday, January 9, 2009

HOWTO compile Android Linux on Fedora Core 9

Android - An Open Handset Alliance Project

Compile Linux Kernel

[ ]# mkdir -p /home/android/kernel
[ ]# cd /home/android/kernel
[ ]# wget http://android.googlecode.com/files/linux-2.6.25-android-1.0_r1.tar.gz

[ ]# tar zxvf linux-2.6.25-android-1.0_r1.tar.gz
[ ]# cd kernel.git
[ ]# make goldfish_defconfig

[ ]# CROSS_COMPILE=arm-linux- make

Android SDK
Download from Andriod
[ ]# cd /home/android
[ ]# wget http://dl.google.com/android/android-sdk-linux_x86-1.0_r2.zip
[ ]# unzip android-sdk-linux_x86-1.0_r2.zip

Execute the Emulator
[ ]# cd /home/android
[ ]# ./android-sdk-linux_x86-1.0_r2/tools/emulator -kernel kernel/kernel.git/arch/arm/boot/zImage

Here we go....

Compile the Emulator

[ ]# mkdir -p /home/android/emulator
[ ]# cd /home/android/emulator
[ ]# wget http://android.googlecode.com/files/android-emulator-1.0_r2.tar.bz2

[ ]# tar jxvf android-emulator-1.0_r2.tar.bz2
[ ]# cd android-emulator-20081210

Reference:
1. Android - An Open Handset Alliance Project
2. Google Code

HOWTO lock screen as root on Fedora Core 9

The default screen saver, xscreensaver, does not support this feature, so we need "xlockmore".

[ ]# yum install xlockmore
[ ]# yum install xautolock

[ ]# xlock

Wednesday, January 7, 2009

HOWTO Install Kermit on Fedora Core 9

Installation
[ ]# mkdir kermit
[ ]# cd kermit
[ ]# wget ftp://kermit.columbia.edu/kermit/archives/cku211.tar.gz
[ ]# tar zxvf cku211.tar.gz
[ ]# make linux
[ ]# make install

User Manual
[ ]# kermit -l /dev/ttyS0 -b 9600 -c

Reference:
1. http://www.columbia.edu/kermit