The company's project requires a USB wireless network card, and the chip is Ralink's RT2870. The following are the steps to transplant its driver to s3c2416.
1. Download the driver source code. The download address of Ralink official website is:
http://www.ralinktech.com/en/04_support/support.php?sn=501
2. Unzip 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO.bz2
3. Enter the directory, Modify the Makefile
to comment out PLATFORM = PC, and remove the # of #PLATFORM = SMDK, that is, PLATFORM is defined as SMDK.
Change the two sentences after ifeq ($(PLATFORM),SMDK) to:
LINUX_SRC = /root/Download /linux-2.6.32.2 (This is defined according to the kernel source code path of your own development board)
CROSS_COMPILE = /usr/local/arm/4.4.3/bin/arm-linux- (the path where the cross-compilation tool chain is located)
First check whether wireless has been added to the kernel configuration: enter the development board kernel make menuconfig
DeviceDrivers --->
Networkdevice support --->
WirelessLAN (non-hamradio) --->
[*]Wireless LAN drivers (non-hamradio) & WirelessExtensions
[*] Wireless Extension API overRtNetlink
--- Obsolete Wireless cards support(pre-802.11)
<> STRIP (Metricom starmode radioIP)
<> USB ZD1201 based Wireless devicesupport
<> IEEE 802.11 for H
Otherwise, even if you compile the module, you will not be able to use it.
After configuring, save it, it is best to make it!
Generate a new kernel. The purpose of this is to fully configure some required files to avoid errors when compiling the module. At first, I actually compiled a 12M driver module. Later, I succeeded. In fact, it was only more than 800 KB. The size of the final rt5370sta.ko is for reference only.
Note: If the compiled module is relatively large (about 10M), you can try this method:
Use the command: arm-linux-strip -S ****.ko to solve the problem.
The principle is to remove debugging information. If an error occurs, it may be that your arm-linux-gcc does not specify the path. Just add your cross-compilation path in front. Mine is over 800K in size.
The second value is the path to the cross-compilation tool. Modify it according to your own situation.
4. Execute make
5. Download the module and configuration files
and transfer the final ko file rt5370sta.ko generated by make in the os/linux directory to the /lib/modules/2.6.32.2-FriendlyARM directory of the development board. At the same time, transfer the RT2870STA.dat file in the source code root directory to the /etc/Wireless/RT2870STA/ directory. If not, just create a new directory.
6. Install the module.
insmod rt5370sta.ko
If the following error occurs, it means that your kernel source code is wrong. Follow the instructions in step 3 to process the kernel source code again.
rt5370sta: version magic '2.6.32.59 mod_unload ARMv4 ' should be '2.6.32.2-Frie'
insmod: cannot insert 'rt5370sta.ko': invalid module format
The last step is to insert the network card. Ifconfig cannot see the network card at this time, you have to To enable the network card, use the following command:
ifconfig ra0 up
My situation is as follows:
Click (here) to collapse or open
[root@FriendlyARM /]# ifconfig ra0 up
(Efuse for 3062/3562/3572) Size=0x2d [2d0-2fc]
-->RTUSBVenderReset
<--RTUSBVenderReset
Key1Str is Invalid key length(0) or Type(0)
Key2Str is Invalid key length(0) or Type(0)
Key3Str is Invalid key length(0) or Type(0)
Key4Str is Invalid key length(0) or Type(0)
1. Phy Mode = 5
2. Phy Mode = 5
NVM is Efuse and its size =2d[2d0-2fc]
phy mode> The chip does not support 5G band
RTMPSetPhyMode: channel is out of range, use first channel=1
(Efuse for 3062/3562/3572) Size=0x2d [2d0-2fc]
3. Phy Mode = 9
AntCfgInit: primary/secondary ant 0/1
AsicSetRxAnt, switch to main antenna
MCS Set = ff 00 00 00 01
<==== rt28xx_init, Status=0
0x1300 = 00064300
Ifconfig again, you can see the ra0 network card.
Previous article:Some additions to the article "s3c2416 Naked Running Environment Configuration"
Next article:Analyze and implement S3C2416 sleep and wake-up from sys/power/state
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- Switching Power Supply Interest Group 19th Task
- LED power supply not working
- Smart MM32 + UCOS + uCGUI
- How to decorate a chemical analysis room?
- Find VHDL half-integer division
- Has anyone used AMIS-30543 to drive a stepper motor?
- Is the emitter voltage of the PNP tube pulled down by the base?
- Basic knowledge of wireless WiFi coverage
- mpy firmware for Nucleo-L432 development board
- What is UWB technology? Several major mobile phone manufacturers are planning to develop this business