首页 / 操作系统 / Linux / 基于Ubuntu-2.6.35内核的SDIO-WiFi驱动移植
一、移植环境:
1、 主机:Ubuntu 10.10发行版
2、 目标机:FS_S5PC100平台
3、 交叉编译工具:arm-cortex_a8-linux-gnueabi
4、wifi模块:marvell-8686
5、内核:linux-2.6.35---------------------------------------------------------------------
二、在linux下的移植
1. 平台代码修改$ vim driver/mmc/host/sdhci.c 屏蔽以下代码
629行://printK (KERN_WARING "%s: too large timeout requested!
", mmc_hostname(host_>mmc));2. 内核驱动支持
因为S5PC100平台上SDIO功能已经支持,所以只需要内核驱动支持marvell-8686即可。 $ make menuconfig 修改:[*] Networking support ---> [*] Wireless ---> <*> cfg80211 - wireless configuration API {*} common routines for IEEE 802.11 driversDevice Drivers ---> [*] Network device support ---> Wireless LAN ---><*>Marvell 8xxx Libertas WLAN driver support<*> Marvell Libertas 8385/8686/8688 SDIO 802.11b/g cards Generic Driver Options --->(sd8686.bin sd8686_helper.bin) External firmware blobs to build into the kernel(firmware) Firmware blobs root directory3. 内核的修改
wifi的移植依赖于网卡驱动的移植和nand-flash平台的支持,可以参考Linux-2.6.35内核移植—网卡驱动的移植(见 http://www.linuxidc.com/Linux/2012-07/64775.htm )和Linux-2.6.35内核移植——Nand flash 驱动的移植(见 http://www.linuxidc.com/Linux/2012-07/64776.htm ),文件arch/arm/mach-s5pc100/mach-smdkc100.c下有内核的分区, 把第2个分区改成8M。因为生成的文件系统太大,大于4M。
修改如下(红色字体部分):static struct mtd_partition s5pc100_nand_part[] = {[0] = {.name= "bootloader",.size= SZ_1M,.offset= 0,},[1] = {.name= "kernel",.size= SZ_1M * 4,.offset= MTDPART_OFS_APPEND,},[2] = {.name= "rootfs",.size= SZ_8M,.offset= MTDPART_OFS_APPEND,},[3] = {.name= "usrfs",.offset= MTDPART_OFS_APPEND,.size= MTDPART_SIZ_FULL,},};4. 固件准备将固件sd8686.bin和sd8686_helper.bin拷贝到linux-2.6.35/firmware下。编译时会自动编译进内核。sd8686.bin和sd8686_helper.bin ,wpa_supplicant-0.7.3与openssl-0.9.8e下载地址:免费下载地址在 http://linux.linuxidc.com/用户名与密码都是www.linuxidc.com具体下载目录在 /2012年资料/7月/9日/基于Ubuntu-2.6.35内核的SDIO-WiFi驱动移植/$ cp sd8686.bin linux-2.6.35/firmware/
$ cp sd8686_helper.bin linux-2.6.35/firmware/
$ make zImage$ sudo cp zImage /tftpboot