A server firmware upgrade method, device, apparatus and storage medium

CN116610343BActive Publication Date: 2026-10-23INSPUR (SHANDONG) COMPUTER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310641518.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-31
Publication Date
2026-10-23
Estimated Expiration
2043-05-31

AI Technical Summary

Technical Problem

在服务器的应用的过程中需要对其进行装机、新功能增加、性能优化、产品bug修复等操作,在上述操作的过程中,服务器会不断编译生成固件镜像,并且针对某些定制化的项目,通常需要对固件镜像版本进行特定的搭配,并且需要对多个固件模块进行更新,整个过程通常需要人工参与,花费了较多的时间,并且容易出现固件升级失败的情况

Benefits of technology

[0038]可见,本申请应用于电脑端,先从目标项目中确定出待升级基本输入输出系统和待升级基板管理控制器的镜像版本,得到待升级基本输入输出系统镜像版本和待升级基板管理控制器镜像版本,然后根据所述待升级基本输入输出系统镜像版本和所述待升级基板管理控制器镜像版本从预先创建的配置文件中确定出目标基本输入输出系统镜像文件和目标基板管理控制器镜像文件,接着对所述目标基本输入输出系统镜像文件和所述目标基板管理控制器镜像文件进行切割,得到切割后基本输入输出系统镜像文件和切割后基板管理控制器镜像文件,再对所述切割后基本输入输出系统镜像文件和所述切割后基板管理控制器镜像文件进行合并,得到合并后镜像文件,并将所述合并后镜像文件发送至目标服务器,以利用所述合并后镜像文件进行固件升级。本申请通过对BMC和BIOS的镜像文件进行切割和合并,组合成新的镜像,能够避免版本不兼容及导致的功能异常等问题,提高了服务区系统的可靠性和稳定性以及镜像文件的传输效率,适用于各类定制化项目的服务器,减少了技术人员的工作量。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116610343B_ABST
    Figure CN116610343B_ABST
Patent Text Reader

Abstract

The application discloses a server firmware upgrading method and device, equipment and storage medium, relates to the technical field of servers, and comprises the following steps: determining image versions of a basic input / output system to be upgraded and a baseboard management controller to be upgraded from a target project; determining target basic input / output system image files and target baseboard management controller image files from configuration files according to the image versions of the basic input / output system to be upgraded and the baseboard management controller to be upgraded, and cutting the target image files; merging the cut basic input / output system image files and the cut baseboard management controller image files, and sending the merged image files to a target server for firmware upgrading. The application can avoid version incompatibility and function abnormalities and the like by cutting and merging the image files of the BMC and the BIOS to combine new images, improves the reliability and stability of the system, and is suitable for servers of various customized projects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the rapid development of internet technology, servers have been widely used. The application of servers involves tasks such as system installation, adding new features, performance optimization, and bug fixing. During these processes, the server continuously compiles and generates firmware images. For certain customized projects, specific firmware image versions often need to be matched, and multiple firmware modules need to be updated. This entire process typically requires manual intervention, is time-consuming, and is prone to firmware upgrade failures.

[0003] Currently, the coordinated function of the BIOS (Basic Input Output System) and BMC (Baseboard Management Controller) is crucial in the operation of servers. However, in practical server applications, there are some difficulties in upgrading the firmware of the BIOS and BMC. For example, during firmware upgrades, the BMC and BIOS images need to be uploaded separately. The two firmware image files may have iterative differences, resulting in problems such as BIOS and BMC version incompatibility, upgrade failure, and abnormal component functions after the upgrade. These problems often require manual handling by technicians, thus increasing their workload.

[0004] In summary, how to upgrade server firmware is a problem that still needs to be further solved in this field. Summary of the Invention

[0005] In view of this, the purpose of this application is to provide a server firmware upgrade method, apparatus, device, and storage medium that can avoid problems such as version incompatibility and resulting functional abnormalities, and improve the reliability and stability of the service area system as well as the transmission efficiency of image files. The specific solution is as follows:

[0006] Firstly, this application discloses a server firmware upgrade method, applied to a computer, comprising:

[0007] The mirror versions of the basic input / output system to be upgraded and the baseboard management controller to be upgraded are determined from the target project, and the mirror versions of the basic input / output system to be upgraded and the baseboard management controller to be upgraded are obtained.

[0008] The target basic input / output system image file and the target baseboard management controller image file are determined from a pre-created configuration file based on the basic input / output system image version to be upgraded and the baseboard management controller image version to be upgraded.

[0009] The target basic input / output system image file and the target baseboard management controller image file are cut to obtain a cut basic input / output system image file and a cut baseboard management controller image file;

[0010] The image file of the basic input / output system after cutting and the image file of the substrate management controller after cutting are merged to obtain a merged image file, and the merged image file is sent to the target server to perform firmware upgrade using the merged image file.

[0011] Optionally, determining the target basic input / output system image file and the target baseboard management controller image file from a pre-created configuration file based on the basic input / output system image version to be upgraded and the baseboard management controller image version to be upgraded includes:

[0012] The script file is used to parse all image versions containing the keywords "basic input / output system" and "baseboard management controller" in the pre-created configuration file to obtain the basic input / output system image version information and the baseboard management controller image version information.

[0013] Based on the BIOS image version to be upgraded and the baseboard management controller image version to be upgraded, obtain the target BIOS image file and the target baseboard management controller image file from the BIOS image version information and the baseboard management controller image version information.

[0014] Optionally, obtaining the target basic input / output system image file and the target baseboard management controller image file from the basic input / output system image version information and the baseboard management controller image version information based on the basic input / output system image version to be upgraded and the baseboard management controller image version to be upgraded includes:

[0015] Based on the BIOS image version to be upgraded and the baseboard management controller image version to be upgraded, the target BIOS image file and the target baseboard management controller image file are obtained from the BIOS image version information and the baseboard management controller image version information through the target FTP server, and the target BIOS image file and the target baseboard management controller image file are saved to the first preset directory on the local machine.

[0016] Optionally, the step of cutting the target basic input / output system image file and the target baseboard management controller image file to obtain a cut basic input / output system image file and a cut baseboard management controller image file includes:

[0017] Obtain the target basic input / output system image file and the target baseboard management controller image file from the first preset directory, and cut the target basic input / output system image file and the target baseboard management controller image file into cutting blocks of preset size to obtain the cut basic input / output system image file and the cut baseboard management controller image file;

[0018] Save the image file of the basic input / output system after cutting and the image file of the substrate management controller after cutting to the second preset directory.

[0019] Optionally, merging the cut basic input / output system image file and the cut substrate management controller image file to obtain a merged image file includes:

[0020] Obtain the cut basic input / output system image file and the cut substrate management controller image file from the second preset directory, and merge the cut basic input / output system image file and the cut substrate management controller image file to obtain a merged image file;

[0021] An identifier block file is created for the merged image file, and the identifier block file is inserted into the merged image file to obtain the inserted image file.

[0022] Optionally, sending the merged image file to the target server for firmware upgrade using the merged image file includes:

[0023] The inserted image file is sent to the target server, and the target server verifies whether the inserted image file is consistent with the image version of the basic input / output system to be upgraded and the image version of the baseboard management controller to be upgraded determined in the target project.

[0024] If the inserted image file matches the image version of the basic input / output system to be upgraded and the image version of the baseboard management controller to be upgraded determined in the target project, then the firmware upgrade is performed using the inserted image file.

[0025] Optionally, the step of obtaining the target basic input / output system image file and the target baseboard management controller image file from the basic input / output system image version information and the baseboard management controller image version information through the target FTP server based on the basic input / output system image version to be upgraded and the baseboard management controller image version to be upgraded includes:

[0026] Retrieve the username and password entered by the user for the FTP server, and obtain the entered username and password;

[0027] Verify that the input username and password match the username and corresponding password recorded in the configuration file;

[0028] If the input username and password match the username and password recorded in the configuration file, then the address of the target FTP server is obtained from the configuration file, and the FTP address is obtained.

[0029] The target FTP server is determined based on the FTP address, so that the target basic input / output system image file and the target baseboard management controller image file can be obtained from the basic input / output system image version information and the baseboard management controller image version information through the FTP server, based on the basic input / output system image version and the baseboard management controller image version information.

[0030] Secondly, this application discloses a server firmware upgrade device, applied to a computer, comprising:

[0031] The image version determination module is used to determine the image versions of the basic input / output system to be upgraded and the baseboard management controller to be upgraded from the target project, and obtain the image versions of the basic input / output system to be upgraded and the baseboard management controller to be upgraded.

[0032] The image file determination module is used to determine the target basic input / output system image file and the target baseboard management controller image file from a pre-created configuration file based on the image version of the basic input / output system to be upgraded and the image version of the baseboard management controller to be upgraded.

[0033] The image file cutting module is used to cut the target basic input / output system image file and the target baseboard management controller image file to obtain the cut basic input / output system image file and the cut baseboard management controller image file;

[0034] The image file merging module is used to merge the image file of the cut basic input / output system and the image file of the cut substrate management controller to obtain a merged image file;

[0035] The firmware upgrade module is used to send the merged image file to the target server so as to perform firmware upgrade using the merged image file.

[0036] Thirdly, this application discloses an electronic device, including a processor and a memory; wherein, when the processor executes a computer program stored in the memory, it implements the aforementioned server firmware upgrade method.

[0037] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned server firmware upgrade method.

[0038] As can be seen, this application is applied to the computer terminal. First, the image versions of the Basic Input / Output System (BMC) and the Baseboard Management Controller (BMC) to be upgraded are determined from the target project, resulting in the BMC image version and the BMC image version. Then, based on these images, the target BMC image file and the target BMC image file are determined from a pre-created configuration file. Next, the target BMC image file and the target BMC image file are split, resulting in split BMC image files and split BMC image files. These split BMC image files and split BMC image files are then merged to obtain a merged image file, which is sent to the target server for firmware upgrade. This application, by splitting and merging the BMC and BIOS image files into a new image, avoids version incompatibility and related functional abnormalities, improves the reliability and stability of the service area system, and enhances the image file transmission efficiency. It is suitable for servers in various customized projects and reduces the workload of technical personnel. Attached Figure Description

[0039] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0040] Figure 1 This is a flowchart of a server firmware upgrade method disclosed in this application;

[0041] Figure 2This application discloses a specific server firmware upgrade method flowchart;

[0042] Figure 3 This is a schematic diagram of the structure of a server firmware upgrade device disclosed in this application;

[0043] Figure 4 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

[0044] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0045] This application discloses a server firmware upgrade method, applied to a computer. See [link to relevant documentation]. Figure 1 As shown, the method includes:

[0046] Step S11: Determine the mirror versions of the basic input / output system to be upgraded and the baseboard management controller to be upgraded from the target project, and obtain the mirror versions of the basic input / output system to be upgraded and the baseboard management controller to be upgraded.

[0047] It should be noted that the server firmware upgrade scheme proposed in this application is applied to a computer (i.e., PC, Personal Computer). When a firmware upgrade is required for the target server, the image versions of the Basic Input / Output System (BIOS) and the Baseboard Management Controller (BMC) to be upgraded are first determined from the target project on the computer, thus obtaining the corresponding BIOS image version and BMC image version to be upgraded. The target project refers to a specific image version of the BIOS image file and a specific image version of the BMC image file that meet specific configuration requirements.

[0048] Step S12: Determine the target basic input / output system image file and the target baseboard management controller image file from the pre-created configuration file based on the basic input / output system image version to be upgraded and the baseboard management controller image version to be upgraded.

[0049] In this embodiment, after determining the image versions of the Basic Input / Output System (BIOS) and the Baseboard Management Controller (BMC) to be upgraded from the target project, and obtaining the BIOS image version and BMC image version, the target BIOS image file and the target BMC image file are further determined from a pre-created configuration file based on the aforementioned BIOS image version and BMC image version. It should be noted that this application pre-collects BIOS image files and BMC image files for each image version and saves all collected image files to a pre-created configuration file (i.e., the config file).

[0050] Specifically, determining the target basic input / output system image file and the target baseboard management controller image file from a pre-created configuration file based on the basic input / output system image version to be upgraded and the baseboard management controller image version to be upgraded may include: parsing all image versions containing basic input / output system keywords and baseboard management controller keywords in a pre-created configuration file using a pre-created script file to obtain basic input / output system image version information and baseboard management controller image version information; and obtaining the target basic input / output system image file and the target baseboard management controller image file from the basic input / output system image version information and the baseboard management controller image version information based on the basic input / output system image version to be upgraded and the baseboard management controller image version to be upgraded. It should be noted that the server firmware upgrade scheme proposed in this application can be implemented based on a pre-created script file. By running this script file, all image versions containing the keywords "Basic Input / Output System" and "Baseboard Management Controller" in the pre-created configuration file can be parsed first. That is, information containing the keywords "BIOS" and "BMC" in the configuration file is filtered out, thereby obtaining the corresponding Basic Input / Output System image version information and Baseboard Management Controller image version information. Then, based on the Basic Input / Output System image version to be upgraded and the Baseboard Management Controller image version to be upgraded, the target Basic Input / Output System image file and the target Baseboard Management Controller image file to be upgraded are determined from the Basic Input / Output System image version information and the Baseboard Management Controller image version information. In other words, the BMC firmware image file and BIOS firmware image file to be upgraded are parsed out.

[0051] Step S13: Cut the target basic input / output system image file and the target baseboard management controller image file to obtain the cut basic input / output system image file and the cut baseboard management controller image file.

[0052] In this embodiment, after determining the target basic input / output system image file and the target baseboard management controller image file, the target basic input / output system image file and the target baseboard management controller image file are cut to obtain the corresponding cut basic input / output system image file and cut baseboard management controller image file.

[0053] Step S14: Merge the cut basic input / output system image file and the cut substrate management controller image file to obtain a merged image file, and send the merged image file to the target server to perform firmware upgrade using the merged image file.

[0054] In this embodiment, the target basic input / output system image file and the target baseboard management controller image file are segmented to obtain segmented basic input / output system image files and segmented baseboard management controller image files. These segmented basic input / output system image files and segmented baseboard management controller image files can then be merged to obtain a merged image file. This merged image file is then sent to the target server to be upgraded with firmware. Upon receiving the merged image file, the target server directly uses it to perform the firmware upgrade.

[0055] As can be seen, this application embodiment is applied to the computer terminal. First, the image versions of the Basic Input / Output System (BMC) and the Baseboard Management Controller (BMC) to be upgraded are determined from the target project, resulting in the BMC image version and the BMC image version. Then, based on the BMC image version and the BMC image version, the target BMC image file and the target BMC image file are determined from a pre-created configuration file. Next, the target BMC image file and the target BMC image file are split, resulting in split BMC image files and split BMC image files. Then, the split BMC image files and the split BMC image files are merged, resulting in a merged image file. The merged image file is sent to the target server for firmware upgrade. This application embodiment, by splitting and merging the BMC and BIOS image files into a new image, avoids version incompatibility and related functional abnormalities, improves the reliability and stability of the service area system, and enhances the image file transmission efficiency. It is suitable for servers in various customized projects and reduces the workload of technical personnel.

[0056] This application discloses a specific server firmware upgrade method, applied to a computer. See [link to relevant documentation]. Figure 2 As shown, the method includes:

[0057] Step S21: Determine the mirror versions of the basic input / output system to be upgraded and the baseboard management controller to be upgraded from the target project, and obtain the mirror version of the basic input / output system to be upgraded and the mirror version of the baseboard management controller to be upgraded.

[0058] Step S22: Parse all image versions containing the Basic Input / Output System (PIOS) keyword and the Baseboard Management Controller (BMC) keyword in the pre-created configuration file using a pre-created script file to obtain PIOS image version information and BMC image version information.

[0059] Step S23: Based on the BIOS image version to be upgraded and the baseboard management controller image version to be upgraded, obtain the target BIOS image file and the target baseboard management controller image file from the BIOS image version information and the baseboard management controller image version information through the target FTP server, and save the target BIOS image file and the target baseboard management controller image file to the first preset directory on the local machine.

[0060] In this embodiment, all image versions containing the keywords "basic input / output system" and "baseboard management controller" in the pre-created configuration file are parsed to obtain the basic input / output system image version information and the baseboard management controller image version information. Then, the target basic input / output system image file and the target baseboard management controller image file to be upgraded are retrieved from the basic input / output system image version information and the baseboard management controller image version information via an FTP (File Transfer Protocol) file server according to the above-mentioned basic input / output system image version and the above-mentioned baseboard management controller image version to be upgraded. Then, the target basic input / output system image file and the target baseboard management controller image file are saved locally, that is, in the first preset directory on the PC.

[0061] Specifically, the step of obtaining the target basic input / output system image file and the target baseboard management controller image file from the basic input / output system image version information and the baseboard management controller image version information via the target FTP server based on the basic input / output system image version and the baseboard management controller image version information can include: obtaining the username and password entered by the user for the FTP server; verifying whether the entered username and password are consistent with the username and password recorded in the configuration file; if the entered username and password are consistent with the username and password recorded in the configuration file, obtaining the address of the target FTP server from the configuration file; determining the target FTP server based on the FTP address, so as to obtain the target basic input / output system image file and the target baseboard management controller image file from the basic input / output system image version information and the baseboard management controller image version information via the FTP server based on the basic input / output system image version and the baseboard management controller image version to be upgraded. For example, an INI configuration file can be created in advance to record information such as the filename of the image file to be downloaded, the address of the FTP server, and the username and password of the FTP server. Furthermore, in this configuration file, `server` is defined as the address of the FTP server, `username` and `password` are the login username and password for the FTP server, respectively, and `bmc_file` and `bios_file` are the filenames of the image files to be downloaded. Specifically, the format of the INI configuration file is as follows:

[0062] [ftp]

[0063] server=ftp.example.com

[0064] username=myusername

[0065] password = mypassword

[0066] bmc_file = bmc_20230418.hpm

[0067] bios_file=bios_20230416.hpm

[0068] Next, a pre-created shell script is executed. This shell script reads the image file names (bmc_file and bios_file) to be upgraded from the aforementioned INI configuration file. Then, it retrieves the specified version of the BMC and BIOS image files from the target project via an FTP server using the FTP protocol, and finally downloads the obtained image files to the local machine. Specifically, the shell script is as follows:

[0069] #! / bin / bash

[0070] #Read INI configuration file

[0071] server=$(grep'server'config.ini|cut-d'='-f2)

[0072] username=$(grep'username'config.ini|cut-d'='-f2)

[0073] password=$(grep'password'config.ini|cut-d'='-f2)

[0074] bmc_file=$(grep'bmc_file'config.ini|cut-d'='-f2)

[0075] bios_file=$(grep'bios_file'config.ini|cut-d'='-f2)

[0076] #Download file

[0077] ftp-nv$server< <END_SCRIPT

[0078] quote USER$username

[0079] quote PASS$password

[0080] binary

[0081] get$file

[0082] quit

[0083] END_SCRIPT

[0084] exit 0

[0085] The `grep` command is used to read the corresponding image version information from the INI configuration file mentioned above; the `cut` command is used to obtain the target image version information; and the `ftp` command uses the FTP protocol to obtain the image file corresponding to the target image version information from the FTP server and downloads it to the local machine.

[0086] Step S24: Obtain the target basic input / output system image file and the target baseboard management controller image file from the first preset directory, and cut the target basic input / output system image file and the target baseboard management controller image file into cutting blocks of preset size to obtain the cut basic input / output system image file and the cut baseboard management controller image file.

[0087] In this embodiment, after saving the target basic input / output system image file and the target baseboard management controller image file to a first preset directory on the local machine, the target basic input / output system image file and the target baseboard management controller image file to be upgraded can be obtained from the first preset directory. Then, the target basic input / output system image file and the target baseboard management controller image file are cut into blocks of a preset size (e.g., 1MB) to obtain the cut basic input / output system image file and the cut baseboard management controller image file.

[0088] Step S25: Save the image file of the cut basic input / output system and the image file of the cut substrate management controller to the second preset directory.

[0089] Furthermore, the cut basic input / output system image file and the cut substrate management controller image file are saved to the second preset directory.

[0090] Step S26: Obtain the cut basic input / output system image file and the cut substrate management controller image file from the second preset directory, and merge the cut basic input / output system image file and the cut substrate management controller image file to obtain a merged image file.

[0091] In this embodiment, the cut basic input / output system image file and the cut substrate management controller image file are first obtained from the second preset directory. Then, the cut basic input / output system image file and the cut substrate management controller image file are merged into one image file to obtain the merged image file.

[0092] Step S27: Create an identifier block file for the merged image file, and insert the identifier block file into the merged image file to obtain the inserted image file.

[0093] In this embodiment, to ensure that different functions can be called to process the BMC image file and BIOS image file separately during the upgrade process, and to facilitate users in viewing the current upgrade progress, an identifier block file can be created for the merged image file, and then the identifier block file is inserted into the merged image file. The specific process of inserting the identifier block file is as follows:

[0094] #Slicing Firmware Image Version 1, This example slices a 1GB firmware image file into 1MB chunks and saves the chunks to the / tmp directory:

[0095] dd if=myfirmware_v1.bin of= / tmp / bmc_20230418.hpm.part bs=1M

[0096] #Firmware image version 2,

[0097] dd if=myfirmware_v2.bin of= / tmp / bios_20230416.hpm.part bs=1M

[0098] #Merge slices, the `cat` command merges two slices and outputs the result to

[0099] In the file / tmp / myfirmware.hpm

[0100] cat / tmp / bmc_20230418.hpm.part / tmp / bios_20230416.hpm.part>

[0101] / tmp / bmc_bios_20230420.hpm

[0102] # Insert identifier block file, `seek` indicates the offset of the identifier block file to be inserted. In this example, the identifier block file is inserted into the 1024th block of the firmware image.

[0103] dd if=block.bin of= / tmp / bmc_bios_20230420.hpm bs=1seek=1024

[0104] Step S28: Send the inserted image file to the target server, and verify through the target server whether the inserted image file is consistent with the image version of the basic input / output system to be upgraded and the image version of the baseboard management controller to be upgraded determined in the target project.

[0105] In this embodiment, after inserting the identifier block file into the merged image file to obtain the inserted image file, the inserted image file can be sent to the target server to be upgraded. When the target server receives the inserted image file, it can parse it using its BMC (Browser Control Center), and then use the parsed identifier block file to determine whether the inserted image file is consistent with the image version of the basic input / output system to be upgraded and the image version of the baseboard management controller to be upgraded determined in the target project.

[0106] Step S29: If the inserted image file is consistent with the image version of the basic input / output system to be upgraded and the image version of the baseboard management controller to be upgraded determined in the target project, then the firmware upgrade is performed using the inserted image file.

[0107] In this embodiment, if the inserted image file is consistent with the image version of the basic input / output system to be upgraded and the image version of the baseboard management controller to be upgraded determined in the target project, then the firmware is upgraded using the inserted image file. The specific upgrade operation is the same as the web-based upgrade of a single image file, that is, after the system background successfully verifies the firmware format, the configuration items (including retaining configuration items, single or dual image upgrade, etc.) are selected and operations such as erasing, writing, and verification are performed.

[0108] For more detailed processing procedures of steps S21 and S22, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.

[0109] As can be seen, this application embodiment sets the BMC and BIOS image versions to be upgraded through configuration files, then executes a script to read the image version information from the configuration file, downloads different version image files, and performs operations such as splitting and merging. This can meet the needs of different customized projects and improve the efficiency and reliability of image management, avoiding problems such as component malfunctions caused by firmware version incompatibility between the BMC and BIOS. By combining and generating entirely new images, the workload of administrators is reduced, and the transmission efficiency of image files is improved. In addition, the server firmware image combination method proposed in this application has strong scalability and universality, and can be applied to servers for various customized projects.

[0110] Accordingly, this application also discloses a server firmware upgrade device, applied to a computer, see [link to relevant documentation]. Figure 3 As shown, the device includes:

[0111] The image version determination module 11 is used to determine the image versions of the basic input / output system to be upgraded and the baseboard management controller to be upgraded from the target project, and obtain the image versions of the basic input / output system to be upgraded and the baseboard management controller to be upgraded.

[0112] The image file determination module 12 is used to determine the target basic input / output system image file and the target baseboard management controller image file from a pre-created configuration file based on the image version of the basic input / output system to be upgraded and the image version of the baseboard management controller to be upgraded.

[0113] The image file cutting module 13 is used to cut the target basic input / output system image file and the target baseboard management controller image file to obtain a cut basic input / output system image file and a cut baseboard management controller image file.

[0114] The image file merging module 14 is used to merge the image file of the cut basic input / output system and the image file of the cut substrate management controller to obtain a merged image file;

[0115] Firmware upgrade module 15 is used to send the merged image file to the target server so as to perform firmware upgrade using the merged image file.

[0116] The specific workflow of each of the above modules can be found in the relevant content disclosed in the foregoing embodiments, and will not be repeated here.

[0117] As can be seen, this application embodiment is applied to the computer terminal. First, the image versions of the Basic Input / Output System (BMC) and the Baseboard Management Controller (BMC) to be upgraded are determined from the target project, resulting in the BMC image version and the BMC image version. Then, based on the BMC image version and the BMC image version, the target BMC image file and the target BMC image file are determined from a pre-created configuration file. Next, the target BMC image file and the target BMC image file are split, resulting in split BMC image files and split BMC image files. Then, the split BMC image files and the split BMC image files are merged, resulting in a merged image file. The merged image file is sent to the target server for firmware upgrade. This application embodiment, by splitting and merging the BMC and BIOS image files into a new image, avoids version incompatibility and related functional abnormalities, improves the reliability and stability of the service area system, and enhances the image file transmission efficiency. It is suitable for servers in various customized projects and reduces the workload of technical personnel.

[0118] In some specific embodiments, the image file determination module 12 may specifically include:

[0119] The image version parsing unit is used to parse all image versions containing the keywords of Basic Input / Output System and Baseboard Management Controller in the pre-created configuration file through a pre-created script file, so as to obtain the image version information of Basic Input / Output System and Baseboard Management Controller.

[0120] The first image file acquisition unit is used to acquire the target basic input / output system image file and the target baseboard management controller image file from the basic input / output system image version information and the baseboard management controller image version information according to the basic input / output system image version to be upgraded and the baseboard management controller image version to be upgraded.

[0121] In some specific embodiments, the first image file acquisition unit may specifically include:

[0122] The second image file acquisition unit is used to acquire the target basic input / output system image file and the target baseboard management controller image file from the basic input / output system image version information and the baseboard management controller image version information through the target FTP server based on the basic input / output system image version and the baseboard management controller image version information;

[0123] The first image file saving unit is used to save the target basic input / output system image file and the target baseboard management controller image file to a first preset directory on the local machine.

[0124] In some specific embodiments, the image file splitting module 13 may specifically include:

[0125] The third image file acquisition unit is used to acquire the target basic input / output system image file and the target baseboard management controller image file from the first preset directory;

[0126] The image file cutting unit is used to cut the target basic input / output system image file and the target baseboard management controller image file into cutting blocks of a preset size to obtain the cut basic input / output system image file and the cut baseboard management controller image file.

[0127] The second image file saving unit is used to save the image file of the cut basic input / output system and the image file of the cut substrate management controller to a second preset directory.

[0128] In some specific embodiments, the image file merging module 14 may specifically include:

[0129] The fourth image file acquisition unit is used to acquire the image file of the cut basic input / output system and the image file of the cut substrate management controller from the second preset directory;

[0130] The image file merging unit is used to merge the image file of the cut basic input / output system and the image file of the cut substrate management controller to obtain a merged image file;

[0131] The identifier file creation unit is used to create an identifier block file for the merged image file;

[0132] The file insertion unit is used to insert the identifier block file into the merged image file to obtain the inserted image file.

[0133] In some specific embodiments, the firmware upgrade module 15 may specifically include:

[0134] The image file sending unit is used to send the inserted image file to the target server;

[0135] The image version verification unit is used to verify, through the target server, whether the inserted image file is consistent with the image version of the basic input / output system to be upgraded and the image version of the baseboard management controller to be upgraded determined in the target project;

[0136] The firmware upgrade unit is configured to perform a firmware upgrade using the inserted image file if the inserted image file matches the image version of the basic input / output system to be upgraded and the image version of the baseboard management controller to be upgraded determined in the target project.

[0137] In some specific embodiments, the second image file acquisition unit may specifically include:

[0138] The information acquisition unit is used to acquire the username and password of the FTP server entered by the user, and obtain the entered username and password;

[0139] An authentication unit is used to verify whether the input username and the input password are consistent with the username and corresponding password recorded in the configuration file;

[0140] The FTP address acquisition unit is used to obtain the address of the target FTP server from the configuration file if the input username and the input password match the username and corresponding password recorded in the configuration file.

[0141] An FTP server determination unit is used to determine the target FTP server based on the FTP address;

[0142] The third image file acquisition unit is used to acquire the target basic input / output system image file and the target baseboard management controller image file from the basic input / output system image version information and the baseboard management controller image version information through the FTP server, based on the basic input / output system image version to be upgraded and the baseboard management controller image version.

[0143] Furthermore, embodiments of this application also disclose an electronic device, Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0144] Figure 4 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the server firmware upgrade method disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0145] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0146] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0147] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the server firmware upgrade method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.

[0148] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed server firmware upgrade method. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0149] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0150] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0151] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

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

[0153] The above provides a detailed description of a server firmware upgrade method, apparatus, device, and storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A server firmware upgrade method, applied to a computer, characterized in that, include: The mirror versions of the basic input / output system to be upgraded and the baseboard management controller to be upgraded are determined from the target project, and the mirror versions of the basic input / output system to be upgraded and the baseboard management controller to be upgraded are obtained. The target basic input / output system image file and the target baseboard management controller image file are determined from a pre-created configuration file based on the basic input / output system image version to be upgraded and the baseboard management controller image version to be upgraded. The target basic input / output system image file and the target baseboard management controller image file are cut to obtain a cut basic input / output system image file and a cut baseboard management controller image file; The image file of the basic input / output system after cutting and the image file of the substrate management controller after cutting are merged to obtain a merged image file, and the merged image file is sent to the target server to perform firmware upgrade using the merged image file; After merging the cut basic input / output system image file and the cut substrate management controller image file to obtain a merged image file, the method further includes: creating an identifier block file for the merged image file and inserting the identifier block file into the merged image file to obtain an inserted image file. The step of sending the merged image file to the target server for firmware upgrade includes: sending the inserted image file to the target server, and verifying with the target server whether the inserted image file is consistent with the image version of the basic input / output system to be upgraded and the image version of the baseboard management controller to be upgraded determined in the target project; if the inserted image file is consistent with the image version of the basic input / output system to be upgraded and the image version of the baseboard management controller to be upgraded determined in the target project, then the firmware upgrade is performed using the inserted image file.

2. The server firmware upgrade method according to claim 1, characterized in that, The step of determining the target basic input / output system image file and the target baseboard management controller image file from a pre-created configuration file based on the basic input / output system image version to be upgraded and the baseboard management controller image version to be upgraded includes: The script file is used to parse all image versions containing the keywords "basic input / output system" and "baseboard management controller" in the pre-created configuration file to obtain the basic input / output system image version information and the baseboard management controller image version information. Based on the BIOS image version to be upgraded and the baseboard management controller image version to be upgraded, obtain the target BIOS image file and the target baseboard management controller image file from the BIOS image version information and the baseboard management controller image version information.

3. The server firmware upgrade method according to claim 2, characterized in that, The step of obtaining the target basic input / output system image file and the target baseboard management controller image file from the basic input / output system image version information and the baseboard management controller image version information based on the basic input / output system image version to be upgraded and the baseboard management controller image version to be upgraded includes: Based on the BIOS image version to be upgraded and the baseboard management controller image version to be upgraded, the target BIOS image file and the target baseboard management controller image file are obtained from the BIOS image version information and the baseboard management controller image version information through the target FTP server, and the target BIOS image file and the target baseboard management controller image file are saved to the first preset directory on the local machine.

4. The server firmware upgrade method according to claim 3, characterized in that, The step of cutting the target basic input / output system image file and the target baseboard management controller image file to obtain the cut basic input / output system image file and the cut baseboard management controller image file includes: Obtain the target basic input / output system image file and the target baseboard management controller image file from the first preset directory, and cut the target basic input / output system image file and the target baseboard management controller image file into cutting blocks of preset size to obtain the cut basic input / output system image file and the cut baseboard management controller image file; Save the image file of the basic input / output system after cutting and the image file of the substrate management controller after cutting to the second preset directory.

5. The server firmware upgrade method according to claim 4, characterized in that, The process of merging the image file of the basic input / output system after cutting and the image file of the substrate management controller after cutting to obtain a merged image file includes: Obtain the image file of the cut basic input / output system and the image file of the cut substrate management controller from the second preset directory, and merge the image file of the cut basic input / output system and the image file of the cut substrate management controller to obtain the merged image file.

6. The server firmware upgrade method according to any one of claims 3 to 5, characterized in that, The step of obtaining the target basic input / output system image file and the target baseboard management controller image file from the basic input / output system image version information and the baseboard management controller image version information through the target FTP server based on the basic input / output system image version and the baseboard management controller image version information includes: Retrieve the username and password entered by the user for the FTP server, and obtain the entered username and password; Verify that the input username and password match the username and corresponding password recorded in the configuration file; If the input username and password match the username and password recorded in the configuration file, then the address of the target FTP server is obtained from the configuration file, and the FTP address is obtained. The target FTP server is determined based on the FTP address, so that the target basic input / output system image file and the target baseboard management controller image file can be obtained from the basic input / output system image version information and the baseboard management controller image version information through the FTP server, based on the basic input / output system image version and the baseboard management controller image version information.

7. A server firmware upgrade device, applied to a computer, characterized in that, include: The image version determination module is used to determine the image versions of the basic input / output system to be upgraded and the baseboard management controller to be upgraded from the target project, and obtain the image versions of the basic input / output system to be upgraded and the baseboard management controller to be upgraded. The image file determination module is used to determine the target basic input / output system image file and the target baseboard management controller image file from a pre-created configuration file based on the image version of the basic input / output system to be upgraded and the image version of the baseboard management controller to be upgraded. The image file cutting module is used to cut the target basic input / output system image file and the target baseboard management controller image file to obtain the cut basic input / output system image file and the cut baseboard management controller image file; The image file merging module is used to merge the image file of the cut basic input / output system and the image file of the cut substrate management controller to obtain a merged image file; The firmware upgrade module is used to send the merged image file to the target server so as to perform firmware upgrade using the merged image file; The apparatus is further configured to create an identifier block file for the merged image file and insert the identifier block file into the merged image file to obtain an inserted image file; The firmware upgrade module is specifically used to send the inserted image file to the target server, and verify through the target server whether the inserted image file is consistent with the image version of the basic input / output system to be upgraded and the image version of the baseboard management controller to be upgraded determined in the target project; if the inserted image file is consistent with the image version of the basic input / output system to be upgraded and the image version of the baseboard management controller to be upgraded determined in the target project, then the firmware upgrade is performed using the inserted image file.

8. An electronic device, characterized in that, It includes a processor and a memory; wherein, when the processor executes a computer program stored in the memory, it implements the server firmware upgrade method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when the computer programs are executed by a processor, they implement the server firmware upgrade method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Firmware updating method

    CN101739266A

  • Method and system for controlling BIOS version upgrading by server BMC

    CN108170451A