Xunwei-i.IMX6Q development board QT system transplantation wifi-mt6620 (Part 1)
[Copy link]
This document introduces the transplantation method of SDIO WIFI in iMX6 development board QtE. The supporting materials are in the directory of "iTOP-i.MX6 development board data summary (excluding CD data)\08_iTOP-i.MX6 development board Linux system development data\16-Qt system transplantation WiFi-mt6620" in the network disk. Please note: some libraries and tools in the transplantation process may already exist in the source code or image. You can use the ones you generate to overwrite. The provided files are shown in the figure below, which are three source code compressed packages, compiled libraries in the lib folder, wpa_supplicant tools in the sbin folder, 6620_launcher, the required drivers in the x6MtDirvers folder, and the script make_mt6620.sh.
45.1 6620_launcher
The 6620_launcher tool runs as a service program in the background. This service configures the working parameters of the serial port and downloads the firmware patch to the MT6620. It is located in the "/usr/bin/" directory of the development board. It is built into the system and can be directly overwritten by the user.
45.2 Porting wpa_supplicant
Before compiling, you must first modify the compiler to version 4.3.2. For how to set the compiler, see Chapter 19.1 "Installation of Qt4.7 Compiler" in the manual. In addition, in order to avoid problems that may arise when using environment variables to set the compiler, most of the compilations in the document use the absolute path of the compiler. Users should also find the absolute path of their own compiler for use. The following figure shows the compiler used in this compilation and the compiler compressed package.
From the above figure, we can see that the absolute path of the compiler is "/usr/local/arm/4.3.2/bin/ arm-none-linux-gnueabi-gcc".
Users need to copy the provided source code compressed package to the Ubuntu working directory and decompress them separately, as shown in the figure below.
45.2.1 Porting OpenSSL
First enter the directory openssl-1.1.0g, the content is shown in the figure below.
Execute the following instructions and make corresponding configurations.
./config no-asm shared --prefix=$(pwd)/__install
After execution, the figure below is shown.
no-asm: does not use assembly code to speed up the compilation process during cross compilation, because its assembly code does not support the arm format.
shared: Generate a dynamic link library.
--prefix: specifies the path of the directory generated after make install. If this item is not modified, the default is the OPENSSLDIR directory
(/usr/local/ssl).
Use the command "vim Makefile" to open the Makefile, search for CFLAG, and locate it to the position shown in the figure below.
Delete the "-m64" in the red box in the above figure. After completion, CFLAG should be as shown in the figure below.
Execute the following command to compile the OpenSSL library. Note that the absolute path of the cross compiler is used here.
make CROSS_COMPILE=/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi- After compilation, it is shown in the figure below.
Execute the following command to copy the compiled library files to the directory specified in the first step
make install
As shown in the figure below, header files and library files are generated in the __install directory under the current directory:
When compiling the program, you need to specify the path of the include file under include. The lib file will be used when the program is running. You need to copy all the files and folders under lib to the development board/lib folder.
45.2.2 Porting libnl
libnl is a library developed to facilitate the use of netlink interfaces by applications. This library provides a unified interface for original netlink message passing and different netlink family dedicated interfaces.
Enter the directory "libnl-1.1.4/", as shown in the figure below.
Execute the following instructions to configure the compilation architecture.
./configure --prefix=$(pwd)/__install --enable-shared --enable-static
In which --prefix=$(pwd)/__install specifies the path where the compiled library is stored. Generally, it is placed in the __install directory under the current directory. The execution result is shown in the figure below.
Execute the following command to compile the library make CC=/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-gcc. After completion, it is shown in the figure below.
Use the command "make install" to copy the compiled library file to the specified directory. The header file and library file are generated in the __install directory under the current directory, as shown in the figure below.
The files in the include directory will be used when compiling the program, and the files in lib will be used when the program is running. Therefore, when porting hostapd, you need to specify the include path and copy all files including folders in the lib directory to the /lib folder in the development board.
|