For software that is not currently in openwrt repository, if it is released in the form of source code, you can use openwrt buildroot for cross-compilation.
- First, compile buildroot. (generally, the firmware has been compiled once)
- Locate the directory staging_dir/toolchain-architecture_gcc-complierver_uClibc-libcver/bin/
- Add it to the environment variable path:
Path = $ PATH (the directory mentioned above)
Export path
- Set the environment variable staging_dir to the toolchain directory mentioned above:
Staging_dir = toolchain directory
Export staging_dir
- Set some parameters in the compilation settings. Here I will use to modify the makefile:
Make cc = architecture-openwrt-Linux-uclibc-gcc ld = architecture-openwrt-Linux-uclibc-LD
- If some header files or library files are missing, you need to modify the cflags and ldflags to point them to the staging_dir/target-architecture_uClibc-libcver/usr/include and.../usr/lib directories.
Compile a separate installation package
- First, make menuconfig and select the software package to be compiled and the library on which it depends.
- Then make tools/install
Make toolchain/install
- Finally, you can compile the required software:
Make package/***/compile
Make package/***/install
Make package/***/Index
Then you can find the software installation package in the bin directory.
(The last make index does not know what it is. If it is not running, you can find. IPK in Bin)
This is the main router and the problem, so re-compiled the firmware (tp720), found that the authentication does not go to the network, so try to cross-compile xd-h3c, or not, then, a tcpdump is compiled and loaded to the route to capture packets. The phenomenon is very strange. It seems that the router's processor is aging, and it takes a long time to reply after receiving the packet. Maybe the driver has a problem? I don't know .. The authentication was successful after a long wait.
At that time, I was so upset that I almost had to buy a Raspberry Pi or cubieboard in a rage that I didn't want to endure.
When the poor students are miserable, they should be able to work hard in the future.
I read the 8021. X protocol. This Protocol is mainly used for authentication. Over Ethernet, it divides a physical port into two logical ports, one of which is used for authentication and all authentication packets can pass, the other port is used to send normal data packets, but the port is open only when authentication is successful.
Openwrt cross-Compilation