I. sdio Device Driver porting
(1) modify the SD card driver so that the kernel supports the SD card
Modify file:ARCH/ARM/mach-s3c2410/mach-smdk2410.c
Add the required header file:
# Include <Mach/gpio. h>
# Include <Linux/MMC/host. h>
# Include <plat/MCI. h>
// Add SD card support for platform Devices
Static struct platform_device * smdk2410_devices [] _ initdata = {
& Amp; initi_device_ohci,
& Amp; cloud_device_ LCD,
& Amp; cloud_device_wdt,
& Amp; cloud_device_i2c0,
& Amp; cloud_device_iis,
& Amp; cloud_device_sdi,
};
Add Platform Data Dev-> platform_data
StaticStruct s3c24xx_mci_pdataSmdk2410_mmc_cfg _ initdata = {
. Gpio_detect = s3c2410_gpg (10 ),
. Set_power = NULL,
. Ocr_avail = mmc_vdd_32_33,
};
(2) Add smdk2410_init
S3c24xx_mci_set_platdata(& Smdk2410_mmc_cfg );
2. Configure the kernel to support marvel Wireless WiFi
Select the WLAN Marwell sdio module in the 35 Kernel
Device Drivers ----> [*] Network device support ---> [*] Wireless LAN ---> <M> Marwell 8xxx libertas WLAN Driver Support <M> Marwell libertas 8385/8686/8688 sdio 802.11b/g cards Networking support ---> -*-Wireless ---> <*> 80211-Wireless configureation API {*} Common routines for IEEE 802.11 drivers |
3. Compile the kernel and generate the driver module
(1) ExecuteMakeThenMake modules// Kernel generation module method
(2) copy the generated Ko files related to the WLAN to the target board, and place them in the/sdio directory.
Home/kernel/linux-2.6.35/Drivers/NET/wireless/libertas/$ CP
Libertas. Ko libertas_sdio.ko/Rootfs/filesystem/sdio/
/Rootfs/filesystem/sdio $ ls
Libertas. Ko libertas_sdio.ko
(3) copy the firmware helper_sd.bin sd8686.bin to the corresponding position./Rootfs/filesystem/lib/firmware/mrvl/(WiFi. C is defined in Android and belongs to the Hal layer. The following two directories are self-created)
(4) Insert sdio WiFi into the target board and load the driver
First insert sdio WiFi and then load the driver
/Sdio #Insmod libertas. Ko
/Sdio #Insmod libertas_sdio.ko helper_name =/lib/firmware/mrvl/helper_sd.bin fw_name =/lib/firmware/mrvl/sd8686.bin(Be sure to add one row)
After the driver is loaded, the following message is displayed :(Note:: If not, you can view the sdio WiFi card again)
If_sdio_intterupt
Libertas: 00: 01: 36: 19: B3: 6B, FW 9.70.3p23, Cap 0x00000303
If_sdio_intterupt
Libertas: wlan0: Marvell WLAN 802.11 Adapter
Sdio_havefister_driver
Sdio_init_module have done
4. Create a wireless testing tool
To test the wireless network adapter, use the wireless tool iwconfig iwlistcommand to compile the source software wireless_tools_29.rar.
Steps:
(1) first decompress the package in the Windows directory and copy the decompressed folder to the virtual machine/home $ ls.
Wireless_tools_29
/Home/wireless_tools_29 $
(2) Modify makefile
8 prefix =/home/wtools // specify the installation path 12 cc = arm-Linux-GNU-GCC (consistent with that used to compile your file system, static compilation, and proper modification to makefile) 14 AR = arm-Linux-GNU-ar |
Then run make install. Under/home/wtools, you can view the following information:
Lib sbin USR
Directory, libiw. So (this is a soft connection) Library libiw. so.29 is in the lib directory, while the sbin directory is some network tools, such as iwlist and iwconfig, which can be viewed by man XXX.
(3) Copy Library libiw. So, libiw. so.29 and Test Tool
/Home/wtools/lib/$Cp */rootfs/filesystem/lib
-
/Home/wtools/sbin/$Cp */rootfs/filesystem/bin(In this way, you do not need to consider environment variables)
V. Test
Ifconfig-Check whether the wireless network card is detected
Test in the test tool directory
/Sdio/wtools #Ifconfig wlan0 up
/Sdio/wtools #Iwlist wlan0 scanning // search hotspot
/Sdio/wtools #Iwconfig wlan0 Essid "fs241" // link hotspot
/Sdio/wtools #Ifconfig wlan0 192.168.1.99 netmask 255.255.255.0 up
(Static allocation, or dynamic allocation. Refer to my fs2410-based DHCP port.)
/Sdio/wtools #Route add default GW 192.168.1.1
/Sdio/wtools #Ping 192.168.1.1(After testing Ping, you can encrypt it)
To be updated ......