Firmware parameter configuration method, device, baseboard management controller and storage medium
By adding compatibility values to the configuration file of the substrate management controller, the compatibility between the old firmware configuration file and the new firmware configuration file is determined, and the compatibility problem during firmware upgrade of the substrate management controller is solved, and the reliability of firmware upgrade is improved.
Patent Information
- Application Number
- CN202210184076.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-24
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2042-02-24
AI Technical Summary
When the baseboard management controller is upgraded, the old version configuration file cannot be compatible with the new version of the firmware, resulting in an upgrade error and affecting normal operation.
Add compatibility value to the configuration file, and determine whether the compatibility value in the default configuration file of the old firmware is the same as that of the new firmware. Only use the current configuration file to configure the new firmware when compatible.
It effectively improves the reliability of the firmware upgrade of the substrate management controller, avoids upgrade errors, and ensures the normal operation of the controller.
Smart Images

Figure CN114546476B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of baseboard management controllers, and in particular to a firmware parameter configuration method and device, a baseboard management controller and a computer-readable storage medium. Background Art
[0002] In the related art, when the baseboard management controller performs a firmware upgrade, it will use the configuration file of the previous firmware to configure the firmware parameters of the new firmware. However, user needs may change, and the new firmware of the baseboard management controller may also have design defects, which may easily cause the old version of the configuration file to be incompatible with the new version of the firmware, which may cause the baseboard management controller to upgrade incorrectly and affect the normal operation of the controller. Summary of the invention
[0003] The purpose of the present invention is to provide a firmware parameter configuration method, device, baseboard management controller and computer-readable storage medium, which can add a compatibility value in a configuration file, and determine the compatibility between the previous version of the configuration file and the new firmware based on the compatibility value. The configuration file is used to configure the new firmware only when they are compatible, which can effectively improve the reliability of the baseboard management controller firmware upgrade.
[0004] In order to solve the above technical problems, the present invention provides a firmware parameter configuration method, which is applied to a baseboard management controller, and the method comprises:
[0005] When the new firmware upgrade is completed, obtain the current configuration file of the old firmware and the default configuration file of the new firmware;
[0006] Searching for a first compatible value in the current configuration file and a second compatible value in the default configuration file;
[0007] If the first compatible value is the same as the second compatible value, parameter configuration of the new firmware is performed using the current configuration file or a combination of the current configuration file and the default configuration file;
[0008] If the first compatibility value is different from the second compatibility value, the parameter configuration of the new firmware is performed using the default configuration file.
[0009] Optionally, after searching the first compatible value in the current configuration file and the second compatible value in the default configuration file, the method further includes:
[0010] If the first compatible value cannot be found, the default configuration file is used to perform parameter configuration on the new firmware.
[0011] Optionally, the performing parameter configuration on the new firmware by using a combination of the current configuration file and the default configuration file includes:
[0012] Setting the first configuration item in the default configuration file as the item to be configured;
[0013] Searching for a first item compatible value of the item to be configured in the current configuration file and a second item compatible value in the default configuration file;
[0014] Determining whether the first item compatibility value and the second item compatibility value are the same;
[0015] If yes, the parameter configuration is performed using the configuration item in the current configuration file corresponding to the item to be configured;
[0016] If not, the parameter configuration is performed using the item to be configured;
[0017] The to-be-configured item is updated to the next configuration item in the default configuration file, and the step of searching for the first item compatible value of the to-be-configured item in the current configuration file and the second item compatible value in the default configuration file is entered until all configuration items in the default configuration file are configured.
[0018] Optionally, after searching for the first item compatibility value of the item to be configured in the current configuration file and the second item compatibility value in the default configuration file, the method further includes:
[0019] If the first item compatible value cannot be found in the current configuration file, the firmware parameter configuration is performed using the item to be configured.
[0020] The present invention also provides a firmware parameter configuration device, comprising:
[0021] An acquisition module, used to acquire the current configuration file of the old firmware and the default configuration file of the new firmware when the new firmware upgrade is completed;
[0022] A search module, used for searching the first compatible value in the current configuration file and the second compatible value in the default configuration file;
[0023] a first configuration module, configured to perform parameter configuration on the new firmware using the current configuration file or a combination of the current configuration file and the default configuration file if the first compatibility value is the same as the second compatibility value;
[0024] The second configuration module is configured to use the default configuration file to perform the parameter configuration on the new firmware if the first compatibility value is different from the second compatibility value.
[0025] Optionally, it also includes:
[0026] The third configuration module is used to use the default configuration file to perform parameter configuration on the new firmware if the first compatible value cannot be found.
[0027] Optionally, the first configuration module includes:
[0028] A setting unit, used to set the first configuration item in the default configuration file as the item to be configured;
[0029] A searching unit, configured to search for a first item compatibility value of the to-be-configured item in the current configuration file and a second item compatibility value in the default configuration file;
[0030] a judging unit, configured to judge whether the first item compatibility value and the second item compatibility value are the same;
[0031] A first configuration unit, configured to perform the parameter configuration using the configuration item corresponding to the item to be configured in the current configuration file;
[0032] A second configuration unit, configured to, if no, perform the parameter configuration using the item to be configured;
[0033] An updating unit is used to update the to-be-configured item to the next configuration item in the default configuration file, and enter the step of searching for the first item compatible value of the to-be-configured item in the current configuration file and the second item compatible value in the default configuration file until all configuration items in the default configuration file are configured.
[0034] Optionally, the first configuration module further includes:
[0035] The third configuration unit is configured to use the item to be configured to configure the firmware parameters if the compatible value of the first item cannot be found in the current configuration file.
[0036] The present invention also provides a baseboard management controller, comprising:
[0037] Memory for storing computer programs;
[0038] A processor is used to implement the firmware parameter configuration method as described above when executing the computer program.
[0039] The present invention also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are loaded and executed by a processor, the firmware parameter configuration method as described above is implemented.
[0040] The present invention provides a firmware parameter configuration method, which is applied to a baseboard management controller. The method comprises: when a new firmware upgrade is completed, obtaining a current configuration file of the old firmware and a default configuration file of the new firmware; searching for a first compatibility value in the current configuration file and a second compatibility value in the default configuration file; if the first compatibility value is the same as the second compatibility value, performing parameter configuration on the new firmware using the current configuration file or a combination of the current configuration file and the default configuration file; if the first compatibility value is different from the second compatibility value, performing parameter configuration on the new firmware using the default configuration file.
[0041] It can be seen that after completing the new firmware upgrade, the present invention will first obtain the current configuration file used by the old firmware and the default configuration file built into the new firmware, and search for the first compatible value in the current configuration file and the second compatible value in the default configuration file; then, the present invention will automatically determine whether the two compatible values are the same. If they are the same, the new firmware will be configured with parameters using the current configuration file or a combination of the current configuration file and the default configuration file. If they are different, the new firmware will be configured with parameters using the default configuration file. In other words, the present invention can add a compatible value to the configuration file, and determine whether the current configuration file is compatible with the new firmware based on whether the compatible values in the current configuration file and the default configuration file are equal. Only when they are compatible, the current configuration file is used for parameter configuration, which can effectively avoid the baseboard management controller upgrade error problem that may be caused by the related technology directly using the current configuration file for configuration, and thus improve the reliability of the baseboard management controller firmware upgrade. The present invention also provides a firmware parameter configuration device, a baseboard management controller, and a computer-readable storage medium, which have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0043] Figure 1 A flowchart of a firmware parameter configuration method provided by an embodiment of the present invention;
[0044] Figure 2 This is a structural block diagram of a firmware parameter configuration device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0045] 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] In the related art, when performing a firmware upgrade, the baseboard management controller will use the configuration file of the previous firmware to configure the firmware parameters of the new firmware. However, user needs may change, and the new firmware of the baseboard management controller may also have design defects, which may easily cause the old version of the configuration file to be incompatible with the new version of the firmware, which may cause the baseboard management controller to upgrade errors and affect the normal operation of the controller. In view of this, the present invention provides a firmware parameter configuration method, which can add a compatibility value to the configuration file, and determine the compatibility between the previous version of the configuration file and the new firmware based on the compatibility value. The configuration file is only used to configure the new firmware when they are compatible, which can effectively improve the reliability of the baseboard management controller firmware upgrade. Please refer to Figure 1 , Figure 1 A flowchart of a firmware parameter configuration method provided by an embodiment of the present invention, the method is applied to a baseboard management controller and may include:
[0047] S101. When the new firmware upgrade is completed, obtain the current configuration file of the old firmware and the default configuration file of the new firmware.
[0048] It should be noted that the embodiment of the present invention is executed when the new firmware completes the memory writing. Generally speaking, when the baseboard management controller (BMC) is performing a firmware upgrade, it will first restart to complete the installation and writing of the new firmware file, and then perform parameter configuration. The embodiment of the present invention is executed when the initial restart of the new firmware is completed. It should be noted that the embodiment of the present invention does not limit the installation and writing process of the baseboard management controller firmware, and reference may be made to the relevant technologies of the baseboard management controller.
[0049] Furthermore, in the embodiment of the present invention, two configuration files are involved, namely, a current configuration file corresponding to the old firmware and a default configuration file corresponding to the new firmware, wherein the current configuration file stores the configuration item information that has been set to take effect in the old firmware, and the default configuration file stores all the default configuration item information corresponding to the new firmware. The embodiment of the present invention does not limit the specific configuration item information and the number of configuration items in the current configuration file and the default configuration file, and the relevant technology of the baseboard management controller can also be referred to. It should be pointed out that with the continuous iteration of firmware versions and the continuous improvement of firmware functions, the number of configuration items in the current configuration file may be different from the number of configuration items in the default configuration file.
[0050] S102: Searching for a first compatible value in the current configuration file and a second compatible value in the default configuration file.
[0051] The compatibility value (ConfigFile_Flag) is used in the embodiment of the present invention to characterize the compatibility between the current configuration file and the new firmware. Simply put, if the first compatibility value in the current configuration file is equal to the second compatibility value in the default configuration file of the new firmware, it means that the current configuration file is compatible with the new firmware, and the current configuration file or the combination of the current configuration file and the default configuration file can be used to configure the parameters of the new firmware. Otherwise, it means that the current configuration file is incompatible with the new firmware, and the default configuration file needs to be used for parameter configuration. For details, please refer to the description in the subsequent embodiments. It can be understood that if the first compatibility value cannot be found in the current configuration file, the compatibility between the current configuration file and the new firmware cannot be determined at this time. To be on the safe side, the default configuration file can be referred to for parameter configuration of the new firmware.
[0052] In a possible case, after searching the first compatible value in the current configuration file and the second compatible value in the default configuration file, the following may also be included:
[0053] Step 11: If the first compatible value cannot be found, the default configuration file is used to configure the parameters of the new firmware.
[0054] S103, determine whether the first compatibility value is the same as the second compatibility value; if so, proceed to step S104; if not, proceed to step S105.
[0055] S104: If the first compatible value is the same as the second compatible value, parameter configuration of the new firmware is performed using the current configuration file or a combination of the current configuration file and the default configuration file.
[0056] It should be pointed out that the first compatibility value and the second compatibility value in the embodiment of the present invention are specifically used to characterize whether the current configuration file is completely incompatible with the new firmware, that is, the parameters in the current configuration file cannot be used to configure the new firmware. Therefore, when the first compatibility value and the second compatibility value are different, the default configuration file needs to be used for parameter configuration. However, when the first compatibility value and the second compatibility value are the same, it is necessary to further consider the compatibility of the current configuration file with the new firmware. For example, if the content and number of configuration items between the current configuration file and the default configuration file will not change, and there may be differences only in the numerical values of the configuration items, the current configuration file can be directly used to configure the parameters of the new firmware; for another example, if the content and number of configuration items between the current configuration file and the default configuration file may change, that is, some configuration items in the current configuration file may be compatible with the new firmware, while other configuration items are incompatible with the new firmware, or the default configuration file has added configuration item information that is not included in the current configuration file. At this time, it is necessary to further confirm the compatibility of each parameter information in the current configuration file with the new firmware. In short, it is necessary to combine the current configuration file and the default configuration file to configure the parameters of the new firmware.
[0057] Similarly, the embodiment of the present invention also adds project compatibility values corresponding to each configuration item in the current configuration file and the default configuration file (for example, if the project name is ConfigA, the corresponding project compatibility value ConfigA_Flag can be set) to characterize the compatibility between each configuration item in the current configuration file and the new firmware. Since the number of configuration items in the default configuration file is generally more than that in the current configuration file, the embodiment of the present invention will perform compatibility judgment on all configuration items in the two files based on the default configuration file.
[0058] In one possible scenario, parameter configuration of the new firmware using a combination of the current configuration file and the default configuration file may include:
[0059] Step 21: Set the first configuration item in the default configuration file as the item to be configured;
[0060] Step 22: Find the first item compatible value of the item to be configured in the current configuration file and the second item compatible value in the default configuration file;
[0061] Step 23: Determine whether the first item compatibility value and the second item compatibility value are the same; if so, proceed to step 24; if not, proceed to step 25;
[0062] Step 24: Use the configuration item corresponding to the item to be configured in the current configuration file to configure parameters;
[0063] Step 25: Use the items to be configured to configure parameters;
[0064] The item to be configured is updated to the next configuration item in the default configuration file, and the process proceeds to step 22 until all configuration items in the default configuration file are configured.
[0065] Of course, similarly, if the compatible value of the first item cannot be found in the current configuration file, the configuration items in the default configuration file should be used for parameter configuration.
[0066] In a possible case, after searching for the first item compatible value of the to-be-configured item in the current configuration file and the second item compatible value in the default configuration file, the following may also be included:
[0067] Step 31: If the compatible value of the first item cannot be found in the current configuration file, the firmware parameter configuration is performed using the item to be configured.
[0068] S105: If the first compatible value is different from the second compatible value, use the default configuration file to perform parameter configuration on the new firmware.
[0069] Furthermore, it should be noted that the embodiments of the present invention do not limit the specific forms of the compatibility value and the project compatibility value. For example, they can be set as version numbers or in other forms, and can be adjusted according to actual application requirements.
[0070] Based on the above embodiment, after completing the new firmware upgrade, the present invention will first obtain the current configuration file used by the old firmware and the default configuration file built into the new firmware, and search for the first compatible value in the current configuration file and the second compatible value in the default configuration file; then, the present invention will automatically determine whether the two compatible values are the same, if they are the same, the new firmware will be configured with parameters using the current configuration file or a combination of the current configuration file and the default configuration file, and if they are different, the new firmware will be configured with parameters using the default configuration file. In other words, the present invention can add a compatible value to the configuration file, and determine whether the current configuration file is compatible with the new firmware based on whether the compatible values in the current configuration file and the default configuration file are equal, and only use the current configuration file for parameter configuration when they are compatible, which can effectively avoid the baseboard management controller upgrade error problem that may be caused by the related technology directly using the current configuration file for configuration, thereby improving the reliability of the baseboard management controller firmware upgrade.
[0071] The following is an introduction to a firmware parameter configuration device, a baseboard management controller, and a computer-readable storage medium provided in an embodiment of the present invention. The firmware parameter configuration device, baseboard management controller, and computer-readable storage medium described below can correspond to the firmware parameter configuration method described above.
[0072] Please refer to Figure 2 , Figure 2A structural block diagram of a firmware parameter configuration device provided by an embodiment of the present invention, the device may include:
[0073] The acquisition module 201 is used to acquire the current configuration file of the old firmware and the default configuration file of the new firmware when the new firmware upgrade is completed;
[0074] A search module 202, used to search for a first compatible value in a current configuration file and a second compatible value in a default configuration file;
[0075] A first configuration module 203, configured to perform parameter configuration on the new firmware using a current configuration file or a combination of the current configuration file and a default configuration file if the first compatibility value is the same as the second compatibility value;
[0076] The second configuration module 204 is configured to perform parameter configuration on the new firmware using a default configuration file if the first compatibility value is different from the second compatibility value.
[0077] Optionally, the device may further include:
[0078] The third configuration module is used to configure parameters of the new firmware using a default configuration file if the first compatible value cannot be found.
[0079] Optionally, the first configuration module 203 may include:
[0080] A setting unit, used to set the first configuration item in the default configuration file as the item to be configured;
[0081] A search unit, used to search for a first item compatible value of the to-be-configured item in the current configuration file and a second item compatible value in the default configuration file;
[0082] A judging unit, used to judge whether the first item compatibility value and the second item compatibility value are the same;
[0083] A first configuration unit, configured to perform parameter configuration using a configuration item corresponding to the item to be configured in the current configuration file;
[0084] A second configuration unit, for, if no, performing parameter configuration using the item to be configured;
[0085] The updating unit is used to update the to-be-configured item to the next configuration item in the default configuration file, and enter the step of searching for the first item compatible value of the to-be-configured item in the current configuration file and the second item compatible value in the default configuration file until all configuration items in the default configuration file are configured.
[0086] Optionally, the first configuration module 203 may further include:
[0087] The third configuration unit is used to configure the firmware parameters using the item to be configured if the compatible value of the first item cannot be found in the current configuration file.
[0088] An embodiment of the present invention further provides a baseboard management controller, including:
[0089] Memory for storing computer programs;
[0090] A processor is used to implement the steps of the firmware parameter configuration method as described above when executing a computer program.
[0091] Since the embodiments of the baseboard management controller part and the embodiments of the firmware parameter configuration method part correspond to each other, the embodiments of the baseboard management controller part refer to the description of the embodiments of the firmware parameter configuration method part, which will not be repeated here.
[0092] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the firmware parameter configuration method of any of the above embodiments are implemented.
[0093] Since the embodiments of the computer-readable storage medium part correspond to the embodiments of the firmware parameter configuration method part, the embodiments of the computer-readable storage medium part refer to the description of the embodiments of the firmware parameter configuration method part, which will not be repeated here.
[0094] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0095] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0096] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0097] The above is a detailed introduction to a firmware parameter configuration method, device, baseboard management controller and computer-readable storage medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. A firmware parameter configuration method, characterized in that: Applied to a baseboard management controller, the method comprises: When the new firmware upgrade is completed and the first restart is completed, obtaining the current configuration file of the old firmware and the default configuration file of the new firmware; Searching for a first compatible value in the current configuration file and a second compatible value in the default configuration file; the compatible value is used to characterize the compatibility between the current configuration file and the new firmware; If the first compatible value is the same as the second compatible value, parameter configuration of the new firmware is performed using the current configuration file or a combination of the current configuration file and the default configuration file; If the first compatible value is different from the second compatible value, performing the parameter configuration on the new firmware using the default configuration file; If the first compatible value cannot be found, the new firmware is configured with parameters using the default configuration file; The using the combination of the current configuration file and the default configuration file to configure parameters of the new firmware includes: Setting the first configuration item in the default configuration file as the item to be configured; Searching for a first item compatibility value of the item to be configured in the current configuration file and a second item compatibility value in the default configuration file; the item compatibility value is used to characterize the compatibility between each configuration item in the current configuration file and the new firmware; Determining whether the first item compatibility value and the second item compatibility value are the same; If the first item compatibility value and the second item compatibility value are the same, performing the parameter configuration using the configuration item corresponding to the item to be configured in the current configuration file; If the first item compatibility value and the second item compatibility value are different, performing the parameter configuration using the item to be configured; If the compatible value of the first item cannot be found in the current configuration file, the firmware parameter configuration is performed using the item to be configured; The to-be-configured item is updated to the next configuration item in the default configuration file, and the step of searching for the first item compatible value of the to-be-configured item in the current configuration file and the second item compatible value in the default configuration file is entered until all configuration items in the default configuration file are configured.
2. A firmware parameter configuration device, characterized in that: include: An acquisition module, used to acquire the current configuration file of the old firmware and the default configuration file of the new firmware when the new firmware upgrade is completed and the first restart is completed; A search module, used for searching the first compatible value in the current configuration file and the second compatible value in the default configuration file; a first configuration module, configured to perform parameter configuration on the new firmware using the current configuration file or a combination of the current configuration file and the default configuration file if the first compatibility value is the same as the second compatibility value; A second configuration module, configured to perform the parameter configuration on the new firmware using the default configuration file if the first compatibility value is different from the second compatibility value; A third configuration module, configured to use the default configuration file to perform parameter configuration on the new firmware if the first compatible value cannot be found; The first configuration module includes: A setting unit, used to set the first configuration item in the default configuration file as the item to be configured; A searching unit, configured to search for a first item compatibility value of the to-be-configured item in the current configuration file and a second item compatibility value in the default configuration file; a judging unit, configured to judge whether the first item compatibility value and the second item compatibility value are the same; A first configuration unit, configured to perform the parameter configuration using the configuration item corresponding to the item to be configured in the current configuration file; A second configuration unit, configured to, if no, perform the parameter configuration using the item to be configured; an updating unit, configured to update the to-be-configured item to the next configuration item in the default configuration file, and enter the step of searching for a first item compatible value of the to-be-configured item in the current configuration file and a second item compatible value in the default configuration file, until all configuration items in the default configuration file are configured; The third configuration unit is configured to use the item to be configured to configure the firmware parameters if the compatible value of the first item cannot be found in the current configuration file.
3. A baseboard management controller, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the firmware parameter configuration method as claimed in claim 1 when executing the computer program.
4. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by the processor, the firmware parameter configuration method according to claim 1 is implemented.
Citation Information
Patent Citations
Mobile terminal and updating method of configuration information thereof
CN101667131A
Software version update method and device
CN108717360A