A firmware upgrading method, device, equipment and storage medium
Patent Information
- Application Number
- CN202210867274.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-22
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2042-07-22
AI Technical Summary
[0002]当前,随着云技术、虚拟化技术的不断进步,市场不断扩展,需要更多的服务器的支持,对服务器的管理也是一个极大的挑战,在服务器管理中,需要更新开源BMC(Baseboard Management Controller,基板管理控制器)的版本,通常使用带内或带外的方式升级,但是当操作系统无法启动或操作系统由于错误而无法开机时,就无法通过操作系统完成固件更新,如果网络也出现了故障,也就无法通过带外(Redfish)方式进行更新,当无法通过带外方式更新时,一般就会将Flash拆除并使用烧录器进行烧录,完成固件更新后,然后再拆除的Flash重新安装到板卡上,在需要对大量固件更新升级时,这种方式效率就会很低
[0036]可见,本申请提供了一种固件升级方法,包括:监控USB的插拔状态,得到相应的第一监控结果;基于所述第一监控结果启动systemd服务,并获取所述USB对应的挂载目录下的目标文件;将所述目标文件拷贝至待升级固件对应的待升级目录下以生成相应的目标目录;触发所述目标目录以对所述待升级固件进行更新升级。由此可知,本申请根据监控到的USB的插拔状态启动systemd服务,然后获取USB对应的挂载目录下的目标文件,进而将该目标文件拷贝至待升级固件对应的待升级目录下以生成相应的目标目录;触发该目标目录进行固件升级,也就是说,通过使用USB更新固件,更容易进行相关的调试工作,有利于后续相关的维护工作,并且能够解决因为网络故障或因为操作系统错误而无法启动时,导致固件无法升级的问题。
Smart Images

Figure CN115328510B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a firmware upgrade method, apparatus, device, and storage medium. Background Technology
[0002] Currently, with the continuous advancement of cloud and virtualization technologies and the expanding market, there is a greater need for server support, making server management a significant challenge. Server management often involves updating the open-source BMC (Baseboard Management Controller) version, typically using in-band or out-of-band methods. However, when the operating system fails to boot or fails to power on due to an error, firmware updates cannot be completed through the operating system. Similarly, if the network also malfunctions, out-of-band (Redfish) updates are impossible. When out-of-band updates are not possible, the Flash memory is usually removed and programmed using a programmer. After the firmware update, the removed Flash memory is reinstalled onto the board. This method becomes very inefficient when a large number of firmware updates are required.
[0003] In summary, firmware updates for related technologies are significantly affected by the operating system and network, and firmware upgrade efficiency is low. Therefore, providing a solution to these technical problems is a problem that needs to be solved by those skilled in the art. Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide a firmware upgrade method, apparatus, device, and storage medium, capable of in-band upgrades and improving the efficiency of firmware updates. The specific solution is as follows:
[0005] Firstly, this application discloses a firmware upgrade method, including:
[0006] Monitor the USB plugging and unplugging status and obtain the corresponding initial monitoring results;
[0007] Based on the first monitoring result, the systemd service is started, and the target file in the mount directory corresponding to the USB is obtained;
[0008] Copy the target file to the upgrade directory corresponding to the firmware to be upgraded to generate the corresponding target directory;
[0009] The target directory is triggered to update and upgrade the firmware to be upgraded.
[0010] Optionally, the monitoring of the USB plugging / unplugging status to obtain the corresponding first monitoring result includes:
[0011] The system monitors the USB plug-in / plug-out status using the preset Device Manager to obtain the corresponding initial monitoring results.
[0012] Optionally, starting the systemd service based on the first monitoring result includes:
[0013] If the first monitoring result indicates that the USB is plugged in, then the systemd service is started.
[0014] Optionally, after monitoring the USB insertion / removal status and obtaining the corresponding first monitoring result, the method further includes:
[0015] Create device management rules using the preset device manager;
[0016] The second monitoring result is obtained by monitoring whether the USB meets the device management rules.
[0017] Accordingly, starting the systemd service based on the first monitoring result includes:
[0018] The systemd service is started based on the first monitoring result and the second monitoring result.
[0019] Optionally, starting the systemd service based on the first monitoring result and the second monitoring result includes:
[0020] If the first monitoring result indicates that the USB is in an inserted state and the second monitoring result indicates that the USB key meets the device management rules, then the systemd service is started.
[0021] Optionally, starting the systemd service includes:
[0022] Start the systemd service using a pre-created target script.
[0023] Optionally, obtaining the target file in the mount directory corresponding to the USB includes:
[0024] Determine if the mount directory corresponding to the USB exists;
[0025] If the mount directory exists, the target file packaged using the tar tool is obtained from the mount directory.
[0026] Secondly, this application discloses a firmware upgrade device, comprising:
[0027] The status monitoring module is used to monitor the insertion and removal status of USB and obtain the corresponding initial monitoring results;
[0028] The service startup module is used to start the systemd service based on the first monitoring result;
[0029] The file acquisition module is used to acquire the target file in the mount directory corresponding to the USB;
[0030] The directory generation module is used to copy the target file to the upgrade directory corresponding to the firmware to be upgraded in order to generate the corresponding target directory;
[0031] The firmware upgrade module is used to trigger the target directory to update and upgrade the firmware to be upgraded.
[0032] Thirdly, this application discloses an electronic device, including:
[0033] Memory is used to store computer programs;
[0034] A processor is configured to execute the computer program to implement the steps of the aforementioned disclosed firmware upgrade method.
[0035] 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 steps of the aforementioned disclosed firmware upgrade method.
[0036] As can be seen, this application provides a firmware upgrade method, including: monitoring the insertion and removal status of a USB to obtain a corresponding first monitoring result; starting a systemd service based on the first monitoring result and obtaining a target file in the mount directory corresponding to the USB; copying the target file to the upgrade directory corresponding to the firmware to be upgraded to generate a corresponding target directory; and triggering the target directory to update the firmware to be upgraded. Therefore, this application starts a systemd service based on the monitored insertion and removal status of the USB, then obtains a target file in the mount directory corresponding to the USB, and then copies the target file to the upgrade directory corresponding to the firmware to be upgraded to generate a corresponding target directory; triggering the target directory to upgrade the firmware. In other words, updating firmware via USB makes related debugging easier, facilitates subsequent maintenance, and solves the problem of firmware failure due to network failure or operating system errors. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in the embodiments of the present invention 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 the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0038] Figure 1 This is a flowchart of a firmware upgrade method disclosed in this application;
[0039] Figure 2 This is a flowchart of a specific firmware upgrade method disclosed in this application;
[0040] Figure 3 This is a flowchart of a specific firmware upgrade method disclosed in this application;
[0041] Figure 4 This is a schematic diagram of the structure of a firmware upgrade device disclosed in this application;
[0042] Figure 5 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0043] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0044] Currently, updating the open-source BMC version typically involves in-band or out-of-band upgrades. However, when the operating system fails to boot or fails to power on due to an error, firmware updates cannot be completed through the operating system. Similarly, if network failures occur, out-of-band updates are impossible. When out-of-band updates are not possible, the Flash memory is usually removed and programmed using a programmer. After the firmware update, the removed Flash memory is reinstalled onto the board. This method becomes very inefficient when performing numerous firmware updates. Therefore, this application provides a new firmware upgrade solution that enables in-band upgrades, improving the efficiency of firmware updates.
[0045] This invention discloses a firmware upgrade method, see [link to relevant documentation]. Figure 1 As shown, the method includes:
[0046] Step S11: Monitor the USB plugging and unplugging status and obtain the corresponding first monitoring result.
[0047] In this embodiment, the insertion and removal status of the USB (Universal Serial Bus) is monitored to obtain the corresponding first monitoring result. Specifically, the insertion and removal status of the USB is monitored through a preset device manager to obtain the corresponding first monitoring result. That is, udev is used to monitor the insertion and removal status of the USB key to ensure that the USB has been inserted into the relevant interface corresponding to the firmware to be upgraded. Here, Udev (Userspace Device, i.e., the Linux kernel device manager) mainly manages device nodes under the / dev directory, and the USB key is a hardware device with a USB interface.
[0048] Step S12: Start the systemd service based on the first monitoring result and obtain the target file in the mount directory corresponding to the USB.
[0049] In this embodiment, the systemd service is started based on the first monitoring result. If the first monitoring result indicates that the USB is inserted, the systemd service is started. Specifically, the systemd service can be started through a pre-created target script. If the first monitoring result indicates that the USB is not inserted, the systemd service is prevented from starting. Here, systemd (system daemon) is the first process in the system, and all other processes are its child processes, used to manage and start all child processes in parallel.
[0050] In this embodiment, after starting the systemd service, the process may further include: determining whether the instruction to disable USB firmware upgrades is currently enabled; if enabled, recording relevant logs and ending the current firmware upgrade; if not enabled, obtaining the target file in the mount directory corresponding to the USB, that is, obtaining the target file with the .tar extension in the mount directory.
[0051] Step S13: Copy the target file to the upgrade directory corresponding to the firmware to be upgraded to generate the corresponding target directory.
[0052] In this embodiment, the target file is copied to the upgrade directory corresponding to the firmware to be upgraded to generate the corresponding target directory. For example, the target file with the extension .tar in the mount directory is copied to the directory / tmp / images that the BMC needs to be upgraded. After the copy is completed, the corresponding target directory is generated based on the directory where the target file was copied. That is, after the copy is completed, the DBUS directory is generated.
[0053] Step S14: Trigger the target directory to update and upgrade the firmware to be upgraded.
[0054] In this embodiment, after copying the target file to the corresponding upgrade directory of the firmware to be upgraded to generate the corresponding target directory, the target directory can be triggered to update the firmware. It can be understood that copying the target file with the .tar extension to the BMC's upgrade directory / tmp / images and generating the DBUS directory can trigger DBUS to perform a firmware upgrade. That is, copying the tar package to be upgraded to the BMC via USB enables an in-band upgrade, meaning the firmware update is completed via the BMC's USB. Service support personnel can access the machine locally and update the system to a working firmware level. Specifically, the DBUS directory is monitored, and the current DBUS directory's upgrade status is set to Active. Following the update status, the firmware update begins, and the BMC is restarted after the firmware update is complete. If, due to security or other issues, the firmware upgrade function needs to be disabled under certain circumstances, it can be enabled or disabled at any time by triggering DBUS.
[0055] Therefore, this embodiment starts the systemd service based on the monitored USB plugging and unplugging status, then obtains the target file in the corresponding mount directory of the USB, and then copies the target file to the upgrade directory corresponding to the firmware to be upgraded to generate the corresponding target directory; triggers the firmware upgrade in the target directory. In other words, by using USB to update the firmware, it is easier to perform related debugging work, which is beneficial to subsequent related maintenance work, and can solve the problem of firmware failure due to network failure or operating system error.
[0056] See Figure 2 As shown, this embodiment of the invention discloses a specific firmware upgrade method. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution.
[0057] Step S21: Monitor the plugging and unplugging status of the USB and obtain the corresponding first monitoring result.
[0058] Step S22: Create device management rules through the preset device manager.
[0059] In this embodiment, device management rules are created through the preset device manager. That is, a udev rule is defined through udev, and the udev rule is adapted in software so that the insertion and removal status of the USB key can be monitored. For example, on a Power platform-based server, the insertion and removal status of the USB key is monitored through the udev rule, which realizes an in-band upgrade method when the network fails or the system fails to boot due to operating system errors.
[0060] Step S23: Monitor whether the USB meets the device management rules to obtain the corresponding second monitoring result.
[0061] In this embodiment, when the USB is inserted, the system monitors whether the USB meets the device management rules to obtain the corresponding second monitoring result, that is, to determine whether the USB meets the above udev rules.
[0062] Step S24: Start the systemd service based on the first monitoring result and the second monitoring result, and obtain the target file in the mount directory corresponding to the USB.
[0063] In this embodiment, the systemd service is started based on the first monitoring result and the second monitoring result. It can be understood that if the first monitoring result indicates that the USB is inserted and the second monitoring result indicates that the USB key meets the device management rules, then the systemd service is started. That is, if a USB key is detected to be inserted and meets the udev rules, the systemd service is started immediately.
[0064] Step S25: Copy the target file to the upgrade directory corresponding to the firmware to be upgraded to generate the corresponding target directory.
[0065] Step S26: Trigger the target directory to update and upgrade the firmware to be upgraded.
[0066] For details regarding steps S21, S25 to S26, please refer to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.
[0067] Therefore, this embodiment monitors the USB insertion and removal status and whether the USB insertion meets the corresponding rules. When the USB is inserted and meets the corresponding rules, the systemd service is started, and then the target file in the corresponding mount directory of the USB is obtained. The target file is then copied to the upgrade directory of the firmware to be upgraded to generate the corresponding target directory. The firmware upgrade is triggered in the target directory. In other words, by using USB to update the firmware, it is easier to perform related debugging work, which is beneficial to subsequent related maintenance work. It can also solve the problem that the firmware cannot be upgraded when it cannot start due to network failure or operating system error.
[0068] See Figure 3 As shown, this embodiment of the invention discloses a specific firmware upgrade method. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution.
[0069] Step S31: Monitor the plugging and unplugging status of the USB and obtain the corresponding first monitoring result.
[0070] Step S32: Start the systemd service based on the first monitoring result.
[0071] Step S33: Determine whether the mount directory corresponding to the USB exists.
[0072] In this embodiment, when the USB is in the plugged-in state, the systemd service is started, and then the file name corresponding to the mount directory is obtained, and it is determined whether the mount directory corresponding to the file name exists in the USB.
[0073] Step S34: If the mount directory exists, obtain the target file packaged using the tar tool from the mount directory.
[0074] In this embodiment, when the mount directory exists, the target file packaged by the tar tool is obtained from the mount directory, that is, the target file with the .tar extension in the mount directory is obtained.
[0075] Step S35: Copy the target file to the upgrade directory corresponding to the firmware to be upgraded to generate the corresponding target directory.
[0076] Step S36: Trigger the target directory to update and upgrade the firmware to be upgraded.
[0077] For details regarding steps S31 to S32 and steps S35 to S36, please refer to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.
[0078] Therefore, this embodiment starts the systemd service based on the monitored USB plugging / unplugging status, and then, if a mount directory exists, obtains the target file in the corresponding mount directory of the USB, and then copies the target file to the upgrade directory corresponding to the firmware to be upgraded to generate the corresponding target directory; triggers the firmware upgrade in the target directory. In other words, by using USB to update the firmware, it is easier to perform related debugging work, which is beneficial to subsequent related maintenance work, and can solve the problem of firmware failure due to network failure or operating system error.
[0079] Accordingly, this application also discloses a firmware upgrade device, see [link to relevant documentation]. Figure 4 As shown, the device includes:
[0080] The status monitoring module 11 is used to monitor the insertion and removal status of the USB and obtain the corresponding first monitoring result;
[0081] Service startup module 12 is used to start the systemd service based on the first monitoring result;
[0082] File acquisition module 13 is used to acquire target files in the mount directory corresponding to the USB;
[0083] The directory generation module 14 is used to copy the target file to the upgrade directory corresponding to the firmware to be upgraded in order to generate the corresponding target directory;
[0084] Firmware upgrade module 15 is used to trigger the target directory to update and upgrade the firmware to be upgraded.
[0085] As can be seen from the above, this embodiment starts the systemd service based on the monitored USB plugging and unplugging status, then obtains the target file in the corresponding mount directory of the USB, and then copies the target file to the upgrade directory corresponding to the firmware to be upgraded to generate the corresponding target directory; triggers the firmware upgrade in the target directory. In other words, by using USB to update the firmware, it is easier to perform related debugging work, which is beneficial to subsequent related maintenance work, and can solve the problem that the firmware cannot be upgraded when it cannot start due to network failure or operating system error.
[0086] In some specific embodiments, the status monitoring module 11 may specifically include:
[0087] The status monitoring unit is used to monitor the plugging and unplugging status of USB devices through a preset device manager and obtain the corresponding first monitoring results.
[0088] In some specific embodiments, the service startup module 12 may specifically include:
[0089] The first service startup unit is used to start the systemd service when the first monitoring result indicates that the USB is in the inserted state.
[0090] In some specific embodiments, the firmware upgrade device may further include:
[0091] The rule creation module is used to create device management rules through the preset device manager;
[0092] The rule monitoring module is used to monitor whether the USB meets the device management rules and obtain the corresponding second monitoring result;
[0093] In some specific embodiments, the service startup module 12 may specifically include:
[0094] The second service startup unit is used to start the systemd service based on the first monitoring result and the second monitoring result.
[0095] In some specific embodiments, the second service startup unit may specifically include:
[0096] The third service startup subunit is used to start the systemd service when the first monitoring result indicates that the USB is in the inserted state and the second monitoring result indicates that the USB key meets the device management rules.
[0097] In some specific embodiments, the service startup module 12 may specifically include:
[0098] The fourth service startup unit is used to start systemd services via a pre-created target script.
[0099] In some specific embodiments, the file acquisition module 13 may specifically include:
[0100] The determination unit is used to determine whether the mount directory corresponding to the USB exists;
[0101] The file acquisition unit is used to acquire the target file packaged by the tar tool from the mount directory when the mount directory exists.
[0102] Furthermore, embodiments of this application also provide an electronic device. Figure 5 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.
[0103] Figure 5 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 firmware upgrade method disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0104] 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.
[0105] 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.
[0106] 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 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.
[0107] Furthermore, embodiments of this application also disclose a computer-readable storage medium storing a computer program, which, when loaded and executed by a processor, implements the firmware upgrade method steps disclosed in any of the foregoing embodiments.
[0108] 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.
[0109] 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.
[0110] The firmware upgrade method, apparatus, device, and storage medium provided by the present invention have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. 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 the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A firmware upgrade method, characterized in that, include: Monitor the USB plugging and unplugging status and obtain the corresponding initial monitoring results; Based on the first monitoring result, the systemd service is started, and the target file in the mount directory corresponding to the USB is obtained; Copy the target file to the upgrade directory corresponding to the firmware to be upgraded to generate the corresponding target directory; Trigger the target directory to update and upgrade the firmware to be upgraded; The monitoring of the USB plugging / unplugging status yields the corresponding first monitoring results, including: The USB plug-in / plug-out status is monitored by the preset device manager to obtain the corresponding first monitoring results; After monitoring the USB plug-in / plug-out status and obtaining the corresponding first monitoring result, the method further includes: Device management rules are created using the preset device manager; these rules are used to detect the plugging / unplugging status of USB devices. The second monitoring result is obtained by monitoring whether the USB meets the device management rules. Starting the systemd service based on the first monitoring result includes: If the first monitoring result indicates that the USB is in an inserted state and the second monitoring result indicates that the USB key meets the device management rules, then the systemd service is started; The step of copying the target file to the upgrade directory corresponding to the firmware to be upgraded to generate the corresponding target directory includes: Copy the target file to the upgrade directory corresponding to the firmware to be upgraded. After the copy is completed, a DBUS directory is generated. The target file is a file with the extension .tar, the firmware to be upgraded is BMC, and the upgrade directory is the / tmp / images directory. Triggering the target directory to update the firmware to be upgraded includes: Monitor the DBUS directory and set its upgrade status to Active to update the firmware to be upgraded.
2. The firmware upgrade method according to claim 1, characterized in that, Starting the systemd service based on the first monitoring result includes: If the first monitoring result indicates that the USB is plugged in, then the systemd service is started.
3. The firmware upgrade method according to claim 1, characterized in that, Starting the systemd service based on the first monitoring result includes: The systemd service is started based on the first monitoring result and the second monitoring result.
4. The firmware upgrade method according to claim 1, characterized in that, Starting the systemd service includes: Start the systemd service using a pre-created target script.
5. The firmware upgrade method according to any one of claims 1 to 4, characterized in that, The step of obtaining the target file in the mount directory corresponding to the USB includes: Determine if the mount directory corresponding to the USB exists; If the mount directory exists, the target file packaged using the tar tool is obtained from the mount directory.
6. A firmware upgrade device, characterized in that, include: The status monitoring module is used to monitor the insertion and removal status of USB and obtain the corresponding initial monitoring results; The service startup module is used to start the systemd service based on the first monitoring result; The file acquisition module is used to acquire the target file in the mount directory corresponding to the USB; The directory generation module is used to copy the target file to the upgrade directory corresponding to the firmware to be upgraded in order to generate the corresponding target directory; The firmware upgrade module is used to trigger the target directory to update and upgrade the firmware to be upgraded; The status monitoring module includes: The status monitoring unit is used to monitor the plugging and unplugging status of USB devices through a preset device manager and obtain the corresponding first monitoring results. The firmware upgrade device further includes: The rule creation module is used to create device management rules through the preset device manager; the device management rules are used to detect the plugging and unplugging status of USB devices. The rule monitoring module is used to monitor whether the USB meets the device management rules and obtain the corresponding second monitoring result; The service startup module is specifically used to start the systemd service if the first monitoring result indicates that the USB is in a plugged-in state and the second monitoring result indicates that the USB key meets the device management rules. The directory generation module is specifically used to copy the target file to the upgrade directory corresponding to the firmware to be upgraded. After the copying is completed, a DBUS directory is generated. The target file is a file with the extension .tar, the firmware to be upgraded is BMC, and the upgrade directory is the / tmp / images directory. The firmware upgrade module is specifically used to monitor the DBUS directory and set the upgrade status of the DBUS directory to Active in order to update and upgrade the firmware to be upgraded.
7. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the firmware upgrade method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, Used to store a computer program; wherein, when executed by a processor, the computer program implements the steps of the firmware upgrade method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Vehicle-mounted system upgrading method, equipment and device
CN114625398A