Bootstrap program loading method, computer equipment, storage medium and program product

By obtaining Coreboot from the flash memory after powering on the server for hardware initialization, and obtaining the Payload update identifier from the substrate management controller, and directly obtaining the Payload to be updated from the storage device for loading, it solves the cumbersome problem of the Coreboot+Payload solution in business scenario switching. , implements fast payment load updates and server startup.

CN119225832AInactive Publication Date: 2024-12-31INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411710321.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2024-12-31
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The current Coreboot+Payload open source firmware solution is more cumbersome when switching business scenarios, resulting in a long time to start the server.

Method used

After powering on the server, Coreboot is obtained from the flash memory of the basic input and output system for hardware initialization, and the Payload update identifier is obtained from the storage device of the substrate management controller. If you need to update the Payload, you will directly obtain the to be updated from the storage device. Payload and load it for operating system startup boot after hardware initialization is completed, avoiding the recompilation and flashing process.

Benefits of technology

It simplifies the update process of Payload, realizes dynamic loading of Payload, reduces the server startup time, and improves system stability and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119225832A_ABST
    Figure CN119225832A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of server firmware, and discloses a bootstrap program loading method, computer equipment, a storage medium and a program product.The method comprises the steps that after a server is powered on, Coreboot is obtained from a flash memory of a basic input and output system; executing the Coreboot so as to initialize the basic hardware equipment of the server; after the initialization of the storage device of the substrate management controller is completed, acquiring a Payload update identifier from the storage device of the substrate management controller; under the condition that the Payload updating identifier is the first identifier, determining that the Payload needs to be updated, and obtaining the Payload to be updated from the storage equipment; and after the initialization of the basic hardware equipment of the server is completed, loading the to-be-updated Payload, so as to complete the starting guide of the operating system based on the to-be-updated Payload. According to the invention, the starting time of the server is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of server firmware, and in particular to a boot program loading method, a computer device, a storage medium and a program product. Background Art

[0002] With the development of server firmware, the closed source and development problems of the Unified Extensible Firmware Interface (UEFI) Basic Input Output System (BIOS) have become increasingly prominent. In order to achieve efficient server startup and rapid adaptation of business scenarios, an open source firmware solution based on Coreboot+Payload (operating system boot program) has emerged. However, when facing business scenario switching, this open source firmware solution is relatively cumbersome, resulting in a long time for server startup. Summary of the invention

[0003] In view of this, the present invention provides a boot program loading method, a computer device, a storage medium and a program product to solve the problem that the current Coreboot+Payload open source firmware solution is relatively cumbersome when facing business scenario switching, resulting in a long time-consuming server startup.

[0004] In a first aspect, the present invention provides a boot program loading method, the method comprising: After the server is powered on, Coreboot is obtained from the flash memory of the BIOS; Execute the Coreboot to initialize the basic hardware devices of the server; After completing the initialization of the storage device of the baseboard management controller, obtaining a Payload update identifier from the storage device of the baseboard management controller; When the Payload update identifier is the first identifier, it is determined that the Payload needs to be updated, and the Payload to be updated is obtained from the storage device; After completing the initialization of the basic hardware devices of the server, the Payload to be updated is loaded to complete the booting of the operating system based on the Payload to be updated.

[0005] The boot program loading method provided in this embodiment directly obtains the Payload to be updated from the storage device when the Payload needs to be updated, and loads the Payload to be updated after completing the initialization of the basic hardware devices of the server, so as to complete the startup boot of the operating system based on the Payload to be updated, that is, complete the switching of the business scenario. There is no need to integrate the Payload to be updated into Coreboot and recompile it to obtain a new binary file, and then flash the new binary file to the flash memory of the basic input and output system, and then restart the computer to realize the update of the Payload to be updated and the switching of the business scenario, which simplifies the update process of the Payload, realizes the dynamic loading of the Payload, and reduces the startup time of the server.

[0006] In an optional implementation manner, obtaining the to-be-updated Payload from the storage device includes: Obtaining a payload identifier to be updated from the storage device; Based on the Payload identifier to be updated, the Payload to be updated is obtained.

[0007] The boot program loading method provided in this embodiment obtains the Payload identifier to be updated from the storage device and obtains the Payload to be updated based on the identifier, thereby ensuring the update accuracy of the obtained Payload and improving system stability.

[0008] In an optional implementation, the acquiring the Payload to be updated based on the Payload identifier to be updated includes: Based on the Payload identifier to be updated, determine the storage address information of the Payload to be updated; Based on the storage address information, the Payload to be updated is obtained.

[0009] The boot program loading method provided in this embodiment determines the storage address information based on the Payload identifier to be updated, and then obtains the Payload to be updated according to the storage address information, thereby ensuring the update accuracy of the Payload and improving the system security.

[0010] In an optional embodiment, the method further includes: When the Payload update identifier is a first identifier and the Payload identifier to be updated is a first program identifier, obtaining a first Payload from a flash memory of the basic input and output system; After completing the initialization of the basic hardware devices of the server, the first Payload is loaded to complete the startup booting of the operating system based on the first Payload.

[0011] The boot program loading method provided in this embodiment determines whether to obtain the Payload from the flash memory of the basic input and output system or from the storage device through the Payload update identifier and the Payload identifier to be updated, thereby ensuring the accuracy of the obtained Payload and further ensuring the accuracy of the Payload update.

[0012] In an optional embodiment, the method further includes: When the Payload update identifier is the second identifier, it is determined that the Payload does not need to be updated, and the second Payload previously loaded is obtained; After completing the initialization of the basic hardware devices of the server, the second Payload is loaded to complete the booting of the operating system based on the second Payload.

[0013] The boot program loading method provided in this embodiment determines whether the Payload needs to be updated through the Payload update identifier. When the Payload does not need to be updated, the second Payload loaded previously is obtained. After completing the initialization of the basic hardware devices of the server, the second Payload is loaded to complete the startup boot of the operating system, thereby improving system stability.

[0014] In an optional implementation, the obtaining the previously loaded second Payload includes: In the case that no Payload has been loaded before, a first Payload is obtained from the flash memory of the basic input and output system, and the first Payload is determined to be the second Payload.

[0015] The boot program loading method provided in this embodiment obtains the first Payload from the flash memory and determines it as the second Payload when the server is initialized for the first time if the Payload does not need to be updated, thereby ensuring the startup reliability of the system in the initial state.

[0016] In an optional implementation, the obtaining the previously loaded second Payload includes: In the case where the Payload has been loaded before, the Payload loaded most recently is obtained, and it is determined that the Payload loaded most recently is the second Payload.

[0017] The boot program loading method provided in this embodiment, when it is not the first time for the server to be initialized, if there is no need to update the Payload, the accuracy of the loaded Payload is ensured by obtaining the Payload loaded most recently and determining it as the second Payload.

[0018] In an optional implementation, before obtaining Coreboot from the flash memory of the basic input and output system, the method further includes: The Coreboot is set to execute so that when executing the Coreboot, after completing the initialization of the storage device of the baseboard management controller, a Payload update identifier is obtained from the storage device of the baseboard management controller; when the Payload update identifier is the first identifier, it is determined that the Payload needs to be updated, and the Payload to be updated is obtained from the storage device; after completing the initialization of the basic hardware devices of the server, the Payload to be updated is loaded to complete the startup boot of the operating system based on the Payload to be updated.

[0019] The boot program loading method provided in this embodiment ensures that the system is initialized according to the settings during the startup process by performing execution settings on Coreboot, thereby improving the reliability of system startup.

[0020] In an optional implementation, before obtaining Coreboot from the flash memory of the basic input and output system, the method further includes: In response to a Payload input operation, obtaining a Payload input by a user, and saving the Payload to a storage device of the baseboard management controller; In response to a Payload update operation, a Payload identifier to be updated is obtained, and based on the Payload identifier to be updated, the Payload update identifier is set as a first identifier.

[0021] The boot program loading method provided in this embodiment saves the Payload to the storage device of the baseboard management controller, responds to the Payload update operation, obtains the Payload identifier to be updated, and then sets the Payload update identifier based on the identifier, thereby realizing dynamic update of the Payload, simplifying the Payload update process, and reducing the server startup time.

[0022] In an optional embodiment, the method further includes: In the event that an error occurs during the process of loading the Payload to be updated, an error log is recorded so that the administrator can perform error processing based on the error log.

[0023] The boot program loading method provided in this embodiment improves the troubleshooting efficiency and enhances the system stability by recording an error log when an error occurs during the process of loading the Payload to be updated.

[0024] In an optional implementation, the loading the Payload to be updated includes: Performing integrity check on the Payload to be updated; If the integrity check of the Payload to be updated passes, the Payload to be updated is loaded.

[0025] The boot program loading method provided in this embodiment performs an integrity check on the Payload to be updated, and loads the Payload to be updated if the integrity check passes, thereby ensuring the accuracy of the loaded Payload to be updated and enhancing system security.

[0026] In an optional implementation, the Payload update identifier is set to the second identifier by default.

[0027] The boot program loading method provided in this embodiment ensures the stability of system initialization by setting the Payload update identifier to the second identifier by default.

[0028] In a second aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the boot program loading method of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0029] In a third aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the boot program loading method of the first aspect or any corresponding embodiment thereof.

[0030] In a fourth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the boot program loading method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0032] Figure 1 is a flowchart of a boot program loading method according to an embodiment of the present invention; Figure 2 is a flowchart of another boot program loading method according to an embodiment of the present invention; Figure 3 is a flowchart of another boot program loading method according to an embodiment of the present invention; Figure 4 is a schematic diagram of the structure of a server according to an embodiment of the present invention; Figure 5 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0033] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0034] With the development of server firmware, although UEFI BIOS-based system firmware is still the mainstream, the closed source and development difficulties of UEFI BIOS are becoming increasingly prominent. For large Internet service providers with large data centers, how to quickly meet business scenario requirements and achieve rapid development and maintenance of system firmware is particularly important. In order to achieve efficient server startup and rapid adaptation of business scenarios, an open source firmware solution based on Coreboot+Payload came into being. Among them, Coreboot is a lightweight firmware designed to replace BIOS or UEFI, used to initialize hardware and load the operating system.

[0035] In related technologies, the Coreboot+Payload open source firmware solution provides an overall boot framework and completes hardware initialization through the open source Coreboot code, and then boots the operating system through Payload to initialize the server. Compared with the traditional UEFI boot method, this open source firmware solution is faster and more efficient, and can be more quickly adapted to specific business scenarios.

[0036] The Coreboot+Payload open source firmware solution implements server initialization by integrating Payload into the Coreboot code in the form of a binary file, compiling to generate a binary file, flashing the binary file to the BIOS Flash (flash memory), and initializing the server by obtaining and executing the binary file from the BIOS Flash when the server starts.

[0037] However, when facing business scenario switching, since different business scenarios correspond to different Payload files, such as the Payload file used to boot the Linux system is Linuxboot, the current Coreboot+Payload open source firmware solution integrates the Payload file corresponding to the business scenario to be switched into the Coreboot code, recompiles it to obtain a new binary file, writes the new binary file to the BIOS Flash, and then restarts the machine to update the Payload file and switch the business scenario. This method is cumbersome and inconvenient, resulting in a long time for the server to start.

[0038] The embodiment of the present invention provides a boot program loading method, which directly obtains the Payload to be updated from the storage device when the Payload needs to be updated, and loads the Payload to be updated after completing the initialization of the basic hardware devices of the server, so as to complete the startup boot of the operating system based on the Payload to be updated, that is, complete the switching of the business scenario, without integrating the Payload to be updated into Coreboot and recompiling to obtain a new binary file, and then flashing the new binary file into the flash memory of the basic input and output system, and then restarting the computer to realize the update of the Payload to be updated and the switching of the business scenario, so as to simplify the update process of the Payload, realize the dynamic loading of the Payload, and reduce the startup time of the server.

[0039] According to an embodiment of the present invention, a boot program loading method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0040] In this embodiment, a boot program loading method is provided, which can be used for a server. Figure 1 is a flowchart of a boot program loading method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps: Step S101, after the server is powered on, Coreboot is obtained from the flash memory of the basic input and output system.

[0041] After the server is powered on, the central processing unit (CPU) in the server obtains the Coreboot firmware from the BIOS Flash.

[0042] Step S102, executing Coreboot to initialize basic hardware devices of the server.

[0043] After obtaining Coreboot, the CPU executes the Coreboot to initialize the basic hardware devices of the server.

[0044] The basic hardware equipment of the server includes CPU, memory and other key hardware.

[0045] Step S103, after completing the initialization of the storage device of the baseboard management controller, obtaining a Payload update identifier from the storage device of the baseboard management controller.

[0046] During the execution of the Coreboot, if the initialization of the storage device of the baseboard management controller (Baseboard Management Controller, referred to as: BMC) is completed, the Payload update identifier is obtained from the storage device of the baseboard management controller.

[0047] It should be noted that the storage device of the baseboard management controller can be a static random access memory (SRAM), or a BMC electrically erasable programmable read-only memory (EEPROM), a BMC trans flash (TF) card, a BMC virtual media, and a BMC shared memory.

[0048] Step S104: When the Payload update identifier is the first identifier, it is determined that the Payload needs to be updated, and the Payload to be updated is obtained from the storage device.

[0049] The first identifier may be 1, indicating that the Payload file is a binary file.

[0050] If the Payload update flag is 1, it indicates that the current scenario is a business scenario switching scenario and the Payload needs to be updated to implement the business scenario switching. Then, the Payload to be updated is obtained from the SRAM of the BMC.

[0051] Step S105, after completing the initialization of the basic hardware devices of the server, the Payload to be updated is loaded to complete the booting of the operating system based on the Payload to be updated.

[0052] After the basic hardware devices of the server are initialized by executing Coreboot, the acquired Payload to be updated is loaded, so as to complete the booting of the operating system by executing the Payload to be updated, that is, to complete the initialization and startup of the operating system.

[0053] The boot program loading method provided in this embodiment directly obtains the Payload to be updated from the storage device when the Payload needs to be updated, and loads the Payload to be updated after completing the initialization of the basic hardware devices of the server, so as to complete the startup boot of the operating system based on the Payload to be updated, that is, complete the switching of the business scenario. There is no need to integrate the Payload to be updated into Coreboot and recompile it to obtain a new binary file, and then flash the new binary file to the flash memory of the basic input and output system, and then restart the computer to realize the update of the Payload to be updated and the switching of the business scenario, which simplifies the update process of the Payload, realizes the dynamic loading of the Payload, and reduces the startup time of the server.

[0054] In this embodiment, a boot program loading method is provided, which can be used for a server. Figure 2 is a flowchart of a boot program loading method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps: Step S201, after the server is powered on, obtain Coreboot from the flash memory of the basic input and output system. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.

[0055] Step S202: Execute Coreboot to initialize the basic hardware devices of the server. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.

[0056] Step S203, after completing the initialization of the storage device of the baseboard management controller, obtain the Payload update identifier from the storage device of the baseboard management controller. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.

[0057] Step S204: When the Payload update identifier is the first identifier, it is determined that the Payload needs to be updated, and the Payload to be updated is obtained from the storage device.

[0058] Specifically, the above step S204 includes: Step S2041, obtaining the Payload identifier to be updated from the storage device.

[0059] When the Payload needs to be updated, the server obtains the Payload identifier to be updated from the BMC SRAM.

[0060] It should be noted that a storage device may store multiple payloads, each payload corresponding to a unique payload identifier. The user sends the payload and the payload identifier to be updated to the storage device of the BMC by sending an out-of-band command to the BMC.

[0061] Step S2042: based on the Payload identifier to be updated, obtain the Payload to be updated.

[0062] In which, when the Payload identifier to be updated is obtained, the Payload to be updated corresponding to the Payload identifier to be updated is obtained from the storage device according to the Payload identifier to be updated.

[0063] Step S205: After completing the initialization of the basic hardware devices of the server, the Payload to be updated is loaded to complete the booting of the operating system based on the Payload to be updated. Figure 1 Step S105 of the illustrated embodiment will not be described in detail here.

[0064] The boot program loading method provided in this embodiment obtains the Payload identifier to be updated from the storage device and obtains the Payload to be updated based on the identifier, thereby ensuring the update accuracy of the obtained Payload and improving system stability.

[0065] In some optional implementations, the above step S2042 includes: Step a1: Determine the storage address information of the payload to be updated based on the payload identifier to be updated.

[0066] When the Payload identifier to be updated is obtained, storage address information of the Payload to be updated corresponding to the Payload identifier to be updated in the storage device is determined according to the Payload identifier to be updated.

[0067] Step a2: Obtain the Payload to be updated based on the storage address information.

[0068] After the storage address information of the Payload to be updated in the storage device is obtained, the Payload to be updated is obtained from the storage device according to the storage address information.

[0069] The boot program loading method provided in this embodiment determines the storage address information based on the Payload identifier to be updated, and then obtains the Payload to be updated according to the storage address information, thereby ensuring the update accuracy of the Payload and improving the system security.

[0070] In some optional implementations, the boot program loading method further includes: Step b1: when the Payload update identifier is a first identifier and the Payload identifier to be updated is a first program identifier, obtain the first Payload from the flash memory of the basic input and output system.

[0071] The Payload update identifier is the first identifier, indicating that the Payload needs to be updated, and the Payload identifier to be updated is the first program identifier, indicating that the Payload to be updated is located in the BIOS Flash, and the first Payload is obtained from the BIOS Flash.

[0072] It should be noted that there is only one Payload in the BIOS Flash, namely the first Payload, which is flashed to the BIOS Flash in a manner known in the related art.

[0073] It should be further explained that, when the Payload update identifier is the first identifier, determining that the Payload needs to be updated and obtaining the Payload to be updated from the storage device includes: When the Payload update identifier is the first identifier and the Payload identifier to be updated is not the first program identifier, it is determined that the Payload needs to be updated and the Payload to be updated is located in the storage device of the BMC, and the Payload to be updated is obtained from the storage device according to the Payload identifier to be updated.

[0074] Step b2, after completing the initialization of the basic hardware devices of the server, load the first Payload to complete the startup boot of the operating system based on the first Payload.

[0075] After the first Payload is acquired and the basic hardware devices of the server are initialized, the first Payload is loaded to start and boot the operating system based on the first Payload.

[0076] The boot program loading method provided in this embodiment determines whether to obtain the Payload from the flash memory of the basic input and output system or from the storage device through the Payload update identifier and the Payload identifier to be updated, thereby ensuring the accuracy of the obtained Payload and further ensuring the accuracy of the Payload update.

[0077] In some optional implementations, the boot program loading method further includes: Step c1: when the Payload update identifier is the second identifier, it is determined that the Payload does not need to be updated, and the second Payload previously loaded is obtained.

[0078] The Payload update flag is the second flag, indicating that the current scenario is not a business scenario switching scenario, and it is determined that the Payload does not need to be updated, and the second Payload previously initialized and loaded by the server is obtained. The second flag can be 0.

[0079] Step c2, after completing the initialization of the basic hardware devices of the server, loading the second Payload to complete the booting of the operating system based on the second Payload.

[0080] When the second Payload is obtained and the initialization of the basic hardware devices of the server is completed, the obtained second Payload is loaded to complete the startup booting of the operating system based on the second Payload.

[0081] The boot program loading method provided in this embodiment determines whether the Payload needs to be updated through the Payload update identifier. When the Payload does not need to be updated, the second Payload loaded previously is obtained. After completing the initialization of the basic hardware devices of the server, the second Payload is loaded to complete the startup boot of the operating system, thereby improving system stability.

[0082] In some optional implementations, the above step c1 includes: Step c11: if no payload has been loaded before, obtain the first payload from the flash memory of the basic input and output system, and determine that the first payload is the second payload.

[0083] Among them, if the Payload does not need to be updated and the server is initialized for the first time, it means that the Payload has not been loaded before, then the first Payload is obtained from the BIOS Flash, and the first Payload is determined to be the second Payload, so that after completing the initialization of the basic hardware devices of the server, the second Payload is loaded, and based on the second Payload, the startup boot of the operating system is completed.

[0084] The boot program loading method provided in this embodiment obtains the first Payload from the flash memory and determines it as the second Payload when the server is initialized for the first time if the Payload does not need to be updated, thereby ensuring the startup reliability of the system in the initial state.

[0085] In some optional implementations, the above step c1 includes: Step c12: if the Payload has been loaded before, obtain the Payload loaded most recently, and determine that the Payload loaded most recently is the second Payload.

[0086] If the Payload does not need to be updated and the server is not initialized for the first time, it means that the Payload has been loaded before. In this case, the Payload loaded when the server was most recently initialized is obtained, that is, the Payload loaded most recently, and the Payload loaded most recently is determined to be the second Payload. After completing the initialization of the basic hardware devices of the server, the second Payload is loaded, and based on the second Payload, the startup boot of the operating system is completed.

[0087] The boot program loading method provided in this embodiment, when it is not the first time for the server to be initialized, if there is no need to update the Payload, the accuracy of the loaded Payload is ensured by obtaining the Payload loaded most recently and determining it as the second Payload.

[0088] In some optional implementations, before obtaining Coreboot from the flash memory of the basic input and output system, the boot program loading method further includes: Step d1, performs execution settings for Coreboot so that when executing Coreboot, after completing the initialization of the storage device of the baseboard management controller, a Payload update identifier is obtained from the storage device of the baseboard management controller; when the Payload update identifier is the first identifier, it is determined that the Payload needs to be updated, and the Payload to be updated is obtained from the storage device; after completing the initialization of the basic hardware devices of the server, the Payload to be updated is loaded to complete the startup boot of the operating system based on the Payload to be updated.

[0089] Among them, the execution setting of Coreboot includes that Coreboot and BMC agree to select an area in the SRAM area to store the Payload update identifier, Payload identifier and Payload. It also includes setting Coreboot so that when Coreboot is executed, after completing the initialization of the storage device of the baseboard management controller, the Payload update identifier is obtained from the storage device of the baseboard management controller; when the Payload update identifier is the first identifier, it is determined that the Payload needs to be updated, and the Payload to be updated is obtained from the storage device; after completing the initialization of the basic hardware devices of the server, the Payload to be updated is loaded to complete the startup boot of the operating system based on the Payload to be updated.

[0090] Coreboot is configured so that the boot program loading method shown in the above embodiment can be implemented when Coreboot is executed.

[0091] The boot program loading method provided in this embodiment ensures that the system is initialized according to the settings during the startup process by performing execution settings on Coreboot, thereby improving the reliability of system startup.

[0092] In some optional implementations, before obtaining Coreboot from the flash memory of the basic input and output system, the boot program loading method further includes: Step e1, in response to a Payload input operation, obtaining a Payload input by a user, and saving the Payload to a storage device of a baseboard management controller.

[0093] The user inputs the desired updated payload into the storage device of the baseboard management controller by sending an out-of-band command to the BMC, and the user assigns a unique payload identifier to the payload input into the storage device.

[0094] Step e2: In response to the Payload update operation, obtain the Payload identifier to be updated, and set the Payload update identifier as the first identifier based on the Payload identifier to be updated.

[0095] Among them, when the user faces a business scenario switch, the user sends the Payload identifier to be updated to the storage device of the baseboard management controller by sending an out-of-band command to the BMC. After the storage device of the baseboard management controller receives the Payload identifier to be updated, it sets the Payload update identifier to the first identifier and saves the Payload identifier to be updated.

[0096] The boot program loading method provided in this embodiment saves the Payload to the storage device of the baseboard management controller, responds to the Payload update operation, obtains the Payload identifier to be updated, and then sets the Payload update identifier based on the identifier, thereby realizing dynamic update of the Payload, simplifying the Payload update process, and reducing the server startup time.

[0097] In some optional implementations, the boot program loading method further includes: Step f1: If an error occurs during the process of loading the Payload to be updated, an error log is recorded so that the administrator can handle the error based on the error log.

[0098] If an error occurs in the process of loading the wrong system boot program to be updated, the server will record an error log, and the error log includes a timestamp, an error type, etc.

[0099] The administrator performs error handling based on the error log to accurately load the payload to be updated.

[0100] If an error occurs during the loading of the payload to be updated, error logging is performed, including: If an error occurs during the process of loading the Payload to be updated, retry to load the Payload to be updated; if the number of times of retrying to load the Payload to be updated exceeds a preset number threshold and an error still occurs, error logging is performed.

[0101] The preset number threshold is set by technical personnel based on experience.

[0102] It should be noted that, if the number of attempts to reload the Payload to be updated exceeds the preset number threshold and an error still occurs, the safe recovery mode is entered. In the safe recovery mode, the Payload to be updated is no longer loaded, the second Payload previously loaded is obtained, and after the basic hardware devices of the server are initialized, the second Payload is loaded to complete the booting of the operating system based on the second Payload.

[0103] It is understandable that when the number of attempts to reload the Payload to be updated exceeds the preset number threshold and an error still occurs, the administrator can be prompted by the error indicator light being always on or by instant messaging, so that the administrator can handle the error based on the prompt.

[0104] The boot program loading method provided in this embodiment improves the troubleshooting efficiency and enhances the system stability by recording an error log when an error occurs during the process of loading the Payload to be updated.

[0105] By entering the safe recovery mode when the number of attempts to reload the Payload to be updated exceeds the preset threshold and an error still occurs, the server cannot be started due to loading failure, thereby ensuring the reliability of the system.

[0106] By retrying to load the Payload to be updated if an error occurs during the process of loading the Payload to be updated, and recording an error log when the number of retries to load the Payload to be updated exceeds a preset threshold and an error still occurs, the accuracy of the error log recording is ensured and the system stability is improved.

[0107] In some optional implementations, the above step S205 includes: Step g1: perform integrity check on the payload to be updated.

[0108] After the Payload to be updated is obtained and the basic hardware equipment of the server is initialized, an integrity check is performed on the Payload to be updated to ensure the integrity of the obtained Payload to be updated.

[0109] Step g2: If the integrity check of the Payload to be updated passes, load the Payload to be updated.

[0110] If the integrity check of the Payload to be updated passes, it means that the Payload to be updated is complete and has not been tampered with, and the Payload to be updated can be loaded.

[0111] The boot program loading method provided in this embodiment performs an integrity check on the Payload to be updated, and loads the Payload to be updated if the integrity check passes, thereby ensuring the accuracy of the loaded Payload to be updated and enhancing system security.

[0112] In some optional implementations, the Payload update identifier is set to the second identifier by default.

[0113] The boot program loading method provided in this embodiment ensures the stability of system initialization by setting the Payload update identifier to the second identifier by default.

[0114] The embodiment of the present invention also provides a boot program loading method. Figure 3 is a flowchart of a boot program loading method according to an embodiment of the present invention, wherein the boot program loading method is described by taking the input of a Payload to be updated into the BMC SRAM and the server initialization for the first time as an example, such as Figure 3 As shown, the boot program loading method includes the following steps: Step 1: Coreboot and BMC agree to select an area in the SRAM area to store the Payload update identifier and Payload binary file.

[0115] It is understandable that in this embodiment, when a payload to be updated is input into the BMC SRAM, there is no need to send the payload identifier to the BMC.

[0116] Step 2: The user sends an out-of-band command to the BMC to pass the desired updated payload to the selected area, and sets the payload update flag to 1.

[0117] Step 3: Execute Coreboot to initialize the BMC SRAM in the early stage of server startup, so that the selected area in the SRAM area can be accessed.

[0118] Step 4: Execute Coreboot and determine whether the Payload update flag is 1.

[0119] If the Payload update flag is 1, Coreboot believes that a new Payload needs to be loaded from the BMC SRAM, so it reads the Paylaod file from the SRAM and then loads the Payload to boot the operating system.

[0120] If the Payload update flag is not 1, Coreboot believes that there is no need to load a new Payload from the BMC SRAM. It will read the Payload file from the BIOS Flash by default and then load the Payload to boot the operating system.

[0121] The detailed description of the process steps of the boot program loading method can be found in the corresponding description of the above embodiment, which will not be repeated here.

[0122] The boot program loading method provided in this embodiment is free from the constraints of the traditional UEFI boot method and the need to recompile when updating the Payload file. When updating the Payload file, it is no longer necessary to repackage the new Payload file into the Coreboot code for compilation, but only to pass the new Payload file to the BMC through an out-of-band command. By extending the storage location of the Payload file from BIOS Flash to external storage media such as BMC SRAM, the loading of the Payload file and the loading of Coreboot are decoupled. The Payload file no longer needs to compete with Coreboot for BIOS Flash space, and dynamic loading of the Payload file is achieved, which greatly shortens the time for users to update the Payload file. The same set of firmware programs can boot different operating systems by loading different Payload files, adapting to different business scenarios more quickly and efficiently.

[0123] It should be noted that the boot program loading method shown in the above embodiment is also applicable to the traditional firmware startup solution of UEFI+UEFIPayload. Since the UEFI startup firmware can only load UEFI Payload files, the boot program loading method of the present invention can be applied to load different UEFI Payload files.

[0124] The embodiment of the present invention further provides a server, Figure 4 is a schematic diagram of the structure of a server provided according to an embodiment of the present invention, such as Figure 4 As shown, the server includes: CPU, BIOS Flash, BMC, SRAM and BMC Flash. In this embodiment, a dual-core CPU server is used as an example, namely CPU0 and CPU2. Of course, the server can also be a server with a single CPU, four CPUs or more CPUs, and this embodiment does not make specific restrictions on this.

[0125] The descriptions of CPU, BIOS Flash, BMC, and SRAM are the same as those in the aforementioned boot program loading method, and will not be repeated here.

[0126] The server provided in this embodiment is used to implement the boot program loading method shown in the above embodiment, simplifies the update process of Payload, realizes dynamic loading of Payload, and reduces the startup time of the server.

[0127] The embodiment of the present invention also provides a computer device, see Figure 5 , Figure 5 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 5 As shown, the computer device includes: one or more processors 501, memory 502, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Each component utilizes different buses to communicate with each other, and can be installed on a common mainboard or installed in other ways as required. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 501 is taken as an example.

[0128] The processor 501 may be a central processing unit, a network processor or a combination thereof. The processor 501 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0129] The memory 502 stores instructions executable by at least one processor 501 , so that the at least one processor 501 executes the method shown in the above embodiment.

[0130] The memory 502 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 502 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 502 may optionally include a memory remotely arranged relative to the processor 501, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0131] The memory 502 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 502 may also include a combination of the above types of memory.

[0132] The computer device also includes a communication interface 503, which is used for the computer device to communicate with other devices or a communication network.

[0133] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0134] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0135] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A boot program loading method, characterized in that: The method comprises: After the server is powered on, Coreboot is obtained from the flash memory of the BIOS; Execute the Coreboot to initialize the basic hardware devices of the server; After completing the initialization of the storage device of the baseboard management controller, obtaining a Payload update identifier from the storage device of the baseboard management controller; When the Payload update identifier is the first identifier, it is determined that the Payload needs to be updated, and the Payload to be updated is obtained from the storage device; After completing the initialization of the basic hardware devices of the server, the Payload to be updated is loaded to complete the booting of the operating system based on the Payload to be updated.

2. The method according to claim 1, characterized in that: The acquiring the payload to be updated from the storage device includes: Obtaining a payload identifier to be updated from the storage device; Based on the Payload identifier to be updated, the Payload to be updated is obtained.

3. The method according to claim 2, characterized in that The acquiring the Payload to be updated based on the Payload identifier to be updated includes: Based on the Payload identifier to be updated, determine the storage address information of the Payload to be updated; Based on the storage address information, the Payload to be updated is obtained.

4. The method according to claim 1, characterized in that: The method further comprises: When the Payload update identifier is a first identifier and the Payload identifier to be updated is a first program identifier, obtaining a first Payload from a flash memory of the basic input and output system; After completing the initialization of the basic hardware devices of the server, the first Payload is loaded to complete the startup booting of the operating system based on the first Payload.

5. The method according to claim 1, characterized in that The method further comprises: When the Payload update identifier is the second identifier, it is determined that the Payload does not need to be updated, and the second Payload previously loaded is obtained; After completing the initialization of the basic hardware devices of the server, the second Payload is loaded to complete the booting of the operating system based on the second Payload.

6. The method according to claim 5, characterized in that The obtaining of the second payload previously loaded includes: In the case that no Payload has been loaded before, a first Payload is obtained from the flash memory of the basic input and output system, and the first Payload is determined to be the second Payload.

7. The method according to claim 5, characterized in that The obtaining of the second payload previously loaded includes: In the case where the Payload has been loaded before, the Payload loaded most recently is obtained, and it is determined that the Payload loaded most recently is the second Payload.

8. The method according to claim 1, characterized in that: Before obtaining Coreboot from the flash memory of the basic input and output system, the method further includes: The Coreboot is set to execute so that when executing the Coreboot, after completing the initialization of the storage device of the baseboard management controller, a Payload update identifier is obtained from the storage device of the baseboard management controller; when the Payload update identifier is the first identifier, it is determined that the Payload needs to be updated, and the Payload to be updated is obtained from the storage device; after completing the initialization of the basic hardware devices of the server, the Payload to be updated is loaded to complete the startup boot of the operating system based on the Payload to be updated.

9. The method according to claim 1, characterized in that: Before obtaining Coreboot from the flash memory of the basic input and output system, the method further includes: In response to a Payload input operation, obtaining a Payload input by a user, and saving the Payload to a storage device of the baseboard management controller; In response to a Payload update operation, a Payload identifier to be updated is obtained, and based on the Payload identifier to be updated, the Payload update identifier is set as a first identifier.

10. The method according to claim 1, characterized in that The method further comprises: In the event that an error occurs during the process of loading the Payload to be updated, an error log is recorded so that the administrator can perform error processing based on the error log.

11. The method according to claim 1, characterized in that The loading of the Payload to be updated includes: Performing integrity check on the Payload to be updated; If the integrity check of the Payload to be updated passes, the Payload to be updated is loaded.

12. The method according to claim 1, characterized in that The Payload update identifier is set to the second identifier by default.

13. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the boot program loading method according to any one of claims 1 to 12 by executing the computer instructions.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the boot program loading method according to any one of claims 1 to 12.

15. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to cause a computer to execute the boot program loading method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Baseboard management controller firmware fault recovery method, system, device and medium

    CN115576747A

  • Binary file dynamic loading method and device, electronic equipment and storage medium

    CN116841644A

  • Server quick starting system, method and equipment, medium and program product

    CN118567732A