Initialized firmware upgrading method and device, controller and storage medium
By automatically determining and upgrading the controller firmware version, the system failure caused by inefficiency in initial firmware upgrade and incompatibility in versions is solved, and an efficient and reliable firmware upgrade process is achieved.
Patent Information
- Application Number
- CN202510866351.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-07-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, initial firmware upgrades are inefficient and prone to system failures due to version incompatibility, mainly because manual compatibility confirmation is time-consuming and error-prone.
By automatically obtaining the controller firmware version number that initializes firmware depends on, determine whether it is necessary to upgrade. If it is inconsistent, upgrade the controller firmware first and then upgrade the initial firmware, and use the pre-built dependency relation database to improve compatibility judgment efficiency.
Improves the efficiency of initial firmware upgrades, avoids system failures, reduces manual intervention, and ensures version compatibility.
Smart Images

Figure CN120371365A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of server firmware management, and particularly to a method, apparatus, controller, and storage medium for upgrading initialization firmware. Background Art
[0002] In a server system, the initialization firmware is a key firmware component responsible for hardware initialization. With the continuous upgrade of hardware performance requirements, it is necessary to regularly upgrade the initialization firmware.
[0003] Currently, in related technologies, operation and maintenance personnel manually consult documents to confirm the compatibility issues of the initialization firmware version and perform upgrade operations. However, this method in related technologies not only consumes a large amount of time, resulting in reduced upgrade efficiency, but also is prone to errors in manual confirmation, leading to system failures due to incompatible versions after upgrade. Summary of the Invention
[0004] A method, apparatus, controller, and storage medium for upgrading initialization firmware are provided to at least solve the problems of low upgrade efficiency and system failures in related technologies.
[0005] This application provides a method for upgrading initialization firmware, including:
[0006] Responding to an initialization firmware upgrade operation triggered on a firmware upgrade page, obtaining an initialization firmware upgrade instruction; wherein the initialization firmware upgrade instruction carries an initialization firmware package;
[0007] Parsing the initialization firmware package to obtain the initialization firmware version number;
[0008] Obtaining a first controller firmware version number of the controller firmware on which the initialization firmware version number depends;
[0009] Obtaining a second controller firmware version number of the current controller firmware;
[0010] If the first controller firmware version number and the second controller firmware version number are inconsistent, upgrading the controller firmware according to the first controller firmware version number;
[0011] After the controller firmware upgrade is completed, upgrading the initialization firmware according to the initialization firmware package to complete the upgrade of the initialization firmware.
[0012] This application also provides an apparatus for upgrading initialization firmware, including:
[0013] A response module, configured to respond to an initialization firmware upgrade operation triggered on a firmware upgrade page, and obtain an initialization firmware upgrade instruction; wherein the initialization firmware upgrade instruction carries an initialization firmware package.
[0014] A parsing module, configured to parse the initialization firmware package to obtain the initialization firmware version number.
[0015] A first obtaining module, configured to obtain a first controller firmware version number of the controller firmware on which the initialization firmware version number depends.
[0016] A second obtaining module, configured to obtain a second controller firmware version number of the current controller firmware.
[0017] A first upgrading module, configured to upgrade the controller firmware according to the first controller firmware version number if the first controller firmware version number is inconsistent with the second controller firmware version number.
[0018] A second upgrading module, configured to upgrade the initialization firmware according to the initialization firmware package after the controller firmware upgrade is completed, and complete the upgrade of the initialization firmware.
[0019] The present application further provides a baseboard management controller, including: a memory, configured to store a computer program; a processor, configured to implement the steps of any of the above initialization firmware upgrade methods when executing the computer program.
[0020] The present application further provides a computer-readable storage medium, in which a computer program is stored, and wherein the computer program implements the steps of any of the above initialization firmware upgrade methods when executed by a processor.
[0021] The present application further provides a computer program product, including a computer program, and the computer program implements the steps of any of the above initialization firmware upgrade methods when executed by a processor.
[0022] Through the present application, in response to an initialization firmware upgrade operation triggered on a firmware upgrade page, after obtaining an initialization firmware upgrade instruction, according to the initialization firmware package carried in the initialization firmware upgrade instruction, the corresponding initialization firmware version number is obtained. Since the initialization firmware has a version dependency on the controller firmware, the first controller firmware version number of the controller firmware on which the initialization firmware version number depends is obtained; according to the first controller firmware version number and the second controller firmware version number of the current controller firmware, it is determined whether the controller firmware needs to be upgraded. If the first controller firmware version number is inconsistent with the second controller firmware version number, it means that the version number of the controller firmware on which the initialization firmware depends is inconsistent with the version number of the current controller firmware, and the current controller firmware needs to be upgraded according to the first controller firmware version number; after the controller firmware upgrade is completed, the initialization firmware is upgraded according to the initialization firmware package. On the one hand, the initialization firmware version compatibility problem is solved, and system failures are avoided; on the other hand, the above process does not require manual participation, improving the upgrade efficiency. Description of the Drawings
[0023] To more clearly illustrate the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0024] Figure 1 It is a hardware connection diagram of the upgrade method for the initialization firmware provided by the embodiments of the present application;
[0025] Figure 2 It is a schematic flowchart of the upgrade method for the initialization firmware provided by the embodiments of the present application;
[0026] Figure 3 It is a schematic structural diagram of the upgrade device for the initialization firmware provided by the embodiments of the present application;
[0027] Figure 4 It is a schematic structural diagram of the baseboard management controller provided by the embodiments of the present application. Specific embodiments
[0028] The following will clearly and completely describe the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the protection scope of the present application.
[0029] It should be noted that in the description of the present application, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects, rather than to describe a specific order or sequence.
[0030] In a server system, the initialization firmware is a key firmware component responsible for hardware initialization. As the hardware performance requirements continue to upgrade, it is necessary to upgrade the initialization firmware regularly. At present, in the related art, operation and maintenance personnel manually check documents to confirm the compatibility issues of the initialization firmware version and perform the upgrade operation. However, this method in the related art not only consumes a large amount of time, resulting in reduced upgrade efficiency on the one hand; on the other hand, manual confirmation is prone to errors, leading to system failures due to incompatible versions after the upgrade.
[0031] To solve the technical problems in the related art, the embodiments of the present application propose the following technical concepts: Since the initialization firmware has a version dependency on the controller firmware, automatically obtain the version number of the controller firmware on which the initialization firmware depends, and solve the problem of low upgrade efficiency caused by manually consulting documents to confirm the compatibility of the initialization firmware version; obtain the version number of the current controller firmware. If the version number of the current controller firmware is inconsistent with the version number of the controller firmware on which the initialization firmware depends, it means that the version of the current controller firmware is not compatible with the upgraded initialization firmware, and the current controller firmware needs to be upgraded. After the controller firmware upgrade is completed, then upgrade the initialization firmware to solve the errors that occur during manual confirmation and system failures caused by incompatibility of the upgraded version.
[0032] To enable those skilled in the art of the present technology to better understand the solution of the present application, the following further detailed description of the present application will be given in conjunction with the accompanying drawings and specific embodiments.
[0033] In combination with the specific application environment architecture or specific hardware architecture on which the execution of the upgrade method of the initialization firmware depends, the specific application environment architecture or specific hardware architecture will be described herein.
[0034] Refer to Figure 1 , Figure 1 is the hardware connection diagram of the upgrade method of the initialization firmware provided by the embodiment of the present application. As Figure 1 shown, it includes: Baseboard Management Controller (BMC) 101, firmware repository 102, Basic Input / Output System (BIOS) flash memory 103, and Complex Programmable Logic Device (CPLD) 104. Among them, the BMC is connected to the firmware repository through the Serial Peripheral Interface (SPI) bus, the BMC is connected to the BIOS flash memory through the SPI bus, and the BMC is connected to the CPLD through the Joint Test Action Group (JTAG) bus. In this embodiment, the initialization firmware is the BIOS, and the controller firmware is the CPLD.
[0035] Among them, the BMC includes a firmware parsing module, a dependency database, a firmware repository receiving module, a BIOS upgrade execution engine, and a CPLD upgrade execution engine. The firmware parsing module is used to parse the initialization firmware upgrade instruction to obtain the initialization firmware package and the initialization firmware version number; the dependency database is used to store the version mapping relationship between the BIOS and the dependent CPLD; the firmware repository receiving module is used to receive the controller firmware package downloaded from the firmware repository; the CPLD upgrade execution engine is used to upgrade the CPLD according to the controller firmware package; the BIOS upgrade execution engine is used to upgrade the BIOS according to the initialization firmware package.
[0036] Optionally, the CPLD upgrade execution engine and the BIOS upgrade execution engine need to ensure the atomicity and rollback ability of the upgrade process.
[0037] Figure 2 It is a schematic flowchart of the method for upgrading the initialization firmware provided by the embodiment of the present application. As Figure 2 shown, the embodiment of the present application provides a method for upgrading the initialization firmware, and the method is described in detail as follows:
[0038] S201: In response to the initialization firmware upgrade operation triggered on the firmware upgrade page, obtain the initialization firmware upgrade instruction; the initialization firmware upgrade instruction carries the initialization firmware package.
[0039] In this embodiment, the initialization firmware is the BIOS, and the controller firmware is the CPLD.
[0040] In this embodiment, the user or the system inputs the instruction for initializing the firmware upgrade on the firmware upgrade page, triggers the initialization firmware upgrade operation, and the BMC obtains the BIOS upgrade instruction.
[0041] S202: Parse the initialization firmware package to obtain the initialization firmware version number.
[0042] Specifically, parse the format type of the initialization firmware package; according to the format type of the initialization firmware package, parse the metadata area in the initialization firmware package; obtain the initialization firmware version number from the metadata area.
[0043] In this embodiment, the firmware parsing module is responsible for parsing the initialization firmware package.
[0044] Specifically, since the initialization firmware packages from different sources may adopt different format specifications, it is necessary to detect the file extension and file header characteristics of the initialization firmware package to determine its format type, so as to perform targeted parsing.
[0045] S203: Obtain the first controller firmware version number of the controller firmware on which the initialization firmware version number depends.
[0046] In this embodiment, step S203 includes steps S2031 to S2037:
[0047] S2031: Start the database connection program, and establish a connection with the pre-built dependency database by calling the database interface.
[0048] In this embodiment, start the database connection program, select an appropriate database driver according to the configuration information by calling the database interface, initialize the connection parameters after loading the database driver, and establish a connection with the pre-built dependency database. Optionally, the connection parameters include the database file path, connection timeout time, character encoding, etc.
[0049] S2032: During the connection establishment process, perform permission verification to check whether there is the read permission for the pre-built dependency database.
[0050] In this embodiment, during the connection establishment process, first check whether there is the read permission for the pre-built dependency database. If there is no read permission for the pre-built dependency database, generate a permission error report; if there is the read permission for the pre-built dependency database, continue to execute the subsequent steps.
[0051] S2033: If there is the read permission for the pre-built dependency database and the connection with the pre-built dependency database is successfully established, preprocess the initialized firmware version number to obtain the preprocessed initialized firmware version number.
[0052] Optionally, if there is the read permission for the pre-built dependency database but the connection with the pre-built dependency database fails, retry the connection, and record information such as the number of retries and timestamp each time for subsequent analysis of the reason for the connection failure.
[0053] In this embodiment, preprocessing the initialized firmware version number includes: removing possible whitespace characters at both ends of the initialized firmware version number, such as spaces, tabs, and line breaks. Optionally, string processing functions can be used for removal. Uniformly convert the initialized firmware version number into the same case form as the storage format in the pre-built dependency database to avoid query failure due to case mismatch.
[0054] S2034: Generate a query statement in a parameterized query manner according to the preprocessed initialized firmware version number.
[0055] Specifically, according to the preprocessed initialized firmware version number, construct a query statement, and in a parameterized query manner, pass the preprocessed initialized firmware version number as a parameter into the placeholder in the query statement to generate a query statement.
[0056] Optionally, perform a syntax check on the query statement to ensure that the query statement conforms to the syntax rules. If there are syntax errors, error prompt messages will be generated, recorded in the log, and the operation of executing the query statement will be stopped, and the query statement will be regenerated.
[0057] S2035: Execute the query statement to obtain the version mapping relationship corresponding to the initialized firmware version number from the pre-built dependency database.
[0058] In this embodiment, multiple version mapping relationships are stored in the pre-built dependency database. Each version mapping relationship includes the initialized firmware version number and the controller firmware version number, and there is a dependency relationship between the initialized firmware version number and the controller firmware version number.
[0059] In this embodiment, the query statement is sent to the database engine of the pre-built dependency database. After receiving the query statement, the database engine checks whether there is an index for the initialized firmware version number field. If there is an index, the index will be used to quickly locate the data; if there is no index, a full table scan will be performed. During the execution of the query statement, the database engine will monitor the execution time and resource occupancy of the query. If the query execution time is too long, a warning message will be issued and an attempt will be made to optimize the query execution plan. After the query is completed, the version mapping relationship corresponding to the initialized firmware version number is obtained.
[0060] S2036: Determine whether the version mapping relationship is empty.
[0061] In this embodiment, if the version mapping relationship is empty, it means that there is no dependent controller firmware for the initialized firmware version number. Therefore, the initialized firmware can be directly upgraded according to the initialized firmware package carried in the initialized firmware upgrade instruction.
[0062] S2037: If it is determined that the version mapping relationship is not empty, obtain the first controller firmware version number of the controller firmware on which the initialized firmware version number depends from the version mapping relationship.
[0063] In this embodiment, if the version mapping relationship is not empty, it means that there is dependent controller firmware for the initialized firmware version number.
[0064] In this embodiment, the version mapping relationship also includes the check value of the controller firmware.
[0065] S204: Obtain the second controller firmware version number of the current controller firmware.
[0066] In this embodiment, the second controller firmware version number of the current controller firmware is obtained through the Inter-Integrated Circuit (IIC).
[0067] S205: If the firmware version numbers of the first controller and the second controller are inconsistent, upgrade the controller firmware according to the firmware version number of the first controller.
[0068] Specifically, step S205 includes S2051 to S2053:
[0069] S2051: If the firmware version numbers of the first controller and the second controller are inconsistent, send a controller firmware download request to the firmware repository according to the firmware version number of the first controller, so that the firmware repository downloads the controller firmware package corresponding to the firmware version number of the first controller according to the controller firmware download request.
[0070] In this embodiment, if the firmware version numbers of the first controller and the second controller are inconsistent, it means that the version number of the controller firmware on which the initialization firmware depends is inconsistent with the current controller firmware version, and it is necessary to download the controller firmware on which the initialization firmware depends from the firmware repository.
[0071] In this embodiment, the first controller firmware version number is carried in the controller firmware download request.
[0072] Specifically, send the controller firmware download request to the firmware repository, so that the firmware repository downloads the corresponding controller firmware package according to the first controller firmware version number carried in the controller firmware download request.
[0073] S2052: Receive the controller firmware package sent by the firmware repository.
[0074] In this embodiment, receive the controller firmware package sent by the firmware repository through the SPI bus.
[0075] In this embodiment, the firmware repository receiving module is used to receive the controller firmware package sent by the firmware repository.
[0076] S2053: Upgrade the controller firmware according to the controller firmware package.
[0077] In this embodiment, before upgrading the controller firmware, it is also necessary to verify whether the controller firmware package is correct. Specifically, calculate the check value of the controller firmware package; obtain the check value of the controller firmware on which the initialization firmware depends from the mapping relationship according to step S2037; compare the two check values. If the two check values are the same, it means that the controller firmware package downloaded from the firmware repository is correct, ensuring that the upgraded is the controller firmware on which the initialization firmware depends and avoiding system failures caused by version compatibility issues.
[0078] In this embodiment, write the controller firmware package into the controller firmware through the JTAG bus to upgrade the controller firmware.
[0079] In this embodiment, the execution engine is upgraded through the CPLD to upgrade the controller firmware.
[0080] In this embodiment, if the first controller firmware version number is the same as the second controller firmware version number, the initialization firmware is upgraded according to the initialization firmware package to complete the upgrade of the initialization firmware.
[0081] In this embodiment, if the first controller firmware version number is the same as the second controller firmware version number, it indicates that the version of the controller firmware on which the initialization firmware depends is the same as the current controller firmware version. There is no need to perform an upgrade operation on the current controller firmware. Instead, the initialization firmware is directly upgraded according to the initialization firmware package to complete the upgrade of the initialization firmware.
[0082] S206: After the controller firmware upgrade is completed, the initialization firmware is upgraded according to the initialization firmware package to complete the upgrade of the initialization firmware.
[0083] In this embodiment, the initialization firmware package is written into the initialization firmware flash through the SPI bus to upgrade the initialization firmware and complete the upgrade of the initialization firmware.
[0084] In this embodiment, the initialization firmware is upgraded through the BIOS upgrade execution engine.
[0085] In this embodiment, during the upgrade process of the initialization firmware, the upgrade process of the initialization firmware is recorded through a log and an upgrade operation report is generated.
[0086] In summary, in response to the initialization firmware upgrade operation triggered on the firmware upgrade page, after obtaining the initialization firmware upgrade instruction, the corresponding initialization firmware version number is obtained according to the initialization firmware package carried in the initialization firmware upgrade instruction. Since the initialization firmware has a version dependency on the controller firmware, the first controller firmware version number of the controller firmware on which the initialization firmware version number depends is obtained; according to the first controller firmware version number and the second controller firmware version number of the current controller firmware, it is determined whether the controller firmware needs to be upgraded. If the first controller firmware version number is different from the second controller firmware version number, it indicates that the version number of the controller firmware on which the initialization firmware depends is different from the current controller firmware version number, and the current controller firmware needs to be upgraded according to the first controller firmware version number; after the controller firmware upgrade is completed, the initialization firmware is upgraded according to the initialization firmware package. On the one hand, the initialization firmware version compatibility problem is solved, and system failures are avoided; on the other hand, the above process does not require manual participation, improving the upgrade efficiency.
[0087] Based on the above embodiments, in this embodiment, the process of pre - constructing a dependency database is introduced in detail as follows:
[0088] S301: Create an initial dependency database.
[0089] In this embodiment, the table structure and table fields of the initial dependency database are designed to create the initial dependency database.
[0090] Optionally, the table fields include but are not limited to the initialization firmware version number, the controller firmware version number, and the check value of the controller firmware.
[0091] S302: Collect the initialization firmware version set, where the initialization firmware version set includes multiple initialization firmware version numbers.
[0092] Optionally, multiple initialization version numbers can be obtained through an open - source website to obtain the initialization firmware version set.
[0093] S303: Determine the controller firmware version number that each initialization firmware version number depends on, and establish a version mapping relationship set between the initialization firmware and the controller firmware.
[0094] In this embodiment, a version compatibility test is performed on each initialization firmware version number with the controller firmware to determine the controller firmware version number that each initialization firmware version number depends on; a version mapping relationship is established between each initialization firmware version number and the controller firmware version number that it depends on to obtain a version mapping relationship. After the version compatibility tests of all initialization firmware version numbers are completed, a version mapping relationship set is obtained.
[0095] In this embodiment, in each version mapping relationship, the corresponding check value of the controller firmware is added, and this check value is used to verify whether the controller firmware package downloaded from the firmware repository is correct.
[0096] S304: Save the version mapping relationship set to the initial dependency database to obtain the pre - constructed dependency database.
[0097] Exemplarily, Table 1 is an example of the version mapping relationship provided by the embodiments of the present application. As shown in Table 1, if the initialization firmware version number is V1.0, the corresponding version mapping relationship is: the initialization firmware version number is V1.0, the controller firmware version number it depends on is V1.0.3, and the check value of the controller firmware is 23798639342.
[0098] Table 1 Example of Version Mapping Relationship
[0099]
[0100] In summary, by pre - constructing a dependency database and obtaining the pre - constructed dependency database, the speed of obtaining the first controller firmware version number of the controller firmware on which the initialization firmware depends can be improved, thereby improving the upgrade efficiency.
[0101] Based on the above - mentioned embodiments, in this embodiment, the process of version verification after the controller firmware upgrade is introduced in detail as follows:
[0102] S401: Re - obtain the third controller firmware version number of the current controller firmware.
[0103] In this embodiment, after the controller firmware upgrade is completed, the current controller firmware is the upgraded controller firmware. Re - obtaining the third controller firmware version number of the current controller firmware is used to verify whether the upgrade is successful.
[0104] S402: If the first controller firmware version number is the same as the third controller firmware version number, then upgrade the initialization firmware according to the initialization firmware package to complete the upgrade of the initialization firmware.
[0105] In this embodiment, the first controller firmware version number is the version number of the controller firmware on which the initialization firmware depends, and the third controller firmware version number is the version number of the upgraded controller firmware. Comparing the first controller firmware version number with the third controller firmware version number, if they are the same, it means that the controller firmware upgrade is successful, and the upgrade of the initialization firmware can continue.
[0106] Optionally, after the upgrade of the initialization firmware is completed, verify again whether the controller firmware on which the upgraded initialization firmware depends is the upgraded controller firmware.
[0107] In summary, comparing the third controller firmware version number of the upgraded controller firmware with the first controller firmware version number, if they are the same, it means that the controller firmware upgrade is successful, ensuring version compatibility after the initialization firmware upgrade, thereby avoiding system failures.
[0108] Through the description of the above - mentioned implementation manners, those skilled in the art can clearly understand that the method according to the above - mentioned embodiments can be implemented by means of software plus a necessary general - purpose hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation manner.
[0109] Figure 3 This is a schematic structural diagram of the upgrade device for the initialization firmware provided by the embodiments of the present application. As Figure 3As shown in the figure, an embodiment of the present application further provides an initialization firmware upgrade device, including: a response module 301, a parsing module 302, a first acquisition module 303, a second acquisition module 304, a first upgrade module 305, and a second upgrade module 306.
[0110] The response module 301 is configured to respond to an initialization firmware upgrade operation triggered on the firmware upgrade page, and obtain an initialization firmware upgrade instruction; wherein the initialization firmware upgrade instruction carries an initialization firmware package.
[0111] The parsing module 302 is configured to parse the initialization firmware package to obtain an initialization firmware version number.
[0112] The first acquisition module 303 is configured to obtain a first controller firmware version number of the controller firmware on which the initialization firmware version number depends.
[0113] The second acquisition module 304 is configured to obtain a second controller firmware version number of the current controller firmware.
[0114] The first upgrade module 305 is configured to, if the first controller firmware version number and the second controller firmware version number are inconsistent, upgrade the controller firmware according to the first controller firmware version number.
[0115] The second upgrade module 306 is configured to, after the controller firmware upgrade is completed, upgrade the initialization firmware according to the initialization firmware package to complete the upgrade of the initialization firmware.
[0116] In a possible implementation manner, the first upgrade module 305 includes:
[0117] The download unit is configured to, if the first controller firmware version number and the second controller firmware version number are inconsistent, send a controller firmware download request to the firmware repository according to the first controller firmware version number, so that the firmware repository downloads the controller firmware package corresponding to the first controller firmware version number according to the controller firmware download request.
[0118] The receiving unit is configured to receive the controller firmware package sent by the firmware repository.
[0119] The first upgrade unit is configured to upgrade the controller firmware according to the controller firmware package.
[0120] In a possible implementation manner, the initialization firmware upgrade device further includes a third upgrade module, specifically configured to, if the first controller firmware version number and the second controller firmware version number are consistent, upgrade the initialization firmware according to the initialization firmware package to complete the upgrade of the initialization firmware.
[0121] In a possible implementation manner, the first acquisition module 303 includes:
[0122] A connection unit for starting a database connection program, establishing a connection with a pre-built dependency database by calling a database interface;
[0123] An inspection unit for performing permission verification during the connection establishment process to check whether there is permission to read the pre-built dependency database;
[0124] A preprocessing unit for preprocessing the initial firmware version number to obtain a preprocessed initial firmware version number if there is permission to read the pre-built dependency database and a connection with the pre-built dependency database is successfully established;
[0125] A generation unit for generating a query statement in a parameterized query manner based on the preprocessed initial firmware version number;
[0126] A first acquisition unit for executing the query statement to obtain the version mapping relationship corresponding to the initial firmware version number from the pre-built dependency database;
[0127] A judgment unit for judging whether the version mapping relationship is empty;
[0128] A second acquisition unit for obtaining the first controller firmware version number of the controller firmware on which the initial firmware version number depends from the version mapping relationship if it is determined that the version mapping relationship is not empty.
[0129] In a possible implementation manner, the upgrade device of the initial firmware further includes a construction module, and the construction module includes:
[0130] A creation unit for creating an initial dependency database;
[0131] An acquisition unit for acquiring a set of initial firmware versions, where the set of initial firmware versions includes multiple initial firmware version numbers;
[0132] A determination unit for determining the controller firmware version numbers on which each initial firmware version number depends and establishing a set of version mapping relationships between the initial firmware and the controller firmware;
[0133] A third acquisition unit for saving the set of version mapping relationships to the initial dependency database to obtain a pre-built dependency database.
[0134] In a possible implementation manner, the parsing module 302 includes:
[0135] A first parsing unit for parsing the format type of the initial firmware package;
[0136] A second parsing unit for parsing the metadata area in the initial firmware package according to the format type of the initial firmware package;
[0137] A fourth acquisition unit, configured to acquire the initialization firmware version number from the metadata area.
[0138] In a possible implementation manner, the initialization firmware upgrade device further includes a judgment module, and the judgment module includes:
[0139] A fifth acquisition unit, configured to re-acquire the third controller firmware version number of the current controller firmware;
[0140] A second upgrade unit, configured to upgrade the initialization firmware according to the initialization firmware package if the first controller firmware version number is the same as the third controller firmware version number, and complete the upgrade of the initialization firmware.
[0141] For the description of the features in the embodiments corresponding to the initialization firmware upgrade device, reference may be made to the relevant descriptions of the embodiments corresponding to the initialization firmware upgrade method, which will not be elaborated here one by one.
[0142] Figure 4 It is a schematic structural diagram of a baseboard management controller provided by an embodiment of the present application. As Figure 4 shown, the baseboard management controller provided in this embodiment includes at least one processor 401 and a memory 402. Optionally, the baseboard management controller further includes a communication component 403. Among them, the processor 401, the memory 402, and the communication component 403 are connected through a bus.
[0143] In a specific implementation process, at least one processor 401 executes computer execution instructions stored in the memory 402, so that at least one processor 401 executes the above-mentioned embodiment of the initialization firmware upgrade method.
[0144] For the specific implementation process of the processor 401, reference may be made to the above method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here in this embodiment.
[0145] In the above embodiment, it should be understood that the processor may be a central processing unit (Central Processing Unit, abbreviated as: CPU), or may also be other general-purpose processors, digital signal processors (Digital Signal Processor, abbreviated as: DSP), application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as: ASIC), etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the application can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
[0146] The memory may include a random access memory (RAM), and may also include a non-volatile memory (NVM), such as at least one disk memory.
[0147] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, the buses in the drawings of this application are not limited to only one bus or one type of bus.
[0148] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored, and the computer program is configured to execute the steps in any of the above embodiments of the method for upgrading the initialization firmware when running.
[0149] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disc, and other various media that can store computer programs.
[0150] An embodiment of the present application also provides a computer program product, the above computer program product includes a computer program, and when the computer program is executed by a processor, the steps in any of the above embodiments of the method for upgrading the initialization firmware are implemented.
[0151] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above embodiments of the method for upgrading the initialization firmware are implemented.
[0152] Those skilled in the art may further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered as exceeding the scope of this application.
[0153] The above has introduced in detail a method, apparatus, controller, and storage medium for upgrading initialization firmware provided by this application. Specific examples are used herein to illustrate the principle and implementation manner of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application. It should be noted that for those of ordinary skill in the art, without departing from the principle of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A method for upgrading initialization firmware, characterized in that Including: Upon triggering an initialization firmware upgrade operation on the firmware upgrade page, obtain an initialization firmware upgrade instruction; Wherein the initialization firmware upgrade instruction carries an initialization firmware package; Parse the initialization firmware package to obtain an initialization firmware version number; Obtain a first controller firmware version number of the controller firmware on which the initialization firmware version number depends; Obtain a second controller firmware version number of the current controller firmware; If the first controller firmware version number and the second controller firmware version number are inconsistent, upgrade the controller firmware according to the first controller firmware version number; After the controller firmware upgrade is completed, upgrade the initialization firmware according to the initialization firmware package to complete the upgrade of the initialization firmware.
2. The method according to claim 1, characterized in that, The step of "if the first controller firmware version number and the second controller firmware version number are inconsistent, upgrade the controller firmware according to the first controller firmware version number" includes: If the first controller firmware version number and the second controller firmware version number are inconsistent, send a controller firmware download request to the firmware repository according to the first controller firmware version number, so that the firmware repository downloads the controller firmware package corresponding to the first controller firmware version number according to the controller firmware download request; Receive the controller firmware package sent by the firmware repository; Upgrade the controller firmware according to the controller firmware package.
3. The method according to claim 1, wherein After obtaining the second controller firmware version number of the current controller firmware, it further includes: If the first controller firmware version number and the second controller firmware version number are consistent, upgrade the initialization firmware according to the initialization firmware package to complete the upgrade of the initialization firmware.
4. The method according to claim 1, characterized in that, The step of "obtain a first controller firmware version number of the controller firmware on which the initialization firmware version number depends" includes: Start a database connection program, establish a connection with a pre-built dependency database by calling a database interface; During the connection establishment process, perform permission verification to check whether the read permission of the pre-built dependency database is available; If the read permission of the pre-built dependency database is available and the connection with the pre-built dependency database is successfully established, preprocess the initialization firmware version number to obtain a preprocessed initialization firmware version number; Generate a query statement by using a parameterized query method according to the preprocessed initialization firmware version number; Execute the query statement to obtain the version mapping relationship corresponding to the initialization firmware version number from the pre-built dependency database; Judge whether the version mapping relationship is empty; If it is determined that the version mapping relationship is not empty, obtain a first controller firmware version number of the controller firmware on which the initialization firmware version number depends from the version mapping relationship.
5. The method according to claim 4, wherein Before triggering the initialization firmware upgrade operation on the firmware upgrade page, it further includes: Create an initial dependency database; Collect an initialization firmware version set, where the initialization firmware version set includes multiple initialization firmware version numbers; Determine the controller firmware version numbers on which each initialization firmware version number depends, and establish a set of version mapping relationships between the initialization firmware and the controller firmware; Save the set of version mapping relationships to the initial dependency database to obtain a pre-built dependency database.
6. The method according to claim 1, wherein Parsing the initialization firmware package to obtain the initialization firmware version number includes: Parse the format type of the initialization firmware package; Parse the metadata area in the initialization firmware package according to the format type of the initialization firmware package; Obtain the initialization firmware version number from the metadata area.
7. The method according to any one of claims 1-6, characterized in that, After the controller firmware upgrade is completed, it further includes: Re-obtain the third controller firmware version number of the current controller firmware; If the first controller firmware version number is the same as the third controller firmware version number, upgrade the initialization firmware according to the initialization firmware package to complete the upgrade of the initialization firmware.
8. An upgrade device for initializing firmware, characterized in that, It includes: A response module for obtaining an initialization firmware upgrade instruction in response to an initialization firmware upgrade operation triggered on the firmware upgrade page; Wherein the initialization firmware upgrade instruction carries an initialization firmware package; A parsing module for parsing the initialization firmware package to obtain the initialization firmware version number; A first acquisition module for acquiring the first controller firmware version number of the controller firmware on which the initialization firmware version number depends; A second acquisition module for acquiring the second controller firmware version number of the current controller firmware; A first upgrade module for upgrading the controller firmware according to the first controller firmware version number if the first controller firmware version number is different from the second controller firmware version number; A second upgrade module for upgrading the initialization firmware according to the initialization firmware package after the controller firmware upgrade is completed to complete the upgrade of the initialization firmware.
9. A baseboard management controller, characterized in that, It includes: A memory for storing computer programs; A processor for implementing the steps of the initialization firmware upgrade method according to any one of claims 1-7 when executing the computer program.
10. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, wherein the computer program implements the steps of the initialization firmware upgrade method according to any one of claims 1-7 when executed by a processor.
Citation Information
Patent Citations
Server firmware upgrading method, storage device and terminal
CN114115984A
Firmware security upgrading system, method and device based on BMC (Baseboard Management Controller) and medium
CN115098867A
Firmware upgrading method and device, equipment and medium
CN116149709A
Cluster firmware combination upgrading method and system, terminal and storage medium
CN116880872A
Upgrading method of server management system, product, equipment and medium
CN120010890A
Cited By
Processor firmware update processing method and electronic equipment
CN121349749A