Method for constructing openEuler embedded file system based on SPARC architecture

By building a cross-compilation toolchain for the SPARC architecture and integrating it into the yocto compilation environment, the problem of running the openEuler embedded file system on the SPARC architecture development board was solved, achieving full functional support and implementation of complex functions.

CN121879769APending Publication Date: 2026-04-17CHINA AEROSPACE TIMES ELECTRONICS CORP
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA AEROSPACE TIMES ELECTRONICS CORP
Filing Date
2025-11-19
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing technologies do not provide native support for the SPARC architecture, which means that the openEuler embedded file system cannot run directly on SPARC architecture development boards.

Method used

A cross-compilation toolchain for the SPARC architecture is built using the buildroot source code and integrated into the yocto compilation environment of the openEuler embedded operating system. The software package is then compiled and packaged to generate a file system suitable for the SPARC architecture.

Benefits of technology

The openEuler embedded file system was successfully run on a SPARC architecture development board, supporting a full set of features and complex functions such as service management, resource isolation, and log integration, surpassing the simple parameter support of busybox.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121879769A_ABST
    Figure CN121879769A_ABST
Patent Text Reader

Abstract

A method for constructing an openEuler embedded file system based on an SPARC framework comprises the steps that firstly, according to build root source codes, a proper kernel header version is selected, a cross compiling tool chain of the SPARC framework is compiled, then a binary inclusion set is compiled through the cross compiling tool chain and the build root source codes, and finally the binary inclusion set is packaged to form the file system. According to the method, all source code packets are compiled and compressed into file system packets through a sparc cross compiling tool chain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of aerospace electronic equipment operating system technology, and in particular relates to a method for constructing an embedded file system for harsh environments such as missile-borne, spaceborne, and airborne systems. Background Technology

[0002] Currently, the hardware support architecture of the openEuler embedded operating system primarily targets mainstream architectures such as x86_64, arm64, arm32, and RISCv64. Its official build system, source code repository, and supporting cross-tools do not provide native support for the SPARC architecture, preventing SPARC-based hardware platforms from directly running the openEuler embedded file system. In practical development scenarios, when deploying embedded systems using SPARC architecture development boards, a dedicated file system compatible with the architecture's instruction set and hardware interfaces is required. Only a specifically designed SPARC file system can meet the development board's underlying requirements for system startup, resource scheduling, and peripheral interaction. Therefore, overcoming openEuler's limitations in supporting the SPARC architecture and building an embedded file system suitable for this architecture has become a pressing technical challenge. Summary of the Invention

[0003] The technical problem solved by this invention is to overcome the shortcomings of the prior art and provide a method for building an openEuler embedded file system based on the SPARC architecture. This method involves building a correct SPARC cross-compilation toolchain, compiling an openEuler embedded file system based on the SPARC architecture, and successfully running it on a SPARC architecture development board.

[0004] The technical solution of this invention is:

[0005] A method for building an openEuler embedded file system based on the SPARC architecture includes the following steps:

[0006] Step 1) Build a cross-compilation toolchain for the SPARC architecture using the buildroot source code;

[0007] Step 2) Place the SPARC architecture cross-compilation toolchain in the yocto compilation environment of the openEuler embedded operating system, integrate the yocto compilation environment and complete the package compilation adaptation process to realize the yocto compilation environment's support for the SPARC architecture.

[0008] Step 3) Build the SPARC file system: Compile all the package source code into binary packages, and then package the binary packages to obtain the SPARC architecture file system.

[0009] Preferably, step 1) of building a cross-compilation toolchain for the SPARC architecture using the buildroot source code specifically involves:

[0010] 11) Select the SPARC architecture as the compilation architecture;

[0011] 12) Obtain the source code from the official BuildRoot repository and determine the versions of the core components; among them, the core components of the SPARC file system include: kernel header, binutils, gcc, and C library;

[0012] 13) Execute “make menuconfig” to enter the buildroot configuration interface and set the compilation parameters: “ToolchainBuildroot Options”, “Kernel Header Options”, “Binutils Options”, “GCC Options”, and “Target Architecture”.

[0013] 14) Compile cross-compilation toolchains.

[0014] Preferably, in step 12), the core component version is determined as follows:

[0015] The kernel header uses Linux version 5.10.x;

[0016] binutils version 2.43.1 was selected;

[0017] Use gcc version 13.x;

[0018] The C library used is glibc version 2.41.

[0019] Preferably, step 13) setting the compilation parameters specifically involves:

[0020] In the "Toolchain Buildroot Options" parameter, the custom vendor name is "buildroot" and the C library is "glibc";

[0021] In the "Kernel Header Options" parameter, specify "Kernel Headers" as "Linux 5.10.xkernel headers";

[0022] In the "Binutils Options" parameter, select "binutils 2.43.1" for "Binutils Version";

[0023] In the “GCC Options” parameters, select “GCC compiler Version” as “gcc 13.x”, and disable C++ and Fortran extension support;

[0024] In the “Target Architecture” parameter, select “SPARC” as the target architecture.

[0025] Preferably, the method for integrating the Yocto compilation environment in step 2) is as follows:

[0026] To deploy the cross-compilation toolchain directory, copy the "sparc-buildroot-linux-gnu" compilation tool directory generated by buildroot to the unified path of the yocto cross-compilation toolchain, and place it at the same level as the "openeuler_gcc_x86_64" compilation tool directory;

[0027] Modify the local.conf.sample file in buildroot, change the default machine configuration from "MACHINE" to "sparc", add the SPARC cross-compilation toolchain path in the tool configuration area, and change "OPENEULER_PLATFORM" to "sparc".

[0028] Define the SPARC cross-compilation toolchain:

[0029] Create a file named "sparc.yaml";

[0030] In the "sparc.yaml" file, define the type as "paltform";

[0031] In the "sparc.yaml" file, define machine as "sparc";

[0032] In the "sparc.yaml" file, define the cross-compilation toolchain type toolchain_type as "EXTERNAL_TOOLCHAIN_sparc";

[0033] Configure SPARC architecture parameters:

[0034] Create a file named "sparc.conf";

[0035] In the "sparc.conf" file, define the default tuning configuration parameters for the SPARC architecture: set DEFAULTTUNE to "sparc";

[0036] In the "sparc.conf" file, set the kernel image type KERNEL_IMAGETYPE to "zImage";

[0037] In the "sparc.conf" file, configure the serial port console as "115200,ttyS0";

[0038] Define SPARC architecture characteristics:

[0039] Configure the default instruction set as SPARC v8;

[0040] Configure the core feature parameter TUNE_FEATURES_tune-sparc.

[0041] Preferably, the method for software package compilation and adaptation processing in step 2) is as follows:

[0042] Modify the kmod package: Add the do_install:append() function, and use the sed command to delete the "Libs.private:" line in libkmod.pc; add the EXTRA_OECONF:append function to specify the header file path and library path of zlib;

[0043] Modify the glibc package: Add a compilation patch to the corresponding bb file for glibc;

[0044] Modify the audit package: Create a new patch file and modify the memory barrier macro definition in the driver library core implementation source file "ev.c";

[0045] Modify the binutils package: Modify the configuration parameters in EXTER_OECONF;

[0046] Modify the base-passwd package: synchronize password and group configuration files to the cross-compilation root directory.

[0047] Preferably, step 3) of constructing the SPARC file system specifically involves:

[0048] Execute "bitbake core-image-minimal" in the root directory of the yocto project. The yocto project calls the SPARC cross-compilation toolchain to compile the source code of all packages in the dependency order, generating a SPARC architecture binary package.

[0049] The yocto project automatically executes the "do_rootfs" task, which decompresses all generated SPARC architecture binary packages, configures system files, designates process 1 as systemd, and finally compresses them into a file system package in the format of "rootfs.tar.gz", thus obtaining a SPARC architecture file system.

[0050] Compared with the prior art, the advantages of the present invention are mainly reflected in the following aspects:

[0051] 1) The method of this invention can successfully implement the SPARC architecture OpenEuler embedded file system on the SPARC development board.

[0052] 2) Most of the software packages in the file system of this invention are compiled separately from source code, and the commands support a full set of functions and extended parameters, rather than only supporting simple parameters through busybox.

[0053] 3) The first process of this invention is systemd, which supports complex functions such as service management, scheduled tasks, resource isolation, and log integration compared to busybox. Attached Figure Description

[0054] Figure 1 This is a flowchart illustrating the file system construction process according to an embodiment of the present invention.

[0055] Figure 2 This is a diagram showing the version information of the binutils compilation toolchain in an embodiment of the present invention.

[0056] Figure 3 This is a diagram showing the gcc version information of the compilation toolchain in an embodiment of the present invention.

[0057] Figure 4 This is a diagram of the yocto compilation environment for an embodiment of the present invention.

[0058] Figure 5 This is a configuration diagram of the yocto compilation of the local.conf.sample file in an embodiment of the present invention.

[0059] Figure 6 This is a configuration diagram for compiling sparc.yaml using yocto, as shown in this embodiment of the invention.

[0060] Figure 7 This is a configuration diagram of yocto compiling sparc.conf in an embodiment of the present invention.

[0061] Figure 8 This is a configuration diagram for compiling sparc.inc using yocto, as shown in this embodiment of the invention.

[0062] Figure 9This is a diagram showing the modification of the bb file in the sparc compilation software package -kmod according to an embodiment of the present invention.

[0063] Figure 10 This is a diagram showing the modification of the bb file in the sparc compilation software package - glibc according to an embodiment of the present invention.

[0064] Figure 11 This is a diagram showing the modification of the bb file in the sparc compilation software package - audio in an embodiment of the present invention.

[0065] Figure 12 This is a diagram showing the modification of the bb file in the sparc compilation software package - binutils according to an embodiment of the present invention.

[0066] Figure 13 This is a diagram showing the modification of the bb file in the sparc compilation software package - passwd according to an embodiment of the present invention.

[0067] Figure 14 This is a file system structure diagram according to an embodiment of the present invention. Detailed Implementation

[0068] Figure 1 The diagram shows a flowchart of a method for building an openEuler embedded file system based on the SPARC architecture.

[0069] First, based on the buildroot source code, select the appropriate kernel header version and compile a cross-compilation toolchain for the SPARC architecture. Then, use the cross-compilation toolchain and the buildroot source code to compile a collection of binary packages. Finally, package the collection of binary packages into a file system. The specific build process is as follows:

[0070] Step 1: Build a cross-compilation toolchain for the SPARC architecture using the buildroot source code.

[0071] 11) Determine the architecture

[0072] Select the SPARC architecture as the compilation architecture;

[0073] 12) Source code and version selection

[0074] Obtain the source code from the official BuildRoot repository to determine the versions of the core components. The core components of the SPARC file system include: kernel header, binutils, gcc, and C library.

[0075] The specific versions selected are as follows:

[0076] The kernel header uses Linux version 5.10.x (matching the openEuler embedded kernel version);

[0077] binutils version 2.43.1 was selected;

[0078] Use gcc version 13.x;

[0079] The C library uses glibc version 2.41 to ensure system call compatibility.

[0080] 13) Set compilation parameters

[0081] like Figure 2 As shown, execute "make menuconfig" to enter the buildroot configuration interface and set the following compilation parameters:

[0082] In the "Toolchain Buildroot Options" parameter, the custom vendor name is "buildroot" and the C library is "glibc";

[0083] In the "Kernel Header Options" parameter, specify "Kernel Headers" as "Linux 5.10.xkernel headers";

[0084] In the "Binutils Options" parameter, select "binutils 2.43.1" for "Binutils Version";

[0085] In the “GCC Options” parameters, select “GCC compiler Version” as “gcc 13.x” to temporarily disable support for extended versions such as C++ and Fortran;

[0086] In the “Target Architecture” parameter, as follows Figure 3 The target architecture is selected as "SPARC".

[0087] 14) Compile cross-compilation toolchain

[0088] After saving the configuration, execute "make -j${nproc}", which will automatically download the source code, compile dependencies, and generate the cross-compilation toolchain using buildroot. Once compilation is complete, the cross-compilation toolchain will be output to the "output / host / bin / " directory. This toolchain will be used to build the SPARC architecture file system.

[0089] Step 2: Compile the binary software package

[0090] The SPARC architecture cross-compilation toolchain is placed in the yocto compilation environment of the openEuler embedded operating system, along with other compilation tools. Support for the SPARC architecture in the yocto compilation environment is achieved by modifying the configuration file. This mainly includes two parts: integrating the yocto compilation environment and handling package compilation adaptation.

[0091] The method for integrating the Yocto compilation environment in step 2) is as follows:

[0092] To deploy the cross-compilation toolchain directory, copy the "sparc-buildroot-linux-gnu" compilation tool directory generated by buildroot to the unified path of the yocto cross-compilation toolchain, and place it at the same level as the "openeuler_gcc_x86_64" compilation tool directory;

[0093] Modify the local.conf.sample file in buildroot, change the default machine configuration from "MACHINE" to "sparc", add the SPARC cross-compilation toolchain path in the tool configuration area, and change "OPENEULER_PLATFORM" to "sparc".

[0094] Define the SPARC cross-compilation toolchain:

[0095] Create a file named "sparc.yaml";

[0096] In the "sparc.yaml" file, define the type as "paltform";

[0097] In the "sparc.yaml" file, define machine as "sparc";

[0098] In the "sparc.yaml" file, define the cross-compilation toolchain type toolchain_type as "EXTERNAL_TOOLCHAIN_sparc";

[0099] Configure SPARC architecture parameters:

[0100] Create a file named "sparc.conf";

[0101] In the "sparc.conf" file, define the default tuning configuration parameters for the SPARC architecture: set DEFAULTTUNE to "sparc";

[0102] In the "sparc.conf" file, set the kernel image type KERNEL_IMAGETYPE to "zImage";

[0103] In the "sparc.conf" file, configure the serial port console as "115200,ttyS0";

[0104] Define SPARC architecture characteristics:

[0105] Configure the default instruction set as SPARC v8;

[0106] Configure the core feature parameter TUNE_FEATURES_tune-sparc.

[0107] In one embodiment of the present invention, the method for integrating the Yocto compilation environment is as follows:

[0108] For cross-compilation toolchain directory deployment, copy the "sparc-buildroot-linux-gnu" compilation tool directory generated by buildroot to the unified path of the yocto cross-compilation toolchain, placing it at the same level as existing compilation tool directories such as "openeuler_gcc_x86_64", forming a directory structure like this: Figure 4 The directory structure shown;

[0109] like Figure 5 As shown, modify the local.conf.sample file in buildroot, change the default machine configuration from "MACHINE" to "sparc", add the SPARC cross-compilation toolchain path in the tool configuration area, and then change "OPENEULER_PLATFORM" to "sparc".

[0110] like Figure 6 As shown, create a file named sparc.yaml. Create a new file named "sparc.yaml" in the ".oebuild / platform" directory and add the following content to define the cross-compilation toolchain type for the SPARC architecture:

[0111] type:paltform;

[0112] machine:sparc;

[0113] toolchain_type:EXTERNAL_TOOLCHAIN_sparc

[0114] like Figure 7 As shown, create a new file named sparc.conf in the directory “meta-openeuler / conf / machine / ”, configure architecture parameters such as DEFAULTTUNE, set the kernel image type to “zImage”, and the serial console to “115200,ttyS0”.

[0115] like Figure 8 As shown, create a new file named "tune-sparc.inc" in the directory "meta-openeuler / conf / machine / include / " to define the SPARC architecture features: the default instruction set is SPARC v8, and it supports big-endian mode, hardware / software floating-point units, VIS instruction set, etc. The core feature parameters are integrated through "TUNE_FEATURES_tune-sparc".

[0116] The specific methods for handling package compilation and adaptation are as follows:

[0117] Because the source code of the software packages is large, not every package's source code can be fully adapted to the cross-compilation toolchain to compile the corresponding SPARC architecture binary package. Therefore, it is necessary to modify the bb file of the corresponding package in the yocto project to resolve some compilation failure issues. The specific steps for modifying the bb file and patching the corresponding package in the yocto project are as follows:

[0118] like Figure 9 As shown, the kmod package was modified. A new `do_install:append()` function was added, which uses the `sed` command to remove the line "Libs.private:" from `libkmod.pc`; an `EXTRA_OECONF:append` function was added, specifying the header file path and library path for zlib, thus resolving zlib dependency linking issues.

[0119] like Figure 10 As shown, modify the glibc package. Add a compilation patch to the corresponding bb file for glibc, adjust the memory allocation and thread scheduling code for the SPARC architecture, and fix the segmentation fault issue during glibc initialization;

[0120] Modify the audit package. Create a new patch file and modify the memory barrier macro definition in the driver library core implementation source file "ev.c". Example of an embodiment of this invention. Figure 11 As shown, the memory barrier macro definition in "src / libev / ev.c" was modified to simplify "ECB_MEMORY_FENCE_ACQUIRE" to a memory barrier for the SPARC v8 architecture, thus resolving the instruction set incompatibility issue.

[0121] like Figure 12 As shown, modify the binutils package. Modify the configuration parameters in EXTER_OECONF to ensure that binutils can correctly identify the target system root directory during compilation, avoiding incorrect path references;

[0122] like Figure 13As shown, modify the base-passwd package. Synchronize the password and group configuration files to the cross-compilation root directory to resolve security failures caused by missing files.

[0123] Step 3: Build the SPARC file system

[0124] After completing the above steps, execute the file system building and packaging process.

[0125] The process of building a file system involves first compiling all the software package source code into binary packages, then packaging these binary packages to finally obtain a file system based on the SPARC architecture.

[0126] Execute "bitbake core-image-minimal" in the root directory of the yocto project. The yocto project calls the SPARC cross-compilation toolchain to compile the source code of all packages in the dependency order, generating a SPARC architecture binary package.

[0127] In one embodiment of the present invention, the generated SPARC architecture binary package (.rpm format) is stored in the "tmp / deploy / rpms / sparc / " directory;

[0128] The yocto project automatically executes the "do_rootfs" task, which decompresses all generated SPARC architecture binary packages to a temporary root file system directory, configures system files (such as / etc / fstab), designates process 1 as systemd, and finally compresses them into a file system package in "rootfs.tar.gz" format, thus obtaining a SPARC architecture file system. In one embodiment of this invention, the compressed file system package in "rootfs.tar.gz" format is output to the "tmp / deploy / images / sparc / " directory.

[0129] The completed structure diagram of the openEuler embedded file system based on the SPARC architecture is as follows: Figure 14As shown, the SPARC file system maintains the hierarchical design of standard Linux, but it has been trimmed and optimized to suit resource-constrained embedded scenarios. At the lowest level, U-boot loads the kernel image and root file system. In the root directory, directories such as / bin, / sbin, / lib, / etc, and / usr provide the minimum dependencies for system operation. / bin and / sbin store core tools and management commands, / lib stores basic shared libraries and kernel modules, / etc / stores system configuration files, / usr expands user-space applications and development tools, and / var is mainly used for variable data (such as logs and runtime state). Process number one uses systemd. Overall, this SPARC file system structure maintains compatibility with standard Linux while achieving a lightweight, efficient, and customizable runtime environment.

[0130] Based on the buildroot source code, select the appropriate kernel header version and compile a cross-compilation toolchain for the SPARC architecture. This toolchain will be used to build the SPARC architecture file system. The binutils and gcc version information is as follows: Figure 1 and Figure 2 As shown.

[0131] like Figure 3 As shown, the SPARC architecture cross-compilation toolchain is placed in the openeuler embedded yocto compilation environment, together with other cross-compilation toolchains.

[0132] like Figure 4 , Figure 5 , Figure 6 and Figure 7 As shown, a modification is added to enable yocto to support compiling SPARC architecture. At this point, the yocto project already supports the ability to compile package source code into SPARC architecture binary packages using the SPARC architecture cross-compilation toolchain.

[0133] The file system construction process involves first compiling all the software package source code into binary packages, and then packaging these binary packages to obtain the SPARC architecture file system. Because there are many software package source codes, not every package's source code can be fully adapted to the cross-compilation toolchain to compile the corresponding SPARC architecture binary package. Therefore, it is necessary to modify the bb file of the corresponding package under the yocto project to resolve some compilation failure issues before the SPARC architecture file system can be finally compiled.

[0134] Here are the important modifications to the bb file for the sparc compilation package:

[0135] like Figure 8As shown, modifications were made to the bb file for kmod;

[0136] like Figure 9 The image shows the modifications made to the glibc bb file.

[0137] like Figure 10 As shown, modifications were made to the bb file for audio.

[0138] like Figure 11 As shown, modifications were made to the bb file in binutils;

[0139] like Figure 12 As shown, this modifies the bb file for passwd.

[0140] This invention uses the sparc cross-compilation toolchain to compile and compress all source code packages into a file system package, such as... Figure 13 As shown.

[0141] While the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the invention. Any person skilled in the art can make possible variations and modifications to the technical solutions of the present invention using the disclosed methods and techniques without departing from the spirit and scope of the invention. Therefore, any simple modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of the present invention, without departing from the content of the technical solutions of the present invention, shall fall within the protection scope of the present invention. Where there is no conflict, the embodiments of this application and the technical features thereof can be combined with each other.

[0142] The contents not described in detail in this specification are common knowledge to those skilled in the art.

Claims

1. A method for constructing an openEuler embedded file system based on a SPARC architecture, characterized in that, The steps include the following: Step 1) Build a cross-compilation toolchain for the SPARC architecture using the buildroot source code; Step 2) Place the SPARC architecture cross-compilation toolchain in the yocto compilation environment of the openEuler embedded operating system, integrate the yocto compilation environment and complete the package compilation adaptation process to realize the yocto compilation environment's support for the SPARC architecture. Step 3) Build the SPARC file system: Compile all the package source code into binary packages, and then package the binary packages to obtain the SPARC architecture file system.

2. The method for constructing an openEuler embedded file system based on a SPARC architecture according to claim 1, wherein, Step 1) The method for building a cross-compilation toolchain for the SPARC architecture using the buildroot source code is as follows: 11) Select the SPARC architecture as the compilation architecture; 12) Obtain the source code from the official BuildRoot repository and determine the versions of the core components; among them, the core components of the SPARC file system include: kernel header, binutils, gcc, and C library; 13) Execute "make menuconfig" to enter the buildroot configuration interface and set the compilation parameters: "ToolchainBuildroot Options", "Kernel Header Options", "Binutils Options", "GCC Options" and "Target Architecture"; 14) Compile cross-compilation toolchains.

3. The method of claim 2, wherein the openEuler embedded file system is constructed based on a SPARC architecture. In step 12), the core component version is determined as follows: The kernel header uses Linux version 5.10.x; binutils version 2.43.1 was selected; Use gcc version 13.x; The C library used is glibc version 2.

41.

4. The method of claim 3, wherein the openEuler embedded file system is constructed based on a SPARC architecture. Step 13) Set the compilation parameters as follows: In the "Toolchain Buildroot Options" parameter, the custom vendor name is "buildroot" and the C library is "glibc"; In the "Kernel Header Options" parameter, specify "Kernel Headers" as "Linux 5.10.xkernelheaders"; In the "Binutils Options" parameter, select "binutils 2.43.1" for "Binutils Version"; In the "GCC Options" parameters, select "GCC compiler Version" as "gcc 13.x" and disable C++ and Fortran extension support; In the "Target Architecture" parameter, select "SPARC" as the target architecture.

5. The method for constructing an openEuler embedded file system based on a SPARC architecture according to any one of claims 2-4, characterized in that, The method for integrating the Yocto compilation environment in step 2) is as follows: For cross-compilation toolchain directory deployment, copy the "sparc-buildroot-linux-gnu" compilation tool directory generated by buildroot to the unified path of the yocto cross-compilation toolchain, and place it at the same level as the "openeuler_gcc_x86_64" compilation tool directory; Modify the local.conf.sample file in buildroot, change the default machine configuration from "MACHINE" to "sparc", add the SPARC cross-compilation toolchain path in the tool configuration area, and change "OPENEULER_PLATFORM" to "sparc". Define the SPARC cross-compilation toolchain: Create a file named "sparc.yaml"; In the "sparc.yaml" file, define type as "paltform"; In the "sparc.yaml" file, define machine as "sparc"; In the "sparc.yaml" file, define the cross-compilation toolchain type toolchain_type as "EXTERNAL_TOOLCHAIN_sparc"; Configure SPARC architecture parameters: Create a file named "sparc.conf"; In the "sparc.conf" file, define the default tuning configuration parameters for the SPARC architecture: set DEFAULTTUNE to "sparc"; In the "sparc.conf" file, set the kernel image type KERNEL_IMAGETYPE to "zImage"; In the "sparc.conf" file, configure the serial port console as "115200,ttyS0"; Define SPARC architecture characteristics: Configure the default instruction set as SPARC v8; Configure the core feature parameter TUNE_FEATURES_tune-sparc.

6. The method of claim 5, wherein the openEuler embedded file system is constructed based on a SPARC architecture. The method for package compilation and adaptation in step 2) is as follows: Modify the kmod package: Add the do_install:append() function, and use the sed command to delete the "Libs.private:" line in libkmod.pc; add the EXTRA_OECONF:append function to specify the header file path and library path of zlib; Modify the glibc package: Add a compilation patch to the corresponding bb file for glibc; Modify the audit package: Create a new patch file and modify the memory barrier macro definition in the driver library core implementation source file "ev.c"; Modify the binutils package: Modify the configuration parameters in EXTER_OECONF; Modify the base-passwd package: synchronize password and group configuration files to the cross-compilation root directory.

7. The method for constructing an openEuler embedded file system based on SPARC architecture according to claim 6, characterized in that, Step 3) The method for constructing the SPARC file system is as follows: Execute "bitbake core-image-minimal" in the root directory of the yocto project. The yocto project calls the SPARC cross-compilation toolchain to compile the source code of all packages in the order of dependencies, generating a SPARC architecture binary package. The yocto project automatically executes the "do_rootfs" task, which decompresses all generated SPARC architecture binary packages, configures system files, designates process 1 as systemd, and finally compresses them into a file system package in the format of "rootfs.tar.gz", thus obtaining a SPARC architecture file system.