Saturday, December 12, 2009

Symbian Developer


Symbian Developer

Tuesday, October 27, 2009

Notification Chains

Notification Chains

For Network subsystem: example code
For System reboot: example code

Monday, October 26, 2009

Gigabit Ethernet Controller

Pseudo Linux Network Device Driver (tar.gz)

Monday, October 12, 2009

Another Beginning

Timestamp

Tuesday, September 29, 2009

Linux Timer

  • Low-Resolution Timer

  • Time Stamp: Jiffy

  • High-Resolution Timer

  • Time Stamp: Nanosecond
    Clock Base: (1) Monotonic Clock (2) Real Time Clock

  • Dynamic Tick

  • Power Management

    Objects for Time Management
    Clock Sources
    Clock Event Devices
    Tick Devices

    Saturday, September 12, 2009

    Linux IO Scheduler

    The IO Schedulers

  • No-op Scheduler

  • This scheduler only implements request merging.

  • Anticipatory IO Scheduler (AS)

  • This scheduler implements request merging, a one-way elevator, read and write request batching, and attempts some anticipatory reads by holding off a bit after a read batch if it thinks a user is going to ask for more data.

    This is optimised for the single disk systems.

  • Deadline Scheduler

  • The scheduler implements request merging, a one-way elevator, and imposes a deadline on all operations to prevent resource starvation.

  • Complete Fair Queueing Scheduler (CFQ)

  • The scheduler implements both request merging and the elevator, and attempts to give all users of a particular device the same number of IO requests over a particular time interval.

    References:
    Linux I/O Schedulers

    Thursday, August 20, 2009

    CPU affinity

    Soft CPU affinity
    Processes do not frequently migrate between processors.
    Hard CPU affinity
    Processes run on processors you specify.

    The Linux kernel API:
  • To alter the bitmask
       sched_set_affinity()
  • To view the current bitmask
       sched_get_affinity()
  • Friday, August 14, 2009

    Memory Benchmark Test

    Memory Performance

    stream



    STREAM
    void
    STREAM_Copy (double *source, double *destination, int size) {
       int j;
       size=size/8;
       for (j=0; j < size; j++)
          source[j] = destination[j];
    }

    Byte Copy
    void
    byte_copy (char *source, char *destination, int size) {
       int j;
       for (j=0; j < size; j++)
          source[j] = destination[j];
    }
    
    
    
    
    Bandwidth (x86) (0.15, 32bits) (0.16, 64bits)

    Wednesday, August 12, 2009

    CPU Benchmark Test

    CPU Core

    nbench

    Floating-Point

    fp_bench

    CPU Utilization

    sysstat

    Storage Performance Test

    Disk I/O Performance

    CrystalDiskMark (2.2)

    datamark (0.0.4)

    dd (coreutils)

    [ ]# dd if=/dev/hda1 of=/dev/hdb1 bs=4k conv=noerror,sync

    dd_rescue

    [ ]# dd_rescue /dev/zero /media/disk/zero2G -m 2G

    File System Performance

    IOzone 3

    x86 version (bin) (src)
    ARM version (bin) (src)

    Iometer

    Bonnie++

    Misc:
    sar - system activity report
       Example: http://www.thegeekstuff.com/2011/03/sar-examples/
    iperf - perform network throughput tests
    hdparm - to test local disk performance of any bricks
    dbench - Measure disk throughput for simulated netbench run
    iozone - Filesystem Benchmark
    htop - interactive process viewer
    vnstat - a console-based network traffic monitor
    iftop - display bandwidth usage on an interface by host

    Thursday, July 16, 2009

    HOWTO Build Android Platform on Fedora Core 9

    The final file structure looks like that

    /home/android/
    `-- mydroid
    |-- bionic
    |-- bootable
    |-- build
    |-- dalvik
    |-- development
    |-- external
    |-- frameworks
    |-- hardware
    |-- packages
    |-- prebuilt
    `-- system


    =========================================================

    Download Android Source Code

    [ ]# wget http://android.git.kernel.org/repo
    [ ]# chmod +x repo
    [ ]# mv repo /usr/bin

    [ ]# mkdir -p /home/android/mydroid
    [ ]# cd /home/android/mydroid
    [ ]# repo init -u git://android.git.kernel.org/platform/manifest.git

    gpg: keyring `/root/.repoconfig/gnupg/secring.gpg' created
    gpg: keyring `/root/.repoconfig/gnupg/pubring.gpg' created
    gpg: /root/.repoconfig/gnupg/trustdb.gpg: trustdb created
    gpg: key 920F5C65: public key "Repo Maintainer "
    imported
    gpg: Total number processed: 1
    gpg: imported: 1

    Getting repo ...
    from git://android.git.kernel.org/tools/repo.git
    warning: no common commits
    remote: Counting objects: 906, done.
    remote: Compressing objects: 100% (404/404), done.
    remote: Total 906 (delta 569), reused 785 (delta 482)
    Receiving objects: 100% (906/906), 277.53 KiB | 142 KiB/s, done.
    Resolving deltas: 100% (569/569), done.
    From git://android.git.kernel.org/tools/repo
    * [new branch] master -> origin/master
    * [new branch] stable -> origin/stable
    * [new tag] v1.6.8.7 -> v1.6.8.7
    From git://android.git.kernel.org/tools/repo
    * [new tag] v1.0 -> v1.0
    * [new tag] v1.0.1 -> v1.0.1
    * [new tag] v1.0.2 -> v1.0.2
    * [new tag] v1.0.3 -> v1.0.3
    * [new tag] v1.0.4 -> v1.0.4
    * [new tag] v1.0.5 -> v1.0.5
    * [new tag] v1.0.6 -> v1.0.6
    * [new tag] v1.0.7 -> v1.0.7
    * [new tag] v1.0.8 -> v1.0.8
    * [new tag] v1.0.9 -> v1.0.9
    * [new tag] v1.1 -> v1.1
    * [new tag] v1.2 -> v1.2
    * [new tag] v1.3 -> v1.3
    * [new tag] v1.3.1 -> v1.3.1
    * [new tag] v1.3.2 -> v1.3.2
    * [new tag] v1.4 -> v1.4
    * [new tag] v1.4.1 -> v1.4.1
    * [new tag] v1.4.2 -> v1.4.2
    * [new tag] v1.4.3 -> v1.4.3
    * [new tag] v1.4.4 -> v1.4.4
    * [new tag] v1.5 -> v1.5
    * [new tag] v1.5.1 -> v1.5.1
    * [new tag] v1.6 -> v1.6
    * [new tag] v1.6.1 -> v1.6.1
    * [new tag] v1.6.2 -> v1.6.2
    * [new tag] v1.6.3 -> v1.6.3
    * [new tag] v1.6.4 -> v1.6.4
    * [new tag] v1.6.5 -> v1.6.5
    * [new tag] v1.6.6 -> v1.6.6
    * [new tag] v1.6.7 -> v1.6.7
    * [new tag] v1.6.7.1 -> v1.6.7.1
    * [new tag] v1.6.7.2 -> v1.6.7.2
    * [new tag] v1.6.7.3 -> v1.6.7.3
    * [new tag] v1.6.7.4 -> v1.6.7.4
    * [new tag] v1.6.7.5 -> v1.6.7.5
    * [new tag] v1.6.8 -> v1.6.8
    * [new tag] v1.6.8.1 -> v1.6.8.1
    * [new tag] v1.6.8.2 -> v1.6.8.2
    * [new tag] v1.6.8.3 -> v1.6.8.3
    * [new tag] v1.6.8.4 -> v1.6.8.4
    * [new tag] v1.6.8.5 -> v1.6.8.5
    * [new tag] v1.6.8.6 -> v1.6.8.6
    Getting manifest ...
    from git://android.git.kernel.org/platform/manifest.git
    warning: no common commits
    remote: Counting objects: 116, done.
    remote: Compressing objects: 100% (45/45), done.
    remote: Total 116 (delta 39), reused 107 (delta 36)
    Receiving objects: 100% (116/116), 29.54 KiB, done.
    Resolving deltas: 100% (39/39), done.
    From git://android.git.kernel.org/platform/manifest
    * [new branch] android-1.5 -> origin/android-1.5
    * [new branch] android-1.5r2 -> origin/android-1.5r2
    * [new branch] android-sdk-1.5-pre -> origin/android-sdk-1.5-pre
    * [new branch] android-sdk-1.5_r1 -> origin/android-sdk-1.5_r1
    * [new branch] cdma-import -> origin/cdma-import
    * [new branch] cupcake -> origin/cupcake
    * [new branch] donut -> origin/donut
    * [new branch] master -> origin/master
    * [new branch] release-1.0 -> origin/release-1.0
    * [new tag] android-1.5 -> android-1.5
    * [new tag] android-1.5r2 -> android-1.5r2
    * [new tag] android-sdk-1.5-pre -> android-sdk-1.5-pre
    * [new tag] android-sdk-1.5_r1 -> android-sdk-1.5_r1
    From git://android.git.kernel.org/platform/manifest
    * [new tag] android-1.0 -> android-1.0

    Your Name [ ]: scott
    Your Email [ ]: scott.shu@gmail.com

    Your identity is: scott
    is this correct [yes/no]? yes

    Testing colorized output (for 'repo diff', 'repo status'):
    black red green yellow blue magenta cyan white
    bold dim ul reverse
    Enable color display in this user account (y/n)? y

    [ ]# repo sync
    ... skip ...
    ... skip ... checkout 1.9G in 22 minutes
    [ ]#

    Install some tools before build "manifest"
    [ ]# yum install java-1.6.0-openjdk-devel
    [ ]# yum install gperf

    Make it


    Reference:
    http://source.android.com/download/using-repo

    HOWTO Install Android SDK 1.5.r2 on Fedora Core 9

    The final file structure looks like that

    /home/android/
    |-- android-kernel
    | `-- kernel
    |-- android-sdk
    | `-- android-sdk-linux_x86-1.5_r2

    =========================================================

    Download Android 1.5 SDK, Release 2
    [ ]# mkdir -p /home/android/android-sdk
    [ ]# cd /home/android/android-sdk
    [ ]# wget http://developer.android.com/sdk/download.html?v=android-sdk-linux_x86-1.5_r2.zip
    [ ]# unzip android-sdk-linux_x86-1.5_r2.zip

    Linux Kernel for Android
    [ ]# mkdir -p /home/android/android-kernel
    [ ]# cd /home/android/android-kernel
    [ ]# git clone git://android.kernel.org/kernel/common.git kernel
    [ ]# cd kernel

    [ ]# git branch goldfish origin/android-goldfish-2.6.27
    [ ]# git checkout goldfish

    [ ]# make ARCH=arm CROSS_COMPILE=arm-linux- goldfish_defconfig
    [ ]# make ARCH=arm CROSS_COMPILE=arm-linux- menuconfig
    [ ]# make ARCH=arm CROSS_COMPILE=arm-linux- zImage

    Switched to branch "goldfish-2.6.29"
    [ ]# git branch goldfish-2.6.29 origin/android-goldfish-2.6.29
    [ ]# git checkout goldfish-2.6.29

    To see a list of existing branches
    [ ]# git branch
    android-2.6.27
    goldfish
    * goldfish-2.6.29

    Android Emulator

    Create Android Virtual Device
    [ ]# android-sdk/android-sdk-linux_x86-1.5_r2/tools/android create avd -n foo -t 3
    Created AVD 'foo' based on Google APIs (Google Inc.)

    Run the emulator
    [ ]# android-sdk/android-sdk-linux_x86-1.5_r2/tools/emulator @foo -kernel android-kernel/kernel/arch/arm/boot/zImage

    Delete the Android Virtual Device
    [ ]# android-sdk/android-sdk-linux_x86-1.5_r2/tools/android delete avd -n foo









    Endianness

    LE: Little-endian

    BE-8: Byte-Invariant Big-endian

    BE-32: Word-Invariant Big-endian

    The differences between BE-32 and BE-8 data buses are:
    • In a BE-32 system, the representation of a 32-bit Word access is
    the same between a BE-32 access and a LE access to the same word address.
    However, the representation of the byte (and half-word) accesses on the bus is
    different.

    • In a BE-8 system, the representation of a byte access is the same
    between a BE-8 access and a LE access to the same byte address. However, the
    representation of the word (and half-word) accesses on the bus is different.

    Android Development Environment

    Thursday, June 25, 2009

    Linux Kernel Reading Book List

    1. Professional Linux Kernel Architecture (PDF)


    This book is focus on kernel 2.6.24 ~ 2.6.26.
    2.

    Android Reading List

    1. Hello, Android: Introducing Google's Mobile Development Platform
    2. Android Application Development
    3. Unlocking Android (PDF)
    4. Professional Android Application Development (PDF)
    5. Android Essentials (PDF)
    6. Beginning Android (PDF)
    7. Pro Android (PDF)
    8. Androd Programmer Guide (PDF)
    9. The Busy Coder's Guide to Android Development ()
    10.


    Related Blog:
    http://scottshulinux.blogspot.com/2009/01/howto-compile-android-linux-on-fedora.html

    Tuesday, June 23, 2009

    Eclipse

    Embedded Linux development using Eclipse
    (PDF)



    Eclipse Distro + Subversive Team Provider
    Free download

    Wednesday, June 10, 2009

    Linux Kernel Stuff

    Linux Kernel Makefiles
    http://www.ravnborg.org/kbuild/makefiles.html

    Linux Test Tools

    Linux Test Tools

    http://ltp.sourceforge.net/tooltable.php

    Linux Memory Test

    Memtester

    1) Random value
    2) XOR comparison
    3) SUB comparison
    4) MUL comparison
    5) DIV comparison
    6) OR comparison
    7) AND comparison
    8) Sequential Increment
    9) Block Sequential
    10) Solid Bits
    11) Bit Flip
    12) Checkerboard
    13) Walking Ones / Walking Zeroes

    The walking "1"'s (for a byte wide memory) involves writing a binary value "00000001" into the first location in read/write memory. The value is then shifted one position to the left so that the binary value is "00000010". This value is written to the next location in memory. When the "1" is left shifted out of the 8-bit value, the value "00000001" is reused and the left-shifting begins again from there. This pattern of left-shift by one bit then writing the new value to next memory location is repeated until all of the memory is written.

    Once all memory is written then the memory is read location by location and compared to the left-shifted pattern originally written.

    The walking "0"'s is the same algorithm with the exception that the pattern used begins with a "11111110" written to the first memory location and "11111101" is written to the second location.

    This test is intended to uncover data or address bus problems both internal to the memory device as well as external.

    14) Bit Spread
    A Bit Spread test, to help catch inter-bit dependencies within a word when a 0 bit is caught between two 1 bits, or vice versa.

    LMBench

    CacheBench

    1) memset() from the C library
    2) memcpy() from the C library
    3) Cache Read
    4) Cache Write
    5) Cache Read/Modify/Write

    STREAM

    U-boot Memory Test

    Other Test Algorithm:
    Self Address
    Write the address of the memory to the memory.
    March C- Solid Bits
    It consists of writing an all-0’s pattern (and all-1’s pattern), then reading all the cells.
    March C- Checkerboard
    Writes 1’s and 0’s into alternate memory locations in a checkerboard pattern. Wait for several seconds and read. Repeat for complementary patterns.
    Walking Ones Left
    Walking Ones Right
    Walking Zeros Left
    Walking Zeros Right

    Reference:
    1. The March10N/MarchC memory test
    2. Fast Accurate Memory Test Suite

    Tuesday, June 9, 2009

    Cache

    Write-through

    Write-back

    The value kept in the backing store should be up-to-
    date with any changes made to the version stored
    in the cache, but only to the point that it is possible
    to ensure that any read requests to the version in the
    backing store (e.g., from another processor) return
    the most recently written value stored in the cache.

    Two typical mechanisms used in general-purpose
    caches to effect this responsibility are write-back and
    write-through policies. When writing to a cache, the
    backing store is implicitly updated, but when? Two
    obvious choices are immediately and later; the first
    is write-through, and the second is write back.

    outer_inv - /* invalidate only */
    outer_clean - /* writeback only */
    outer_flush - /* writeback and invalidate */

    Wednesday, May 20, 2009

    MMC/SD/SDIO on Linux

    MMC/SD/SDIO Device Driver
    Download patch

    How to use MMC/SD card

    [ ]# cat /proc/partitions

    [ ]# mknod /dev/mmcblk0 b 179 0
    [ ]# mknod /dev/mmcblk0p1 b 179 1

    [ ]# mount /dev/mmcblk0p1 /mnt

    RTC on Linux

    Real Time Clock

    RTC Device Driver
    Download patch

    RTC Utility

    [ ]# mknod /dev/rtc0 c 254 0

    [ ]# date 2009.05.20-12:34:56

    [ ]# hwclock -w

    [ ]# cat /proc/driver/rtc

    [ ]#

    Wednesday, April 29, 2009

    IP Calculator

    IP Calculator

    ipcalc takes an IP address and netmask and calculates the resulting broadcast, network, Cisco wildcard mask, and host range. By giving a second netmask, you can design subnets and supernets. It is also intended to be a teaching tool and presents the subnetting results as easy-to-understand binary values.

    Monday, April 27, 2009

    Watchdog Timer

    Hardware Watchdog Driver

    Userspace Watchdog Program

    Software Watchdog

    Friday, April 24, 2009

    FAT File System

    The First Block (512 Bytes)

    Thursday, April 23, 2009

    MMC/SD on u-boot

    Card Information


    Load bootpImage from MMC/SD Card

    u-boot # mmcinfo
    mmc_init
    version_2 = 1
    Manufacturer ID: 03
    OEM/Application ID: 5344
    Product name: SD08G
    Product Revision: 8.0
    Product Serial Number: 59007
    Manufacturing Date: 08/12
    MMC/SD RCA = 0x8FE4
    CSD data: 400e0032 5b590000 3cdc7f80 0a404000
    CSD structure version: 1
    Card command classes: 5b5
    Read block length: 512
    Does not support partial reads
    Write block length: 512
    Does not support partial writes
    Does not support group WP
    Card capacity: 7977472 Kbytes
    File format: 0/0
    Write protection:

    u-boot # fatinfo mmc 0
    Interface: MMC
    Device 0: Vendor: Man 035344 Snr 0000e67f Rev: 8 0 Prod: SD08G
    Type: Removable Hard Disk
    Capacity: 7790.5 MB = 7.6 GB (15954944 x 512)
    Partition 1: Filesystem: FAT32 "NO NAME "

    u-boot # fatls mmc 0
    3745704 bootpimage

    1 file(s), 0 dir(s)

    u-boot # fatload mmc 0 0x1000000 bootpImage
    reading bootpImage

    3745704 bytes read

    u-boot # go 0x1000000

    Download Patch

    Reference:
    1. Simplified Physical Layer Spec. (Version 2.00)
    2. Simplified SD Host Controller Spec. (Version 2.00)
    3. Simplified SDIO Card Spec. (Version 2.00)

    Monday, April 6, 2009

    Linux SMP Kernel boot-up messages on ARM11 MPCore based Platform

    Linux version 2.6.27-arm1 (scott.shu@gmail.com) (gcc version 4.3.2 (G9
    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 c022a8c0, node_mem_map c0261000
    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,3840
    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: 254592KB available (2008K code, 281K data, 104K init)
    Calibrating delay loop... 104.24 BogoMIPS (lpj=521216)
    Mount-cache hash table entries: 512
    CPU: Testing write buffer coherency: ok
    CNS3000: no. of cores (4) greater than configured maximum of 2 - clipping
    Calibrating local timer... 131.10MHz.
    CPU1: Booted secondary processor
    CPU1: D VIPT write-back cache
    CPU1: I cache: 32768 bytes, associativity 4, 32 byte lines, 256 sets
    CPU1: D cache: 32768 bytes, associativity 4, 32 byte lines, 256 sets
    Calibrating delay loop... 104.65 BogoMIPS (lpj=523264)
    Brought up 2 CPUs
    SMP: Total of 2 processors activated (208.89 BogoMIPS).
    CPU0 attaching sched-domain:
    domain 0: span 0-1 level CPU
    groups: 0 1
    CPU1 attaching sched-domain:
    domain 0: span 0-1 level CPU
    groups: 1 0
    net_namespace: 596 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: 4, 65536 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: 2571K
    JFFS2 version 2.2. (NAND) © 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
    Bridge firewalling registered
    802.1Q VLAN Support v1.8 Ben Greear
    All bugs added by David S. Miller
    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: 104K

    # cat /proc/interrupts
    CPU0 CPU1
    32: 50 0 GIC Timer Tick
    37: 4542 0 GIC serial
    IPI: 334 493
    LOC: 25087 25099
    Err: 0

    # cat /proc/cpuinfo
    Processor : ARMv6-compatible processor rev 0 (v6l)
    processor : 0
    BogoMIPS : 104.24
    processor : 1
    BogoMIPS : 104.65
    Features : swp half thumb fastmult vfp edsp java
    CPU implementer : 0x41
    CPU architecture: 7
    CPU variant : 0x0
    CPU part : 0xb02
    CPU revision : 0
    Cache type : write-back
    Cache clean : cp15 c7 ops
    Cache lockdown : format C
    Cache format : Harvard
    I size : 32768
    I assoc : 4
    I line length : 32
    I sets : 256
    D size : 32768
    D assoc : 4
    D line length : 32
    D sets : 256
    Hardware : S---- ARM11 MPCore
    Revision : 0000
    Serial : 0000000000000000

    Monday, March 23, 2009

    Floating Point on Linux

    Hardware FPU
    VFP - VectorFloating Point

    Software FPE (Floating Point Emulation)
    NWFPE - NetWinder Floating Point Emulator

    FASTFPE - FAST Floating Point Emulator

    Performance:

    Test program: fp_bench (fp_bench.tar.gz)

    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