Adds the paths of the additional tools to PATH.The process of the compilation script is as follows: Run the one-click compilation script src/yocto-meta-openeuler/scripts/compile.sh. Obtain the manifest.xml file for specifying the version of the openEuler Embedded code from the openEuler Embedded release directory embedded_img/source-list/. To download the code of a specified version: sh src/yocto-meta-openeuler/scripts/download_code.sh "" "" "manifest.xml" To download the latest code: sh src/yocto-meta-openeuler/scripts/download_code.sh The code is downloaded based on the XML configurations.ĭownload the source code using the script. XML file for downloading the code, which is in the standard manifest format.Determine the branch based on the version. For example, in the preceding example, the code repository is downloaded to the src/ directory. By default, the source code is downloaded relative to the script location. The script src/yocto-meta-openeuler/scripts/download_code.sh has the following parameters: git clone -b openEuler-22.03-LTS -v src/yocto-meta-openeuler The generated images are stored in this directory.ĭownload the script to a specified directory, for example, src/yocto-meta-openeuler. ├── build openEuler Embedded build directory. ├── src Source code directory, including all software package code, kernel code, and Yocto build code Assume that openeuler_embedded is the top-level directory. The file layout of the openEuler Embedded build project is as follows. Basic Build Container Image for openEuler Embeddedįor details, see the Container Build Guide. You can obtain the container images for the build from the following link: To solve this problem, openEuler Embedded provides a dedicated build container to provide a unified build environment. For example, CMake 1.9 or later is required for the build, but the version on the host is CMake 1.8. However, the tool versions vary depending on the host environment. To accelerate the build process, openEuler Embedded uses the tools installed on the host in advance. Toolchain for the ARM 64-bit architecture: openeuler_gcc_Ī large number of host tools are used during the build of openEuler Embedded.Toolchain for the ARM 32-bit architecture: openeuler_gcc_.After the decompression, a /tmp directory containing the toolchain is generated in the current directory.Decompress the RPM package: rpm2cpio 86_64.rpm | cpio -id.You can download the toolchains by performing the following methods: To simplify the process, openEuler Embedded uses pre-built cross-compilation toolchains and libraries maintained by the openEuler community.Ĭurrently, the toolchains for the ARM32 and AArch64 architectures are provided. At the same time, most developers do not build toolchains and C libraries themselves. However, the process is complex and time-consuming and is performed only in the first build. Yocto can build the cross-compilation toolchains and C libraries required for cross-compilation. Pre-built cross-compilation toolchain and library. Yum -y install tar cmake gperf sqlite-devel chrpath gcc-c patch rpm-build flex autoconf automake m4 bison bc libtool gettext-devel createrepo\_c rpcgen texinfo hostname python meson dosfstools mtools parted ninja-build autoconf-archive libmpc-devel gmp-devel Tools Required for Building openEuler Embedded The host tools required by openEuler Embedded are defined in HOSTTOOLS in the file by default. Otherwise, even if the command exists on the host, an error message will be displayed during Yocto building, indicating that the corresponding tool cannot be found. Therefore, if a command that depends on the host is added, the command must be added to HOSTTOOLS. To prevent host contamination, Yocto prepares an environment that is independent from the host, for example, the PATH variable. Yocto uses the HOSTTOOLS variable to introduce host tools and creates a soft link for each tool listed in HOSTTOOLS. This requires that the software package management tools (such as APT, DNF, Yum, and Zypper) be installed in advance. To accelerate the building process, especially for the first build, openEuler Embedded preferentially uses the pre-built native tools on the host. Therefore, the first build of Yocto can be time-consuming. These host tools are built from the source code in the first build. During this process, Yocto installs dedicated Yocto patches for corresponding tools (such as DNF and RPM) as required. Yocto can build other tools required in the build process based on the corresponding software package recipes so that Yocto is self-contained. The minimum environment requirements are as follows: Yocto, or BitBake, is a group of Python programs.
0 Comments
Leave a Reply. |