Compile wireless tools
History:
2013-1-5 chenchengtian created
Wireless tools is a wireless Configuration tool in linux for ease of use. For users, you only need to break through the command. It is best not to modify the configuration file.
Wirless tools provides iwlist iwconfig and other tools. If they are used on the linux platform, make all to complete the tool. If the tool is installed, make install; however, if it is on another platform, it is to use cross-compilation.
I am playing with the mips platform device. The compiler uses mips-linux-gnu-and only supports small terminals. Change wireless tools if you want to compile
Makefile in. Otherwise, it will inevitably appear.
Running
./Iwconfig: line 1: syntax error: unexpected "("
Or the following occurs during compilation:
/Opt/mips-4.3/bin /.. /lib/gcc/mips-linux-gnu/4.3.2 /.. /.. /.. /.. /mips-linux-gnu/bin/ld: BFD (Sourcery G ++ Lite 4.3-51) 2.18.50.20080215 assertion fail/scratch/clm/2008q3-lite/obj/binutils-src-4.3-51-mips-linux-gnu-i686-pc-linux-gnu/bfd/elfxx-mips.c: 2655
It mainly modifies the cross compiler, compilation options, and a dynamic library problem.
1. Modify the Cross Compiler
# Compiler to use (modify this for cross compile ).
CC = mips-linux-gnu-gcc
# Other tools you need to modify for cross compile (static lib only ).
AR = mips-linux-gnu-ar
RANLIB = mips-linux-gnu-ranlib
2. Modify compilation options
Here, XCFLAGS is followed by-EL and so on. Add it based on the actual board. If your board is not a small end, you don't need to add it.
3. Modify the dynamic library
I am not sure that the dynamic library is not supported by other board sub-branches. If you need to change it, you only need to change BUILD_STATIC = y.
After compilation, I ran one on the device and the test passed.
Conclusion: With the experience of downloading source code from the Internet and then generating executable files on the target board through cross-compilation. It is extremely beneficial for future development because Z has the world's largest LAN.