CN117170722B - Address discontinuity firmware upgrading method, device and system - Google Patents

Address discontinuity firmware upgrading method, device and system Download PDF

Info

Publication number
CN117170722B
CN117170722B CN202311444084.3A CN202311444084A CN117170722B CN 117170722 B CN117170722 B CN 117170722B CN 202311444084 A CN202311444084 A CN 202311444084A CN 117170722 B CN117170722 B CN 117170722B
Authority
CN
China
Prior art keywords
firmware
file
sector
storage device
binary file
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
CN202311444084.3A
Other languages
Chinese (zh)
Other versions
CN117170722A (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.)
Guangzhou Sanjing Electric Co Ltd
Original Assignee
Guangzhou Sanjing Electric 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 Guangzhou Sanjing Electric Co Ltd filed Critical Guangzhou Sanjing Electric Co Ltd
Priority to CN202311444084.3A priority Critical patent/CN117170722B/en
Publication of CN117170722A publication Critical patent/CN117170722A/en
Application granted granted Critical
Publication of CN117170722B publication Critical patent/CN117170722B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

After a firmware upgrade file is acquired, converting the firmware upgrade file into a binary file without address information, and sending the binary file to a first storage device to instruct the first storage device to copy the binary file to a second storage device, wherein a processing device corresponding to the second storage device executes firmware upgrade according to the copied binary file. By unifying the binary files without address information, the file attributes and protocols of various firmware upgrade files are unified, and multiple types of upgrade schemes are not needed for data processing. Meanwhile, the stability and success rate of upgrading through the binary files are improved through the backup processing of the first storage device and the second storage device.

Description

Address discontinuity firmware upgrading method, device and system
Technical Field
The present invention relates to the field of firmware upgrade technologies, and in particular, to a method, an apparatus, and a system for upgrading firmware with discontinuous addresses.
Background
Firmware upgrading refers to upgrading embedded firmware of a machine, so that the functions of the machine can be perfected, the stability of the machine can be enhanced, and the bug of the machine can be repaired. Because of the progress of the current integrated circuit, the firmware takes Flash as a carrier, so that the firmware is more and more simple and convenient to upgrade.
However, since chips are diversified at present, there are various types of chips; the FLASH addresses of the chips are continuous, and the FLASH addresses of the chips are discontinuous, so that the firmware formats generated by compiling different chips are different, a great challenge is brought to a firmware upgrading scheme, a specific upgrading mode and protocol are required to be formulated according to the firmware formats, and a unified upgrading scheme cannot be formed. In order to solve the problem, the current technical means can make different upgrade schemes according to different chips, analyze the content of the firmware by using an upper computer, and issue the starting address and data of the firmware in sections. However, data segmentation is easy to lose data, and the integrity of the data is affected.
In summary, it can be seen that the above deficiencies exist with conventional firmware upgrade schemes.
Disclosure of Invention
Based on this, it is necessary to provide a method, a device and a system for upgrading the firmware with discontinuous addresses, aiming at the defects of the traditional firmware upgrading scheme.
The embodiment of the disclosure provides an address discontinuous firmware upgrading method, which comprises the following steps:
acquiring a firmware upgrading file; the firmware upgrade file comprises conversion firmware attributes and firmware contents;
converting the firmware upgrade file into a binary file without address information;
and sending the binary file to the first storage device to instruct the first storage device to copy the binary file to the second storage device, and executing firmware upgrading by the processing device corresponding to the second storage device according to the copied binary file.
According to the address discontinuous firmware upgrading method, after the firmware upgrading file is obtained, the firmware upgrading file is converted into the binary file without address information, the binary file is sent to the first storage device to instruct the first storage device to copy the binary file to the second storage device, and the processing device corresponding to the second storage device executes firmware upgrading according to the copied binary file. By unifying the binary files without address information, the file attributes and protocols of various firmware upgrade files are unified, and multiple types of upgrade schemes are not needed for data processing. Meanwhile, the stability and success rate of upgrading through the binary files are improved through the backup processing of the first storage device and the second storage device.
In one embodiment, the converted firmware attribute includes a sector number, a firmware attribute, and a sector attribute;
the firmware attribute comprises a firmware total length and a firmware CRC; sector attributes include sector start address, sector length, and sector CRC;
the firmware content includes sector content of each sector.
In one embodiment, the process of converting a firmware upgrade file into a binary file without address information includes the steps of:
converting each unit file of the firmware upgrade file into a binary file;
and sequencing the unit files, and combining the binary files according to the sequencing.
In one embodiment, the process of instructing the first storage device to copy the binary file to the second storage device further comprises the steps of:
and carrying out integrity check on the binary file stored in the first storage device, and copying the binary file to the second storage device when the binary file is complete.
In one embodiment, the process of instructing the first storage device to copy the binary file to the second storage device further comprises the steps of:
and stopping firmware upgrading when the binary file is incomplete.
In one embodiment, the process of performing a firmware upgrade from a copied binary file includes the steps of:
and executing the integrity check on the binary file, and executing the firmware upgrade when the binary file is complete.
In one embodiment, the process of performing a firmware upgrade from the copied binary file further comprises the steps of:
and when the binary file is incomplete, instructing the second storage device to delete the binary file, and instructing the first storage device to copy the binary file to the second storage device.
An address discontinuity firmware upgrading device, comprising:
the file acquisition module is used for acquiring a firmware upgrading file; the firmware upgrade file comprises conversion firmware attributes and firmware contents;
the file conversion module is used for converting the firmware upgrading file into a binary file without address information;
and the file upgrading module is used for sending the binary file to the first storage device so as to instruct the first storage device to copy the binary file to the second storage device, and the processing device corresponding to the second storage device executes firmware upgrading according to the copied binary file.
The address discontinuous firmware upgrading device converts the firmware upgrading file into the binary file without address information after obtaining the firmware upgrading file, and sends the binary file to the first storage device to instruct the first storage device to copy the binary file to the second storage device, and the processing device corresponding to the second storage device executes firmware upgrading according to the copied binary file. By unifying the binary files without address information, the file attributes and protocols of various firmware upgrade files are unified, and multiple types of upgrade schemes are not needed for data processing. Meanwhile, the stability and success rate of upgrading through the binary files are improved through the backup processing of the first storage device and the second storage device.
At least one embodiment of the present disclosure also provides a data control apparatus, including:
one or more memories non-transitory storing computer-executable instructions;
one or more processors configured to execute computer-executable instructions, wherein the computer-executable instructions, when executed by the one or more processors, implement an address-discontinuous firmware upgrade method according to any of the embodiments of the present disclosure.
After the firmware upgrade file is obtained, the data control device converts the firmware upgrade file into the binary file without address information, and sends the binary file to the first storage device to instruct the first storage device to copy the binary file to the second storage device, and the processing device corresponding to the second storage device executes firmware upgrade according to the copied binary file. By unifying the binary files without address information, the file attributes and protocols of various firmware upgrade files are unified, and multiple types of upgrade schemes are not needed for data processing. Meanwhile, the stability and success rate of upgrading through the binary files are improved through the backup processing of the first storage device and the second storage device.
At least one embodiment of the present disclosure also provides a non-transitory computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement an address discontinuity firmware upgrade method according to any embodiment of the present disclosure.
The non-transitory computer readable storage medium described above, after acquiring the firmware upgrade file, converts the firmware upgrade file into a binary file without address information, and sends the binary file to the first storage device to instruct the first storage device to copy the binary file to the second storage device, and the processing device corresponding to the second storage device executes firmware upgrade according to the copied binary file. By unifying the binary files without address information, the file attributes and protocols of various firmware upgrade files are unified, and multiple types of upgrade schemes are not needed for data processing. Meanwhile, the stability and success rate of upgrading through the binary files are improved through the backup processing of the first storage device and the second storage device.
At least one embodiment of the present disclosure also provides an address discontinuity firmware upgrade system, including:
upgrading the conversion equipment;
a first memory device;
a second memory device;
wherein the upgrade conversion apparatus is configured to perform the address discontinuity firmware upgrade method of any of the above embodiments.
After the firmware upgrading file is obtained, the firmware upgrading file is converted into the binary file without address information, the binary file is sent to the first storage device, the first storage device is instructed to copy the binary file to the second storage device, and the processing device corresponding to the second storage device executes firmware upgrading according to the copied binary file. By unifying the binary files without address information, the file attributes and protocols of various firmware upgrade files are unified, and multiple types of upgrade schemes are not needed for data processing. Meanwhile, the stability and success rate of upgrading through the binary files are improved through the backup processing of the first storage device and the second storage device.
In one embodiment, an upgrade conversion apparatus includes:
a file format conversion tool;
upgrading the upper computer;
wherein the file format conversion tool is configured to convert the firmware upgrade file into a binary file without address information;
the upgrade upper computer is configured to send the binary file to the first storage device to instruct the first storage device to copy the binary file to the second storage device, and the processing device corresponding to the second storage device executes firmware upgrade according to the copied binary file.
Drawings
FIG. 1 is a flow chart of a method for upgrading address discontinuity firmware according to an embodiment;
FIG. 2 is a flowchart of a method for upgrading address discontinuity firmware according to another embodiment;
FIG. 3 is a block diagram of an address-discontinuous firmware upgrade apparatus according to an embodiment;
FIG. 4 is a schematic block diagram of a data control device provided in accordance with at least one embodiment of the present disclosure;
FIG. 5 is a schematic illustration of a non-transitory computer-readable storage medium provided by at least one embodiment of the present disclosure;
FIG. 6 is a block diagram of an address-discontinuous firmware upgrade system module according to an embodiment;
FIG. 7 is a flow chart of an address discontinuity firmware upgrade for a specific application example.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present disclosure. It will be apparent that the described embodiments are some, but not all, of the embodiments of the present disclosure. All other embodiments, which can be made by one of ordinary skill in the art without the need for inventive faculty, are within the scope of the present disclosure, based on the described embodiments of the present disclosure.
Unless defined otherwise, technical or scientific terms used in this disclosure should be given the ordinary meaning as understood by one of ordinary skill in the art to which this disclosure belongs. The terms "first," "second," and the like, as used in this disclosure, do not denote any order, quantity, or importance, but rather are used to distinguish one element from another. The word "comprising" or "comprises", and the like, means that elements or items preceding the word are included in the element or item listed after the word and equivalents thereof, but does not exclude other elements or items. The terms "connected" or "connected," and the like, are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", etc. are used merely to indicate relative positional relationships, which may also be changed when the absolute position of the object to be described is changed.
In order to keep the following description of the embodiments of the present disclosure clear and concise, the present disclosure omits a detailed description of some known functions and known components.
At least one embodiment of the present disclosure provides an address discontinuity firmware upgrade method.
Fig. 1 is a flowchart of an embodiment of an address discontinuity firmware upgrade method, as shown in fig. 1, where the embodiment of the address discontinuity firmware upgrade method includes steps S100 to S102:
s100, acquiring a firmware upgrade file; the firmware upgrade file comprises conversion firmware attributes and firmware contents;
s101, converting a firmware upgrade file into a binary file without address information;
s102, sending the binary file to the first storage device to instruct the first storage device to copy the binary file to the second storage device, and executing firmware upgrading by the processing device corresponding to the second storage device according to the copied binary file.
The firmware upgrade file can be read and executed by the firmware upgrade device to perform firmware upgrade processing. The firmware upgrade files comprise files in various formats or protocols, and the corresponding firmware upgrade schemes are not limited. The firmware upgrade device is typically a processor, such as an MCU or the like.
In one embodiment, the converted firmware attribute includes a sector number, a firmware attribute, and a sector attribute;
the firmware attribute comprises a firmware total length and a firmware CRC; sector attributes include sector start address, sector length, and sector CRC;
the firmware content includes sector content of each sector.
The firmware upgrading file comprises a plurality of sectors, and the content of each sector is the content of firmware upgrading.
The number of sectors, the total length of the firmware, the CRC of the firmware, the initial address of the sector, the length of the sector, the CRC of the sector and the content of the sector are all unit files.
Wherein the number of sectors represents the number of sectors in which firmware exists; the firmware total length represents all data lengths from the beginning to the end of the sector 1 attribute; firmware CRC represents CRC of all data from the beginning to the end of the sector 1 attribute; a sector start address representing a start position of the sector in the second memory device; the sector length represents the data content length of the sector; the sector CRC represents the CRC of the sector corresponding to the sector length content.
And converting the firmware upgrading file into corresponding binary files one by one according to the fixed binary file conversion rule.
In one embodiment, fig. 2 is a flowchart of an address discontinuity firmware upgrade method according to another embodiment, as shown in fig. 2, a process of converting a firmware upgrade file into a binary file without address information in step S101 includes step S200 and step S201:
s200, converting each unit file of the firmware upgrade file into a binary file;
s201, sorting the unit files, and combining the binary files according to the sorting.
Wherein, step S200 is as follows in table 1:
table 1 firmware conversion rule table
Wherein the firmware upgrade file includes n sectors, i.e., the number of sectors as one field, is converted into a binary file of length 4, e.g., "0011". According to the above conversion rule, it may be determined that the firmware has n sectors in total, and the content of each sector may be accurately obtained from the binary file according to the firmware conversion rule, for example:
the starting address of the binary file for sector n is as follows:
10 (n+1) +sector 1 length+sector 2 length+ … +sector (n-1) length.
The binary files of the unit files are sequentially ordered or sequentially issued in the order of table 1 above, and combined into the binary file transmitted to the first storage device. According to the binary file, the position and format of each unit file can be determined according to the conversion rule, and the scheme and protocol of firmware upgrading are unified.
In one embodiment, the binary files of the converted unit files are sequentially transferred to the first storage device, and the first storage device is used for combining to form a combined binary file.
Therefore, in the binary file of each unit file, data loss is easy to occur, and the stability and the readability of the data are affected.
Based on this, in one embodiment, as shown in fig. 2, the process of instructing the first storage device to copy the binary file to the second storage device in step S102 further includes step S202:
s202, carrying out integrity check on the binary file stored in the first storage device, and copying the binary file to the second storage device when the binary file is complete.
In one embodiment, the integrity check is performed on the firmware content portion by retrieving the converted firmware attribute portion in the binary file, and copying it to the second storage device when the integrity check passes.
In one embodiment, the integrity check is performed by a CRC file. Wherein the CRC file includes a firmware CRC and/or a sector CRC.
In one embodiment, as shown in fig. 2, the process of instructing the first storage device to copy the binary file to the second storage device in step S102 further includes step S203:
s203, stopping firmware upgrading when the binary file is incomplete.
When the binary file is incomplete, directly stopping firmware upgrade, including stopping copying or stopping firmware upgrade.
In one embodiment, as shown in fig. 2, the process of performing firmware upgrade according to the copied binary file in step S102 includes step S204:
s204, executing integrity check on the binary file, and executing firmware upgrade when the binary file is complete.
When the integrity check of step S204 is performed, the binary file is already copied to the second storage device, and the stability and success rate of firmware upgrade are ensured through the secondary integrity check.
In one embodiment, the firmware integrity of the first storage device and the data integrity of each sector are read through the firmware conversion rule, and the secondary integrity check is performed.
In one embodiment, as shown in fig. 2, the process of performing firmware upgrade according to the copied binary file in step S102 includes step S205:
and S205, when the binary file is incomplete, the second storage device is instructed to delete the binary file, and the first storage device is instructed to copy the binary file to the second storage device.
When the binary file of the second storage device is incomplete, the binary file stored by the first storage device is copied for the second time, and the binary file is used as a data base for backup and upgrading, so that the stability and success rate of firmware upgrading are improved.
After the firmware upgrade file is obtained, the firmware upgrade file is converted into a binary file without address information, and the binary file is sent to the first storage device to instruct the first storage device to copy the binary file to the second storage device, and the processing device corresponding to the second storage device executes firmware upgrade according to the copied binary file. By unifying the binary files without address information, the file attributes and protocols of various firmware upgrade files are unified, and multiple types of upgrade schemes are not needed for data processing. Meanwhile, the stability and success rate of upgrading through the binary files are improved through the backup processing of the first storage device and the second storage device.
At least one embodiment of the present disclosure also provides an address discontinuity firmware upgrade apparatus.
FIG. 3 is a block diagram of an embodiment of an address discontinuity firmware upgrade apparatus, as shown in FIG. 3, where the embodiment of the address discontinuity firmware upgrade apparatus includes:
a file obtaining module 100, configured to obtain a firmware upgrade file; the firmware upgrade file comprises conversion firmware attributes and firmware contents;
a file conversion module 101, configured to convert a firmware upgrade file into a binary file without address information;
the file upgrade module 102 is configured to send the binary file to the first storage device, so as to instruct the first storage device to copy the binary file to the second storage device, and execute firmware upgrade by the processing device corresponding to the second storage device according to the copied binary file.
The address discontinuous firmware upgrading device converts the firmware upgrading file into the binary file without address information after obtaining the firmware upgrading file, and sends the binary file to the first storage device to instruct the first storage device to copy the binary file to the second storage device, and the processing device corresponding to the second storage device executes firmware upgrading according to the copied binary file. By unifying the binary files without address information, the file attributes and protocols of various firmware upgrade files are unified, and multiple types of upgrade schemes are not needed for data processing. Meanwhile, the stability and success rate of upgrading through the binary files are improved through the backup processing of the first storage device and the second storage device.
At least one embodiment of the present disclosure also provides a data control apparatus. Fig. 4 is a schematic block diagram of a data control apparatus provided in at least one embodiment of the present disclosure. For example, as shown in fig. 4, the data control device 20 may include one or more memories 200 and one or more processors 201. Memory 200 is used to non-transitory store computer-executable instructions; the processor 201 is configured to execute computer-executable instructions that, when executed by the processor 201, may cause the processor 201 to perform one or more steps in an address-discontinuous firmware upgrade method according to any of the embodiments of the present disclosure.
For specific implementation and relevant explanation of each step of the address discontinuity firmware upgrade method, reference may be made to relevant content in the embodiment of the address discontinuity firmware upgrade method, which is not described herein. It should be noted that the components of the data control device 20 shown in fig. 4 are only exemplary and not limiting, and that the data control device 20 may have other components as desired for practical applications.
In one embodiment, the processor 201 and the memory 200 may communicate with each other directly or indirectly. For example, the processor 201 and the memory 200 may communicate over a network connection. The network may include a wireless network, a wired network, and/or any combination of wireless and wired networks, the disclosure is not limited in type and function of the network herein. For another example, processor 201 and memory 200 may also communicate via a bus connection. The bus may be a peripheral component interconnect standard (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. For example, the processor 201 and the memory 200 may be disposed at a remote data server (cloud) or a distributed energy system (local), or may be disposed at a client (e.g., a mobile device such as a mobile phone). For example, the processor 201 may be a Central Processing Unit (CPU), tensor Processor (TPU), or graphics processor GPU, among other devices having data processing and/or instruction execution capabilities, and may control other components in the data prediction apparatus 20 to perform desired functions. The Central Processing Unit (CPU) can be an X86 or ARM architecture, etc.
In one embodiment, memory 200 may comprise any combination of one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. Volatile memory can include, for example, random Access Memory (RAM) and/or cache memory (cache) and the like. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, erasable programmable read-only memory (EPROM), portable compact disc read-only memory (CD-ROM), USB memory, flash memory, and the like. One or more computer-executable instructions may be stored on the computer-readable storage medium and the processor 201 may execute the computer-executable instructions to implement the various functions of the data prediction device 20. Various applications and various data, as well as various data used and/or generated by the applications, etc., may also be stored in the memory 200.
It should be noted that, the data control device 20 may achieve similar technical effects as the aforementioned address discontinuity firmware upgrade method, and the repetition is not repeated.
At least one embodiment of the present disclosure also provides a non-transitory computer-readable storage medium. Fig. 5 is a schematic diagram of a non-transitory computer-readable storage medium provided by at least one embodiment of the present disclosure. For example, as shown in FIG. 5, one or more computer-executable instructions 301 may be non-transitory stored on the non-transitory computer-readable storage medium 30. For example, computer-executable instructions 301, when executed by a computer, may cause the computer to perform one or more steps in an address-discontinuous firmware upgrade method according to any of the embodiments of the present disclosure.
In one embodiment, the non-transitory computer readable storage medium 30 may be applied to the data control device 20 described above, which may be, for example, the memory 200 in the data control device 20.
In one embodiment, the description of the non-transitory computer readable storage medium 30 may refer to the description of the memory 200 in the embodiment of the data control device 20, and the repetition is omitted.
It should be noted that the memory 200 stores different non-transitory computer executable instructions that, when executed by the processor 201, may cause the processor 201 to perform one or more steps in an address discontinuity firmware upgrade method according to any of the embodiments of the present disclosure, the data control device 20 corresponds to as a firmware upgrade device.
At least one embodiment of the present disclosure also provides an address discontinuity firmware upgrade system.
FIG. 6 is a block diagram of an embodiment of an address discontinuity firmware upgrade system, as shown in FIG. 6, the embodiment of the address discontinuity firmware upgrade system includes:
upgrading the conversion apparatus 1000;
a first memory device 1001;
a second memory device 1002;
wherein the upgrade conversion apparatus is configured to perform the address discontinuity firmware upgrade method of any of the above embodiments.
Wherein the upgrade conversion apparatus includes one or more execution bodies, each of which may be disposed at one side or disposed at multiple sides, respectively. For example, the conversion and the issuing of the firmware upgrade file are deployed as an execution body in the cloud, and the steps of executing the first storage device and the second storage device are deployed as another execution body on the client side or the firmware side.
In one embodiment, as shown in FIG. 6, upgrade conversion apparatus 1000 comprises:
a file format conversion tool;
upgrading the upper computer;
wherein the file format conversion tool is configured to convert the firmware upgrade file into a binary file without address information;
the upgrade upper computer is configured to send the binary file to the first storage device to instruct the first storage device to copy the binary file to the second storage device, and the processing device corresponding to the second storage device executes firmware upgrade according to the copied binary file.
In one embodiment, as shown in fig. 2, the first storage device 1001 includes an external Flash, the second storage device 1002 includes MCUFALSH, and MCUFALSH is used to perform firmware upgrade.
Based on the address-discontinuous firmware upgrade system shown in fig. 6, the upgrade conversion apparatus performs copying of the binary file according to the copy instruction by controlling each firmware hardware, as shown in the address-discontinuous firmware upgrade flowchart of the specific application example of fig. 7:
the system inquires whether a copy instruction exists in real time, and if the copy instruction exists, the integrity of external flash firmware and the integrity of data of each sector are read according to a conversion rule;
if the integrity of the firmware and the integrity of each sector pass the verification, acquiring the attribute and the content of each sector according to the conversion rule, and copying the attribute and the content to the address corresponding to the MCU; otherwise, clearing the copy instruction and exiting the copy mode;
and (3) finishing firmware copying, checking the integrity of each sector and the firmware, if the check is passed, clearing a copying instruction to finish data updating, otherwise, executing the steps again.
Based on the method, for file processing, bin file upgrading and upgrading schemes and protocols can be unified, the data integrity and the firmware integrity of each sector can be checked, and meanwhile, backup upgrading can improve upgrading stability and success rate.
After the firmware upgrading file is obtained, the firmware upgrading file is converted into the binary file without address information, the binary file is sent to the first storage device, the first storage device is instructed to copy the binary file to the second storage device, and the processing device corresponding to the second storage device executes firmware upgrading according to the copied binary file. By unifying the binary files without address information, the file attributes and protocols of various firmware upgrade files are unified, and multiple types of upgrade schemes are not needed for data processing. Meanwhile, the stability and success rate of upgrading through the binary files are improved through the backup processing of the first storage device and the second storage device.
For the purposes of this disclosure, the following points are also noted:
(1) The drawings of the embodiments of the present disclosure relate only to the structures to which the embodiments of the present disclosure relate, and reference may be made to the general design for other structures.
(2) In the drawings for describing embodiments of the present invention, thicknesses and dimensions of layers or structures are exaggerated for clarity. It will be understood that when an element such as a layer, film, region or substrate is referred to as being "on" or "under" another element, it can be "directly on" or "under" the other element or intervening elements may be present.
(3) The embodiments of the present disclosure and features in the embodiments may be combined with each other to arrive at a new embodiment without conflict. The above is merely a specific embodiment of the disclosure, but the protection scope of the disclosure should be limited thereto and the protection scope of the claims should be in control.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples represent only a few embodiments of the present application, which are described in more detail and are not thereby to be construed as limiting the scope of the claims. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (7)

1. An address discontinuity firmware upgrading method is characterized by comprising the following steps:
acquiring a firmware upgrading file; the firmware upgrading file comprises conversion firmware attributes and firmware contents;
the conversion firmware attribute comprises the number of sectors, the firmware attribute and the sector attribute;
the firmware attribute comprises a firmware total length and a firmware CRC; sector attributes include sector start address, sector length, and sector CRC;
the firmware content comprises sector content of each sector;
the firmware upgrading file comprises a plurality of sectors, and the content of each sector is the content of firmware upgrading;
the number of the sectors, the total length of the firmware, the CRC of the firmware, the sector starting address, the sector length, the CRC of the sectors and the content of the sectors are unit files;
wherein the number of sectors represents the number of sectors in which firmware exists; the firmware total length represents all data lengths from the beginning to the end of the sector 1 attribute; firmware CRC represents CRC of all data from the beginning to the end of the sector 1 attribute; a sector start address representing a start position of the sector in the second memory device; the sector length represents the data content length of the sector; sector CRC represents CRC of the sector length content corresponding to the sector;
converting the firmware upgrade file into a binary file without address information;
the process of converting the firmware upgrade file into a binary file without address information comprises the following steps:
converting each unit file of the firmware upgrade file into a binary file;
sequencing the unit files, and combining the binary files according to the sequencing;
sending the binary file to a first storage device to instruct the first storage device to copy the binary file to a second storage device, and executing firmware upgrade by a processing device corresponding to the second storage device according to the copied binary file;
the process of executing firmware upgrade according to the copied binary file further comprises the steps of:
and when the binary file is incomplete, the second storage device is instructed to delete the binary file, and the first storage device is instructed to copy the binary file to the second storage device.
2. The address discontinuity firmware upgrading method according to claim 1, wherein the process of instructing the first storage device to copy the binary file to a second storage device further comprises the steps of:
and carrying out integrity check on the binary file stored by the first storage device, and copying the binary file to the second storage device when the binary file is complete.
3. The address discontinuity firmware upgrading method according to claim 2, wherein the process of instructing the first storage device to copy the binary file to a second storage device further comprises the steps of:
and stopping firmware upgrading when the binary file is incomplete.
4. The address discontinuity firmware upgrading method according to claim 1, wherein the process of performing firmware upgrading according to the copied binary file comprises the steps of:
and executing the integrity check on the binary file, and executing the firmware upgrade when the binary file is complete.
5. An address discontinuity firmware upgrading apparatus, comprising:
the file acquisition module is used for acquiring a firmware upgrading file; the firmware upgrading file comprises conversion firmware attributes and firmware contents;
the conversion firmware attribute comprises the number of sectors, the firmware attribute and the sector attribute;
the firmware attribute comprises a firmware total length and a firmware CRC; sector attributes include sector start address, sector length, and sector CRC;
the firmware content comprises sector content of each sector;
the firmware upgrading file comprises a plurality of sectors, and the content of each sector is the content of firmware upgrading;
the number of the sectors, the total length of the firmware, the CRC of the firmware, the sector starting address, the sector length, the CRC of the sectors and the content of the sectors are unit files;
wherein the number of sectors represents the number of sectors in which firmware exists; the firmware total length represents all data lengths from the beginning to the end of the sector 1 attribute; firmware CRC represents CRC of all data from the beginning to the end of the sector 1 attribute; a sector start address representing a start position of the sector in the second memory device; the sector length represents the data content length of the sector; sector CRC represents CRC of the sector length content corresponding to the sector;
the file conversion module is used for converting the firmware upgrading file into a binary file without address information;
the process of converting the firmware upgrade file into a binary file without address information comprises the following steps:
converting each unit file of the firmware upgrade file into a binary file;
sequencing the unit files, and combining the binary files according to the sequencing;
the file upgrading module is used for sending the binary file to a first storage device so as to instruct the first storage device to copy the binary file to a second storage device, and the processing device corresponding to the second storage device executes firmware upgrading according to the copied binary file;
the process of executing firmware upgrade according to the copied binary file further comprises the steps of:
and when the binary file is incomplete, the second storage device is instructed to delete the binary file, and the first storage device is instructed to copy the binary file to the second storage device.
6. An address-discontinuous firmware upgrade system, comprising:
upgrading the conversion equipment;
a first memory device;
a second memory device;
wherein the upgrade conversion apparatus is configured to perform the address discontinuity firmware upgrade method according to any one of claims 1 to 4.
7. The address-discontinuous firmware upgrade system of claim 6, wherein the upgrade conversion apparatus comprises:
a file format conversion tool;
upgrading the upper computer;
wherein the file format conversion tool is configured to convert the firmware upgrade file into a binary file without address information;
the upgrade upper computer is configured to send the binary file to a first storage device so as to instruct the first storage device to copy the binary file to a second storage device, and the processing device corresponding to the second storage device executes firmware upgrade according to the copied binary file.
CN202311444084.3A 2023-11-02 2023-11-02 Address discontinuity firmware upgrading method, device and system Active CN117170722B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311444084.3A CN117170722B (en) 2023-11-02 2023-11-02 Address discontinuity firmware upgrading method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311444084.3A CN117170722B (en) 2023-11-02 2023-11-02 Address discontinuity firmware upgrading method, device and system

Publications (2)

Publication Number Publication Date
CN117170722A CN117170722A (en) 2023-12-05
CN117170722B true CN117170722B (en) 2024-03-22

Family

ID=88937870

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311444084.3A Active CN117170722B (en) 2023-11-02 2023-11-02 Address discontinuity firmware upgrading method, device and system

Country Status (1)

Country Link
CN (1) CN117170722B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102787932A (en) * 2012-08-28 2012-11-21 江西直方数控动力有限公司 Apparatus and method for matching and calibrating electric control diesel engine based on serial communication
CN107977222A (en) * 2017-12-21 2018-05-01 北京京存技术有限公司 Suitable for the conversion of the upgrade file of eMMC, generation method and device
CN110955447A (en) * 2019-11-14 2020-04-03 北京航天时代激光导航技术有限责任公司 Multi-sector programming and checking method for laser inertial measurement unit coefficient based on programming module
CN112596733A (en) * 2020-12-15 2021-04-02 北京五一视界数字孪生科技股份有限公司 Method, device, storage medium and electronic equipment for compiling and acquiring file
CN113515747A (en) * 2021-05-17 2021-10-19 深圳市友华通信技术有限公司 Equipment upgrading method, device, equipment and storage medium
CN115729156A (en) * 2022-11-30 2023-03-03 湖北三江航天红峰控制有限公司 Extensible flight measurement and control system based on serial port

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7673300B2 (en) * 2004-06-10 2010-03-02 Samsung Electronics Co., Ltd. Segmented linker using spatial locality of reference for over-the-air software updates

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102787932A (en) * 2012-08-28 2012-11-21 江西直方数控动力有限公司 Apparatus and method for matching and calibrating electric control diesel engine based on serial communication
CN107977222A (en) * 2017-12-21 2018-05-01 北京京存技术有限公司 Suitable for the conversion of the upgrade file of eMMC, generation method and device
CN110955447A (en) * 2019-11-14 2020-04-03 北京航天时代激光导航技术有限责任公司 Multi-sector programming and checking method for laser inertial measurement unit coefficient based on programming module
CN112596733A (en) * 2020-12-15 2021-04-02 北京五一视界数字孪生科技股份有限公司 Method, device, storage medium and electronic equipment for compiling and acquiring file
CN113515747A (en) * 2021-05-17 2021-10-19 深圳市友华通信技术有限公司 Equipment upgrading method, device, equipment and storage medium
CN115729156A (en) * 2022-11-30 2023-03-03 湖北三江航天红峰控制有限公司 Extensible flight measurement and control system based on serial port

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
STM32在复杂***中实现固件自动升级的方法;宋宇宁;单片机与嵌入式***应用;20171101(11);全文 *

Also Published As

Publication number Publication date
CN117170722A (en) 2023-12-05

Similar Documents

Publication Publication Date Title
CN107870728B (en) Method and apparatus for moving data
US10437481B2 (en) Data access method and related apparatus and system
US20170371947A1 (en) Data unit cloning in memory-based file systems
WO2020093501A1 (en) File storage method and deletion method, server, and storage medium
US20180364915A1 (en) Method and system for distributed storage using client-side global persistent cache
US20200341752A1 (en) Electronic apparatus and method for controlling thereof
US20230306010A1 (en) Optimizing Storage System Performance Using Data Characteristics
CN110352410B (en) Tracking access patterns of index nodes and pre-fetching index nodes
CN111522574B (en) Differential packet generation method and related equipment
US9454325B2 (en) Method and system for offline data access on computer systems
US20200371827A1 (en) Method, Apparatus, Device and Medium for Processing Data
CN114138558A (en) Object storage method and device, electronic equipment and storage medium
US20160170869A9 (en) Systems and methods for in-place reorganization of device storage
CN117170722B (en) Address discontinuity firmware upgrading method, device and system
WO2019041891A1 (en) Method and device for generating upgrade package
CN115964002B (en) Electric energy meter terminal archive management method, device, equipment and medium
CN109542860B (en) Service data management method based on HDFS and terminal equipment
US9317322B2 (en) Simulating synchronous execution of asynchronous operations
CN116841799A (en) Virtual machine backup method, system, equipment and readable storage medium
US9740596B1 (en) Method of accelerated test automation through unified test workflows
CN115586872A (en) Container mirror image management method, device, equipment and storage medium
JP2016122485A (en) Information recording program, information recording method, and information recording device
CN115132186A (en) End-to-end speech recognition model training method, speech decoding method and related device
US11709596B2 (en) Method, device and computer program for data storage
CN112685188A (en) Embedded memory management method and device based on global byte array

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