Firmware upgrade method and apparatus based on GPU Box
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-31
- Publication Date
- 2026-08-11
AI Technical Summary
[0004]本申请实施例提供了一种基于GPU Box的固件升级方法和装置,以至少解决相关技术中需要单独对GPU Box中的每个固件进行升级处理,导致对固件升级的效率比较低的技术问题
[0022]根据本发明实施例的另一方面,还提供了一种处理器,所述处理器用于运行程序,其中,所述程序运行时执行上述任意一项所述的基于GPU Box的固件升级方法。
Smart Images

Figure CN115576585B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of firmware upgrade technology, and more specifically, to a firmware upgrade method and apparatus based on a GPU Box. Background Technology
[0002] Generally, a GPU Box server includes more than 20 firmware files, such as CPLD, Switch, and GPU firmware. When a new firmware update is needed, each firmware file (CPLD, Switch, etc.) needs to be released as a separate image. Each firmware file is then upgraded individually using these images. Upgrading each firmware file individually is time-consuming, and if version compatibility issues are involved, the upgrade process is prone to errors.
[0003] There is currently no effective solution to the technical problem that requires upgrading each firmware in the GPU Box individually, which results in low efficiency of firmware upgrades. Summary of the Invention
[0004] This application provides a firmware upgrade method and apparatus based on a GPU Box, which at least solves the technical problem in the related art that requires upgrading each firmware in the GPU Box individually, resulting in low efficiency of firmware upgrades.
[0005] According to one aspect of the embodiments of this application, a firmware upgrade method based on a GPU Box is provided, comprising: determining multiple firmwares in a GPU Box server, and packaging the multiple firmwares using a packaging tool to obtain a target image file, wherein the target image file includes at least a first header of the GPU Box server, a second header of each firmware, and verification information, wherein the first header stores the ID of the GPU Box server, and the second header stores the type information of each firmware and the memory occupied by each firmware; sending the target image file to a baseboard management controller using the packaging tool, so that the baseboard management controller can perform upgrade processing on each firmware according to the target image file.
[0006] Furthermore, packaging the multiple firmwares using a packaging tool to obtain the target image file includes: obtaining the GPU Box server ID, the type information of each firmware, and the memory occupied by each firmware using the packaging tool; generating verification information using the packaging tool; and obtaining the target image file based on the verification information, the GPU Box server ID, the type information of each firmware, and the memory occupied by each firmware.
[0007] Furthermore, after sending the target image file to the baseboard management controller via the packaging tool, the method further includes: receiving the target image file via the baseboard management controller; parsing the target image file into multiple sub-image files containing one firmware via the baseboard management controller; and performing upgrade processing on each firmware according to the sub-image files.
[0008] Furthermore, the process of parsing the target image file into multiple sub-image files containing one firmware by the baseboard management controller, and performing upgrade processing on each firmware according to the sub-image files, includes: reading the second header by the baseboard management controller to obtain the type information and memory occupied by each firmware; parsing the target image file according to the type information and memory occupied by each firmware to obtain multiple sub-image files containing one firmware; and performing upgrade processing on each firmware according to the sub-image files.
[0009] Furthermore, before reading the second header through the baseboard management controller to obtain the type information of each firmware and the memory occupied by each firmware, the method further includes: reading the first header through the baseboard management controller to obtain the IP of the GPU Box server; determining whether the baseboard management controller is compatible with the GPU Box server based on the IP of the GPU Box server; if the baseboard management controller is compatible with the GPU Box server, reading the verification information and verifying whether the target image file is complete through the verification information.
[0010] Furthermore, upgrading each firmware based on the image file includes: determining the upgrade process for each firmware based on the type information and memory usage information of each firmware; and upgrading each firmware based on the image file and the upgrade process of each firmware.
[0011] Furthermore, according to the sub-image file and the upgrade process of each firmware, the upgrade process for each firmware includes: upgrading each sub-image file according to the upgrade process of each firmware to obtain an upgraded sub-image file; and updating the upgraded sub-image file to each firmware to complete the upgrade of each firmware.
[0012] Furthermore, after verifying the integrity of the target image file through the verification information, the method further includes: if the target image file is incomplete, sending a target signal to the packaging tool through the baseboard management controller, so that the packaging tool regenerates the target image file according to the target signal; if the target image file is complete, reading the second header through the baseboard management controller.
[0013] According to another aspect of the embodiments of this application, a firmware upgrade device based on a GPU Box is also provided, comprising: a packaging unit, configured to determine multiple firmwares in a GPU Box server and package the multiple firmwares using a packaging tool to obtain a target image file, wherein the target image file includes at least a first header of the GPU Box server, a second header of each firmware, and verification information, wherein the first header stores the ID of the GPU Box server, and the second header stores the type information of each firmware and the memory occupied by each firmware; and a first sending unit, configured to send the target image file to a baseboard management controller using the packaging tool, so that the baseboard management controller can perform upgrade processing on each firmware according to the target image file.
[0014] Furthermore, the packaging unit includes: an acquisition subunit, used to acquire the ID of the GPUBox server, the type information of each firmware, and the memory occupied by each firmware through the packaging tool; and a generation subunit, used to generate verification information through the packaging tool, and obtain the target image file based on the verification information, the ID of the GPUBox server, the type information of each firmware, and the memory occupied by each firmware.
[0015] Furthermore, the apparatus further includes: a receiving unit, configured to receive the target image file through the baseboard management controller after the target image file is sent to the baseboard management controller via the packaging tool; and a parsing unit, configured to parse the target image file into multiple sub-image files containing one firmware via the baseboard management controller, and perform upgrade processing on each firmware according to the sub-image files.
[0016] Furthermore, the parsing unit includes: a reading subunit, used to read the second header through the baseboard management controller to obtain the type information of each firmware and the memory information occupied by each firmware; a parsing subunit, used to parse the target image file according to the type information of each firmware and the memory information occupied by each firmware to obtain multiple sub-image files containing one firmware; and a processing subunit, used to perform upgrade processing on each firmware according to the sub-image files.
[0017] Furthermore, the device further includes: a first reading unit, configured to read the first header through the baseboard management controller to obtain the IP address of the GPU Box server before reading the second header through the baseboard management controller to obtain the type information of each firmware and the memory information occupied by each firmware; a determining unit, configured to determine whether the baseboard management controller is compatible with the GPU Box server based on the IP address of the GPU Box server; and a second reading unit, configured to read the verification information if the baseboard management controller is compatible with the GPU Box server, and verify whether the target image file is complete through the verification information.
[0018] Furthermore, the processing subunit includes: a determination module, used to determine the upgrade process for each firmware based on the type information of each firmware and the memory occupied by each firmware; and an upgrade module, used to perform upgrade processing on each firmware based on the image file and the upgrade process of each firmware.
[0019] Furthermore, the upgrade module includes: an upgrade submodule, used to upgrade each sub-image file according to the upgrade process of each firmware to obtain an upgraded sub-image file; and an update submodule, used to update the upgraded sub-image file to each firmware to complete the upgrade of each firmware.
[0020] Furthermore, the device further includes: a second sending unit, configured to, after verifying the integrity of the target image file through the verification information, if the target image file is incomplete, send a target signal to the packaging tool through the baseboard management controller so that the packaging tool can regenerate the target image file based on the target signal; and a third reading unit, configured to, if the target image file is complete, read the second header through the baseboard management controller.
[0021] According to another aspect of the present invention, a computer-readable storage medium is also provided, the storage medium storing a program, wherein, when the program is executed, it controls the device where the storage medium is located to perform the firmware upgrade method based on GPU Box as described above.
[0022] According to another aspect of the present invention, a processor is also provided, the processor being used to run a program, wherein the program, when running, executes the GPU Box-based firmware upgrade method described in any of the preceding embodiments.
[0023] In this embodiment, multiple firmware files are identified within a GPU Box server, and a packaging tool is used to package these firmware files to obtain a target image file. The target image file includes at least a first header for the GPU Box server, a second header for each firmware file, and verification information. The first header stores the GPU Box server's ID, and the second header stores the type information and memory usage information for each firmware file. The packaging tool sends the target image file to the baseboard management controller, which then upgrades each firmware file based on the target image file. This solves the technical problem in related technologies where each firmware file in the GPU Box needs to be upgraded individually, resulting in low firmware upgrade efficiency. In this solution, a target image file containing multiple firmware files is obtained using a packaging tool, and then the baseboard management controller performs a unified upgrade of these firmware files based on the target image file. This saves firmware upgrade time and avoids errors caused by version compatibility, thereby improving the efficiency of firmware upgrades. Attached Figure Description
[0024] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0025] Figure 1 This is a schematic diagram of a computer terminal provided according to Embodiment 1 of this application;
[0026] Figure 2 This is a flowchart of a firmware upgrade method based on a GPU Box according to Embodiment 1 of this application;
[0027] Figure 3 This is a schematic diagram of the target image file provided according to Embodiment 1 of this application;
[0028] Figure 4 This is a schematic diagram of a firmware upgrade method based on a GPU Box according to Embodiment 1 of this application;
[0029] Figure 5 This is a flowchart of an optional firmware upgrade method based on a GPU Box, provided according to Embodiment 1 of this application;
[0030] Figure 6 This is a schematic diagram of a firmware upgrade device based on a GPU Box according to Embodiment 2 of this application;
[0031] Figure 7 This is a schematic diagram of a computer terminal provided according to Embodiment 3 of this application. Detailed Implementation
[0032] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0033] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0034] Example 1
[0035] According to an embodiment of this application, a firmware upgrade method based on a GPU Box is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0036] The method embodiment provided in Embodiment 1 of this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1 A hardware block diagram of a computer terminal (or mobile device) for implementing a GPU Box-based firmware upgrade method is shown. Figure 1 As shown, the computer terminal 10 (or mobile device 10) may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) (processor 102 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission module 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0037] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be wholly or partially embodied in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be wholly or partially integrated into any other element within the computer terminal 10 (or mobile device).
[0038] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the firmware upgrade method based on GPU Box in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the aforementioned firmware upgrade method based on GPU Box. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0039] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0040] The display can be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10 (or mobile device).
[0041] GPU Box servers often include multiple firmware versions, such as CPLD, switch, and GPU firmware. When a new firmware update is needed, each firmware version (CPLD / switch, etc.) requires a separate image release. Upgrading each firmware version individually from these images is time-consuming and prone to errors when dealing with version compatibility issues. Therefore, this paper proposes a firmware upgrade method based on GPU Box.
[0042] The present invention will now be described with reference to preferred embodiments. This application provides, as follows: Figure 2 The firmware upgrade method based on GPUBox is shown. Figure 2 This is a flowchart of a firmware upgrade method based on a GPU Box according to Embodiment 1 of this application, the method comprising:
[0043] Step S201: Determine multiple firmwares in the GPU Box server and package the multiple firmwares using a packaging tool to obtain a target image file. The target image file includes at least a first header of the GPU Box server, a second header of each firmware, and verification information. The first header stores the ID of the GPU Box server, and the second header stores the type information of each firmware and the memory occupied by each firmware.
[0044] Step S202: The target image file is sent to the baseboard management controller using a packaging tool, so that the baseboard management controller can perform upgrade processing on each firmware according to the target image file.
[0045] Specifically, multiple firmware files in the GPU Box server that need to be upgraded are identified. Then, a packaging tool is used to package all the firmware files that need to be upgraded into a target image file. In other words, the images of all the firmware files that need to be upgraded are combined into a large bin file. The target image file includes at least the first header (Header0) of the GPU Box server, the second header (Header1) of each firmware, and checksum information. The first header stores the ID of the GPU Box server, and the second header stores the type information and memory usage information of each firmware.
[0046] In an optional embodiment, the target image file may be in the following format: Figure 3 As shown, Header0 stores the ID of the GPU Box server; the lower part is a detailed combination of small images. Each small image (that is, each firmware) has its own corresponding header, which can store the image type (type information of each firmware) and image size (memory information occupied by each firmware); the Tail part stores the MD5 checksum of the entire image (corresponding to the above checksum information), which is used for the integrity verification of the target image file.
[0047] After obtaining the target image file, it is sent to the Baseboard Management Controller (BMC). The BMC is the core chip of the GPU box's out-of-band management software (directly connected to other chips in the firmware to be upgraded on the hardware link). Its main function is to parse the large target image file, split it into multiple smaller images, and then update the corresponding firmware using these smaller images. The specific upgrade code logic is executed within the BMC. The Baseboard Management Controller enables unified upgrade processing for all firmware to be upgraded.
[0048] In an alternative embodiment, the following can be employed: Figure 4 The diagram illustrates the upgrade of multiple firmware versions. Specifically, multiple firmware versions are identified in the GPU Box server, and a packaging tool is used to package these firmware versions into a target image file. The BMC then parses the large target image file, splits it into multiple smaller images, and updates the corresponding firmware versions with these smaller images to achieve the upgrade of multiple firmware versions.
[0049] In summary, by using a packaging tool to package the firmware used on the GPU box into a single image for distribution, each firmware has its own header and type during packaging. During the upgrade process, the header and type of each firmware are identified, the corresponding firmware is extracted, and the upgrade process for the corresponding firmware is triggered. This achieves unified upgrade processing for all firmware to be upgraded, saving users' upgrade operation time and improving the efficiency of firmware upgrades for the GPU box.
[0050] How to package multiple firmwares using a packaging tool to obtain the target image file is crucial. Therefore, the firmware upgrade method based on GPU Box provided in Implementation Example 1 also includes the following: obtaining the GPU Box server ID, the type information of each firmware, and the memory occupied by each firmware using a packaging tool; generating verification information using a packaging tool, and obtaining the target image file based on the verification information, the GPU Box server ID, the type information of each firmware, and the memory occupied by each firmware.
[0051] Specifically, the packaging tool accurately identifies the GPU Box server ID, the type information of each firmware, and the memory usage information of each firmware, and writes these into the corresponding location in the target image file. The packaging tool also generates verification information and writes this information into the corresponding location in the target image file. This verification information accurately checks the integrity of the target image file. The packaging tool then sends the target image file to the baseboard management controller.
[0052] After the target image file is sent to the baseboard management controller via the packaging tool, the baseboard management controller receives the target image file; the baseboard management controller parses the target image file into multiple sub-image files containing one firmware, and performs upgrade processing on each firmware according to the sub-image file.
[0053] Specifically, the target image file needs to be transmitted to the Baseboard Management Controller (BMC) via the network using a web or Redfish interface. After receiving the target image file, the BMC sends a command to trigger the GPU Box firmware upgrade process within the BMC. Upon receiving the command, the BMC parses the target image file into multiple sub-image files, each containing a single firmware file, and then performs the upgrade process for each firmware file according to the sub-image file. Through these steps, multiple firmware updates for the GPU Box are achieved, improving upgrade efficiency.
[0054] The baseboard management controller parses the target image file into multiple sub-image files containing one firmware through the following steps, and performs upgrade processing on each firmware according to the sub-image files: the baseboard management controller reads the second header to obtain the type information and memory occupied by each firmware; parses the target image file according to the type information and memory occupied by each firmware to obtain multiple sub-image files containing one firmware; and performs upgrade processing on each firmware according to the sub-image files.
[0055] Specifically, after triggering the GPU Box firmware upgrade process within the baseboard management controller, the controller identifies the second header in the target image file, recognizing the type information (type) and memory size (size) of each firmware in header1, header2, and header3. Based on this information, the target image file is divided into sub-image files adapted to firmware such as BMC, CPLD / Switch, etc.—that is, multiple sub-image files containing a single firmware. The baseboard management controller's upgrade logic sequentially calls the existing firmware upgrade programs to upgrade the divided firmware. Through these steps, the target image file can be accurately parsed into multiple sub-image files containing a single firmware. After obtaining a sub-image file containing only one firmware, the existing firmware upgrade programs can be directly called to upgrade the firmware, improving the efficiency of firmware upgrades.
[0056] To ensure that the baseboard management controller can process the target image file and ensure its integrity, before reading the second header through the baseboard management controller to obtain the type information and memory usage information of each firmware, the following steps are also included: reading the first header through the baseboard management controller to obtain the IP of the GPU Box server; determining whether the baseboard management controller is compatible with the GPU Box server based on the IP of the GPU Box server; if the baseboard management controller is compatible with the GPU Box server, reading the verification information and verifying whether the target image file is complete through the verification information.
[0057] If the target image file is incomplete, the baseboard management controller sends a target signal to the packaging tool so that the packaging tool can regenerate the target image file based on the target signal; if the target image file is complete, the baseboard management controller reads the second header.
[0058] Specifically, after triggering the upgrade process of the GPU Box firmware inside the baseboard management controller, the baseboard management controller will read Header0 (i.e. the first header mentioned above) in the target image file to obtain the ID of the GPU Box server. It will then use the ID of the GPU Box server to determine whether the baseboard management controller and the GPU Box server are compatible. If the baseboard management controller and the GPU Box server are compatible, the baseboard management controller will read the verification information in the target image file and use the verification information to verify whether the target image file is complete.
[0059] If the target image file is incomplete, the substrate management controller sends a target signal to the packaging tool. The packaging tool then regenerates the target image file based on the target signal and sends the regenerated target image file to the substrate management controller. If the target image file is complete, the second header is read directly by the substrate management controller.
[0060] In summary, the above steps ensure that the baseboard management controller can process the target image file and ensure its integrity.
[0061] To improve firmware upgrade efficiency, the upgrade process for each firmware based on the image file includes the following steps: determining the upgrade process for each firmware based on its type information and memory usage; and upgrading each firmware based on the image file and the upgrade process.
[0062] Based on the sub-image files and the upgrade process for each firmware, the upgrade process for each firmware includes: upgrading each sub-image file according to the upgrade process for each firmware to obtain the upgraded sub-image file; and updating each firmware with the upgraded sub-image file to complete the upgrade of each firmware.
[0063] Specifically, after the target image file is parsed into multiple sub-image files containing a single firmware by the baseboard management controller, the upgrade process for each firmware is determined by the type information and memory usage information of each firmware. Then, each sub-image file is upgraded according to the upgrade process of each firmware to obtain the upgraded sub-image file. Finally, the upgraded sub-image file is updated to the corresponding firmware to achieve a unified upgrade of multiple firmware.
[0064] In an alternative embodiment, the following can be employed: Figure 5 The flowchart shown illustrates the upgrade of multiple firmware versions. Specifically, a packaging tool packages multiple firmware versions from the GPU Box server to obtain a target image file. This target image file is then sent to the baseboard management controller. The baseboard management controller reads Header0 (the first identifier mentioned above) from the target image file to obtain the GPU Box server's ID. It then uses this ID to determine if the baseboard management controller and the GPU Box server are compatible. If compatibility is confirmed, the baseboard management controller reads the verification information in the target image file and verifies its completeness. If the target image file is complete, the baseboard management controller directly reads the second header, extracting the type information (type) and memory size (size) of each firmware version from header1, header2, and header3. Based on this information, the target image file is divided into sub-image files adapted to firmware versions such as BMC, CPLD / Switch, etc.—essentially, multiple sub-image files containing a single firmware version. By using the type information and memory usage information of each firmware, the upgrade process for each firmware is determined. Then, each sub-image file is upgraded according to the upgrade process of each firmware to obtain the upgraded sub-image file. Finally, the upgraded sub-image file is updated to the corresponding firmware to achieve unified upgrade of multiple firmware.
[0065] In summary, by using a packaging tool to package the firmware used on the GPU box into a single image for distribution, each firmware has its own header and type during packaging. During the upgrade process, the header and type of each firmware are identified, the corresponding firmware is extracted, and the upgrade process for the corresponding firmware is triggered. This achieves unified upgrade processing for all firmware to be upgraded, saving users' upgrade operation time and improving the efficiency of firmware upgrades for the GPU box.
[0066] In the firmware upgrade method based on GPU Box proposed in Embodiment 1 of this application, multiple firmware files in the GPU Box server are identified, and a packaging tool is used to package these firmware files to obtain a target image file. The target image file includes at least a first header of the GPU Box server, a second header of each firmware file, and verification information. The first header stores the ID of the GPU Box server, and the second header stores the type information and memory usage information of each firmware file. The packaging tool sends the target image file to the baseboard management controller, which then upgrades each firmware file based on the target image file. This solves the technical problem in related technologies where each firmware file in the GPU Box needs to be upgraded individually, resulting in low firmware upgrade efficiency. In this solution, a target image file containing multiple firmware files is obtained through a packaging tool, and then the baseboard management controller performs a unified upgrade of multiple firmware files based on the target image file. This saves firmware upgrade operation time and avoids errors caused by version compatibility during the upgrade, thereby improving the efficiency of firmware upgrades.
[0067] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0068] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0069] Example 2
[0070] According to embodiments of this application, a GPU Box-based firmware upgrade apparatus is also provided for implementing the aforementioned GPU Box-based firmware upgrade, such as... Figure 6 As shown, the device includes a packaging unit 601 and a first sending unit 602.
[0071] Packaging unit 601 is used to determine multiple firmwares in the GPU Box server and package the multiple firmwares using a packaging tool to obtain a target image file. The target image file includes at least a first header of the GPU Box server, a second header of each firmware, and verification information. The first header stores the ID of the GPU Box server, and the second header stores the type information of each firmware and the memory occupied by each firmware.
[0072] The first sending unit 602 is used to send the target image file to the baseboard management controller through a packaging tool, so that the baseboard management controller can perform upgrade processing on each firmware according to the target image file.
[0073] In the firmware upgrade device based on GPU Box proposed in Embodiment 2 of this application, the packaging unit 601 determines multiple firmwares in the GPU Box server and packages these firmwares using a packaging tool to obtain a target image file. The target image file includes at least a first header of the GPU Box server, a second header of each firmware, and verification information. The first header stores the ID of the GPU Box server, and the second header stores the type information and memory usage information of each firmware. The first sending unit 602 sends the target image file to the baseboard management controller using the packaging tool. The baseboard management controller then upgrades each firmware based on the target image file, solving the technical problem in related technologies where each firmware in the GPU Box needs to be upgraded individually, resulting in low firmware upgrade efficiency. In this solution, a target image file containing multiple firmwares is obtained using a packaging tool, and then the baseboard management controller performs a unified upgrade of multiple firmwares based on the target image file. This saves firmware upgrade operation time and avoids errors caused by version compatibility during the upgrade, thereby improving the efficiency of firmware upgrades.
[0074] Optionally, in the firmware upgrade device based on GPU Box proposed in Embodiment 2 of this application, the packaging unit 601 includes: an acquisition subunit, used to acquire the ID of the GPU Box server, the type information of each firmware, and the memory occupied by each firmware through a packaging tool; and a generation subunit, used to generate verification information through a packaging tool, and obtain a target image file based on the verification information, the ID of the GPU Box server, the type information of each firmware, and the memory occupied by each firmware.
[0075] Optionally, in the firmware upgrade device based on GPU Box proposed in Embodiment 2 of this application, the device further includes: a receiving unit, used to receive the target image file through the baseboard management controller after the target image file is sent to the baseboard management controller through a packaging tool; and a parsing unit, used to parse the target image file into multiple sub-image files containing one firmware through the baseboard management controller, and to perform upgrade processing on each firmware according to the sub-image file.
[0076] Optionally, in the firmware upgrade device based on GPU Box proposed in Embodiment 2 of this application, the parsing unit includes: a reading subunit, used to read the second header through the baseboard management controller to obtain the type information of each firmware and the memory information occupied by each firmware; a parsing subunit, used to parse the target image file according to the type information of each firmware and the memory information occupied by each firmware to obtain multiple sub-image files containing one firmware; and a processing subunit, used to perform upgrade processing on each firmware according to the sub-image files.
[0077] Optionally, in the firmware upgrade device based on GPU Box proposed in Embodiment 2 of this application, the device further includes: a first reading unit, used to read the first header through the baseboard management controller to obtain the IP of the GPU Box server before reading the second header through the baseboard management controller to obtain the type information of each firmware and the memory information occupied by each firmware; a determining unit, used to determine whether the baseboard management controller is compatible with the GPU Box server based on the IP of the GPU Box server; and a second reading unit, used to read verification information if the baseboard management controller is compatible with the GPU Box server, and verify whether the target image file is complete through the verification information.
[0078] Optionally, in the firmware upgrade device based on GPU Box proposed in Embodiment 2 of this application, the processing subunit includes: a determination module, used to determine the upgrade process of each firmware based on the type information of each firmware and the memory occupied by each firmware; and an upgrade module, used to perform upgrade processing on each firmware based on the image file and the upgrade process of each firmware.
[0079] Optionally, in the firmware upgrade device based on GPU Box proposed in Embodiment 2 of this application, the upgrade module includes: an upgrade submodule, used to upgrade each sub-image file according to the upgrade process of each firmware to obtain the upgraded sub-image file; and an update submodule, used to update the upgraded sub-image file to each firmware to complete the upgrade of each firmware.
[0080] Optionally, in the firmware upgrade device based on GPU Box proposed in Embodiment 2 of this application, the device further includes: a second sending unit, used to send a target signal to a packaging tool through a baseboard management controller if the target image file is incomplete after verifying its integrity through verification information, so that the packaging tool can regenerate the target image file according to the target signal; and a third reading unit, used to read a second header through a baseboard management controller if the target image file is complete.
[0081] It should be noted here that the packaging unit 601 and the first sending unit 602 mentioned above correspond to steps S201 to S202 in Embodiment 1. The two units implement the same instances and application scenarios as the corresponding steps, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above modules, as part of the device, can run in the computer terminal 10 provided in Embodiment 1.
[0082] It should be noted that the preferred implementation schemes involved in the above embodiments of this application are the same as the schemes, application scenarios and implementation processes provided in Embodiment 1, but are not limited to the schemes provided in Embodiment 1.
[0083] Example 3
[0084] Embodiments of this application may provide a computer terminal, which may be any computer terminal device in a group of computer terminals. Optionally, in this embodiment, the aforementioned computer terminal may also be replaced by a mobile terminal or other terminal device.
[0085] Optionally, in this embodiment, the computer terminal may be located in at least one of a plurality of network devices in a computer network.
[0086] In this embodiment, the computer terminal can execute the program code for the following steps in the GPU Box-based firmware upgrade method: determining multiple firmwares in the GPU Box server, and packaging the multiple firmwares using a packaging tool to obtain a target image file. The target image file includes at least a first header of the GPU Box server, a second header of each firmware, and verification information. The first header stores the ID of the GPU Box server, and the second header stores the type information of each firmware and the memory occupied by each firmware. The target image file is sent to the baseboard management controller using the packaging tool, so that the baseboard management controller can perform upgrade processing on each firmware according to the target image file.
[0087] Optionally, multiple firmware files can be packaged using a packaging tool to obtain a target image file. This includes: obtaining the GPU Box server ID, the type information of each firmware, and the memory usage information of each firmware using the packaging tool; generating verification information using the packaging tool; and obtaining the target image file based on the verification information, the GPU Box server ID, the type information of each firmware, and the memory usage information of each firmware.
[0088] Optionally, after sending the target image file to the baseboard management controller via a packaging tool, the method further includes: receiving the target image file via the baseboard management controller; parsing the target image file into multiple sub-image files containing a single firmware via the baseboard management controller; and performing upgrade processing on each firmware based on the sub-image file.
[0089] Optionally, parsing the target image file into multiple sub-image files containing one firmware through the baseboard management controller, and performing upgrade processing on each firmware according to the sub-image files, includes: reading the second header through the baseboard management controller to obtain the type information and memory occupied by each firmware; parsing the target image file according to the type information and memory occupied by each firmware to obtain multiple sub-image files containing one firmware; and performing upgrade processing on each firmware according to the sub-image files.
[0090] Optionally, before reading the second header through the baseboard management controller to obtain the type information of each firmware and the memory information occupied by each firmware, the method further includes: reading the first header through the baseboard management controller to obtain the IP of the GPUBox server; determining whether the baseboard management controller is compatible with the GPUBox server based on the IP of the GPUBox server; if the baseboard management controller is compatible with the GPUBox server, reading the verification information and verifying whether the target image file is complete through the verification information.
[0091] Optionally, upgrading each firmware based on the image file includes: determining the upgrade process for each firmware based on the type information and memory usage information of each firmware; and upgrading each firmware based on the image file and the upgrade process of each firmware.
[0092] Optionally, the upgrade process for each firmware, based on the sub-image file and the upgrade process for each firmware, includes: upgrading each sub-image file according to the upgrade process for each firmware to obtain an upgraded sub-image file; and updating each firmware with the upgraded sub-image file to complete the upgrade of each firmware.
[0093] Optionally, after verifying the integrity of the target image file through the verification information, the method further includes: if the target image file is incomplete, sending a target signal to the packaging tool through the baseboard management controller, so that the packaging tool can regenerate the target image file according to the target signal; if the target image file is complete, reading the second header through the baseboard management controller.
[0094] Optionally, Figure 7 This is a structural block diagram of a computer terminal according to an embodiment of this application. Figure 7 As shown, the computer terminal 10 may include: one or more ( Figure 7 (Only one is shown in the image) processor and memory.
[0095] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the GPU Box-based firmware upgrade method in this embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby realizing the aforementioned GPU Box-based firmware upgrade method. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0096] The processor can access information and applications stored in memory via a transmission device to perform the following steps: identify multiple firmware files in the GPU Box server, and package the multiple firmware files using a packaging tool to obtain a target image file. The target image file includes at least a first header of the GPU Box server, a second header of each firmware file, and verification information. The first header stores the ID of the GPU Box server, and the second header stores the type information of each firmware file and the memory occupied by each firmware file. The target image file is then sent to the baseboard management controller using the packaging tool, so that the baseboard management controller can perform upgrade processing on each firmware file based on the target image file.
[0097] Optionally, multiple firmware files can be packaged using a packaging tool to obtain a target image file. This includes: obtaining the GPU Box server ID, the type information of each firmware, and the memory usage information of each firmware using the packaging tool; generating verification information using the packaging tool; and obtaining the target image file based on the verification information, the GPU Box server ID, the type information of each firmware, and the memory usage information of each firmware.
[0098] Optionally, after sending the target image file to the baseboard management controller via the packaging tool, the method further includes: receiving the target image file via the baseboard management controller; parsing the target image file into multiple sub-image files containing one firmware via the baseboard management controller; and performing upgrade processing on each firmware according to the sub-image file.
[0099] Optionally, parsing the target image file into multiple sub-image files containing one firmware through the baseboard management controller, and performing upgrade processing on each firmware according to the sub-image files, includes: reading the second header through the baseboard management controller to obtain the type information and memory occupied by each firmware; parsing the target image file according to the type information and memory occupied by each firmware to obtain multiple sub-image files containing one firmware; and performing upgrade processing on each firmware according to the sub-image files.
[0100] Optionally, before reading the second header through the baseboard management controller to obtain the type information of each firmware and the memory information occupied by each firmware, the method further includes: reading the first header through the baseboard management controller to obtain the IP of the GPU Box server; determining whether the baseboard management controller is compatible with the GPU Box server based on the IP of the GPU Box server; if the baseboard management controller is compatible with the GPU Box server, reading the verification information and verifying whether the target image file is complete through the verification information.
[0101] Optionally, upgrading each firmware based on the image file includes: determining the upgrade process for each firmware based on the type information and memory usage information of each firmware; and upgrading each firmware based on the image file and the upgrade process of each firmware.
[0102] Optionally, the upgrade process for each firmware, based on the sub-image file and the upgrade process for each firmware, includes: upgrading each sub-image file according to the upgrade process for each firmware to obtain an upgraded sub-image file; and updating each firmware with the upgraded sub-image file to complete the upgrade of each firmware.
[0103] Optionally, after verifying the integrity of the target image file through the verification information, the method further includes: if the target image file is incomplete, sending a target signal to the packaging tool through the baseboard management controller, so that the packaging tool can regenerate the target image file according to the target signal; if the target image file is complete, reading the second header through the baseboard management controller.
[0104] Those skilled in the art will understand that Figure 7 The structure shown is for illustrative purposes only. The computer terminal can also be a smartphone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID), a PAD, and other terminal devices. Figure 7 This does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include components that are more advanced than those described above. Figure 7 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 7 The different configurations shown.
[0105] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0106] Example 4
[0107] Embodiments of this application also provide a computer-readable storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the GPU Box-based firmware upgrade method provided in Embodiment 1.
[0108] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.
[0109] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0110] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0111] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0112] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0113] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0114] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0115] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A firmware upgrade method based on a GPU Box, characterized in that, include: Multiple firmwares in the GPU Box server are identified, and the multiple firmwares are packaged using a packaging tool to obtain a target image file. The target image file includes at least a first header of the GPU Box server, a second header of each firmware, and verification information. The first header stores the ID of the GPU Box server, and the second header stores the type information of each firmware and the memory occupied by each firmware. The target image file is sent to the baseboard management controller using the packaging tool, so that the baseboard management controller can perform upgrade processing on each firmware according to the target image file; The baseboard management controller identifies the second header in the target image file to determine the type information of each firmware and the memory occupied by each firmware. The target image file is divided into sub-image files adapted to the firmware based on the type information and memory usage information of each firmware. The baseboard management controller sequentially calls the upgrade programs of each existing firmware to upgrade the firmware that has been divided above.
2. The method according to claim 1, characterized in that, The target image file is obtained by packaging the multiple firmware files using a packaging tool, including: The packaging tool is used to obtain the GPU Box server ID, the type information of each firmware, and the memory usage information of each firmware. The packaging tool generates verification information, and based on the verification information, the ID of the GPU Box server, the type information of each firmware, and the memory occupied by each firmware, the target image file is obtained.
3. The method according to claim 1, characterized in that, After sending the target image file to the baseboard management controller using the packaging tool, the method further includes: The target image file is received via the baseboard management controller; The baseboard management controller parses the target image file into multiple sub-image files, each containing a firmware, and performs upgrade processing on each firmware based on the sub-image files.
4. The method according to claim 1, characterized in that, Before reading the second header through the baseboard management controller to obtain the type information of each firmware and the memory occupied by each firmware, the method further includes: The IP address of the GPU Box server is obtained by reading the first header through the baseboard management controller; The compatibility of the baseboard management controller with the GPU Box server is determined based on the IP address of the GPU Box server. If the baseboard management controller is compatible with the GPU Box server, it reads the verification information and verifies whether the target image file is complete using the verification information.
5. The method according to claim 3, characterized in that, Upgrading each firmware file based on the aforementioned image file includes: Based on the type information and memory usage information of each firmware, the upgrade process for each firmware is determined. Based on the aforementioned image files and the upgrade process for each firmware, each firmware is upgraded.
6. The method according to claim 5, characterized in that, Based on the aforementioned image files and the upgrade process for each firmware, the upgrade process for each firmware includes: Each sub-image file is upgraded according to the upgrade process of each firmware to obtain the upgraded sub-image file; The upgraded image file is then updated to each firmware to complete the upgrade of each firmware.
7. The method according to claim 4, characterized in that, After verifying the integrity of the target image file using the verification information, the method further includes: If the target image file is incomplete, a target signal is sent to the packaging tool through the baseboard management controller, so that the packaging tool can regenerate the target image file according to the target signal; If the target image file is complete, the second header is read through the baseboard management controller.
8. A firmware upgrade device based on a GPU Box, characterized in that, include: The packaging unit is used to identify multiple firmwares in the GPU Box server and package the multiple firmwares using a packaging tool to obtain a target image file. The target image file includes at least a first header of the GPU Box server, a second header of each firmware, and verification information. The first header stores the ID of the GPU Box server, and the second header stores the type information of each firmware and the memory occupied by each firmware. The first sending unit is used to send the target image file to the baseboard management controller through the packaging tool, so that the baseboard management controller can perform upgrade processing on each firmware according to the target image file; The device is further configured to: identify the second header in the target image file by the baseboard management controller, and identify the type information of each firmware and the memory occupied by each firmware; The target image file is divided into sub-image files adapted to the firmware based on the type information and memory usage information of each firmware. The baseboard management controller sequentially calls the upgrade programs of each existing firmware to upgrade the firmware that has been divided above.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the storage medium is located to perform the firmware upgrade method based on a GPU Box as described in any one of claims 1 to 6.
10. A processor, characterized in that, The processor is used to run a program, wherein the program executes the firmware upgrade method based on a GPU Box as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method and system for remote upgrade supporting firmware automatic recovery function
CN107247603A
Firmware upgrading method, device and equipment and storage medium
CN111104139A