Home > other >  SAIL - set up and kernel compilation IMX7D Linux development environment
SAIL - set up and kernel compilation IMX7D Linux development environment

Time:10-05

On the virtual machine are introduced in this SAIL - set up and kernel compilation IMX7D Linux development environment, set up the development environment should pay attention to the compiler version, after installing the compiler to set up the environment variables, so that after compiling the kernel,
Host platform: ubuntu14.04.5
The target platform: SAIL - IMX7D core board
Virtual machine: VMware - workstantion - full - 12.5.5
Compiler tool chain: GCC - linaro - arm - Linux - gnueabihf -

1 the Linux development environment set up
1.1 install the compiler
IMX7D Linux system commonly used is the GCC compiler version - linaro - arm - Linux - gnueabihf - 4.9,
Compiler installation package in/CD/Linux/cross compiler,
GCC - linaro - arm - Linux - gnueabihf - 4.9-2014.09 _linux. Tar. Xz package is a cross compiler installation package, copy the installation package to Ubuntu/dianyu directory,
If there is no/dianyu Ubuntu directory, can use # mkdir/dianyu to create a new directory, modify/dianyu permissions, command: # chmod 777/dianyu
In Ubuntu new directory/usr/local/arm, command # mkdir -p/usr/local/arm,
The GCC - linaro - arm - Linux - gnueabihf - 4.9-2014.09 _linux. Tar. Xz to/usr/local/arm, command
# tar XVF/dianyu/GCC - linaro - arm - Linux - gnueabihf - 4.9-2014.09 _linux. Tar. Xz - C/usr/local/arm
As shown in figure:

After completion of the above command execution, can complete the compiler installed, set the environment variable at the same time, execute the command:
# export PATH=/usr/local/arm/GCC - linaro - arm - Linux - gnueabihf - 4.9-2014.09 _linux/bin/: $PATH

1.2 set, upgrade the development environment dependent libraries
The general tools/scripts/CD/setup package - the sh/dianyu directory in the file copy to Ubuntu, as shown:

Modify/setup package - the sh permissions, command # chmod 777 setup package - the sh
Command: #./setup - package - the sh, as shown in figure:

Error, bash:/setup package - the sh:/bin/sh ^ M: bad interpreter: No to the file or directory performs vi setup package - the sh, enter

Behind each ^ M deleted (if no error can be directly on to the next step), delete after exit,














./setup - package - the select Y sh, carriage return, as shown in figure:


Directly enter here, the default is Yes, as shown in figure:












Is configuration from the source server to download the installation package, as shown:

After the installation is complete, as shown:

If the installation fails, type the command: # apt - get the update
And then to enter the command: #./setup - package - the sh for installation,





2 IMX7D kernel compilation
The/Linux/CD/source/sail - imx7d - Linux - 4.1.15. Tar. Gz copy into the Ubuntu/dianyu directory,
Execute the command in terminal: # CD/dianyu
Then unpack command: # tar ZXVF sail - imx7d - Linux - 4.1.15. Tar. Gz, will sail - imx7d - Linux - 4.1.15. Tar. Gz to/dianyu directory and unzip the work was done, in/dianyu directory automatically generated sail - imx7d - Linux - 4.1.15 directory, sail - imx7d - Linux - 4.1.15 directory is the Linux kernel source code,


Using the command # CD sail - imx7d - Linux - 4.1.15
Enter the sail - imx7d - Linux - 4.1.15 directory




Clean up the intermediate file compiling, command: # make the clean
Compile the kernel, command: # make zImage ZIMAGE_LOADADDR=0 x10008000
As shown in figure:

Is compiled, as shown in the figure below:













Compile error (if not an error, can skip this step, if other mistakes, please make your own baidu), as shown in the figure below:

Error prompt for lack of lzop command apt to get the install lzop, lzop installation, as shown in the figure below:













After the installation is complete, recompile the kernel, success, as shown in the figure below:

Compile the DTS, command: # make sail - imx7d. DTB, as shown in the figure below:















Successful compilation as shown:

ZImage, sail - imx7d. DTB is under Linux kernel source code,

3 summary
Building Linux development environment is the main problem/setup - package - the sh file, the first is permission, change its permissions to 777, the second is in the copy to the virtual machine will behind each row more ^ M, only use vi open to see, after good environment variable configuration, compile the kernel source generally there is no problem, if there is a problem, according to the actual situation to find a solution,
  • Related