Nothing Special   »   [go: up one dir, main page]

CN107665123B - Firmware updating method - Google Patents

Firmware updating method Download PDF

Info

Publication number
CN107665123B
CN107665123B CN201610595102.1A CN201610595102A CN107665123B CN 107665123 B CN107665123 B CN 107665123B CN 201610595102 A CN201610595102 A CN 201610595102A CN 107665123 B CN107665123 B CN 107665123B
Authority
CN
China
Prior art keywords
packet
data
value
firmware
determined
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610595102.1A
Other languages
Chinese (zh)
Other versions
CN107665123A (en
Inventor
林义岚
李任智
陈光兆
林宏达
张立田
许恒嘉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shencloud Technology Co Ltd
Shunda Computer Factory Co Ltd
Original Assignee
Shencloud Technology Co Ltd
Shunda Computer Factory Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shencloud Technology Co Ltd, Shunda Computer Factory Co Ltd filed Critical Shencloud Technology Co Ltd
Priority to CN201610595102.1A priority Critical patent/CN107665123B/en
Publication of CN107665123A publication Critical patent/CN107665123A/en
Application granted granted Critical
Publication of CN107665123B publication Critical patent/CN107665123B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Landscapes

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

Abstract

A method of firmware update implemented by a processing unit comprising the steps of: (A) determining whether a packet of an update firmware file received from a host is a first packet; (B) when the packet is determined to be the first packet and a flag value of a status flag associated with a firmware is not a predetermined value indicating that the firmware is in an update state, updating the flag value to the predetermined value, storing the packet, and updating total offset data according to length value data and offset data of the packet; (C) when the packet is determined not to be the first packet and the offset data matches the total offset data, storing the packet and updating the total offset data according to the length data and the offset data; and (D) repeating steps (A) through (C) until the packet is determined to be a last packet of the updated firmware file.

Description

Firmware updating method
Technical Field
The present invention relates to a firmware update method, and more particularly, to a firmware update method for an input/output module.
Background
In a server, an Input/Output Module (IOM) is usually connected to a Host via a Host Bus interface card (HBA) to form a channel for message flow, wherein one IOM can be connected to one Host or a plurality of hosts. For an i/o module, it usually happens that multiple hosts update a firmware (firmware) of the i/o module at the same time. For example, during the same period, one host a continuously transmits a plurality of packets of a first updated firmware file to the i/o module, but the other host B also continuously transmits a plurality of packets of a second updated firmware file to the i/o module. When the i/o module receives any packet from the host a or the host B, the i/o module stores the received packet in, for example, a storage unit. Therefore, the storage unit is easily damaged because the i/o module stores all packets from the host a and the host B in the storage unit too frequently during this period.
In addition, if the storage unit can only provide limited storage space, the i/o module may not ensure that the first firmware update file and the second firmware update file can be completely stored in the storage unit.
Therefore, there is still much room for improvement in the firmware update method of the conventional i/o module.
Disclosure of Invention
Therefore, an object of the present invention is to provide a firmware update method capable of avoiding multiple host terminals from updating an i/o module at the same time.
Therefore, the firmware updating method of the present invention is applicable to an input/output module connected to a plurality of different host terminals, the input/output module includes a storage unit and a processing unit electrically connected to the storage unit, the storage unit stores a firmware and update status data related to the firmware, the update status data includes total offset data and a status flag, a flag value of the status flag is one of a first predetermined value indicating that the firmware is in an update status and a second predetermined value different from the first predetermined value and indicating that the firmware is not in the update status, the firmware updating method is implemented by the processing unit and includes the following steps:
(A) after receiving a packet of an update firmware file from one of the host terminals, wherein the packet at least comprises length value data corresponding to the packet and offset value data corresponding to the packet, determining whether the packet is a first packet of the update firmware file according to the offset value data and a predetermined initial offset value, wherein the first packet of the update firmware file also comprises total packet length value data corresponding to the update firmware file;
(B) when the packet is determined to be the first packet of the updated firmware file in step (A), determining whether the flag value of the status flag is the first predetermined value;
(C) when the flag value of the status flag is determined to be the second predetermined value in step (B), updating the flag value to the first predetermined value, storing the packet in the storage unit, and updating the total offset data according to the length data and the offset data of the packet;
(D) when the packet is determined not to be the first packet of the updated firmware file in step (A), determining whether the offset data of the packet matches the total offset data according to the offset data of the packet and the total offset data of the updated status data;
(E) when the step (D) determines that the offset data of the packet matches the total offset data, storing the packet in the storage unit, and updating the total offset data according to the length data and the offset data of the packet;
(F) determining whether the packet is a last packet of the updated firmware file according to the total offset value data, the total packet length value data of the packet stored in step (C) and the predetermined initial offset value; and
(G) when it is determined in step (F) that the packet is not the last packet of the updated firmware file, repeating steps (A) through (F) until it is determined that the packet is the last packet of the updated firmware file.
In some embodiments, the update status data further includes time data of a reception time point of a previous packet, and before the step (a), the method further includes the steps of:
(H) when receiving the packet from the host, determining whether a time difference between a receiving time point of the packet and a receiving time point of the previous packet is longer than a predetermined time period;
(I) updating the time data according to the reception time point of the packet when it is determined in the step (H) that the time difference is not longer than the predetermined time period; and
(J) when it is determined in step (H) that the time difference is longer than the predetermined time period, the flag value of the status flag is updated to the second predetermined value, and the time data is updated according to the reception time point of the packet.
In some embodiments, after step (G), further comprising the steps of:
(K) when it is determined in step (G) that the packet is the last packet of the updated firmware file, determining whether all packets already stored in the storage unit are the updated firmware file;
(L) when it is determined in the step (K) that all the packets stored in the storage unit are the update firmware file, setting the update firmware file as the firmware and updating the flag value of the status flag to the second predetermined value; and
(M) when it is determined in step (K) that all packets stored in the storage unit are not the firmware update file, sending a failure message indicating that the firmware update failed to the host.
In some embodiments, the first packet further includes reference check value data corresponding to the updated firmware file, and step (K) includes the following sub-steps:
(K-1) when it is determined in the step (G) that the packet is the last packet of the updated firmware file, obtaining check value data by using a cyclic redundancy check technique based on all packets already stored in the storage unit, and
(K-2) determining whether the check value data corresponds to the reference check value data based on the check value and the reference check value data obtained in the substep (K-1), and when it is determined that the check value corresponds to the reference check value data, determining that all packets already stored in the storage unit are the updated firmware file.
In some embodiments, in step (C) and step (E), the updated total offset data indicates a value that is the sum of the value indicated by the length data of the packet and the value indicated by the offset data.
In some embodiments, step (B) is followed by the step of:
(N) when the flag value of the status flag is determined to be the first predetermined value in step (B), transmitting an occupation message indicating that the firmware is in the update status to the host.
In some embodiments, step (D) is followed by the step of:
(O) when it is determined in step (D) that the offset value of the packet does not match the total offset value data, transmitting a target packet request to the host, the target packet request including the total offset value data,
when the host receives the target packet request from the i/o module, the host transmits a target packet to the i/o module in response to the target packet request, and the offset data of the target packet matches the total offset data.
In some embodiments, (P) when it is determined in step (F) that the packet is not the last packet of the updated firmware file, sending a target packet request to the host, the target packet request including the total offset data,
when the host receives the target packet request from the i/o module, the host transmits a target packet to the i/o module in response to the target packet request, and the offset data of the target packet matches the total offset data.
In some embodiments, in step (A), when the processing unit determines that the value indicated by the offset data is the predetermined initial offset value, the packet is determined as the first packet of the updated firmware file.
In some embodiments, in step (F), when the processing unit determines that the sum of the value indicated by the total packet length data and the predetermined initial offset value is equal to the value indicated by the total offset value data, the packet is determined as the last packet of the updated firmware file.
Compared with the prior art, the firmware updating method can prevent a plurality of host terminals from updating an input/output module at the same time.
[ description of the drawings ]
FIG. 1 is a block diagram illustrating a system for implementing an embodiment of the firmware update method of the present invention;
FIG. 2 is a flowchart of the embodiment; and
fig. 3 is a flowchart illustrating a determination process of step S212 of fig. 2.
[ detailed description ] embodiments
Referring to fig. 1, a system 100 is shown, the system 100 is used for implementing an embodiment of the firmware updating method of the present invention, and illustratively comprises an input/output module 1 and a plurality of host terminals 5. The input/output module 1 illustratively comprises a storage unit 2, a connection unit 3, and a processing unit 4 electrically connecting the storage unit 2 and the connection unit 3. In the embodiment, the processing unit 4 is, for example, an expander (expander), but not limited thereto.
The storage unit 2 includes, for example, a first storage area 21 and a second storage area 22, but not limited thereto. The first storage area 21 stores a firmware 211 and update status data 212 associated with the firmware 211. The update status data 212 includes total offset value (offset) data, time data of a reception time point of a previous packet, and a status flag. The value indicated by the total offset data is initially set to a predetermined initial offset value. A flag value of the status flag may be a first predetermined value, such as 1, indicating that the firmware 211 is in an update state, or a second predetermined value, such as 0, different from the first predetermined value and indicating that the firmware 211 is not in the update state. The connection unit 3, such as a Host Bus Adapter (HBA), connects the Host terminals 5, and includes, for example, a Serial Attached SCSI (SAS) interface 31, an Ethernet interface 32, and an Integrated Circuit Bus (I2C) interface 33. In the present embodiment, the serial SCSI interface 31 is used to connect the host terminals 5, but not limited thereto. However, in other embodiments, the ethernet interface 32 or the integrated circuit bus interface 33 may be used to connect to the host terminals 5.
If a user of any host 5 wants to update the firmware 211 of the i/o module 1, the user can enable the host 5 to transmit a firmware file to be updated to the i/o module 1, and it should be noted that the host 5 transmits a packet of the firmware file to be updated to the i/o module 1 in a manner of transmitting one packet at a time. In this case, each packet of the desired firmware update file at least includes length data corresponding to the packet and offset data corresponding to the packet, and the first packet of the desired firmware update file further includes total packet length data corresponding to the desired firmware update file. On the other hand, the i/o module 1 completes the update of the firmware 211 after receiving and storing all the packets of the desired firmware file from the host 5.
Referring to fig. 1 and fig. 2, how the processing unit 4 of the input/output module 1 executes the firmware updating method according to the embodiment of the present invention is described. The steps involved in this example are described in detail below.
In step S200, the processing unit 4 receives a packet of an update firmware file from one of the host terminals 5 via the connection unit 3.
In step S201, the processing unit 4 determines whether a time difference between the reception time of the packet and the reception time of the previous packet stored in the update status data 212 of the first storage area 21 in step S200 is longer than a predetermined time period (i.e., determines whether the reception time interval of the previous and next packets is longer than the predetermined time period). If the determination result is affirmative, the flow proceeds to step S202. Otherwise, the flow proceeds to step S203. In this embodiment, the predetermined time period is, for example, 1 minute, but not limited thereto. For example, if the receiving time point of the previous packet (e.g., the time when the previous packet starts to be received by the processing unit 4) is 08:06:01 and the receiving time point of the packet (e.g., the time when the packet starts to be received by the processing unit 4) in step S200 is 08:06:32, the receiving time interval (i.e., the time difference) between the two packets before and after is 31 seconds, and the flow proceeds to step S203 because 31 seconds are shorter than the predetermined time period (1 minute).
In step S202, the processing unit 4 updates the flag value of the status flag to the second predetermined value and updates the time data according to the receiving time point of the packet.
In step S203, when the processing unit 4 determines that the time difference is not longer than the predetermined time period, the processing unit 4 updates the time data according to the reception time point of the packet in step S200. According to the above example, the processing unit 4 updates the time data to 08:06:32, so that when the processing unit 4 receives a packet next time, it can determine whether the receiving time interval between the two packets is longer than the predetermined time period according to the updated time data.
Following steps S202 and S203, in step S204, the processing unit 4 determines whether the packet is the first packet of the updated firmware file according to the offset data of the packet received in step S200 and the predetermined initial offset value. If the determination result is affirmative, the flow proceeds to step S205. Otherwise, the flow proceeds to step S208. In this embodiment, the predetermined initial offset value is, for example, but not limited to, 0, and when the processing unit 4 determines that the value indicated by the offset data is the predetermined initial offset value, the packet is determined as the first packet of the updated firmware file.
In step S205, the processing unit 4 determines whether the flag value of the status flag is the first predetermined value, i.e., whether the firmware 211 is in an update state, when determining that the packet is the first packet of the update firmware file. If the determination result is affirmative, the flow proceeds to step S206. Otherwise, the flow proceeds to step S207.
In step S206, when the packet is determined as the first packet of the updated firmware file and the firmware 211 is determined to be in an update state, the processing unit 4 transmits an occupation message indicating that the firmware 211 is in the update state to the host 5 via the connection unit 3. After that, the flow returns to step S200. When the host 5 receives the occupation message from the i/o module 1, the host 5 may retransmit the packet to the i/o module 1 after a predetermined waiting time period of, for example, 10 seconds. For example, if a host e.g. 5A is performing firmware update and another host e.g. 5B transmits a first packet of an update firmware file to the i/o module 1 during the firmware update of the host 5A, the processing unit 4 transmits an occupation message indicating that the firmware 211 is in the update state to the host 5B via the connection unit 3 since the firmware 211 is in the update state in response to the update of the host 5A, and discards the first packet transmitted by the host 5B without storage.
In step S207, when the flag value of the status flag is determined to be the second predetermined value, the processing unit 4 updates the flag value to the first predetermined value, stores the first packet in the second storage area 22 of the storage unit 2, and updates the total offset data according to the length data of the first packet and the offset data received in step S200. In this embodiment, the value indicated by the total offset data corresponding to the updated total offset data is the sum of the value indicated by the length data of the first packet and the value indicated by the offset data, but not limited thereto.
In step S208, when the processing unit 4 determines in step S204 that the packet is not the first packet of the updated firmware file, it determines whether the offset data of the packet matches the total offset data according to the offset data of the packet and the total offset data, and if the determination result is positive, the process goes to step S209. Otherwise, the flow advances to step S211.
In step S209, when the processing unit 4 determines that the offset data of the packet matches the total offset data, the packet is stored in the second storage area 22 of the storage unit 2, and the total offset data is updated according to the length data and the offset data of the packet. In this embodiment, the value indicated by the updated total offset data is the sum of the value indicated by the length data of the packet and the value indicated by the offset data, but not limited thereto.
Following steps S207 and S209, in step S210, the processing unit 4 determines whether the packet is a last packet of the updated firmware file according to the total offset data, the total packet length data of the packet (i.e. the first packet of the updated firmware file) stored in step S207, and the predetermined initial offset value. If the determination result is affirmative, the flow proceeds to step S212. Otherwise, the flow advances to step S211. In this embodiment, when the processing unit 4 determines that the sum of the value indicated by the total packet length data and the predetermined initial offset value is equal to the value indicated by the total offset value data, the packet is determined as the last packet of the updated firmware file.
In step S211, when the offset data of the packet is determined not to match the total offset data (step S208) or when the packet is determined not to be the last packet of the updated firmware file, the processing unit 4 transmits a target packet request to the host 5 via the connection unit 3. Notably, the target packet request includes the total offset data. After that, the flow returns to step S200.
On the other hand, when the host 5 receives the target packet request from the i/o module 1, the host 5 will respond to the target packet request to transmit a target packet to the i/o module 1, and the offset data of the target packet matches the total offset data. For example, ideally, the target packet is a second packet of the update firmware file if the packet is the first packet of the update firmware file, and the target packet is the next packet of the update firmware file relative to the packet if the packet is not the first packet and the last packet of the update firmware file. Thus, the host 5 transmits the first packet of the updated firmware file and then sequentially responds to the target packet request from the i/o module 1 to transmit the second packet of the updated firmware file to the last packet to the i/o module 1, respectively. However, in practice, the packet is transmitted without data corruption. In particular, when the offset data of the packet received by the processing unit 4 in step S200 is corrupted: in the case that the packet is the first packet of the updated firmware file at the beginning, the processing unit 4 cannot correctly determine that the packet is the first packet of the updated firmware file in step S204, and determines that the offset data of the packet does not conform to the total offset data (i.e. the predetermined initial offset value) in step S208, and then the host 5 retransmits the first packet of the updated firmware file once again by the target packet request for the first packet of the updated firmware file transmitted to the host 5 in step S211; in the case that the packet is not the first packet of the updated firmware file, the processing unit 4 determines that the offset data of the packet does not match the total offset data in step S208, and then requests the target packet of the packet by sending to the host 5 in step S211, so as to make the host 5 retransmit the packet again, thereby ensuring that the i/o module 1 can completely receive all packets of the updated firmware file.
It should be noted that the processing unit 4 selectively repeats steps S200 to S211 according to the logic described above before it determines that the packet received in step S200 is the last packet of the updated firmware file (step S210).
In step S212, when the processing unit 4 determines in step S210 that the packet is the last packet of the updated firmware file, the processing unit 4 determines whether all packets already stored in the second storage area 22 of the storage unit 2 are the updated firmware file, and if the determination result is positive, the process proceeds to step S213. Otherwise, the flow proceeds to step S214. In the present embodiment, the step S212 includes the sub-step S301 and the step S302 (see fig. 3), but not limited thereto. In addition, the first packet of the updated firmware file also includes reference check value data corresponding to the updated firmware file.
Referring again to fig. 1 and 3, it is further illustrated how the processing unit 4 determines whether all packets stored in the second storage area 22 are the firmware update file.
In step S301, when the packet is determined as the last packet of the updated firmware file, the processing unit 4 obtains check value data by using a Cyclic Redundancy Check (CRC) technique, such as CRC32, according to all packets already stored in the second storage area 22 of the storage unit 2.
In step S302, the processing unit 4 determines whether the verification value data matches the reference verification value data according to the verification value data and the reference verification data obtained in step S301. If the determination result is affirmative, the flow goes to step S213, otherwise the flow goes to step S214. When the check value data is determined to match the reference check value data, the processing unit 4 determines that all packets stored in the second storage area 22 are the firmware update file. When the check value data is determined not to match the reference check value data, the processing unit 4 determines that all packets already stored in the second storage area 22 are not the firmware update file.
In step S213, when determining that all the packets stored in the second storage area 22 are the updated firmware file, the processing unit 4 takes the updated firmware file as the firmware 211 (i.e. discards the original firmware and takes the updated firmware file as the firmware 211 of the I/O module) and updates the flag value of the status flag to the second predetermined value.
In step S214, when the processing unit 4 determines that all the packets stored in the second storage area 22 are not the update firmware file, the processing unit 4 transmits a failure message indicating that the update of the firmware 211 fails to the host 5 through the connection unit 3. It should be noted that, when the processing unit 4 determines that all the packets stored in the second storage area 22 are not the updated firmware file, the processing unit 4 may further clear all the packets stored in the second storage area 22, but not limited thereto.
It should be noted that, usually, the i/o module 1 must execute a reboot procedure before actually using the updated firmware 211 (i.e., the updated firmware file), until the reboot procedure is successfully executed, and the processing unit 4 sends a success message indicating that the firmware 211 is successfully updated to the host 5.
In addition, the configuration of the storage unit 2 before and after the successful completion of the firmware update is further illustrated. For example, before the firmware update is successfully completed, the first storage area 21 is composed of a plurality of memory addresses 0000-0002 for storing the update status data 212 and a plurality of memory addresses 0003-F000 for storing the firmware 211 in the storage unit 2, and the second storage area 22 is composed of a plurality of memory addresses F001-FFFF for storing the update firmware file; after the firmware update is successfully completed, i.e. the reboot procedure is successfully completed, the processing unit 4 makes the memory addresses 0000-0002 and F001-FFFF constitute the first storage area 21, and makes the memory addresses 0003-F000 constitute the second storage area 22, but not limited thereto. Thus, the firmware 211 stored in the first storage area 21 has been updated to the updated firmware file for later use by the i/o module 1.
It should be noted that the predetermined time period in step S201 is substantially longer than the time required for performing step S201 to step S214 once for one from any host 5. In other words, the purpose of the steps S201 and S202 is to avoid the delay of the processing unit 4 from the previous steps S201 to S214 related to the previously received packet, which is caused by the failure of successful completion, so that the other host 5 cannot perform the desired firmware update because the i/o module 1 is occupied. Therefore, when the receiving time interval of the last 2 packets is too long, the flag value of the status flag will be updated to the second predetermined value to release the occupied io module 1.
In summary, according to the firmware update method of the present invention, it is ensured that the currently received packet is not stored when the processing unit 4 determines that the firmware 211 is in the update state (i.e., the flag value of the status flag is the first predetermined value), so as to ensure that the related firmware update operation is completed, and at the same time, the processing unit 4 is prevented from storing any packet from different host terminals 5 in the same period, so that the processing unit 4 does not store packets from other host terminals 5 in the storage unit 2 too frequently during this period, as is encountered in the prior art, and thus the service life of the storage unit 2 can be prolonged. Furthermore, compared to the above-mentioned prior art, the second storage area 22 of the storage unit 2 only needs to provide a relatively small storage space enough to store the updated firmware file, so as to ensure that the updated firmware file is completely stored in the second storage area 22, thereby achieving the objective of the present invention.
The detailed description and examples of the present invention are given above with reference to the accompanying drawings, but the scope of the present invention is not limited thereto, and the equivalent modifications and variations within the scope of the claims of the present invention should be considered as falling within the scope of the present invention.

Claims (10)

1. A firmware updating method is suitable for an input/output module connected with a plurality of host terminals, the input/output module comprises a storage unit and a processing unit electrically connected with the storage unit, the storage unit stores a firmware and updating state data related to the firmware, the updating state data comprises total deviant data and a state flag, one flag value of the state flag is one of a first preset value indicating that the firmware is in an updating state and a second preset value different from the first preset value and indicating that the firmware is not in the updating state, the firmware updating method is implemented by the processing unit, and the method is characterized in that: and comprises the following steps:
(A) after receiving a packet of an updated firmware file from one of the plurality of host terminals, wherein the packet at least comprises length value data corresponding to the packet and offset value data corresponding to the packet, determining whether the packet is a first packet of the updated firmware file according to the offset value data and a predetermined initial offset value, wherein the first packet of the updated firmware file also comprises total packet length value data corresponding to the updated firmware file;
(B) when the packet is determined to be the first packet of the updated firmware file in step (A), determining whether the flag value of the status flag is the first predetermined value;
(C) when the flag value of the status flag is determined to be the second predetermined value in step (B), updating the flag value to the first predetermined value, storing the first packet in the storage unit, and updating the total offset data according to the length data and the offset data of the first packet;
(D) when the packet is determined not to be the first packet of the updated firmware file in step (A), determining whether the offset data of the packet matches the total offset according to the offset data of the packet and the total offset data of the updated status data;
(E) when the step (D) determines that the offset data of the packet matches the total offset data, storing the packet in the storage unit, and updating the total offset data according to the length data and the offset data of the packet;
(F) determining whether the packet is a last packet of the updated firmware file according to the total offset value data, the total packet length value data and the predetermined initial offset value; and
(G) when it is determined in step (F) that the packet is not the last packet of the updated firmware file, repeating steps (A) through (F) until it is determined that the packet is the last packet of the updated firmware file.
2. The firmware updating method according to claim 1, wherein: the update status data further includes time data of a reception time point of a previous packet, and before the step (A), further includes the steps of:
(H) when receiving the packet from the host, determining whether a time difference between a receiving time point of the packet and a receiving time point of the previous packet is longer than a predetermined time period;
(I) updating the time data according to the reception time point of the packet when it is determined in the step (H) that the time difference is not longer than the predetermined time period; and
(J) when it is determined in step (H) that the time difference is longer than the predetermined time period, the flag value of the status flag is updated to the second predetermined value, and the time data is updated according to the reception time point of the packet.
3. The firmware updating method according to claim 1, wherein: after the step (G), further comprising the steps of:
(K) when it is determined in step (F) that the packet is the last packet of the updated firmware file, determining whether all packets already stored in the storage unit are the updated firmware file;
(L) when it is determined in the step (K) that all the packets stored in the storage unit are the update firmware file, setting the update firmware file as the firmware and updating the flag value of the status flag to the second predetermined value; and
(M) when it is determined in step (K) that all packets stored in the storage unit are not the firmware update file, sending a failure message indicating that the firmware update failed to the host.
4. The firmware updating method according to claim 3, wherein: the first packet further includes reference check value data corresponding to the updated firmware file, and step (K) includes the following sub-steps:
(K-1) when it is determined in the step (F) that the packet is the last packet of the updated firmware file, obtaining check value data by using a cyclic redundancy check technique based on all packets already stored in the storage unit, and
(K-2) determining whether the check value data corresponds to the reference check value data based on the check value and the reference check value data obtained in the substep (K-1), and when it is determined that the check value corresponds to the reference check value data, determining that all packets already stored in the storage unit are the updated firmware file.
5. The firmware updating method according to claim 1, wherein: in step (C) and step (E), the value indicated by the updated total offset data is the sum of the value indicated by the length data of the packet and the value indicated by the offset data.
6. The firmware updating method according to claim 1, wherein: a step of, after the step (B):
(N) when the flag value of the status flag is determined to be the first predetermined value in step (B), transmitting an occupation message indicating that the firmware is in the update status to the host.
7. The firmware updating method according to claim 1, wherein: a step of, after the step (D),:
(O) when it is determined in step (D) that the offset value of the packet does not match the total offset value data, transmitting a target packet request to the host, the target packet request including the total offset value data,
when the host receives the target packet request from the i/o module, the host transmits a target packet to the i/o module in response to the target packet request, and the offset data of the target packet matches the total offset data.
8. The firmware updating method according to claim 1, wherein: in step (G), before repeating steps (a) to (F) each time, a step of:
(P) when it is determined in step (F) that the packet is not the last packet of the updated firmware file, transmitting a target packet request to the host, the target packet request including the total offset data,
when the host receives the target packet request from the i/o module, the host transmits a target packet to the i/o module in response to the target packet request, and the offset data of the target packet matches the total offset data.
9. The firmware updating method according to claim 1, wherein: in step (A), when the processing unit determines that the value indicated by the offset data is the predetermined initial offset value, the packet is determined as the first packet of the updated firmware file.
10. The firmware updating method according to claim 1, wherein: in step (F), when the processing unit determines that the sum of the value indicated by the total packet length data and the predetermined initial offset value is equal to the value indicated by the total offset value data, the packet is determined as the last packet of the updated firmware file.
CN201610595102.1A 2016-07-26 2016-07-26 Firmware updating method Active CN107665123B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610595102.1A CN107665123B (en) 2016-07-26 2016-07-26 Firmware updating method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610595102.1A CN107665123B (en) 2016-07-26 2016-07-26 Firmware updating method

Publications (2)

Publication Number Publication Date
CN107665123A CN107665123A (en) 2018-02-06
CN107665123B true CN107665123B (en) 2020-11-10

Family

ID=61114044

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610595102.1A Active CN107665123B (en) 2016-07-26 2016-07-26 Firmware updating method

Country Status (1)

Country Link
CN (1) CN107665123B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111221548B (en) * 2018-11-27 2023-03-24 环达电脑(上海)有限公司 Firmware updating method for field programmable logic gate array
CN113703816B (en) * 2020-05-19 2023-06-06 佛山市顺德区顺达电脑厂有限公司 Server device and method for avoiding firmware from being unable to be updated again

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101286867A (en) * 2007-05-29 2008-10-15 深圳市同洲电子股份有限公司 Software updating method and system of network equipment
CN102541571A (en) * 2010-12-08 2012-07-04 国基电子(上海)有限公司 Multiprocessor device and firmware updating method thereof
CN102799321A (en) * 2011-05-25 2012-11-28 深圳市汇顶科技有限公司 Method and system for updating benchmark data of capacitive multi-point touch screen
CN104090790A (en) * 2014-06-30 2014-10-08 飞天诚信科技股份有限公司 Two-chip scheme firmware updating method for safety terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10048865B2 (en) * 2014-10-24 2018-08-14 Microsoft Technology Licensing, Llc Disk partition stitching and rebalancing using a partition table

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101286867A (en) * 2007-05-29 2008-10-15 深圳市同洲电子股份有限公司 Software updating method and system of network equipment
CN102541571A (en) * 2010-12-08 2012-07-04 国基电子(上海)有限公司 Multiprocessor device and firmware updating method thereof
CN102799321A (en) * 2011-05-25 2012-11-28 深圳市汇顶科技有限公司 Method and system for updating benchmark data of capacitive multi-point touch screen
CN104090790A (en) * 2014-06-30 2014-10-08 飞天诚信科技股份有限公司 Two-chip scheme firmware updating method for safety terminal

Also Published As

Publication number Publication date
CN107665123A (en) 2018-02-06

Similar Documents

Publication Publication Date Title
TWI602122B (en) Firmware updating method
CN109964215B (en) Flow control in remote direct memory access data communications with ring buffer mirroring
CN110730104A (en) Method for upgrading multi-device batch firmware of mesh network device
WO2019076037A1 (en) Firmware updating method and device
US20160306623A1 (en) Control module of node and firmware updating method for the control module
WO2020000700A1 (en) Module upgrading method in unmanned aerial vehicle system, and unmanned aerial vehicle system
CN110447020B (en) Communication device, communication method, program, and communication system
US20160239370A1 (en) Rack having automatic recovery function and automatic recovery method for the same
TWI778811B (en) Method for upgrade, computer system and remote upgrade equipment
EP3147797A1 (en) Data management method, node and system for database cluster
US12032946B2 (en) Program update system, program transmission device, and program transmission method
CN107665123B (en) Firmware updating method
CN108572847B (en) Method for upgrading single chip microcomputer software version through USB port
US11586504B2 (en) Electronic apparatus and boot method thereof
WO2017049557A1 (en) Adapter upgrade method, mobile terminal, and adapter
JP2010092336A (en) Storage system and communication method
KR101436135B1 (en) software update apparatus for slave device
RU2600101C1 (en) Assembly control module and method of firmware updating for this control module
CN111443930A (en) Upgrading method and device of cascade terminal, storage medium and electronic terminal
CN102736922A (en) Method for updating application programs of embedded system and terminal of embedded system
US20160080111A1 (en) Receiver, transmitter and data transmission system
CN109684153B (en) Server with double firmware storage spaces and firmware updating method thereof
US20150168934A1 (en) Electronic device and method for loading program code thereof
CN110069272A (en) The method and electronic equipment of logical file upgrading
US10514850B2 (en) Information processing system, server device, Information processing method, and computer program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant