WO2023040198A1 - 一种部件独立升级的方法、系统、设备和介质 - Google Patents

一种部件独立升级的方法、系统、设备和介质 Download PDF

Info

Publication number
WO2023040198A1
WO2023040198A1 PCT/CN2022/078270 CN2022078270W WO2023040198A1 WO 2023040198 A1 WO2023040198 A1 WO 2023040198A1 CN 2022078270 W CN2022078270 W CN 2022078270W WO 2023040198 A1 WO2023040198 A1 WO 2023040198A1
Authority
WO
WIPO (PCT)
Prior art keywords
upgrade
specified component
upgraded
program
file
Prior art date
Application number
PCT/CN2022/078270
Other languages
English (en)
French (fr)
Inventor
王兴隆
宿燕鸣
Original Assignee
苏州浪潮智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州浪潮智能科技有限公司 filed Critical 苏州浪潮智能科技有限公司
Publication of WO2023040198A1 publication Critical patent/WO2023040198A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Definitions

  • the present application relates to the field of servers, and more specifically refers to a method, system, device and storage medium for independently upgrading components.
  • BMC Baseboard Management Controller, baseboard management controller
  • the BMC uses I2C, JTAG and other interfaces. Upgrade firmware to specified parts.
  • the second is to solidify the component upgrade code in the form of a lib (library file) package, upload the upgrade code to the BMC along with the firmware, and the BMC upgrade program uses the upgrade function of the lib package to perform firmware upgrades.
  • This solution is limited by the original upgrade of the BMC
  • the program must implement the upgrade interface function stipulated by the upgrade program, and the development flexibility and maintenance convenience are poor.
  • the purpose of the embodiments of the present application is to propose a method, system, computer equipment, and computer-readable storage medium for independently upgrading components.
  • This application uses an independent executable program to read and refresh image files without relying on For other processes of the BMC, the independent upgrade program can be uploaded and executed separately, avoiding the modification of the BMC code.
  • an aspect of the embodiment of the present application provides a method for independently upgrading components, including the following steps: writing the specified component upgrade program, configuration file, specified component to be upgraded image and digital signature into the specified component upgrade file ; Create a detection process to detect whether the upgrade file is received, and in response to receiving the upgrade file, create an upgrade process to start the specified component upgrade program in the upgrade file; read the configuration file and execute the specified component upgrade program to Detecting whether the specified component satisfies the upgrade condition; and in response to the specified component meeting the upgrade condition, upgrading the image to be upgraded of the specified component and refreshing the image to be upgraded to the specified component.
  • the creating an upgrade process to start the specified component upgrade program in the upgrade file includes: performing an integrity check on the digital signature, and judging whether the digital signature passes the integrity check ; and in response to the digital signature passing the integrity check, creating an upgrade process.
  • the reading the configuration file and executing the specified component upgrade program to detect whether the specified component meets the upgrade conditions includes: obtaining the hardware information and constraints of the specified component from the configuration file conditions, and access the corresponding physical channel to obtain the model of the corresponding component; and compare the model with the model in the hardware information to determine whether the component is the specified component.
  • the reading the configuration file and executing the specified component upgrade program to detect whether the specified component meets the upgrade condition further includes: in response to the specified component being the specified component, acquiring the component determining whether the state information satisfies the constraints in the configuration file; and in response to the state information satisfying the constraints in the configuration file, determining that the specified component satisfies an upgrade condition.
  • the upgrading the specified component image to be upgraded and refreshing the specified component image to be upgraded to the specified component includes: executing the constraints to perform the specified component image to be upgraded upgrade, and restore the constraint condition in response to the upgrade of the image of the specified component to be upgraded is completed.
  • the upgrading the image of the specified component to be upgraded and refreshing the image of the specified component to be upgraded to the specified component further includes: obtaining the upgrade code APP program from the image of the specified component to be upgraded , and use the upgrade code APP program to flash the firmware code of the specified component into the flash memory of the corresponding component.
  • the method further includes: recording the upgrade process, upgrade progress, and upgrade result in a preset format based on the specified component upgrade program, and providing an analysis interface to display the recorded content.
  • a file module configured to write the specified component upgrade program, configuration file, specified component to be upgraded image and digital signature into the specified component upgrade In the file;
  • the creation module is configured to create a detection process to detect whether the upgrade file is received, and in response to receiving the upgrade file, an upgrade process is created to start the specified component upgrade program in the upgrade file;
  • the detection module is configured to read Take the configuration file and execute the specified component upgrade program to detect whether the specified component satisfies the upgrade condition;
  • an execution module configured to respond to the specified component meets the upgrade condition, and execute the image of the specified component to be upgraded Upgrade and refresh the image of the specified component to be upgraded to the specified component.
  • a computer device including: at least one processor; and a memory, the memory stores computer instructions that can be run on the processor, and the instructions are executed by the The steps of the above method are realized when the processor executes.
  • a computer-readable storage medium stores a computer program for implementing the above method steps when executed by a processor.
  • the application at least has the following beneficial technical effects: read and refresh the image file through an independent executable program, without relying on other processes of the BMC, realize the independent upload and execution of the independent upgrade program, and avoid the modification of the BMC code.
  • FIG. 1 is a schematic diagram of an embodiment of a method for independently upgrading components provided by the present application
  • FIG. 2 is a schematic diagram of an embodiment of a system for independently upgrading components provided by the present application
  • FIG. 3 is a schematic diagram of the hardware structure of an embodiment of a computer device whose components are independently upgraded provided by the present application;
  • Fig. 4 is a schematic diagram of an embodiment of a computer storage medium for independently upgrading components provided by the present application.
  • FIG. 1 is a schematic diagram of an embodiment of the method for independently upgrading components provided by the present application. As shown in Figure 1, the embodiment of the present application includes the following steps:
  • the designated component is upgraded through an upgrade file
  • the upgrade file includes four parts: an upgrade program of the designated part, a configuration file, an image of the designated part to be upgraded, and a digital signature.
  • the specified component upgrade program is an executable program. After uploading to the BMC, it will run under the embedded Linux operating system of the BMC and start the upgrade process as an independent process; the configuration file is used to store the parameter configuration required by the upgrade program.
  • the configuration information needs to be abstracted to form a configuration file, such as physical channel, channel number, device address, device model applicable to the image to be upgraded, and upgrade constraints;
  • the image to be upgraded of the specified component is the firmware image used by the component to be upgraded file, the upgrade program will finally refresh the image to be upgraded to the specified component;
  • the digital signature is used to ensure the integrity and security of the upgrade file, and prevent illegal users from introducing malicious executable files.
  • a detection process is created to detect whether an upgrade file is received, and in response to receiving the upgrade file, an upgrade process is created to start an upgrade program for specified components in the upgrade file.
  • the creating an upgrade process to start the specified component upgrade program in the upgrade file includes: performing an integrity check on the digital signature, and judging whether the digital signature passes the integrity check ; and in response to the digital signature passing the integrity check, creating an upgrade process.
  • the detection process is used to detect the upgrade file, guide the specified component upgrade program in the upgrade file to automatically execute, and run under the BMC OS (operating system) in the form of an independent APP (the BMC operating system is the Linux operating system).
  • the detection process continuously detects whether there is an upgrade file. After the upgrade file is detected, the digital signature of the upgrade file is verified. If the verification is passed, the image is complete, otherwise the image is incomplete. If the upgrade file is complete, the detection process will read the specified component upgrade program according to the format of the upgrade file, and start a process to execute the specified component upgrade program.
  • the specified component upgrade program is an independent executable program that occupies a separate process. The process here is only for the purpose of running the specified component upgrade program.
  • the program runs, it is two completely independent processes from the detection process.
  • the upgrade process is started independently, it will have a high degree of flexibility, and can access the specified components flexibly without depending on other running programs of the BMC.
  • the upgrade code has a high degree of development flexibility and is independent It runs without affecting the operation of other programs, which increases the reliability of operation.
  • the configuration file is used to store the parameter configuration required by the upgrade program.
  • Upgrade constraints for example, to upgrade a PSU, it is necessary to abstract the Bus channel number of the BMC, the I2C Slave (slave) address of the PSU, and the power supply model applicable to the image to be upgraded.
  • the upgrade constraint is to stop the PSU information access process, so that different servers will Use the same set of upgrade programs and different configuration files to achieve program reuse.
  • the reading the configuration file and executing the specified component upgrade program to detect whether the specified component meets the upgrade conditions includes: obtaining the hardware information and constraints of the specified component from the configuration file conditions, and access the corresponding physical channel to obtain the model of the corresponding component; and compare the model with the model in the hardware information to determine whether the component is the specified component.
  • the reading the configuration file and executing the specified component upgrade program to detect whether the specified component meets the upgrade condition further includes: in response to the specified component being the specified component, acquiring the component determining whether the state information satisfies the constraints in the configuration file; and in response to the state information satisfying the constraints in the configuration file, determining that the specified component satisfies an upgrade condition.
  • the image to be upgraded of the specified component is upgraded and the image to be upgraded of the specified component is refreshed to the specified component.
  • the upgrading the specified component image to be upgraded and refreshing the specified component image to be upgraded to the specified component includes: executing the constraints to perform the specified component image to be upgraded upgrade, and restore the constraint condition in response to the upgrade of the image of the specified component to be upgraded is completed.
  • the upgrading the image of the specified component to be upgraded and refreshing the image of the specified component to be upgraded to the specified component further includes: obtaining the upgrade code APP program from the image of the specified component to be upgraded , and use the upgrade code APP program to flash the firmware code of the specified component into the flash memory of the corresponding component.
  • the specified component upgrade program is the upgrade code developed for the specified component. If a new component is added, such as a PSU, the developer develops the upgrade code based on the upgrade solution supported by the power supply. For example, accessing the PSU through I2C to perform the Flash upgrade of the PSU, the program must include :
  • Upgradeable status detection that is, to detect whether the components to be upgraded meet the upgrade conditions, such as whether the components are healthy
  • the upgrade process record, upgrade progress and upgrade status are recorded to the specified status file. After the upgrade is complete, the upgrade process will automatically exit.
  • the upgrade program must go through the executable program that can be started by the BMC embedded system, and the executable program must be compiled through the specified cross-compilation tool.
  • the method further includes: recording the upgrade process, upgrade progress, and upgrade result in a preset format based on the specified component upgrade program, and providing an analysis interface to display the recorded content.
  • the upgrade status file is used to record the upgrade process, upgrade progress, and upgrade results, and to view the upgrade status.
  • the upgrade program records files in a fixed format (such as Json file format), and BMC provides an analysis interface to display the current upgrade status to customers.
  • the embodiment of the present application reads and refreshes the image file through an independent executable program, independent of other processes of the BMC, and realizes the independent upload and execution of the independent upgrade program, avoiding the modification of the BMC code.
  • the system 200 includes the following modules: a file module, configured to write the specified component upgrade program, configuration file, specified component upgrade image and digital signature into the specified component's upgrade file; create a module, configured for Create a detection process to detect whether the upgrade file is received, and in response to receiving the upgrade file, create an upgrade process to start the specified component upgrade program in the upgrade file; the detection module is configured to read the configuration file and execute the described
  • the specified component upgrade program is used to detect whether the specified component satisfies the upgrade condition; and an execution module configured to upgrade the image of the specified component to be upgraded and the specified component to be upgraded in response to the specified component meeting the upgrade condition
  • the mirror is flushed to the specified component.
  • the creation module is configured to: perform an integrity check on the digital signature, and determine whether the digital signature passes the integrity check; and pass the Integrity check, create upgrade process.
  • the detection module is configured to: obtain the hardware information and constraints of the specified component from the configuration file, and access the corresponding physical channel to obtain the model of the corresponding component; and convert the model to and comparing it with the model number in the hardware information to determine whether the component is the specified component.
  • the detection module is configured to: obtain status information of the component in response to the component being the specified component, and determine whether the status information satisfies constraints in the configuration file; and In response to the status information satisfying the constraints in the configuration file, it is determined that the specified component satisfies an upgrade condition.
  • the execution module is configured to: execute the constraints to upgrade the image of the specified component to be upgraded, and in response to the completion of the upgrade of the image of the specified component to be upgraded, implement the constraints recover.
  • the execution module is configured to: obtain an upgrade code APP program from the image of the specified component to be upgraded, and use the upgrade code APP program to flash the firmware code of the specified component to the corresponding component in the flash memory.
  • the system further includes a recording module configured to: record the upgrade process, upgrade progress, and upgrade results in a preset format based on the specified component upgrade program, and provide an analysis interface to display the recorded content.
  • a recording module configured to: record the upgrade process, upgrade progress, and upgrade results in a preset format based on the specified component upgrade program, and provide an analysis interface to display the recorded content.
  • the third aspect of the embodiments of the present application proposes a computer device, including: at least one processor; and a memory, the memory stores computer instructions that can run on the processor, and the instructions are executed by the processor to The following steps are implemented: S1. Write the specified component upgrade program, configuration file, specified component to be upgraded image and digital signature into the specified component’s upgrade file; S2.
  • the creating an upgrade process to start the specified component upgrade program in the upgrade file includes: performing an integrity check on the digital signature, and judging whether the digital signature passes the integrity check ; and in response to the digital signature passing the integrity check, creating an upgrade process.
  • the reading the configuration file and executing the specified component upgrade program to detect whether the specified component meets the upgrade conditions includes: obtaining the hardware information and constraints of the specified component from the configuration file conditions, and access the corresponding physical channel to obtain the model of the corresponding component; and compare the model with the model in the hardware information to determine whether the component is the specified component.
  • the reading the configuration file and executing the specified component upgrade program to detect whether the specified component meets the upgrade condition further includes: in response to the specified component being the specified component, acquiring the component determining whether the state information satisfies the constraints in the configuration file; and in response to the state information satisfying the constraints in the configuration file, determining that the specified component satisfies an upgrade condition.
  • the upgrading the specified component image to be upgraded and refreshing the specified component image to be upgraded to the specified component includes: executing the constraints to perform the specified component image to be upgraded upgrade, and restore the constraint condition in response to the upgrade of the image of the specified component to be upgraded is completed.
  • the upgrading the image of the specified component to be upgraded and refreshing the image of the specified component to be upgraded to the specified component further includes: obtaining the upgrade code APP program from the image of the specified component to be upgraded , and use the upgrade code APP program to flash the firmware code of the specified component into the flash memory of the corresponding component.
  • the step further includes: recording the upgrade process, upgrade progress, and upgrade result in a preset format based on the specified component upgrade program, and providing an analysis interface to display the recorded content.
  • FIG. 3 it is a schematic diagram of the hardware structure of an embodiment of the above-mentioned computer equipment for independently upgrading components provided by the present application.
  • the device includes a processor 301 and a memory 302.
  • the processor 301 and the memory 302 may be connected through a bus or in other ways, and the connection through a bus is taken as an example in FIG. 3 .
  • the memory 302 as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs and modules, as in the method for independently upgrading components in the embodiment of the present application Program instructions/modules.
  • the processor 301 executes various functional applications and data processing of the server by running non-volatile software programs, instructions and modules stored in the memory 302 , that is, a method for realizing independent upgrade of components.
  • the memory 302 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required by a function; the data storage area may store data created by using the method of independent upgrade of components, and the like.
  • the memory 302 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage devices.
  • the memory 302 may optionally include memory that is remotely located relative to the processor 301, and these remote memories may be connected to the local module through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • One or more computer instructions 303 corresponding to the method for independently upgrading components are stored in the memory 302 , and when executed by the processor 301 , execute the method for independently upgrading components in any of the above method embodiments.
  • the present application also provides a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program for executing a method for independently upgrading components when executed by a processor.
  • FIG. 4 it is a schematic diagram of an embodiment of the computer storage medium for independently upgrading the above components provided in this application.
  • the computer readable storage medium 401 stores a computer program 402 for executing the above method when executed by a processor.
  • the program of the method for independently upgrading components can be stored in a computer-readable
  • the program may include the processes of the embodiments of the above-mentioned methods.
  • the storage medium of the program may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), and the like.
  • ROM read-only memory
  • RAM random access memory
  • the storage medium may be a read-only memory, a magnetic disk or an optical disk, and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

本申请提供一种部件独立升级的方法、系统、设备和存储介质,方法包括:将指定部件升级程序、配置文件、指定部件待升级镜像和数字签名写入指定部件的升级文件中;创建检测进程以检测是否接收到升级文件,响应于接收到升级文件,创建升级进程以启动所述升级文件中的指定部件升级程序;读取所述配置文件并执行所述指定部件升级程序以检测所述指定部件是否满足升级条件;以及响应于所述指定部件满足升级条件,对所述指定部件待升级镜像进行升级并将所述指定部件待升级镜像刷新到所述指定部件。本申请通过独立的可执行程序进行镜像文件读取、刷新,不依赖于BMC的其他进程,实现独立升级程序单独上传、执行,避免了BMC代码的改动。

Description

一种部件独立升级的方法、系统、设备和介质
本申请要求在2021年9月17日提交中国专利局、申请号为202111090305.2、发明名称为“一种部件独立升级的方法、系统、设备和介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及服务器领域,更具体地,特别是指一种部件独立升级的方法、系统、设备和存储介质。
背景技术
服务器、存储领域通常机型众多,有两路、四路、八路等不同服务器形态,系统中的可升级固件的部件较多,例如PSU(Power Supply Unit,电源)、网卡、RAID(Redundant Array of Independent Disks,独立硬盘冗余阵列)卡、CPLD(Complex Programmable Logic Device,复杂可编程逻辑器件)等,另外,新型外部设备层出不穷,例如GPU(Graphics Processing Unit,图形处理器)、非易失性内存等,通常BMC(Baseboard Management Controller,基板管理控制器)作为服务器监控管理核心负责可升级部件的固件升级,用户通过远程访问BMC,将待升级部件的固件上传到BMC,BMC通过I2C、JTAG等接口将固件升级到指定部件。
面对BMC要兼容众多款型号部件的升级,业界通用做法有两种:
一是将每个部件的不同升级代码写在BMC中,这种做法的缺点是如果新引入一个型号的部件(例如原本仅支持两个型号的电源,产品量产后又要兼容一款新型号电源),那么由于BMC中固化的代码中没有该型号的固件升级代码,所以需要BMC重新开发并兼容该型号固件升级代码,并要先将BMC升级到支持新型号部件的版本才能进行新部件的升级;
二是将部件升级代码以lib(库文件)包的形式固化下来,随固件将升级代码上传到BMC中,BMC升级程序引用lib包的升级函数进行固件升级,该方案受限于BMC原有升级程序,必须实现升级程序规定的升级接口函数,开发灵活性和维护便利性较差。
发明内容
有鉴于此,本申请实施例的目的在于提出一种部件独立升级的方法、系统、计算机设备及计算机可读存储介质,本申请通过独立的可执行程序进行镜像文件读取、刷新,不依赖于BMC的其他进程,实现独立升级程序单独上传、执行,避免了BMC代码的改动。
基于上述目的,本申请实施例的一方面提供了一种部件独立升级的方法,包括如下步骤:将指定部件升级程序、配置文件、指定部件待升级镜像和数字签名写入指定部件的升级文件中;创建检测进程以检测是否接收到升级文件,响应于接收到升级文件,创建升级进程以启动所述升级文件中的指定部件升级程序;读取所述配置文件并执行所述指定部件升级程序以检测所述指定部件是否满足升级条件;以及响应于所述指定部件满足升级条件,对所述指定部件待升级镜像进行升级并将所述指定部件待升级镜像刷新到所述指定部件。
在一些实施方式中,所述创建升级进程以启动所述升级文件中的指定部件升级程序包括:对所述数字签名进行完整性校验,并判断所述数字签名是否通过所述完整性校验;以及响应于所述数字签名通过所述完整性校验,创建升级进程。
在一些实施方式中,所述读取所述配置文件并执行所述指定部件升级程序以检测所述指定部件是否满足升级条件包括:从所述配置文件中获取所述指定部件的硬件信息和约束条件,并访问相应的物理通道以获取对应部件的型号;以及将所述型号与所述硬件信息中的型号进行对比以确定所述部件是否为所述指定部件。
在一些实施方式中,所述读取所述配置文件并执行所述指定部件升级 程序以检测所述指定部件是否满足升级条件还包括:响应于所述部件为所述指定部件,获取所述部件的状态信息,判断所述状态信息是否满足所述配置文件中的约束条件;以及响应于所述状态信息满足所述配置文件中的约束条件,确定所述指定部件满足升级条件。
在一些实施方式中,所述对所述指定部件待升级镜像进行升级并将所述指定部件待升级镜像刷新到所述指定部件包括:执行所述约束条件以对所述指定部件待升级镜像进行升级,并响应于所述指定部件待升级镜像升级完成,将所述约束条件进行恢复。
在一些实施方式中,所述对所述指定部件待升级镜像进行升级并将所述指定部件待升级镜像刷新到所述指定部件还包括:从所述指定部件待升级镜像中获取升级代码APP程序,并利用所述升级代码APP程序将所述指定部件的固件代码刷写到相应部件的闪存中。
在一些实施方式中,方法还包括:基于所述指定部件升级程序按照预设格式记录升级过程、升级进度和升级结果,并提供解析接口以展示记录的内容。
本申请实施例的另一方面,提供了一种部件独立升级的系统,包括:文件模块,配置用于将指定部件升级程序、配置文件、指定部件待升级镜像和数字签名写入指定部件的升级文件中;创建模块,配置用于创建检测进程以检测是否接收到升级文件,响应于接收到升级文件,创建升级进程以启动所述升级文件中的指定部件升级程序;检测模块,配置用于读取所述配置文件并执行所述指定部件升级程序以检测所述指定部件是否满足升级条件;以及执行模块,配置用于响应于所述指定部件满足升级条件,对所述指定部件待升级镜像进行升级并将所述指定部件待升级镜像刷新到所述指定部件。
本申请实施例的又一方面,还提供了一种计算机设备,包括:至少一个处理器;以及存储器,所述存储器存储有可在所述处理器上运行的计算机指令,所述指令由所述处理器执行时实现如上方法的步骤。
本申请实施例的再一方面,还提供了一种计算机可读存储介质,计算机可读存储介质存储有被处理器执行时实现如上方法步骤的计算机程序。
本申请至少具有以下有益技术效果:通过独立的可执行程序进行镜像文件读取、刷新,不依赖于BMC的其他进程,实现独立升级程序单独上传、执行,避免了BMC代码的改动。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的实施例。
图1为本申请提供的部件独立升级的方法的实施例的示意图;
图2为本申请提供的部件独立升级的系统的实施例的示意图;
图3为本申请提供的部件独立升级的计算机设备的实施例的硬件结构示意图;
图4为本申请提供的部件独立升级的计算机存储介质的实施例的示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚明白,以下结合具体实施例,并参照附图,对本申请实施例进一步详细说明。
需要说明的是,本申请实施例中所有使用“第一”和“第二”的表述均是为了区分两个相同名称非相同的实体或者非相同的参量,可见“第一”、“第二”仅为了表述的方便,不应理解为对本申请实施例的限定,后续实施例对此不再一一说明。
本申请实施例的第一个方面,提出了一种部件独立升级的方法的实施 例。图1示出的是本申请提供的部件独立升级的方法的实施例的示意图。如图1所示,本申请实施例包括如下步骤:
S1、将指定部件升级程序、配置文件、指定部件待升级镜像和数字签名写入指定部件的升级文件中;
S2、创建检测进程以检测是否接收到升级文件,响应于接收到升级文件,创建升级进程以启动所述升级文件中的指定部件升级程序;
S3、读取所述配置文件并执行所述指定部件升级程序以检测所述指定部件是否满足升级条件;以及
S4、响应于所述指定部件满足升级条件,对所述指定部件待升级镜像进行升级并将所述指定部件待升级镜像刷新到所述指定部件。
将指定部件升级程序、配置文件、指定部件待升级镜像和数字签名写入所述指定部件的升级文件中。
本申请实施例中通过升级文件来对指定部件进行升级,升级文件包括指定部件升级程序、配置文件、指定部件待升级镜像和数字签名四个部分。指定部件升级程序是可执行程序,上传到BMC后将在BMC的嵌入式Linux操作系统下运行,作为一个独立的进程启动升级流程;配置文件用于存储升级程序所需要的参数配置,为了提高升级程序的适用范围,需要将配置信息抽象出来形成配置文件,如物理通道、通道编号、设备地址、待升级镜像适用的设备型号、升级约束条件;指定部件待升级镜像是待升级部件所用的固件镜像文件,升级程序最终将待升级镜像刷新到指定部件;数字签名用于确保升级文件的完整性和安全性,避免非法用户传入恶意的可执行文件。
创建检测进程以检测是否接收到升级文件,响应于接收到升级文件,创建升级进程以启动所述升级文件中的指定部件升级程序。
在一些实施方式中,所述创建升级进程以启动所述升级文件中的指定部件升级程序包括:对所述数字签名进行完整性校验,并判断所述数字签名是否通过所述完整性校验;以及响应于所述数字签名通过所述完整性校 验,创建升级进程。
检测进程用于检测升级文件,引导升级文件中的指定部件升级程序自动执行、以独立APP的形式运行在BMC的OS(操作系统)下(BMC的操作系统是Linux操作系统)。检测进程不断检测是否有升级文件,检测到升级文件后,对升级文件进行数字签名校验,如果校验通过则说明镜像完整,否则镜像不完整。如果升级文件完整,检测进程将按照升级文件格式将指定部件升级程序读取出来,并启动一个进程执行这个指定部件升级程序,这个指定部件升级程序是独立的可执行程序,单独占一个进程,检测进程在这里只是起到了让指定部件升级程序运行起来的目的,该程序运行起来以后就和检测进程是两个完全独立的进程。升级进程独立启动后将具有高度的灵活性,可以对指定部件的访问进行灵活访问,而不依赖于BMC其他正在运行的程序,对比以lib形式,存在升级代码具有高度的开发灵活性,并且独立运行而不影响其他程序运行,增加了运行可靠性。
读取所述配置文件并执行所述指定部件升级程序以检测所述指定部件是否满足升级条件。配置文件用于存储升级程序所需要的参数配置,为了提高指定部件升级程序的适用范围,需要将配置信息抽象出来形成配置文件,如物理通道、通道编号、设备地址、待升级镜像适用的设备型号、升级约束条件;例如升级PSU,要抽象出BMC的Bus通道号、PSU的I2C Slave(从)地址、待升级镜像适用的电源型号、升级约束条件是停止PSU信息访问进程,这样不同的服务器将适用同一套升级程序和不同的配置文件来做到程序的复用。
在一些实施方式中,所述读取所述配置文件并执行所述指定部件升级程序以检测所述指定部件是否满足升级条件包括:从所述配置文件中获取所述指定部件的硬件信息和约束条件,并访问相应的物理通道以获取对应部件的型号;以及将所述型号与所述硬件信息中的型号进行对比以确定所述部件是否为所述指定部件。
在一些实施方式中,所述读取所述配置文件并执行所述指定部件升级程序以检测所述指定部件是否满足升级条件还包括:响应于所述部件为所 述指定部件,获取所述部件的状态信息,判断所述状态信息是否满足所述配置文件中的约束条件;以及响应于所述状态信息满足所述配置文件中的约束条件,确定所述指定部件满足升级条件。
响应于所述指定部件满足升级条件,对所述指定部件待升级镜像进行升级并将所述指定部件待升级镜像刷新到所述指定部件。
在一些实施方式中,所述对所述指定部件待升级镜像进行升级并将所述指定部件待升级镜像刷新到所述指定部件包括:执行所述约束条件以对所述指定部件待升级镜像进行升级,并响应于所述指定部件待升级镜像升级完成,将所述约束条件进行恢复。
在一些实施方式中,所述对所述指定部件待升级镜像进行升级并将所述指定部件待升级镜像刷新到所述指定部件还包括:从所述指定部件待升级镜像中获取升级代码APP程序,并利用所述升级代码APP程序将所述指定部件的固件代码刷写到相应部件的闪存中。
指定部件升级程序是针对指定部件开发的升级代码,如果新加入一款部件,例如PSU,开发人基于电源支持的升级方案开发升级代码,如通过I2C访问PSU进行PSU的Flash升级,该程序要包含:
(1)读取配置文件,明确待升级设备的硬件信息、约束条件,如PSU升级中明确BMC I2C Bus通道号、所要升级电源的I2C Slave地址;如约束条件是停止PSU监控进程需要先停止相应进程,升级结束前再进行约束条件的恢复,即将PSU监控进程重新启动。
(2)目标部件的检测,即访问相应的物理通道检测是否为待升级部件,将配置文件中标记的待升级镜像所支持的型号与当前型号做比对,对比不通过停止升级程序;
(3)可升级状态检测,即检测待升级部件是否具备升级条件,如部件是否健康;
(4)升级指定部件,即读取升级文件中的待升级镜像,按照指定部件的升级说明进行升级。
升级过程记录,升级进度、升级状态记录到指定状态文件。升级结束后升级进程将自动退出。升级程序必须经过适用于BMC嵌入式系统能启动的可执行程序,要通过指定的交叉编译工具来编译得到的可执行程序。
在一些实施方式中,方法还包括:基于所述指定部件升级程序按照预设格式记录升级过程、升级进度和升级结果,并提供解析接口以展示记录的内容。升级状态文件用于记录升级过程、升级进度、升级结果,用于查看升级状态,升级程序按照固定的格式(如Json文件格式)记录文件,BMC提供解析接口给客户展示当前的升级状态。
本申请实施例通过独立的可执行程序进行镜像文件读取、刷新,不依赖于BMC的其他进程,实现独立升级程序单独上传、执行,避免了BMC代码的改动。
需要特别指出的是,上述部件独立升级的方法的各个实施例中的各个步骤均可以相互交叉、替换、增加、删减,因此,这些合理的排列组合变换之于部件独立升级的方法也应当属于本申请的保护范围,并且不应将本申请的保护范围局限在实施例之上。
基于上述目的,本申请实施例的第二个方面,提出了一种部件独立升级的系统。如图2所示,系统200包括如下模块:文件模块,配置用于将指定部件升级程序、配置文件、指定部件待升级镜像和数字签名写入指定部件的升级文件中;创建模块,配置用于创建检测进程以检测是否接收到升级文件,响应于接收到升级文件,创建升级进程以启动所述升级文件中的指定部件升级程序;检测模块,配置用于读取所述配置文件并执行所述指定部件升级程序以检测所述指定部件是否满足升级条件;以及执行模块,配置用于响应于所述指定部件满足升级条件,对所述指定部件待升级镜像进行升级并将所述指定部件待升级镜像刷新到所述指定部件。
在一些实施方式中,所述创建模块配置用于:对所述数字签名进行完整性校验,并判断所述数字签名是否通过所述完整性校验;以及响应于所述数字签名通过所述完整性校验,创建升级进程。
在一些实施方式中,所述检测模块配置用于:从所述配置文件中获取所述指定部件的硬件信息和约束条件,并访问相应的物理通道以获取对应部件的型号;以及将所述型号与所述硬件信息中的型号进行对比以确定所述部件是否为所述指定部件。
在一些实施方式中,所述检测模块配置用于:响应于所述部件为所述指定部件,获取所述部件的状态信息,判断所述状态信息是否满足所述配置文件中的约束条件;以及响应于所述状态信息满足所述配置文件中的约束条件,确定所述指定部件满足升级条件。
在一些实施方式中,所述执行模块配置用于:执行所述约束条件以对所述指定部件待升级镜像进行升级,并响应于所述指定部件待升级镜像升级完成,将所述约束条件进行恢复。
在一些实施方式中,所述执行模块配置用于:从所述指定部件待升级镜像中获取升级代码APP程序,并利用所述升级代码APP程序将所述指定部件的固件代码刷写到相应部件的闪存中。
在一些实施方式中,系统还包括记录模块,配置用于:基于所述指定部件升级程序按照预设格式记录升级过程、升级进度和升级结果,并提供解析接口以展示记录的内容。
基于上述目的,本申请实施例的第三个方面,提出了一种计算机设备,包括:至少一个处理器;以及存储器,存储器存储有可在处理器上运行的计算机指令,指令由处理器执行以实现如下步骤:S1、将指定部件升级程序、配置文件、指定部件待升级镜像和数字签名写入指定部件的升级文件中;S2、创建检测进程以检测是否接收到升级文件,响应于接收到升级文件,创建升级进程以启动所述升级文件中的指定部件升级程序;S3、读取所述配置文件并执行所述指定部件升级程序以检测所述指定部件是否满足升级条件;以及S4、响应于所述指定部件满足升级条件,对所述指定部件待升级镜像进行升级并将所述指定部件待升级镜像刷新到所述指定部件。
在一些实施方式中,所述创建升级进程以启动所述升级文件中的指定 部件升级程序包括:对所述数字签名进行完整性校验,并判断所述数字签名是否通过所述完整性校验;以及响应于所述数字签名通过所述完整性校验,创建升级进程。
在一些实施方式中,所述读取所述配置文件并执行所述指定部件升级程序以检测所述指定部件是否满足升级条件包括:从所述配置文件中获取所述指定部件的硬件信息和约束条件,并访问相应的物理通道以获取对应部件的型号;以及将所述型号与所述硬件信息中的型号进行对比以确定所述部件是否为所述指定部件。
在一些实施方式中,所述读取所述配置文件并执行所述指定部件升级程序以检测所述指定部件是否满足升级条件还包括:响应于所述部件为所述指定部件,获取所述部件的状态信息,判断所述状态信息是否满足所述配置文件中的约束条件;以及响应于所述状态信息满足所述配置文件中的约束条件,确定所述指定部件满足升级条件。
在一些实施方式中,所述对所述指定部件待升级镜像进行升级并将所述指定部件待升级镜像刷新到所述指定部件包括:执行所述约束条件以对所述指定部件待升级镜像进行升级,并响应于所述指定部件待升级镜像升级完成,将所述约束条件进行恢复。
在一些实施方式中,所述对所述指定部件待升级镜像进行升级并将所述指定部件待升级镜像刷新到所述指定部件还包括:从所述指定部件待升级镜像中获取升级代码APP程序,并利用所述升级代码APP程序将所述指定部件的固件代码刷写到相应部件的闪存中。
在一些实施方式中,步骤还包括:基于所述指定部件升级程序按照预设格式记录升级过程、升级进度和升级结果,并提供解析接口以展示记录的内容。
如图3所示,为本申请提供的上述部件独立升级的计算机设备的一个实施例的硬件结构示意图。
以如图3所示的装置为例,在该装置中包括一个处理器301以及一个 存储器302。
处理器301和存储器302可以通过总线或者其他方式连接,图3中以通过总线连接为例。
存储器302作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本申请实施例中的部件独立升级的方法对应的程序指令/模块。处理器301通过运行存储在存储器302中的非易失性软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现部件独立升级的方法。
存储器302可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据部件独立升级的方法的使用所创建的数据等。此外,存储器302可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器302可选包括相对于处理器301远程设置的存储器,这些远程存储器可以通过网络连接至本地模块。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
一个或者多个部件独立升级的方法对应的计算机指令303存储在存储器302中,当被处理器301执行时,执行上述任意方法实施例中的部件独立升级的方法。
执行上述部件独立升级的方法的计算机设备的任何一个实施例,可以达到与之对应的前述任意方法实施例相同或者相类似的效果。
本申请还提供了一种计算机可读存储介质,计算机可读存储介质存储有被处理器执行时执行部件独立升级的方法的计算机程序。
如图4所示,为本申请提供的上述部件独立升级的计算机存储介质的一个实施例的示意图。以如图4所示的计算机存储介质为例,计算机可读存储介质401存储有被处理器执行时执行如上方法的计算机程序402。
最后需要说明的是,本领域普通技术人员可以理解实现上述实施例方 法中的全部或部分流程,可以通过计算机程序来指令相关硬件来完成,部件独立升级的方法的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,程序的存储介质可为磁碟、光盘、只读存储记忆体(ROM)或随机存储记忆体(RAM)等。上述计算机程序的实施例,可以达到与之对应的前述任意方法实施例相同或者相类似的效果。
以上是本申请公开的示例性实施例,但是应当注意,在不背离权利要求限定的本申请实施例公开的范围的前提下,可以进行多种改变和修改。根据这里描述的公开实施例的方法权利要求的功能、步骤和/或动作不需以任何特定顺序执行。此外,尽管本申请实施例公开的元素可以以个体形式描述或要求,但除非明确限制为单数,也可以理解为多个。
应当理解的是,在本文中使用的,除非上下文清楚地支持例外情况,单数形式“一个”旨在也包括复数形式。还应当理解的是,在本文中使用的“和/或”是指包括一个或者一个以上相关联地列出的项目的任意和所有可能组合。
上述本申请实施例公开实施例序号仅仅为了描述,不代表实施例的优劣。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
所属领域的普通技术人员应当理解:以上任何实施例的讨论仅为示例性的,并非旨在暗示本申请实施例公开的范围(包括权利要求)被限于这些例子;在本申请实施例的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,并存在如上的本申请实施例的不同方面的许多其它变化,为了简明它们没有在细节中提供。因此,凡在本申请实施例的精神和原则之内,所做的任何省略、修改、等同替换、改进等,均应包含在本申请实施例的保护范围之内。

Claims (10)

  1. 一种部件独立升级的方法,其特征在于,包括如下步骤:
    将指定部件升级程序、配置文件、指定部件待升级镜像和数字签名写入指定部件的升级文件中;
    创建检测进程以检测是否接收到升级文件,响应于接收到升级文件,创建升级进程以启动所述升级文件中的指定部件升级程序;
    读取所述配置文件并执行所述指定部件升级程序以检测所述指定部件是否满足升级条件;以及
    响应于所述指定部件满足升级条件,对所述指定部件待升级镜像进行升级并将所述指定部件待升级镜像刷新到所述指定部件。
  2. 根据权利要求1所述的方法,其特征在于,所述创建升级进程以启动所述升级文件中的指定部件升级程序包括:
    对所述数字签名进行完整性校验,并判断所述数字签名是否通过所述完整性校验;以及
    响应于所述数字签名通过所述完整性校验,创建升级进程。
  3. 根据权利要求1所述的方法,其特征在于,所述读取所述配置文件并执行所述指定部件升级程序以检测所述指定部件是否满足升级条件包括:
    从所述配置文件中获取所述指定部件的硬件信息和约束条件,并访问相应的物理通道以获取对应部件的型号;以及
    将所述型号与所述硬件信息中的型号进行对比以确定所述部件是否为所述指定部件。
  4. 根据权利要求3所述的方法,其特征在于,所述读取所述配置文件并执行所述指定部件升级程序以检测所述指定部件是否满足升级条件还包括:
    响应于所述部件为所述指定部件,获取所述部件的状态信息,判断所述状态信息是否满足所述配置文件中的约束条件;以及
    响应于所述状态信息满足所述配置文件中的约束条件,确定所述指定部件满足升级条件。
  5. 根据权利要求4所述的方法,其特征在于,所述对所述指定部件待升级镜像进行升级并将所述指定部件待升级镜像刷新到所述指定部件包括:
    执行所述约束条件以对所述指定部件待升级镜像进行升级,并响应于所述指定部件待升级镜像升级完成,将所述约束条件进行恢复。
  6. 根据权利要求1所述的方法,其特征在于,所述对所述指定部件待升级镜像进行升级并将所述指定部件待升级镜像刷新到所述指定部件还包括:
    从所述指定部件待升级镜像中获取升级代码APP程序,并利用所述升级代码APP程序将所述指定部件的固件代码刷写到相应部件的闪存中。
  7. 根据权利要求1所述的方法,其特征在于,方法还包括:
    基于所述指定部件升级程序按照预设格式记录升级过程、升级进度和升级结果,并提供解析接口以展示记录的内容。
  8. 一种部件独立升级的系统,其特征在于,包括:
    文件模块,配置用于将指定部件升级程序、配置文件、指定部件待升级镜像和数字签名写入指定部件的升级文件中;
    创建模块,配置用于创建检测进程以检测是否接收到升级文件,响应于接收到升级文件,创建升级进程以启动所述升级文件中的指定部件升级程序;
    检测模块,配置用于读取所述配置文件并执行所述指定部件升级程序以检测所述指定部件是否满足升级条件;以及
    执行模块,配置用于响应于所述指定部件满足升级条件,对所述指定部件待升级镜像进行升级并将所述指定部件待升级镜像刷新到所述指定部件。
  9. 一种计算机设备,其特征在于,包括:
    至少一个处理器;以及
    存储器,所述存储器存储有可在所述处理器上运行的计算机指令,所述指令由所述处理器执行时实现权利要求1-7任意一项所述方法的步骤。
  10. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1-7任意一项所述方法的步骤。
PCT/CN2022/078270 2021-09-17 2022-02-28 一种部件独立升级的方法、系统、设备和介质 WO2023040198A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111090305.2 2021-09-17
CN202111090305.2A CN113535212A (zh) 2021-09-17 2021-09-17 一种部件独立升级的方法、系统、设备和介质

Publications (1)

Publication Number Publication Date
WO2023040198A1 true WO2023040198A1 (zh) 2023-03-23

Family

ID=78093337

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/078270 WO2023040198A1 (zh) 2021-09-17 2022-02-28 一种部件独立升级的方法、系统、设备和介质

Country Status (2)

Country Link
CN (1) CN113535212A (zh)
WO (1) WO2023040198A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113535212A (zh) * 2021-09-17 2021-10-22 苏州浪潮智能科技有限公司 一种部件独立升级的方法、系统、设备和介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040010786A1 (en) * 2002-07-11 2004-01-15 Microsoft Corporation System and method for automatically upgrading a software application
CN109669714A (zh) * 2018-12-19 2019-04-23 广东美的暖通设备有限公司 固件升级方法、装置及计算机可读存储介质
CN110083379A (zh) * 2019-05-10 2019-08-02 苏州浪潮智能科技有限公司 一种服务器部件升级方法及相关装置
CN113535212A (zh) * 2021-09-17 2021-10-22 苏州浪潮智能科技有限公司 一种部件独立升级的方法、系统、设备和介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040010786A1 (en) * 2002-07-11 2004-01-15 Microsoft Corporation System and method for automatically upgrading a software application
CN109669714A (zh) * 2018-12-19 2019-04-23 广东美的暖通设备有限公司 固件升级方法、装置及计算机可读存储介质
CN110083379A (zh) * 2019-05-10 2019-08-02 苏州浪潮智能科技有限公司 一种服务器部件升级方法及相关装置
CN113535212A (zh) * 2021-09-17 2021-10-22 苏州浪潮智能科技有限公司 一种部件独立升级的方法、系统、设备和介质

Also Published As

Publication number Publication date
CN113535212A (zh) 2021-10-22

Similar Documents

Publication Publication Date Title
US9372769B2 (en) Server and inspecting method thereof
TWI479309B (zh) 控制固態硬碟的裝置及方法
TWI465901B (zh) Method and system for verification of computerized systems for cloud testing and remote monitoring of integrated circuit devices
US9753809B2 (en) Crash management of host computing systems in a cluster
US10802847B1 (en) System and method for reproducing and resolving application errors
US20130185402A1 (en) Method and apparatus for developing service processor solutions
KR101949115B1 (ko) 디바이스 드라이버 검출 에러들의 자가 진단 및 자동 진단 데이터 수집
US20150154028A1 (en) Methods for accessing baseboard management controller
US20170286097A1 (en) Method to prevent operating system digital product key activation failures
CN106598637B (zh) 节点内的部件的选择性加载方法
WO2023040198A1 (zh) 一种部件独立升级的方法、系统、设备和介质
KR20170138365A (ko) 컴퓨터 시스템의 하드웨어 및 소프트웨어의 에러 발생 여부를 통합적으로 관리하는 장치
US20130080751A1 (en) Method and device for updating bios program for computer system
CN106021030A (zh) 一种数据库的系统、一种处理数据库故障的方法及装置
CN106935272B (zh) 开启eMMC后门调试的方法和装置
TW201629785A (zh) 管理控制器
US20120124425A1 (en) Method and Apparatus Useful In Manufacturing Test Case Operations
CN113641394A (zh) 一种多操作系统设备的差分升级方法
CN116383012B (zh) 获取开机日志的方法及装置、传输开机日志的方法
CN105630523A (zh) 计算机bios资料恢复系统及方法
WO2020113382A1 (zh) 硬件升级方法、装置、设备和存储介质
KR101941105B1 (ko) 컴퓨터 시스템에 포함된 하드웨어의 에러 발생 여부를 통합적으로 관리하여 백업 및 복구를 수행하여 외부 단말에 알리는 방법
KR101938202B1 (ko) 컴퓨터 시스템에 포함된 하드웨어의 에러 발생 여부를 통합적으로 관리하여 백업 및 복구를 수행하여 외부 단말에 알리는 방법
US8930666B1 (en) Virtual disk carousel
CN111045710A (zh) 一种基于IPMI命令的SAS-Expander固件升级的方法、设备及介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22868578

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE