CN116501392A - Starting method and device of microprocessor, storage medium and electronic equipment - Google Patents
Starting method and device of microprocessor, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN116501392A CN116501392A CN202310403753.6A CN202310403753A CN116501392A CN 116501392 A CN116501392 A CN 116501392A CN 202310403753 A CN202310403753 A CN 202310403753A CN 116501392 A CN116501392 A CN 116501392A
- Authority
- CN
- China
- Prior art keywords
- file
- loading
- microprocessor
- random access
- access memory
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 52
- 230000003068 static effect Effects 0.000 claims abstract description 37
- 238000004891 communication Methods 0.000 claims abstract description 36
- 238000004590 computer program Methods 0.000 claims description 16
- 230000005540 biological transmission Effects 0.000 claims description 15
- 230000008569 process Effects 0.000 claims description 11
- 238000005516 engineering process Methods 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 6
- 230000008901 benefit Effects 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000006872 improvement Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4403—Processor initialisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
The embodiment of the application provides a starting method and device of a microprocessor, a storage medium and electronic equipment, wherein the method comprises the following steps: under the condition that communication connection is kept between the microprocessor and the cloud server, loading a first starting loading file in the cloud server into a static random access memory so as to run the first starting loading file in the static random access memory; under the condition that the initialization of the dynamic random access memory is completed by utilizing the first startup loading file, loading a second startup loading file in the cloud server into the random access memory so as to run the second startup loading file in the random access memory; loading the kernel file of the operating system into the dynamic random access memory by using the second starting loading file so as to run the kernel file of the operating system in the dynamic random access memory; the microprocessor is started based on the running operating system kernel file. The invention solves the problem of high starting cost of the microprocessor in the related technology.
Description
Technical Field
The embodiment of the application relates to the field of computers, in particular to a starting method and device of a microprocessor, a storage medium and electronic equipment.
Background
In the field of servers, with the increasing types of demands of clients, the application of microprocessors is increasing, and unlike microcontrollers, the microprocessors integrate therein fast large-area scanning hardware (Fast Large Area Scan Hardware, abbreviated as FLASH), random access memory (Random Access Memory, abbreviated as RAM) and some peripheral devices, and the firmware of the microcontrollers can be directly stored in the on-chip FLASH, while the firmware storage space of the microprocessors needs to be built by a developer.
In the related art, a conventional technical means for setting up a firmware storage space of a microprocessor is to write firmware into an external device by itself, and load the external device into the microprocessor when the microprocessor is started. However, since the external device has a limited memory space, it is difficult to satisfy the installation requirements of a plurality of external devices, and there are problems such as a small amount of firmware that can be stored and high cost.
The prior art does not give an effective solution to the above-mentioned problems.
Disclosure of Invention
The embodiment of the application provides a starting method and device of a microprocessor, a storage medium and electronic equipment, so as to at least solve the problem of high starting cost of the microprocessor in the related technology.
According to one embodiment of the present application, there is provided a method for starting up a microprocessor, including: under the condition that communication connection is kept between a microprocessor and a cloud server, loading a first starting loading file in the cloud server into a static random access memory so as to run the first starting loading file in the static random access memory, wherein the static random access memory is arranged in the microprocessor; under the condition that the initialization of the dynamic random access memory is completed by utilizing the first startup loading file, loading a second startup loading file in the cloud server into the random access memory so as to run the second startup loading file in the random access memory; loading the kernel file of the operating system into the dynamic random access memory by using the second starting loading file so as to run the kernel file of the operating system in the dynamic random access memory; and starting the microprocessor based on the running kernel file of the operating system.
In an exemplary embodiment, in a case where it is determined that the communication connection between the microprocessor and the cloud server is maintained, loading the first boot loader file in the cloud server into the sram, so as to execute the first boot loader file in the sram, where the method further includes: configuring and initializing a network communication file in a third start loading file in a read-only memory, wherein the read-only memory is arranged in the microprocessor; and establishing communication connection between the microprocessor and the cloud server according to the initialized network communication file.
In an exemplary embodiment, in a case where it is determined that a communication connection is maintained between a microprocessor and a cloud server, loading a first boot loader file in the cloud server into a static random access memory to run the first boot loader file in the static random access memory, including: detecting N versions of boot load files of the microprocessor deployed in the cloud server by using a third boot load file in a read-only memory, wherein N is a natural number greater than or equal to 1, and the read-only memory is arranged in the microprocessor; determining a target boot version file from the N versions of boot loading files according to the determined loading priority and loading sequence; and loading the first startup loading file in the target startup version file into the static random access memory.
In one exemplary embodiment, determining a target boot version file from the N versions of boot load files in accordance with the determined loading priority and loading order includes: storing the loading priority and the loading sequence into the third boot loading file; and determining a target boot version file from the N versions of boot loading files according to the loading priority and the loading sequence through the running third boot loading file.
In an exemplary embodiment, in a case that the initialization of the dynamic random access memory is completed by using the first boot loader file, loading the second boot loader file in the cloud server into the random access memory includes: configuring a data transmission interface between the microprocessor and the cloud server; and under the condition that the initialization of the dynamic random access memory is completed by utilizing the first startup loading file, loading the second startup loading file in the target startup version file into the random dynamic memory through the data transmission interface.
In one exemplary embodiment, starting the microprocessor based on the operating system kernel file running includes: loading the device tree and the root file system of the microprocessor in the cloud server into the dynamic random access memory under the condition that the kernel file of the operating system is in an operation state in the dynamic random access memory; and under the condition that the device tree and the root file system are operated in the dynamic random access memory, determining the drive loading of the microprocessor and the mounting of the root file system to start the microprocessor.
In an exemplary embodiment, after the microprocessor is started using the running operating system kernel file, the method further includes: a user process is created in the microprocessor.
According to another embodiment of the present application, there is provided a starting device of a microprocessor, including: the first loading module is used for loading a first starting loading file in the cloud server into the static random access memory under the condition that communication connection between the microprocessor and the cloud server is ensured, so that the first starting loading file can be operated in the static random access memory, wherein the static random access memory is arranged in the microprocessor; the second loading module is used for loading a second starting loading file in the cloud server into the random dynamic memory under the condition that the initialization of the dynamic random memory is completed by utilizing the first starting loading file so as to run the second starting loading file in the random dynamic memory; the third loading module is used for loading the kernel file of the operating system into the dynamic random access memory by utilizing the second starting loading file so as to run the kernel file of the operating system in the dynamic random access memory; and the starting module is used for starting the microprocessor based on the running kernel file of the operating system.
In an exemplary embodiment, the above apparatus further includes: the configuration module is used for configuring and initializing a network communication file in a third starting loading file in the read-only memory, wherein the read-only memory is arranged in the microprocessor; and establishing communication connection between the microprocessor and the cloud server according to the initialized network communication file.
In an exemplary embodiment, the first loading module includes: the detection sub-module is used for detecting N versions of the startup loading files of the microprocessor deployed in the cloud server by utilizing a third startup loading file in a read-only memory, wherein N is a natural number greater than or equal to 1, and the read-only memory is arranged in the microprocessor; the determining submodule is used for determining a target starting version file from the starting loading files of the N versions according to the determined loading priority and loading sequence; and loading the first startup loading file in the target startup version file into the static random access memory.
In an exemplary embodiment, the determining submodule includes: a storage unit configured to store the loading priority and the loading order in the third boot loader file; and the determining unit is used for determining a target startup version file from the startup loading files of N versions according to the loading priority and the loading sequence through the third startup loading file.
In an exemplary embodiment, the second loading module further includes: the configuration submodule is used for configuring a data transmission interface between the microprocessor and the cloud server; and the loading sub-module is used for loading the second startup loading file in the target startup version file into the random dynamic memory through the data transmission interface under the condition that the initialization of the dynamic random memory is completed by utilizing the first startup loading file.
In an exemplary embodiment, the starting module includes: the second loading sub-module is used for loading the equipment tree and the root file system of the microprocessor in the cloud server into the dynamic random access memory under the condition that the kernel file of the operating system is in an operation state in the dynamic random access memory; and the determining submodule is used for determining the drive loading of the microprocessor and the mounting of the root file system under the condition that the equipment tree and the root file system are operated in the dynamic random access memory so as to start the microprocessor.
In an exemplary embodiment, the above apparatus further includes: and the creation module is used for creating a user process in the microprocessor.
According to a further embodiment of the present application, there is also provided a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
According to a further embodiment of the present application, there is also provided an electronic device comprising a memory having stored therein a computer program, and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Through the method and the device, the starting of the microprocessor can be completed by splitting and storing the starting loading file and the kernel file of the operating system in the cloud server and gradually downloading and running the starting loading file and the kernel file of the operating system in the cloud server, so that the strong dependence on external storage hardware is effectively avoided, the problem of how to reduce the starting cost of the microprocessor can be solved, and the effect of reducing the starting cost of the microprocessor is achieved.
Drawings
Fig. 1 is a block diagram of a hardware configuration of a mobile terminal of a starting method of a microprocessor according to an embodiment of the present application;
FIG. 2 is a flow chart of a method of starting up a microprocessor according to an embodiment of the present application;
FIG. 3 is a startup flow diagram of a microprocessor according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a startup principle of a microprocessor according to an embodiment of the present application;
FIG. 5 is a flow chart of firmware loading of a microprocessor according to an embodiment of the present application;
FIG. 6 is a block diagram of a boot virtual device of a microprocessor according to an embodiment of the present application.
Detailed Description
Embodiments of the present application will be described in detail below with reference to the accompanying drawings in conjunction with the embodiments.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
First, the related art related to the present invention will be described:
MPU: microprocessor Unit, a microprocessor;
BMC: base Board Management Controller, baseboard management controller;
BL0: bootLoader0, bootLoader stage 0;
BL1: bootLoader1, bootLoader stage 1;
BL2: bootLoader2, bootLoader stage 2;
MCU, microcontroller Unit, micro control unit.
The method embodiments provided in the embodiments of the present application may be performed in a mobile terminal, a computer terminal or similar computing device. Taking the mobile terminal as an example, fig. 1 is a block diagram of a hardware structure of the mobile terminal of a starting method of a microprocessor according to an embodiment of the present application. As shown in fig. 1, a mobile terminal may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely illustrative and not limiting of the structure of the mobile terminal described above. For example, the mobile terminal may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a starting method of a microprocessor in the embodiment of the present application, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, implement the above-mentioned method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (NIC) that may be connected to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module for communicating with the internet wirelessly.
In this embodiment, a method for starting a microprocessor is provided, and fig. 2 is a flowchart of a method for starting a microprocessor according to an embodiment of the present application, as shown in fig. 2, where the flowchart includes the following steps:
step S202, under the condition that communication connection is kept between a microprocessor and a cloud server, loading a first starting loading file in the cloud server into a static random access memory so as to run the first starting loading file in the static random access memory, wherein the static random access memory is arranged in the microprocessor;
step S204, loading a second boot loader file in the cloud server into the RAM to run the second boot loader file in the RAM when the initialization of the DRAM is completed by using the first boot loader file;
step S206, loading the kernel file of the operating system into the dynamic random access memory by using the second boot loader file so as to run the kernel file of the operating system in the dynamic random access memory;
step S208, starting the microprocessor based on the running kernel file of the operating system.
The execution body of the steps may be a microprocessor, or an internal memory of the microprocessor with a program loading and running capability, or other processing devices or processing units with similar processing capability, but is not limited thereto.
In the foregoing embodiment, the first boot loader file and the second boot loader file may be split results of a BootLoader, which are used to build a memory space map and debug a system to call an operating system kernel, where the first boot loader file includes a program for downloading the second boot loader file, a program for initializing a hardware device, a setup stack, and a program for preparing a storage space for the second boot loader file. The second boot loader file includes a program for downloading the operating system kernel file, a program for initializing the dynamic random access memory, a program for setting boot parameters for the operating system kernel, and a program for calling the operating system kernel file. The operating system kernel file comprises a kernel core, a kernel object and an auxiliary file, and is used for memory management, process management, device driver, system call and safety protection. The static random access memory includes, but is not limited to, SRAM, and the dynamic random access memory includes, but is not limited to, DDR.
Through the method and the device, the starting of the microprocessor can be completed by splitting and storing the starting loading file and the kernel file of the operating system in the cloud server and gradually downloading and running the starting loading file and the kernel file of the operating system in the cloud server, so that the strong dependence on external storage hardware is effectively avoided, the problem of how to reduce the starting cost of the microprocessor can be solved, and the effect of reducing the starting cost of the microprocessor is achieved.
In an exemplary embodiment, in a case where it is determined that the communication connection between the microprocessor and the cloud server is maintained, loading the first boot loader file in the cloud server into the sram, so as to execute the first boot loader file in the sram, where the method further includes: configuring and initializing a network communication file in a third start loading file in a read-only memory, wherein the read-only memory is arranged in the microprocessor; and establishing communication connection between the microprocessor and the cloud server according to the initialized network communication file. In the above-described embodiments, the read-only memory is capable of long-term storage for storing a plurality of microprocessor base firmware including the third boot loader file. The third boot loader file includes, but is not limited to, a program for downloading the first boot loader file, a program for initializing a network communication file. Initializing network communication files includes, but is not limited to, initializing a network protocol stack between the microprocessor and the cloud server, configuring network communication parameters, adjusting a system clock, etc., such as configuring an IP address, subnet mask, synchronizing clocks with the server, invoking system clock setting instruction settings, etc. The initialization of network connection and communication connection with the cloud server are completed through the third starting loading file in the read-only memory, so that the problem that the starting of the microprocessor in the related art depends on external storage can be solved, and the starting cost is effectively reduced.
In an exemplary embodiment, in a case where it is determined that a communication connection is maintained between a microprocessor and a cloud server, loading a first boot loader file in the cloud server into a static random access memory to run the first boot loader file in the static random access memory, including: detecting N versions of boot load files of the microprocessor deployed in the cloud server by using a third boot load file in a read-only memory, wherein N is a natural number greater than or equal to 1, and the read-only memory is arranged in the microprocessor; determining a target boot version file from the N versions of boot loading files according to the determined loading priority and loading sequence; and loading the first startup loading file in the target startup version file into the static random access memory. In the above embodiment, the loading priority and priority determining method includes, but is not limited to, determining according to a version update order of the startup load file, determining according to a size rank of the startup load file, and the like. For example, ordering is performed from early to late with version update time, with earlier priorities being lower; as another example, the larger the priority, the lower the ordering by boot load file size from large to small. All firmware and versions in the cloud server are obtained through the third starting loading file and downloaded according to a preset sequence, so that the advantage of large storage space of the cloud server is brought into play, a better starting version program is provided, and the starting efficiency of the microprocessor is improved.
In one exemplary embodiment, determining a target boot version file from the N versions of boot load files in accordance with the determined loading priority and loading order includes: storing the loading priority and the loading sequence into the third boot loading file; and determining a target boot version file from the N versions of boot loading files according to the loading priority and the loading sequence through the running third boot loading file. In the above embodiment, determining the target boot version files according to the loading priority and the loading order includes, but is not limited to, determining one target boot version file, determining a plurality of target boot version files, and re-determining one or more target boot version files in case that the downloaded boot version files cannot run smoothly. And the third starting loading file is used for storing the preset sequence, and then all firmware and versions in the cloud server are obtained, so that the advantage of large storage space of the cloud server is brought into play, a better starting version program is provided, and the starting efficiency of the microprocessor is improved.
In an exemplary embodiment, in a case that the initialization of the dynamic random access memory is completed by using the first boot loader file, loading the second boot loader file in the cloud server into the random access memory includes: configuring a data transmission interface between the microprocessor and the cloud server; and under the condition that the initialization of the dynamic random access memory is completed by utilizing the first startup loading file, loading the second startup loading file in the target startup version file into the random dynamic memory through the data transmission interface. In the embodiment, the first starting loading file is operated through the static random access memory with higher operation speed and smaller storage space, and the second starting loading file is operated through the dynamic random access memory with lower operation speed and larger storage space, so that the operation efficiency of starting loading files is improved as a whole, and the starting time of the microprocessor is effectively shortened.
In one exemplary embodiment, starting the microprocessor based on the operating system kernel file running includes: loading the device tree and the root file system of the microprocessor in the cloud server into the dynamic random access memory under the condition that the kernel file of the operating system is in an operation state in the dynamic random access memory; and under the condition that the device tree and the root file system are operated in the dynamic random access memory, determining the drive loading of the microprocessor and the mounting of the root file system to start the microprocessor. In the above embodiments, the driver loading includes static loading and dynamic loading, for example, compiling the driver to the operating system kernel, or dynamically loading the driver to the operating system kernel. By storing the equipment tree and the root file system in the cloud server, the starting efficiency of the microprocessor is effectively improved.
In an exemplary embodiment, after the microprocessor is started using the running operating system kernel file, the method further includes: a user process is created in the microprocessor.
The present invention is described below with reference to specific embodiments, and the specific embodiments are described by taking a scenario in which a Microprocessor (MPU) starts a process through cloud firmware as an example, where the scenario mainly includes a starting flow of the MPU, a starting principle of the MPU, and a software architecture of the MPU.
As shown in fig. 3, the start-up procedure includes the following steps:
step S301: powering up the microprocessor;
step S302: the microprocessor is internally provided with a program BL0 (corresponding to the third startup loading file) solidified in the read-only memory, configures and initializes a network communication file, and loads BL1 (corresponding to the first startup loading file) into an internal SRAM (corresponding to the static random access memory) for running;
step S303: in view of the running speed and the integrity of the storage space, the running BL1 program initializes the DDR (corresponding to the dynamic random access memory), and loads the BL2 (corresponding to the second starting loading file) program from the cloud server to the DDR (slower than the running speed of the SRAM but larger in storage space) for running;
step S304: the running BL2 program loads the LinuxKernel (corresponding to the kernel file of the operating system) into the DDR for running;
step S305: running BL2 program to load deviceTree and Rootfs (corresponding to the above device tree and root file system) into DDR for running;
step S306: and under the condition that the mounting and the driving loading of the root file system are completed, entering the file system, and creating a user process.
The starting principle is as shown in fig. 4: BL1, BL2, operating system kernel Linux, device tree, root file system Rootfs are all stored in the cloud server, microprocessor MPU embeds SRAM, DDR, ROM (corresponding to read-only memory above), wherein cloud server and microprocessor are connected through the network, BL0 program in ROM initializes SRAM and downloads BL1 program into SRAM, BL1 program initializes DDR and loads BL2 into DDR, BL2 loads operation kernel to DDR operation.
The operation flow of the software framework is shown in fig. 5, and the method comprises the following steps:
step S501: powering up the microprocessor;
step S502: the method comprises the steps that a solidified program BL0 in a built-in read-only memory of a microprocessor is configured and a network communication file is initialized to establish connection with a cloud server;
step S503: under the condition that the microprocessor and the cloud end are already connected, the BL0 program obtains firmware versions of all microprocessors deployed on the cloud end server;
step S504: the BL0 program determines the firmware version of the microprocessor to be loaded according to the pre-stored version priority;
step S505: the BL0 program loads the BL1 program in the firmware version of the determined microprocessor to the SRAM, and the step S506 is executed under the condition that the BL1 program runs smoothly in the SRAM, otherwise, the step S504 is executed;
step S506: initializing the DDR by the running BL1 program, loading BL2 into the DDR from the cloud server, executing step S507 under the condition that the BL2 program runs smoothly in the DDR, otherwise executing step S504;
step S507: the running BL2 program loads the LinuxKernel from the cloud server to the DDR, and under the condition that the LinuxKernel runs smoothly, the step S508 is executed, otherwise, the step S504 is executed;
step S508: the running BL2 program loads DeviceTree and Rootfs from the cloud server to DDR, and step S509 is executed under the condition that the Rootfs and the driver (the DeviceTree is registered) run smoothly, otherwise step S504 is executed;
step S509: after entering the file system, a user process is created, and if the user process is successfully created, the software process of the starting microprocessor is ended, otherwise, step S504 is executed.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), including several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method of the embodiments of the present application.
In this embodiment, a starting device of the microprocessor is further provided, and the starting device is used for implementing the foregoing embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 6 is a block diagram of a starting device of a microprocessor according to an embodiment of the present application, as shown in fig. 6, the device includes:
the first loading module 62 is configured to load a first boot loader file in the cloud server into a static random access memory under a condition that it is determined that a communication connection is maintained between the microprocessor and the cloud server, so as to run the first boot loader file in the static random access memory, where the static random access memory is disposed in the microprocessor;
a second loading module 64, configured to load a second boot loader file in the cloud server into the ram when the initialization of the ram is completed by using the first boot loader file, so as to run the second boot loader file in the ram;
a third loading module 68, configured to load an operating system kernel file into the dynamic random access memory by using the second boot loader file, so as to run the operating system kernel file in the dynamic random access memory;
a starting module 610, configured to start the microprocessor based on the running kernel file of the operating system.
In an exemplary embodiment, the above apparatus further includes: the configuration module is used for configuring and initializing a network communication file in a third starting loading file in the read-only memory, wherein the read-only memory is arranged in the microprocessor; and establishing communication connection between the microprocessor and the cloud server according to the initialized network communication file.
In one exemplary embodiment, the first loading module 62 includes: the detection sub-module is used for detecting N versions of the startup loading files of the microprocessor deployed in the cloud server by utilizing a third startup loading file in a read-only memory, wherein N is a natural number greater than or equal to 1, and the read-only memory is arranged in the microprocessor; the determining submodule is used for determining a target starting version file from the starting loading files of the N versions according to the determined loading priority and loading sequence; and loading the first startup loading file in the target startup version file into the static random access memory.
In an exemplary embodiment, the determining submodule includes: a storage unit configured to store the loading priority and the loading order in the third boot loader file; and the determining unit is used for determining a target startup version file from the startup loading files of N versions according to the loading priority and the loading sequence through the third startup loading file.
In an exemplary embodiment, the second loading module further includes: the configuration submodule is used for configuring a data transmission interface between the microprocessor and the cloud server; and the loading sub-module is used for loading the second startup loading file in the target startup version file into the random dynamic memory through the data transmission interface under the condition that the initialization of the dynamic random memory is completed by utilizing the first startup loading file.
In an exemplary embodiment, the starting module includes: the second loading sub-module is used for loading the equipment tree and the root file system of the microprocessor in the cloud server into the dynamic random access memory under the condition that the kernel file of the operating system is in an operation state in the dynamic random access memory; and the determining submodule is used for determining the drive loading of the microprocessor and the mounting of the root file system under the condition that the equipment tree and the root file system are operated in the dynamic random access memory so as to start the microprocessor.
In an exemplary embodiment, the above apparatus further includes: and the creation module is used for creating a user process in the microprocessor.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
Embodiments of the present application also provide a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
In one exemplary embodiment, the computer readable storage medium may include, but is not limited to: a usb disk, a Read-only memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
Embodiments of the present application also provide an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
In an exemplary embodiment, the electronic device may further include a transmission device connected to the processor, and an input/output device connected to the processor.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the application described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them may be fabricated into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the same, but rather, various modifications and variations can be made by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application should be included in the protection scope of the present application.
Claims (10)
1. A method for starting a microprocessor, comprising:
under the condition that communication connection is kept between a microprocessor and a cloud server, loading a first starting loading file in the cloud server into a static random access memory to run the first starting loading file in the static random access memory, wherein the static random access memory is arranged in the microprocessor;
under the condition that the initialization of the dynamic random access memory is completed by utilizing the first startup loading file, loading a second startup loading file in the cloud server into the random access memory so as to run the second startup loading file in the random access memory;
loading an operating system kernel file into the dynamic random access memory by using the second starting loading file so as to run the operating system kernel file in the dynamic random access memory;
and starting the microprocessor based on the running kernel file of the operating system.
2. The method of claim 1, wherein in the event that a communication connection is established between a microprocessor and a cloud server, loading a first boot loader file in the cloud server into a static random access memory to run the first boot loader file in the static random access memory, the method further comprising:
configuring and initializing a network communication file in a third start loading file in a read-only memory, wherein the read-only memory is arranged in the microprocessor;
and establishing communication connection between the microprocessor and the cloud server according to the initialized network communication file.
3. The method according to claim 1 or 2, wherein loading a first boot loader file in a cloud server into a static random access memory to run the first boot loader file in the static random access memory if it is determined that a communication connection is maintained between a microprocessor and the cloud server, comprises:
detecting N versions of boot load files of the microprocessor deployed in the cloud server by using a third boot load file in a read-only memory, wherein N is a natural number greater than or equal to 1, and the read-only memory is arranged in the microprocessor;
determining a target boot version file from the N versions of boot loading files according to the determined loading priority and loading sequence;
and loading the first startup loading file in the target startup version file into the static random access memory.
4. A method according to claim 3, wherein determining the target boot version file from the N versions of boot load files in accordance with the determined loading priority and loading order comprises:
storing the loading priority and the loading sequence into the third starting loading file;
and determining a target boot version file from the N versions of boot loading files according to the loading priority and the loading sequence through the third boot loading file.
5. The method of claim 1, wherein loading a second boot loader file in the cloud server into the random dynamic memory if initialization of the random dynamic memory is completed with the first boot loader file comprises:
configuring a data transmission interface between the microprocessor and the cloud server;
and under the condition that the initialization of the dynamic random access memory is completed by utilizing the first boot loader file, loading the second boot loader file in the target boot version file into the random dynamic memory through the data transmission interface.
6. The method of claim 1, wherein starting the microprocessor based on the operating system kernel file running comprises:
loading a device tree and a root file system of the microprocessor in the cloud server into the dynamic random access memory under the condition that the kernel file of the operating system is in an operating state in the dynamic random access memory;
and under the condition that the device tree and the root file system are operated in the dynamic random access memory, determining the drive loading of the microprocessor and the mounting of the root file system so as to start the microprocessor.
7. The method of claim 1, wherein after booting the microprocessor with the operating system kernel file running, the method further comprises:
a user process is created in the microprocessor.
8. A microprocessor starting apparatus, comprising:
the first loading module is used for loading a first starting loading file in the cloud server into a static random access memory under the condition that communication connection between the microprocessor and the cloud server is maintained, so as to run the first starting loading file in the static random access memory, wherein the static random access memory is arranged in the microprocessor;
the second loading module is used for loading a second starting loading file in the cloud server into the random dynamic memory under the condition that the initialization of the dynamic random memory is completed by utilizing the first starting loading file so as to run the second starting loading file in the random dynamic memory;
the third loading module is used for loading the kernel file of the operating system into the dynamic random access memory by utilizing the second starting loading file so as to run the kernel file of the operating system in the dynamic random access memory;
and the starting module is used for starting the microprocessor based on the running kernel file of the operating system.
9. A computer readable storage medium, characterized in that a computer program is stored in the computer readable storage medium, wherein the computer program, when being executed by a processor, implements the steps of the method according to any of the claims 1 to 7.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of any one of claims 1 to 7 when the computer program is executed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310403753.6A CN116501392A (en) | 2023-04-15 | 2023-04-15 | Starting method and device of microprocessor, storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310403753.6A CN116501392A (en) | 2023-04-15 | 2023-04-15 | Starting method and device of microprocessor, storage medium and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116501392A true CN116501392A (en) | 2023-07-28 |
Family
ID=87321016
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310403753.6A Pending CN116501392A (en) | 2023-04-15 | 2023-04-15 | Starting method and device of microprocessor, storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116501392A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117687703A (en) * | 2024-01-31 | 2024-03-12 | 苏州元脑智能科技有限公司 | Method, device and system for starting server, storage medium and electronic equipment |
-
2023
- 2023-04-15 CN CN202310403753.6A patent/CN116501392A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117687703A (en) * | 2024-01-31 | 2024-03-12 | 苏州元脑智能科技有限公司 | Method, device and system for starting server, storage medium and electronic equipment |
CN117687703B (en) * | 2024-01-31 | 2024-04-12 | 苏州元脑智能科技有限公司 | Method, device and system for starting server, storage medium and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101365904B1 (en) | Booting an operating system in discrete stages | |
CN105745617B (en) | Selective power management for pre-boot firmware updates | |
US9507604B2 (en) | Boot method and boot system | |
US20060242395A1 (en) | Operating system boot from network location | |
CN111966423B (en) | Method and equipment for realizing memory operating system | |
KR101366747B1 (en) | Apparatus and method for the SCA compliant SDR terminal to change service mode | |
CN112486522A (en) | Deployment method and device of OpenStack bare machine with intelligent network card | |
WO2017052528A1 (en) | Selecting and loading firmware volumes | |
CN116501392A (en) | Starting method and device of microprocessor, storage medium and electronic equipment | |
CN116243996B (en) | Service operation switching method and device, storage medium and electronic device | |
CN113821220A (en) | Installation method and device of linux operating system | |
CN114489701A (en) | Configuration method and device of artificial intelligence software deployment environment and electronic equipment | |
CN114185607A (en) | Starting control method, device and equipment for PCI (peripheral component interconnect) equipment in ARM (advanced RISC machines) server | |
CN114546588A (en) | Task deployment method and device, storage medium and electronic device | |
CN113031999A (en) | Method, device and equipment for controlling firmware upgrade of server component and storage medium | |
WO2024007800A1 (en) | Cloud terminal system upgrade method and apparatus, and cloud terminal and storage medium | |
US20240012653A1 (en) | Method and computing system for returning to a bios setup utility while in a shell environment during a booting process | |
CN113746673B (en) | Method, device, equipment and medium for deploying bare metal server ipxe | |
CN113419814B (en) | Virtual machine creating method, device, equipment and storage medium in cloud platform | |
CN116166283A (en) | Container arrangement deployment method, system, electronic equipment and storage medium | |
CN115016862A (en) | Kubernetes cluster-based software starting method, device, server and storage medium | |
CN102629209B (en) | Method, single board and system for realizing plug-and-play of single board | |
CN100386726C (en) | Method and system for renewing long-distance operation and control of computer platform system programe | |
CN111240805A (en) | Cloud operating system user switching processing method and device | |
CN113064655A (en) | BIOS network starting method and device and computer readable storage medium |
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 |