A firmware upgrading method and device based on CMIS 4.0
By introducing a global information segment, a boot segment, and an APP segment into the CMIS4.0 firmware upgrade method, and specifically updating designated code areas of the optical module, the problems of long update time and low efficiency in the existing technology are solved, and efficient firmware upgrades are achieved.
Patent Information
- Application Number
- CN202110089332.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-22
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2041-01-22
AI Technical Summary
In existing technologies, upgrading the firmware of optical modules requires updating all the code, resulting in long update times and low efficiency.
By adding a global information segment, a boot segment, and an APP segment to the CMIS4.0 firmware upgrade method, the code areas that need to be updated are recorded. After the target optical module parses the boot command payload bytes, only the specified fields are updated.
It improves the efficiency of firmware upgrades, avoids updating unnecessary code, and increases the update speed.
Smart Images

Figure CN112764790B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of optical module technology, and in particular to a firmware upgrade method, a firmware upgrade device, and a firmware upgrade system based on CMIS4.0. Background Technology
[0002] On March 8, 2019, the Multi Source Agreement (MSA) released its latest version for hot-pluggable optical modules, including Quad Small Form-factor Pluggable Double Density (QSFP-DD) and Quad Small Form-factor Pluggable (QSFP) modules. This is commonly referred to as the Common Management Interface Specification Rev. 4.0 (CMIS 4.0). CMIS requires optical modules to support Command Data Blocks (CDBs) for host-to-module communication. CMIS 4.0 specifically mentions the ability to use CDBs for firmware upgrades. During firmware upgrades, the firmware program can optionally be encrypted by inserting a start command payload of up to 112 bytes before the upgradeable file.
[0003] In existing technologies, upgrading the firmware of an optical module typically requires replacing all the code stored in the firmware's storage space. However, in practice, please refer to... Figure 1 , Figure 1 A diagram illustrating firmware space allocation for the optical module. (See also...) Figure 1The firmware code space in an optical module is divided into four spaces: BootLoader code space, application code space, Config data space, and firmware upgrade dump code space. The BootLoader code space, application code space, and Config data space store information required during operation. During the update process, the ultimate goal is to move the data from the firmware upgrade dump code space to the required address space via CDB, thus achieving the firmware upgrade. However, each upgrade typically does not require updating all the code in the firmware code space, as updating all the code would result in a long update time and low efficiency. Therefore, providing a more efficient firmware upgrade method for optical modules is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0004] The purpose of this invention is to provide a firmware upgrade method based on CMIS4.0 with high update efficiency; this invention also provides a firmware upgrade device based on CMIS4.0 and a firmware upgrade system based on CMIS4.0 with high update efficiency.
[0005] To address the aforementioned technical problems, this invention provides a firmware upgrade method based on CMIS 4.0, applied to a host computer, comprising:
[0006] Obtain the firmware upgrade file for the corresponding target optical module;
[0007] Extract the boot command payload bytes from the firmware upgrade file; the boot command payload bytes include a global information segment, a Boot segment, a Config segment, and an APP segment. The global information segment records the target fields to be upgraded; when the target fields include the Boot field, the Boot segment records the overall information of the Boot field; when the target fields include the Config field, the Config segment records the overall information of the Config field; when the target fields include the APP field, the APP segment records the overall information of the APP field.
[0008] The startup command payload byte is sent to the target optical module so that the target optical module can parse the startup command payload byte.
[0009] Once the target optical module successfully parses the firmware upgrade file, it sends the remaining content of the firmware upgrade file to the target optical module, so that the target optical module updates the target field according to the load bytes of the startup command.
[0010] Optionally, the Boot segment includes the byte length of the BootLoader code, the checksum of the entire BootLoader code, the offset address of the BootLoader code in the upgrade file, and the offset address where the BootLoader code should be stored in the chip.
[0011] The Config segment includes the byte length of the Config data, the checksum of the entire Config data content, the offset address of the Config data in the upgrade file, and the offset address where the Config data should be stored in the chip.
[0012] The APP segment includes the byte length of the APP code, the checksum of the entire APP code, the offset address of the APP code in the upgrade file, and the offset address where the APP code should be stored in the chip.
[0013] Optionally, the global information segment may also include firmware project number and upgrade password information;
[0014] The step of sending the startup command payload byte to the target optical module so that the target optical module can parse the startup command payload byte includes:
[0015] The startup command payload bytes are sent to the target optical module, so that the target optical module can determine whether the firmware upgrade file corresponds to the target optical module based on the firmware project number and the upgrade password information;
[0016] The step of sending the remaining content of the firmware upgrade file to the target optical module after the target optical module successfully parses the file, so that the target optical module updates the target field according to the boot command payload bytes, includes:
[0017] When the firmware upgrade file corresponds to the target optical module, the remaining content of the firmware upgrade file is sent to the target optical module so that the target optical module updates the target field according to the start command payload byte.
[0018] Optionally, the length of the startup command payload bytes is no greater than 112 bytes.
[0019] This invention also provides a firmware upgrade device based on CMIS4.0, applied to a host computer, comprising:
[0020] Acquisition module: Used to acquire the firmware upgrade file for the corresponding target optical module;
[0021] Extraction module: used to extract the boot command payload bytes from the firmware upgrade file; the boot command payload bytes include a global information segment, a Boot segment, a Config segment, and an APP segment. The global information segment records the target fields to be upgraded; when the target fields include the Boot field, the Boot segment records the overall information of the Boot field; when the target fields include the Config field, the Config segment records the overall information of the Config field; when the target fields include the APP field, the APP segment records the overall information of the APP field.
[0022] Byte sending module: used to send the startup command payload byte to the target optical module, so that the target optical module can parse the startup command payload byte;
[0023] Content sending module: When the target optical module successfully parses the file, it sends the remaining content of the firmware upgrade file to the target optical module, so that the target optical module updates the target field according to the load byte of the startup command.
[0024] This invention also provides a firmware upgrade method based on CMIS4.0, applied to a target optical module, comprising:
[0025] The system retrieves the boot command payload bytes extracted from the firmware upgrade file by the host computer. The boot command payload bytes include a global information segment, a Boot segment, a Config segment, and an APP segment. The global information segment records the target fields to be upgraded. When the target fields include a Boot field, the Boot segment records the overall information of the Boot field. When the target fields include a Config field, the Config segment records the overall information of the Config field. When the target fields include an APP field, the APP segment records the overall information of the APP field.
[0026] Parse the startup command payload bytes;
[0027] After successful parsing, the remaining contents of the firmware upgrade file are obtained through the host computer.
[0028] The target field is updated based on the startup command payload bytes and the remaining content of the firmware upgrade file.
[0029] Optionally, the Boot segment includes the byte length of the BootLoader code, the checksum of the entire BootLoader code, the offset address of the BootLoader code in the upgrade file, and the offset address where the BootLoader code should be stored in the chip.
[0030] The Config segment includes the byte length of the Config data, the checksum of the entire Config data content, the offset address of the Config data in the upgrade file, and the offset address where the Config data should be stored in the chip.
[0031] The APP segment includes the byte length of the APP code, the checksum of the entire APP code, the offset address of the APP code in the upgrade file, and the offset address where the APP code should be stored in the chip.
[0032] This invention also provides a firmware upgrade device based on CMIS4.0, applied to a target optical module, comprising:
[0033] Byte Acquisition Module: Used to acquire the boot command payload bytes extracted by the host computer from the firmware upgrade file; the boot command payload bytes include a global information segment, a Boot segment, a Config segment, and an APP segment. The global information segment records the target fields to be upgraded; when the target fields include the Boot field, the Boot segment records the overall information of the Boot field; when the target fields include the Config field, the Config segment records the overall information of the Config field; when the target fields include the APP field, the APP segment records the overall information of the APP field.
[0034] Byte parsing module: used to parse the payload bytes of the startup command;
[0035] Remaining content module: Used to obtain the remaining content of the firmware upgrade file through the host computer after successful parsing;
[0036] Update module: Used to update the target field based on the payload bytes of the startup command and the remaining content of the firmware upgrade file.
[0037] The present invention also provides a firmware upgrade system based on CMIS4.0, including a host computer and a target optical module, wherein the host computer and the target optical module are communicatively connected.
[0038] The host computer is used for:
[0039] Obtain the firmware upgrade file for the corresponding target optical module;
[0040] Extract the boot command payload bytes from the firmware upgrade file; the boot command payload bytes include a global information segment, a Boot segment, a Config segment, and an APP segment. The global information segment records the target fields to be upgraded; when the target fields include the Boot field, the Boot segment records the overall information of the Boot field; when the target fields include the Config field, the Config segment records the overall information of the Config field; when the target fields include the APP field, the APP segment records the overall information of the APP field.
[0041] The startup command payload bytes are sent to the target optical module;
[0042] Once the target optical module is successfully parsed, the remaining contents of the firmware upgrade file will be sent to the target optical module.
[0043] The target optical module is used for:
[0044] Obtain the boot command payload bytes extracted by the host computer from the firmware upgrade file;
[0045] Parse the startup command payload bytes;
[0046] After successful parsing, the remaining contents of the firmware upgrade file are obtained through the host computer.
[0047] The target field is updated based on the startup command payload bytes and the remaining content of the firmware upgrade file.
[0048] Optionally, the Boot segment includes the byte length of the BootLoader code, the checksum of the entire BootLoader code, the offset address of the BootLoader code in the upgrade file, and the offset address where the BootLoader code should be stored in the chip.
[0049] The Config segment includes the byte length of the Config data, the checksum of the entire Config data content, the offset address of the Config data in the upgrade file, and the offset address where the Config data should be stored in the chip.
[0050] The APP segment includes the byte length of the APP code, the checksum of the entire APP code, the offset address of the APP code in the upgrade file, and the offset address where the APP code should be stored in the chip.
[0051] This invention provides a firmware upgrade method based on CMIS 4.0, applied to a host computer, comprising: obtaining the firmware upgrade file of the corresponding target optical module; extracting the boot command payload bytes from the firmware upgrade file; the boot command payload bytes include a global information segment, a Boot segment, a Config segment, and an APP segment, wherein the global information segment records the target fields to be upgraded; when the target fields include a Boot field, the Boot segment records the overall information of the Boot field; when the target fields include a Config field, the Config segment records the overall information of the Config field; when the target fields include an APP field, the APP segment records the overall information of the APP field; sending the boot command payload bytes to the target optical module so that the target optical module can parse the boot command payload bytes; and after the target optical module successfully parses the boot command payload bytes, sending the remaining content of the firmware upgrade file to the target optical module so that the target optical module can update the target fields according to the boot command payload bytes.
[0052] By adding a global information segment, a Boot segment, a Config segment, and an APP segment to the boot command payload, where the global information segment includes the specific code areas that need to be updated, and the corresponding Boot, Config, and APP segments contain overall information about the fields to be updated, the optical module can selectively update the corresponding code areas based on the overall information about the fields to be updated in the boot command payload during an update. This avoids updating unnecessary code and improves firmware update efficiency.
[0053] The present invention also provides a firmware upgrade device based on CMIS4.0 and a firmware upgrade system based on CMIS4.0, which also have the above-mentioned beneficial effects, and will not be described in detail here. Attached Figure Description
[0054] To more clearly illustrate the technical solutions of 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 some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0055] Figure 1 A schematic diagram of firmware space allocation for optical modules;
[0056] Figure 2 A flowchart illustrating a firmware upgrade method based on CMIS4.0 provided in an embodiment of the present invention;
[0057] Figure 3 This is a structural diagram of a firmware upgrade file;
[0058] Figure 4 A flowchart illustrating a specific firmware upgrade method based on CMIS4.0 provided in an embodiment of the present invention;
[0059] Figure 5 A structural block diagram of a firmware upgrade device based on CMIS4.0 provided in an embodiment of the present invention;
[0060] Figure 6 A flowchart illustrating another firmware upgrade method based on CMIS4.0 provided in an embodiment of the present invention;
[0061] Figure 7 A structural block diagram of a firmware upgrade device based on CMIS4.0 provided in an embodiment of the present invention;
[0062] Figure 8 This is a structural block diagram of a firmware upgrade system based on CMIS4.0 provided in an embodiment of the present invention. Detailed Implementation
[0063] The core of this invention is to provide a firmware upgrade method based on CMIS 4.0. In existing technologies, upgrading the firmware of an optical module typically requires replacing all the code stored in the firmware's storage space. However, each upgrade process usually does not require updating all the code in the firmware's code space, and updating all the code would result in a long update time and low update efficiency.
[0064] The firmware upgrade method based on CMIS 4.0 provided by this invention is applied to a host computer and includes: obtaining the firmware upgrade file of the corresponding target optical module; extracting the boot command payload bytes from the firmware upgrade file; the boot command payload bytes include a global information segment, a Boot segment, a Config segment, and an APP segment, wherein the global information segment records the target fields to be upgraded; when the target fields include a Boot field, the Boot segment records the overall information of the Boot field; when the target fields include a Config field, the Config segment records the overall information of the Config field; when the target fields include an APP field, the APP segment records the overall information of the APP field; sending the boot command payload bytes to the target optical module so that the target optical module can parse the boot command payload bytes; after the target optical module successfully parses the boot command payload bytes, sending the remaining content of the firmware upgrade file to the target optical module so that the target optical module can update the target fields according to the boot command payload bytes.
[0065] By adding a global information segment, a Boot segment, a Config segment, and an APP segment to the boot command payload, where the global information segment includes the specific code areas that need to be updated, and the corresponding Boot, Config, and APP segments contain overall information about the fields to be updated, the optical module can selectively update the corresponding code areas based on the overall information about the fields to be updated in the boot command payload during an update. This avoids updating unnecessary code and improves firmware update efficiency.
[0066] To enable those skilled in the art to better understand the present invention, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely 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.
[0067] Please refer to Figure 2 as well as Figure 3 , Figure 2 A flowchart illustrating a firmware upgrade method based on CMIS4.0 provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of a firmware upgrade file.
[0068] The firmware upgrade method based on CMIS4.0 provided in this embodiment of the invention is specifically applied to a host computer, which needs to communicate with the target optical module, i.e. the optical module to be upgraded.
[0069] See Figure 2 Firmware upgrade methods based on CMIS 4.0 include:
[0070] S101: Obtain the firmware upgrade file for the corresponding target optical module.
[0071] In this embodiment of the invention, the host computer first obtains the firmware upgrade file of the corresponding target optical module, and then upgrades the firmware of the target optical module.
[0072] S102: Extract the boot command payload bytes from the firmware upgrade file.
[0073] In this embodiment of the invention, the startup command payload bytes include a global information segment, a Boot segment, a Config segment, and an APP segment. The global information segment records the target fields that need to be upgraded. When the target fields include the Boot field, the Boot segment records the overall information of the Boot field. When the target fields include the Config field, the Config segment records the overall information of the Config field. When the target fields include the APP field, the APP segment records the overall information of the APP field.
[0074] See Figure 3 Typically, the aforementioned boot command payload bytes are located at the beginning of the firmware upgrade file. Therefore, this step usually involves extracting the boot command payload bytes from the beginning of the firmware upgrade file. The global information segment included in the boot command payload bytes needs to record the target fields to be upgraded. These target fields can include any one, any two, or all of the Boot, Config, and APP fields, depending on the specific situation.
[0075] The firmware upgrade file typically needs to specify the Boot code segment to be updated, the Config data to be updated, and the App code segment to be updated. Of course, the above content must specifically correspond to the information recorded in the boot command payload. For example, if only the Boot code segment needs to be updated, then only the boot command payload and the Boot code segment to be updated will be set in the firmware upgrade file.
[0076] The aforementioned Boot field corresponds to the BootLoader code space in the optical module firmware program code space, the Config field corresponds to the Config data space, and the APP field corresponds to the application code space. The overall information of each of these fields is used to characterize the overall status of the corresponding code during the upgrade process, and its specific content will be described in detail in the following embodiments of the invention.
[0077] S103: Send the startup command payload byte to the target optical module so that the target optical module can parse the startup command payload byte.
[0078] In this step, the host computer sends the boot command payload bytes extracted in S102 to the target optical module. The target optical module parses the boot command payload bytes, and typically needs to determine in this step whether the firmware upgrade file corresponding to the boot command payload bytes is the file required for its own upgrade. The specific details of this step will be described in detail in the following embodiments of the invention, and will not be repeated here.
[0079] S104: After the target optical module is successfully parsed, the remaining contents of the firmware upgrade file are sent to the target optical module so that the target optical module updates the target field according to the load bytes of the startup command.
[0080] Once the target optical module successfully resolves the firmware, it will typically notify the host computer in the form of an instruction. At this point, the host computer will send the remaining contents of the firmware upgrade file to the target optical module based on the instruction, thereby sending the complete firmware upgrade file to the target optical module. This allows the target optical module to update the target field based on the firmware upgrade file, especially based on the startup command payload bytes.
[0081] This invention provides a firmware upgrade method based on CMIS 4.0, applied to a host computer, comprising: obtaining the firmware upgrade file of the corresponding target optical module; extracting the boot command payload bytes from the firmware upgrade file; the boot command payload bytes include a global information segment, a Boot segment, a Config segment, and an APP segment, wherein the global information segment records the target fields to be upgraded; when the target fields include a Boot field, the Boot segment records the overall information of the Boot field; when the target fields include a Config field, the Config segment records the overall information of the Config field; when the target fields include an APP field, the APP segment records the overall information of the APP field; sending the boot command payload bytes to the target optical module so that the target optical module can parse the boot command payload bytes; and after the target optical module successfully parses the boot command payload bytes, sending the remaining content of the firmware upgrade file to the target optical module so that the target optical module can update the target fields according to the boot command payload bytes.
[0082] By adding a global information segment, a Boot segment, a Config segment, and an APP segment to the boot command payload, where the global information segment includes the specific code areas that need to be updated, and the corresponding Boot, Config, and APP segments contain overall information about the fields to be updated, the optical module can selectively update the corresponding code areas based on the overall information about the fields to be updated in the boot command payload during an update. This avoids updating unnecessary code and improves firmware update efficiency.
[0083] The specific details of the firmware upgrade method based on CMIS4.0 provided by this invention will be described in detail in the following embodiments.
[0084] Please refer to Figure 4 , Figure 4 This is a flowchart illustrating a specific firmware upgrade method based on CMIS4.0 provided in an embodiment of the present invention.
[0085] The firmware upgrade method based on CMIS4.0 provided in this embodiment of the invention is specifically applied to a host computer. See also... Figure 4 In this embodiment of the invention, the firmware upgrade method based on CMIS4.0 includes:
[0086] S201: Obtain the firmware upgrade file for the corresponding target optical module.
[0087] S202: Extract the boot command payload bytes from the firmware upgrade file.
[0088] In this embodiment of the invention, the Boot segment includes the byte length of the BootLoader code, the checksum of all contents of the BootLoader code, the offset address of the BootLoader code in the upgrade file, and the offset address where the BootLoader code should be stored in the chip.
[0089] In the following steps, when it is necessary to update the BootLoader code in the target optical module firmware, the BootLoader code space can be pointed to based on the specific content included in the Boot section, and the corresponding code can be extracted from the firmware upgrade file for updating. Typically, the Boot section also needs to include Boot section reserved information for future expansion.
[0090] In this embodiment of the invention, the Config segment includes the byte length of the Config data, the checksum of the entire Config data content, the offset address of the Config data in the upgrade file, and the offset address where the Config data should be stored in the chip.
[0091] In the following steps, when it is necessary to update the Config data in the target optical module firmware, the specific content included in the Config section points to the Config data space, and the corresponding code is extracted from the firmware upgrade file for updating. Typically, the Config section also needs to include reserved Config section information for future expansion.
[0092] In this embodiment of the invention, the APP segment includes the byte length of the APP code, the checksum of all the contents of the APP code, the offset address of the APP code in the upgrade file, and the offset address where the APP code should be stored in the chip.
[0093] In the following steps, when it is necessary to update the application code in the target optical module firmware, the specific content included in the APP segment points to the application code space, and the corresponding code is extracted from the firmware upgrade file for updating. Typically, the APP segment also needs to include reserved APP segment information for future expansion.
[0094] Specifically, the aforementioned global information segment may include upgrade instruction information, which can be used to record the target fields that need to be upgraded. The specific content of this upgrade instruction information can be found in Table 1 below:
[0095] Table 1. Upgrade Instruction Information Table
[0096]
[0097]
[0098] Of course, the specific content of the above upgrade instructions can be set according to the actual situation, and no specific limitations are made here.
[0099] Furthermore, in this embodiment of the invention, the aforementioned global information segment also includes firmware project number and upgrade password information. The firmware project number is used to distinguish the project represented by the firmware to be upgraded; this number is unique and used to update the correct firmware. The upgrade password indicates that a fixed password must be entered for each upgrade, further ensuring that the firmware being updated is the correct and updatable firmware. The specific content of the firmware project number and upgrade password information can be set according to actual conditions and is not specifically limited here. Typically, the global information segment also needs to include globally reserved information for subsequent expansion. Furthermore, the boot command payload byte can also contain reserved segment information for subsequent expansion of the boot command payload byte.
[0100] The specific contents of S201 to S202 are described in detail in S101 to S102 above, and will not be repeated here.
[0101] S203: Send the startup command payload bytes to the target optical module so that the target optical module can determine whether the firmware upgrade file corresponds to the target optical module based on the firmware project number and upgrade password information.
[0102] In this step, the target optical module verifies the firmware upgrade file based on the firmware project number and upgrade password information in the boot command payload byte to determine if the firmware upgrade file corresponds to itself. When the verification is successful, it typically sends a corresponding instruction to the host computer to execute the following steps.
[0103] S204: When the firmware upgrade file corresponds to the target optical module, the remaining contents of the firmware upgrade file are sent to the target optical module so that the target optical module updates the target field according to the load byte of the startup command.
[0104] In this step, after successful verification in S203, the host computer sends the remaining content of the firmware upgrade file to the target optical module. The host computer typically sends this remaining content in multiple installments, with each installment usually not exceeding 2048 bytes. Upon receiving the remaining content of the firmware upgrade file, the target optical module updates the target fields corresponding to the upgrade instruction information based on the upgrade instruction information and the overall information recorded in its corresponding Boot and / or Config and / or APP sections.
[0105] Specifically, in this embodiment of the invention, the length of the startup command payload byte is typically no greater than 112 bytes. The bytes occupied by each part of the startup command payload byte are typically divided as shown in Table 2 below in this embodiment of the invention:
[0106] Table 2. Startup command payload byte arrangement table
[0107]
[0108] Of course, the specific lengths allocated to each part of the startup command payload bytes can be set according to the actual situation, and no specific limit is made here.
[0109] This invention provides a firmware upgrade method based on CMIS 4.0. By adding a global information segment, a Boot segment, a Config segment, and an APP segment to the boot command payload, the global information segment includes the specific code areas to be updated. The corresponding Boot, Config, and APP segments record overall information about the fields to be updated. This allows the optical module to selectively update the corresponding code areas based on the overall information of the update fields in the boot command payload, avoiding unnecessary code updates and improving firmware update efficiency.
[0110] The following describes a firmware upgrade device based on CMIS4.0 provided by an embodiment of the present invention. The firmware upgrade device based on CMIS4.0 described below and the firmware upgrade method based on CMIS4.0 described above can be referred to in correspondence.
[0111] The firmware upgrade device based on CMIS4.0 provided in this embodiment of the invention is specifically installed on a host computer, and the host computer needs to communicate with the target optical module.
[0112] Please refer to Figure 5 , Figure 5 This is a structural block diagram of a firmware upgrade device based on CMIS4.0 provided in an embodiment of the present invention.
[0113] See Figure 5 In this embodiment of the invention, the firmware upgrade device based on CMIS4.0 may include:
[0114] Acquisition Module 100: Used to acquire the firmware upgrade file for the corresponding target optical module.
[0115] Extraction module 200: used to extract the boot command payload bytes in the firmware upgrade file; the boot command payload bytes include a global information segment, a Boot segment, a Config segment, and an APP segment, the global information segment records the target fields to be upgraded; when the target fields include the Boot field, the Boot segment records the overall information of the Boot field; when the target fields include the Config field, the Config segment records the overall information of the Config field; when the target fields include the APP field, the APP segment records the overall information of the APP field.
[0116] Byte sending module 300: Used to send the start command payload byte to the target optical module so that the target optical module can parse the start command payload byte.
[0117] Content sending module 400: When the target optical module successfully parses the file, it sends the remaining content of the firmware upgrade file to the target optical module so that the target optical module updates the target field according to the start command payload byte.
[0118] Preferably, in this embodiment of the invention, the Boot segment includes the byte length of the BootLoader code, the checksum of all contents of the BootLoader code, the offset address of the BootLoader code in the upgrade file, and the offset address where the BootLoader code should be stored in the chip.
[0119] The Config segment includes the byte length of the Config data, the checksum of the entire Config data content, the offset address of the Config data in the upgrade file, and the offset address where the Config data should be stored in the chip.
[0120] The APP segment includes the byte length of the APP code, the checksum of the entire APP code, the offset address of the APP code in the upgrade file, and the offset address where the APP code should be stored in the chip.
[0121] Preferably, in this embodiment of the invention, the global information segment further includes firmware project number and upgrade password information;
[0122] The byte sending module 300 is specifically used for:
[0123] The startup command payload bytes are sent to the target optical module so that the target optical module can determine whether the firmware upgrade file corresponds to the target optical module based on the firmware project number and upgrade password information.
[0124] The content sending module 400 is specifically used for:
[0125] When the firmware upgrade file corresponds to the target optical module, the remaining content of the firmware upgrade file is sent to the target optical module so that the target optical module updates the target field according to the start command payload byte.
[0126] Preferably, in this embodiment of the invention, the length of the startup command payload byte is no greater than 112 bytes.
[0127] The firmware upgrade device based on CMIS4.0 in this embodiment is used to implement the aforementioned firmware upgrade method based on CMIS4.0. Therefore, the specific implementation of the firmware upgrade device based on CMIS4.0 can be found in the embodiment section of the firmware upgrade method based on CMIS4.0 above. For example, the acquisition module 100, extraction module 200, byte sending module 300, and content sending module 400 are used to implement steps S101 to S104 in the firmware upgrade method based on CMIS4.0. Therefore, the specific implementation can be referred to the description of the corresponding embodiments, and will not be repeated here.
[0128] Please refer to Figure 6 , Figure 6 A flowchart illustrating another firmware upgrade method based on CMIS4.0 provided in an embodiment of the present invention.
[0129] The firmware upgrade method based on CMIS4.0 provided in this embodiment of the invention specifically applies to a target optical module, which needs to communicate with a host computer.
[0130] See Figure 6 Firmware upgrade methods based on CMIS 4.0 include:
[0131] S301: Obtain the boot command payload bytes extracted by the host computer from the firmware upgrade file.
[0132] In this embodiment of the invention, the startup command payload bytes include a global information segment, a Boot segment, a Config segment, and an APP segment. The global information segment records the target fields that need to be upgraded. When the target fields include the Boot field, the Boot segment records the overall information of the Boot field. When the target fields include the Config field, the Config segment records the overall information of the Config field. When the target fields include the APP field, the APP segment records the overall information of the APP field.
[0133] Specifically, in this embodiment of the invention, the Boot segment includes the byte length occupied by the BootLoader code, the checksum of all contents of the BootLoader code, the offset address of the BootLoader code in the upgrade file, and the offset address where the BootLoader code should be stored in the chip.
[0134] The Config segment includes the byte length of the Config data, the checksum of the entire Config data content, the offset address of the Config data in the upgrade file, and the offset address where the Config data should be stored in the chip.
[0135] The APP segment includes the byte length of the APP code, the checksum of the entire APP code, the offset address of the APP code in the upgrade file, and the offset address where the APP code should be stored in the chip.
[0136] Specifically, in this embodiment of the invention, the global information segment further includes the firmware project number and upgrade password information. The specific content of the boot command payload bytes has been described in detail in the above embodiments of the invention and will not be repeated here.
[0137] In this step, the target optical module will obtain the startup command payload bytes in order to execute subsequent steps.
[0138] S302: Parse the startup command payload bytes.
[0139] In this step, the target optical module parses the aforementioned boot command payload bytes. Typically, this step involves determining whether the firmware upgrade file corresponding to the boot command payload bytes is the file required for its own upgrade. Specifically, in this step, the target optical module can determine whether the firmware upgrade file corresponds to the target optical module based on the firmware project number and upgrade password information. Only after the firmware upgrade file and the target optical module correspond will the following steps be executed.
[0140] S303: After successful parsing, obtain the remaining contents of the firmware upgrade file through the host computer.
[0141] In this step, once the target optical module successfully resolves the firmware, it will typically notify the host computer in the form of an instruction. At this point, the host computer will send the remaining contents of the firmware upgrade file to the target optical module based on the instruction, thereby sending the complete firmware upgrade file to the target optical module.
[0142] Specifically, when the global information segment also includes firmware project number and upgrade password information, this step is usually as follows: when the firmware upgrade file corresponds to the target optical module, the remaining contents of the firmware upgrade file are obtained through the host computer.
[0143] S304: Update the target field based on the boot command payload bytes and the remaining contents of the firmware upgrade file.
[0144] In this step, the target optical module can update the target fields based on the firmware upgrade file, especially the boot command payload bytes. Specifically, in this step, the target optical module will update the target fields corresponding to the upgrade instruction information in a targeted manner, based on the upgrade instruction information and the overall information recorded in its corresponding Boot and / or Config and / or APP sections.
[0145] This invention provides a firmware upgrade method based on CMIS 4.0. By adding a global information segment, a Boot segment, a Config segment, and an APP segment to the boot command payload, the global information segment includes the specific code areas to be updated. The corresponding Boot, Config, and APP segments record overall information about the fields to be updated. This allows the optical module to selectively update the corresponding code areas based on the overall information of the update fields in the boot command payload, avoiding unnecessary code updates and improving firmware update efficiency.
[0146] The following describes a firmware upgrade device based on CMIS4.0 provided by an embodiment of the present invention. The firmware upgrade device based on CMIS4.0 described below and the firmware upgrade method based on CMIS4.0 described above can be referred to in correspondence.
[0147] The firmware upgrade device based on CMIS4.0 provided in this embodiment of the invention is specifically installed on the target optical module, and the target optical module needs to communicate with the host computer.
[0148] Please refer to Figure 7 , Figure 7 This is a structural block diagram of a firmware upgrade device based on CMIS4.0 provided in an embodiment of the present invention.
[0149] See Figure 7 In this embodiment of the invention, the firmware upgrade device based on CMIS4.0 may include:
[0150] Byte Acquisition Module 500: Used to acquire the boot command payload bytes extracted by the host computer from the firmware upgrade file; the boot command payload bytes include a global information segment, a Boot segment, a Config segment, and an APP segment, wherein the global information segment records the target fields to be upgraded; when the target fields include the Boot field, the Boot segment records the overall information of the Boot field; when the target fields include the Config field, the Config segment records the overall information of the Config field; when the target fields include the APP field, the APP segment records the overall information of the APP field.
[0151] Byte parsing module 600: Used to parse the payload bytes of the startup command.
[0152] Remaining content module 700: Used to obtain the remaining content of the firmware upgrade file through the host computer after successful parsing.
[0153] Update module 800: Used to update the target field based on the startup command payload bytes and the remaining content of the firmware upgrade file.
[0154] Preferably, in this embodiment of the invention, the Boot segment includes the byte length of the BootLoader code, the checksum of all contents of the BootLoader code, the offset address of the BootLoader code in the upgrade file, and the offset address where the BootLoader code should be stored in the chip.
[0155] The Config segment includes the byte length of the Config data, the checksum of the entire Config data content, the offset address of the Config data in the upgrade file, and the offset address where the Config data should be stored in the chip.
[0156] The APP segment includes the byte length of the APP code, the checksum of the entire APP code, the offset address of the APP code in the upgrade file, and the offset address where the APP code should be stored in the chip.
[0157] Preferably, in this embodiment of the invention, the global information segment further includes firmware project number and upgrade password information;
[0158] The byte parsing module 600 is specifically used for:
[0159] The firmware upgrade file and the target optical module are determined based on the firmware project number and upgrade password information.
[0160] The remaining content module 700 is specifically used for:
[0161] Once the firmware upgrade file corresponds to the target optical module, the remaining content of the firmware upgrade file is obtained through the host computer.
[0162] Preferably, in this embodiment of the invention, the length of the startup command payload byte is no greater than 112 bytes.
[0163] The firmware upgrade device based on CMIS4.0 in this embodiment is used to implement the aforementioned firmware upgrade method based on CMIS4.0. Therefore, the specific implementation of the firmware upgrade device based on CMIS4.0 can be found in the embodiment section of the firmware upgrade method based on CMIS4.0 above. For example, the byte acquisition module 500, the byte parsing module 600, the remaining content module 700, and the update module 800 are respectively used to implement steps S301 to S304 in the firmware upgrade method based on CMIS4.0. Therefore, the specific implementation can be referred to the description of the corresponding embodiments, and will not be repeated here.
[0164] The following describes a firmware upgrade system based on CMIS4.0 provided by an embodiment of the present invention. The firmware upgrade system based on CMIS4.0 described below can be referred to in correspondence with the firmware upgrade method and firmware upgrade device based on CMIS4.0 described above.
[0165] Please refer to Figure 8 , Figure 8 This is a structural block diagram of a firmware upgrade system based on CMIS4.0 provided in an embodiment of the present invention.
[0166] See Figure 8 In this embodiment of the invention, the firmware upgrade system based on CMIS4.0 includes a host computer 11 and a target optical module 12, and the host computer 11 and the target optical module 12 are communicatively connected.
[0167] The host computer 11 is used for:
[0168] Obtain the firmware upgrade file for the corresponding target optical module 12;
[0169] Extract the boot command payload bytes from the firmware upgrade file; the boot command payload bytes include a global information segment, a Boot segment, a Config segment, and an APP segment. The global information segment records the target fields to be upgraded; when the target fields include the Boot field, the Boot segment records the overall information of the Boot field; when the target fields include the Config field, the Config segment records the overall information of the Config field; when the target fields include the APP field, the APP segment records the overall information of the APP field.
[0170] The startup command payload bytes are sent to the target optical module 12;
[0171] Once the target optical module 12 successfully resolves the firmware upgrade file, the remaining contents of the firmware upgrade file will be sent to the target optical module 12.
[0172] The target optical module 12 is used for:
[0173] Obtain the boot command payload bytes extracted from the firmware upgrade file by the host computer 11;
[0174] Parse the startup command payload bytes;
[0175] After successful parsing, the remaining contents of the firmware upgrade file are obtained through the host computer 11;
[0176] The target field is updated based on the startup command payload bytes and the remaining content of the firmware upgrade file.
[0177] Preferably, in this embodiment of the invention, the Boot segment includes the byte length of the BootLoader code, the checksum of all contents of the BootLoader code, the offset address of the BootLoader code in the upgrade file, and the offset address where the BootLoader code should be stored in the chip.
[0178] The Config segment includes the byte length of the Config data, the checksum of the entire Config data content, the offset address of the Config data in the upgrade file, and the offset address where the Config data should be stored in the chip.
[0179] The APP segment includes the byte length of the APP code, the checksum of the entire APP code, the offset address of the APP code in the upgrade file, and the offset address where the APP code should be stored in the chip.
[0180] Preferably, in this embodiment of the invention, the global information segment further includes firmware project number and upgrade password information;
[0181] The target optical module is specifically used for:
[0182] Based on the firmware project number and upgrade password information, determine whether the firmware upgrade file corresponds to the target optical module.
[0183] Once the firmware upgrade file corresponds to the target optical module, the remaining content of the firmware upgrade file is obtained through the host computer.
[0184] Preferably, in this embodiment of the invention, the length of the startup command payload byte is no greater than 112 bytes.
[0185] The firmware upgrade system based on CMIS4.0 in this embodiment is used to implement the aforementioned firmware upgrade method based on CMIS4.0. Therefore, the specific implementation of the firmware upgrade system based on CMIS4.0 can be found in the embodiment section of the firmware upgrade method based on CMIS4.0 above. The specific steps performed by the host computer 11 and the target optical module 12 have been described in the above invention embodiments and will not be repeated here.
[0186] 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.
[0187] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0188] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0189] 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.
[0190] The foregoing has provided a detailed description of a firmware upgrade method, a firmware upgrade device, and a firmware upgrade system based on CMIS 4.0 provided by this invention. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of this invention. It should be noted that those skilled in the art can make various improvements and modifications to this invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this invention.
Claims
1. A firmware upgrade method based on CMIS 4.0, characterized in that, Applications in host computers include: Obtain the firmware upgrade file for the corresponding target optical module; Extract the boot command payload bytes from the firmware upgrade file; the boot command payload bytes include a global information segment, a Boot segment, a Config segment, and an APP segment. The global information segment records the target fields to be upgraded; when the target fields include the Boot field, the Boot segment records the overall information of the Boot field; when the target fields include the Config field, the Config segment records the overall information of the Config field; when the target fields include the APP field, the APP segment records the overall information of the APP field. The startup command payload byte is sent to the target optical module so that the target optical module can parse the startup command payload byte. After the target optical module successfully parses the file, the remaining contents of the firmware upgrade file are sent to the target optical module so that the target optical module updates the target field according to the load bytes of the startup command. The Boot segment includes the byte length of the BootLoader code, the checksum of all the contents of the BootLoader code, the offset address of the BootLoader code in the upgrade file, and the offset address where the BootLoader code should be stored in the chip. The Config segment includes the byte length of the Config data, the checksum of the entire Config data content, the offset address of the Config data in the upgrade file, and the offset address where the Config data should be stored in the chip. The APP segment includes the byte length of the APP code, the checksum of the entire APP code, the offset address of the APP code in the upgrade file, and the offset address where the APP code should be stored in the chip.
2. The method according to claim 1, characterized in that, The global information segment also includes firmware project number and upgrade password information; The step of sending the startup command payload byte to the target optical module so that the target optical module can parse the startup command payload byte includes: The startup command payload bytes are sent to the target optical module, so that the target optical module can determine whether the firmware upgrade file corresponds to the target optical module based on the firmware project number and the upgrade password information; The step of sending the remaining content of the firmware upgrade file to the target optical module after the target optical module successfully parses the file, so that the target optical module updates the target field according to the boot command payload bytes, includes: When the firmware upgrade file corresponds to the target optical module, the remaining content of the firmware upgrade file is sent to the target optical module so that the target optical module updates the target field according to the start command payload byte.
3. The method according to claim 1, characterized in that, The length of the startup command payload byte is no greater than 112 bytes.
4. A firmware upgrade device based on CMIS 4.0, characterized in that, Applications in host computers include: Acquisition module: Used to acquire the firmware upgrade file for the corresponding target optical module; Extraction module: used to extract the boot command payload bytes from the firmware upgrade file; the boot command payload bytes include a global information segment, a Boot segment, a Config segment, and an APP segment. The global information segment records the target fields to be upgraded; when the target fields include the Boot field, the Boot segment records the overall information of the Boot field; when the target fields include the Config field, the Config segment records the overall information of the Config field; when the target fields include the APP field, the APP segment records the overall information of the APP field. Byte sending module: used to send the startup command payload byte to the target optical module, so that the target optical module can parse the startup command payload byte; Content sending module: used to send the remaining content of the firmware upgrade file to the target optical module after the target optical module successfully parses the file, so that the target optical module updates the target field according to the start command payload bytes; The Boot segment includes the byte length of the BootLoader code, the checksum of all the contents of the BootLoader code, the offset address of the BootLoader code in the upgrade file, and the offset address where the BootLoader code should be stored in the chip. The Config segment includes the byte length of the Config data, the checksum of the entire Config data content, the offset address of the Config data in the upgrade file, and the offset address where the Config data should be stored in the chip. The APP segment includes the byte length of the APP code, the checksum of the entire APP code, the offset address of the APP code in the upgrade file, and the offset address where the APP code should be stored in the chip.
5. A firmware upgrade method based on CMIS 4.0, characterized in that, Applied to target optical modules, including: The system retrieves the boot command payload bytes extracted from the firmware upgrade file by the host computer. The boot command payload bytes include a global information segment, a Boot segment, a Config segment, and an APP segment. The global information segment records the target fields to be upgraded. When the target fields include a Boot field, the Boot segment records the overall information of the Boot field. When the target fields include a Config field, the Config segment records the overall information of the Config field. When the target fields include an APP field, the APP segment records the overall information of the APP field. Parse the startup command payload bytes; After successful parsing, the remaining contents of the firmware upgrade file are obtained through the host computer. Update the target field based on the startup command payload bytes and the remaining content of the firmware upgrade file; The Boot segment includes the byte length of the BootLoader code, the checksum of all the contents of the BootLoader code, the offset address of the BootLoader code in the upgrade file, and the offset address where the BootLoader code should be stored in the chip. The Config segment includes the byte length of the Config data, the checksum of the entire Config data content, the offset address of the Config data in the upgrade file, and the offset address where the Config data should be stored in the chip. The APP segment includes the byte length of the APP code, the checksum of the entire APP code, the offset address of the APP code in the upgrade file, and the offset address where the APP code should be stored in the chip.
6. A firmware upgrade device based on CMIS 4.0, characterized in that, Applied to target optical modules, including: Byte Acquisition Module: Used to acquire the boot command payload bytes extracted by the host computer from the firmware upgrade file; the boot command payload bytes include a global information segment, a Boot segment, a Config segment, and an APP segment. The global information segment records the target fields to be upgraded; when the target fields include the Boot field, the Boot segment records the overall information of the Boot field; when the target fields include the Config field, the Config segment records the overall information of the Config field; when the target fields include the APP field, the APP segment records the overall information of the APP field. Byte parsing module: used to parse the payload bytes of the startup command; Remaining content module: Used to obtain the remaining content of the firmware upgrade file through the host computer after successful parsing; Update module: used to update the target field based on the payload bytes of the startup command and the remaining content of the firmware upgrade file; The Boot segment includes the byte length of the BootLoader code, the checksum of all the contents of the BootLoader code, the offset address of the BootLoader code in the upgrade file, and the offset address where the BootLoader code should be stored in the chip. The Config segment includes the byte length of the Config data, the checksum of the entire Config data content, the offset address of the Config data in the upgrade file, and the offset address where the Config data should be stored in the chip. The APP segment includes the byte length of the APP code, the checksum of the entire APP code, the offset address of the APP code in the upgrade file, and the offset address where the APP code should be stored in the chip.
7. A firmware upgrade system based on CMIS 4.0, characterized in that, It includes a host computer and a target optical module, and the host computer and the target optical module are connected in communication. The host computer is used for: Obtain the firmware upgrade file for the corresponding target optical module; Extract the boot command payload bytes from the firmware upgrade file; the boot command payload bytes include a global information segment, a Boot segment, a Config segment, and an APP segment. The global information segment records the target fields to be upgraded; when the target fields include the Boot field, the Boot segment records the overall information of the Boot field; when the target fields include the Config field, the Config segment records the overall information of the Config field; when the target fields include the APP field, the APP segment records the overall information of the APP field. The startup command payload bytes are sent to the target optical module; Once the target optical module is successfully parsed, the remaining contents of the firmware upgrade file will be sent to the target optical module. The target optical module is used for: Obtain the boot command payload bytes extracted by the host computer from the firmware upgrade file; Parse the startup command payload bytes; After successful parsing, the remaining contents of the firmware upgrade file are obtained through the host computer. Update the target field based on the startup command payload bytes and the remaining content of the firmware upgrade file; The Boot segment includes the byte length of the BootLoader code, the checksum of all the contents of the BootLoader code, the offset address of the BootLoader code in the upgrade file, and the offset address where the BootLoader code should be stored in the chip. The Config segment includes the byte length of the Config data, the checksum of the entire Config data content, the offset address of the Config data in the upgrade file, and the offset address where the Config data should be stored in the chip. The APP segment includes the byte length of the APP code, the checksum of the entire APP code, the offset address of the APP code in the upgrade file, and the offset address where the APP code should be stored in the chip.
8. The system according to claim 7, characterized in that, The Boot segment includes the byte length of the BootLoader code, the checksum of the entire BootLoader code, the offset address of the BootLoader code in the upgrade file, and the offset address where the BootLoader code should be stored in the chip. The Config segment includes the byte length of the Config data, the checksum of the entire Config data content, the offset address of the Config data in the upgrade file, and the offset address where the Config data should be stored in the chip. The APP segment includes the byte length of the APP code, the checksum of the entire APP code, the offset address of the APP code in the upgrade file, and the offset address where the APP code should be stored in the chip.
Citation Information
Patent Citations
Optical module upgrading method and optical module
CN114466260A
Methods for Optics Module Firmware In-Field Upgrade
US20220291915A1