The invention discloses a container
mirror image construction and use method oriented to embedded cross compiling, relates to the field of compiling methods of operating systems, and solves the compiling problem of a
software source program under an embedded Linux
operating system. The invention relates to an embedded cross compiling method based on a container mechanism, which comprises the following steps of: integrating tool chain
software and an
operating system header file, a
library file and the like required by compiling to form a new
mirror image file based on a basic container
mirror image, starting a container through the mirror image when a program is compiled, and after a
source code catalog is mounted and a catalog is constructed, starting the container through the mirror image; and calling the tool chain through the script to complete cross compiling. According to the method, the construction of a cross compiling environment can be separated from the
shackle of a
host machine operating system, the method has the characteristics of high environmental adaptability, flexible and convenient deployment, good platform safety and the like, compilation of
engineering source codes such as application programs,
library files and drivers is supported, and powerful support can be provided for cross compiling of embedded programs.