Introduction
This is a practice, I use Raspberry Pi (Raspberry Pi Model B+ not work?) as an IP camera.
Prepare Hardwares
Raspberry Pi
P5V04AA (SUNNY CMOS camera module, image sensor is OV5647)
Install Packages (by root user)
# yum install 'raspberrypi-vc-*'
# vcgencmd get_camera
supported=1 detected=1 <== it means that camera has worked!
# yum install libjpeg-turbo-devel
# yum install libv4l-devel
# ln -s /usr/include/linux/videodev2.h /usr/include/linux/videodev.h
# cd /usr/src
# git clone https://github.com/jacksonliam/mjpg-streamer.git ./mjpg-streamer-git
# cd mjpg-streamer-git/mjpg-streamer-experimental
# make clean all
# cp mjpg_streamer /usr/local/bin
# cp input_raspicam.so output_http.so /usr/local/lib/.
# cp -R www /usr/local/www
Run mjpeg streamer server
# LD_LIBRARY_PATH=/usr/local/lib mjpg_streamer -i "input_raspicam.so -fps 15 -q 50 -x 640 -y 480" -o "output_http.so -w /usr/local/www"
It will display message as following:
i: fps.............: 15
i: resolution........: 640 x 480
i: camera parameters..............:
Sharpness 0, Contrast 0, Brightness 50
Saturation 0, ISO 400, Video Stabilisation No, Exposure compensation 0
Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'
Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
Rotation 0, hflip No, vflip No
o: www-folder-path...: /usr/local/www/
o: HTTP TCP port.....: 8080
o: username:password.: disabled
o: commands..........: enabled
i: Starting Camera
Test
View on your browser by URL:
http://{IP address}:8080
Reference
Raspberry Pi camera board video streaming
Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts
Monday, August 3, 2015
Friday, July 24, 2015
Monitor IP camera on PC by RTSP
This test program is an extension of my previous test program (article "Use USB camera as barcode reader - image resolution is 1280 x 720"), I replace the USB communication interface by RTSP communication interface.
The RTSP communication implements live555 library, all my programming environment is done by VC++.
Except the capturing image from IP camera, some image processing (image filters - gray, noise, negative, contour, histogram) is done, and image analysis (OCR, optical character recognition) is tested, too.
The RTSP communication implements live555 library, all my programming environment is done by VC++.
Except the capturing image from IP camera, some image processing (image filters - gray, noise, negative, contour, histogram) is done, and image analysis (OCR, optical character recognition) is tested, too.
Labels:
image analysis,
image processing,
IP camera,
linux,
live555,
OCR,
RTSP
Tuesday, July 7, 2015
Python - GPIO control on Pidora for Raspberry Pi Model B+
Introduction
On the Raspberry Pi Model B+ board, there are many GPIO ports, here we make a simple test, and try to understand how to control GPIO ports by python?
Concept of hardware control
Generally, an IO port of an IC (e.g. MCU, ARM, GPU) could be have multiple functions. So, when we write a control program to control these IO ports, it can be in 3 steps:
1) Configure the hardware function
2) Execute the control function
3) Release the hardware function
Install RPi.GPIO package
There are many libraries(such as RPi.GPIO, WiringPi, or pigpio library) can do the GPIO control. At here, we are using RPi.GPIO library.
Usually, read or write GPIO, the user must be root.
Install packages:
# yum update
# yum install python-setuptools
# yum install python-pip
# easy_install pyerial <== serial communication package
# yum install python-devel
# pip install RPi.GPIO <== GPIO control package
# pip install cython
# reboot
Write a GPIO input/output control program
We write a simple test program to test the GPIO functions. We define functions:
GPIO12 (pin32) - output pin
GPIO13 (pin33) - input pin
Example code:
====================================================================
import time
import RPi.GPIO as GPIO
import kbhit # read keybard value, source code is at bottom
def InputEvent(channel):
# got input event
print "[INPUT] Got input event."
if __name__ == '__main__':
# configure the GPIO hardware condition
GPIO.setmode(GPIO.BCM)
GPIO.setup(12, GPIO.OUT) # GPIO12, pin32, output control
GPIO.setup(13, GPIO.IN, pull_up_down=GPIO.PUD_UP) # GPIO13, pin33, input control
GPIO.add_event_detect(13, GPIO.FALLING, callback=InputEvent)
kb = KBHit()
bPin32On = False
while True:
# if the 'ESC' key is pressed, stop the while loop
if kb.kbhit():
c = kb.getch()
if ord(c) == 27: # ESC
break # Set On/Off pin32
print "[OUTPUT] Set output event."
if bPin32On: # True
GPIO.output(12,GPIO.HIGH)
else: # False
GPIO.output(12,GPIO.LOW)
# switch signal
bPin32On = not bPin32On
time.sleep(2.0)
kb.set_normal_term()
# release the hardware configuration
GPIO.cleanup()
====================================================================
Get the keyboard value
The KBHit class is used to monitor the non-blocking keyboard event.
Source code:
====================================================================
import os
# Windows
if os.name == 'nt':
import msvcrt
# Posix (Linux, OS X)
else:
import sys
import termios
import atexit
from select import select
class KBHit: def __init__(self):
'''Creates a KBHit object that you can call to do various keyboard things.
'''
if os.name == 'nt':
pass
else:
# Save the terminal settings
self.fd = sys.stdin.fileno()
self.new_term = termios.tcgetattr(self.fd)
self.old_term = termios.tcgetattr(self.fd)
# New terminal setting unbuffered
self.new_term[3] = (self.new_term[3] & ~termios.ICANON & ~termios.ECHO)
termios.tcsetattr(self.fd, termios.TCSAFLUSH, self.new_term)
# Support normal-terminal reset at exit
atexit.register(self.set_normal_term)
def set_normal_term(self):
''' Resets to normal terminal. On Windows this is a no-op. '''
if os.name == 'nt':
pass
else:
termios.tcsetattr(self.fd, termios.TCSAFLUSH, self.old_term)
def set_curses_term(self):
''' switch to unbuffered terminal
:return:
'''
if os.name == 'nt':
pass
else:
termios.tcsetattr(self.fd, termios.TCSAFLUSH, self.new_term)
def putch(self, ch):
if os.name == 'nt':
msvcrt.putch(ch.encode('ascii', 'ignore'))
else:
sys.stdout.write(ch)
def getch(self):
''' Returns a keyboard character after kbhit() has been called.
Should not be called in the same program as getarrow().
'''
s = ''
if os.name == 'nt':
return msvcrt.getch().decode('utf-8')
else:
return sys.stdin.read(1)
def getche(self):
ch = self.getch()
self.putch(ch)
return ch
def getarrow(self):
''' Returns an arrow-key code after kbhit() has been called. Codes are
0 : up
1 : right
2 : down
3 : left
Should not be called in the same program as getch().
'''
if os.name == 'nt':
msvcrt.getch() # skip 0xE0
c = msvcrt.getch()
vals = [72, 77, 80, 75]
else:
c = sys.stdin.read(3)[2]
vals = [65, 67, 66, 68]
return vals.index(ord(c.decode('utf-8')))
def kbhit(self):
''' Returns True if keyboard character was hit, False otherwise.
'''
if os.name == 'nt':
return msvcrt.kbhit()
else:
dr,dw,de = select([sys.stdin], [], [], 0)
return dr != []
====================================================================
Conclusion
Python is a powerful programming tool, it can satisfy the most requirements of our daily tasks. If you want to get the high performance of a program, assember, C, or C++ would be the best choice.
Reference
RPi.GPIO
Python.org

Concept of hardware control
Generally, an IO port of an IC (e.g. MCU, ARM, GPU) could be have multiple functions. So, when we write a control program to control these IO ports, it can be in 3 steps:
1) Configure the hardware function
2) Execute the control function
3) Release the hardware function
Install RPi.GPIO package
There are many libraries(such as RPi.GPIO, WiringPi, or pigpio library) can do the GPIO control. At here, we are using RPi.GPIO library.
Usually, read or write GPIO, the user must be root.
Install packages:
# yum update
# yum install python-setuptools
# yum install python-pip
# easy_install pyerial <== serial communication package
# yum install python-devel
# pip install RPi.GPIO <== GPIO control package
# pip install cython
# reboot
Write a GPIO input/output control program
We write a simple test program to test the GPIO functions. We define functions:
GPIO12 (pin32) - output pin
GPIO13 (pin33) - input pin
Example code:
====================================================================
import time
import RPi.GPIO as GPIO
import kbhit # read keybard value, source code is at bottom
def InputEvent(channel):
# got input event
print "[INPUT] Got input event."
if __name__ == '__main__':
# configure the GPIO hardware condition
GPIO.setmode(GPIO.BCM)
GPIO.setup(12, GPIO.OUT) # GPIO12, pin32, output control
GPIO.setup(13, GPIO.IN, pull_up_down=GPIO.PUD_UP) # GPIO13, pin33, input control
GPIO.add_event_detect(13, GPIO.FALLING, callback=InputEvent)
kb = KBHit()
bPin32On = False
while True:
# if the 'ESC' key is pressed, stop the while loop
if kb.kbhit():
c = kb.getch()
if ord(c) == 27: # ESC
break # Set On/Off pin32
print "[OUTPUT] Set output event."
if bPin32On: # True
GPIO.output(12,GPIO.HIGH)
else: # False
GPIO.output(12,GPIO.LOW)
# switch signal
bPin32On = not bPin32On
time.sleep(2.0)
kb.set_normal_term()
# release the hardware configuration
GPIO.cleanup()
====================================================================
Get the keyboard value
The KBHit class is used to monitor the non-blocking keyboard event.
Source code:
====================================================================
import os
# Windows
if os.name == 'nt':
import msvcrt
# Posix (Linux, OS X)
else:
import sys
import termios
import atexit
from select import select
class KBHit: def __init__(self):
'''Creates a KBHit object that you can call to do various keyboard things.
'''
if os.name == 'nt':
pass
else:
# Save the terminal settings
self.fd = sys.stdin.fileno()
self.new_term = termios.tcgetattr(self.fd)
self.old_term = termios.tcgetattr(self.fd)
# New terminal setting unbuffered
self.new_term[3] = (self.new_term[3] & ~termios.ICANON & ~termios.ECHO)
termios.tcsetattr(self.fd, termios.TCSAFLUSH, self.new_term)
# Support normal-terminal reset at exit
atexit.register(self.set_normal_term)
def set_normal_term(self):
''' Resets to normal terminal. On Windows this is a no-op. '''
if os.name == 'nt':
pass
else:
termios.tcsetattr(self.fd, termios.TCSAFLUSH, self.old_term)
def set_curses_term(self):
''' switch to unbuffered terminal
:return:
'''
if os.name == 'nt':
pass
else:
termios.tcsetattr(self.fd, termios.TCSAFLUSH, self.new_term)
def putch(self, ch):
if os.name == 'nt':
msvcrt.putch(ch.encode('ascii', 'ignore'))
else:
sys.stdout.write(ch)
def getch(self):
''' Returns a keyboard character after kbhit() has been called.
Should not be called in the same program as getarrow().
'''
s = ''
if os.name == 'nt':
return msvcrt.getch().decode('utf-8')
else:
return sys.stdin.read(1)
def getche(self):
ch = self.getch()
self.putch(ch)
return ch
def getarrow(self):
''' Returns an arrow-key code after kbhit() has been called. Codes are
0 : up
1 : right
2 : down
3 : left
Should not be called in the same program as getch().
'''
if os.name == 'nt':
msvcrt.getch() # skip 0xE0
c = msvcrt.getch()
vals = [72, 77, 80, 75]
else:
c = sys.stdin.read(3)[2]
vals = [65, 67, 66, 68]
return vals.index(ord(c.decode('utf-8')))
def kbhit(self):
''' Returns True if keyboard character was hit, False otherwise.
'''
if os.name == 'nt':
return msvcrt.kbhit()
else:
dr,dw,de = select([sys.stdin], [], [], 0)
return dr != []
====================================================================
Conclusion
Python is a powerful programming tool, it can satisfy the most requirements of our daily tasks. If you want to get the high performance of a program, assember, C, or C++ would be the best choice.
Reference
RPi.GPIO
Python.org
Thursday, July 2, 2015
Run Pidora on Raspberry Pi Model B+
Inroduction
Pidora is a Fedora Remix optimized for the Raspberry Pi computer. So, it is a good candidate choice for implementation if you are familiar with Fedora.
Here, I present the installation steps of installing Pidora 20 on Raspberry Pi Model B+ board. All the preparing works are done on Fedora 20.
Download image file
http://pidora.ca/pidora/releases/20/images/Pidora-2014-R3.zip
Write image file to SD card
dd (convert and copy a file) is a command-line utility for Unix/Linux, I use dd to write Pidora-2014-R3.img file to SD card.
# unzip Pidora-2014-R3.zip (uncompress to Pidora-2014-R3.img)
# dd if=Pidora-2014-R3.img of=/dev/sdb bs=4M (The SD card is at /dev/sdb)
On Windows, you can write image file by Win32 Disk Image.
After the dd command has done, remove the SD card and plug into socket, again. It would be mounted at 2 path:
/run/media/{user}/BOOT
/run/media/{user}/rootfs
Extra works
The default running job is display X window on TV/Monitor via HDMI interface, and the default network is using dynamic IP address. If you want to run it on console mode with static IP address, there is some extra work that you should do.
# vi /run/media/{user}/BOOT/headless
IPADDR=192.168.1.19 # the static IP address
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
RESIZE # extend the SD card size to its real size
SWAP=512
# vi /run/media/{user}/rootfs/etc/sysconfig/network-scripts/ifcfg-Wired_connection_1
TYPE=Ethernet
BOOTPROTO=none
IPADDR0=192.168.1.19 # the static IP address
PREFIX0=24
GATEWAY0=192.168.1.1
DNS1=168.95.1.1
DNS2=168.95.192.1
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME="Wired connection 1"
UUID=b2df4348-a75e-4e80-ab3f-470154e1fc8c
ONBOOT=yes
Install/Update application packages
Some of my works is done by python with serial communication, therefore, I have to install some packages:
# yum update
# yum install python-setuptools
# yum install python-pip
# easy_install pyerial <== serial communication package
# yum install python-devel
# yum install libxml2 libxslt
# yum install libxslt-devel
# pip install RPi.GPIO <== GPIO control package
# pip install cython
# reboot
Conclusion
Except the write image to SD card process and disk partition policy is different from Fedora on PC, other works are same as you work on Fedora environment.
Reference
Pidroa official site
Win32 Disk Image
Pidora is a Fedora Remix optimized for the Raspberry Pi computer. So, it is a good candidate choice for implementation if you are familiar with Fedora.
Here, I present the installation steps of installing Pidora 20 on Raspberry Pi Model B+ board. All the preparing works are done on Fedora 20.
Download image file
http://pidora.ca/pidora/releases/20/images/Pidora-2014-R3.zip
Write image file to SD card
dd (convert and copy a file) is a command-line utility for Unix/Linux, I use dd to write Pidora-2014-R3.img file to SD card.
# unzip Pidora-2014-R3.zip (uncompress to Pidora-2014-R3.img)
# dd if=Pidora-2014-R3.img of=/dev/sdb bs=4M (The SD card is at /dev/sdb)
On Windows, you can write image file by Win32 Disk Image.
After the dd command has done, remove the SD card and plug into socket, again. It would be mounted at 2 path:
/run/media/{user}/BOOT
/run/media/{user}/rootfs
Extra works
The default running job is display X window on TV/Monitor via HDMI interface, and the default network is using dynamic IP address. If you want to run it on console mode with static IP address, there is some extra work that you should do.
# vi /run/media/{user}/BOOT/headless
IPADDR=192.168.1.19 # the static IP address
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
RESIZE # extend the SD card size to its real size
SWAP=512
# vi /run/media/{user}/rootfs/etc/sysconfig/network-scripts/ifcfg-Wired_connection_1
TYPE=Ethernet
BOOTPROTO=none
IPADDR0=192.168.1.19 # the static IP address
PREFIX0=24
GATEWAY0=192.168.1.1
DNS1=168.95.1.1
DNS2=168.95.192.1
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME="Wired connection 1"
UUID=b2df4348-a75e-4e80-ab3f-470154e1fc8c
ONBOOT=yes
Install/Update application packages
Some of my works is done by python with serial communication, therefore, I have to install some packages:
# yum update
# yum install python-setuptools
# yum install python-pip
# easy_install pyerial <== serial communication package
# yum install python-devel
# yum install libxml2 libxslt
# yum install libxslt-devel
# pip install RPi.GPIO <== GPIO control package
# pip install cython
# reboot
Conclusion
Except the write image to SD card process and disk partition policy is different from Fedora on PC, other works are same as you work on Fedora environment.
Reference
Pidroa official site
Win32 Disk Image
Tuesday, December 10, 2013
Use USB camera as barcode reader - image resolution is 1280 x 720
This is a test, I use my USB camera (1280x720 pixels) to analyze barcode informaiton. It works!
This test program implements DirectShow filters, capture USB camera image by UVC(USB video class) interface.
This test program implements DirectShow filters, capture USB camera image by UVC(USB video class) interface.
Thursday, December 5, 2013
Porting Android 4.0.1 on BeagleBoard Rev C3
I try to port android 4.0.1 on BeagleBoard Rev C3, it works!
The video of system booting is on youtube:
I download the android source code from site: https://bitbucket.org/sola/android_manifest, here, Android 4.0 on BeagleBoard and Beagleboard-xM, is a good tutorial of building linux kernel, android, and root file system.
The BeagleBoard Rev C3 (CPU is OMAP3530 includes ARM Cortex A8).
The locked screen.
The apps list.
OS kernel version.
The video of system booting is on youtube:
I download the android source code from site: https://bitbucket.org/sola/android_manifest, here, Android 4.0 on BeagleBoard and Beagleboard-xM, is a good tutorial of building linux kernel, android, and root file system.
The BeagleBoard Rev C3 (CPU is OMAP3530 includes ARM Cortex A8).
The locked screen.
The apps list.
OS kernel version.
Monday, October 21, 2013
Sensory System by Zigbee and Embedded Linux
This is a prototype of sensory system that it integrates sensor devices, embedded linux device, and zigbee wireless communication.
The application is portable, it can run on Windows, Linux, and embedded linux.
The sensor devices are light sensor and power meter. The development kits are TI ZNP mini kit and CC2530 module.
The embedded linux is running on RaspBerry Pi board, almost all the application functions could be run except the performance is poor.
Wizign Co., Ltd.
Email: sales@wizign.com
The application is portable, it can run on Windows, Linux, and embedded linux.
The sensor devices are light sensor and power meter. The development kits are TI ZNP mini kit and CC2530 module.
The embedded linux is running on RaspBerry Pi board, almost all the application functions could be run except the performance is poor.
Wizign Co., Ltd.
Email: sales@wizign.com
Wednesday, November 28, 2012
Capture Image Toolkit for UVC Camera
Develop an application to capture image from an UVC camera for Windows 7/XP is a complex processing steps.
Base on DirectShow APIs, the major processes are:
Source Filter <--- camera="" p=""> |
V
Filters
|
V
Video Render Filter ---> Display
For easily capturing image from a camera device, I have developed a toolkit to simplify the programming steps.
--->
Base on DirectShow APIs, the major processes are:
Source Filter <--- camera="" p=""> |
V
Filters
|
V
Video Render Filter ---> Display
For easily capturing image from a camera device, I have developed a toolkit to simplify the programming steps.
--->
Sunday, November 4, 2012
USB camera and image processing + image analysis
The experience of developing an USB camera and the demo program is an exciting activities. Here I show that I have done for it.
After the decision of chipset solution, functions, and components size, I began to design the circuit schematics.
One of the components is the development board, all my development and test are done by this development board.
Finally, the finished USB camera.
After the decision of chipset solution, functions, and components size, I began to design the circuit schematics.
One of the components is the development board, all my development and test are done by this development board.
After I had made the USB camera work, the next step is to develop a demo program. You can download it, CameraCaptureDemo.
Special functions for Wizign's USB camera: external/software triggering one shot mode capture.
Wednesday, April 4, 2012
Wednesday, December 10, 2008
TouchScreen driver has been done - porting Linux kernel 2.6.25 (Android version) to SAMSUNG S3C2440A
About writing touch screen driver, this URL is a good reference:
[轉錄帥哥] Touch Screen Driver
arch/arm/plat-s3c24xx/devs.c
include/asm-arm/plat-s3c24xx/devs.h
arch/arm/mach-s3c2410/mach-h1940.c
drivers/input/touchscreen/Kconfig
drivers/input/touchscreen/Makefile
drivers/input/touchscreen/s3c2410_ts.c
include/asm-arm/arch-s3c2410/ts.h
then, modifies the following files,
arch/arm/mach-s3c2440/mach-smdk2440.c
arch/arm/plat-s3c24xx/devs.c
arch/arm/plat-s3c24xx/s3c244x.c
works are done.
Burn the recompiled kernel file to board, the booting message:
Starting kernel ...
Uncompressing Linux........................................................................................................... done, booting the kernel.
Linux version 2.6.25 (armdev@test.intra.wizign.com) (gcc version 4.1.2) #14 Tue Dec 9 15:23:52 CST 2008
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: SBZ2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C244X: core 399.651 MHz, memory 133.217 MHz, peripheral 66.608 MHz
S3C24XX Clocks, (c) 2004 Simtec Electronics
CLOCK: Slow mode (2.116 MHz), fast, MPLL on, UPLL on
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: root=/dev/nfs rw noinitrd console=ttySAC0,115200 init=/linuxrc nfsroot=192.168.1.12:/vdisk/armdev_fs ip=192.168.1.30:192.168.1.12:192.168f
irq: clearing pending ext status 00000080
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
timer tcon=00500000, tcnt d8d2, tcfg 00000200,00000000, usec 0000170f
Console: colour dummy device 80x30
console [ttySAC0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 61184KB available (3044K code, 508K data, 144K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 152 bytes
NET: Registered protocol family 16
S3C2410 Power Management, (c) 2004 Simtec Electronics
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4800000, irq 33
DMA channel 1 at c4800040, irq 34
DMA channel 2 at c4800080, irq 35
DMA channel 3 at c48000c0, irq 36
S3C244X: Clock Support, DVS off
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.
fuse init (API version 7.9)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Console: switching to colour frame buffer device 30x40
fb0: s3c2410fb frame buffer device
lp: driver loaded but no devices found
ppdev: user-space parallel port driver
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
brd: module loaded
loop: module loaded
dm9000 Ethernet Driver, V1.30
eth0: dm9000 at c485e300,c4860304 IRQ 51 MAC: 08:00:3e:26:0a:5b (chip)
Uniform Multi-Platform E-IDE driver
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
BAST NOR-Flash Driver, (c) 2004 Simtec Electronics
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2440-nand s3c2440-nand: Tacls=1, 7ns Twrph0=4 30ns, Twrph1=1 7ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 2 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00200000 : "Kernel"
0x00200000-0x04000000 : "root partition"
usbmon: debugfs is not available
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
mice: PS/2 mouse device common for all mice
s3c2410 TouchScreen successfully loadedinput: s3c2410 TouchScreen as /class/input/input0
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c2440-i2c s3c2440-i2c: slave address 0x10
s3c2440-i2c s3c2440-i2c: bus frequency set to 378 KHz
s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
logger: created 64K log 'log_main'
logger: created 64K log 'log_events'
logger: created 64K log 'log_radio'
TCP cubic registered
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
IP-Config: Complete:
device=eth0, addr=192.168.1.30, mask=255.255.255.0, gw=192.168.1.1,
host=android, domain=, nis-domain=(none),
bootserver=192.168.1.12, rootserver=192.168.1.12, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.12
Looking up port of RPC 100005/1 on 192.168.1.12
VFS: Mounted root (nfs filesystem).
Freeing init memory: 144K
--------mount /proc as proc
--------mount /sys as sysfs
--------mount /dev/shm as tmpfs
init started: BusyBox v1.12.1 (2008-11-25 00:32:40 CST)
starting pid 784, tty '': '/etc/rc.d/startup'
--------start mdev
--------mount tmpfs
OK
--------mount devpts
OK
Setting system clock: hwclock: can't open '/dev/misc/rtc': No such file or directory
FAIL
Setting hostname: OK
Cleaning up system: OK
Setting up interface lo: OK
Running start scripts.
Starting syslogd: syslogd: invalid number '80kb'
FAIL
Starting klogd: OK
Setting up interface eth0: OK
starting pid 805, tty '': '-/bin/login'
android login: root
Jan 1 00:00:18 login[805]: root login on 'console'
EMB#
[轉錄帥哥] Touch Screen Driver
The patch file of S3C2410 touch screen, download path: s3c2410_touchscreen.patchIn patch file, modified files include:
arch/arm/plat-s3c24xx/devs.c
include/asm-arm/plat-s3c24xx/devs.h
arch/arm/mach-s3c2410/mach-h1940.c
drivers/input/touchscreen/Kconfig
drivers/input/touchscreen/Makefile
drivers/input/touchscreen/s3c2410_ts.c
include/asm-arm/arch-s3c2410/ts.h
then, modifies the following files,
arch/arm/mach-s3c2440/mach-smdk2440.c
arch/arm/plat-s3c24xx/devs.c
arch/arm/plat-s3c24xx/s3c244x.c
works are done.
Burn the recompiled kernel file to board, the booting message:
Starting kernel ...
Uncompressing Linux........................................................................................................... done, booting the kernel.
Linux version 2.6.25 (armdev@test.intra.wizign.com) (gcc version 4.1.2) #14 Tue Dec 9 15:23:52 CST 2008
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: SBZ2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C244X: core 399.651 MHz, memory 133.217 MHz, peripheral 66.608 MHz
S3C24XX Clocks, (c) 2004 Simtec Electronics
CLOCK: Slow mode (2.116 MHz), fast, MPLL on, UPLL on
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: root=/dev/nfs rw noinitrd console=ttySAC0,115200 init=/linuxrc nfsroot=192.168.1.12:/vdisk/armdev_fs ip=192.168.1.30:192.168.1.12:192.168f
irq: clearing pending ext status 00000080
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
timer tcon=00500000, tcnt d8d2, tcfg 00000200,00000000, usec 0000170f
Console: colour dummy device 80x30
console [ttySAC0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 61184KB available (3044K code, 508K data, 144K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 152 bytes
NET: Registered protocol family 16
S3C2410 Power Management, (c) 2004 Simtec Electronics
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4800000, irq 33
DMA channel 1 at c4800040, irq 34
DMA channel 2 at c4800080, irq 35
DMA channel 3 at c48000c0, irq 36
S3C244X: Clock Support, DVS off
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.
fuse init (API version 7.9)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Console: switching to colour frame buffer device 30x40
fb0: s3c2410fb frame buffer device
lp: driver loaded but no devices found
ppdev: user-space parallel port driver
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
brd: module loaded
loop: module loaded
dm9000 Ethernet Driver, V1.30
eth0: dm9000 at c485e300,c4860304 IRQ 51 MAC: 08:00:3e:26:0a:5b (chip)
Uniform Multi-Platform E-IDE driver
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
BAST NOR-Flash Driver, (c) 2004 Simtec Electronics
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2440-nand s3c2440-nand: Tacls=1, 7ns Twrph0=4 30ns, Twrph1=1 7ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 2 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00200000 : "Kernel"
0x00200000-0x04000000 : "root partition"
usbmon: debugfs is not available
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
mice: PS/2 mouse device common for all mice
s3c2410 TouchScreen successfully loadedinput: s3c2410 TouchScreen as /class/input/input0
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c2440-i2c s3c2440-i2c: slave address 0x10
s3c2440-i2c s3c2440-i2c: bus frequency set to 378 KHz
s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
logger: created 64K log 'log_main'
logger: created 64K log 'log_events'
logger: created 64K log 'log_radio'
TCP cubic registered
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
IP-Config: Complete:
device=eth0, addr=192.168.1.30, mask=255.255.255.0, gw=192.168.1.1,
host=android, domain=, nis-domain=(none),
bootserver=192.168.1.12, rootserver=192.168.1.12, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.12
Looking up port of RPC 100005/1 on 192.168.1.12
VFS: Mounted root (nfs filesystem).
Freeing init memory: 144K
--------mount /proc as proc
--------mount /sys as sysfs
--------mount /dev/shm as tmpfs
init started: BusyBox v1.12.1 (2008-11-25 00:32:40 CST)
starting pid 784, tty '': '/etc/rc.d/startup'
--------start mdev
--------mount tmpfs
OK
--------mount devpts
OK
Setting system clock: hwclock: can't open '/dev/misc/rtc': No such file or directory
FAIL
Setting hostname: OK
Cleaning up system: OK
Setting up interface lo: OK
Running start scripts.
Starting syslogd: syslogd: invalid number '80kb'
FAIL
Starting klogd: OK
Setting up interface eth0: OK
starting pid 805, tty '': '-/bin/login'
android login: root
Jan 1 00:00:18 login[805]: root login on 'console'
EMB#
Wednesday, November 26, 2008
Mounting File system - Porting Linux kernel 2.6.25 (Android version) to SAMSUNG S3C2440A
Previous time, when linux kernel run at:
Freeing init memory: 140K
the system is halted, after some test, I find that it is the problem of cross-compiled gcc.
The ARM core of SAMSUNG S3C2440A is ARM920T, therefore, I rebuild the cross-compiled gcc of generic arm with little endian version, the problem has fixed.
The success process of booting linux:
Starting kernel ...
Uncompressing Linux........................................................................................................... done, booting the kernel.
Linux version 2.6.25 (armdev@test.intra.wizign.com) (gcc version 4.1.2) #3 Tue Nov 25 01:55:06 CST 2008
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: SBZ2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C244X: core 399.651 MHz, memory 133.217 MHz, peripheral 66.608 MHz
S3C24XX Clocks, (c) 2004 Simtec Electronics
CLOCK: Slow mode (2.116 MHz), fast, MPLL on, UPLL on
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: root=/dev/nfs rw noinitrd console=ttySAC0,115200 init=/linuxrc nfsroot=192.168.1.12:/vdisk/armdev_fs ip=192.168.1.30:192.168.1.12:1
92.168.1.1:255.255.255.0:android:eth0:off
irq: clearing pending ext status 00000080
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
timer tcon=00500000, tcnt d8d2, tcfg 00000200,00000000, usec 0000170f
Console: colour dummy device 80x30
console [ttySAC0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 61184KB available (3040K code, 507K data, 140K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 152 bytes
NET: Registered protocol family 16
S3C2410 Power Management, (c) 2004 Simtec Electronics
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4800000, irq 33
DMA channel 1 at c4800040, irq 34
DMA channel 2 at c4800080, irq 35
DMA channel 3 at c48000c0, irq 36
S3C244X: Clock Support, DVS off
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
fuse init (API version 7.9)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Console: switching to colour frame buffer device 30x40
fb0: s3c2410fb frame buffer device
lp: driver loaded but no devices found
ppdev: user-space parallel port driver
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
brd: module loaded
loop: module loaded
dm9000 Ethernet Driver, V1.30
eth0: dm9000 at c485e300,c4860304 IRQ 51 MAC: 08:00:3e:26:0a:5b (chip)
Uniform Multi-Platform E-IDE driver
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
BAST NOR-Flash Driver, (c) 2004 Simtec Electronics
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2440-nand s3c2440-nand: Tacls=1, 7ns Twrph0=4 30ns, Twrph1=1 7ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 2 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00200000 : "Kernel"
0x00200000-0x04000000 : "root partition"
usbmon: debugfs is not available
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
mice: PS/2 mouse device common for all mice
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c2440-i2c s3c2440-i2c: slave address 0x10
s3c2440-i2c s3c2440-i2c: bus frequency set to 378 KHz
s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
logger: created 64K log 'log_main'
logger: created 64K log 'log_events'
logger: created 64K log 'log_radio'
TCP cubic registered
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
IP-Config: Complete:
device=eth0, addr=192.168.1.30, mask=255.255.255.0, gw=192.168.1.1,
host=android, domain=, nis-domain=(none),
bootserver=192.168.1.12, rootserver=192.168.1.12, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.12
Looking up port of RPC 100005/1 on 192.168.1.12
VFS: Mounted root (nfs filesystem).
Freeing init memory: 140K
--------mount /proc as proc
--------mount /sys as sysfs
init started: BusyBox v1.12.1 (2008-11-25 00:32:40 CST)
starting pid 777, tty '': '/etc/rc.d/startup'
mkdir: cannot create directory '/dev/pts': File exists
mkdir: cannot create directory '/dev/shm': File exists
--------start mdev
--------mount tmpfs
OK
--------mount devpts
mount: mounting devpts on /dev/pts failed: No such file or directory
FAIL
Setting system clock: hwclock: can't open '/dev/misc/rtc': No such file or directory
FAIL
Setting hostname: OK
Cleaning up system: OK
Setting up interface lo: OK
Running start scripts.
Starting syslogd: syslogd: invalid number '80kb'
FAIL
Starting klogd: OK
Setting up interface eth0: OK
starting pid 800, tty '': '-/bin/login'
android login: root
ash: id -u: bad number
# uname -a
Linux android 2.6.25 #3 Tue Nov 25 01:55:06 CST 2008 armv4tl unknown
# hostname
android
Freeing init memory: 140K
the system is halted, after some test, I find that it is the problem of cross-compiled gcc.
The ARM core of SAMSUNG S3C2440A is ARM920T, therefore, I rebuild the cross-compiled gcc of generic arm with little endian version, the problem has fixed.
The success process of booting linux:
Starting kernel ...
Uncompressing Linux........................................................................................................... done, booting the kernel.
Linux version 2.6.25 (armdev@test.intra.wizign.com) (gcc version 4.1.2) #3 Tue Nov 25 01:55:06 CST 2008
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: SBZ2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C244X: core 399.651 MHz, memory 133.217 MHz, peripheral 66.608 MHz
S3C24XX Clocks, (c) 2004 Simtec Electronics
CLOCK: Slow mode (2.116 MHz), fast, MPLL on, UPLL on
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: root=/dev/nfs rw noinitrd console=ttySAC0,115200 init=/linuxrc nfsroot=192.168.1.12:/vdisk/armdev_fs ip=192.168.1.30:192.168.1.12:1
92.168.1.1:255.255.255.0:android:eth0:off
irq: clearing pending ext status 00000080
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
timer tcon=00500000, tcnt d8d2, tcfg 00000200,00000000, usec 0000170f
Console: colour dummy device 80x30
console [ttySAC0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 61184KB available (3040K code, 507K data, 140K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 152 bytes
NET: Registered protocol family 16
S3C2410 Power Management, (c) 2004 Simtec Electronics
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4800000, irq 33
DMA channel 1 at c4800040, irq 34
DMA channel 2 at c4800080, irq 35
DMA channel 3 at c48000c0, irq 36
S3C244X: Clock Support, DVS off
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
fuse init (API version 7.9)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Console: switching to colour frame buffer device 30x40
fb0: s3c2410fb frame buffer device
lp: driver loaded but no devices found
ppdev: user-space parallel port driver
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
brd: module loaded
loop: module loaded
dm9000 Ethernet Driver, V1.30
eth0: dm9000 at c485e300,c4860304 IRQ 51 MAC: 08:00:3e:26:0a:5b (chip)
Uniform Multi-Platform E-IDE driver
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
BAST NOR-Flash Driver, (c) 2004 Simtec Electronics
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2440-nand s3c2440-nand: Tacls=1, 7ns Twrph0=4 30ns, Twrph1=1 7ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 2 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00200000 : "Kernel"
0x00200000-0x04000000 : "root partition"
usbmon: debugfs is not available
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
mice: PS/2 mouse device common for all mice
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c2440-i2c s3c2440-i2c: slave address 0x10
s3c2440-i2c s3c2440-i2c: bus frequency set to 378 KHz
s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
logger: created 64K log 'log_main'
logger: created 64K log 'log_events'
logger: created 64K log 'log_radio'
TCP cubic registered
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
IP-Config: Complete:
device=eth0, addr=192.168.1.30, mask=255.255.255.0, gw=192.168.1.1,
host=android, domain=, nis-domain=(none),
bootserver=192.168.1.12, rootserver=192.168.1.12, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.12
Looking up port of RPC 100005/1 on 192.168.1.12
VFS: Mounted root (nfs filesystem).
Freeing init memory: 140K
--------mount /proc as proc
--------mount /sys as sysfs
init started: BusyBox v1.12.1 (2008-11-25 00:32:40 CST)
starting pid 777, tty '': '/etc/rc.d/startup'
mkdir: cannot create directory '/dev/pts': File exists
mkdir: cannot create directory '/dev/shm': File exists
--------start mdev
--------mount tmpfs
OK
--------mount devpts
mount: mounting devpts on /dev/pts failed: No such file or directory
FAIL
Setting system clock: hwclock: can't open '/dev/misc/rtc': No such file or directory
FAIL
Setting hostname: OK
Cleaning up system: OK
Setting up interface lo: OK
Running start scripts.
Starting syslogd: syslogd: invalid number '80kb'
FAIL
Starting klogd: OK
Setting up interface eth0: OK
starting pid 800, tty '': '-/bin/login'
android login: root
ash: id -u: bad number
# uname -a
Linux android 2.6.25 #3 Tue Nov 25 01:55:06 CST 2008 armv4tl unknown
# hostname
android
Sunday, November 23, 2008
Wednesday, November 19, 2008
Porting Linux kernel 2.6.25 (Android version) to SAMSUNG S3C2440A
It is fun! Last time, I was porting android to TI Davinci DM355 failed.
This time, I am porting android to SAMSUNG S3C2440A, successfully.
Now, the kernel is bootable, my next step has works:
Following list describes basic configuration in the build process; for tuning in detail, some hardware related configuration is a must step, the good references are as following:
linux-2.6.26内核移植到S3C2440平台
linux-2.6.25内核移植到S3C2440平台
移植内核2.6.24.4到S3C2440
《Linux系统移植》
A simple description of porting steps:
CPU is SAMSUNG S3C2440A
Linux kernel Android version 2.6.25.
Cross compiled GCC and build basic OS eviroment, please check this site:
Cross-Compiled Linux From Scratch - Embedded (Version SVN-0.0.1-20080109-arm).
() Busybox-1.12.1 - OS's working environment
cd ${ARMDEV}/build
tar -jxvf ${ARMDEV}/sources/busybox-1.12.1.tar.bz2
cd busybox-1.12.1
patch -Np1 -i ../busybox-1.12.1-fixes-1.patch
patch -Np1 -i ../busybox-1.12.1-iptunnel_headers-1.patch
make defconfig
BUSYBOX_OPTIONS="CONFIG_DMALLOC CONFIG_BUILD_AT_ONCE CONFIG_BUILD_LIBBUSYBOX
CONFIG_FEATURE_SH_IS_NONE CONFIG_LOCALE_SUPPORT CONFIG_TFTP CONFIG_FTPGET
CONFIG_FTPPUT CONFIG_IPCALC CONFIG_TFTP CONFIG_HUSH CONFIG_LASH
CONFIG_MSH CONFIG_INETD CONFIG_DPKG CONFIG_RPM2CPIO CONFIG_RPM
CONFIG_FOLD CONFIG_LOGNAME CONFIG_OD CONFIG_CRONTAB CONFIG_UUDECODE
CONFIG_UUENCODE CONFIG_SULOGIN CONFIG_DC CONFIG_DEBUG_YANK_SUSv2
CONFIG_DEBUG_INIT CONFIG_DEBUG_CROND_OPTION CONFIG_FEATURE_UDHCP_DEBUG
CONFIG_TASKSET CONFIG_CHATTR CONFIG_FSCK CONFIG_LSATTR CONFIG_CHPST
CONFIG_SETUIDGID CONFIG_ENVUIDGID CONFIG_ENVDIR CONFIG_SOFTLIMIT
CONFIG_FEATURE_2_4_MODULES"
for config in $BUSYBOX_OPTIONS; do
cp .config{,.orig}
sed -e "s:${config}=y:${config}=n:" .config.orig > .config
done
BUSYBOX_OPTIONS="CONFIG_FEATURE_SH_IS_ASH CONFIG_FEATURE_TRACEROUTE_VERBOSE CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE"
for config in $BUSYBOX_OPTIONS; do
cp .config{,.orig}
sed -e "s:# ${config} is not set:${config}=y:" .config.orig > .config
done
make ARCH=arm CROSS_COMPILE="${ARM_TARGET}-"
make ARCH=arm CROSS_COMPILE="${ARM_TARGET}-" CONFIG_PREFIX="${ARMDEV}" install
cp examples/depmod.pl ${ARMDEV}/cross-tools/bin
chmod 755 ${ARMDEV}/cross-tools/bin/depmod.pl
() Ext2 - file system tool
cd ${ARMDEV}/build
tar -zxvf ${ARMDEV}/sources/e2fsprogs-1.39.tar.gz
cd e2fsprogs-1.39
mkdir -v build
cd build
CC="${CC} -Os" ../configure --build=${ARM_HOST} --host=${ARM_TARGET} --prefix=/usr --with-root-prefix="" --with-cc="${CC} -Os" --with-linker=${LD}
make
make DESTDIR=${ARMDEV} install
make DESTDIR=${ARMDEV} install-libs
() Iana-Etc-2.20 - network services and communication protocol
cd ${ARMDEV}/build
tar -jxvf ${ARMDEV}/sources/iana-etc-2.20.tar.bz2
cd iana-etc-2.20
make
make DESTDIR=${ARMDEV} install
() Zlib-1.2.3 0 - compress and uncompress program
cd ${ARMDEV}/build
tar -zxvf ${ARMDEV}/sources/zlib-1.2.3.tar.gz
cd zlib-1.2.3
patch -Np1 -i ${ARMDEV}/sources/zlib-1.2.3-DESTDIR-1.patch
cp configure{,.orig}
sed -e 's/-O3/-Os/g' configure.orig > configure
CC="${CC}" ./configure --prefix=/usr --shared
make
make DESTDIR=${ARMDEV} install
mv -v ${ARMDEV}/usr/lib/libz.so.* ${ARMDEV}/lib
ln -svf ../../lib/libz.so.1 ${ARMDEV}/usr/lib/libz.so
() Build password protection mechanics
echo "Create /etc/shadow file"
cat > ${ARMDEV}/etc/shadow << "EOF"
root:$1$BQY1.ACn$rvcsFmggQFH.jyCD/X/NV1:13553:0:99999:7:::
bin:x:13553:0:99999:7:::
daemon:x:13553:0:99999:7:::
adm:x:13553:0:99999:7:::
lp:x:13553:0:99999:7:::
mail:x:13553:0:99999:7:::
news:x:13553:0:99999:7:::
uucp:x:13553:0:99999:7:::
operator:x:13553:0:99999:7:::
postmaster:x:13553:0:99999:7:::
nobody:x:13553:0:99999:7:::
EOF
() cramfs-1.1 - tool for building file system
cd ${ARMDEV}/build
tar -zxvf ${ARMDEV}/sources/cramfs-1.1.tar.gz
cd cramfs-1.1
make
$ su
# cp mkcramfs /usr/bin
# cp cramfsck /usr/bin
() JFFS2 - manage file system of Flash memory
cd ${ARMDEV}/sources
cvs -d :pserver:anoncvs@cvs.infradead.org:/home/cvs login #password: anoncvs
cvs -d :pserver:anoncvs@cvs.infradead.org:/home/cvs co mtd
cd mtd/util/
make clean
make
cp mkfs.jffs /sbin
cp mkfs.jffs2 /sbin
() /etc/fstab
cat > ${ARMDEV}/etc/fstab << "EOF"
# Begin /etc/fstab
# Help information
# man 5 fstab
# file system mount-point type options dump fsck
# order
/dev/ram / ext2 defaults 1 1
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
devpts /dev/pts devpts gid=4,mode=620 0 0
shm /dev/shm tmpfs defaults 0 0
none /proc/bus/usb usbdevfs defaults 0 0
# End /etc/fstab
EOF
() Linux-2.6.25 (android version)
cd ${ARMDEV}/build
tar -jxvf ${ARMDEV}/sources/linux-2.6.25-android-1.0_r1.tar.gz
mv kernel.git linux-android-2.6.25
cd linux-android-2.6.25
make mrproper
make ARCH=arm CROSS_COMPILE=${ARM_TARGET}- s3c2410_defconfig
make ARCH=arm CROSS_COMPILE=${ARM_TARGET}- gconfig
The following configuration is only for my evaluation board, just for reference.
Device Drivers
Block Devices BLK_DEV
RAM block device support BLK_DEV_RAM
(2) Default number of RAM disks BLK_DEV_RAM_COUNT
(41984) Default RAM disk size (kbytes) BLK_DEV_RAM_SIZE
(1024) Default RAM disk block size (bytes) BLK_DEV_RAM_BLOCKSIZE
File systems
Kernel automounter support AUTOFS_FS
kernel automounter version 4 support AUTOFS4_FS
Filesystem in Userspace support FUSE_FS
Pseudo filesystems
/dev/ file system support DEVFS_FS
Virtual memory file system support (former shm fs) TMPFS
Userspace-driven configuration filesystem CONFIGFS_FS
Miscellaneous filesystems
YAFFS2 file system support YAFFS_FS
512 byte / page devices YAFFS_YAFFS1
2048 byte / page devices YAFFS_YAFFS2
Network File Systems NETWORK_FILESYSTEMS
NFS file system support NFS_FS
Provide NFSv3 client support NFS_V3
Root file system on NFS ROOT_NFS
Journalling Flash File System v2 (JFFS2) support JFFS2_FS
JFFS2 debugging verbosity (0 = quiet, 2 = noisy) JFFS2_FS_DEBUG
JFFS2 write-buffering support JFFS2_FS_WRITEBUFFER
Advanced compression options for JFFS2 JFFS2_COMPRESSION_OPTIONS
JFFS2 ZLIB compression support JFFS2_ZLIB
JFFS2 RTIME compression support JFFS2_RTIME
JFFS2 RUBIN compression support JFFS2_RUBIN
Boot options
Default kernel command string CMDLINE {command}
{command}
root=/dev/hda1 rw rootfstype=cramfs noinitrd init=/linuxrc console=ttySAC0,115200 mem=64M
() /linuxrc
cd ${ARMDEV}
mv linuxrc linuxrc.busybox
cat > ${ARMDEV}/linuxrc << "EOF"
#!/bin/sh
echo "mount /etc as ramfs"
/bin/mount -n -t ramfs ramfs /etc
/bin/cp -a /mnt/etc/* /etc
# re-create the /etc/mtab entries
echo "re-create the /etc/mtab entries"
/bin/mount -f -t cramfs -o remount,ro /dev/mtdblock1 /
# mount some file system
echo "--------munt /dev/shm as tmpfs"
/bin/mount -n -t tmpfs tmpfs /dev/shm
# mount /proc as proc file system
echo "--------mount /proc as proc"
/bin/mount -n -t proc none /proc
# mount /sys as sysfs file system
echo "--------mount /sys as sysfs
/bin/mount -n -t sysfs none /sys
#input command to LCD
#sh < /dev/ttyS0
exec /sbin/init
EOF
chmod 775 ${ARMDEV}/linuxrc
() /etc/inetd.conf
cat > ${ARMDEV}/etc/inetd.conf << "EOF"
#
telnet stream tcp nowait root /usr/sbin/telnetd
EOF
() CLFS-Bootscripts-1.0-pre4
cd ${ARMDEV}/build
tar -jxvf ${ARMDEV}/sources/clfs-embedded-bootscripts-1.0-pre4.tar.bz2
cd clfs-embedded-bootscripts
make DESTDIR=${ARMDEV} install
() /etc/mdev.conf
cat > ${ARMDEV}/etc/mdev.conf << "EOF"
# /etc/mdev/conf
SLEEP=10
# Symlinks:
# Syntax: %s -> %s
MAKEDEV -> ../sbin/MAKEDEV
/proc/core -> kcore
fd -> /proc/self/fd
mcdx -> mcdx0
radio -> radio0
ram -> ram1
sbpcd -> sbpcd0
sr0 -> scd0
sr1 -> scd1
sr10 -> scd10
sr11 -> scd11
sr12 -> scd12
sr13 -> scd13
sr14 -> scd14
sr15 -> scd15
sr16 -> scd16
sr2 -> scd2
sr3 -> scd3
sr4 -> scd4
sr5 -> scd5
sr6 -> scd6
sr7 -> scd7
sr8 -> scd8
sr9 -> scd9
stderr -> fd/2
stdin -> fd/0
stdout -> fd/1
# Remove these devices, if using a headless system
# You will see an error mdev: Bad line 35
vbi -> vbi0
vcs -> vcs0
vcsa -> vcsa0
video -> video0
# Stop Remove for headless system
# Devices:
# Syntax: %s %d:%d %s
# devices user:group mode
null 0:0 777
zero 0:0 666
urandom 0:0 444
console 0:5 0600
fd0 0:11 0660
hdc 0:6 0660
kmem 0:9 000
mem 0:9 0640
port 0:9 0640
ptmx 0:5 0660
sda* 0:6 0660
sdb* 0:6 0660
hda* 0:6 0660
hdb* 0:6 0660
tty 0:5 0660
tty0* 0:5 0660
tty1* 0:5 0660
tty2* 0:5 0660
tty3* 0:5 0660
tty4* 0:5 0660
tty5* 0:5 0660
tty6* 0:5 0660
ttyS* 0:20 640
EOF
() /etc/profile
cat > ${ARMDEV}/etc/profile << "EOF"
# /etc/profile
# Set the initial path
export PATH=/bin:/usr/bin
if [ 'id -u' -eq 0 ] ; then
PATH=/bin:/sbin:/usr/bin:/usr/sbin
unset HISTFILE
fi
# Setup some environment variables.
export USER='id -un'
export LOGNAME=$USER
export HOSTNAME='/bin/hostname'
export HISTSIZE=1000
export HISTFILESIZE=1000
export PAGER='/bin/more '
export EDITOR='/bin/vi'
export INPUTRC=/etc/inputrc
# End /etc/profile
EOF
() Creating the /etc/inputrc File
cat > ${ARMDEV}/etc/inputrc << "EOF"
# Begin /etc/inputrc
# Modified by Chris Lynn
# Allow the command prompt to wrap to the next line
set horizontal-scroll-mode Off
# Enable 8bit input
set meta-flag On
set input-meta On
# Turns off 8th bit stripping
set convert-meta Off
# Keep the 8th bit for display
set output-meta On
# none, visible or audible
set bell-style none
# All of the following map the escape sequence of the
# value contained inside the 1st argument to the
# readline specific functions
"\eOd": backward-word
"\eOc": forward-word
# for linux console
"\e[1~": beginning-of-line
"\e[4~": end-of-line
"\e[5~": beginning-of-history
"\e[6~": end-of-history
"\e[3~": delete-char
"\e[2~": quoted-insert
# for xterm
"\eOH": beginning-of-line
"\eOF": end-of-line
# for Konsole
"\e[H": beginning-of-line
"\e[F": end-of-line
# End /etc/inputrc
EOF
() /etc/inittab
cat > ${ARMDEV}/etc/inittab << "EOF"
# /etc/inittab
::sysinit:/etc/rc.d/startup
::respawn:/usr/sbin/telnetd
tty1::respawn:/sbin/getty 38400 tty1
tty2::respawn:/sbin/getty 38400 tty2
tty3::respawn:/sbin/getty 38400 tty3
tty4::respawn:/sbin/getty 38400 tty4
tty5::respawn:/sbin/getty 38400 tty5
tty6::respawn:/sbin/getty 38400 tty6
# Put a getty on the serial line (for a terminal)
# uncomment this line if your using a serial console
#::respawn:/sbin/getty -L ttyS0 115200 vt100
::respawn:/sbin/getty -L ttySAC0 115200 vt100
#T0:12345:respawn:/sbin/getty -n -l /usr/local/sbin/autologin -L /dev/tts/1 115200 vt100
::shutdown:/etc/rc.d/shutdown
::ctrlaltdel:/sbin/reboot
EOF
() Setting Hostname
echo "android" > ${ARMDEV}/etc/HOSTNAME
() /etc/hosts File
Has network card
cat > ${ARMDEV}/etc/hosts << "EOF"
# Begin /etc/hosts (network card version)
127.0.0.1 localhost
192.168.1.30 android.wizign.com android
# End /etc/hosts (network card version)
EOF
Without network card
cat > ${ARMDEV}/etc/hosts << "EOF"
# Begin /etc/hosts (no network card version)
127.0.0.1 dpf-dev.wizign.com dpf-dev localhost
# End /etc/hosts (no network card version)
EOF
() Configuring the network Script
cat > ${ARMDEV}/etc/network.conf << "EOF"
# /etc/network.conf
# Global Networking Configuration
# interface configuration is in /etc/network.d/
# set to yes to enable networking
NETWORKING=yes
# set to yes to set default route to gateway
USE_GATEWAY=no
# set to gateway IP address
GATEWAY=192.168.1.1
EOF
() creates a sample interface.eth0 file for the eth0 device:
mkdir ${ARMDEV}/etc/network.d &&
cat > ${ARMDEV}/etc/network.d/interface.eth0 << "EOF"
# Network Interface Configuration
# network device name
INTERFACE=eth0
# set to yes to use DHCP instead of the settings below
DHCP=no
# IP address
IPADDRESS=192.168.1.30
# netmask
NETMASK=255.255.255.0
# broadcast address
BROADCAST=192.168.1.255
EOF
() Creating the ${ARMDEV}/etc/resolv.conf File
cat > ${ARMDEV}/etc/resolv.conf << "EOF"
# Begin /etc/resolv.conf
domain wizign.com
nameserver 168.95.1.1
nameserver 168.95.192.1
# End /etc/resolv.conf
EOF
() Copy the clean OS system, preparing to port on the evaluation board
su -
if [ ! -d /mnt/armdev_fs ]; then
mkdir /mnt/armdev_fs
fi
mount --bind /vdisk/armdev_fs /mnt/armdev_fs
export ARMDEV="/mnt/armdev"
export ARMDEV_FS="/mnt/armdev_fs"
for dir in $(ls "${ARMDEV}"); do
if [ "$dir" == 'sources' ]; then
echo "Skip $dir"
elif [ "$dir" == 'build' ]; then
echo "Skip $dir"
elif [ "$dir" == 'cross-tools' ]; then
echo "Skip $dir"
else
cp -avr ""${ARMDEV}"/$dir" "${ARMDEV_FS}/."
fi
done
rm -rfv ${ARMDEV_FS}/usr/src/*
rm -rfv ${ARMDEV_FS}/usr/include
rm -rfv ${ARMDEV_FS}/usr/man
rm -rfv ${ARMDEV_FS}/usr/share/man
FILES="'ls ${ARMDEV_FS}/lib/*.a ${ARMDEV_FS}/usr/lib/*.a'"
for file in $FILES; do
rm -fv $file
done
chown -Rv root:root ${ARMDEV_FS}
chgrp -v utmp ${ARMDEV_FS}/var/run/utmp ${ARMDEV_FS}/var/log/lastlog
mknod -m 0666 ${ARMDEV_FS}/dev/null c 1 3
mknod -m 0600 ${ARMDEV_FS}/dev/console c 5 1
If using cramfs
mkcramfs ${ARMDEV_FS} /mnt/rootfs.cramfs
cp /mnt/rootfs.cramfs /var/lib/tftpboot/ramdisk-android-2.6.25.cramfs
If using jffs2
mkfs.jffs2 -d ${ARMDEV_FS} -p -s 0x200 -e 0x4000 -n -l -U -o ramdisk.jffs2
cp /mnt/ramdisk.jffs2 /var/lib/tftpboot/ramdisk-android-2.6.25.jffs2
() This shell script is used to build RAM disk
cat > /mnt/mkramdisk.sh << "EOF"
#! /bin/bash
# Remove files
echo "remove files"
rm -f ramdisk.img.gz
rm -f ramdisk32.img
rm -f ramdisk.img
rm -fr ramdisk
# Create ramdisk32
echo "create ramdisk32"
cd /mnt
dd if=/dev/zero of=ramdisk32.img bs=1024 count=40960
mke2fs -F -vm0 ramdisk32.img
mkdir ramdisk
mount -o loop ramdisk32.img ramdisk
cd ramdisk/
cp -arv ${ARMDEV_FS}/* .
cd ..
umount ramdisk
# Make ram disk image
echo "make ram disk image"
cp ramdisk32.img ramdisk.img
gzip ramdisk.img
./mkimage -A arm -O linux -T ramdisk -C gzip -a 30080000 -e 30080000 -d ramdisk.img.gz -n 'SBZ2440 Ramdisk' ram.img
# copy files
echo "Copy RAM disk file"
cp ram.img /var/lib/tftpboot/ramdisk-android-2.6.25.s
echo "Copy uImage file"
cp ${ARMDEV}/build/linux-android-2.6.25/arch/arm/boot/uImage /var/lib/tftpboot/uImage-android-s3c2440
EOF
() The booting processes is as following:
Starting kernel ...
Uncompressing Linux........................................................................................................... done, booting the kerne.
Linux version 2.6.25 (armdev@test.intra.wizign.com) (gcc version 4.1.2) #54 Wed Nov 19 09:19:00 CST 2008
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: SBZ2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C244X: core 399.651 MHz, memory 133.217 MHz, peripheral 66.608 MHz
S3C24XX Clocks, (c) 2004 Simtec Electronics
CLOCK: Slow mode (2.116 MHz), fast, MPLL on, UPLL on
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: root=/dev/nfs rw noinitrd console=ttySAC0,115200 init=/linuxrc nfsroot=192.168.1.12:/vdisk/armdev_fs ip=192.168.1.30:192.168.1.12f
irq: clearing pending ext status 00000080
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
timer tcon=00500000, tcnt d8d2, tcfg 00000200,00000000, usec 0000170f
Console: colour dummy device 80x30
console [ttySAC0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 61184KB available (3040K code, 507K data, 144K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 152 bytes
NET: Registered protocol family 16
S3C2410 Power Management, (c) 2004 Simtec Electronics
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4800000, irq 33
DMA channel 1 at c4800040, irq 34
DMA channel 2 at c4800080, irq 35
DMA channel 3 at c48000c0, irq 36
S3C244X: Clock Support, DVS off
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.
fuse init (API version 7.9)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Console: switching to colour frame buffer device 30x40
fb0: s3c2410fb frame buffer device
lp: driver loaded but no devices found
ppdev: user-space parallel port driver
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
brd: module loaded
loop: module loaded
dm9000 Ethernet Driver, V1.30
eth0: dm9000 at c485e300,c4860304 IRQ 51 MAC: 08:00:3e:26:0a:5b (chip)
Uniform Multi-Platform E-IDE driver
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
BAST NOR-Flash Driver, (c) 2004 Simtec Electronics
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2440-nand s3c2440-nand: Tacls=3, 22ns Twrph0=8 60ns, Twrph1=3 22ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 2 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00200000 : "Kernel"
0x00200000-0x04000000 : "root partition"
usbmon: debugfs is not available
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
mice: PS/2 mouse device common for all mice
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c2440-i2c s3c2440-i2c: slave address 0x10
s3c2440-i2c s3c2440-i2c: bus frequency set to 378 KHz
s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
logger: created 64K log 'log_main'
logger: created 64K log 'log_events'
logger: created 64K log 'log_radio'
TCP cubic registered
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
IP-Config: Complete:
device=eth0, addr=192.168.1.30, mask=255.255.255.0, gw=192.168.1.1,
host=Android, domain=, nis-domain=(none),
bootserver=192.168.1.12, rootserver=192.168.1.12, rootpath=
prepare_namespace() - start
mount_root()
Looking up port of RPC 100003/2 on 192.168.1.12
Looking up port of RPC 100005/1 on 192.168.1.12
VFS: Mounted root (nfs filesystem).
prepare_namespace() - end
Freeing init memory: 144K
() Use ping to test that the system is booted
$ ping 192.168.1.30
PING 192.168.1.30 (192.168.1.30) 56(84) bytes of data.
64 bytes from 192.168.1.30: icmp_seq=1 ttl=64 time=0.417 ms
64 bytes from 192.168.1.30: icmp_seq=2 ttl=64 time=0.384 ms
64 bytes from 192.168.1.30: icmp_seq=3 ttl=64 time=0.381 ms
This time, I am porting android to SAMSUNG S3C2440A, successfully.
Now, the kernel is bootable, my next step has works:
- Mounting file system (Temporarily, I can ping to OS, it means that the OS has worked)
- Tuning GUI and some hardware related driver
- Porting android's OS environment and demo APs
- Developing applications
Following list describes basic configuration in the build process; for tuning in detail, some hardware related configuration is a must step, the good references are as following:
linux-2.6.26内核移植到S3C2440平台
linux-2.6.25内核移植到S3C2440平台
移植内核2.6.24.4到S3C2440
《Linux系统移植》
A simple description of porting steps:
CPU is SAMSUNG S3C2440A
Linux kernel Android version 2.6.25.
Cross compiled GCC and build basic OS eviroment, please check this site:
Cross-Compiled Linux From Scratch - Embedded (Version SVN-0.0.1-20080109-arm).
() Busybox-1.12.1 - OS's working environment
cd ${ARMDEV}/build
tar -jxvf ${ARMDEV}/sources/busybox-1.12.1.tar.bz2
cd busybox-1.12.1
patch -Np1 -i ../busybox-1.12.1-fixes-1.patch
patch -Np1 -i ../busybox-1.12.1-iptunnel_headers-1.patch
make defconfig
BUSYBOX_OPTIONS="CONFIG_DMALLOC CONFIG_BUILD_AT_ONCE CONFIG_BUILD_LIBBUSYBOX
CONFIG_FEATURE_SH_IS_NONE CONFIG_LOCALE_SUPPORT CONFIG_TFTP CONFIG_FTPGET
CONFIG_FTPPUT CONFIG_IPCALC CONFIG_TFTP CONFIG_HUSH CONFIG_LASH
CONFIG_MSH CONFIG_INETD CONFIG_DPKG CONFIG_RPM2CPIO CONFIG_RPM
CONFIG_FOLD CONFIG_LOGNAME CONFIG_OD CONFIG_CRONTAB CONFIG_UUDECODE
CONFIG_UUENCODE CONFIG_SULOGIN CONFIG_DC CONFIG_DEBUG_YANK_SUSv2
CONFIG_DEBUG_INIT CONFIG_DEBUG_CROND_OPTION CONFIG_FEATURE_UDHCP_DEBUG
CONFIG_TASKSET CONFIG_CHATTR CONFIG_FSCK CONFIG_LSATTR CONFIG_CHPST
CONFIG_SETUIDGID CONFIG_ENVUIDGID CONFIG_ENVDIR CONFIG_SOFTLIMIT
CONFIG_FEATURE_2_4_MODULES"
for config in $BUSYBOX_OPTIONS; do
cp .config{,.orig}
sed -e "s:${config}=y:${config}=n:" .config.orig > .config
done
BUSYBOX_OPTIONS="CONFIG_FEATURE_SH_IS_ASH CONFIG_FEATURE_TRACEROUTE_VERBOSE CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE"
for config in $BUSYBOX_OPTIONS; do
cp .config{,.orig}
sed -e "s:# ${config} is not set:${config}=y:" .config.orig > .config
done
make ARCH=arm CROSS_COMPILE="${ARM_TARGET}-"
make ARCH=arm CROSS_COMPILE="${ARM_TARGET}-" CONFIG_PREFIX="${ARMDEV}" install
cp examples/depmod.pl ${ARMDEV}/cross-tools/bin
chmod 755 ${ARMDEV}/cross-tools/bin/depmod.pl
() Ext2 - file system tool
cd ${ARMDEV}/build
tar -zxvf ${ARMDEV}/sources/e2fsprogs-1.39.tar.gz
cd e2fsprogs-1.39
mkdir -v build
cd build
CC="${CC} -Os" ../configure --build=${ARM_HOST} --host=${ARM_TARGET} --prefix=/usr --with-root-prefix="" --with-cc="${CC} -Os" --with-linker=${LD}
make
make DESTDIR=${ARMDEV} install
make DESTDIR=${ARMDEV} install-libs
() Iana-Etc-2.20 - network services and communication protocol
cd ${ARMDEV}/build
tar -jxvf ${ARMDEV}/sources/iana-etc-2.20.tar.bz2
cd iana-etc-2.20
make
make DESTDIR=${ARMDEV} install
() Zlib-1.2.3 0 - compress and uncompress program
cd ${ARMDEV}/build
tar -zxvf ${ARMDEV}/sources/zlib-1.2.3.tar.gz
cd zlib-1.2.3
patch -Np1 -i ${ARMDEV}/sources/zlib-1.2.3-DESTDIR-1.patch
cp configure{,.orig}
sed -e 's/-O3/-Os/g' configure.orig > configure
CC="${CC}" ./configure --prefix=/usr --shared
make
make DESTDIR=${ARMDEV} install
mv -v ${ARMDEV}/usr/lib/libz.so.* ${ARMDEV}/lib
ln -svf ../../lib/libz.so.1 ${ARMDEV}/usr/lib/libz.so
() Build password protection mechanics
echo "Create /etc/shadow file"
cat > ${ARMDEV}/etc/shadow << "EOF"
root:$1$BQY1.ACn$rvcsFmggQFH.jyCD/X/NV1:13553:0:99999:7:::
bin:x:13553:0:99999:7:::
daemon:x:13553:0:99999:7:::
adm:x:13553:0:99999:7:::
lp:x:13553:0:99999:7:::
mail:x:13553:0:99999:7:::
news:x:13553:0:99999:7:::
uucp:x:13553:0:99999:7:::
operator:x:13553:0:99999:7:::
postmaster:x:13553:0:99999:7:::
nobody:x:13553:0:99999:7:::
EOF
() cramfs-1.1 - tool for building file system
cd ${ARMDEV}/build
tar -zxvf ${ARMDEV}/sources/cramfs-1.1.tar.gz
cd cramfs-1.1
make
$ su
# cp mkcramfs /usr/bin
# cp cramfsck /usr/bin
() JFFS2 - manage file system of Flash memory
cd ${ARMDEV}/sources
cvs -d :pserver:anoncvs@cvs.infradead.org:/home/cvs login #password: anoncvs
cvs -d :pserver:anoncvs@cvs.infradead.org:/home/cvs co mtd
cd mtd/util/
make clean
make
cp mkfs.jffs /sbin
cp mkfs.jffs2 /sbin
() /etc/fstab
cat > ${ARMDEV}/etc/fstab << "EOF"
# Begin /etc/fstab
# Help information
# man 5 fstab
# file system mount-point type options dump fsck
# order
/dev/ram / ext2 defaults 1 1
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
devpts /dev/pts devpts gid=4,mode=620 0 0
shm /dev/shm tmpfs defaults 0 0
none /proc/bus/usb usbdevfs defaults 0 0
# End /etc/fstab
EOF
() Linux-2.6.25 (android version)
cd ${ARMDEV}/build
tar -jxvf ${ARMDEV}/sources/linux-2.6.25-android-1.0_r1.tar.gz
mv kernel.git linux-android-2.6.25
cd linux-android-2.6.25
make mrproper
make ARCH=arm CROSS_COMPILE=${ARM_TARGET}- s3c2410_defconfig
make ARCH=arm CROSS_COMPILE=${ARM_TARGET}- gconfig
The following configuration is only for my evaluation board, just for reference.
Device Drivers
Block Devices BLK_DEV
RAM block device support BLK_DEV_RAM
(2) Default number of RAM disks BLK_DEV_RAM_COUNT
(41984) Default RAM disk size (kbytes) BLK_DEV_RAM_SIZE
(1024) Default RAM disk block size (bytes) BLK_DEV_RAM_BLOCKSIZE
File systems
Kernel automounter support AUTOFS_FS
kernel automounter version 4 support AUTOFS4_FS
Filesystem in Userspace support FUSE_FS
Pseudo filesystems
/dev/ file system support DEVFS_FS
Virtual memory file system support (former shm fs) TMPFS
Userspace-driven configuration filesystem CONFIGFS_FS
Miscellaneous filesystems
YAFFS2 file system support YAFFS_FS
512 byte / page devices YAFFS_YAFFS1
2048 byte / page devices YAFFS_YAFFS2
Network File Systems NETWORK_FILESYSTEMS
NFS file system support NFS_FS
Provide NFSv3 client support NFS_V3
Root file system on NFS ROOT_NFS
Journalling Flash File System v2 (JFFS2) support JFFS2_FS
JFFS2 debugging verbosity (0 = quiet, 2 = noisy) JFFS2_FS_DEBUG
JFFS2 write-buffering support JFFS2_FS_WRITEBUFFER
Advanced compression options for JFFS2 JFFS2_COMPRESSION_OPTIONS
JFFS2 ZLIB compression support JFFS2_ZLIB
JFFS2 RTIME compression support JFFS2_RTIME
JFFS2 RUBIN compression support JFFS2_RUBIN
Boot options
Default kernel command string CMDLINE {command}
{command}
root=/dev/hda1 rw rootfstype=cramfs noinitrd init=/linuxrc console=ttySAC0,115200 mem=64M
() /linuxrc
cd ${ARMDEV}
mv linuxrc linuxrc.busybox
cat > ${ARMDEV}/linuxrc << "EOF"
#!/bin/sh
echo "mount /etc as ramfs"
/bin/mount -n -t ramfs ramfs /etc
/bin/cp -a /mnt/etc/* /etc
# re-create the /etc/mtab entries
echo "re-create the /etc/mtab entries"
/bin/mount -f -t cramfs -o remount,ro /dev/mtdblock1 /
# mount some file system
echo "--------munt /dev/shm as tmpfs"
/bin/mount -n -t tmpfs tmpfs /dev/shm
# mount /proc as proc file system
echo "--------mount /proc as proc"
/bin/mount -n -t proc none /proc
# mount /sys as sysfs file system
echo "--------mount /sys as sysfs
/bin/mount -n -t sysfs none /sys
#input command to LCD
#sh < /dev/ttyS0
exec /sbin/init
EOF
chmod 775 ${ARMDEV}/linuxrc
() /etc/inetd.conf
cat > ${ARMDEV}/etc/inetd.conf << "EOF"
#
telnet stream tcp nowait root /usr/sbin/telnetd
EOF
() CLFS-Bootscripts-1.0-pre4
cd ${ARMDEV}/build
tar -jxvf ${ARMDEV}/sources/clfs-embedded-bootscripts-1.0-pre4.tar.bz2
cd clfs-embedded-bootscripts
make DESTDIR=${ARMDEV} install
() /etc/mdev.conf
cat > ${ARMDEV}/etc/mdev.conf << "EOF"
# /etc/mdev/conf
SLEEP=10
# Symlinks:
# Syntax: %s -> %s
MAKEDEV -> ../sbin/MAKEDEV
/proc/core -> kcore
fd -> /proc/self/fd
mcdx -> mcdx0
radio -> radio0
ram -> ram1
sbpcd -> sbpcd0
sr0 -> scd0
sr1 -> scd1
sr10 -> scd10
sr11 -> scd11
sr12 -> scd12
sr13 -> scd13
sr14 -> scd14
sr15 -> scd15
sr16 -> scd16
sr2 -> scd2
sr3 -> scd3
sr4 -> scd4
sr5 -> scd5
sr6 -> scd6
sr7 -> scd7
sr8 -> scd8
sr9 -> scd9
stderr -> fd/2
stdin -> fd/0
stdout -> fd/1
# Remove these devices, if using a headless system
# You will see an error mdev: Bad line 35
vbi -> vbi0
vcs -> vcs0
vcsa -> vcsa0
video -> video0
# Stop Remove for headless system
# Devices:
# Syntax: %s %d:%d %s
# devices user:group mode
null 0:0 777
zero 0:0 666
urandom 0:0 444
console 0:5 0600
fd0 0:11 0660
hdc 0:6 0660
kmem 0:9 000
mem 0:9 0640
port 0:9 0640
ptmx 0:5 0660
sda* 0:6 0660
sdb* 0:6 0660
hda* 0:6 0660
hdb* 0:6 0660
tty 0:5 0660
tty0* 0:5 0660
tty1* 0:5 0660
tty2* 0:5 0660
tty3* 0:5 0660
tty4* 0:5 0660
tty5* 0:5 0660
tty6* 0:5 0660
ttyS* 0:20 640
EOF
() /etc/profile
cat > ${ARMDEV}/etc/profile << "EOF"
# /etc/profile
# Set the initial path
export PATH=/bin:/usr/bin
if [ 'id -u' -eq 0 ] ; then
PATH=/bin:/sbin:/usr/bin:/usr/sbin
unset HISTFILE
fi
# Setup some environment variables.
export USER='id -un'
export LOGNAME=$USER
export HOSTNAME='/bin/hostname'
export HISTSIZE=1000
export HISTFILESIZE=1000
export PAGER='/bin/more '
export EDITOR='/bin/vi'
export INPUTRC=/etc/inputrc
# End /etc/profile
EOF
() Creating the /etc/inputrc File
cat > ${ARMDEV}/etc/inputrc << "EOF"
# Begin /etc/inputrc
# Modified by Chris Lynn
# Allow the command prompt to wrap to the next line
set horizontal-scroll-mode Off
# Enable 8bit input
set meta-flag On
set input-meta On
# Turns off 8th bit stripping
set convert-meta Off
# Keep the 8th bit for display
set output-meta On
# none, visible or audible
set bell-style none
# All of the following map the escape sequence of the
# value contained inside the 1st argument to the
# readline specific functions
"\eOd": backward-word
"\eOc": forward-word
# for linux console
"\e[1~": beginning-of-line
"\e[4~": end-of-line
"\e[5~": beginning-of-history
"\e[6~": end-of-history
"\e[3~": delete-char
"\e[2~": quoted-insert
# for xterm
"\eOH": beginning-of-line
"\eOF": end-of-line
# for Konsole
"\e[H": beginning-of-line
"\e[F": end-of-line
# End /etc/inputrc
EOF
() /etc/inittab
cat > ${ARMDEV}/etc/inittab << "EOF"
# /etc/inittab
::sysinit:/etc/rc.d/startup
::respawn:/usr/sbin/telnetd
tty1::respawn:/sbin/getty 38400 tty1
tty2::respawn:/sbin/getty 38400 tty2
tty3::respawn:/sbin/getty 38400 tty3
tty4::respawn:/sbin/getty 38400 tty4
tty5::respawn:/sbin/getty 38400 tty5
tty6::respawn:/sbin/getty 38400 tty6
# Put a getty on the serial line (for a terminal)
# uncomment this line if your using a serial console
#::respawn:/sbin/getty -L ttyS0 115200 vt100
::respawn:/sbin/getty -L ttySAC0 115200 vt100
#T0:12345:respawn:/sbin/getty -n -l /usr/local/sbin/autologin -L /dev/tts/1 115200 vt100
::shutdown:/etc/rc.d/shutdown
::ctrlaltdel:/sbin/reboot
EOF
() Setting Hostname
echo "android" > ${ARMDEV}/etc/HOSTNAME
() /etc/hosts File
Has network card
cat > ${ARMDEV}/etc/hosts << "EOF"
# Begin /etc/hosts (network card version)
127.0.0.1 localhost
192.168.1.30 android.wizign.com android
# End /etc/hosts (network card version)
EOF
Without network card
cat > ${ARMDEV}/etc/hosts << "EOF"
# Begin /etc/hosts (no network card version)
127.0.0.1 dpf-dev.wizign.com dpf-dev localhost
# End /etc/hosts (no network card version)
EOF
() Configuring the network Script
cat > ${ARMDEV}/etc/network.conf << "EOF"
# /etc/network.conf
# Global Networking Configuration
# interface configuration is in /etc/network.d/
# set to yes to enable networking
NETWORKING=yes
# set to yes to set default route to gateway
USE_GATEWAY=no
# set to gateway IP address
GATEWAY=192.168.1.1
EOF
() creates a sample interface.eth0 file for the eth0 device:
mkdir ${ARMDEV}/etc/network.d &&
cat > ${ARMDEV}/etc/network.d/interface.eth0 << "EOF"
# Network Interface Configuration
# network device name
INTERFACE=eth0
# set to yes to use DHCP instead of the settings below
DHCP=no
# IP address
IPADDRESS=192.168.1.30
# netmask
NETMASK=255.255.255.0
# broadcast address
BROADCAST=192.168.1.255
EOF
() Creating the ${ARMDEV}/etc/resolv.conf File
cat > ${ARMDEV}/etc/resolv.conf << "EOF"
# Begin /etc/resolv.conf
domain wizign.com
nameserver 168.95.1.1
nameserver 168.95.192.1
# End /etc/resolv.conf
EOF
() Copy the clean OS system, preparing to port on the evaluation board
su -
if [ ! -d /mnt/armdev_fs ]; then
mkdir /mnt/armdev_fs
fi
mount --bind /vdisk/armdev_fs /mnt/armdev_fs
export ARMDEV="/mnt/armdev"
export ARMDEV_FS="/mnt/armdev_fs"
for dir in $(ls "${ARMDEV}"); do
if [ "$dir" == 'sources' ]; then
echo "Skip $dir"
elif [ "$dir" == 'build' ]; then
echo "Skip $dir"
elif [ "$dir" == 'cross-tools' ]; then
echo "Skip $dir"
else
cp -avr ""${ARMDEV}"/$dir" "${ARMDEV_FS}/."
fi
done
rm -rfv ${ARMDEV_FS}/usr/src/*
rm -rfv ${ARMDEV_FS}/usr/include
rm -rfv ${ARMDEV_FS}/usr/man
rm -rfv ${ARMDEV_FS}/usr/share/man
FILES="'ls ${ARMDEV_FS}/lib/*.a ${ARMDEV_FS}/usr/lib/*.a'"
for file in $FILES; do
rm -fv $file
done
chown -Rv root:root ${ARMDEV_FS}
chgrp -v utmp ${ARMDEV_FS}/var/run/utmp ${ARMDEV_FS}/var/log/lastlog
mknod -m 0666 ${ARMDEV_FS}/dev/null c 1 3
mknod -m 0600 ${ARMDEV_FS}/dev/console c 5 1
If using cramfs
mkcramfs ${ARMDEV_FS} /mnt/rootfs.cramfs
cp /mnt/rootfs.cramfs /var/lib/tftpboot/ramdisk-android-2.6.25.cramfs
If using jffs2
mkfs.jffs2 -d ${ARMDEV_FS} -p -s 0x200 -e 0x4000 -n -l -U -o ramdisk.jffs2
cp /mnt/ramdisk.jffs2 /var/lib/tftpboot/ramdisk-android-2.6.25.jffs2
() This shell script is used to build RAM disk
cat > /mnt/mkramdisk.sh << "EOF"
#! /bin/bash
# Remove files
echo "remove files"
rm -f ramdisk.img.gz
rm -f ramdisk32.img
rm -f ramdisk.img
rm -fr ramdisk
# Create ramdisk32
echo "create ramdisk32"
cd /mnt
dd if=/dev/zero of=ramdisk32.img bs=1024 count=40960
mke2fs -F -vm0 ramdisk32.img
mkdir ramdisk
mount -o loop ramdisk32.img ramdisk
cd ramdisk/
cp -arv ${ARMDEV_FS}/* .
cd ..
umount ramdisk
# Make ram disk image
echo "make ram disk image"
cp ramdisk32.img ramdisk.img
gzip ramdisk.img
./mkimage -A arm -O linux -T ramdisk -C gzip -a 30080000 -e 30080000 -d ramdisk.img.gz -n 'SBZ2440 Ramdisk' ram.img
# copy files
echo "Copy RAM disk file"
cp ram.img /var/lib/tftpboot/ramdisk-android-2.6.25.s
echo "Copy uImage file"
cp ${ARMDEV}/build/linux-android-2.6.25/arch/arm/boot/uImage /var/lib/tftpboot/uImage-android-s3c2440
EOF
() The booting processes is as following:
Starting kernel ...
Uncompressing Linux........................................................................................................... done, booting the kerne.
Linux version 2.6.25 (armdev@test.intra.wizign.com) (gcc version 4.1.2) #54 Wed Nov 19 09:19:00 CST 2008
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: SBZ2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C244X: core 399.651 MHz, memory 133.217 MHz, peripheral 66.608 MHz
S3C24XX Clocks, (c) 2004 Simtec Electronics
CLOCK: Slow mode (2.116 MHz), fast, MPLL on, UPLL on
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: root=/dev/nfs rw noinitrd console=ttySAC0,115200 init=/linuxrc nfsroot=192.168.1.12:/vdisk/armdev_fs ip=192.168.1.30:192.168.1.12f
irq: clearing pending ext status 00000080
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
timer tcon=00500000, tcnt d8d2, tcfg 00000200,00000000, usec 0000170f
Console: colour dummy device 80x30
console [ttySAC0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 61184KB available (3040K code, 507K data, 144K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 152 bytes
NET: Registered protocol family 16
S3C2410 Power Management, (c) 2004 Simtec Electronics
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4800000, irq 33
DMA channel 1 at c4800040, irq 34
DMA channel 2 at c4800080, irq 35
DMA channel 3 at c48000c0, irq 36
S3C244X: Clock Support, DVS off
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.
fuse init (API version 7.9)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Console: switching to colour frame buffer device 30x40
fb0: s3c2410fb frame buffer device
lp: driver loaded but no devices found
ppdev: user-space parallel port driver
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
brd: module loaded
loop: module loaded
dm9000 Ethernet Driver, V1.30
eth0: dm9000 at c485e300,c4860304 IRQ 51 MAC: 08:00:3e:26:0a:5b (chip)
Uniform Multi-Platform E-IDE driver
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
BAST NOR-Flash Driver, (c) 2004 Simtec Electronics
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2440-nand s3c2440-nand: Tacls=3, 22ns Twrph0=8 60ns, Twrph1=3 22ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 2 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00200000 : "Kernel"
0x00200000-0x04000000 : "root partition"
usbmon: debugfs is not available
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
mice: PS/2 mouse device common for all mice
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c2440-i2c s3c2440-i2c: slave address 0x10
s3c2440-i2c s3c2440-i2c: bus frequency set to 378 KHz
s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
logger: created 64K log 'log_main'
logger: created 64K log 'log_events'
logger: created 64K log 'log_radio'
TCP cubic registered
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
IP-Config: Complete:
device=eth0, addr=192.168.1.30, mask=255.255.255.0, gw=192.168.1.1,
host=Android, domain=, nis-domain=(none),
bootserver=192.168.1.12, rootserver=192.168.1.12, rootpath=
prepare_namespace() - start
mount_root()
Looking up port of RPC 100003/2 on 192.168.1.12
Looking up port of RPC 100005/1 on 192.168.1.12
VFS: Mounted root (nfs filesystem).
prepare_namespace() - end
Freeing init memory: 144K
() Use ping to test that the system is booted
$ ping 192.168.1.30
PING 192.168.1.30 (192.168.1.30) 56(84) bytes of data.
64 bytes from 192.168.1.30: icmp_seq=1 ttl=64 time=0.417 ms
64 bytes from 192.168.1.30: icmp_seq=2 ttl=64 time=0.384 ms
64 bytes from 192.168.1.30: icmp_seq=3 ttl=64 time=0.381 ms
Subscribe to:
Posts (Atom)