Real6410 Android 2.1 sdio WiFi

Source: Internet
Author: User

1. Download the firmware from here

Http://extranet.marvell.com/drivers/driverDisplay.do? Driverid = 203.

26409. The p45-GPL is for Linux core 2.6

Parse it and you will find two files: helper_sd.bin and sd8686.bin.

Rename helper_sd.bin to sd8686_helper.bin (do not ask why it is different)

2. You have two options to use sd8686 wifi. You can put sd8686_helper.bin and sd8686.bin into the core or file system.

This is the internal core mode or mode. For me, I put it in the inner core because I still have the NAND space as zimage.

# Make xconfig

Device Drivers --->
Generic Driver options --->
() External firmware blobs to build into the kernel binary
() Firmware blobs root directory

Set "external firmware blobs" = "sd8686_helper.bin sd8686.bin"
Set "firmware blobs root directory" = "firmware"
Put these sd8686_helper.bin and sd8686.bin in firmware

This is the. config configuration file. For more configurations, see the hands of real6410 Android 2.0? V1.2.
.....
#
# Device Drivers
#

#
# Generic Driver options
#
C
Config_standalone = y
Config_prevent_firmware_build = y
Config_fw_loader = y
Config_firmware_in_kernel = y
C
C
# Config_debug_driver is not set
# Config_debug_devres is not set
.....

This is the object
.....
Drwxr-XR-x 3 Root 4096 2010-05-17 crypto
Drwxr-XR-x 82 Root 4096 2010-01-20 20:27 documentation
Drwxr-XR-x 84 Root 4096 2010-05-17 18:14 drivers
Drwxr-XR-x 18 Root 4096 2010-05-17 18:06 firmware
Drwxr-XR-x 63 Root 12288 2010-05-17 14: 26 fs
Drwxr-XR-x 28 Root 4096 2010-05-17 18:14 include
Drwxr-XR-x 2 root Root 4096 2010-05-17 18:14 init
Drwxr-XR-x 2 root Root 4096 2010-05-17 14:23 IPC
-RW-r -- 1 Root 2430 2009-12-12 13:18 kbuild
Drwxr-XR-x 6 Root 12288 2010-05-17 Kernel
Drwxr-XR-x 6 Root 12288 2010-05-17 18:07 lib
-RW-r -- 1 Root 106036 2009-12-12 13:18 maintainers
-Rwxr-XR-x 1 Root 57211 2010-02-25 14:48 makefile
....

Now you can create an internal core.

# Make-J2 SDK

3. Android uses a modified wpa_supplicant for WiFi support. You need to use wpa_supplicant. To open boardconfig. ml and add a line of proxy:

Board_wpa_supplicant_driver: = wext

4. You can use DEBUG to view more information for wpa_supplicant.
Change wpa_debug_level = msg_debug in external/wpa_supplicant/common. C.
Change external/wpa_supplicant/common. h to... If (level)> = msg_info) to If (level)> = msg_debug)

5. Create the configuration file/Android-2.1/system/CORE/rootdir/etc/WiFi/wpa_supplicant.conf. It will redirect to/system/etc/WiFi/wpa_supplicant.conf.

Ctrl_interface = eth1
Update_config = 1

6. Add a router interface, permission control and service init. RC (if the permission restriction is problematic, change it by yourself)

Mkdir/system/etc/WiFi 0770 WiFi
Chmod 0770/system/etc/WiFi
Chmod 0660/system/etc/WiFi/wpa_supplicant.conf
Chown WiFi/system/etc/WiFi/wpa_supplicant.conf
Mkdir/data/MISC/WiFi 0770 WiFi
Mkdir/data/MISC/WiFi/sockets 0770 WiFi
Chmod 0770/data/MISC/WiFi
Chmod 0660/data/MISC/WiFi/wpa_supplicant.conf
Chown WiFi/data/MISC/WiFi
Chown WiFi/data/MISC/WiFi/wpa_supplicant.conf
....
On Boot
# Basic network init
IFUP Lo
IFUP eth0
Setprop net. dns1 202.14.67.4
Setprop net. dns2 202.14.67.1
Hostname localhost
Domainname localdomain

# For WiFi
Setprop wifi. Interface "eth1"
Setprop WLAN. Driver. Status "OK"
Setprop WLAN. Interface "eth1"
# Setprop WLAN. modpath/system/lib
# Setprop WLAN. mod1 libertas_sdio.ko

# Set rlimit_nice to allow priorities from 19 to-20
Setrlimit 13 40 40

....
Service wpa_supplicant/system/bin/wpa_supplicant-dd-dwext-ieth1-C/system/etc/WiFi/wpa_supplicant.conf
Socket wpa_wlan0 dgram 660 WiFi
Group system WiFi inet
Disabled
Oneshot
Service dhcpcd/system/bin/dhcpcd-F/system/etc/dhcpcd. conf-D eth1
Group system DHCP
Disabled
Oneshot

7. This is because I need to disable insmod () and rmmod () in the internal kernel mode, because the android UI will be used to enable WiFi and disable Wi-Fi:
/Libhardware_legacy/WiFi/wifi. c
....
Static int insmod (const char * filename, const char * ARGs)
{
/* For Kernel Mode WiFi */
Return 0;
Void * module;
Unsigned int size;
Int ret;
Module = load_file (filename, & size );
If (! Module)
Return-1;

Ret = init_module (module, size, argS );
.....
.....
Static int rmmod (const char * modname)
{
/* For Kernel Mode */
Return 0;

Int ret =-1;
Int maxtry = 10;
.....
....
8. If you want to manually perform failover, these two commands can help you. Use strace to see if wpa_supplicant has or does not have any problems.
# Strace/system/bin/wpa_supplicant-dd-dwext-ieth1-C/system/etc/WiFi/wpa_supplicant.conf
If you have no questions, you can:
#/System/bin/wpa_supplicant-dd-dwext-ieth1-C/system/etc/WiFi/wpa_supplicant.conf &
This interactive command:
/System/bin/wpa_cli-I eth1-P/data/system/wpa_supplicant

9. unsolved questions:
.....

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.