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
The patch file of S3C2410 touch screen, download path:
s3c2410_touchscreen.patch
In 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#

3 comments:

Unknown said...

您好!您前面贴的移植android到DM355的工作进展的如何了?能否告知一下进度或者遇到的问题?我对其感兴趣。多谢!

Sean Wang said...

您好, 我正想讓我的 CHT9110 可以跑 Android, 找了半天, 讓我找到您這邊來.

請問一下, 您可以分享一下您 compile 出來的 kernel 嗎?

我自己嘗試了很多次都無法成功.

謝謝!

Causality said...

CHT9110 用的 CPU 是 Samsung SC32442, 相關週邊硬體的規格我不清楚, 所以無法了解跟 S3C2440A 的差異有多大.

再加上 CHT9110 是銷售的產品, 不像我目前用的開發版, 所以有程式除錯和燒錄的問題.