BMC upgrading method and device, electronic equipment and storage medium

CN116257275BActive Publication Date: 2026-09-18INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310272283.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-20
Publication Date
2026-09-18
Estimated Expiration
2043-03-20

AI Technical Summary

Technical Problem

[0005]本发明实施例的目的在于提供一种BMC升级方法、装置、电子设备及存储介质,解决现有技术中新BMC版本在现网做备件时被老BMC版本回退导致无法正常升级问题,以实现可靠有效的BMC升级,具体技术方案如下:

Benefits of technology

[0059]The BMC upgrade method provided in this invention obtains the current BMC version number and the target BMC version number. The BMC version number is pre-configured with a matching field and an actual version number field. The matching field includes a weak matching field, and the actual version number field includes an iteration version number. Specifically, a matching field is added to the BMC version number to indicate whether the currently running BMC version is a weakly matched version. The actual version number fields of the current BMC version number and the target BMC version number are compared sequentially. If the iteration version numbers are inconsistent, the matching field of the current BMC version number is determined. If the matching field of the current BMC version number is a weakly matched field, the current BMC version is upgraded based on the iteration version number and the target BMC version number. If the current BMC is a weakly matched version, a BMC upgrade is performed when the target BMC version number is greater than the current BMC iteration version number. In this embodiment, by adding a matching field to the BMC version number, when the matching field of the current BMC version number is a weak matching field, the current BMC version is upgraded only when the iteration version number of the target BMC version number is greater than the iteration version number of the current BMC version number, based on the iteration version number and the target BMC version number. This avoids the problem of separately preparing firmware for the BMC version in the production network, which wastes resources, and achieves reliable and effective BMC upgrades.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116257275B_ABST
    Figure CN116257275B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a BMC upgrading method and device, electronic equipment and storage medium, comprising: obtaining a current BMC version number and a target BMC version number; wherein the BMC version number is pre-configured as a matching field and an actual version number field; sequentially comparing the actual version number fields of the current BMC version number and the target BMC version number, and determining the matching field of the current BMC version number if the iterative version numbers are inconsistent; and in the case that the matching field of the current BMC version number is a weak matching field, upgrading the current BMC version according to the iterative version number and the target BMC version number. The present application adds the matching field of the BMC version number, and upgrades the current BMC version when the target BMC iterative version number is greater than the current BMC iterative version number in the case that the current BMC version is weak matching, thereby realizing reliable and effective BMC upgrading.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of server technology, and in particular to a BMC upgrade method, apparatus, electronic device, and storage medium. Background Technology

[0002] The BMC (Baseboard Management Controller) in a server is a small operating system independent of the server system. It is a chip integrated on the motherboard, although some products use PCIe or other methods to connect it to the motherboard. Servers generally use the BMC for baseboard management tasks.

[0003] The BMC is not visible to users. The software users can directly see is the Storage System Management Software (SMS). The SMS package contains all firmware and a firmware version matching table. The SMS software reads the currently running BMC version number (e.g., BMC version number 6.01.15) and compares it with the BMC version number in the firmware version matching table (e.g., BMC version number 6.01.16 or 6.01.10). If the version numbers are inconsistent, the running BMC firmware is updated with the BMC firmware from the firmware package, completing the BMC upgrade.

[0004] However, if a device on a user's substrate malfunctions or needs to be replaced, and a new device remanufactured from the existing network is used to replace the old device, the BMC version corresponding to the new device in the SMS software will be replaced by the BMC version corresponding to the old device, causing the BMC to fail to upgrade normally. Since the BMC version of the old device does not support managing the new device, the bill of materials for the substrate after the replacement device has to be redone and made different from the original substrate. Spare parts from the existing network also need to be stocked separately, wasting hardware resources. Summary of the Invention

[0005] The purpose of this invention is to provide a BMC upgrade method, apparatus, electronic device, and storage medium to solve the problem in the prior art where a new BMC version is rolled back by an older BMC version when used as a spare part in the live network, resulting in the inability to upgrade normally. This achieves a reliable and effective BMC upgrade. The specific technical solution is as follows:

[0006] In a first aspect of this invention, a BMC upgrade method is provided, the method comprising:

[0007] Obtain the current BMC version number and the target BMC version number; wherein, the BMC version number is pre-configured as a matching field and an actual version number field, the matching field includes a weak matching field, and the actual version number field includes an iteration version number;

[0008] The actual version number fields of the current BMC version number and the target BMC version number are compared sequentially. If the iteration version numbers are inconsistent, the corresponding fields of the current BMC version number are determined.

[0009] If the matching field of the current BMC version number is a weak matching field, the current BMC version is upgraded according to the iteration version number and the target BMC version number.

[0010] Optionally, the step of comparing the actual version number fields of the current BMC version number and the target BMC version number in sequence, and determining the corresponding fields of the current BMC version number if the iteration version numbers are inconsistent, includes:

[0011] Compare the first field of the actual version number field of the current BMC version number and the target BMC version number to determine whether the first field is consistent;

[0012] If so, then compare the second field of the actual version number field of the current BMC version number and the target BMC version number;

[0013] If not, exit BMC upgrade.

[0014] Optionally, after comparing the second field of the actual version number field of the current BMC version number and the target BMC version number, the method further includes:

[0015] Based on the second field of the target BMC version number, determine whether it is consistent with the second field of the current BMC version number;

[0016] If so, then compare the iteration version number of the actual version number field of the current BMC version number and the target BMC version number;

[0017] If not, exit BMC upgrade.

[0018] Optionally, comparing the iterative version number of the actual version number field of the current BMC version number and the target BMC version number includes:

[0019] Based on the iteration version number of the target version number, determine whether it is consistent with the iteration version number of the current BMC version number;

[0020] If the iteration version numbers are consistent, then exit the BMC upgrade;

[0021] If the iteration version numbers are inconsistent, determine the corresponding fields for the current BMC version number.

[0022] Optionally, when the matching field of the current BMC version number is a weak matching field, upgrading the current BMC version based on the iteration version number and the target BMC version number includes:

[0023] If the matching field of the current BMC version number is a weak matching field, determine whether the iteration version number of the target BMC version number is greater than the iteration version number of the current BMC version number based on the iteration version number and the target BMC version number.

[0024] If so, upgrade the current BMC version;

[0025] If not, exit BMC upgrade.

[0026] Optionally, the matching fields also include strong matching fields. After sequentially comparing the actual version number fields of the current BMC version number and the target BMC version number, and if the iteration version numbers are inconsistent, determining the matching fields of the current BMC version number further includes:

[0027] If the matching field of the current BMC version number is a strongly matched field, the current BMC version is upgraded according to the target BMC version number.

[0028] Optionally, before obtaining the current BMC version number and the target BMC version number, the process further includes:

[0029] Based on the type of substrate currently managed by the BMC, obtain the corresponding BMC version number from the firmware version matching table;

[0030] The BMC version number is split into a matching field and an actual version number field.

[0031] In a second aspect of the invention, a BMC upgrade device is also provided, the device comprising:

[0032] The acquisition module is used to acquire the current BMC version number and the target BMC version number; wherein, the BMC version number is set as a matching field and an actual version number field, the matching field includes a weak matching field, and the actual version number field includes an iteration version number;

[0033] The determination module is used to compare the actual version number fields of the current BMC version number and the target BMC version number in sequence. If the iteration version numbers are inconsistent, the corresponding fields of the current BMC version number are determined.

[0034] The upgrade module is used to upgrade the current BMC version based on the iteration version number and the target BMC version number when the matching field of the current BMC version number is a weak matching field.

[0035] Optionally, the determining module includes:

[0036] The first determining submodule is used to compare the first field of the actual version number field of the current BMC version number and the target BMC version number to determine whether the first field is consistent.

[0037] The second determining submodule is used to compare the second field of the actual version number field of the current BMC version number and the target BMC version number if the condition is met.

[0038] The third determination submodule is used to exit BMC upgrade if no.

[0039] Optionally, the determining module further includes:

[0040] The fourth determining submodule is used to determine whether the second field of the target BMC version number is consistent with the second field of the current BMC version number based on the second field of the target BMC version number.

[0041] The fifth determining submodule is used to compare the iterative version number of the actual version number field of the current BMC version number and the target BMC version number if the condition is met.

[0042] The sixth submodule determines whether to exit the BMC upgrade process if not.

[0043] Optionally, the fifth determining submodule includes:

[0044] The first determining unit is used to determine whether the iteration version number of the target version number is consistent with the iteration version number of the current BMC version number based on the iteration version number of the target version number.

[0045] The second determining unit is used to exit the BMC upgrade if the iteration version number is consistent.

[0046] The third determining unit is used to determine the corresponding field of the current BMC version number if the iteration version number is inconsistent.

[0047] Optionally, the upgrade module includes:

[0048] The first upgrade submodule is used to determine, based on the iteration version number and the target BMC version number, whether the iteration version number of the target BMC version number is greater than the iteration version number of the current BMC version number when the matching field of the current BMC version number is a weak matching field.

[0049] The second upgrade submodule is used to upgrade the current BMC version if the condition is met.

[0050] The third upgrade submodule is used to exit the BMC upgrade if not.

[0051] Optionally, the upgrade module further includes:

[0052] The fourth upgrade submodule is used to upgrade the current BMC version according to the target BMC version number when the matching field of the current BMC version number is a strongly matching field.

[0053] Optionally, the device further includes:

[0054] The first acquisition module is used to obtain the BMC version number corresponding to the substrate from the firmware version matching table according to the substrate type currently managed by the BMC.

[0055] The processing module is used to split the BMC version number into a matching field and an actual version number field.

[0056] In a third aspect of the present invention, an electronic device is also provided, comprising: a transceiver, a memory, a processor, and a program stored in the memory and executable on the processor;

[0057] The processor is used to read the program in the memory to execute any of the BMC upgrade methods described in the first aspect above.

[0058] In a fourth aspect of the invention, a computer-readable storage medium is also provided, wherein instructions are stored therein, which, when executed on a computer, cause the computer to perform any of the BMC upgrade methods described in the first aspect above.

[0059] The BMC upgrade method provided in this invention obtains the current BMC version number and the target BMC version number. The BMC version number is pre-configured with a matching field and an actual version number field. The matching field includes a weak matching field, and the actual version number field includes an iteration version number. Specifically, a matching field is added to the BMC version number to indicate whether the currently running BMC version is a weakly matched version. The actual version number fields of the current BMC version number and the target BMC version number are compared sequentially. If the iteration version numbers are inconsistent, the matching field of the current BMC version number is determined. If the matching field of the current BMC version number is a weakly matched field, the current BMC version is upgraded based on the iteration version number and the target BMC version number. If the current BMC is a weakly matched version, a BMC upgrade is performed when the target BMC version number is greater than the current BMC iteration version number. In this embodiment, by adding a matching field to the BMC version number, when the matching field of the current BMC version number is a weak matching field, the current BMC version is upgraded only when the iteration version number of the target BMC version number is greater than the iteration version number of the current BMC version number, based on the iteration version number and the target BMC version number. This avoids the problem of separately preparing firmware for the BMC version in the production network, which wastes resources, and achieves reliable and effective BMC upgrades. Attached Figure Description

[0060] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.

[0061] Figure 1 This is one of the flowcharts of a BMC upgrade method provided in an embodiment of the present invention;

[0062] Figure 2 yes Figure 1 The flowchart of step 102 of the BMC upgrade method provided in this embodiment of the invention is shown below;

[0063] Figure 3 yes Figure 1 The flowchart of step 103 of the BMC upgrade method provided in this embodiment of the invention;

[0064] Figure 4 This is the second step flowchart of a BMC upgrade method provided in an embodiment of the present invention;

[0065] Figure 5 This is the third step in the flowchart of a BMC upgrade method provided in this embodiment of the invention;

[0066] Figure 6 This is a flowchart of a BMC upgrade method provided in an embodiment of the present invention;

[0067] Figure 7 This is a device block diagram of a BMC upgrade device provided in an embodiment of the present invention;

[0068] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0069] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the various embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details are presented in the various embodiments of the present invention to facilitate a better understanding of this application. However, the technical solutions claimed in this application can be implemented even without these technical details and various changes and modifications based on the following embodiments. The division of the various embodiments below is for ease of description and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined with and referenced by each other without contradiction.

[0070] Reference Figure 1 The diagram illustrates one of the steps of a BMC upgrade method provided in an embodiment of the present invention, the method including:

[0071] Step 101: Obtain the current BMC version number and the target BMC version number; wherein, the BMC version number is pre-configured as a matching field and an actual version number field, the matching field includes a weak matching field, and the actual version number field includes an iteration version number.

[0072] In this embodiment of the invention, to overcome the problem in the prior art where BMC upgrades fail due to older BMC versions not supporting the management of newly replaced devices, resulting in the need for separate stocking of new and old substrates and wasting resources, a weakly compatible BMC firmware upgrade is performed on the server. This embodiment achieves flexible and reliable BMC upgrades by adding a matching field to the BMC version number, thereby avoiding the resource waste caused by separate stocking in the current network. It should be noted that this embodiment uses the terminal controlling the BMC firmware upgrade as the execution subject for illustration.

[0073] Specifically, this embodiment determines whether to upgrade based on the BMC version number and according to the upgrade strategy. First, it obtains the current BMC version number and the target BMC version number. The BMC version number is pre-configured with a matching field and an actual version number field. The matching field includes a weak matching field, and the actual version number field includes an iteration version number. The current BMC version number is the version number of the BMC currently running on the server. The target BMC version number is the latest BMC version number in the software configuration package. The BMC version number includes the matching field, a first field, a second field, and an iteration version number. The first field is the major version number, which can be the hardware platform number corresponding to the substrate type. The second field is the minor version number, which can be the hardware project number corresponding to the substrate type. The iteration version number is the upgraded version number of the BMC. It should be noted that the matching field includes a weak matching field and a strong matching field. A weak matching field indicates that the target version number of the currently running BMC is inconsistent with the target BMC version number in the software configuration package. A strong matching field, i.e., a non-weak matching field, indicates that the target version number of the currently running BMC is consistent with the target BMC version number in the software configuration package. If the matching field in the BMC version number is a weak matching field, then the BMC is a weakly matched version. In the case of a weakly matched BMC, the current BMC will be upgraded only if the iteration version number of the BMC software configuration package is greater than the iteration version number in the current BMC version number; otherwise, the BMC upgrade will be terminated.

[0074] It should be noted that this embodiment does not limit the configuration of the BMC version number. For example, the BMC version number can be preset according to the substrate type, that is, the database contains a configuration field and an actual version number field for the BMC version number. Of course, the configuration field and the actual version number field can also be obtained by splitting the BMC version number from the firmware configuration table, which will not be elaborated here.

[0075] In this embodiment, a new matching field has been added to distinguish the upgraded BMC. Based on the different matching BMCs, the corresponding upgrade strategy is executed. When the current BMC is a weakly matched version, the upgrade is determined by comparing the iteration version number. This avoids the problem that after the BMC device is replaced, the new BMC version is replaced by the BMC version in the old substrate, causing the BMC version of the new substrate to regress and the upgrade to fail.

[0076] Step 102: Compare the actual version number fields of the current BMC version number and the target BMC version number in sequence. If the iteration version numbers are inconsistent, determine the corresponding fields of the current BMC version number.

[0077] In this embodiment of the invention, the current BMC version number is compared with the target BMC version number according to the actual version number field order. If the first field and the second field are consistent, but the iteration version number is inconsistent, the configuration field of the current BMC version number is determined so that the current BMC can be upgraded or exited for upgrade based on whether the current BMC is a weakly compatible version and the iteration version number of the BMC version number.

[0078] Specifically, in this embodiment, the BMC firmware version number is compared to determine whether the current BMC version number is the latest version number in the weakly compatible version, thereby determining whether a BMC upgrade operation needs to be triggered. That is, if the iteration version number of the current BMC version number is the same as the iteration version number of the target BMC version number, then a BMC upgrade operation does not need to be triggered; if the iteration version number of the current BMC version number is different from the iteration version number of the target BMC version number, it means that the current BMC version number is not the latest version number, and a BMC firmware upgrade operation needs to be triggered based on whether the BMC is a weakly compatible version. Therefore, to implement this judgment process, it is necessary to compare the current BMC version number with the target BMC version number.

[0079] Step 103: If the matching field of the current BMC version number is a weak matching field, upgrade the current BMC version according to the iteration version number and the target BMC version number.

[0080] In this embodiment of the invention, when the matching field of the current BMC version number is a weak matching field, the current BMC version is upgraded according to the iteration version number in the current BMC version number and the iteration version number of the target BMC version number.

[0081] Specifically, the actual version number fields of the current BMC version number and the target BMC version number are compared sequentially. If the iteration version numbers are inconsistent, the matching field of the current BMC version number is determined. If the matching field of the current BMC version number is a weak matching field, the current BMC is a weakly matched version, indicating that the current BMC version number is inconsistent with the BMC version number in the software package. The software package includes firmware and the BMC version of the firmware. If the BMC version number in the old firmware is inconsistent with the BMC version number of the new firmware, the BMC version of the old firmware will replace the BMC version of the new firmware, causing the BMC version corresponding to the new substrate to revert. The reverted old BMC version cannot support the management of the devices on the new substrate, thus the BMC upgrade fails. To avoid this problem, this embodiment adds a matching field to the BMC version number. When the matching field of the current BMC version number is a weak matching field, the current BMC version is upgraded only when the iteration version number of the target BMC version number is greater than the iteration version number of the current BMC version number, based on the iteration version number and the target BMC version number. This achieves reliable BMC upgrades and avoids BMC version rollback.

[0082] The BMC upgrade method provided in this invention obtains the current BMC version number and the target BMC version number. The BMC version number is pre-configured with a matching field and an actual version number field. The matching field includes a weak matching field, and the actual version number field includes an iteration version number. Specifically, a matching field is added to the BMC version number to indicate whether the currently running BMC version is a weakly matched version. The actual version number fields of the current BMC version number and the target BMC version number are compared sequentially. If the iteration version numbers are inconsistent, the matching field of the current BMC version number is determined. If the matching field of the current BMC version number is a weakly matched field, the current BMC version is upgraded based on the iteration version number and the target BMC version number. In other words, if the current BMC is a weakly matched version, a BMC upgrade is performed when the target BMC version number is greater than the current BMC iteration version number. In this embodiment, by adding a matching field to the BMC version number, when the matching field of the current BMC version number is a weak matching field, the current BMC version is upgraded only when the iteration version number of the target BMC version number is greater than the iteration version number of the current BMC version number, based on the iteration version number and the target BMC version number. This avoids the problem of separately preparing firmware for the BMC version in the production network, which wastes resources, and achieves reliable and effective BMC upgrades.

[0083] Furthermore, referring to Figure 2 , Figure 2 yes Figure 1 The flowchart of step 102 of the BMC upgrade method provided in this embodiment of the invention includes:

[0084] Step 1021: Compare the first field of the actual version number field of the current BMC version number and the target BMC version number to determine whether the first field is consistent.

[0085] In this embodiment of the invention, to determine whether to upgrade the current BMC version, the first field of the actual version number field of the current BMC version number and the target BMC version number is compared to ensure that the current BMC version and the target BMC version are in the same major version category. For example, the BMC version number in the motherboard's software package is 0.6.01.15, and the BMC version number currently running on the motherboard is 1.6.01.17. The first field of the actual version number field in the version number indicates the hardware platform. In this embodiment, hardware platform number 6, i.e., G6, is used as an example. A certain chip on the motherboard in Project 1 of the G6 platform needs to be replaced. Because the hardware is pin-to-pin compatible, the replacement can be completed without making a new substrate. However, because the chip is different, the BMC needs to identify the chip to complete the code adaptation. At this point, directly updating the BMC version to 6.01.17 will not cause problems during the upgrade process. However, when using version 6.01.17 as a motherboard spare part, after replacing the spare part, the system will detect that 6.01.17 is inconsistent with 6.01.15 in the main package. It will then automatically revert the BMC version of the motherboard spare part to 6.01.15. In this case, 6.01.15 will not be able to recognize the newly replaced chip, causing problems. Therefore, it is necessary to ensure that the first field of the actual version number field of the current BMC version number and the target BMC version number are consistent before proceeding to the next step.

[0086] It is understood that the above examples are merely examples listed for the purpose of better understanding the technical solutions of the embodiments of this disclosure, and are not intended to be the only limitation on the embodiments of this disclosure.

[0087] Step 1022: If yes, then compare the second field of the actual version number field of the current BMC version number and the target BMC version number.

[0088] Step 1023: If not, exit BMC upgrade.

[0089] It should be noted that in steps 1021-1023 above, the first field of the actual version number field of the current BMC version number and the target BMC version number is compared to determine if they are consistent. If they are, it indicates that the upgrade conditions are met, and the second field is further evaluated, that is, the second field of the actual version number field of the current BMC version number and the target BMC version number is compared. If they are not consistent, it indicates that the current BMC version and the target BMC version are not on the same hardware platform, that is, the versions are incompatible, and the BMC upgrade is terminated.

[0090] Specifically, after step 1023, it also includes,

[0091] Based on the second field of the target BMC version number, determine whether it matches the second field of the current BMC version number;

[0092] If so, compare the iteration version number of the current BMC version number with the actual version number field of the target BMC version number;

[0093] If not, exit BMC upgrade.

[0094] In this embodiment, if the first field of the actual version number field of the current BMC version number and the target BMC version number is consistent, the second field of the target BMC version number is used to determine whether it is consistent with the second field of the current BMC version number. The second field is the minor version number of the BMC, which can be the hardware project number corresponding to the substrate type. Based on the comparison of the second field, it is determined whether the second field is consistent. If it is, it indicates that the upgrade conditions are met, and the iteration version number is further judged, that is, the iteration version number of the actual version number field of the current BMC version number and the target BMC version number is compared. If not, it indicates that the current BMC version and the target BMC version are not the same hardware project, i.e., the versions are incompatible, and the BMC upgrade is terminated.

[0095] Specifically, step 102 further includes:

[0096] Based on the iteration version number of the target version number, determine whether it is consistent with the iteration version number of the current BMC version number.

[0097] If the iteration version number is the same, exit the BMC upgrade.

[0098] If the iteration version number is inconsistent, determine the corresponding field for the current BMC version number.

[0099] It should be noted that in the above steps, if the first and second fields of the actual version number in the current BMC version number are consistent with the corresponding fields in the target BMC version number, the iteration version number is judged. That is, based on the iteration version number of the target version number, it is determined whether it is consistent with the iteration version number of the current BMC version number. If the iteration version numbers are consistent, it means that the current BMC version is already the same as the target BMC version number, and no upgrade is needed, so the BMC upgrade is exited. If the iteration version numbers are inconsistent, there are two situations: the iteration version number of the target BMC version number is greater than the iteration version number of the current BMC version number, or the iteration version number of the target BMC version number is less than the iteration version number of the current BMC version number. The corresponding fields of the current BMC version number are then determined, and further BMC upgrade judgment is performed.

[0100] Furthermore, referring to Figure 3 , Figure 3 yes Figure 1The flowchart of step 103 of the BMC upgrade method provided in this embodiment of the invention includes:

[0101] Step 1031: If the matching field of the current BMC version number is a weak matching field, determine whether the iteration version number of the target BMC version number is greater than the iteration version number of the current BMC version number based on the iteration version number and the target BMC version number.

[0102] Step 1032: If yes, upgrade the current BMC version.

[0103] Specifically, in this embodiment, when the matching field of the current BMC version number is a weak matching field, based on the iteration version number and the target BMC version number, it is determined whether the iteration version number of the target BMC version number is greater than the iteration version number of the current BMC version number. If the iteration version number of the target BMC version number is greater than the iteration version number of the current BMC version number, the weak matching upgrade strategy is satisfied, and the BMC is upgraded.

[0104] Step 1033: If not, exit BMC upgrade.

[0105] It should be noted that in steps 1031-1033 above, when the matching field of the current BMC version number is a weak matching field, the upgrade judgment is made based on the iteration version number and the target BMC version number to determine whether the iteration version number of the target BMC version number is greater than the iteration version number of the current BMC version number. If the matching field of the current BMC version number is weakly matching, and the BMC version number in the old firmware is inconsistent with the BMC version number of the new firmware, the old firmware's BMC version will replace the new firmware's BMC version, causing the BMC version corresponding to the new substrate to revert. The reverted old BMC version cannot support managing the devices on the new substrate, thus the BMC upgrade fails. To avoid this problem, this embodiment adds a matching field to the BMC version number. When the matching field of the current BMC version number is weakly matching, the upgrade is only performed when the iteration version number of the target BMC version number is greater than the iteration version number of the current BMC version number, thus achieving a reliable BMC upgrade.

[0106] Reference Figure 4 The second flowchart of the BMC upgrade method provided in this embodiment of the invention is shown. The method may include:

[0107] Step 101: Obtain the current BMC version number and the target BMC version number; wherein, the BMC version number is pre-configured as a matching field and an actual version number field, the matching field includes a weak matching field, and the actual version number field includes an iteration version number.

[0108] Step 102: Compare the actual version number fields of the current BMC version number and the target BMC version number in sequence. If the iteration version numbers are inconsistent, determine the corresponding fields of the current BMC version number.

[0109] Step 103: If the matching field of the current BMC version number is a weak matching field, upgrade the current BMC version according to the iteration version number and the target BMC version number.

[0110] Steps 101-103 above will not be repeated here again, referring to the previous discussion.

[0111] Step 104: If the matching field of the current BMC version number is a strongly matching field, upgrade the current BMC version according to the target BMC version number.

[0112] In this embodiment of the invention, the actual version number fields of the current BMC version number and the target BMC version number are compared sequentially. If the iteration version numbers are inconsistent, the matching field of the current BMC version number is determined. The matching field includes a weak matching field and a strong matching field. A weak matching field indicates that the target version number of the currently running BMC is inconsistent with the target BMC version number in the software configuration package. A strong matching field, i.e., a non-weak matching field, indicates that the target version number of the currently running BMC is consistent with the target BMC version number in the software configuration package. In the case of a weakly matched BMC, the current BMC is upgraded only if an iteration version number in the BMC software configuration package is greater than the iteration version number in the current BMC version number; otherwise, the BMC upgrade is terminated. In the case of a strongly matched field for the current BMC version number, the current BMC version is upgraded directly based on the target BMC version number.

[0113] It should be noted that the specific execution order of step 104 is not limited in this embodiment. It can be executed after step 103, or after determining the matching field of the current BMC version number and the target BMC version number, based on the inconsistency of the iteration version number field of the actual version number field. In other words, step 103 is executed in this embodiment. This embodiment uses the case where step 104 is executed after step 103 as an example for explanation, and each case will not be described in detail here.

[0114] Understandably, performing the upgrade operation based on the target BMC version number in step 104 can avoid the situation where the version number is re-determined when the current BMC version number is inconsistent with the current BMC firmware version number, thus improving the upgrade efficiency of BMC.

[0115] Reference Figure 5The third step of the BMC upgrade method provided in this embodiment of the invention is illustrated. The method may include:

[0116] Step 105: Based on the type of substrate currently managed by the BMC, obtain the BMC version number corresponding to the substrate from the firmware version matching table.

[0117] In this embodiment of the invention, before determining whether to upgrade the BMC, the BMC version number corresponding to the substrate is obtained from the firmware version matching table based on the substrate type currently managed by the BMC. The BMC version number is then processed to facilitate marking and comparison based on the BMC version number, avoiding the waste of resources caused by separately preparing firmware for each BMC version in the current network. In this embodiment, by obtaining the BMC version number corresponding to the substrate and adding a matching field to mark the BMC version number, the BMC upgrade is determined based on the iteration version number in the case of weak matching, and the BMC upgrade is directly performed in the case of strong matching, thus achieving reliable and effective BMC upgrade.

[0118] Step 106: Split the BMC version number into a matching field and an actual version number field.

[0119] In this embodiment of the invention, after obtaining the BMC version number corresponding to the substrate from the firmware version matching table, the BMC version number is split according to a preset field splitting method, splitting the BMC version number into a matching field and an actual version number field. In this embodiment, the preset field splitting method is not specifically limited, and can be any method that can split the BMC version number field, which will not be elaborated here.

[0120] Step 101: Obtain the current BMC version number and the target BMC version number; wherein, the BMC version number is pre-configured as a matching field and an actual version number field, the matching field includes a weak matching field, and the actual version number field includes an iteration version number.

[0121] Step 102: Compare the actual version number fields of the current BMC version number and the target BMC version number in sequence. If the iteration version numbers are inconsistent, determine the corresponding fields of the current BMC version number.

[0122] Step 103: If the matching field of the current BMC version number is a weak matching field, upgrade the current BMC version according to the iteration version number and the target BMC version number.

[0123] Steps 101-103 above will not be repeated here again, referring to the previous discussion.

[0124] In steps 105-106, by pre-adding a matching field to the BMC version number, the BMC version is differentiated to facilitate upgrade processing. Compared with the existing technology, even when the matching field of the current BMC version number is a weak matching field, the current BMC version is upgraded only when the iteration version number of the target BMC version number is greater than the iteration version number of the current BMC version number, based on the iteration version number and the target BMC version number. This avoids the problem of separately preparing firmware for each BMC version on the live network, which wastes resources and achieves reliable and effective BMC upgrades.

[0125] To enable those skilled in the art to more clearly understand the BMC upgrade method described above, please refer to... Figure 6 The flowchart of the BMC upgrade method provided in this embodiment of the invention is shown, taking as an example a target BMC version number of 0.6.01.15 in the software package and a BMC version number of 1.6.01.17 running on the motherboard:

[0126] S201, obtain the target BMC version, and split the target BMC version number into the matching field and the actual version number field.

[0127] Specifically, obtain the target BMC version, and split the target BMC version number in the software package into two parts: the matching field part and the actual version number. After splitting, they are: 0 (matching field) and 6.01.15 (actual version number field).

[0128] S202, get the current BMC version, and split the current BMC version number into the matching field and the actual version number field.

[0129] Specifically, obtain the current BMC version, and split the running BMC version number into two parts: the matching field and the actual version number. After splitting, they are: 1 (matching field) and 6.01.17 (actual version number field).

[0130] S203, determine whether the first field of the current BMC version number and the target BMC version number are consistent.

[0131] In this embodiment, the first field of the current BMC version number and the target BMC version number are compared. The first field of the actual version number indicates the hardware platform. This embodiment uses hardware platform number 6 (G6) as an example. A chip on the motherboard in Project 1 of the G6 platform needs to be replaced. Because the hardware is pin-to-pin compatible, the replacement can be completed without making a new substrate. However, because the chip is different, the BMC needs to identify the chip and complete code adaptation. If the BMC version is directly updated to 6.01.17, there will be no problem during the upgrade. However, when using version 6.01.17 as a motherboard spare part, after replacing the spare part, the system finds that 6.01.17 is inconsistent with 6.01.15 in the main package. It will then automatically revert the BMC version of the motherboard spare part to 6.01.15. At this point, 6.01.15 cannot recognize the newly replaced chip, thus causing problems. Therefore, it is necessary to ensure that the first field of the actual version number field of the current BMC version number and the target BMC version number are consistent. If they are consistent, proceed to step S204 to determine whether the second field of the current BMC version number and the target BMC version number are consistent. Otherwise, proceed to step 209 to exit BMC upgrade.

[0132] S204, determine whether the second field of the current BMC version number and the target BMC version number are consistent.

[0133] In this embodiment, the second field of the current BMC version number and the target BMC version number is compared. The second field is the minor version number of the BMC, which can be the hardware project number corresponding to the substrate type. Based on the comparison of the second field, it is determined whether the second field is consistent. If so, proceed to step 205 to determine whether the iteration version number of the current BMC version number and the target BMC version number is consistent. Otherwise, it indicates that the current BMC version and the target BMC version are not the same hardware project, i.e., the versions are incompatible. Then proceed to step 209 to exit the BMC upgrade.

[0134] S205, determine whether the iteration version number of the current BMC version number and the target BMC version number are consistent.

[0135] Specifically, the current BMC version number is compared with the iteration version number of the target BMC version number. If the iteration version numbers are inconsistent, proceed to step 206 to determine the corresponding fields of the current BMC version number. If the iteration version numbers are consistent, no upgrade is required, proceed to step 209 to exit the BMC upgrade.

[0136] S206, determine whether the current BMC version number is a weak match.

[0137] It should be noted that the matching fields include weak matching fields and strong matching fields. A weak matching field indicates that the target version number of the currently running BMC is inconsistent with the target BMC version number in the software configuration package. A strong matching field, also known as a non-weak matching field, indicates that the target version number of the currently running BMC is consistent with the target BMC version number in the software configuration package. The process determines whether the current BMC version number is weakly matched. If the BMC is weakly matched, proceed to step 207 to determine whether the iteration version number of the target BMC version number is greater than the iteration version number of the current BMC version number; otherwise, if the matching field of the current BMC version number is a strong matching field, proceed to step 208 to upgrade the current BMC version.

[0138] S207, Determine whether the iteration version number of the target BMC version number is greater than the iteration version number of the current BMC version number.

[0139] In this embodiment, when the BMC is weakly compatible, it is determined whether the iteration version number of the target BMC version number is greater than the iteration version number of the current BMC version number. If the iteration version number of the BMC software configuration package is greater than the iteration version number in the current BMC version number, proceed to step 208 to upgrade the current BMC version; otherwise, proceed to step 209 to exit the BMC upgrade.

[0140] S208 upgrades the current BMC version.

[0141] S209, Exit BMC upgrade.

[0142] The BMC upgrade method provided in this invention obtains the current BMC version number and the target BMC version number. The BMC version number is pre-configured with a matching field and an actual version number field. The matching field includes a weak matching field, and the actual version number field includes an iteration version number. Specifically, a matching field is added to the BMC version number to indicate whether the currently running BMC version is a weakly matched version. The actual version number fields of the current BMC version number and the target BMC version number are compared sequentially. If the iteration version numbers are inconsistent, the matching field of the current BMC version number is determined. If the matching field of the current BMC version number is a weakly matched field, the current BMC version is upgraded based on the iteration version number and the target BMC version number. In other words, if the current BMC is a weakly matched version, a BMC upgrade is performed when the target BMC version number is greater than the current BMC iteration version number. In this embodiment, by adding a matching field to the BMC version number, when the matching field of the current BMC version number is a weak matching field, the current BMC version is upgraded only when the iteration version number of the target BMC version number is greater than the iteration version number of the current BMC version number, based on the iteration version number and the target BMC version number. This avoids the problem of separately preparing firmware for the BMC version in the production network, which wastes resources, and achieves reliable and effective BMC upgrades.

[0143] Reference Figure 7 The diagram illustrates a block diagram of a BMC upgrade device provided in an embodiment of the present invention. The device may include:

[0144] The acquisition module 301 is used to acquire the current BMC version number and the target BMC version number; wherein, the BMC version number is set as a matching field and an actual version number field, the matching field includes a weak matching field, and the actual version number field includes an iteration version number;

[0145] The determination module 302 is used to compare the actual version number fields of the current BMC version number and the target BMC version number in sequence. If the iteration version numbers are inconsistent, the corresponding fields of the current BMC version number are determined.

[0146] Upgrade module 303 is used to upgrade the current BMC version based on the iteration version number and the target BMC version number when the matching field of the current BMC version number is a weak matching field.

[0147] Optionally, the determining module 302 includes:

[0148] The first determining submodule is used to compare the first field of the actual version number field of the current BMC version number and the target BMC version number to determine whether the first field is consistent.

[0149] The second determining submodule is used to compare the second field of the actual version number field of the current BMC version number and the target BMC version number if the condition is met.

[0150] The third determination submodule is used to exit BMC upgrade if no.

[0151] Optionally, the determining module 302 further includes:

[0152] The fourth determining submodule is used to determine whether the second field of the target BMC version number is consistent with the second field of the current BMC version number based on the second field of the target BMC version number.

[0153] The fifth determining submodule is used to compare the iterative version number of the actual version number field of the current BMC version number and the target BMC version number if the condition is met.

[0154] The sixth submodule determines whether to exit the BMC upgrade process if not.

[0155] Optionally, the fifth determining submodule includes:

[0156] The first determining unit is used to determine whether the iteration version number of the target version number is consistent with the iteration version number of the current BMC version number based on the iteration version number of the target version number.

[0157] The second determining unit is used to exit the BMC upgrade if the iteration version number is consistent.

[0158] The third determining unit is used to determine the corresponding field of the current BMC version number if the iteration version number is inconsistent.

[0159] Optionally, the upgrade module 303 includes:

[0160] The first upgrade submodule is used to determine, based on the iteration version number and the target BMC version number, whether the iteration version number of the target BMC version number is greater than the iteration version number of the current BMC version number when the matching field of the current BMC version number is a weak matching field.

[0161] The second upgrade submodule is used to upgrade the current BMC version if the condition is met.

[0162] The third upgrade submodule is used to exit the BMC upgrade if not.

[0163] Optionally, the upgrade module 303 further includes:

[0164] The fourth upgrade submodule is used to upgrade the current BMC version according to the target BMC version number when the matching field of the current BMC version number is a strongly matching field.

[0165] Optionally, the device further includes:

[0166] The first acquisition module is used to obtain the BMC version number corresponding to the substrate from the firmware version matching table according to the substrate type currently managed by the BMC.

[0167] The processing module is used to split the BMC version number into a matching field and an actual version number field.

[0168] The BMC upgrade method and apparatus provided in this embodiment of the invention obtains the current BMC version number and the target BMC version number. The BMC version number is pre-configured with a matching field and an actual version number field. The matching field includes a weak matching field, and the actual version number field includes an iteration version number. The actual version number fields of the current BMC version number and the target BMC version number are compared sequentially. If the iteration version numbers are inconsistent, the matching field of the current BMC version number is determined. If the matching field of the current BMC version number is a weak matching field, the current BMC version is upgraded based on the iteration version number and the target BMC version number. In this embodiment, by adding a matching field to the BMC version number, when the matching field of the current BMC version number is a weak matching field, the current BMC version is upgraded only if the iteration version number of the target BMC version number is greater than the iteration version number of the current BMC version number. This avoids the problem of separately preparing firmware for each BMC version on the live network, which wastes resources and achieves reliable and effective BMC upgrades.

[0169] This invention also provides an electronic device, such as... Figure 8 As shown, it includes a processor 401, a communication interface 402, a memory 403, and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 communicate with each other through the communication bus 404.

[0170] Memory 403 is used to store computer programs;

[0171] When processor 401 executes the program stored in memory 403, it can perform the following steps:

[0172] Obtain the current BMC version number and the target BMC version number; wherein, the BMC version number is pre-configured as a matching field and an actual version number field, the matching field includes a weak matching field, and the actual version number field includes an iteration version number; compare the actual version number fields of the current BMC version number and the target BMC version number sequentially; if the iteration version number is inconsistent, determine the matching field of the current BMC version number; if the matching field of the current BMC version number is a weak matching field, upgrade the current BMC version according to the iteration version number and the target BMC version number.

[0173] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0174] The communication interface is used for communication between the aforementioned terminal and other devices.

[0175] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0176] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0177] In another embodiment of the present invention, a computer-readable storage medium is also provided, which stores instructions that, when executed on a computer, cause the computer to perform any of the BMC upgrade methods described in the above embodiments.

[0178] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).

[0179] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0180] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0181] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.

Claims

1. A BMC upgrade method, characterized in that, The method includes: Obtain the current BMC version number and the target BMC version number; wherein, the BMC version number is pre-configured as a matching field and an actual version number field, the matching field includes a weak matching field, and the actual version number field includes an iteration version number; The actual version number fields of the current BMC version number and the target BMC version number are compared sequentially. If the iteration version number is inconsistent, the corresponding field of the current BMC version number is determined. The actual version number field also includes a first field and a second field. If the first field and the second field are consistent, but the iteration version number is inconsistent, the corresponding field of the current BMC version number is determined. If the matching field of the current BMC version number is a weak matching field, the current BMC version is upgraded according to the iteration version number and the target BMC version number; When the matching field of the current BMC version number is a weak matching field, the upgrade of the current BMC version is performed based on the iteration version number and the target BMC version number, including: If the matching field of the current BMC version number is a weak matching field, determine whether the iteration version number of the target BMC version number is greater than the iteration version number of the current BMC version number based on the iteration version number and the target BMC version number. If so, upgrade the current BMC version; If not, exit BMC upgrade.

2. The BMC upgrade method according to claim 1, characterized in that, The step involves sequentially comparing the actual version number fields of the current BMC version number and the target BMC version number. If the iteration version numbers are inconsistent, the corresponding fields for the current BMC version number are determined, including: Compare the first field of the actual version number field of the current BMC version number and the target BMC version number to determine whether the first field is consistent; If so, then compare the second field of the actual version number field of the current BMC version number and the target BMC version number; If not, exit BMC upgrade.

3. The BMC upgrade method according to claim 2, characterized in that, After comparing the second field of the actual version number field of the current BMC version number and the target BMC version number, the method further includes: Based on the second field of the target BMC version number, determine whether it is consistent with the second field of the current BMC version number; If so, then compare the iteration version number of the actual version number field of the current BMC version number and the target BMC version number; If not, exit BMC upgrade.

4. The BMC upgrade method according to claim 3, characterized in that, The step of comparing the iterative version number of the actual version number field of the current BMC version number and the target BMC version number includes: Based on the iteration version number of the target version number, determine whether it is consistent with the iteration version number of the current BMC version number; If the iteration version numbers are consistent, then exit the BMC upgrade; If the iteration version numbers are inconsistent, determine the corresponding fields for the current BMC version number.

5. The BMC upgrade method according to claim 1, characterized in that, The matching fields also include strongly matching fields. After sequentially comparing the actual version number fields of the current BMC version number and the target BMC version number, and if the iteration version numbers are inconsistent, after determining the matching fields of the current BMC version number, the process further includes: If the matching field of the current BMC version number is a strongly matched field, the current BMC version is upgraded according to the target BMC version number.

6. The BMC upgrade method according to claim 1, characterized in that, Before obtaining the current BMC version number and the target BMC version number, the process also includes: Based on the type of substrate currently managed by the BMC, obtain the corresponding BMC version number from the firmware version matching table; The BMC version number is split into a matching field and an actual version number field.

7. A BMC upgrade device, characterized in that, The device includes: The acquisition module is used to acquire the current BMC version number and the target BMC version number; wherein, the BMC version number is set as a matching field and an actual version number field, the matching field includes a weak matching field, and the actual version number field includes an iteration version number; The determination module is used to compare the actual version number fields of the current BMC version number and the target BMC version number in sequence. If the iteration version number is inconsistent, the corresponding field of the current BMC version number is determined. The actual version number field also includes a first field and a second field. If the first field and the second field are consistent, but the iteration version number is inconsistent, the corresponding field of the current BMC version number is determined. The upgrade module is used to upgrade the current BMC version based on the iteration version number and the target BMC version number when the matching field of the current BMC version number is a weak matching field. The upgrade module includes: The first upgrade submodule is used to determine, based on the iteration version number and the target BMC version number, whether the iteration version number of the target BMC version number is greater than the iteration version number of the current BMC version number when the matching field of the current BMC version number is a weak matching field. The second upgrade submodule is used to upgrade the current BMC version if the condition is met. The third upgrade submodule is used to exit the BMC upgrade if not.

8. An electronic device, characterized in that, include: A transceiver, a memory, a processor, and a program stored in the memory and executable on the processor; The processor is configured to read a program from the memory to implement the steps in the BMC upgrade method as described in any one of claims 1-6.

9. A readable storage medium for storing a program, characterized in that, When the program is executed by the processor, it implements the steps in the BMC upgrade method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Firmware upgrading method and device and shelf management module (SMM)

    CN107632846A