Upgrading device and upgrading method for external bus expansion equipment
By providing an external bus expansion equipment upgrade device including communication unit and control unit, the problem of building complex hardware environments for the existing out-of-band upgrade PCIe Switch is solved, and a fast and lightweight upgrade process is achieved, which is suitable for production line installation.
Patent Information
- Application Number
- CN202310948865.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-28
- Publication Date
- 2025-02-14
AI Technical Summary
The existing out-of-band upgrade method of PCIe Switch requires a complex hardware environment, resulting in high time costs and cannot be easily installed on the production line.
Provide an external bus expansion device upgrade device, including a communication unit and a control unit, connects the first electronic device through wireless communication, receives preset firmware, and detects firmware information and operation information after the external bus expansion device is restarted, and determines whether the firmware is successful. Burning and equipment upgrades successfully.
It reduces the time and hardware volume of hardware during out-of-band upgrades, allowing upgraded devices to be easily installed on the production line, reducing time costs and speeding up work progress.
Smart Images

Figure CN119440593A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of firmware burning, and in particular to an external bus expansion device upgrade device and an upgrade method. Background Art
[0002] Ways to upgrade external bus expansion devices (PCIe Switch) include out-of-band upgrades of PCIe Switch. Currently, out-of-band upgrades of PCIe Switch require the construction of a complex hardware environment, which makes the current out-of-band upgrade method difficult to install on the production line, and the time cost of the construction is high, which indirectly affects the work progress. Summary of the invention
[0003] In view of this, the present application provides an external bus expansion device upgrade device and upgrade method, which reduces the time for setting up the hardware environment when the external bus expansion device is upgraded out-of-band, reduces the required hardware volume, and makes the external bus expansion device upgrade device easily installed on the production line.
[0004] In a first aspect, the present application provides an external bus expansion device upgrading device, the external bus expansion device upgrading device comprising: a communication unit, the communication unit being used to establish a wireless communication connection with a first electronic device; a control unit, the control unit being used to: receive a preset firmware of the first electronic device, wherein the preset firmware is a firmware that enables the normal operation of the external bus expansion device; burn the preset firmware to the external bus expansion device of a second electronic device; determine whether the preset firmware is burned to the external bus expansion device based on firmware information fed back by the external bus expansion device after restart; and determine whether the external bus expansion device is successfully upgraded based on operating information fed back by the external bus expansion device after restart.
[0005] In this way, the external bus expansion device upgrade device is provided with a communication unit, through which the external bus expansion device upgrade device and the first electronic device can be wirelessly connected, and the user can remotely control the external bus expansion device upgrade device through the first electronic device, use the external bus expansion device upgrade device to burn the preset firmware into the external bus expansion device of the second electronic device, and detect whether the preset firmware is burned into the external bus expansion device, and whether the external bus expansion device is successfully upgraded. The time for setting up the hardware environment when the external bus expansion device is upgraded out of band is reduced, the required hardware volume is reduced, and the external bus expansion device upgrade device can be easily installed on any production line.
[0006] In some embodiments of the first aspect, the external bus expansion device upgrading apparatus further includes a UART port, and the UART port is used to establish a communication connection with the external bus expansion device.
[0007] In some embodiments of the first aspect, the control unit is further used to determine that the preset firmware is burned into the external bus expansion device when the version number and timestamp of the firmware information are consistent with the version number and timestamp of the release version.
[0008] In some embodiments of the first aspect, the control unit is further configured to determine that the external bus expansion device is successfully upgraded when the operation log file of the operation information is consistent with the preset operation log file, and / or the register data of the operation information is consistent with the preset register data. In some embodiments of the first aspect, the control unit is further configured to store and back up the operation information after marking the preset time.
[0009] In some embodiments of the first aspect, the communication unit includes a Bluetooth module, a WiFi wireless module, or a network switch module.
[0010] The second aspect provides an external bus expansion device upgrade method, which is applied to an external bus expansion device upgrade device, and the method includes: receiving a preset firmware of the first electronic device, wherein the preset firmware is a firmware that enables the external bus expansion device to operate normally; burning the preset firmware to the external bus expansion device of the second electronic device; determining whether the preset firmware is burned to the external bus expansion device based on firmware information fed back by the external bus expansion device after restart; and determining whether the external bus expansion device is successfully upgraded based on operating information fed back by the external bus expansion device after restart.
[0011] In this way, the user can remotely control the external bus expansion device upgrade device through the first electronic device, use the external bus expansion device upgrade device to burn the preset firmware into the external bus expansion device of the second electronic device, and detect whether the preset firmware is burned into the external bus expansion device and whether the external bus expansion device is successfully upgraded. The time for setting up the hardware environment when the external bus expansion device is upgraded out of band is reduced, the required hardware volume is reduced, and the external bus expansion device upgrade device can be easily installed on any production line.
[0012] In some embodiments of the second aspect, determining whether the preset firmware is burned into the external bus expansion device based on the firmware information fed back by the external bus expansion device after restarting includes: when the version number and timestamp of the firmware information are consistent with the version number and timestamp of the release version, determining that the preset firmware is burned into the external bus expansion device.
[0013] In some embodiments of the second aspect, determining whether the external bus expansion device is successfully upgraded based on the operating information fed back after the external bus expansion device is restarted includes: when the operating log file of the operating information is consistent with the preset operating log file, and / or the register data of the operating information is consistent with the preset register data, determining that the external bus expansion device is successfully upgraded.
[0014] In some embodiments of the second aspect, after the external bus expansion device is successfully upgraded, the method further includes: marking the operation information for a preset time and then storing and backing it up. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A scenario application diagram of the external bus expansion device upgrade device of an embodiment of the present application;
[0016] Figure 2 A schematic diagram of the structure of an external bus expansion device upgrade device according to an embodiment of the present application;
[0017] Figure 3 A schematic diagram of the structure of an external bus expansion device upgrade device according to an embodiment of the present application;
[0018] Figure 4 A schematic flow chart of an external bus expansion device upgrade method of an embodiment of the present application;
[0019] Figure 5 This is a schematic diagram of the logic function modules of the external bus expansion device upgrade device according to an embodiment of the present application;
[0020] Figure 6 This is a flow chart of an external bus expansion device upgrade method of an embodiment of the present application. DETAILED DESCRIPTION
[0021] In the present application, the term "plurality" refers to two or more. In addition, it should be understood that in the description of the present application, the terms "first", "second", etc. are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying an order.
[0022] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0023] The following is a brief description of the relevant technology.
[0024] The server's central processing unit (CPU) exchanges data with other devices through an external bus. For example, the CPU exchanges data with the hard disk, network card, and sound card through an external bus. PCIe is a type of external bus. The number of PCIe can be expanded through an external bus expansion device (PCIe Switch). For example, the CPU originally only has one PCIe connected to the hard disk. When the CPU is equipped with a PCIe Switch, the PCIe Switch can connect to multiple PCIe at the same time. At this time, the CPU can exchange data with the hard disk, network card, and sound card at the same time through multiple PCIe.
[0025] At present, the way to upgrade PCIe Switch includes out-of-band upgrade of PCIe Switch. The out-of-band upgrade method is, first, to build the hardware environment, that is, to connect the debugging port of the personal computer and the PCIe Switch with a serial port cable. The debugging port can be an SDB port (also known as a UART port). Then, use the software tool provided by the PCIe Switch manufacturer on the personal computer, enter multiple instructions, and complete the burning of the PCIe Switch firmware pre-stored in the personal computer into the PCIe Switch. After restarting the PCIe Switch, enter multiple instructions to the personal computer so that the personal computer receives the firmware information sent by the PCIe Switch. If the firmware information is consistent with the firmware information of the released version, it proves that the out-of-band upgrade is successful.
[0026] It can be seen that the current out-of-band upgrade of the PCIe Switch firmware is cumbersome and requires operator training, with a high technical threshold. The operation process of copying the pre-prepared PCIe Switch firmware to the personal computer takes a long time. The hardware environment of using a personal computer and connecting the personal computer to the PCIe Switch is built by wired connection, which makes the current out-of-band upgrade method difficult to install on the production line, and the time cost of the installation is high, which indirectly affects the work progress.
[0027] In view of this, the present application provides an external bus expansion device upgrade method and an external bus expansion device upgrade device, which can be easily installed on the production line, reduce time costs, and speed up work progress.
[0028] The following is an explanation of the technical terms of this application:
[0029] Linux, the full name of which is GNU / Linux, is a UNIX-like operating system, a multi-user, multi-tasking operating system based on POSIX that supports multi-threading and multi-CPU.
[0030] Firmware refers to the program written into the erasable programmable read-only memory (EPROM) or electrically erasable programmable read-only memory (EEPROM). Through the firmware, the operating system can implement the operation of a specific machine according to the standard device driver.
[0031] A script is an executable text written in a specific descriptive language according to a certain format. Scripts are usually saved in text (ASCII) and are only interpreted or compiled when they are called.
[0032] See also Figure 1 , Figure 1 This is a scene application diagram of the external bus expansion device upgrade device. The PCIe Switch of the second electronic device 1 on the production line is connected to the external bus expansion device upgrade device 2 through the external bus. The user 3 enters the first command in the first electronic device 4 to establish a wireless communication connection between the external bus expansion device upgrade device 2 and the first electronic device 4. The user 3 enters the second command in the first electronic device 4 to control the external bus expansion device upgrade device 2 to receive the preset firmware from the second electronic device 4. The preset firmware is the firmware that enables the normal operation of the external bus expansion device. The user 3 enters the third command in the first electronic device 4 to control the external bus expansion device upgrade device 2 to run the running script and burn the preset firmware into the external bus expansion device (PCIe Switch) of the second electronic device 1. After restarting the PCIe Switch of the second electronic device 1, the user 3 enters the fourth command in the first electronic device 4 to control the external bus expansion device upgrade device 2 to run the first test script to receive the firmware information of the PCIe Switch, and determine whether the firmware information is consistent with the firmware information of the release version. When the firmware information is consistent with the firmware information of the release version, it is determined that the preset firmware is burned into the PCIe Switch. The external bus expansion device upgrade device 2 sends the information that the firmware is burned into the PCIe Switch to the first electronic device 4, so that the user 3 can understand that the firmware is burned into the PCIe Switch. The user 3 continues to input the fifth command in the first electronic device 4 to control the external bus expansion device upgrade device 2 to run the second test script to receive the operation information of the PCIe Switch, and to determine whether the operation information is consistent with the preset operation information. When the operation information is consistent with the preset operation information, it is determined that the preset firmware of the PCIe Switch is burned successfully, that is, the PCIe Switch is upgraded successfully. The external bus expansion device upgrade device 2 sends the information that the PCIe Switch is upgraded successfully to the first electronic device 4, so that the user 3 can understand that the PCIeSwitch is upgraded successfully.
[0033] It should be noted that in the process of sending commands from the first electronic device 4 to the external bus expansion device upgrade device 2, the generation of commands does not necessarily require the input of the user 3. The conditions for generating commands can be pre-set, and when the first electronic device 4 and the second electronic device 1 run to the conditions, the corresponding commands are generated. For example, the condition for generating commands is pre-set to generate the fifth command after the first electronic device 4 receives the information that the firmware is burned into the PCIe Switch. Specifically, after the user inputs the fourth command and the preset firmware is burned into the PCIe Switch, the external bus expansion device upgrade device 2 sends the information that the firmware is burned into the PCIe Switch to the first electronic device 4, and the first electronic device 4 automatically generates the fourth command, that is, the user 3 does not need to input the fifth command, and the bus expansion device upgrade device 2 can automatically execute subsequent commands. Therefore, the user 3 can only input one or more commands on the first electronic device 4, and the preset firmware can be burned into the second electronic device 1 through the first electronic device 4 remote control unit bus expansion device upgrade device 2.
[0034] Among them, the second electronic device 1 can be a server 1, the first electronic device 4 can be a mobile phone 42, a computer 41 and a personal computer (not shown in the figure), etc. The bus expansion device upgrade device 2 is equipped with an antenna 21, and the preset firmware can be obtained from the PCIeSwitch manufacturer. There are many ways to establish a wireless communication connection between the external bus expansion device upgrade device 2 and the first electronic device 4. When the first electronic device 4 is a computer 41, a local area network is established between the external bus expansion device upgrade device 2 and the computer 41 through a network switch 5 and a wireless access point (Access Poin, AP), and the local area network is used to realize wireless communication between the external bus expansion device upgrade device 2 and the computer 41. At the same time, other computers 41 can join the local area network through the network switch to form an Internet of Things, and realize intelligent control of the external bus expansion device upgrade device 2. In some embodiments, in order to achieve the stability of the Internet of Things formed by the network switch, a wired network switch can be used. When the second electronic device 4 is a mobile phone 42, the bus expansion device upgrade device 2 implements Bluetooth transmission technology or wireless WiFi transmission technology with the mobile phone 42 through the antenna 21, that is, the bus expansion device upgrade device 2 and the mobile phone 42 perform wireless communication such as Bluetooth transmission or WiFi transmission through the antenna 21.
[0035] There are also multiple ways for the external bus expansion device upgrade device 2 to receive the preset firmware of the PCIe Switch from the first electronic device 4. For example, method 1: when the second electronic device 4 is a computer 41, the preset firmware of the PCIe Switch can be pre-stored on the computer 41. When the user 3 enters the second command on the computer 41, the computer 41 sends the preset firmware to the external bus expansion device upgrade device 2 via the File Transfer Protocol (FTP); method 2: when the second electronic device 4 is a mobile phone 42, the preset firmware of the PCIe Switch can be stored on the computer 41 first, and then the computer 41 sends the preset firmware to the mobile phone 42 via Bluetooth transmission technology, so that the mobile phone 42 temporarily stores the preset firmware. When the user 3 enters the second command on the mobile phone 42, the mobile phone 42 sends the preset firmware to the external bus expansion device upgrade device 2.
[0036] It can be understood that the external bus expansion device upgrade device 2 of the present application can be installed on the server 1 of any production line, and the user 3 can control the external bus expansion device upgrade device 2 through the first electronic device 4, thereby realizing the out-of-band upgrade of the PCIe Switch of the server 1.
[0037] See also Figure 2 , Figure 2 The present invention is a schematic diagram of the structure of an external bus expansion device upgrade device of an embodiment of the present application. The external bus expansion device upgrade device 2 may include a communication unit 22 and a control unit 23. The communication unit 22 may be a WiFi (Wireless Fidelity, WiFi) wireless module, a network switch module or a Bluetooth (Bluetooth) module, wherein the network switch module is used to connect to the network switch. The communication unit 22 is used to establish a wireless communication connection between the external bus expansion device upgrade device 2 and the first electronic device 4. The control unit 23 may be a processor, and the control unit 23 is used to execute the external bus expansion device upgrade method of the present application.
[0038] In some embodiments, see Figure 3The external bus expansion device upgrade device 2 also includes a development board 25 and a UART port 24. The development board 25 is provided with a communication unit 22, a control unit 23 and a UART port 24. The development board 25 can be a development board based on a Linux operating system such as a Raspberry Pi development board. Optionally, the development board 25 of the external bus expansion device upgrade device 2 of the embodiment of the present application is a Raspberry Pi development board, which is a microcomputer based on an ARM (Advanced RISC Machine, ARM) processor. The UART port 24 is used to establish a communication connection between the external bus expansion device upgrade device 2 and the external bus expansion device of the second electronic device 1. Specifically, the UART port of the external bus expansion device of the second electronic device 1 is connected to the UART port 24 of the external bus expansion device upgrade device 2 through an external bus, and then a communication connection is established between the external bus expansion device upgrade device 2 and the external bus expansion device of the second electronic device 1.
[0039] It can be understood that the external bus expansion device upgrade device 2 of the present application is provided with a communication unit 22, which can realize the establishment of a wireless communication connection between the external bus expansion device upgrade device 2 and the second electronic device 4, reduce the time for setting up the hardware environment when the PCIe Switch is upgraded out-of-band, and reduce the required hardware volume. At the same time, the external bus expansion device upgrade device 2 of the embodiment of the present application uses a Raspberry Pi development board to integrate the hardware into the Raspberry Pi development board, reduce the overall volume of the external bus expansion device upgrade device 2, and reduce the required hardware volume. The external bus expansion device upgrade device 2 of the embodiment of the present application can be easily installed on any second electronic device 1 through the Raspberry Pi development board and the communication unit. The user can use the first electronic device 4 to remotely control the external bus expansion device upgrade device 2, and then perform an out-of-band upgrade on the PCIe Switch of the second electronic device 1.
[0040] See also Figure 4 , Figure 4 The flowchart of the external bus expansion device upgrade method of the embodiment of the present application is shown in FIG. The external bus expansion device upgrade device 2 can execute the external bus expansion device upgrade method of the embodiment of the present application. The second electronic device 1 involved in the embodiment of the present application is a server 1 as an example, and the first electronic device 4 is a computer 41 as an example. The external bus expansion device upgrade method of the embodiment of the present application includes the following steps:
[0041] Step S401: receiving a preset firmware of a first electronic device;
[0042] The external bus expansion device refers to a PCIe Switch. The external bus expansion device upgrade device 2 is installed on the server 1, and the UART port 24 of the external bus expansion device upgrade device 2 and the UART port 24 of the PCIe Switch of the server 1 are connected together by an external bus. At the same time, in response to the first command, the external bus expansion device upgrade device 2 establishes a wireless communication connection with the computer 41, and completes the communication connection between the external bus expansion device upgrade device 2 and the computer 41 and the server 1. Then, in response to the second command, the external bus expansion device upgrade device 2 receives a preset firmware from the computer 41. The preset firmware is a firmware that enables the normal operation of the PCIe Switch. The preset firmware can be obtained from the PCIe Switch manufacturer.
[0043] Step S402: Burning the preset firmware to the external bus expansion device of the second electronic device;
[0044] After receiving the preset firmware, the external bus expansion device upgrade device 2 burns the preset firmware into the PCIe Switch of the server 1 through the UART port 24. For example, the external bus expansion device upgrade device 2 can use a Linux tool to run a running script to burn the firmware into the PCIe Switch of the server 1.
[0045] Step S403: determining whether the preset firmware is burned into the external bus expansion device according to the firmware information fed back by the external bus expansion device after the restart;
[0046] After the user 3 restarts the PCIe Switch of the server 1 , the external bus expansion device upgrade apparatus 2 receives the firmware information and operation information of the PCIe Switch through the UART port 24 .
[0047] Specifically, the external bus expansion device upgrade device 2 can respond to the fourth command and call the Linux tool to run the first test script using the Linux tool. The external bus expansion device upgrade device 2 sends the first instruction generated by the first test script to the PCIe Switch. After receiving the first instruction, the PCIe Switch retrieves the firmware information of the preset firmware and sends it to the external bus expansion device upgrade device 2, so that the external bus expansion device upgrade device 2 can receive the firmware information sent by the PCIe Switch.
[0048] It can be understood that after completing step S402, the preset firmware is burned into the PCIe Switch, so the external bus expansion device upgrading apparatus 2 can obtain the firmware information of the preset firmware in the PCIe Switch.
[0049] After receiving the firmware information of the PCIe Switch, the external bus expansion device upgrade device 2 can determine whether the preset firmware is burned into the PCIe Switch according to the firmware information. Specifically, S403 may include step S501: when the version number and timestamp of the firmware information are consistent with the version number and timestamp of the release version, determining that the preset firmware is burned into the external bus expansion device;
[0050] The firmware information includes the version number and timestamp of the preset firmware. It is understandable that each firmware will be marked with the version number and release time when it is released, and the release time is the timestamp. Therefore, when the version number and timestamp of the firmware information received by the external bus expansion device upgrade device 2 are consistent with the version number and timestamp of the released version, it is determined that the preset firmware is burned into the PCIe Switch.
[0051] Step S404: determining whether the external bus expansion device is successfully upgraded based on the operation information fed back by the external bus expansion device after it is restarted.
[0052] At the same time, the external bus expansion device upgrade device 2 can respond to the fifth command and call the Linux tool to use the Linux tool to run the second test script. The external bus expansion device upgrade device 2 sends the second instruction generated by the test script to the PCIe Switch. After receiving the second instruction, the PCIe Switch runs the preset firmware according to the second instruction, generates operation information, and sends it to the external bus expansion device upgrade device 2. The external bus expansion device upgrade device 2 receives the operation information from the PCIe Switch.
[0053] After receiving the operation information of the PCIe Switch, the external bus expansion device upgrade device 2 can determine whether the PCIe Switch is successfully upgraded according to the operation information. Specifically, step S404 can include step S601: when the operation log file of the operation information is consistent with the preset operation log file, and / or the register data of the operation information is consistent with the preset register data, it is determined that the external bus expansion device is successfully upgraded.
[0054] The operation information includes the operation log file (i.e., operation log) and register data of the PCIe Switch. After the external bus expansion device upgrade device 2 receives the operation log file and / or register data of the operation information, when the operation log file of the operation information is consistent with the preset operation log file, and / or the register data of the operation information is consistent with the preset register data, it is determined that the PCIe Switch upgrade is successful.
[0055] It is understandable that when the PCIe Switch operates normally, operation information such as operation log files and register data will be generated. The operation log files generated by the normally operating PCIe Switch can be used as the preset operation log files, and the register data generated by the normally operating PCIe Switch can be used as the preset register data.
[0056] In some embodiments, after determining that the external bus expansion device is successfully upgraded, the external bus expansion device upgrade method further includes step S701: marking the operation information for a preset time and then storing and backing it up.
[0057] After determining that the external bus expansion device upgrade is successful, the external bus expansion device upgrade device 2 can also store and back up the operation information after marking the preset time. The preset time can be the time when the operation information is generated, or the time when the operation information is obtained by the external bus expansion device upgrade device 2, which can be set by the developer. So that the user 3 can use the second electronic device 4 to obtain the operation information of the external bus expansion device upgrade device 2. The user 3 can analyze the operation information again to improve the accuracy of judging whether the PCIe Switch is successfully upgraded. The preset time makes it easier for the user 3 to find the required operation information.
[0058] Understandably, the accuracy of judging whether the PCIe Switch is successfully upgraded by comparing only the preset operating information with the operating information is poor. After the operating information is stored and backed up at the preset time, the user 3 can obtain the operating information for further analysis, thereby improving the accuracy of judging whether the PCIe Switch is successfully upgraded.
[0059] It can be understood that the user 3 can remotely control the external bus expansion device upgrade device 2 through the first electronic device 4, use the external bus expansion device upgrade device 2 to burn the preset firmware into the external bus expansion device of the second electronic device 1, and detect whether the preset firmware is burned into the external bus expansion device, and whether the external bus expansion device is successfully upgraded. The time for setting up the hardware environment when the external bus expansion device is upgraded out of band is reduced, the required hardware volume is reduced, and the external bus expansion device upgrade device 2 can be easily installed on any production line.
[0060] See also Figure 5 , Figure 5Schematic diagram of the logical function modules of the external bus expansion device upgrade device of the embodiment of the present application. The external bus expansion device upgrade device 2 can use the Linux operating system. The external bus expansion device upgrade device 2 is provided with a wireless communication module 221, a Linux tool storage module 222 and a script running module 223. The wireless communication module 221 is used to establish a wireless communication connection between the external bus expansion device upgrade device 2 and the first electronic device 4, for example, to receive the preset firmware of the first electronic device 4. The Linux tool storage module 222 is used to provide the script running module 223 with the tools of the Linux operating system, and the tools of the Linux operating system can be software tools provided by the PCIe Switch manufacturer. The script running module 223 is used to run the script according to the tools of the Linux operating system, and the script includes a running script and a test script, and the test script includes a first test script and a second test script, and the running script is used to burn the preset firmware into the external bus expansion device of the second electronic device 1, and the first test script is used to determine whether the preset firmware is burned into the external bus expansion device according to the firmware information fed back by the restarted external bus expansion device. The second test script is used to determine whether the external bus expansion device is successfully upgraded according to the running information fed back by the restarted external bus expansion device.
[0061] In some embodiments, the logic function module of the external bus expansion device upgrade apparatus 2 further includes a UART port module 224, and the UART port module 224 is used to establish a communication connection between the external bus expansion device upgrade apparatus 2 and the external bus expansion device.
[0062] See also Figure 6 , Figure 6 This is a flow chart of an external bus expansion device upgrade method according to another embodiment of the present application. The external bus expansion device upgrade method includes the following steps:
[0063] Step S901: in response to a first command, establishing a wireless communication connection with a first electronic device and initializing a functional module;
[0064] The external bus expansion device upgrade device 2 responds to the first command, and the external bus expansion device upgrade device 2 establishes a wireless communication connection with the first electronic device 4. At the same time, the external bus expansion device upgrade device 2 responds to the first command to initialize the functional modules, which include a wireless communication module 221, a Linux tool storage module 222, a script running module 223, a UART port module 224, an indicator light module and a file system module, etc., wherein the indicator light module is used to feedback to the user whether the external bus expansion device upgrade device 2 is working properly, and the file system module is used to store various system files.
[0065] Step S902: receiving a preset firmware of the first electronic device in response to the second command;
[0066] In an application scenario, when the first electronic device 4 is a mobile phone 42, the user 3 opens the application (Application, APP) of the mobile phone 42, and uses the APP to copy the preset firmware in the computer 41 to the memory of the mobile phone 42. Then, the user 3 enters the second command on the mobile phone 42, and the mobile phone 42 sends the preset firmware to the external bus expansion device upgrade device 2.
[0067] In another application scenario, when the first electronic device 4 is a computer 41 , the user 3 inputs the second command on the computer 41 , and the computer 41 sends the preset firmware to the external bus expansion device upgrade apparatus 2 via the File Transfer Protocol (FTP).
[0068] Step S903: in response to the third command, running the running script to burn the preset firmware into the external bus expansion device of the second electronic device 1;
[0069] The external bus expansion device refers to a PCIe Switch. After the user 3 inputs a third command on the first electronic device 4 , the external bus expansion device upgrade device 2 calls a Linux tool to run a running script to burn the firmware into the PCIe Switch of the second electronic device 1 .
[0070] Step S904: receiving the restart information of the external bus expansion device and generating the fourth command;
[0071] Step S905: in response to the fourth command, running the first test script to determine whether the preset firmware is burned into the external bus expansion device according to the version number and the timestamp;
[0072] S906: If it is determined according to the version number and the timestamp that the preset firmware is burned into the external bus expansion device, then the second test script is run to receive the operation log file and register data of the external bus expansion device, and whether the external bus expansion device is successfully upgraded is determined according to the operation log file and the register data;
[0073] If it is determined according to the version number and the timestamp that the preset firmware has not been burned into the external bus expansion device, then step S907 is executed.
[0074] Step S907: sending the information that is not burned into the external bus expansion device to the first electronic device;
[0075] After step S906, the following steps are also included:
[0076] If it is determined according to the operation log file and the register data that the external bus expansion device has not been successfully upgraded, step S908 is executed;
[0077] Step S908: sending the information that the upgrade is not successful to the first electronic device;
[0078] If it is determined according to the operation log file and the register data that the external bus expansion device has not been successfully upgraded, step S909 is executed;
[0079] Step S909: Mark the operation information with a preset time and store it for backup.
[0080] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of server software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0081] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some characteristics can be ignored or not executed. Another point, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. Note that the above is only a preferred embodiment of the present application and the technical principles used.
[0082] Those skilled in the art will understand that the present application is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, all of which belong to the protection scope of the present application.
Claims
1. An external bus expansion device upgrade device, characterized in that: The external bus expansion device upgrade device comprises: A communication unit, the communication unit is used to establish a wireless communication connection with the first electronic device; A control unit, the control unit is used for: Receiving a preset firmware of the first electronic device, wherein the preset firmware is a firmware that enables the external bus extension device to operate normally; Burning the preset firmware to an external bus expansion device of a second electronic device; Determining whether the preset firmware is burned into the external bus expansion device according to the firmware information fed back by the external bus expansion device after restarting; Whether the external bus expansion device is successfully upgraded is determined according to the operation information fed back after the external bus expansion device is restarted.
2. The external bus expansion device upgrade device according to claim 1, characterized in that: The external bus expansion device upgrade apparatus further comprises a UART port, and the UART port is used to establish a communication connection with the external bus expansion device.
3. The external bus expansion device upgrade device according to claim 1 or 2, characterized in that: The control unit is further configured to determine that the preset firmware is burned into the external bus expansion device when the version number and timestamp of the firmware information are consistent with the version number and timestamp of the release version.
4. The external bus expansion device upgrade device according to claim 1 or 2, characterized in that: The control unit is further configured to determine that the external bus expansion device is successfully upgraded when the operation log file of the operation information is consistent with the preset operation log file, and / or the register data of the operation information is consistent with the preset register data.
5. The external bus expansion device upgrade device according to claim 1 or 2, characterized in that: The control unit is also used to store and back up the operation information after marking it for a preset time.
6. The external bus expansion device upgrade device according to claim 1, characterized in that: The communication unit includes a Bluetooth module, a WiFi wireless module or a network switch module.
7. A method for upgrading an external bus expansion device, applied to an external bus expansion device upgrading device, characterized in that: The method comprises: Receiving a preset firmware of the first electronic device, wherein the preset firmware is a firmware that enables the external bus extension device to operate normally; Burning the preset firmware to an external bus expansion device of a second electronic device; Determining whether the preset firmware is burned into the external bus expansion device according to the firmware information fed back by the external bus expansion device after restarting; Whether the external bus expansion device is successfully upgraded is determined according to the operation information fed back after the external bus expansion device is restarted.
8. The external bus expansion device upgrade method according to claim 7, characterized in that: The step of determining whether the preset firmware is burned into the external bus expansion device according to the firmware information fed back by the external bus expansion device after restarting includes: When the version number and the timestamp of the firmware information are consistent with the version number and the timestamp of the released version, it is determined that the preset firmware is burned into the external bus expansion device.
9. The external bus expansion device upgrade method according to claim 7, characterized in that: Determining whether the external bus expansion device is successfully upgraded according to the operation information fed back after the external bus expansion device is restarted includes: When the operation log file of the operation information is consistent with the preset operation log file, and / or the register data of the operation information is consistent with the preset register data, it is determined that the external bus expansion device is upgraded successfully.
10. The external bus expansion device upgrade method according to claim 7, characterized in that: After the external bus expansion device is successfully upgraded, the method further includes: The operation information is marked with a preset time and then stored for backup.