Create a cross-compiling environment in Linux

Source: Internet
Author: User
Create a cross-compiling environment in Linux-Linux general technology-Linux programming and kernel information. For more information, see the following. Recently, many of my friends have been discussing how to build a cross-compiling environment for Linux. The following are some of the issues to be discussed in order to encourage others.

The application development environment based on the Linux operating system is generally composed of the target system hardware (Development Board) and the host PC. The target hardware development board is used to run the operating system and system application software, the kernel compilation and application development and debugging of the operating system used by the target Board need to be completed through the host PC (therefore called cross-compilation ). Generally, the two parties establish a connection through a serial port, a parallel port, or an Ethernet interface.

However, I suggest you build the following cross-compilation environment for individual or R & D teams to use: Use a single PC (PII or above, just use the old machines that have been eliminated before ), to install a Linux operating system (such as Red Hat Linux 8.0 or later) on the PC, you can use the default installation option (including the FTP service). This PC is used as a Linux server, in addition to the Administrator, it is generally not allowed to be operated by others directly.

Connect the Linux server to the LAN and create some valid users so that the legitimate users of other PCs (referred to as workstation) can access the Linux server. Other PCs (workstations) still use the Windows operating system.

Required software tools include:

1. FTP client programs (such as Cuteftp, can be downloaded online ).

2. Telnet tool (such as SecureCRT, which can be downloaded from the Internet ).

3. source code of the Linux operating system kernel transplanted to a specific ARM platform (usually provided by the vendor ).

4. GNU compilation tools can be downloaded from related websites or provided by vendors.

Install on workstation:

Install the FTP client program and Telnet tool on a PC of a workstation. After installation, you can transfer files between the PC and the Linux server of the workstation, you can also log on to the Linux server through Telnet on the workstation PC (you may need to disable the Firewall Service of the Linux Server ).

Install On a Linux Server:

Transfer the Linux operating system kernel source code package on the PC and the GNU compilation tool to a directory (such as a valid user directory) on the Linux server through FTP, and decompress the package under the directory, install the GNU compilation tool to the default working directory. The above work is done by using the Telnet tool on the workstation PC, instead of on the Linux server.

Linux Kernel Compilation:

There is usually a fixed step for compiling the Linux operating system kernel, which varies slightly according to the MakeFile file. For details, refer to the relevant documentation. The compilation is completed on the workstation PC using the Telnet tool.

After the kernel is compiled in a fixed step, an executable binary file is generated in the corresponding directory, and the executable binary file is sent back to the workstation PC through FTP, however, it will be written to the Flash of the Development Board through the spark writing tool under ADS or SDT.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.