CN117251165A - Method, device, terminal and medium for compiling building - Google Patents

Method, device, terminal and medium for compiling building Download PDF

Info

Publication number
CN117251165A
CN117251165A CN202311079472.6A CN202311079472A CN117251165A CN 117251165 A CN117251165 A CN 117251165A CN 202311079472 A CN202311079472 A CN 202311079472A CN 117251165 A CN117251165 A CN 117251165A
Authority
CN
China
Prior art keywords
buildroot
compiling
package
dependent
dependency
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311079472.6A
Other languages
Chinese (zh)
Inventor
于宝在
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hexin Technology Co ltd
Shanghai Hexin Digital Technology Co ltd
Original Assignee
Hexin Technology Co ltd
Shanghai Hexin Digital Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hexin Technology Co ltd, Shanghai Hexin Digital Technology Co ltd filed Critical Hexin Technology Co ltd
Priority to CN202311079472.6A priority Critical patent/CN117251165A/en
Publication of CN117251165A publication Critical patent/CN117251165A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a method, a device, a terminal and a medium for compiling building blocks, which are characterized in that all the downloaded latest version of building blocks are saved firstly, then all the building blocks needed by codes participating in compiling are adapted, an address path for obtaining the building blocks in the compiling process is designated as a preset address path, and finally all the building blocks participating in compiling are compiled in a cross way according to the preset address path. The invention does not need to download the dependent package, thus not causing incomplete download of the dependent package due to network problems, greatly saving time, ensuring the integrity of the dependent package and ensuring stable compiling.

Description

Method, device, terminal and medium for compiling building
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a Buildroot compiling method, device, terminal, and medium.
Background
The Buildroot is an open-source embedded Linux system automatic construction framework on a Linux platform. The whole Buildroot is composed of Makefile script and Kconfig configuration file. The method can compile a complete Linux system software which can be directly written on a machine to run through the configuration of buildroot and the modification of the menonfig as well as the compiling of the Linux kernel.
The Buildroot downloads a large number of dependent packets in the process of building, and if the network is unstable, the downloaded dependent packets are interrupted or cannot be accessed. Depending on the package, the download of the dependent package is incomplete, and according to the dependent package, the false success of compiling occurs, the actual compiling is failed, and a great deal of time is wasted.
Disclosure of Invention
In view of the above drawbacks of the prior art, an object of the present invention is to provide a Buildroot compiling method, device, terminal and medium for solving the above problems of the prior art.
To achieve the above and other related objects, the present invention provides a Buildroot compiling method, including: storing all the downloaded Buildroot dependent packages of the latest version, and correspondingly defining a preset address path; adapting each Buildroot dependency package required by the codes participating in compiling so as to specify an address path for acquiring the Buildroot dependency package in the compiling process as the preset address path; and according to the preset address path, cross compiling is carried out on each Buildroot dependency package participating in compiling.
In one embodiment of the present invention, adapting each Buildroot dependency package participating in compilation includes: determining whether versions of all Buildroot dependency packages required by codes participating in compiling are correct or not; under the condition of correct version, removing the downloading information for correspondingly downloading the Buildroot dependent package in the compiling process; and setting an address path corresponding to the acquisition of the Buildroot dependent packet in the compiling process as the preset address path.
In one embodiment of the present invention, determining whether the version of each Buildroot-dependent package required for the code involved in compilation is correct includes: determining each Buildroot dependency package required by codes participating in compiling from all stored Buildroot dependency packages; judging whether the version of each determined Buildroot dependency package accords with the version of the Buildroot dependency package required by code compiling; if yes, the version is correct; if not, the version is incorrect, and the latest version of the Buildroot dependency package needs to be downloaded again.
In an embodiment of the present invention, removing the download information for correspondingly downloading the Buildroot dependency package during the compiling process includes: and removing the downloading information of each Buildroot dependent package required by the corresponding downloading in the code, and respectively removing the downloading information of the corresponding downloading associated Buildroot dependent package in each required Buildroot dependent package.
In an embodiment of the present invention, setting an address path corresponding to the acquisition of the Buildroot-dependent packet in the compiling process as the preset address path includes: setting address paths for acquiring all required Buildroot dependent packets in codes and address paths for acquiring associated Buildroot dependent packets in all Buildroot dependent packets as the preset address paths.
In an embodiment of the present invention, the method for setting the address path for obtaining the associated Buildroot dependency packet in each Buildroot dependency packet as the preset address path includes: and setting address paths of the Buildroot dependency packages required by the patch files, the compiling files and the installing files in the Buildroot dependency packages as the preset address paths respectively.
To achieve the above and other related objects, the present invention provides a Buildroot compiling apparatus, including: the relying package storage module is used for storing all the downloaded latest version of the Buildroot relying package and correspondingly defining a preset address path; the dependency package adaptation module is connected with the dependency package storage module and is used for adapting each Buildroot dependency package required by codes participating in compiling so as to designate an address path for acquiring the Buildroot dependency package in the compiling process as the preset address path; and the compiling module is connected with the dependence package adapting module and used for cross compiling each Buildroot dependence package participating in compiling according to the preset address path.
In one embodiment of the present invention, the dependent packet adaptation module includes: the version determining unit is used for determining whether the version of each Buildroot dependency package required by the codes participating in compiling is correct or not; the download information removing unit is connected with the version determining unit and is used for removing download information for correspondingly downloading the build dependent package in the compiling process under the condition that the version is correct; and the address path setting unit is connected with the download information removing unit and is used for setting the address path corresponding to the acquisition of the Buildroot dependent packet in the compiling process as the preset address path.
To achieve the above and other related objects, the present invention provides a Buildroot compiling terminal, including: one or more memories and one or more processors; the one or more memories are used for storing computer programs; the one or more processors are connected with the memory and are used for running the computer program to execute the Buildroot compiling method.
To achieve the above and other related objects, the present invention provides a computer-readable storage medium storing a computer program which, when executed by one or more processors, performs the Buildroot compiling method.
As described above, the invention relates to a building compiling method, a device, a terminal and a medium, which have the following beneficial effects: according to the method, all the downloaded Buildroot dependency packages of the latest version are saved, each Buildroot dependency package required by codes involved in compiling is adapted, an address path of the Buildroot dependency package obtained in the compiling process is designated as the preset address path, and finally cross compiling is conducted on each Buildroot dependency package involved in compiling according to the preset address path. The invention does not need to download the dependent package, thus not causing incomplete download of the dependent package due to network problems, greatly saving time, ensuring the integrity of the dependent package and ensuring stable compiling.
Drawings
Fig. 1 is a schematic flow chart of a Buildroot compiling method according to an embodiment of the invention.
Fig. 2 is a flow chart of a conventional Buildroot compiling method.
Fig. 3 is a schematic flow chart of a Buildroot compiling method according to an embodiment of the invention.
Fig. 4 is a schematic diagram of a Buildroot compiling system according to an embodiment of the invention.
Fig. 5 is a schematic diagram of a structure of a dependent packet adaptation module according to an embodiment of the invention.
Fig. 6 is a schematic structural diagram of a Buildroot compiling terminal according to an embodiment of the invention.
Detailed Description
Other advantages and effects of the present invention will become apparent to those skilled in the art from the following disclosure, which describes the embodiments of the present invention with reference to specific examples. The invention may be practiced or carried out in other embodiments that depart from the specific details, and the details of the present description may be modified or varied from the spirit and scope of the present invention. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict.
In the following description, reference is made to the accompanying drawings, which illustrate several embodiments of the invention. It is to be understood that other embodiments may be utilized and that mechanical, structural, electrical, and operational changes may be made without departing from the spirit and scope of the present invention. The following detailed description is not to be taken in a limiting sense, and the scope of embodiments of the present invention is defined only by the claims of the issued patent. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. Spatially relative terms, such as "upper," "lower," "left," "right," "lower," "below," "lower," "above," "upper," and the like, may be used herein to facilitate a description of one element or feature as illustrated in the figures relative to another element or feature.
Throughout the specification, when a portion is said to be "connected" to another portion, this includes not only the case of "direct connection" but also the case of "indirect connection" with other elements interposed therebetween. In addition, when a certain component is said to be "included" in a certain section, unless otherwise stated, other components are not excluded, but it is meant that other components may be included.
The first, second, and third terms are used herein to describe various portions, components, regions, layers and/or sections, but are not limited thereto. These terms are only used to distinguish one portion, component, region, layer or section from another portion, component, region, layer or section. Thus, a first portion, component, region, layer or section discussed below could be termed a second portion, component, region, layer or section without departing from the scope of the present invention.
Furthermore, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context indicates otherwise. It will be further understood that the terms "comprises," "comprising," "includes," and/or "including" specify the presence of stated features, operations, elements, components, items, categories, and/or groups, but do not preclude the presence, presence or addition of one or more other features, operations, elements, components, items, categories, and/or groups. The terms "or" and/or "as used herein are to be construed as inclusive, or meaning any one or any combination. Thus, "A, B or C" or "A, B and/or C" means "any of the following: a, A is as follows; b, a step of preparing a composite material; c, performing operation; a and B; a and C; b and C; A. b and C). An exception to this definition will occur only when a combination of elements, functions or operations are in some way inherently mutually exclusive.
The invention provides a Buildroot compiling method, which comprises the steps of firstly storing all downloaded Buildroot dependent packages of the latest version, then adapting each Buildroot dependent package required by codes involved in compiling, designating an address path for acquiring the Buildroot dependent package in the compiling process as a preset address path, and finally carrying out cross compiling on each Buildroot dependent package involved in compiling according to the preset address path. The invention does not need to download the dependent package, thus not causing incomplete download of the dependent package due to network problems, greatly saving time, ensuring the integrity of the dependent package and ensuring stable compiling.
Meanwhile, in order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions in the embodiments of the present invention will be further described in detail by the following examples with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Before explaining the present invention in further detail, terms and terminology involved in the embodiments of the present invention will be explained, and the terms and terminology involved in the embodiments of the present invention are applicable to the following explanation:
<1> build: the entire project is completely recompiled, whether or not it has already been compiled. The Build process often generates a release package, and the Build is rarely applied in practice, because the Build process is basically not used in development, and is generally released by tools such as ANT in release production.
<2> buildroot: is an open-source embedded Linux system automatic construction framework on a Linux platform. The whole Buildroot is composed of Makefile script and Kconfig configuration file. Just as the Linux kernel is compiled, the menuconfig is modified through the buildroot configuration, and a complete Linux system software (comprising boot, kernel, rootfs and various libraries and application programs in rootfs) which can be directly written on a machine to run is compiled.
<3> compilation of a program compiled in a programming language into executable code or a program described in a binary language.
<4> cross-compilation-it is understood that a program compiled on the current compilation platform can run on another target platform of different architecture.
<5> makefile: the makefile describes the compiling sequence and rule of all files in the whole project. Makefile also has its own writing rules, and in general, all the IDEs used by us will generate the corresponding Makefile, then compile according to the Makefile, only these operations are completed by IDEs, and we only need to click a compiling button.
<6> kconfig: is a text-form file in which various configuration interface source files are configured as configuration options when the kernel is configured.
<7> Menucenfig, is a graphical configuration interface that can be displayed on a terminal, and it is not only greatly convenient for us to modify configuration files, but also can automatically process dependency relationships.
The embodiments of the present invention will be described in detail below with reference to the attached drawings so that those skilled in the art to which the present invention pertains can easily implement the present invention. This invention may be embodied in many different forms and is not limited to the embodiments described herein.
Fig. 1 shows a schematic flow chart of a Buildroot compiling method in an embodiment of the invention.
The method comprises the following steps:
step S1: and storing all the downloaded Buildroot dependent packets of the latest version, and correspondingly defining a preset address path.
Specifically, the network is connected, all the Buildroot dependent packets of the latest version are downloaded and stored under the own project, and a preset address path is defined corresponding to the storage position. The Buildroot dependency package is a software package depending on the Buildroot compiling process, such as some library files, and static libraries and dynamic libraries exist.
Step S2: and adapting each Buildroot dependency package required by the codes participating in compiling so as to specify an address path for acquiring the Buildroot dependency package in the compiling process as the preset address path.
In one embodiment, step S2 includes:
determining whether versions of all Buildroot dependency packages required by codes participating in compiling are correct or not;
under the condition of correct version, removing the downloading information for correspondingly downloading the Buildroot dependent package in the compiling process;
and setting an address path corresponding to the acquisition of the Buildroot dependent packet in the compiling process as the preset address path.
By the method, the address path for acquiring the Buildroot dependent packet in the compiling process can be designated as the preset address path.
In a particular embodiment, determining whether the version of each Buildroot-dependent package required for the code participating in the compilation is correct includes:
determining each Buildroot dependency package required by codes participating in compiling from all stored Buildroot dependency packages; specifically, pulling all the required Buildroot dependency packages from all the stored Buildroot dependency packages;
judging whether the version of each determined Buildroot dependency package accords with the version of the Buildroot dependency package required by code compiling; specifically, judging whether the pulled version of the Buildroot dependency package reaches the version of the Buildroot dependency package required by code compiling; the judging mode can be judged by depending on the version number of the packet or depending on the identification of the packet.
If yes, the version is correct, and the subsequent steps can be carried out;
if the version is not consistent, the version is incorrect, the latest version of the Buildroot dependent package is required to be downloaded again, the latest version of the Buildroot dependent package is stored, and the determination and the version judgment of the Buildroot dependent package are carried out again.
In a specific embodiment, removing the download information for correspondingly downloading the Buildroot dependency package in the compiling process includes:
and removing the downloading information of each Buildroot dependent package required by the corresponding downloading in the code, and respectively removing the downloading information of the corresponding downloading associated Buildroot dependent package in each required Buildroot dependent package.
Specifically, the removed download information is mainly divided into two parts: one is to remove the downloading information of each Buildroot dependent package needed to be downloaded in the compiling process in the code; because each Buildroot dependent package may also depend on other Buildroot dependent packages, the download addresses of other associated Buildroot dependent packages need to be removed when the corresponding Buildroot dependent packages are compiled in each Buildroot dependent package, namely, the other part is removed; for example, the dependency package a also depends on the dependency packages B and C, and the download information of the dependency package B and the dependency package C needs to be removed from the dependency packages.
Based on the above mode, the steps of downloading each Buildroot dependency package when compiling the code and downloading other Buildroot dependency packages when compiling the Buildroot dependency package are skipped and cannot be executed.
In a specific embodiment, setting the address path corresponding to the obtaining of the Buildroot dependency packet in the compiling process as the preset address path includes: setting address paths for acquiring all required Buildroot dependent packets in codes and address paths for acquiring associated Buildroot dependent packets in all Buildroot dependent packets as the preset address paths.
Specifically, the download information based on the removal is mainly divided into two parts, and then the address path is also divided into two parts: setting an address path for acquiring each required Buildroot dependent packet in the code as the preset address path, so that the code can acquire the required Buildroot dependent packet directly based on the preset address path in the compiling process; and setting an address path for acquiring the associated Buildroot dependency packet in each Buildroot dependency packet as the preset address path, namely acquiring the corresponding dependent Buildroot dependency packet by the corresponding Buildroot dependency packet through the preset address path in the process of compiling the Buildroot dependency packet.
In a preferred embodiment, each Buildroot-dependent package includes: patch files (patch), compile files (combile), and install files (install); the patch file is used for patching, and other Buildroot dependent packages can be relied on in the patching process; the compiling file is used for compiling, and other Buildroot dependency packages can be relied on in the compiling process; the installation file is used for installation, and other Buildroot dependent packages may be relied on in the installation process.
The method for setting the address path for acquiring the associated Buildroot dependent packet in each Buildroot dependent packet as the preset address path comprises the following steps: and setting address paths of the Buildroot dependency packages required by the patch files, the compiling files and the installing files in the Buildroot dependency packages as the preset address paths respectively.
Therefore, when the Buildroot dependent package is patched, the dependent Buildroot dependent package can be obtained from the preset address path, and the patching is completed; when the Buildroot dependency package is compiled, a dependent Buildroot dependency package can be obtained from the preset address path, and the compiling work is completed; and during installation, a dependent Buildroot dependent packet can be acquired from the preset address path, and the installation work is completed.
Step S3: and according to the preset address path, cross compiling is carried out on each Buildroot dependency package participating in compiling.
Specifically, in the compiling process, each Buildroot dependence package required by codes participating in compiling is firstly obtained according to the preset address path, then cross compiling is carried out on each Buildroot dependence package, and when the Buildroot dependence package is compiled, the Buildroot dependence package corresponding to the dependence is obtained through the preset address path, so that the Buildroot compiling is completed.
Therefore, the Buildroot compiling method does not need to download the dependent package, the required Buildroot dependent package can be directly obtained from the position where the downloaded Buildroot dependent package is stored in advance through the preset address path, the condition that the dependent package is not downloaded fully even if the network environment is unstable is avoided, the downloading time is shortened, and the compiling efficiency is improved.
In order to better describe the Buildroot compiling method, the following specific examples are provided for illustration;
example 1: a building oot compiling method.
As shown in fig. 2, the existing Buildroot compiling method generally downloads a large number of dependency packages, and then performs Buildroot dependency package cross compiling, so that the situation that the downloaded dependency packages are interrupted or cannot be accessed under the condition of unstable network is easy to occur, and the dependency package downloading is not completely compiled and fails.
In the Buildroot compiling method of the embodiment, the dependency package does not need to be downloaded before compiling, as shown in fig. 3, the method includes:
step 1: the dependent package downloaded before replication.
And connecting with a network, downloading the Buildroot dependent package, and storing the Buildroot dependent package under own projects.
Step 2: depending on the adaptation of the package.
Firstly, determining whether the version of the Buildroot dependent package is correct; removing the downloading part of the Buildroot dependent package under the condition of correct version; finally, setting an address path for acquiring the Buildroot dependent packet as a storage address of the Buildroot dependent packet; address paths to be set for corresponding Buildroot dependent packets: including the address path of the build dependent packet in patch, command and install.
Step 3: cross-compiling between dependent packages.
And compiling the Buildroot dependent packets orderly according to the set new address path.
Similar to the principles of the above embodiments, the present invention provides a Buildroot compiling apparatus.
Specific embodiments are provided below with reference to the accompanying drawings:
fig. 4 shows a schematic structural diagram of a Buildroot compiling device according to an embodiment of the invention.
The device comprises:
the relying package storage module 1 is used for storing all the downloaded latest version of the Buildroot relying package and correspondingly defining a preset address path;
the dependent package adapting module 2 is connected with the dependent package storing module 1 and is used for adapting each Buildroot dependent package required by codes participating in compiling so as to designate an address path for acquiring the Buildroot dependent package in the compiling process as the preset address path;
and the compiling module 3 is connected with the dependent package adapting module and is used for cross compiling each Buildroot dependent package participating in compiling according to the preset address path.
It should be noted that, it should be understood that the division of the modules in the embodiment of the system of fig. 4 is merely a division of logic functions, and may be fully or partially integrated into a physical entity or may be physically separated. And these modules may all be implemented in software in the form of calls by the processing element; or can be realized in hardware; the method can also be realized in a mode that a part of modules are called by processing elements and software, and the part of modules are realized in a hardware mode;
for example, each module may be one or more integrated circuits configured to implement the above methods, e.g.: one or more application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as ASIC), or one or more microprocessors (digital signal processor, abbreviated as DSP), or one or more field programmable gate arrays (Field Programmable Gate Array, abbreviated as FPGA), or the like. For another example, when a module above is implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a central processing unit (Central Processing Unit, CPU) or other processor that may invoke the program code. For another example, the modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Since the implementation principle of the Buildroot compiling device has been described in the foregoing embodiments, a detailed description is omitted herein.
In an embodiment, as shown in fig. 5, the dependent packet adaptation module 2 includes: a version determination unit 21, configured to determine whether the version of each Buildroot dependency package required for the code participating in compiling is correct; a download information removing unit 22, connected to the version determining unit 21, for removing download information for correspondingly downloading the Buildroot dependent package in the compiling process when the version is correct; an address path setting unit 23, connected to the download information removing unit 22, for setting an address path corresponding to the acquire Buildroot dependent packet in the compiling process as the preset address path.
In an embodiment, the version determining unit 21 is configured to determine each Buildroot dependency package required for the code participating in compiling from all the stored Buildroot dependency packages; judging whether the version of each determined Buildroot dependency package accords with the version of the Buildroot dependency package required by code compiling; if yes, the version is correct; if not, the version is incorrect, and the latest version of the Buildroot dependency package needs to be downloaded again.
In an embodiment, the download information removing unit 22 is configured to remove the download information of each Buildroot-dependent package required for the corresponding download in the code, and remove the download information of the corresponding download-associated Buildroot-dependent package in each required Buildroot-dependent package respectively.
In an embodiment, the address path setting unit 23 is configured to set, as the preset address path, an address path for acquiring each required Buildroot-dependent packet in the code and an address path for acquiring an associated Buildroot-dependent packet in each Buildroot-dependent packet.
In an embodiment, the method for setting the address path for obtaining the associated Buildroot dependent packet in each Buildroot dependent packet as the preset address path includes: and setting address paths of the Buildroot dependency packages required by the patch files, the compiling files and the installing files in the Buildroot dependency packages as the preset address paths respectively.
Fig. 6 shows a schematic structural diagram of a Buildroot compiling terminal in an embodiment of the invention.
The Buildroot compiling terminal 100 includes: memory 101 and processor 102. The memory 101 is used for storing a computer program; the processor 102 runs a computer program to implement the Buildroot compiling method as described in fig. 1.
Alternatively, the number of the memories 101 may be one or more, and the number of the processors 102 may be one or more, and one is taken as an example in fig. 6.
Optionally, the processor 102 in the Buildroot compiling terminal 100 loads one or more instructions corresponding to the process of the application program into the memory 101 according to the steps described in fig. 1, and the processor 102 executes the application program stored in the first memory 101, so as to implement various functions in the Buildroot compiling method as described in fig. 1.
Optionally, the memory 101 may include, but is not limited to, high speed random access memory, nonvolatile memory. Such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices; the processor 102 may include, but is not limited to, a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
Alternatively, the processor 102 may be a general-purpose processor, including a central processing unit (Central Processing Unit, abbreviated as CPU), a network processor (Network Processor, abbreviated as NP), and the like; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
The invention also provides a computer readable storage medium storing a computer program which implements the Buildroot compiling method as shown in fig. 1 when running. The computer-readable storage medium may include, but is not limited to, floppy diskettes, optical disks, CD-ROMs (compact disk-read only memories), magneto-optical disks, ROMs (read-only memories), RAMs (random access memories), EPROMs (erasable programmable read only memories), EEPROMs (electrically erasable programmable read only memories), magnetic or optical cards, flash memory, or other type of media/machine-readable medium suitable for storing machine-executable instructions. The computer readable storage medium may be an article of manufacture that is not accessed by a computer device or may be a component used by an accessed computer device.
In summary, according to the method, the device, the terminal and the medium for compiling the Buildroot, all the downloaded Buildroot dependent packages of the latest version are saved, each Buildroot dependent package required by codes involved in compiling is adapted, an address path for obtaining the Buildroot dependent package in the compiling process is designated as the preset address path, and finally each Buildroot dependent package involved in compiling is cross compiled according to the preset address path. The invention does not need to download the dependent package, thus not causing incomplete download of the dependent package due to network problems, greatly saving time, ensuring the integrity of the dependent package and ensuring stable compiling. Therefore, the invention effectively overcomes various defects in the prior art and has high industrial utilization value.
The above embodiments are merely illustrative of the principles of the present invention and its effectiveness, and are not intended to limit the invention. Modifications and variations may be made to the above-described embodiments by those skilled in the art without departing from the spirit and scope of the invention. It is therefore intended that all equivalent modifications and changes made by those skilled in the art without departing from the spirit and technical spirit of the present invention shall be covered by the appended claims.

Claims (10)

1. A Buildroot compiling method, the method comprising:
storing all the downloaded Buildroot dependent packages of the latest version, and correspondingly defining a preset address path;
adapting each Buildroot dependency package required by the codes participating in compiling so as to specify an address path for acquiring the Buildroot dependency package in the compiling process as the preset address path;
and according to the preset address path, cross compiling is carried out on each Buildroot dependency package participating in compiling.
2. The Buildroot compiling method according to claim 1, wherein the adapting each Buildroot dependency package participating in compiling comprises:
determining whether versions of all Buildroot dependency packages required by codes participating in compiling are correct or not;
under the condition of correct version, removing the downloading information for correspondingly downloading the Buildroot dependent package in the compiling process; and setting an address path corresponding to the acquisition of the Buildroot dependent packet in the compiling process as the preset address path.
3. The Buildroot compiling method according to claim 2, wherein determining whether versions of respective Buildroot dependency packages required for the codes participating in compiling are correct comprises:
determining each Buildroot dependency package required by codes participating in compiling from all stored Buildroot dependency packages;
judging whether the version of each determined Buildroot dependency package accords with the version of the Buildroot dependency package required by code compiling;
if yes, the version is correct;
if not, the version is incorrect, and the latest version of the Buildroot dependency package needs to be downloaded again.
4. The Buildroot compiling method according to claim 2, wherein removing download information for correspondingly downloading the Buildroot dependent package in the compiling process comprises:
and removing the downloading information of each Buildroot dependent package required by the corresponding downloading in the code, and respectively removing the downloading information of the corresponding downloading associated Buildroot dependent package in each required Buildroot dependent package.
5. The Buildroot compiling method according to claim 2, wherein setting an address path corresponding to the acquisition of the Buildroot dependent packet in the compiling process as the preset address path comprises:
setting address paths for acquiring all required Buildroot dependent packets in codes and address paths for acquiring associated Buildroot dependent packets in all Buildroot dependent packets as the preset address paths.
6. The Buildroot compiling method according to claim 5, wherein the setting the address path for obtaining the associated Buildroot dependent packet in each Buildroot dependent packet as the preset address path comprises:
and setting address paths of the Buildroot dependency packages required by the patch files, the compiling files and the installing files in the Buildroot dependency packages as the preset address paths respectively.
7. A Buildroot compiling device, the device comprising:
the relying package storage module is used for storing all the downloaded latest version of the Buildroot relying package and correspondingly defining a preset address path;
the dependency package adaptation module is connected with the dependency package storage module and is used for adapting each Buildroot dependency package required by codes participating in compiling so as to designate an address path for acquiring the Buildroot dependency package in the compiling process as the preset address path;
and the compiling module is connected with the dependence package adapting module and used for cross compiling each Buildroot dependence package participating in compiling according to the preset address path.
8. The Buildroot compiling device according to claim 7, wherein the dependency package adaptation module comprises:
the version determining unit is used for determining whether the version of each Buildroot dependency package required by the codes participating in compiling is correct or not;
the download information removing unit is connected with the version determining unit and is used for removing download information for correspondingly downloading the build dependent package in the compiling process under the condition that the version is correct;
and the address path setting unit is connected with the download information removing unit and is used for setting the address path corresponding to the acquisition of the Buildroot dependent packet in the compiling process as the preset address path.
9. The Buildroot compiling terminal is characterized by comprising: one or more memories and one or more processors;
the one or more memories are used for storing computer programs;
the one or more processors being coupled to the memory for running the computer program to perform the method of claims 1 to 6.
10. A computer-readable storage medium, characterized in that a computer program is stored, which, when being executed by one or more processors, performs the method of any of claims 1 to 6.
CN202311079472.6A 2023-08-24 2023-08-24 Method, device, terminal and medium for compiling building Pending CN117251165A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311079472.6A CN117251165A (en) 2023-08-24 2023-08-24 Method, device, terminal and medium for compiling building

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311079472.6A CN117251165A (en) 2023-08-24 2023-08-24 Method, device, terminal and medium for compiling building

Publications (1)

Publication Number Publication Date
CN117251165A true CN117251165A (en) 2023-12-19

Family

ID=89135931

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311079472.6A Pending CN117251165A (en) 2023-08-24 2023-08-24 Method, device, terminal and medium for compiling building

Country Status (1)

Country Link
CN (1) CN117251165A (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103440156A (en) * 2013-08-15 2013-12-11 国云科技股份有限公司 Linux software package manufacturing method capable of being used in various systems
CN103870310A (en) * 2014-02-18 2014-06-18 小米科技有限责任公司 Program compilation method and relevant device
CN108897542A (en) * 2018-04-24 2018-11-27 北京奇艺世纪科技有限公司 A kind of soft project method of adjustment, device and electronic equipment
CN109491661A (en) * 2018-10-24 2019-03-19 武汉思普崚技术有限公司 Universal cross Compilation Method and equipment
US20190087566A1 (en) * 2017-09-15 2019-03-21 Arm Limited Call path dependent authentication
CN109766099A (en) * 2018-12-11 2019-05-17 浙江口碑网络技术有限公司 Front end source code Compilation Method, device, storage medium and computer equipment
CN110134399A (en) * 2019-03-15 2019-08-16 北京车和家信息技术有限公司 Compilation Method and device
CN110554876A (en) * 2018-05-31 2019-12-10 北京京东尚科信息技术有限公司 Method and device for compiling android project
CN110737437A (en) * 2018-07-20 2020-01-31 北京君正集成电路股份有限公司 compiling method and device based on code integration
CN114138281A (en) * 2021-12-08 2022-03-04 京东科技控股股份有限公司 Compiling method, device, equipment and medium of software engineering
CN114745439A (en) * 2022-03-07 2022-07-12 新华三大数据技术有限公司 Method and device for updating dependent file cache, computer equipment and storage medium
CN115145595A (en) * 2022-05-06 2022-10-04 北京沃东天骏信息技术有限公司 Dependency library installation method and device, server, electronic equipment and storage medium
CN115202669A (en) * 2022-08-04 2022-10-18 深圳市远行科技股份有限公司 Project construction method and system based on configuration file and related equipment
CN115328526A (en) * 2022-08-19 2022-11-11 北京思明启创科技有限公司 Dependency package updating method, device, equipment and storage medium
CN115509560A (en) * 2022-09-30 2022-12-23 上海洛轲智能科技有限公司 Engineering code packaging method and device and electronic equipment

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103440156A (en) * 2013-08-15 2013-12-11 国云科技股份有限公司 Linux software package manufacturing method capable of being used in various systems
CN103870310A (en) * 2014-02-18 2014-06-18 小米科技有限责任公司 Program compilation method and relevant device
US20190087566A1 (en) * 2017-09-15 2019-03-21 Arm Limited Call path dependent authentication
CN108897542A (en) * 2018-04-24 2018-11-27 北京奇艺世纪科技有限公司 A kind of soft project method of adjustment, device and electronic equipment
CN110554876A (en) * 2018-05-31 2019-12-10 北京京东尚科信息技术有限公司 Method and device for compiling android project
CN110737437A (en) * 2018-07-20 2020-01-31 北京君正集成电路股份有限公司 compiling method and device based on code integration
CN109491661A (en) * 2018-10-24 2019-03-19 武汉思普崚技术有限公司 Universal cross Compilation Method and equipment
CN109766099A (en) * 2018-12-11 2019-05-17 浙江口碑网络技术有限公司 Front end source code Compilation Method, device, storage medium and computer equipment
CN110134399A (en) * 2019-03-15 2019-08-16 北京车和家信息技术有限公司 Compilation Method and device
CN114138281A (en) * 2021-12-08 2022-03-04 京东科技控股股份有限公司 Compiling method, device, equipment and medium of software engineering
CN114745439A (en) * 2022-03-07 2022-07-12 新华三大数据技术有限公司 Method and device for updating dependent file cache, computer equipment and storage medium
CN115145595A (en) * 2022-05-06 2022-10-04 北京沃东天骏信息技术有限公司 Dependency library installation method and device, server, electronic equipment and storage medium
CN115202669A (en) * 2022-08-04 2022-10-18 深圳市远行科技股份有限公司 Project construction method and system based on configuration file and related equipment
CN115328526A (en) * 2022-08-19 2022-11-11 北京思明启创科技有限公司 Dependency package updating method, device, equipment and storage medium
CN115509560A (en) * 2022-09-30 2022-12-23 上海洛轲智能科技有限公司 Engineering code packaging method and device and electronic equipment

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
L李钟意: "【Linux】批量下载依赖包的方法", Retrieved from the Internet <URL:《https://blog.csdn.net/qq_57414752/article/details/129467687》> *
REZNIKOV V: "Creating tailored OS images for embedded systems using Buildroot", 《UNIVERSIDADE DO MINHO》, 31 December 2019 (2019-12-31), pages 1 *
姜悦: "基于龙芯2K1000的嵌入式Linux系统移植和驱动程序设计", 《中国优秀硕士学位论文全文数据库 信息科技辑》, no. 3, 15 March 2022 (2022-03-15), pages 138 - 507 *
谢祥东 等: "基于IMX6ULL的嵌入式根文件系统构建", 《汽车实用技术》, vol. 47, no. 13, 15 July 2022 (2022-07-15), pages 169 - 171 *

Similar Documents

Publication Publication Date Title
US9928059B1 (en) Automated deployment of a multi-version application in a network-based computing environment
CN105446712B (en) Application program defect repairing method and device
EP1739552A1 (en) Software installation method and computer system
CN107220074B (en) Method and device for accessing and upgrading supporting layer software function
US20190129733A1 (en) Android dynamic framework and a method thereof
CN112882718B (en) Compiling processing method, device, equipment and storage medium
CN109542415B (en) Code merging method supporting parallel research and development of application programs and related equipment
CN111897570A (en) Multi-dependency file extraction method and device based on Maven plug-in
CN110737481A (en) Starting method of embedded LINUX operating system based on multiple backup bootstrap programs
CN110597544A (en) Software system upgrading method and device
CN110704113B (en) Starting method and system based on FPGA platform and development board device
CN110750280B (en) Android platform-based application upgrading method and system and storage medium
CN112416360B (en) Method, device and server for generating thermal patch
CN111061486B (en) Android application program increment method
CN117251165A (en) Method, device, terminal and medium for compiling building
US10552135B1 (en) Reducing a size of an application package
CN111722875A (en) Method for rapidly transplanting and compiling open source program by Shenwei platform
CN108536444B (en) Plug-in compiling method and device, computer equipment and storage medium
CN113641389A (en) Software upgrading method, device and equipment based on OpenCPU
CN114942779A (en) Patch implementation method and device, embedded system and storage medium
CN113849181A (en) Cross compiling tool chain construction method and device, electronic equipment and storage medium
CN110362320B (en) Command implementation method and device of application development platform
CN106886420B (en) Program code management device and method and program code manager
CN113672238B (en) Operation method, device and equipment based on real-time operating system modularized management
CN117251166A (en) Compiling method, device, terminal and medium for shortening op-build compiling time

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination