OK6410-LINUX2.6.39.2个人移植版本下载(板载硬件驱动基本都已移植成功)

 

   快乐是需要与人分享才能体现出它的真正含义的,呵呵,花了一个多星期的时间,OK6410之LINUX2.6.39.2版本的移植版本终于可以放出来了,因为到现在,这个OK6410的LINUX2.6.39.2移植版本才算的上基本正常了(对自己而言,呵呵),在驱动移植方面花了不少时间,其中最痛苦的莫过于OK6410的声卡驱动的移植了,由于在LINUX2.6.39.2版本中ALSA (ADVANCDE LINUX SOUND ARCHTECTURE)的版本已经升到1.0.24版本了,在许多文件上都有很大的变化,而且在ASOC 驱动这方面也有很明显的变化,对于加载CODEC,CODEC_DAI,CPU_DAI,以及SND_SOC_PLATFORM 这四个驱动上的方式和以往有明显的不同,采用CODEC,CODEC_DAI,CPU_DAI与PLATFORM(就是目标平台)分离,在ASOC的核心驱动文件SOC-CORE.C文件中,通过自己加入PRINTK 代码调试打印信息观察,在加载CODEC,CODEC_DAI,CPU_DAI,SND_SOC_PLATFORM时是通过查找相关DRIVER_LIST等LIST文件,查找对应驱动NAME然后实行匹配加载的,起先,内核SOUND LISTS:

一直是无法发现SOUNDCARDS,想不明,于是通过加入PRINTK内核调试信息,发现在SOC-CORE.C里面的soc_bind_dai_link(card, i);这个函数里面在

if (rtd->platform) {
  goto out;
 }
 /* no, then find CPU DAI from registered DAIs*/
 list_for_each_entry(platform, &platform_list, list) {
  if (!strcmp(platform->name, dai_link->platform_name)) {

   rtd->platform = platform;
   goto out;
  }
 }

 dev_dbg(card->dev, "platform %s not registered\n",
   dai_link->platform_name);
 return 0;

这一段上出现问题,由于strcmp(platform->name, dai_link->platform_name)失败,导致PLATFORM驱动加载失败,从而 RETURN 0,返回,导致最后无法执行card->num_rtd++,最终导致card->num_rtd != card->num_links) ,而RETURN,即便出现了 后面一连串的代码失效,导致声卡驱动加载失败,经过反复的加入PRINTK内核信息调试打印信息观察,原来问题是出在DMA.C这个文件上,这个是platform:samsung-audio驱动,由于它未在内核里面注册,从而导致上面的list_for_each_entry(platform, &platform_list, list),由于在列表里找不到对应NAME的驱动,从而导致加载PLATFORM失败,最终发现,原来platform:samsung-audio驱动的注册,是需要在MACH-OK6410里面的板级硬件初始化函数里面进行的,*ok6410_devices[] __initdata 里面需要添加&samsung_asoc_dma,而这个是在PLAT/DEVS.H里面申明过的,与&s3c64xx_device_ac97必须成对使用,这个完成后再在SMDK_WM9713.C添加相关的初始化代码就行了,说了这么多废话,只是想和大家交流一下我的艰辛经历 ,呵呵 ,好了,这些是题外话了,当然了,在这里将调试经验也太扯了,呵呵。

 

下载地址:

http://u.115.com/file/aq3p7398#
ok6410-linux-2.6.39.2.tar.bz2

WARNNING  :由于上传仓促,导致linux2.6.39.2/sound/soc/samung/smdk_wm9713.c文件里定义的ok6410_ac97_init函数在static struct snd_soc_dai_link ok6410_dai[]里面调用时,名字搞错了只需修改.init = ok6410_ac97_init,即可,上传网速不给力啊,就贴出来大家自己修改吧,不然编译不过的。

对于MENUCONFIG 的配置文件,我已经在内核根目录下给出了一个我自己的OK6410_CONFIG文件,编译时,先make distclean   深沉清除一遍,然后 cp ok6410_config .config 最后make zImage 或是make uImage 即可

 

FOLLOWING IS  A ABSTRACT ABOUT OK6410_LINUX2.6.39.2

DEVICES DRIVER

1,DM9000网卡驱动 功能正常(可以正常挂载NFS,以及NFS_ROOT)  (已测试)

 

2,IIC 驱动 功能正常(已测试)

3,RTC驱动 功能正常 (已测试)

4,LEDS 驱动 功能正常 (已测试)

5,GPIO_KEYS驱动 功能正常 (已测试)

6,LCD(4.3OR8.0)驱动 有点瑕疵,屏幕往Y轴上延伸了几个点阵距离,有空再调试看看  (已测试)

7,USB-HOST驱动 功能正常 (已测试)

8,USB-STORAGE驱动 功能正常 (已测试)

9,PWM(蜂鸣器)驱动 功能正常   (已测试)

10,WM9713_AC97(板载声卡)驱动 功能正常 (已测试)

11,TOUCH_SCREEM(触摸屏)驱动 功能正常 (已测试)

12,SD/MMC驱动 功能正常 (已测试)(备注:在启动状态不要拔卡,如果拔出再次插入需要重新掉电启动,才能发现SD卡中文件,原因未知,有空再看看)

13,YAFFS2文件驱动,自己修改官方版本使其适应,功能正常 (已测试)

由于本人只是个业余爱好者,也没有购买其他任何板件附属物品,因而那些驱动我也没有去理会,再说了,也无法测试,所以就现状还是先移植到这里吧,至于那个红外,估计用途也不大,等有空试试看,呵呵!

需要修改的文件 基本大半我都 CHMOD 755,LINUX系统里面

执行文件颜色为绿色,这样和白色可以很好的区分开,如果有兴趣的朋友想参考移植代码,这样也方便观察啊,对吧,至于S3C6410的硬件解码JPG,3D等还未移植,等有空再看看,现在我也不需要这些

 

最后,在这里说个题外话,LINUX3.0(即LINUX2.6.40)版本也出来了,看了一下设计到移植部分的代码基本没多大差别(ALSA也是1.0.24版本的,我这个移植的与其是通用的),有兴趣的朋友可以试试先,呵呵。

 若有疑问,请留言!(互相交流,共同进步,与人分享就是我的快乐)

俗话说的好,无图无真相,呵呵,一下是在我的OK6410单板上运行的打印信息(部分信息是我调试ASOC时加的,下载版本我已经去掉了):


Hit any key to stop autoboot:  0


NAND read: device 0 offset 0x100000, size 0x300000

 3145728 bytes read: OK

## Booting image at c0008000 ...

   Image Name:   Linux-2.6.39.2

   Created:      2011-08-07  12:34:58 UTC

   Image Type:   ARM Linux Kernel Image (uncompressed)

   Data Size:    2872644 Bytes =  2.7 MB

   Load Address: 50008000

   Entry Point:  50008000

   Verifying Checksum ... OK

OK


Starting kernel ...


Uncompressing Linux... done, booting the kernel.
Linux version 2.6.39.2 (root@hewenqiang-ubuntu) (gcc version 4.2.2) #1 Sun Aug 7 20:34:40 CST 2011
CPU: ARMv6-compatible processor [410fb766] revision 6 (ARMv7), cr=00c5387f
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: OK6410
Memory policy: ECC disabled, Data cache writeback
CPU S3C6410 (id 0x36410101)
S3C24XX Clocks, Copyright 2004 Simtec Electronics
camera: no parent clock specified
S3C64XX: PLL settings, A=532000000, M=532000000, E=24000000
S3C64XX: HCLK2=266000000, HCLK=133000000, PCLK=66500000
mout_apll: source is fout_apll (1), rate is 532000000
mout_epll: source is epll (1), rate is 24000000
mout_mpll: source is mpll (1), rate is 532000000
mmc_bus: source is mout_epll (0), rate is 24000000
mmc_bus: source is mout_epll (0), rate is 24000000
mmc_bus: source is mout_epll (0), rate is 24000000
usb-bus-host: source is clk_48m (0), rate is 48000000
uclk1: source is dout_mpll (1), rate is 66500000
spi-bus: source is mout_epll (0), rate is 24000000
spi-bus: source is mout_epll (0), rate is 24000000
audio-bus: source is mout_epll (0), rate is 24000000
audio-bus: source is mout_epll (0), rate is 24000000
audio-bus: source is mout_epll (0), rate is 24000000
irda-bus: source is mout_epll (0), rate is 24000000
camera: no parent clock specified
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: root=/dev/mtdblock3 rootfstype=yaffs2 console=ttySAC0,115200
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 123576k/123576k available, 7496k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xff600000 - 0xffe00000   (   8 MB)
    vmalloc : 0xc8800000 - 0xf6000000   ( 728 MB)
    lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .init : 0xc0008000 - 0xc002e000   ( 152 kB)
      .text : 0xc002e000 - 0xc05951d4   (5533 kB)
      .data : 0xc0596000 - 0xc05d2780   ( 242 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:246
VIC @f6000000: id 0x00041192, vendor 0x41
VIC @f6010000: id 0x00041192, vendor 0x41
Console: colour dummy device 80x30
console [ttySAC0] enabled
Calibrating delay loop... 528.79 BogoMIPS (lpj=2643968)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
OK6410: Option string ok6410=0
OK6410: selected LCD display is 480x272
s3c64xx_dma_init: Registering DMA channels
PL080: IRQ 73, at c8808000, channels 0..8
PL080: IRQ 74, at c880c000, channels 8..16
S3C6410: Initialising architecture
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
s3c-i2c s3c2440-i2c.0: slave address 0x10
s3c-i2c s3c2440-i2c.0: bus frequency set to 64 KHz
s3c-i2c s3c2440-i2c.0: i2c-0: S3C I2C adapter
Advanced Linux Sound Architecture Driver Version 1.0.24.
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
nfs4filelayout_init: NFSv4 File Layout Driver Registering...
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
NTFS driver 2.1.30 [Flags: R/W].
ROMFS MTD (C) 2007 Red Hat, Inc.
fuse init (API version 7.16)
msgmni has been set to 241
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Console: switching to colour frame buffer device 60x34
s3c-fb s3c-fb: window 0: fb
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
s3c6400-uart.0: ttySAC0 at MMIO 0x7f005000 (irq = 16) is a S3C6400/10
s3c6400-uart.1: ttySAC1 at MMIO 0x7f005400 (irq = 20) is a S3C6400/10
s3c6400-uart.2: ttySAC2 at MMIO 0x7f005800 (irq = 24) is a S3C6400/10
s3c6400-uart.3: ttySAC3 at MMIO 0x7f005c00 (irq = 28) is a S3C6400/10
pwm initialized
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c6400-nand: Tacls=4, 30ns Twrph0=8 60ns, Twrph1=6 45ns
s3c24xx-nand s3c6400-nand: System booted from NAND
s3c24xx-nand s3c6400-nand: NAND soft ECC
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 4 MTD partitions on "nand":
0x000000000000-0x000000100000 : "Bootloader"
0x000000100000-0x000000600000 : "Kernel"
0x000000600000-0x000007e00000 : "User"
0x000007e00000-0x000040000000 : "File System"
dm9000 Ethernet Driver, V1.31
dm9000 dm9000: eth2090025647: Invalid ethernet MAC address. Please set using ifconfig
eth0: dm9000b at c8826000,c882a004 IRQ 108 MAC: 52:39:37:af:22:03 (random)
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 79, io mem 0x74300000
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: S3C24XX OHCI
usb usb1: Manufacturer: Linux 2.6.39.2 ohci_hcd
usb usb1: SerialNumber: s3c24xx
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
mousedev: PS/2 mouse device common for all mice
input: gpio-keys as /devices/platform/gpio-keys/input/input0
S3C Touchscreen driver, (c) 2008 Samsung Electronics
S3C TouchScreen got loaded successfully : 12 bits
input: S3C TouchScreen as /devices/virtual/input/input1
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c-rtc s3c64xx-rtc: rtc disabled, re-enabling
s3c-rtc s3c64xx-rtc: rtc core: registered s3c as rtc0
i2c /dev entries driver
Linux media interface: v0.10
lirc_dev: IR Remote Control driver registered, major 252
IR NEC protocol handler initialized
IR RC5(x) protocol handler initialized
IR RC6 protocol handler initialized
IR JVC protocol handler initialized
IR Sony protocol handler initialized
IR RC5 (streamzap) protocol handler initialized
IR LIRC bridge handler initialized
Linux video capture interface: v2.00
i2c-core: driver [tuner] using legacy suspend method
i2c-core: driver [tuner] using legacy resume method
i2c-core: driver [msp3400] using legacy suspend method
i2c-core: driver [msp3400] using legacy resume method
usbcore: registered new interface driver pvrusb2
pvrusb2: V4L in-tree version:Hauppauge WinTV-PVR-USB2 MPEG2 Encoder/Tuner
pvrusb2: Debug mask is 31 (0x1f)
usbcore: registered new interface driver hdpvr
usbcore: registered new interface driver uvcvideo
USB Video Class driver (v1.0.0)
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
s3c-sdhci s3c-sdhci.0: clock source 0: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.0: clock source 1: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.0: clock source 2: mmc_bus (24000000 Hz)
mmc0: SDHCI controller on samsung-hsmmc [s3c-sdhci.0] using ADMA
mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
s3c-sdhci s3c-sdhci.1: clock source 0: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.1: clock source 1: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.1: clock source 2: mmc_bus (24000000 Hz)
mmc1: SDHCI controller on samsung-hsmmc [s3c-sdhci.1] using ADMA
usbcore: registered new interface driver ushc
leds initialized
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
snd_soc_instantiate_card
begin  bind DAIS
complete
complete
list_for_each_entry(cpu_dai, &dai_list, list)
try_module_get
goto find_codec
list_for_each_entry(codec, &codec_list, list)
rtd->codec = codec
goto find_platform
list_for_each_entry(platform, &platform_list, list)
goto out
found all 4 of our client devices
return 1
achiev bind DAIS
initialize the register cache for each available codec
list_for_each_entry
check to see if we need to override the compress_type
snd_soc_init_codec_cache
after  achiev bind DAIS
 achiev snd_card_create
INIT_WORK
initialise the sound card only once
soc_probe_dai_link
mmc0: new high speed SD card at address 0001
mmcblk0: mmc0:0001  1.85 GiB
 mmcblk0: p1
mmc1: mmc_rescan_try_freq: trying to init card at 400000 Hz
usb 1-1: new full speed USB device number 2 using s3c2410-ohci
mmc1: mmc_rescan_try_freq: trying to init card at 300000 Hz
mmc1: mmc_rescan_try_freq: trying to init card at 200000 Hz
mmc1: mmc_rescan_try_freq: trying to init card at 100000 Hz
asoc: wm9713-hifi <-> samsung-ac97 mapping ok
soc_probe_aux_dev
card->dapm_widgets_routes
usb 1-1: New USB device found, idVendor=0ac8, idProduct=3420
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1: Product: Altair USB2.0 Camera
usb 1-1: Manufacturer: Vimicro Corp.
ALSA device list:
  #0: OK6410 WM9713
TCP cubic registered
NET: Registered protocol family 17
Registering the dns_resolver key type
VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
uvcvideo: Found UVC 1.00 device Altair USB2.0 Camera (0ac8:3420)
s3c-rtc s3c64xx-rtc: setting system clock to 2000-12-19 10:47:52 UTC (977222872)
input: Altair USB2.0 Camera as /devices/platform/s3c2410-ohci/usb1/1-1/1-1:1.0/input/input2
yaffs: dev is 32505859 name is "mtdblock3" rw
yaffs: passed flags ""
VFS: Mounted root (yaffs2 filesystem) on device 31:3.
Freeing init memory: 152K
*************************************
     http://www.witech.com.cn       
*************************************
mkdir: cannot create directory '/mnt/disk': File exists
Try to bring eth0 interface up......dm9000 dm9000: eth0: link down
Done
                                 
Starting Qtopia, please waiting...

Please press Enter to activate this console. touch...


[root@FORLINX6410 /]#

 

 

 

 

 

 

 

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值