CN115454465B - Automatic updating method of CPLD firmware - Google Patents

Automatic updating method of CPLD firmware Download PDF

Info

Publication number
CN115454465B
CN115454465B CN202210965554.XA CN202210965554A CN115454465B CN 115454465 B CN115454465 B CN 115454465B CN 202210965554 A CN202210965554 A CN 202210965554A CN 115454465 B CN115454465 B CN 115454465B
Authority
CN
China
Prior art keywords
firmware
cpld
updating
new version
update
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
CN202210965554.XA
Other languages
Chinese (zh)
Other versions
CN115454465A (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.)
Beijing Nexsec Internet Co ltd
Original Assignee
Beijing Nexsec Internet 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 Beijing Nexsec Internet Co ltd filed Critical Beijing Nexsec Internet Co ltd
Priority to CN202210965554.XA priority Critical patent/CN115454465B/en
Publication of CN115454465A publication Critical patent/CN115454465A/en
Application granted granted Critical
Publication of CN115454465B publication Critical patent/CN115454465B/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • G06F11/076Error or fault detection not based on redundancy by exceeding limits by exceeding a count or rate limit, e.g. word- or bit count limit
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming

Abstract

The invention provides an automatic updating method of CPLD firmware, which can automatically screen CPLD firmware, match correct CPLD firmware, and enable clients to select to update in idle time of a server, and automatically judge the matched CPLD firmware by newly adding the selection of CPLD version in an updating mechanism, thereby being more suitable for different clients and mainboards, and setting inspection of built-in safety marks of CPLD firmware to avoid error brushing. The invention improves the efficiency of updating CPLD firmware on a large scale, is convenient and concise compared with the operation of using a burning jig, does not need personnel to participate in the whole firmware updating process on the site of server deployment, effectively reduces the operation cost of clients, can be suitable for a large number of client systems to participate in automatic updating at the same time, has wider application range, and can enable users to experience new functions at the first time by timely automatic updating.

Description

Automatic updating method of CPLD firmware
Technical Field
The invention relates to the technical field of electric digital data processing, in particular to an automatic updating method of CPLD firmware.
Background
CPLD (Complex Programmable Logic Device) is a complex programmable logic device developed on the basis of logic devices such as PAL and GAL, has relatively large scale and complex structure, and belongs to the range of large-scale integrated circuits. The CPLD may have the device make corresponding adjustments to support multiple protocols and change functions as standards and protocols evolve. This provides great convenience to system designers because they can proceed with hardware design before the standard has fully matured, and then modify the code to meet the requirements of the final standard. The speed and latency characteristics of a CPLD are better than a pure software solution, which allows as much logic that can be implemented in software to be handled as much as possible using the CPLD, and also means that the CPLD firmware is updated more frequently.
The current CPLD firmware updating method comprises the following steps:
(1) CPLD local update through jig
The chip is directly placed in the socket of the burning tool for off-line burning, so that the operation is simple, but the CPLD chip is repeatedly plugged and welded, and the chip is easy to damage.
(2) On-line updating CPLD by downloader
The downloading cable is connected with a standard USB PC port for online burning, compared with a burning jig, the burning jig is quick, but JTAG pins are reserved on a circuit board, and a downloading device is needed, so that the steps are complicated, and the tool is complex.
(3) CPLD (complex programmable logic device) locally and online updated by system
The update operation is carried out on the CPLD through the JTAG port, so that the cost of a jig, a downloader and the like is saved, but the method can only be used for one-to-one update on site and has low efficiency.
(4) Remotely updating CPLD
The user can remotely update the CPLD command through the firmware updating tool, so that the defect that the CPLD can only be updated on site is overcome, but manual intervention is still required to sequentially update commands of different client systems, and the efficiency is low.
After the CPLD functions of a large number of mainboards are updated, the prior art can realize that a user updates CPLD firmware remotely by himself, but the efficiency is not effectively improved in the face of a large number of mainboards, and only one-to-one instruction can be given; in addition, the corresponding CPLD firmware is very complicated facing to various types of mainboards and different clients, and the CPLD firmware to be upgraded needs to be searched and confirmed manually, so that the error brushing is easy to cause, and even the mainboards are damaged; after the CPLD function is updated, a user often does not know the new function brought by the update at the first time, if the motherboard can automatically detect whether the current CPLD of the server is updated or not and automatically matches corresponding CPLD firmware according to configured updating rules, the CPLD updating operation can be automatically carried out, the motherboard can be updated in a large amount in parallel without manual intervention, the efficiency is improved, and the use feeling of the user is improved.
Therefore, an automatic updating method of CPLD firmware is needed.
Disclosure of Invention
The invention provides an automatic CPLD firmware updating method for solving the problem of CPLD updating efficiency, wherein an automatic updating program can automatically judge the adapted CPLD firmware by newly adding the selection of CPLD version in an updating mechanism, is more suitable for different clients and mainboards, and meanwhile, the checking of the built-in safety mark of the CPLD firmware is set, so that the false brushing is avoided, and the clients can select to update in the idle time period of a server. The invention improves the efficiency of updating CPLD firmware on a large scale, is convenient and concise compared with the operation of using a burning jig, does not need personnel to participate in the whole firmware updating process on the site of server deployment, effectively reduces the operation cost of clients, can be suitable for a large number of client systems to participate in automatic updating at the same time, has wider application range, and can enable users to experience new functions at the first time by timely automatic updating.
The invention provides an automatic updating method of CPLD firmware, which comprises the following steps:
s1, configuring an automatic updating rule by a user, wherein the automatic updating rule comprises whether an automatic updating function is started or not, if yes, entering a step S2, and if no, not automatically updating;
s2, after the client system is powered on, running an automatic updating process, wherein the automatic updating process comprises the following steps: a firmware acquisition process, a firmware analysis process and a firmware update process;
s3, starting the firmware obtaining process, wherein the client system obtains a release file containing firmware updating information from the CPLD remote server, analyzes the release file, judges whether CPLD firmware updating is needed, if so, enters a step S4, and if not, re-obtains the release file;
s4, downloading the current latest new version CPLD firmware from the CPLD remote server according to the IP address of the CPLD remote server by the firmware acquisition process, and storing the CPLD firmware position in a readable and writable memory of the client system, wherein the firmware acquisition process is completed;
s5, the client system checks whether the new version of CPLD firmware is complete, if so, the step S6 is entered; if not, removing the new version CPLD firmware, and returning to the step S4;
if the accumulated three times are no, adding the new version CPLD firmware into an automatic updating rule blacklist, and returning to the step S3;
s6, starting the firmware analysis process, analyzing the new version CPLD firmware by the firmware analysis process, judging whether to update the firmware, if yes, entering a step S7, if not, adding the version number of the new version CPLD firmware into an automatic updating rule blacklist, removing the new version CPLD firmware stored in a readable and writable memory, and returning to the step S3;
s7, if the user selects to start the updating function before the updating is started in the automatic updating rule, the client system runs a firmware updating process and informs the user that the new version of CPLD firmware is downloaded; judging whether the client selects self-updating, if so, adding the version number of the new version CPLD firmware into an automatic updating rule blacklist, and returning to the step S3; if not, go to step S8;
s8, the firmware analysis process analyzes the new version CPLD firmware, acquires the information of the local CPLD chip through the firmware updating circuit, judges whether the new version CPLD firmware can be used for updating the local CPLD chip, and if so, enters a step S9, and the firmware analysis process is completed; if not, adding the version number of the new version CPLD firmware into an automatic updating rule blacklist, removing the new version CPLD firmware stored in the readable and writable memory, and returning to the step S3;
s9, running a firmware updating process, wherein the firmware updating process judges whether the client system is idle, if so, the updating state is set to be started, and the step S10 is entered, if not, the updating state is set to be waiting, and the judgment of whether the client system is idle is continued until the client system is idle;
s10, the firmware updating process writes the firmware data analyzed in the step S8 into a local CPLD chip through a firmware updating circuit, updates and returns firmware updating response information, the firmware updating process judges whether the updating response is successful or not, if so, the updating is continued, if not, the writing of the firmware updating circuit is re-executed and the counting is started, and whether the updating response is successful or not is continued; if the response information is successfully updated for three times, adding the version number of the new version CPLD firmware into an automatic updating rule blacklist;
if the user selects to send the update message in the automatic update rule, notifying the user that the CPLD firmware update fails;
returning to the step S3;
s11, the automatic updating process reads the CPLD firmware version updated by the local CPLD chip through the firmware updating circuit, and confirms whether the version of the CPLD firmware is the version of the new version;
if the user selects to send the update message in the automatic update rule, notifying the user that the automatic update of the CPLD firmware of the current version is completed;
returning to the step S3, the automatic updating is continued.
The invention relates to an automatic updating method of CPLD firmware, which is characterized in that, as a preferable mode, a step S I is further included between the step S5 and the step S6:
s I, starting a firmware analysis process, wherein the firmware analysis process analyzes a safety mark built in the CPLD firmware of the new version and judges whether the safety mark is correct, and if so, the step S6 is entered; if not, adding the version number of the new version CPLD firmware into the automatic updating rule blacklist, removing the new version CPLD firmware stored in the readable and writable memory, sending information by the updating message sending function to remind the user, and returning to the step S3.
In the method for automatically updating the CPLD firmware, in the step S6, if the safety mark is wrong, unknown firmware is mixed into the CPLD firmware of the new version.
In the method for automatically updating the CPLD firmware, in the step S1, the automatic updating rule also comprises the IP address, updating time, updating message transmission, host model, client information and blacklist of the CPLD remote server.
In the method for automatically updating the CPLD firmware, the updating message transmission comprises the following steps of informing a user before updating, informing the user when the safety mark of the CPLD firmware of a new version is wrong, and informing the user after updating.
In the method for automatically updating the CPLD firmware, in the step S3, as a preferred mode, the method for judging whether the CPLD firmware needs to be updated is as follows: after the release file is successfully analyzed, the firmware obtaining process searches whether the release file contains the host model or client information of the client system or not, and whether the new version CPLD firmware is not in the automatic updating rule blacklist or not, if so, the CPLD firmware needs to be updated; if one is negative, no CPLD firmware update is required.
In the method for automatically updating the CPLD firmware, as a preferred mode, in the step S6, the method for judging whether to automatically update the firmware analysis process comprises the following steps: if the version number of the new version CPLD firmware is newer than the firmware version number of the local CPLD chip and the timestamp of the new version CPLD firmware is newer than the timestamp of the CPLD chip on the client system, updating is needed; if either item is negative, no update is required.
In a preferred manner, in step S9, the firmware update circuit includes, but is not limited to, SPI, I2C, and JTAG.
In the method for automatically updating the CPLD firmware, in the step S9, as a preferred mode, the method for judging whether the new version of CPLD firmware can be used for updating the local CPLD chip is as follows: and comparing the analyzed new version CPLD firmware with the local CPLD chip information and judging.
In the method for automatically updating CPLD firmware according to the present invention, in step S2, there are at least two client systems, and each client system performs steps S3 to S12 simultaneously.
The invention reads the latest release file of the remote server according to the automatic update rule of the user configuration through the firmware acquisition process on the client system and analyzes the latest release file, determines whether the firmware is matched with the mainboard, acquires the new version CPLD firmware of the remote server if the latest release file is matched with the mainboard, stores the CPLD firmware in a readable and writable memory, checks the CPLD firmware position, analyzes the built-in safety mark of the firmware, judges whether the current new version CPLD firmware is updated compared with the firmware version of the CPLD chip on the client system, analyzes the CPLD firmware through the CPLD firmware analysis process on the client system if the current new version CPLD firmware is not updated, inquires whether the client system is in an idle state, updates the CPLD chip through the firmware update process on the client system if the current CPLD firmware is idle, returns update response information, finally confirms the updated CPLD firmware version and sends an update result to the user.
The invention has the following advantages:
(1) The invention improves the efficiency of updating CPLD firmware on a large scale, is more convenient and simpler than using a burning jig, does not need personnel to participate in the whole firmware updating process on a server deployment site, and effectively reduces the operation cost of clients.
(2) According to the CPLD version selection method, the CPLD version selection is newly added in the updating mechanism, so that the automatic updating program can automatically judge the adaptive CPLD firmware, and the method is more suitable for different clients and mainboards, and a user can experience a new function at the first time; the verification of the built-in safety mark of the CPLD firmware is set, so that the CPLD firmware can be effectively prevented from being replaced by unknown firmware after the server is attacked, and error brushing is avoided; meanwhile, the client can also select to update in the idle time period of the server, so that the updating is faster and more flexible, and the business of the client running on the server is not influenced.
(3) The invention is applicable to simultaneous automatic upgrade of a large number of client systems and has wider application range.
Drawings
FIG. 1 is a flow chart of an automatic update method of CPLD firmware;
fig. 2 is a block diagram of an automatic updating method of CPLD firmware.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments.
Example 1
As shown in fig. 1-2, an automatic updating method of CPLD firmware includes the following steps:
s1, configuring an automatic updating rule by a user, wherein the automatic updating rule comprises whether an automatic updating function is started or not, if yes, entering a step S2, and if no, not automatically updating;
the automatic updating rule also comprises an IP address, updating time, updating message sending, host model, client information and a blacklist of the CPLD remote server, wherein the updating message sending comprises whether a user is notified before updating, whether the user is notified when the security mark of the new version CPLD firmware is wrong and whether the user is notified after updating;
s2, after the client system is powered on, running an automatic updating process, wherein the automatic updating process comprises the following steps: a firmware acquisition process, a firmware analysis process and a firmware update process; at least two client systems are provided, and each client system simultaneously performs steps S3-S12;
s3, starting the firmware obtaining process, wherein the client system obtains a release file containing firmware updating information from the CPLD remote server, analyzes the release file, judges whether CPLD firmware updating is needed, if so, enters a step S4, and if not, re-obtains the release file;
the method for judging whether CPLD firmware updating is needed comprises the following steps: after the release file is successfully analyzed, the firmware obtaining process searches whether the release file contains the host model or client information of the client system or not, and whether the new version CPLD firmware is not in the automatic updating rule blacklist or not, if so, the CPLD firmware needs to be updated; if one item is NO, CPLD firmware updating is not needed;
s4, downloading the current latest new version CPLD firmware from the CPLD remote server according to the IP address of the CPLD remote server by the firmware acquisition process, and storing the CPLD firmware position in a readable and writable memory of the client system, wherein the firmware acquisition process is completed;
s5, the client system checks whether the new version of CPLD firmware is complete, if so, the step S I is entered; if not, removing the new version CPLD firmware, and returning to the step S4;
if the accumulated three times are no, adding the new version CPLD firmware into an automatic updating rule blacklist, and returning to the step S3;
s I, starting a firmware analysis process, wherein the firmware analysis process analyzes a safety mark built in the CPLD firmware of the new version and judges whether the safety mark is correct, and if so, the step S6 is entered; if not, adding the version number of the new version CPLD firmware into an automatic updating rule blacklist, removing the new version CPLD firmware stored in the readable and writable memory, sending information by an updating message sending function to remind a user, and returning to the step S3;
if the security mark is wrong, unknown firmware is mixed in the CPLD firmware of the new version;
s6, judging whether to update the firmware by the firmware analysis process, if yes, entering a step S7, if not, adding the version number of the new version CPLD firmware into an automatic update rule blacklist, removing the new version CPLD firmware stored in the readable and writable memory, and returning to the step S3;
the method for judging whether the firmware analysis process automatically updates or not comprises the following steps: if the version number of the new version CPLD firmware is newer than the firmware version number of the local CPLD chip and the timestamp of the new version CPLD firmware is newer than the timestamp of the CPLD chip on the client system, updating is needed; if any item is negative, no update is needed;
s7, if the user selects to start the updating function before the updating is started in the automatic updating rule, the client system runs a firmware updating process and informs the user that the new version of CPLD firmware is downloaded; judging whether the client selects self-updating, if so, adding the version number of the new version CPLD firmware into an automatic updating rule blacklist, and returning to the step S3; if not, go to step S8;
s8, the firmware analysis process analyzes the new version CPLD firmware, acquires the information of the local CPLD chip through the firmware updating circuit, judges whether the new version CPLD firmware can be used for updating the local CPLD chip, and if so, enters a step S9, and the firmware analysis process is completed; if not, adding the version number of the new version CPLD firmware into an automatic updating rule blacklist, removing the new version CPLD firmware stored in the readable and writable memory, and returning to the step S3;
firmware update circuits include, but are not limited to, SPI, I2C, and JTAG;
the method for judging whether the CPLD firmware with the new version is available for updating the local CPLD chip comprises the following steps: comparing the analyzed new version CPLD firmware with the local CPLD chip information and judging;
s9, running a firmware updating process, wherein the firmware updating process judges whether the client system is idle, if so, the updating state is set to be started, and the step S10 is entered, if not, the updating state is set to be waiting, and the judgment of whether the client system is idle is continued until the client system is idle;
s10, the firmware updating process writes the firmware data analyzed in the step S8 into a local CPLD chip through a firmware updating circuit, updates and returns firmware updating response information, and the firmware updating process judges whether the updating response is successful or not, if so, the updating is continued, if not, the firmware updating circuit writing is re-executed and counting is started, and whether the updating response is successful or not is continued; if the response information is successfully updated for three times, adding the version number of the new version CPLD firmware into an automatic updating rule blacklist;
if the user selects to send the update message in the automatic update rule, notifying the user that the CPLD firmware update fails;
returning to the step S3;
s11, the automatic updating process reads the CPLD firmware version updated by the local CPLD chip through the firmware updating circuit, and confirms whether the version of the CPLD firmware is the version of the new version;
if the user selects to send the update message in the automatic update rule, notifying the user that the automatic update of the CPLD firmware of the current version is completed;
returning to the step S3, the automatic updating is continued.
Example 2
As shown in fig. 1-2, the invention relates to an automatic updating method of a CPLD firmware, which consists of a remote server (1) and a client system (2), wherein the client system (2) is divided into an automatic updating process (3) of an SOC, a firmware updating circuit (SPI/I2C/JTAG) 4, a CPLD chip (5) and a readable and writable memory (6).
The control logic of the invention is as follows:
(1) The user configures an automatic updating rule, the IP address of the CPLD remote server, the updating time, the updating message transmission, the host model, the client information, the blacklist, whether an automatic updating function is started, whether the user is notified before updating, and the like;
(2) When the automatic updating function is started in the automatic updating rule configured by the user, the client system (2) starts to run the automatic updating process (3) after power-on. The automatic updating process (3) can be divided into a firmware obtaining process, a firmware analyzing process and a firmware updating process, wherein the firmware analyzing process and the firmware updating process are divided into 3 subprocesses;
(3) An operation firmware obtaining process on a client system (2) obtains a release file containing firmware update information from a remote server (1) through an automatic update rule configured by a user, analyzes the release file, judges whether a host model, customer information and other matched CPLD firmware update information exists, if the release file is successfully analyzed and a new version of CPLD firmware which is available but not in an automatic update rule blacklist exists, then executing a step (4), otherwise, executing a step (3);
(4) An automatic updating process (3) of the client system (2) enables a firmware obtaining process to download the current latest CPLD firmware from a remote server, the current latest CPLD firmware is stored in a readable and writable memory (6) to store the CPLD firmware position, the automatic updating process (3) finishes the firmware obtaining process and checks the integrity of the CPLD firmware of the version at the same time, if the verification is correct, the step (5) is executed, if the verification is correct, the CPLD firmware stored in the CPLD firmware position in the current readable and writable memory (6) is removed, the step (4) is skipped, after the 3 times of repeated failure, the CPLD firmware of the version is added into a blacklist, and then the step (3) is skipped;
(5) An automatic updating process (3) of the client system (2) enables a CPLD firmware analysis process to analyze the CPLD firmware of a new version, analyzes a security mark built in the firmware, avoids unknown or tampered firmware from being mixed in, threatens the security of a host, if the security mark is correct, continues to execute the step (6), if the security mark is correct, adds the version firmware into a blacklist, removes the CPLD firmware stored in a readable and writable memory (6) for storing the CPLD firmware, and an updating message sending function in an automatic updating rule configured by a user sends the information to remind the user.
(6) The firmware analysis process judges whether CPLD firmware needs to be updated according to whether the firmware version number of CPLD firmware update information is larger than the firmware version number of the CPLD chip on the client system (2); meanwhile, checking whether the CPLD firmware generating time stamp is more updated than the existing CPLD firmware time stamp, if yes, continuing the step (7), otherwise, adding the CPLD firmware of the version into a blacklist, removing the CPLD firmware stored in a readable and writable memory (6) for storing the CPLD firmware, and jumping to the step (3);
(7) When the user-configured automatic update rule is started and the user is notified of the function before update, the client system (2) runs a firmware update process to notify the user that the latest CPLD firmware has been downloaded, if the client selects self-update, the CPLD firmware version is added to the blacklist, and then step (3) is executed. Otherwise, executing the step (8);
(8) A CPLD firmware analysis process of the client system (2) analyzes CPLD firmware in a CPLD firmware storage position of a readable and writable memory (6); obtaining information of a local CPLD chip (5) through a firmware update circuit (SPI/I2C/JTAG.) (4), comparing the information with the analyzed CPLD firmware information, confirming that the CPLD firmware can be used for updating the CPLD chip (5), continuing the step (9), if the comparison fails, adding the CPLD firmware of the version into a blacklist, removing the CPLD firmware stored in a readable and writable memory (6) for storing the CPLD firmware, and jumping to the step (3);
(9) The CPLD firmware updating process of the client system (2) judges whether the client system (2) is in an idle state at present, if so, the updating state is set to be started, the step (10) is continued, otherwise, the updating state is set to be waited until the client system (2) is in the idle state or restarted, and the step (10) is continued.
(10) Writing the analyzed firmware data into a CPLD chip (5) by a CPLD firmware updating process of a client system (2) through a firmware updating circuit (SPI/I2C/JTAG.) (4) to update, returning firmware updating response information, and judging that the response information is successful by the firmware updating process, continuing the step (11), otherwise repeating the step (10) for 3 times, if the step still fails, adding the CPLD firmware of the version into a blacklist, removing the CPLD firmware stored in a readable and writable memory (6) for storing the CPLD firmware, then notifying a user that the CPLD firmware fails to update according to an updating message sending function in an automatic updating rule configured by the user, and jumping to the step (3);
(11) The client system (2) automatically updates the process (3) and reads the CPLD firmware version after the CPLD chip (5) is updated currently through a firmware update circuit (SPI/I2C/JTAG.) (4), confirms whether the CPLD firmware is the current updated version or not, and sends the CPLD update result to a user according to an update message sending function in an automatic update rule configured by the user, and jumps to the step (3).
The foregoing is only a preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art, who is within the scope of the present invention, should make equivalent substitutions or modifications according to the technical scheme of the present invention and the inventive concept thereof, and should be covered by the scope of the present invention.

Claims (10)

1. An automatic updating method of CPLD firmware is characterized in that: the method comprises the following steps:
s1, configuring an automatic updating rule by a user, wherein the automatic updating rule comprises whether an automatic updating function is started or not, if yes, entering a step S2, and if no, not automatically updating;
s2, after the client system is powered on, running an automatic updating process, wherein the automatic updating process comprises the following steps: a firmware acquisition process, a firmware analysis process and a firmware update process;
s3, the firmware obtaining process starts to run, the client system obtains a release file containing firmware updating information from a CPLD remote server and analyzes the release file, judges whether CPLD firmware updating is needed, if so, the step S4 is entered, and if not, the release file is obtained again;
s4, the firmware obtaining process downloads the current latest new version CPLD firmware from the CPLD remote server according to the IP address of the CPLD remote server and stores the current latest new version CPLD firmware in a readable and writable memory of the client system to store the CPLD firmware position, and the firmware obtaining process is completed;
s5, the client system checks whether the new version CPLD firmware is complete, and if so, the step S6 is entered; if not, removing the CPLD firmware with the new version, and returning to the step S4;
if the accumulated three times are no, adding the new version CPLD firmware into an automatic updating rule blacklist, and returning to the step S3;
s6, starting the firmware analysis process, analyzing the new version CPLD firmware by the firmware analysis process, judging whether to update the firmware, if yes, entering a step S7, if not, adding the version number of the new version CPLD firmware into the automatic updating rule blacklist, removing the new version CPLD firmware stored in the readable and writable memory, and returning to the step S3;
s7, if the user selects to start the update before notifying the user function in the automatic update rule, the client system runs a firmware update process and notifies the user that the new version CPLD firmware is downloaded; judging whether a customer selects self-updating, if so, adding the version number of the new version CPLD firmware into the automatic updating rule blacklist, and returning to the step S3; if not, go to step S8;
s8, the firmware analysis process analyzes the new version CPLD firmware, acquires local CPLD chip information through a firmware updating circuit, judges whether the new version CPLD firmware can be used for updating the local CPLD chip, and if so, enters a step S9, and the firmware analysis process is completed; if not, adding the version number of the new version CPLD firmware into the automatic updating rule blacklist, removing the new version CPLD firmware stored in the readable and writable memory, and returning to the step S3;
s9, the firmware updating process runs, the firmware updating process judges whether the client system is idle, if yes, the updating state is set to be started, the step S10 is entered, if no, the updating state is set to be waiting, and whether the client system is idle is continuously judged until the client system is idle;
s10, the firmware updating process writes the firmware data analyzed in the step S8 into the local CPLD chip through the firmware updating circuit to update and return firmware updating response information, the firmware updating process judges whether the updating response is successful or not, if so, the updating is continued, if not, the firmware updating circuit writing is re-executed and counting is started, and whether the updating response is successful or not is continued; if the response information is successfully updated for three times, adding the version number of the CPLD firmware with the new version into the automatic updating rule blacklist;
if the user selects to send the update message in the automatic update rule, notifying the user that the CPLD firmware update fails;
returning to the step S3;
s11, the automatic updating process reads the CPLD firmware version updated by the local CPLD chip through the firmware updating circuit, and confirms whether the version of the CPLD firmware is the version of the new version;
if the user selects to send the update message in the automatic update rule, notifying the user that the automatic update of the CPLD firmware of the current version is completed;
returning to the step S3, the automatic updating is continued.
2. The method for automatically updating CPLD firmware according to claim 1, wherein: step S5 and step S6 also include step S I:
s I, when the new version CPLD firmware is complete, starting the firmware analysis process, and analyzing the security mark built in the new version CPLD firmware by the firmware analysis process and judging whether the security mark is correct or not, if so, entering a step S6; if not, adding the version number of the new version CPLD firmware into the automatic updating rule blacklist, removing the new version CPLD firmware stored in the readable and writable memory, sending information by the updating message sending function to remind a user, and returning to the step S3.
3. The method for automatically updating CPLD firmware according to claim 2, wherein: in step S I, if the security mark is wrong, unknown firmware is mixed into the new version CPLD firmware.
4. The method for automatically updating CPLD firmware according to claim 1, wherein: in step S1, the automatic update rule further includes an IP address, update time, update message transmission, host model, client information, and blacklist of the CPLD remote server.
5. The method for automatically updating CPLD firmware according to claim 4, wherein: the update message transmission includes whether the user is notified before the update, whether the user is notified when the security flag of the new version CPLD firmware is wrong, and whether the user is notified after the update.
6. The method for automatically updating CPLD firmware according to claim 1, wherein: in step S3, the method for determining whether the CPLD firmware update is needed is as follows: after the release file is successfully analyzed, the firmware obtaining process searches whether the release file contains the host model or the client information of the client system, whether the CPLD firmware of the new version is not in an automatic updating rule blacklist or not, and if so, CPLD firmware updating is needed; if one is negative, no CPLD firmware update is required.
7. The method for automatically updating CPLD firmware according to claim 1, wherein: in step S6, the method for determining whether to perform automatic update by the firmware analysis process includes: if the version number of the new version CPLD firmware is newer than the firmware version number of the local CPLD chip and the timestamp of the new version CPLD firmware is newer than the timestamp of the CPLD chip on the client system, updating is needed; if either item is negative, no update is required.
8. The method for automatically updating CPLD firmware according to claim 1, wherein: in step S8, the firmware update circuit includes, but is not limited to, SPI, I2C, and JTAG.
9. The method for automatically updating CPLD firmware according to claim 1, wherein: in step S8, the method for determining whether the new version CPLD firmware is available for updating the local CPLD chip is as follows: and comparing the analyzed CPLD firmware with the local CPLD chip information and judging.
10. The method for automatically updating CPLD firmware according to claim 1, wherein: in step S2, there are at least two client systems, and each client system performs steps S3 to S12 simultaneously.
CN202210965554.XA 2022-08-12 2022-08-12 Automatic updating method of CPLD firmware Active CN115454465B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210965554.XA CN115454465B (en) 2022-08-12 2022-08-12 Automatic updating method of CPLD firmware

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210965554.XA CN115454465B (en) 2022-08-12 2022-08-12 Automatic updating method of CPLD firmware

Publications (2)

Publication Number Publication Date
CN115454465A CN115454465A (en) 2022-12-09
CN115454465B true CN115454465B (en) 2023-04-25

Family

ID=84297726

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210965554.XA Active CN115454465B (en) 2022-08-12 2022-08-12 Automatic updating method of CPLD firmware

Country Status (1)

Country Link
CN (1) CN115454465B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101674590A (en) * 2009-09-29 2010-03-17 中兴通讯股份有限公司 Client device and remote updating method and remote updating service system thereof
CN102662699A (en) * 2012-03-27 2012-09-12 惠州Tcl移动通信有限公司 Method for updating NFC (Near Field Communication) firmware of mobile terminal and mobile terminal
CN106970778A (en) * 2017-03-20 2017-07-21 中国科学院长春光学精密机械与物理研究所 A kind of Configuration Online method and system of the embedded device based on FPGA
CN110515641A (en) * 2019-08-30 2019-11-29 西安易朴通讯技术有限公司 The update method of server firmware, apparatus and system
CN111966371A (en) * 2020-07-25 2020-11-20 苏州浪潮智能科技有限公司 Method, system, device and storage medium for avoiding error in updating CPLD version
CN112148326A (en) * 2020-08-31 2020-12-29 山东省科学院自动化研究所 Remote updating method, device and system for Internet of things equipment firmware
CN113703792A (en) * 2021-08-18 2021-11-26 苏州浪潮智能科技有限公司 Firmware remote upgrade test method, device, server and medium
CN114115984A (en) * 2021-12-10 2022-03-01 百信信息技术有限公司 Server firmware upgrading method, storage device and terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105677344A (en) * 2016-01-05 2016-06-15 英业达科技有限公司 Updating system of firmware of complex programmable logic device and updating method of updating system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101674590A (en) * 2009-09-29 2010-03-17 中兴通讯股份有限公司 Client device and remote updating method and remote updating service system thereof
CN102662699A (en) * 2012-03-27 2012-09-12 惠州Tcl移动通信有限公司 Method for updating NFC (Near Field Communication) firmware of mobile terminal and mobile terminal
CN106970778A (en) * 2017-03-20 2017-07-21 中国科学院长春光学精密机械与物理研究所 A kind of Configuration Online method and system of the embedded device based on FPGA
CN110515641A (en) * 2019-08-30 2019-11-29 西安易朴通讯技术有限公司 The update method of server firmware, apparatus and system
CN111966371A (en) * 2020-07-25 2020-11-20 苏州浪潮智能科技有限公司 Method, system, device and storage medium for avoiding error in updating CPLD version
CN112148326A (en) * 2020-08-31 2020-12-29 山东省科学院自动化研究所 Remote updating method, device and system for Internet of things equipment firmware
CN113703792A (en) * 2021-08-18 2021-11-26 苏州浪潮智能科技有限公司 Firmware remote upgrade test method, device, server and medium
CN114115984A (en) * 2021-12-10 2022-03-01 百信信息技术有限公司 Server firmware upgrading method, storage device and terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
穆超等.基于数字证书识别及校验的物联网固件安全检测系统的设计与实现.山东科学.2020,(第04期),全文. *

Also Published As

Publication number Publication date
CN115454465A (en) 2022-12-09

Similar Documents

Publication Publication Date Title
CN108196878B (en) Method and device for generating application program installation package, electronic equipment and storage medium
CN107193607B (en) Method and apparatus for updating code file, storage medium, processor, and terminal
CN108446128A (en) A kind of method for upgrading software and device
CN103309693A (en) Complex programmable logic device updating method and system
CN112231228A (en) Firmware upgrade test method, device, platform, equipment and storage medium
CN110647340A (en) Complex programmable logic device CPLD upgrading method and CPLD
CN109002305B (en) Method and system for updating equipment program
CN111371610A (en) Network card firmware batch refreshing method, system, terminal and storage medium
CN104317685A (en) Starting method of calculator system
CN115454465B (en) Automatic updating method of CPLD firmware
CN113703792A (en) Firmware remote upgrade test method, device, server and medium
CN109582334B (en) Upgrading method and device for programmable logic device
CN107203471B (en) Joint debugging method, service platform and computer storage medium
KR100284430B1 (en) Program update method and device
CN106708541A (en) Version upgrading processing method and apparatus
CN108833128A (en) A kind of method that equipment updates
CN112765041A (en) Game automatic testing method and device and electronic equipment
CN114138312A (en) Upgrade test method, device, electronic equipment and computer readable storage medium
CN105282614B (en) A kind of upgrade method of module TV, module TV and upgrade-system
CN115372803B (en) Motherboard test system, method, device and storage medium
CN115437674B (en) Firmware upgrading method, device, medium and electronic equipment
CN114793196B (en) Firmware upgrading method, device, equipment and storage medium
CN111949278B (en) Method, system, terminal and storage medium for automatically installing MCS system
CN113821237A (en) Server whole environment firmware upgrading method, system, terminal and storage medium
CN113971035A (en) Method for checking differential upgrade package and computer equipment

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