Firmware updating method and device, computer equipment and storage medium
By analyzing the configuration information in the head information in the target mirror file, judging the matching of the original mirror file and the target equipment, solved the problem of fixedware update errors and unable to update in existing technology, and achieved a more reliable and convenient firmware update process.
Patent Information
- Application Number
- CN202411922062.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-01-24
AI Technical Summary
In the prior art, the firmware update method has the problem of refreshing the wrong firmware image file onto the device causing device exceptions, and the failure to refresh the firmware when the in-band refresh condition is not met.
By receiving the target mirror file from the first device, the header information is analyzed to obtain the configuration information of the original mirror file, the matching of the original mirror file and the target device, and the firmware of the target device when meeting the preset conditions.
It avoids updating the wrong firmware image file to the device, reduces the difficulty of hardware wiring and electromagnetic interference processing, facilitates the production and maintenance of the device, and can update the device firmware even when in-band refresh conditions are not available.
Smart Images

Figure CN119356715A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a firmware updating method, device, computer equipment and storage medium. Background Art
[0002] Baseboard Management Controller (BMC) is usually used to remotely manage and monitor the status of the server. BMC firmware is the basis of BMC functions and includes the BMC's operating system and applications. Firmware updates are essential for fixing vulnerabilities, improving performance, and adding new features. In addition to updating its own firmware, BMC can also update the firmware of the Basic Input / Output System (BIOS), Complex Programmable Logic Device (CPLD) on various boards such as the hard disk backplane, fan board, and motherboard, as well as network cards, Redundant Array of Independent Disks Controller (RAID), Power Supply Unit (PSU), Graphics Processing Unit (GPU), and other devices.
[0003] At present, the method for updating BMC and BIOS firmware is to use the firmware image file to refresh through BMC. In this method, if the firmware image file is tampered with, the wrong firmware image file will be refreshed to the device. The firmware of CPLD, PSU and other devices is refreshed by using a burner. In this method, not only does the device need to be turned on for burning, but a burning interface must be reserved on the circuit board corresponding to the device, which causes inconvenience in production. The firmware of RAID cards, network cards, GPUs and other devices is usually refreshed in the operating system OS using the upgrade tool provided by the manufacturer, which is time-consuming and laborious, and the firmware cannot be refreshed when the in-band refresh conditions are not met. Summary of the invention
[0004] In view of this, the present invention provides a firmware update method, apparatus, computer equipment and storage medium to solve the problem of refreshing an erroneous firmware image file to a device causing device abnormality, and the inability to refresh the firmware when the in-band refresh conditions are not met.
[0005] In a first aspect, the present invention provides a firmware update method, which is applied to a baseboard management controller, and the method includes: receiving a target image file sent from a first device, the target image file includes header information and an original image file, and the original image file is used to update the firmware of the device to be updated; parsing the header information to obtain configuration information corresponding to the original image file, the configuration information includes first board information and first hardware information of the device to be updated; obtaining second board information and second hardware information corresponding to the target device; when it is determined that the original image file meets a preset condition, and the first board information is consistent with the second board information, and the first hardware information is consistent with the second hardware information, determining that the original image file matches the target device, and updating the original image file to the target device.
[0006] Based on the method of the first aspect above, a target image file sent from a first device is received, and header information in the target image file is parsed to obtain configuration information corresponding to the original image file in the target image file; and based on the configuration information, it is determined whether the original image file matches the target device, and when it is determined that the original image file matches the target device, the original image file is updated to the target device.
[0007] Because before updating the original image file to the target device, the configuration information can be first parsed based on the header information in the target image file to determine whether the original image file matches the target device, and then determine whether the original image file is the firmware file that is expected to be updated, it is avoided to update the original image file to an unmatched target device, and to avoid device downtime and device malfunction caused by updating the wrong firmware image file to the device firmware. Because there is no need to update the device firmware through burning software, there is no need to leave burning sockets or pins on the circuit board of the device hardware, which reduces the difficulty of hardware wiring and electromagnetic interference processing, and facilitates the production and maintenance of the device. In addition, since the original image file is updated to the target device, there is no need to perform in-band updates in the operating system. Therefore, the device firmware can be updated even when the in-band refresh conditions are not met.
[0008] In an optional embodiment, obtaining the second board information corresponding to the target device includes: sending a read instruction to a universal input-output integrated circuit deployed on the target board where the target device is located, the read instruction is used to read multiple pin level values of the universal input-output integrated circuit; based on the multiple pin level values and the corresponding relationship, determining the second board information.
[0009] In this embodiment, the second board information of the target device can be determined by reading the universal input and output integrated circuit deployed on the target board where the target device is located, so as to facilitate the subsequent determination of whether the second board information of the target device is consistent with the first board information in the configuration information, so as to judge whether the original image file matches the target device.
[0010] In an optional implementation, the configuration information also includes a first firmware type identifier of the device to be updated and a first version number corresponding to the original image file; determining that the original image file meets the preset conditions includes: obtaining a second version number of the firmware of the target device at the current moment and a second firmware type identifier corresponding to the target device; when the second firmware type identifier is consistent with the first firmware type identifier and the second version number is less than the first version number, determining that the original image file meets the preset conditions.
[0011] In this implementation, the version number of the original image file can be compared with the current version number of the target device to confirm that the firmware version to be updated to the target device is higher than the current firmware version; in addition, the first firmware type identifier of the original image file is compared with the second firmware type identifier of the target device to confirm that the firmware type of the target device is consistent with the firmware type of the original image file, that is, to determine that the original image file meets the preset conditions, so as to avoid updating the firmware image file of the wrong firmware type to the target device.
[0012] In an optional implementation, the configuration information also includes update condition information of the device to be updated; updating the original image file to the target device includes: obtaining the device status of the target device at the current moment and the server status of the target server where the target device is located; determining whether both the device status and the server status meet the update condition information; if so, updating the original image file to the target device.
[0013] In this implementation, based on the device status of the target device at the current moment and the server status of the target server where the target device is located, it can be determined whether the device status and server status of the target device can both meet the update conditions, and if the update conditions are met, the original image file is updated to the target device so that the original image file can be updated to the target device normally.
[0014] In a second aspect, the present invention provides another firmware update method, which is applied to a first device; the method includes: obtaining an expected firmware type parameter and a target image path; based on the target image path, obtaining an original image file from the target image path, the original image file is used to update the firmware of the device to be updated; according to the expected firmware type parameter, determining a target configuration file corresponding to the expected firmware type parameter, the target configuration file includes first board information and first hardware information of the device to be updated; generating header information according to the first hardware information and the first board information; packaging the original image file and the header information into a target image file, and sending the target image file to a baseboard management controller, the target image file is used to determine that the original image file matches the target device, and update the original image file to the target device.
[0015] Based on the method of the second aspect above, the expected firmware type parameter and the target image path can be obtained, and based on the target image path and the target image path, the original image file and the target configuration file can be obtained, and according to the first hardware information and the first board information in the target configuration file, the header information is generated, the original image file and the header information are packaged into a target image file, and the target image file is sent to the baseboard management controller.
[0016] Since the first hardware information and the first board information included in the target configuration file corresponding to the original image file can be pre-generated into header information, and the original image file and the header information can be packaged into a target image file and sent to the baseboard management controller, so that when the baseboard management controller updates the firmware of the target device, it can determine whether the original image file matches the target device based on the header information in the target image file, and then determine whether the original image file is the firmware file expected to be updated, so as to avoid updating the original image file to the unmatched target device, and avoid device downtime and device function abnormality caused by updating the wrong firmware image file to the device firmware. Since there is no need to update the device firmware through the burning software, there is no need to leave a burning socket or pin on the circuit board of the device hardware, which reduces the difficulty of hardware wiring and electromagnetic interference processing, and facilitates the production and maintenance of the device. In addition, since the original image file is updated to the target device, there is no need to perform in-band update in the operating system, so the device firmware can be updated when the in-band refresh condition is not met.
[0017] In an optional implementation, the target configuration file also includes a firmware type identifier of the device to be updated; the header information also includes a first firmware type identifier; the firmware type identifier is a first string in a first base; the first string is converted into a second string in a binary base, and the second string is left-shifted to obtain the first firmware type identifier; or, the first string is assigned a value to obtain the first firmware type identifier.
[0018] In this implementation, the first firmware type identifier in the header information can be determined based on the firmware type identifier in the target configuration file, so that the baseboard management controller can subsequently determine whether the original image file matches the target device based on the first firmware type identifier in the header information.
[0019] In an optional embodiment, determining a target configuration file corresponding to the expected firmware type parameter according to the expected firmware type parameter includes: determining the firmware type of the device to be updated corresponding to the expected firmware type parameter according to the expected firmware type parameter and a first corresponding relationship, the first corresponding relationship being the corresponding relationship between the expected firmware type parameter and the firmware type; determining the target configuration file corresponding to the firmware type according to the firmware type and a second corresponding relationship, the second corresponding relationship being the corresponding relationship between the firmware type and the target configuration file.
[0020] In this implementation, the firmware type of the device to be updated can be determined based on the expected firmware type parameter, and then the target configuration file corresponding to the firmware type can be determined, so that the header information in the target image file can be determined based on the information in the target configuration file, and the baseboard management controller can determine whether the original image file matches the target device based on the header information.
[0021] In an optional embodiment, the first hardware information includes platform information and central processing unit information; the platform information is used to indicate the platform type of the baseboard management controller deployed on the server where the device to be updated is deployed; the central processing unit information is used to indicate the type of central processing unit deployed on the server where the device to be updated is deployed.
[0022] In this implementation, the first hardware information can be used to limit the scope of use of the original image file, that is, to limit the platform type and central processing unit type of the original image file, so as to facilitate the subsequent determination of whether the target device is within the scope of use of the first hardware information corresponding to the original image file, and then determine whether the original image file matches the target device.
[0023] In an optional embodiment, the target configuration file also includes update condition information of the device to be updated, and the update condition information is used to indicate that the baseboard management controller deployed on the server of the device to be updated needs to be restarted to start updating, or needs to be restarted after the server is restarted to start updating, or needs to restart the server's operating system to start refreshing, or starts refreshing immediately, or needs to shut down the device to be refreshed to start refreshing.
[0024] In this embodiment, the update condition information is used to determine whether the relevant update conditions of the target device meet the update conditions required by the original image file, so as to facilitate the subsequent baseboard management controller to pre-determine whether the update conditions required by the original image file are met before updating the firmware, thereby avoiding the problem of firmware update failure due to failure to meet the update conditions.
[0025] In an optional implementation, the target configuration file also includes manufacturer information and device model information, the manufacturer information is used to indicate the manufacturer of the device to be updated, and the device model information is used to indicate the device model of the device to be updated. The method also includes: determining a firmware type identifier of the device to be updated based on the manufacturer information and the device model information; or determining a firmware type identifier corresponding to the firmware type based on the firmware type and a third corresponding relationship, the third corresponding relationship being a corresponding relationship between the firmware type and the firmware type identifier.
[0026] In this embodiment, the firmware type identifier of the device to be updated can be determined, so that the first firmware type identifier in the header information can be determined based on the firmware type identifier, thereby facilitating the baseboard management controller to judge whether the first firmware type identifier matches the firmware type of the target device before updating the original image file to the target device, and further determine whether the original image file matches the target device.
[0027] In an optional implementation, the target configuration file further includes a custom description field; the custom description field is used to indicate whether the firmware type belongs to a custom firmware type.
[0028] In this embodiment, the custom firmware type is a custom or customer-customized device firmware type. The target configuration file includes the custom firmware type, and header information can be written to facilitate the subsequent baseboard management controller to identify whether the device to be updated is a custom or customer-customized device firmware type based on the custom firmware type in the header information, and then based on the firmware update method corresponding to the custom or customer-customized device firmware type, perform firmware update on the target device.
[0029] In a third aspect, the present invention provides a firmware update device, which is applied to a baseboard management controller, and the device includes: a first transceiver module, which is used to receive a target image file sent from a first device, the target image file includes header information and an original image file, and the original image file is used to update the firmware of the device to be updated; a first processing module, which is used to parse the header information to obtain configuration information corresponding to the original image file, and the configuration information includes first board information and first hardware information of the device to be updated; the first transceiver module is also used to obtain second board information and second hardware information corresponding to the target device; the first processing module is also used to determine that the original image file matches the target device when it is determined that the original image file meets a preset condition, and the first board information is consistent with the second board information, and the first hardware information is consistent with the second hardware information, and the original image file is updated to the target device.
[0030] In a fourth aspect, the present invention provides another firmware updating device, which is applied to a first device; the device includes: a second transceiver module, which is used to obtain an expected firmware type parameter and a target image path; a second transceiver module, which is used to obtain an original image file from a target image path based on the target image path, and the original image file is used to update the firmware of the device to be updated; a second processing module, which is used to determine a target configuration file corresponding to the expected firmware type parameter according to the expected firmware type parameter, and the target configuration file includes first board information and first hardware information of the device to be updated; the second processing module is also used to generate header information according to the first hardware information and the first board information; the second processing module is also used to package the original image file and the header information into a target image file, and send the target image file to a baseboard management controller, and the target image file is used to determine that the original image file matches the target device, and update the original image file to the target device.
[0031] In a fifth aspect, the present invention provides a firmware update system, which includes a first device and a baseboard management controller.
[0032] The first device is used to obtain an expected firmware type parameter and a target image path; based on the target image path, an original image file is obtained from the target image path, and the original image file is used to update the firmware of the device to be updated; according to the expected firmware type parameter, a target configuration file corresponding to the expected firmware type parameter is determined, and the target configuration file includes first board information and first hardware information of the device to be updated; according to the first hardware information and the first board information, header information is generated; the original image file and the header information are packaged into a target image file, and the target image file is sent to a baseboard management controller, and the target image file is used to determine that the original image file matches the target device, and the original image file is updated to the target device.
[0033] The baseboard management controller is used to receive a target image file sent from a first device, the target image file includes header information and an original image file, and the original image file is used to update the firmware of the device to be updated; parse the header information to obtain configuration information corresponding to the original image file, the configuration information includes first board information and first hardware information of the device to be updated; obtain second board information and second hardware information corresponding to the target device; when it is determined that the original image file meets a preset condition, and the first board information is consistent with the second board information, and the first hardware information is consistent with the second hardware information, determine that the original image file matches the target device, and update the original image file to the target device.
[0034] In a sixth aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the firmware update method of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions, or executes the firmware update method of the above-mentioned second aspect or any corresponding embodiment thereof.
[0035] In the seventh aspect, the present invention provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to enable a computer to execute the firmware update method of the above-mentioned first aspect or any corresponding embodiment thereof, or to execute the firmware update method of the above-mentioned second aspect or any corresponding embodiment thereof.
[0036] In an eighth aspect, the present invention provides a computer program product, comprising computer instructions, wherein the computer instructions are used to enable a computer to execute the firmware update method of the above-mentioned first aspect or any corresponding embodiment thereof, or to execute the firmware update method of the above-mentioned second aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0038] Figure 1 is a topology diagram of a firmware update system for a device according to an embodiment of the present invention; Figure 2 is a flowchart of a firmware update method according to an embodiment of the present invention; Figure 3 is a flowchart of another firmware update method according to an embodiment of the present invention; Figure 4 is a flowchart of another firmware update method according to an embodiment of the present invention; Figure 5 is a structural block diagram of a firmware updating device according to an embodiment of the present invention; Figure 6 is a structural block diagram of a firmware updating device according to an embodiment of the present invention; Figure 7 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0040] The embodiment of the present invention is applied to the scenario where the BMC updates its own firmware and the BMC updates the firmware of other devices.
[0041] In the related art, the BMC uses a firmware image file to update the BMC and BIOS firmware, which has low security. If the firmware image file is tampered with, and a tampered firmware image file is refreshed to a device that does not match the firmware image file, it will cause downtime, malfunction and other problems, causing troubles in production and maintenance. What's more serious is that it will cause great misleading in problem troubleshooting, because maintenance personnel sometimes easily ignore the misuse of the image.
[0042] Users use a burner to update the firmware of CPLD, FPGA, MCU, PSU and other devices. On the one hand, it is necessary to leave burning sockets and pins on the hardware circuit board, which will increase the difficulty of hardware wiring and electromagnetic interference processing. On the other hand, it is very inconvenient to produce and maintain, and a burner and burning software must be used, and the machine must be turned on for burning.
[0043] The way that users use in-band upgrade tools to update the firmware of various PCIE devices such as RAID cards, network cards, GPUs, etc. in the operating system requires installation and debugging of drivers and upgrade software for each device that needs to be updated during production and maintenance, which is time-consuming and labor-intensive, and is likely to be difficult for most non-professional users. In addition, during the process of updating the device's firmware, if the server is not deployed with an operating system or the firmware update condition requires shutdown, the in-band refresh method cannot be implemented.
[0044] In order to solve the above technical problems, an embodiment of the present invention provides a firmware update method, which receives a target image file sent from a first device, and when it is determined based on header information in the target image file that the original image file in the target image file matches the target device, updates the firmware of the target device, so as to improve the reliability of the firmware update.
[0045] Below Figure 1 Taking the firmware update system 100 of the device shown as an example, the method provided in the embodiment of the present application is described. Figure 1It is only a schematic diagram and does not constitute a limitation on the applicable scenarios of the technical solution provided in this application.
[0046] like Figure 1 As shown, Figure 1 is a topology diagram of a firmware update system for devices according to an embodiment of the present invention. Figure 1 In the embodiment, the firmware update system 100 may include a baseboard management controller 101 , a first device 102 , and a second device 103 .
[0047] The baseboard management controller 101 in the embodiment of the present invention may be a controller (Baseboard Management Controller, BMC) integrated in a server, a network device, or other computer systems. The BMC may update the firmware of other devices, or update its own firmware.
[0048] The first device 102 in the embodiment of the present invention may be any device having communication functions and computing functions, and the device is deployed with an image creation tool (CreateHPMImage tool). For example, the first device 102 may be a server, a cloud server, or a virtual machine. The CreateHPMImage tool has a display interface, and the user can input parameters related to the firmware update through the display interface.
[0049] The second device 103 in the embodiment of the present invention may be other device modules except BMC, for example, other devices may be BIOS system, CPLD, PSU, RAID, GPU or other PCIE type devices.
[0050] Figure 1 The firmware update system 100 shown is only used as an example and is not used to limit the technical solution of the present application. Those skilled in the art should understand that in the specific implementation process, the firmware update system 100 may also include other second devices without limitation.
[0051] According to an embodiment of the present invention, a firmware update method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0052] In this embodiment, a firmware update method is provided, which can be used for the first device mentioned above. Figure 2 is a flowchart of a firmware update method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps: S201: Obtain expected firmware type parameters and target image path.
[0053] The expected firmware type parameter may be used to indicate the firmware type of the original image file that is expected to be packaged.
[0054] The target image path is the path where the firmware image file required by the device to be updated is stored.
[0055] Exemplarily, the first device obtains the expected firmware type parameter and the target image path in response to the user's input parameter operation on the deployed image creation tool.
[0056] For example, taking the input parameter "bmc arg2 arg3 ... argx" as an example, "bmc" is the expected firmware type parameter obtained by the first device, "arg2", "arg3", and "argx" are the target original image paths obtained by the first device. "arg2" can be "bmc1.ima"; "arg3" can be "bmc2.ima".
[0057] It can be understood that the original image files corresponding to "arg2", "arg3" and "argx" are all image files of the "bmc" firmware type. The expected firmware type parameter can also be bios or GPU.
[0058] S202: Based on the target image path, obtain the original image file from the target image path.
[0059] The original image file is used to update the firmware of the device to be updated.
[0060] It is understandable that the target original image path may be one or more and correspondingly, the original image file may be one or more.
[0061] S203: Determine a target configuration file corresponding to the expected firmware type parameter according to the expected firmware type parameter.
[0062] The target configuration file may be called a *.conf file and includes the first board information of the device to be updated, the first hardware information, the firmware type identifier of the device to be updated, the custom description field, the update condition information of the device to be updated, the first version number, the manufacturer information and the device model information.
[0063] In some optional implementations, the first device determines the firmware type of the device to be updated corresponding to the expected firmware type parameter based on the expected firmware type parameter and the first correspondence; and determines the target configuration file corresponding to the device type based on the firmware type and the second correspondence.
[0064] The first corresponding relationship is the corresponding relationship between the expected firmware type parameter and the firmware type. The second corresponding relationship is the corresponding relationship between the firmware type and the target configuration file.
[0065] Exemplarily, taking the expected firmware type parameter as "bmc" as an example, the first device determines, based on "bmc" and the first correspondence, that the firmware type of the device to be updated corresponding to the expected firmware type parameter is the bmc firmware type; and determines, based on the bmc firmware type and the second correspondence, that the target configuration file corresponding to the device type is the bmc.conf file.
[0066] The first board information is also called the board number (also called boardid). The boardid can be the motherboard ID, or the hard disk backplane ID, universal baseboard (ubb) ID, or switch board (SW) ID of the CPLD device to be updated. There is no restriction. The boardid is a 1-byte value. For example, boardid1=0x5 for motherboard type 1, and boardid2=0x82 for motherboard type 2. The value corresponding to the boardid can be the value given when the hardware board is designed.
[0067] The first hardware information is also called the platform number (also called PlatformID). The first hardware information includes platform information and central processing unit information. The platform information is used to indicate the platform type of the baseboard management controller deployed on the server where the device to be updated is deployed. The central processing unit information is used to indicate the type of central processing unit deployed on the server where the device to be updated is deployed. PlatformID is a 1-byte (8-bit) value. Among them, each bit or a combination of several bits in the 8-bit represents a configuration. For example, bit[1:0]=0 represents the 7th generation product; bit[1:0]=1 represents the 8th generation product; bit[3:2]=0 represents that the code platform of the BMC is the first model baseboard management controller; bit[3:2]=1 represents that the code platform of the BMC is an open source baseboard management controller; bit[7:5]=0 represents the first model CPU; bit[7:5]=1 represents the second model CPU; bit[7:5]=2 represents the third model CPU.
[0068] It is understandable that boardid or PlatformID can be used to limit the scope of use of the image file. For example, for a bmc firmware image file, boardid can be configured as boardid0=0x82, boardid1=0x85, which means that the image file can only be updated to the project with the motherboard ID of 0x82 or the project with the motherboard ID of 0x85. If the image file is updated to other unmatched projects, the BMC will fail the verification and terminate the refresh.
[0069] Since there are many types of boards, many of which have CPLDs that need to have their firmware updated, boardid can distinguish and determine the board type of the CPLD firmware to be updated. For example, in the target configuration file of the CPLD firmware type, boardid0=0xf2, based on which it can be determined that the board type of the CPLD firmware to be updated is the hard disk backplane; for another example, in the target configuration file of the CPLD firmware type, boardid0=0xf3, based on which it can be determined that the board type of the CPLD firmware to be updated is the SW board.
[0070] The firmware type identifier of the device to be updated is a first character string in the first base. The first base can be decimal. The firmware type identifier is also called component-id. For example, component-id can be BMC-1, BIOS-2, MMC-3, ME-4, which respectively indicate that the firmware type can be BMC firmware type, BIOS firmware type, MMC firmware type, and ME firmware type.
[0071] It can be understood that in the target configuration file, each additional firmware type corresponds to an additional component-id value.
[0072] The manufacturer information is used to indicate the manufacturer of the device to be updated. The manufacturer information may be a manufacturer identifier (also called a ManufactureID). The device model information is used to indicate the device model of the device to be updated. The device model information may be a device identifier (DeviceID).
[0073] In one example, the first device determines the firmware type identifier of the device to be updated according to the manufacturer information and the device model information; or determines the firmware type identifier corresponding to the firmware type according to the firmware type and the third corresponding relationship.
[0074] The third corresponding relationship is a corresponding relationship between a firmware type and a firmware type identifier.
[0075] It can be understood that ManufactureID and DeviceID can jointly determine the firmware type of the device to be updated, that is, ManufactureID and DeviceID can replace component-id as a supplement or backup information of the above component-id. When updating the firmware of a device that can read ManufactureID and DeviceID, the device to be updated can be more accurately determined based on ManufactureID and DeviceID, and the problem of insufficient component-id due to too many types of devices can be solved. It can also handle the situation where a component-id must be added because the devices are of the same type (for example, all raid cards) but are of different models or different manufacturers.
[0076] The custom description field is used to indicate whether the firmware type belongs to a custom firmware type. The custom description field is also called FwDescription. The custom description field is a string. For some special or customized components, this field can also be used to distinguish whether it belongs to a custom firmware type.
[0077] Different from a target configuration file corresponding to the expected firmware type parameter, when the custom description field indicates that the firmware type belongs to a custom firmware type, the target configuration file corresponding to the custom firmware type is a custom configuration file (custom.conf file).
[0078] In the custom.conf file, component-id is a fixed value (also called CUSTOMIZED). For example, component-id is 0xA. component-id can also be other component-id values that are not used by other firmware types.
[0079] In the custom.conf file, the value of FwDescription is used to define different custom firmware types. For example, if FwDescription = "yyy", the custom firmware type is yyy. The CUSTOMIZED type is not actually a firmware type corresponding to a specific physical device. The CUSTOMIZED type refers to all special or customized devices.
[0080] The update condition information is used to indicate that the baseboard management controller deployed on the server of the device to be updated needs to be restarted before the update begins, or the server needs to be restarted before the update begins, or the server's operating system needs to be restarted before the update begins, or the update begins immediately, or the device to be updated needs to be shut down before the update begins. The update condition information is also called Activate. Activate is a 1-byte value. Each bit of 1 Byte represents a different condition for starting the update. For example, bit[0]: resetbmc, indicating that the update needs to be started after the bmc is restarted; bit[1]: dcpowercycle, indicating that the update needs to be started after the server is restarted; bit[2]: systemreboot, indicating that the update needs to be started after the system is restarted; bit[3]: automatic, indicating that the update starts automatically or immediately; bit[4]: poweroff, indicating that the update needs to be started after the power is shut down.
[0081] The first version number is used to indicate the version number of the original image file. There are two rules for the first version number. One is that the first version number includes three segments: Major, Minor, and Aux, and each segment is represented by a 1-byte or several-byte numerical value. For example, the first version number of a BMC image file includes: FwVersionMajor=0x01, FwVersionMinor=12, FwVersionAux=0x00; that is, the version number of the BMC image file is 1.12.00. The other is that the first version number is an irregularly named version number, that is, the first version number can use a string as the version number. In principle, this method can accommodate version numbers of any format and any length. For example, the first version number of a PSU image file is FwVersion="000.111.222.333.444.x"; that is, the version number of the PSU image file is 000.111.222.333.444.x.
[0082] S204: Generate header information according to the first hardware information and the first board information.
[0083] The header information includes first hardware information, first board information, a custom description field, update condition information, a first version number, manufacturer information, device model information and a first firmware type identifier.
[0084] The first firmware type identifier is also called header->Components.
[0085] In one example, the first device converts the first string into a second binary string, and performs a left shift operation on the second string to obtain a first firmware type identifier; or performs an assignment operation on the first string to obtain the first firmware type identifier.
[0086] The binary system can be the binary numeral system.
[0087] In one example, the first device converts the first string into a second string in the second binary system through the CreateHPMImage tool, and determines the value after performing a left shift operation (1 << component-id) on the second string as the first firmware type identifier (header->Components) of the header information.
[0088] For example, taking the first string with component-id being 1 as an example, the first device converts the first string into a second string in the second binary system, and the value obtained by performing a left shift operation on the second string is 2, that is, header->Components in the header information is 2.
[0089] It can be understood that since header->Components is a 32-bit value, header->Components can accommodate at most 32 firmware types. This way of determining the first firmware type identifier can be relatively concise in coding and logic, convenient for calculation operations, and can also limit the firmware types to prevent random definition of firmware types.
[0090] Furthermore, when the number of firmware types is greater than 32, the above way of determining the first firmware type identifier is no longer applicable. Therefore, the first device directly assigns the firmware type identifier (component-id) to header->Components, that is, header->Components = component-id. It can be understood that this way of determining the first firmware type identifier no longer limits the number of firmware types.
[0091] S205: Package the original image file and the header information into a target image file, and send the target image file to the baseboard management controller.
[0092] Among them, the target image file is used to determine that the original image file matches the target device, and update the original image file to the target device.
[0093] It can be understood that the target image file can include original image files of multiple firmware types, that is, the header information corresponding to each original image file. Correspondingly, the target device can also be multiple types of devices.
[0094] Based on the above Figure 2In the method shown, the first device can generate header information by pre-installing the first hardware information and the first board information included in the target configuration file corresponding to the original image file, and pack the original image file and the header information into a target image file, and send it to the baseboard management controller, so that when the baseboard management controller updates the firmware of the target device, it determines whether the original image file matches the target device based on the header information in the target image file, and then determines whether the original image file is the firmware file expected to be updated, so as to avoid updating the original image file to the unmatched target device, and avoid device downtime and device function abnormality caused by updating the wrong firmware image file to the device firmware. Since there is no need to update the device firmware through the burning software, there is no need to leave a burning socket or pin on the circuit board of the device hardware, which reduces the difficulty of hardware wiring and electromagnetic interference processing, and facilitates the production and maintenance of the device. In addition, since the original image file is updated to the target device, there is no need to perform in-band update in the operating system, so the device firmware can be updated when the in-band refresh conditions are not met.
[0095] It can be understood that after the first device sends the target image file to the baseboard management controller, another firmware update method is provided in this embodiment, which can be used for the above-mentioned baseboard management controller. Figure 3 is a flowchart of another firmware update method according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps: S301: receiving a target image file sent from a first device.
[0096] The target image file includes the original image file and header information. The original image file is used to update the firmware of the device to be updated.
[0097] S302: Parse the header information to obtain configuration information corresponding to the original image file.
[0098] The configuration information includes first board information, first hardware information, a first firmware type identifier, a first version number corresponding to the original image file, and update condition information of the device to be updated.
[0099] S303: Acquire second board information and second hardware information corresponding to the target device.
[0100] In some optional implementations, the baseboard management controller sends a read instruction to a general purpose input / output integrated circuit deployed on a target board where the target device is located; and determines the second board information based on multiple pin level values and corresponding relationships.
[0101] The read instruction is used to read the level values of multiple pins of the general input and output integrated circuit.
[0102] Each pin level value in the multiple pin level values can be a high level value (high level is 1) or a low level value (low level is 0). For example, the multiple pin level values can be 8 level values. The 8 level values form a 1 Byte (8 bit) value as the second board information.
[0103] S304: When it is determined that the original image file meets the preset conditions, the first board information is consistent with the second board information, and the first hardware information is consistent with the second hardware information, it is determined that the original image file matches the target device, and the original image file is updated to the target device.
[0104] In some optional embodiments, the baseboard management controller obtains the second version number of the firmware of the target device at the current moment and the second firmware type identifier corresponding to the target device; when the second firmware type identifier is consistent with the first firmware type identifier and the second version number is less than the first version number, it is determined that the original image file meets the preset conditions.
[0105] In some optional implementations, the baseboard management controller obtains the device status of the target device and the server status of the target server where the target device is located at the current moment; determines whether both the device status and the server status meet the update condition information; if so, updates the original image file to the target device.
[0106] It is understandable that when the baseboard management controller determines that the device status and server status do not meet the update condition information, it stops updating the original image file to the target device. For example, taking the firmware of BIOS and motherboard CPLD as an example, the BMC parses the update condition information Activate from the header information of the target image file and finds that bit [4] = 1, that is, the update condition information is to perform firmware update when the device needs to be shut down; at this time, the baseboard management controller obtains the device status of the target device at the current moment (for example, the power on / off status), and does not update the original image file to the target device until the device status obtained is the shutdown state, that is, the update condition information is met, and then updates its firmware.
[0107] Optionally, when the baseboard management controller obtains the configuration information corresponding to the original image file and the first firmware type identifier corresponds to a custom firmware type (CUSTOMIZED firmware type), the BMC may determine the firmware update method corresponding to the device of the custom firmware type according to the character string in the parsed FwDescription.
[0108] Understandably, a task to upgrade CUSTOMIZED type firmware can be created in BMC. In this way, when a new firmware type device needs to be updated, BMC does not need to add a new firmware type. Instead, it only needs to add a new device firmware update method corresponding to FwDescription in the task to upgrade CUSTOMIZED type firmware, and the code changes are relatively small.
[0109] In some optional embodiments, the baseboard management controller receives at least one target image file sent from the first device, each target image file includes header information and an original image file, and each original image file is used to update the firmware of a device; parses each target image file including the header information to obtain configuration information corresponding to the original image file; based on the configuration information corresponding to each original image file and the device information of each device, determines whether each original image file matches each device; if each original image file matches each device, updates at least one original image file to the corresponding device.
[0110] The device information of each device may include the device's board information, hardware information, firmware type identification, update condition information, version number, manufacturer information, and device model information.
[0111] It is understandable that BMC can support updating multiple device firmwares at the same time. When receiving at least one target image file corresponding to multiple device firmwares at the same time, BMC parses the target image file, obtains the original image file corresponding to each device firmware, puts it into the queue to be updated, and waits for the update of one original image file to be completed before starting the update of another original image file. Alternatively, BMC can also start multiple update tasks and update the firmware of multiple devices that can be updated at the same time.
[0112] Based on the above Figure 3 According to the method, before updating the original image file to the target device, the baseboard management controller can first parse the configuration information based on the header information in the target image file, determine whether the original image file matches the target device, and then determine whether the original image file is the firmware file expected to be updated, thereby avoiding updating the original image file to an unmatched target device, and avoiding device downtime and device malfunction caused by updating the wrong firmware image file to the device firmware. Since there is no need to update the device firmware through burning software, there is no need to leave burning sockets or pins on the circuit board of the device hardware, which reduces the difficulty of hardware wiring and electromagnetic interference processing and facilitates the production and maintenance of the device. In addition, since the original image file is updated to the target device, there is no need to perform in-band update in the operating system. Therefore, the device firmware can be updated even when the in-band refresh conditions are not met.
[0113] In this embodiment, another firmware update method is provided, which can be used for the above-mentioned baseboard management controller. Figure 4 is a flowchart of another firmware update method according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps: S401: The baseboard management controller receives a target image file sent from a first device.
[0114] S402: Parse the header information in the target image file to obtain the boardid, the first version number, the component-id and the refresh condition information corresponding to the original image file in the target image file.
[0115] S403: Determine whether the boardid corresponding to the original image file is consistent with the boardid of the target device.
[0116] S404: If not, stop the firmware update.
[0117] S405: If yes, obtain the original image file from the target image file.
[0118] S406: Determine whether the component-id corresponding to the original image file is a CUSTOMIZED firmware type.
[0119] S407: If the firmware type is CUSTOMIZED, then detect whether the target device at the current moment meets the refresh condition information corresponding to the CUSTOMIZED firmware type; if not, continue to detect the target device until the refresh condition information is met.
[0120] S408: If yes, then based on the firmware update process corresponding to the CUSTOMIZED firmware type, the original image file is sent to the target device for firmware update.
[0121] S409: If it is not the CUSTOMIZED firmware type, then detect whether the target device at the current moment meets the refresh condition information corresponding to the corresponding firmware type; if not, continue to detect the target device until the refresh condition information is met.
[0122] S410: If yes, then based on the firmware update process corresponding to the firmware type corresponding to the component-id, the original image file is sent to the target device to perform the firmware update.
[0123] In this embodiment, a firmware update system is also provided, which is used to implement the above embodiments and preferred implementation modes, and the parts that have been described are not repeated here. The system firmware update system includes a first device and a baseboard management controller.
[0124] The first device is used to obtain an expected firmware type parameter and a target image path; based on the target image path, an original image file is obtained from the target image path, and the original image file is used to update the firmware of the device to be updated; according to the expected firmware type parameter, a target configuration file corresponding to the expected firmware type parameter is determined, and the target configuration file includes first board information and first hardware information of the device to be updated; according to the first hardware information and the first board information, header information is generated; the original image file and the header information are packaged into a target image file, and the target image file is sent to a baseboard management controller, and the target image file is used to determine that the original image file matches the target device, and the original image file is updated to the target device.
[0125] The baseboard management controller is used to receive a target image file sent from a first device, the target image file includes header information and an original image file, and the original image file is used to update the firmware of the device to be updated; parse the header information to obtain configuration information corresponding to the original image file, the configuration information includes first board information and first hardware information of the device to be updated; obtain second board information and second hardware information corresponding to the target device; when it is determined that the original image file meets a preset condition, and the first board information is consistent with the second board information, and the first hardware information is consistent with the second hardware information, determine that the original image file matches the target device, and update the original image file to the target device.
[0126] In this embodiment, a firmware update device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0127] This embodiment provides a firmware update device, such as Figure 5 As shown, Figure 5 1 is a structural block diagram of a firmware update device according to an embodiment of the present invention; the device is applied to a baseboard management controller, and includes: The first transceiver module 501 is used to receive a target image file sent from a first device. The target image file includes header information and an original image file. The original image file is used to update the firmware of the device to be updated.
[0128] The first processing module 502 is used to parse the header information to obtain configuration information corresponding to the original image file, where the configuration information includes first board information and first hardware information of the device to be updated.
[0129] The first transceiver module 501 is further used to obtain the second board information and the second hardware information corresponding to the target device.
[0130] The first processing module 502 is also used to determine that the original image file matches the target device and update the original image file to the target device when it is determined that the original image file meets the preset conditions, the first board information is consistent with the second board information, and the first hardware information is consistent with the second hardware information.
[0131] In some optional embodiments, the first transceiver module 501 is specifically used to send a read instruction to a universal input-output integrated circuit deployed on a target board where a target device is located, and the read instruction is used to read multiple pin level values of the universal input-output integrated circuit; based on the multiple pin level values and the corresponding relationship, determine the second board information.
[0132] In some optional embodiments, the configuration information also includes a first firmware type identifier of the device to be updated and a first version number corresponding to the original image file; the first processing module 502 is specifically used to obtain the second version number of the firmware of the target device at the current moment and the second firmware type identifier corresponding to the target device; when the second firmware type identifier is consistent with the first firmware type identifier and the second version number is less than the first version number, it is determined that the original image file meets the preset conditions.
[0133] In some optional implementations, the configuration information also includes update condition information of the device to be updated; the first processing module 502 is also specifically used to obtain the device status of the target device at the current moment and the server status of the target server where the target device is located; determine whether the device status and the server status both meet the update condition information; if so, update the original image file to the target device.
[0134] This embodiment provides another firmware update device, such as Figure 6 As shown, Figure 6 is a structural block diagram of a firmware update device according to an embodiment of the present invention; applied to a first device, the device includes: The second transceiver module 601 is used to obtain the expected firmware type parameter and the target image path.
[0135] The second transceiver module 601 is used to obtain an original image file from the target image path based on the target image path, and the original image file is used to update the firmware of the device to be updated.
[0136] The second processing module 602 is used to determine a target configuration file corresponding to the expected firmware type parameter according to the expected firmware type parameter, where the target configuration file includes first board information and first hardware information of the device to be updated.
[0137] The second processing module 602 is further configured to generate header information according to the first hardware information and the first board information.
[0138] The second processing module 602 is further used to package the original image file and the header information into a target image file, and send the target image file to the baseboard management controller. The target image file is used to determine whether the original image file matches the target device, and update the original image file to the target device.
[0139] In some optional embodiments, the target configuration file also includes a firmware type identifier of the device to be updated; the header information also includes a first firmware type identifier; the firmware type identifier is a first string in the first base; the second processing module 602 is also used to convert the first string into a second string in the binary system, and perform a left shift operation on the second string to obtain the first firmware type identifier; or, perform an assignment operation on the first string to obtain the first firmware type identifier.
[0140] In some optional embodiments, the second processing module 602 is specifically used to determine the firmware type of the device to be updated corresponding to the expected firmware type parameter based on the expected firmware type parameter and the first corresponding relationship, where the first corresponding relationship is the corresponding relationship between the expected firmware type parameter and the firmware type; and determine the target configuration file corresponding to the firmware type based on the firmware type and the second corresponding relationship, where the second corresponding relationship is the corresponding relationship between the firmware type and the target configuration file.
[0141] In some optional embodiments, the first hardware information includes platform information and central processing unit information; the platform information is used to indicate the platform type of the baseboard management controller deployed on the server where the device to be updated is deployed; the central processing unit information is used to indicate the type of central processing unit deployed on the server where the device to be updated is deployed.
[0142] In some optional embodiments, the target configuration file also includes update condition information of the device to be updated, and the update condition information is used to indicate that the baseboard management controller deployed on the server of the device to be updated needs to be restarted before the update starts, or the server needs to be restarted before the update starts, or the server's operating system needs to be restarted before the update starts, or the update starts immediately, or the device to be updated needs to be shut down before the update starts.
[0143] In some optional implementations, the target configuration file also includes manufacturer information and device model information, the manufacturer information is used to indicate the manufacturer of the device to be updated, and the device model information is used to indicate the device model of the device to be updated. The second processing module 602 is also used to determine the firmware type identifier of the device to be updated based on the manufacturer information and the device model information; or, determine the firmware type identifier corresponding to the firmware type based on the firmware type and the third corresponding relationship, and the third corresponding relationship is the corresponding relationship between the firmware type and the firmware type identifier.
[0144] In some optional implementations, the target configuration file further includes a custom description field; the custom description field is used to indicate whether the firmware type belongs to a custom firmware type.
[0145] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0146] The firmware update device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0147] The embodiment of the present invention also provides a computer device having the above Figure 5 or Figure 6 The firmware update device shown.
[0148] See also Figure 7 , Figure 7 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 7 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.
[0149] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0150] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0151] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0152] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0153] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0154] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0155] Part of the present application may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present application through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes but is not limited to source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0156] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A firmware update method, characterized in that: Applied to a baseboard management controller, the method comprises: Receiving a target image file sent from a first device, the target image file including header information and an original image file, the original image file being used to update the firmware of the device to be updated; Parsing the header information to obtain configuration information corresponding to the original image file, the configuration information including first board information and first hardware information of the device to be updated; Acquire the second board information and the second hardware information corresponding to the target device; When it is determined that the original image file meets the preset conditions, and the first board information is consistent with the second board information, and the first hardware information is consistent with the second hardware information, it is determined that the original image file matches the target device, and the original image file is updated to the target device.
2. The method according to claim 1, characterized in that The obtaining of the second board information corresponding to the target device includes: Sending a read instruction to a universal input-output integrated circuit deployed on a target board where the target device is located, wherein the read instruction is used to read multiple pin level values of the universal input-output integrated circuit; Based on the multiple pin level values and the corresponding relationship, the second board information is determined.
3. The method according to claim 1, characterized in that The configuration information also includes a first firmware type identifier of the device to be updated and a first version number corresponding to the original image file; and determining that the original image file meets a preset condition includes: Obtaining a second version number of the firmware of the target device at a current moment and a second firmware type identifier corresponding to the target device; When the second firmware type identifier is consistent with the first firmware type identifier, and the second version number is smaller than the first version number, it is determined that the original image file meets the preset condition.
4. The method according to claim 1, characterized in that The configuration information also includes update condition information of the device to be updated; and updating the original image file to the target device includes: Acquire the device status of the target device and the server status of the target server where the target device is located at the current moment; Determining whether the device status and the server status both satisfy the update condition information; If yes, the original image file is updated to the target device.
5. A firmware update method, characterized in that: Applied to a first device; the method comprises: Get the expected firmware type parameters and target image path; Based on the target image path, obtaining an original image file from the target image path, wherein the original image file is used to update the firmware of the device to be updated; Determine, according to the expected firmware type parameter, a target configuration file corresponding to the expected firmware type parameter, wherein the target configuration file includes first board information and first hardware information of the device to be updated; Generate header information according to the first hardware information and the first board information; The original image file and the header information are packaged into a target image file, and the target image file is sent to a baseboard management controller. The target image file is used to determine whether the original image file matches a target device and update the original image file to the target device.
6. The method according to claim 5, characterized in that The target configuration file also includes a firmware type identifier of the device to be updated; the header information also includes a first firmware type identifier; the firmware type identifier is a first character string in a first base; the method further includes: Convert the first character string into a second character string in binary format, and perform a left shift operation on the second character string to obtain the first firmware type identifier; Alternatively, the first character string is assigned a value to obtain the first firmware type identifier.
7. The method according to claim 6, characterized in that The step of determining, according to the expected firmware type parameter, a target configuration file corresponding to the expected firmware type parameter comprises: Determining, according to the expected firmware type parameter and a first corresponding relationship, the firmware type of the to-be-updated device corresponding to the expected firmware type parameter, wherein the first corresponding relationship is a corresponding relationship between the expected firmware type parameter and the firmware type; The target configuration file corresponding to the firmware type is determined according to the firmware type and a second corresponding relationship, where the second corresponding relationship is a corresponding relationship between the firmware type and the target configuration file.
8. The method according to claim 7, characterized in that The first hardware information includes platform information and central processing unit information; the platform information is used to indicate the platform type of the baseboard management controller deployed on the server where the device to be updated is deployed; the central processing unit information is used to indicate the type of central processing unit deployed on the server where the device to be updated is deployed.
9. The method according to claim 8, characterized in that The target configuration file also includes update condition information of the device to be updated, and the update condition information is used to indicate that the baseboard management controller deployed on the server of the device to be updated needs to be restarted to start updating, or needs to restart the server to start updating, or needs to restart the operating system of the server to start updating, or starts updating immediately, or needs to shut down the device to be updated to start updating.
10. The method according to claim 9, characterized in that The target configuration file further includes manufacturer information and device model information, wherein the manufacturer information is used to indicate the manufacturer of the device to be updated, and the device model information is used to indicate the device model of the device to be updated. The method further includes: Determine the firmware type identifier of the device to be updated according to the manufacturer information and the device model information; Alternatively, the firmware type identifier corresponding to the firmware type is determined according to the firmware type and a third corresponding relationship, and the third corresponding relationship is a corresponding relationship between the firmware type and the firmware type identifier.
11. The method according to claim 10, characterized in that The target configuration file also includes a custom description field; the custom description field is used to indicate whether the firmware type belongs to a custom firmware type.
12. A firmware update system, characterized in that: The firmware update system includes a first device and a baseboard management controller; The first device is used to execute the firmware update method according to any one of claims 5 to 11; The baseboard management controller is used to execute the firmware update method according to any one of claims 1 to 4.
13. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the firmware update method according to any one of claims 1 to 11 by executing the computer instructions.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the firmware updating method according to any one of claims 1 to 11.
15. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to cause a computer to execute the firmware updating method according to any one of claims 1 to 11.
Citation Information
Patent Citations
BIOS firmware file refreshing method, device and equipment and readable storage medium
CN110007945A
Firmware upgrading method and device based on BMC, equipment and medium
CN111475186A
Server firmware upgrading method and system, electronic equipment and storage medium
CN111538517A
Firmware updating method and system, lower computer and storage medium
CN115098139A
Cited By
Refreshing method and device of substrate management controller, storage medium and program product
CN120523500A