CN109144532B - Upgrading method and device - Google Patents

Upgrading method and device Download PDF

Info

Publication number
CN109144532B
CN109144532B CN201710445482.5A CN201710445482A CN109144532B CN 109144532 B CN109144532 B CN 109144532B CN 201710445482 A CN201710445482 A CN 201710445482A CN 109144532 B CN109144532 B CN 109144532B
Authority
CN
China
Prior art keywords
epld
program
storage area
epld program
storing
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
CN201710445482.5A
Other languages
Chinese (zh)
Other versions
CN109144532A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201710445482.5A priority Critical patent/CN109144532B/en
Publication of CN109144532A publication Critical patent/CN109144532A/en
Application granted granted Critical
Publication of CN109144532B publication Critical patent/CN109144532B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Landscapes

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

Abstract

The invention provides an upgrading method and a device, wherein the method comprises the following steps: detecting whether a download identifier of an EPLD program of a second erasable and editable logic device exists in a standby information area for storing state information of a standby storage area, wherein the second EPLD program is an upgrading version of a first EPLD program, the first EPLD program is a version to be upgraded, and the standby storage area is used for storing the second EPLD program; if the detection result is yes, performing test running on the second EPLD program; in the event that the commissioning of the second EPLD program is successful, the second EPLD program is activated. The invention can solve the problem that the veneer can not normally run because the EPLD program is available after being activated after upgrading can not be ensured in the related technology, and simultaneously realizes the selection of the upgrading version to achieve the effect of ensuring the starting reliability of the EPLD.

Description

Upgrading method and device
Technical Field
The invention relates to the field of communication, in particular to an upgrading method and device.
Background
At present, when a single board needs to upgrade an Erasable Programmable Logic Device (EPLD), the program is directly written into an ISF (In System Flash) In the EPLD by downloading via a Low pin count LPC (Low pin count Bus) Bus. This requires that when the board needs to upgrade the EPLD program, the engineer must go to the site to perform the operation. And a plurality of equipment single boards are distributed in various places around the world, and when a plurality of single boards at a plurality of sites need to upgrade the EPLD program, a large amount of manpower and material resources are consumed. And the original upgrading mode is used for carrying out the board pulling operation in many times, and the normal work of the whole network element can be influenced in the board pulling process, so that the conditions of service interruption and the like can be caused. And when the upgraded EPLD program cannot normally run, the board cannot normally start here, and the board cannot normally run again because the original EPLD program has been erased.
In document CN200810141637.7, a method for remotely upgrading network element software is provided, but this method is not suitable for remote upgrading of EPLD, and the implementation of EPLD remote upgrade must fully consider the selection and starting of EPLD operation area after the upgrade is completed. However, the method does not consider the selection and starting of the EPLD operation region after the upgrade is completed, and the method also has no rollback function.
Therefore, the related art cannot ensure that the EPLD program is available after being activated after the upgrade, which may cause the problem that the board may not run normally.
Disclosure of Invention
The embodiment of the invention provides an upgrading method and device, which at least solve the problem that a single board may not normally run due to the fact that the EPLD program is available after being activated and cannot be guaranteed in related technologies.
According to an embodiment of the present invention, there is provided an upgrade method including: detecting whether a download identifier of a second erasable and editable logic device (EPLD) program exists in a standby information area for storing state information of a standby storage area, wherein the second EPLD program is an upgrade version of a first EPLD program, the first EPLD program is a version to be upgraded, and the standby storage area is used for storing the second EPLD program; if the detection result is yes, performing test running on the second EPLD program; and activating the second EPLD program when the trial run on the second EPLD program is successful.
Optionally, before detecting whether the download identifier of the second EPLD program exists in the spare information area for storing the status information of the spare storage area, the method further includes: receiving an upgrading command which is sent by a network element control panel NCP and used for indicating the first EPLD program for upgrading the EPLD; according to the upgrading command, acquiring a second EPLD program and writing the second EPLD program into a standby storage area in a memory of the EPLD, wherein the memory is used for storing the EPLD program; and setting a download identifier of the second EPLD program in the information preparation area.
Optionally, in a case where the commissioning of the second EPLD program is successful, activating the second EPLD program includes: under the condition that the trial operation of the second EPLD program is successful, sending a message of successful trial operation to the NCP; receiving an activation command sent by the NCP to activate the second EPLD program; and according to the activation command, activating the second EPLD program by switching the standby storage area to the main storage area, wherein the main storage area is used for storing the first EPLD program.
Optionally, before receiving the upgrade command sent by the NCP to instruct to upgrade the first EPLD program, the method further includes: partitioning a storage area of the memory, wherein the storage area is at least partitioned into: the system comprises an EPLD program, a main storage area for storing the EPLD program, a spare storage area for storing the EPLD program, a main information area for storing the state information of the main storage area and a spare information area for storing the state information of the spare storage area.
Optionally, in a case that the commissioning of the second EPLD program is successful, before activating the second EPLD program, the method further includes: judging whether an LPC programming identifier exists in a Flash ISF in the EPLD system; under the condition that the judgment result is negative, updating the second EPLD program into the ISF; and performing test running on the second EPLD program in the ISF.
Optionally, obtaining the second EPLD program and writing the second EPLD program into a spare storage area in a memory of the EPLD for storing the EPLD program according to the upgrade command includes: downloading the second EPLD program from a CF card of a storage device according to the storage position information of the second EPLD program in the upgrading command; writing the second EPLD program to a spare storage area in a memory of the EPLD that is to store the EPLD program.
Optionally, the memory for the EPLD program is Flash.
According to another embodiment of the present invention, there is provided an upgrade apparatus including:
a detection module, configured to detect whether a download identifier of an EPLD program of a second erasable and editable logic device exists in a spare information area used for storing status information of a spare storage area, where the second EPLD program is an upgrade version of a first EPLD program, the first EPLD program is a version to be upgraded, and the spare storage area is used for storing the second EPLD program; the trial operation module is used for performing trial operation on the second EPLD program under the condition that the detection result is yes; and the activation module is used for activating the second EPLD program under the condition that the trial run of the second EPLD program is successful.
Optionally, the activation module is further configured to send a message that the commissioning is successful to the NCP if the commissioning of the second EPLD program is successful; receiving an activation command sent by the NCP to activate the second EPLD program; and according to the activation command, activating the second EPLD program by switching the standby storage area to the main storage area, wherein the main storage area is used for storing the first EPLD program.
Optionally, the detection module is further configured to partition a storage area of the memory, and partition the storage area into at least: the system comprises an EPLD program, a main storage area for storing the EPLD program, a spare storage area for storing the EPLD program, a main information area for storing the state information of the main storage area and a spare information area for storing the state information of the spare storage area.
According to yet another embodiment of the present invention, there is also provided a storage medium including a stored program, wherein the program performs any one of the above methods when executed.
According to yet another embodiment of the present invention, there is also provided a processor for executing a program, wherein the program executes to perform the method of any one of the above.
The method comprises the steps of detecting whether a download identifier of an EPLD program of a second erasable and editable logic device exists in a standby information area for storing state information of a standby storage area, wherein the second EPLD program is an upgrade version of a first EPLD program, the first EPLD program is a version to be upgraded, and the standby storage area is used for storing the second EPLD program; if the detection result is yes, performing test running on the second EPLD program; in the event that the commissioning of the second EPLD program is successful, the second EPLD program is activated. The method comprises the steps that a standby information area used for storing state information of a standby storage area is divided, a downloading identification of a second EPLD program of an upgrade version is recorded in the information area, so that the fact that a single board downloads the upgrade version of a first EPLD nearly can be known according to the identification, the upgrade version can be selected, after the second EPLD program of the upgrade version is obtained, the second EPLD program is not directly activated but is firstly subjected to trial run, and the second EPLD program is activated only after the trial run is successful, so that the second EPLD program after being activated can be enabled to be available. Therefore, the problem that the veneer possibly cannot normally run because the EPLD program is available after being activated cannot be guaranteed in the related technology can be solved, the selection of the upgrade version is realized, and the effect of guaranteeing the starting reliability of the EPLD is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware structure of a board of an upgrade method according to an embodiment of the present invention;
FIG. 2 is a flow diagram of an upgrade method according to an embodiment of the present invention;
FIG. 3 is a general block diagram of user interaction with an NCP, according to an embodiment of the invention;
FIG. 4 is a diagram of flash partitions according to an embodiment of the invention;
FIG. 5 is a schematic flow diagram of an EPLD upgrade process according to an embodiment of the present invention;
FIG. 6 is a flow chart illustrating the operation of the EPLD program in the ISF A area according to an embodiment of the present invention;
FIG. 7 is a diagram illustrating an EPLD program in a trial run Flash according to an embodiment of the present invention;
FIG. 8 is a diagram illustrating an EPLD program in Flash according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of a BOOT processing EPLD upgrade processing procedure according to an embodiment of the present invention;
FIG. 10 is a schematic diagram of remote upgrade order processing according to an embodiment of the present invention;
fig. 11 is a schematic diagram of remote commissioning command processing according to an embodiment of the present invention;
FIG. 12 is a schematic diagram of remote activate command processing according to an embodiment of the invention;
fig. 13 is a block diagram of the structure of an upgrade apparatus according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the drawings and embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Example 1
The method provided by the first embodiment of the present application may be executed in a single board or a similar computing device. Taking the operation on a single board as an example, fig. 1 is a block diagram of a hardware structure of a single board of an upgrade method according to an embodiment of the present invention. As shown in fig. 1, board 10 may include one or more (only one shown) processors 102 (processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the electronic device. For example, veneer 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store software programs and modules of application software, such as program instructions/modules corresponding to the upgrading method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 104 may further include memory disposed with respect to processor 102, which may be connected to board 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. The specific example of the network described above may include a wireless network provided by a communications provider of the single board 10. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet via wireless.
In this embodiment, an upgrade method operating on the above single board is provided, and fig. 2 is a flowchart of the upgrade method according to the embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
step S202, detecting whether a download identifier of a second erasable and editable logic device EPLD program exists in a standby information area for storing state information of a standby storage area, wherein the second EPLD program is an upgrade version of a first EPLD program, the first EPLD program is a version to be upgraded, and the standby storage area is used for storing the second EPLD program;
step S204, if the detection result is yes, the second EPLD program is trial run;
in step S206, the second EPLD program is activated when the trial run of the second EPLD program is successful.
Through the steps, the standby information area used for storing the state information of the standby storage area is divided, the download identification of the second EPLD program of the upgrade version is recorded in the information area, so that the situation that the single board downloads the upgrade version of the first EPLD recently can be known according to the identification, the upgrade version is selected, after the second EPLD program of the upgrade version is obtained, the second EPLD program is not directly activated but is firstly subjected to trial run, and the second EPLD program is activated only after the trial run is successful, so that the second EPLD program after being activated can be ensured to be available. Therefore, the problem that the veneer possibly cannot normally run because the EPLD program is available after being activated cannot be guaranteed in the related technology can be solved, the selection of the upgrade version is realized, and the effect of guaranteeing the starting reliability of the EPLD is achieved.
Optionally, before detecting whether the download identifier of the second EPLD program exists in the spare information area for storing the status information of the spare storage area, the method further includes: receiving an upgrading command which is sent by a Network element Control Processor (NCP) and used for indicating that a first EPLD program of the EPLD is upgraded; according to the upgrading command, acquiring a second EPLD program and writing the second EPLD program into a standby storage area in a memory of the EPLD, wherein the memory is used for storing the EPLD program; and setting a download identifier of the second EPLD program in the spare information area. Wherein, the memory used for the EPLD program can be Flash;
optionally, in the case that the commissioning of the second EPLD program is successful, activating the second EPLD program comprises: under the condition that the trial operation of the second EPLD program is successful, sending a message of successful trial operation to the NCP; receiving an activation command sent by the NCP to activate the second EPLD program; and according to the activation command, activating the second EPLD program by switching the standby storage area to the main storage area, wherein the main storage area is used for storing the first EPLD program. Through the above steps, only after the second EPLD program is successfully commissioned, the storage where the second EPLD program is located is set as the main storage area, so that, if the second EPLD program after being upgraded fails to commissioned, the main storage area and the standby storage area are not switched, so that the single board can continue to run the first EPLD program, and therefore, when the EPLD program after being upgraded is activated and is unavailable, the single board can still run normally.
Optionally, before receiving an upgrade command sent by the NCP for instructing to upgrade the first EPLD program, the method further includes: partitioning a storage area of a memory, wherein the storage area is at least partitioned into: the system comprises an EPLD program, a main storage area for storing the EPLD program, a spare storage area for storing the EPLD program, a main information area for storing the state information of the main storage area and a spare information area for storing the state information of the spare storage area. For example, a Flash storage area for storing an EPLD program on a single board is used, two areas are divided from the Flash storage area as main and standby storage areas of the EPLD program, persistent storage after power failure is realized, and two areas are further divided from the Flash storage area as main and standby information areas of the EPLD program, where the main and standby information areas are mainly used for storing state information of the main and standby EPLD storage areas, including main and standby state flags, version upgrade time, a commissioning flag, a version storage area start address, an upgrade flag, an EPLD version number, a CRC check value, and other information. The main and standby EPLD program selection control can be realized through the partitions.
Optionally, in a case that the commissioning of the second EPLD program is successful, before activating the second EPLD program, the method further includes: judging whether LPC programming identification exists in Flash ISF in the EPLD system; under the condition that the judgment result is negative, updating the second EPLD program into the ISF; the second EPLD program is commissioned in the ISF.
Optionally, before determining whether the LPC writing identifier exists in the Flash ISF in the EPLD system, the method further includes: judging whether a main EPLD identifier exists in the main and standby information areas, if a representative single board is not used for the first time and an operating program exists, judging whether an LPC programming identifier exists in a Flash ISF in an EPLD system; if the judgment result is yes, operating an EPLD program in the ISF; under the condition that the judgment result is negative, updating the second EPLD program into the ISF; the second EPLD program is commissioned in the ISF. If the main/standby information area has no main EPLD identifier, the single board is used for the first time, the EPLD program in the ISF is operated, the EPLD program is updated to the main/standby storage area, and the relevant state information of the relevant main/standby storage area is updated to the main/standby information area.
For example, after the single board is powered on and started, a memory (Flash) for storing the EPLD program is initialized, and the Flash is partitioned. After the first operation program BOOT after the single board is powered on is started, it is first judged whether a main EPLD identifier exists in the partitioned EPLD information area. When the main mark exists, judging whether an LPC programming mark exists, and if the LPC programming mark exists, operating an EPLD in the ISF; if not, the above-mentioned EPLD program of the memory for storing the EPLD program is run while the EPLD program in the ISF is updated. And if the main state mark does not exist, operating the EPLD in the ISF, and updating the EPLD program and the EPLD information area information in the EPLD program memory.
The above-described embodiments achieve the upgrading of the EPLD version by using the effective cooperation of the EPLD and BOOT version information areas.
Optionally, according to the upgrade command, acquiring the second EPLD program and writing the second EPLD program to the spare storage area in the memory of the EPLD for storing the EPLD program includes: downloading the second EPLD program from a storage device (Compact Flash, CF for short) card according to the storage position information of the second EPLD program in the upgrading command; the second EPLD program is written to a spare storage area in the EPLD's memory for storing the EPLD program.
For example, logging in the NCP main control board through a file transfer protocol (ftp) in a network, and transferring the EPLD program upgrade version file to the CF card of the main control board. Then, the system logs in to the NCP through telnet, and issues an update EPLD program command to the board through a Serial Communication Port (S Port for short). The single board carries out downloading processing after receiving the upgrading command, and finally writes the EPLD program upgrading version file into a standby storage area in the EPLD Flash.
For another example, after the downloading is completed, the NCP issues a test run command and an activate command to set the EPLD area for storing the upgrade as the primary storage area, and configures a BOOT selection flag of the BOOT in the ISF. And when the test operation fails, the original EPLD version is used as the main use through a rollback mechanism, and the information of the information area is updated.
The above embodiments are described in detail below with reference to the accompanying drawings by taking EPLD remote upgrade as an example.
The realization of the EPLD remote upgrade function requires the cooperation of the single board BOOT side software, the single board application side software and the NCP application software. The three parts belong to different operation stages and different CPU spaces. The single board BOOT software and the single board application software carry out data communication through the memory, and the single board software (including the BOOT software and the single board application software) carries out data communication with the NCP through the S port. The user interacts with the NCP through telnet/ftp based on TCP/IP protocol, the general block diagram of which is shown in fig. 3.
The implementation process is as follows:
1. and compiling to generate an EPLD program EPZ file, calculating the size and the CRC value of the EPZ file after compiling is finished, and writing the EPZ file into the EPZ file to be used as an LPC download mark (in order to be compatible with the original upgrading mode).
2. After the single board is started, the Flash storing the EPLD program is initialized and partitioned, the partition status is as shown in fig. 4, and the partitioned Flash includes: an information area A, an information area B, an EPLD program storage area A, and an EPLD program storage area B. Then, the single board BOOT software performs EPLD program selection processing. After the single board is electrified, the BOOT is started normally to operate, and EPLD upgrading processing is carried out.
Fig. 5 is a schematic diagram of an EPLD upgrade processing flow according to an embodiment of the present invention, as shown in fig. 5, determining whether a primary flag exists in an information area in the Flash, and if the primary flag does not exist, verifying that the board is used for the first time, and running an EPLD program in an ISF a area; if the main mark exists, continuously judging whether an LPC programming mark exists in the ISF A area, namely, programming the ISF through LCP, and if the LPC programming mark exists, operating an EPLD program in the ISF A area; if the LPC programming mark does not exist, the EPLD program in the Flash is operated in a trial mode, and if the trial operation is successful, the EPLD program in the Flash is activated and operated; when the current EPLD program runs normally, the BOOT processing EPLD remote upgrade processing is carried out; and finishing the whole remote upgrading process.
The schematic flow chart of the EPLD program in the above-mentioned operation ISF a area is shown in fig. 6, and firstly, it is determined whether the EPLD program in the ISF a area is normally operated, if it is normally operated, the ISF a area is set as the start area of the EPLD program, if it is not normally operated, the EPLD program in the Flash is synchronized to the ISF B area, the EPLD program in the B area is triggered to operate, and it is determined whether the EPLD program in the B area is normally operated, if it is determined that the EPLD program in the B area is normally operated, the ISF B is set as the EPLD start area, and if it is determined that the EPLD program in the B area is not normally operated, the ISF a area is still set as the EPLD start area.
The schematic diagram of the EPLD program in the Flash trial run is shown in fig. 7, and first, EPLD information is obtained from the information area, and then, whether the EPLD program area is trial run is determined according to the information, if not, the main memory area of the EPLD is designated as the running area, if yes, the EPLD trial run identifier is cleared, the EPLD information in the information area is updated, and then, the EPLD area is designated as the running area.
The schematic diagram of the EPLD program in Flash operation is shown in fig. 8, and the version numbers of the areas to be operated (main memory areas or trial operation areas) in the ISF main area and the Flash are obtained, and then, it is determined whether the version numbers are consistent?
If the judgment result is consistent, the EPLD boot area index is obtained, and it is judged whether the EPLD boot area index is the ISF B area according to the index number? If the current time is the area B, closing the EPLD watchdog and triggering the ISF area B to operate, then performing PCIE delocalization, opening the EPLD watchdog and closing the slow and fast reversal timers, then displaying the EPLD result, and starting to operate an EPLD program in Flash at the moment; and if the Flash memory is not the B area, directly reading the EPLD program in the Flash.
Under the condition that the judgment is inconsistent, after an EPLD program of a flash to-be-run area is synchronized to an ISF B area, an EPLD watchdog is closed and the ISF B area is triggered, then PCIE is released and reset, the EPLD watchdog is opened and a slow and fast reverse timer is closed, and then, is it judged whether EPLD runs successfully? When the judgment result is yes, setting the EPLD starting area as an ISF B area, and starting to run an EPLD program in Flash; and if the judgment result is negative, ending the upgrading.
As shown in fig. 9, a schematic diagram of a process of performing remote upgrade on an EPLD by BOOT processing is shown, and status information of the EPLD is obtained, whether the EPLD needs to be remotely upgraded is determined according to the status information, if yes, a related global variable of EPLD upgrade is initialized, an upgrade EPLD request is sent to the NCP, an NCP response is waited, a response is received within 8 minutes, data sent by the NCP is received, after a last packet is sent, a CRC value is checked, EPLD information is updated, and a final upgrade result is sent to the NCP.
3. And (5) carrying out single board application software side EPLD upgrading treatment.
a. Fig. 10 is a schematic diagram of processing a remote upgrade command according to an embodiment of the present invention, and as shown in fig. 10, after a single board receives an NCP remote upgrade command, it is determined whether the single board has a program in a commissioning state, and if so, an NCP upgrade failure is responded. And when the trial run program is not available, writing the download mark into an EPLD information area in the Flash, wherein if the writing is successful, the processing of the upgrade command is successful, and if the writing is failed, the processing of the upgrade command is failed.
b. Fig. 11 is a schematic diagram illustrating remote commissioning command processing according to an embodiment of the present invention, and as shown in fig. 11, after receiving an NCP commissioning command, it is determined whether a spare storage area program is abnormal and is in a commissioning state, and if one of the two is yes, an NCP commissioning failure is responded; if the two are not the same, setting a test run flag in the information area, setting a standby storage area identifier in the EPLD information area in Flash, if the setting is successful, responding to the NCP command, successfully processing, and then resetting.
c. Fig. 12 is a schematic diagram of remote activation command processing according to an embodiment of the present invention, and as shown in fig. 12, when receiving an NCP activation command, determining whether a spare storage area program is correct and in a trial operation state, if the determination result is yes, clearing a trial operation flag, setting an activation flag, writing the activation flag into an information area, setting an ISF B area as a main operation area, and simultaneously switching an EPLD main program area, and if the change identifier is successful, responding to activation is successful.
4. And the method is compatible with the processing of the original LPC downloading mode. Downloading the program to the current main ISF A area through LPC downloading default to cover the current main ISF A area EPLD program, and converting the program to the EPLD BOOT by default, namely converting the program to the first running program after the single board is electrified, wherein the area is covered by each programming.
The embodiment of the invention realizes a method for remotely upgrading an EPLD program, the remote upgrading and starting of the EPLD are controlled by the EPLD and BOOT version information areas together, the reliability of the EPLD can be completely determined by a trial running mode, and the used EPLD version in the main area is certainly an available version after the activation is successful. Moreover, the method is compatible with the original upgrading mode, can carry out remote upgrading through a network, and can use the original EPLD program through a rollback mechanism when the remote upgrading fails. Namely, the invention adds a remote upgrading method on the basis of being compatible with the existing upgrading mode.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method according to the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention or portions thereof contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
In this embodiment, an upgrading apparatus is further provided, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, and the details that have been already described are not repeated. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware or a combination of software and hardware is also possible and contemplated.
Fig. 13 is a block diagram of an upgrade apparatus according to an embodiment of the present invention, as shown in fig. 13, the apparatus including:
a detecting module 132, configured to detect whether a download identifier of a second erasable and editable logic device EPLD program exists in a spare information area for storing status information of a spare storage area, where the second EPLD program is an upgraded version of a first EPLD program, the first EPLD program is a version to be upgraded, and the spare storage area is used for storing the second EPLD program;
a test run module 134, connected to the detection module 132, for performing a test run on the second EPLD program if the detection result is yes;
and an activating module 136, connected to the commissioning module 134, for activating the second EPLD program if the commissioning of the second EPLD program is successful.
Optionally, the activating module 136 is further configured to, in a case that the commissioning of the second EPLD program is successful, send a message that the commissioning is successful to the NCP; receiving an activating command which is sent by the NCP and used for activating the second EPLD program; and according to the activation command, activating the second EPLD program by switching the standby storage area to the main storage area, wherein the main storage area is used for storing the first EPLD program.
Optionally, the detecting module 132 is further configured to partition a storage area of the memory, and partition the storage area into at least: the system comprises a main storage area for storing the EPLD program, a standby storage area for storing the EPLD program, a main information area for storing the state information of the main storage area and a standby information area for storing the state information of the standby storage area.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are located in different processors in any combination.
Example 3
An embodiment of the present invention further provides a storage medium including a stored program, where the program executes any one of the methods described above.
Alternatively, in this embodiment, the storage medium may be configured to store program codes for performing the following steps:
s1, detecting whether a download identifier of an EPLD program of a second erasable and editable logic device exists in a spare information area for storing state information of a spare storage area, wherein the second EPLD program is an upgrade version of a first EPLD program, the first EPLD program is a version to be upgraded, and the spare storage area is used for storing the second EPLD program;
s2, performing trial operation on the second EPLD program under the condition that the detection result is yes;
and S3, activating the second EPLD program under the condition that the trial run of the second EPLD program is successful.
Alternatively, in the present embodiment, the storage medium may be configured to store program codes for performing the following steps:
s1, receiving an upgrading command which is sent by a network element control panel NCP and used for indicating the upgrading of a first EPLD program of an erasable and editable logic device EPLD;
s2, acquiring a second EPLD program according to the upgrading command, and writing the second EPLD program into a standby storage area in a memory of the EPLD, wherein the memory is used for storing the EPLD program, and the second EPLD program is an upgrading version of the first EPLD program;
and S3, setting a download identifier of the second EPLD program in the standby information area.
Optionally, the storage medium is further arranged to store program code for performing the steps of: in the event that the commissioning of the second EPLD program is successful, activating the second EPLD program comprises:
s1, sending a successful trial run message to NCP under the condition that the trial run of the second EPLD program is successful;
s2, receiving an activation command which is sent by the NCP and used for activating the second EPLD program;
and S3, according to the activation command, activating the second EPLD program in a mode of replacing the standby storage area with the main storage area, wherein the main storage area is used for storing the first EPLD program.
Optionally, the storage medium is further arranged to store program code for performing the steps of: before receiving an upgrade command sent by the NCP for instructing to upgrade the first EPLD program, the method further includes:
s1, partitioning a storage area of a memory, wherein the storage area is at least partitioned into: the system comprises a main storage area for storing the EPLD program, a standby storage area for storing the EPLD program, a main information area for storing the state information of the main storage area and a standby information area for storing the state information of the standby storage area.
Optionally, the storage medium is further arranged to store program code for performing the steps of: when the second EPLD program is successfully run, before activating the second EPLD program, the method further includes:
s1, judging whether an LPC programming identifier exists in a Flash ISF in an EPLD system;
s2, under the condition that the judgment result is negative, updating the second EPLD program into the ISF;
and S3, performing test running on the second EPLD program in the ISF.
Optionally, the storage medium is further arranged to store program code for performing the steps of: according to the upgrade command, acquiring the second EPLD program and writing to the spare storage area in the EPLD's memory for storing the EPLD program includes:
s1, downloading a second EPLD program from a main control panel CF according to the storage position information of the second EPLD program in the upgrading command;
and S2, writing the second EPLD program into a spare storage area in the memory of the EPLD for storing the EPLD program.
Optionally, the storage medium is further arranged to store program code for performing the steps of:
s1, the memory used for the EPLD program is Flash.
Optionally, in this embodiment, the storage medium may include but is not limited to: various media capable of storing program codes, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide a processor configured to execute a program, where the program executes to perform any of the steps in the method.
Optionally, in this embodiment, the program is configured to perform the following steps:
s1, detecting whether a download identifier of an EPLD program of a second erasable and editable logic device exists in a spare information area for storing state information of a spare storage area, wherein the second EPLD program is an upgrade version of a first EPLD program, the first EPLD program is a version to be upgraded, and the spare storage area is used for storing the second EPLD program;
s2, performing trial operation on the second EPLD program under the condition that the detection result is yes;
and S3, activating the second EPLD program under the condition that the trial run of the second EPLD program is successful.
Optionally, in this embodiment, the program is configured to perform the following steps:
s1, receiving an upgrading command which is sent by a network element control panel NCP and used for indicating the upgrading of a first EPLD program of an erasable and editable logic device EPLD;
s2, acquiring a second EPLD program according to the upgrading command, and writing the second EPLD program into a spare storage area in a memory of the EPLD, wherein the spare storage area is used for storing the EPLD program, and the second EPLD program is an upgrading version of the first EPLD program;
and S3, setting a download identifier of the second EPLD program in the standby information area.
Optionally, in this embodiment, the program is configured to perform the following steps: in the case of successful commissioning of the second EPLD program, activating the second EPLD program comprises:
s1, sending a test run success message to NCP under the condition that the test run of the second EPLD program is successful;
s2, receiving an activation command which is sent by the NCP and used for activating the second EPLD program;
and S3, according to the activation command, activating the second EPLD program in a mode of reversing the standby storage area to the main storage area, wherein the main storage area is used for storing the first EPLD program.
Optionally, in this embodiment, the program is configured to perform the following steps: before receiving an upgrade command sent by the NCP to instruct upgrading of the first EPLD program, the method further includes:
s1, partitioning a storage area of a memory, wherein the storage area is at least partitioned into: the system comprises an EPLD program, a main storage area for storing the EPLD program, a spare storage area for storing the EPLD program, a main information area for storing the state information of the main storage area and a spare information area for storing the state information of the spare storage area.
Optionally, in this embodiment, the program is configured to execute the following steps: when the second EPLD program is successfully run, before activating the second EPLD program, the method further includes:
s1, judging whether LPC burning marks exist in Flash ISF in an EPLD system;
s2, under the condition that the judgment result is negative, updating the second EPLD program into the ISF;
and S3, performing test running on the second EPLD program in the ISF.
Optionally, in this embodiment, the program is configured to perform the following steps: according to the upgrade command, acquiring the second EPLD program and writing to the spare storage area in the EPLD's memory for storing the EPLD program includes:
s1, downloading a second EPLD program from a main control panel CF according to the storage position information of the second EPLD program in the upgrading command;
and S2, writing the second EPLD program into a spare storage area in the memory of the EPLD for storing the EPLD program.
Optionally, in this embodiment, the program is configured to perform the following steps:
s1, a memory used for the EPLD program is Flash.
Optionally, for a specific example in this embodiment, reference may be made to the examples described in the above embodiment and optional implementation, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized in a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a memory device and executed by a computing device, and in some cases, the steps shown or described may be executed out of order, or separately as individual integrated circuit modules, or multiple modules or steps thereof may be implemented as a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (12)

1. An upgrade method, comprising:
detecting whether a download identifier of a second EPLD program of an erasable and editable logic device exists in a standby information area, wherein the standby information area is used for storing state information of a standby storage area, the second EPLD program is an upgrade version of a first EPLD program, the first EPLD program is a version to be upgraded, and the standby storage area is used for storing the second EPLD program;
if the detection result is yes, performing test running on the second EPLD program;
and activating the second EPLD program when the trial run on the second EPLD program is successful.
2. The method of claim 1, further comprising, before detecting whether the download identifier of the second EPLD program exists in the spare information area for storing spare storage area status information:
receiving an upgrading command which is sent by a network element control panel NCP and used for indicating the first EPLD program for upgrading the EPLD;
according to the upgrading command, acquiring a second EPLD program and writing the second EPLD program into a standby storage area in a memory of the EPLD, wherein the memory is used for storing the EPLD program;
and setting a download identifier of the second EPLD program in the information preparation area.
3. The method of claim 2, wherein activating the second EPLD program if the commissioning of the second EPLD program is successful comprises:
under the condition that the trial operation of the second EPLD program is successful, sending a message of successful trial operation to the NCP;
receiving an activation command sent by the NCP to activate the second EPLD program;
and according to the activation command, activating the second EPLD program by switching the standby storage area to an active storage area, wherein the active storage area is used for storing the first EPLD program.
4. The method of claim 3, wherein prior to receiving the upgrade command sent by the NCP to instruct upgrading of the first EPLD program, further comprising:
partitioning a storage area of the memory, wherein the storage area is at least partitioned into: the system comprises an EPLD program, a main storage area for storing the EPLD program, a spare storage area for storing the EPLD program, a main information area for storing the state information of the main storage area and a spare information area for storing the state information of the spare storage area.
5. The method of claim 1, wherein, in the event that the commissioning of the second EPLD program is successful, prior to activating the second EPLD program, further comprising:
judging whether a low pin count LPC bus programming identification exists in a Flash ISF in the EPLD system;
under the condition that the judgment result is negative, updating the second EPLD program into the ISF;
and performing test running on the second EPLD program in the ISF.
6. The method of claim 2, wherein obtaining the second EPLD program and writing to a spare storage area in a memory of the EPLD used to store the EPLD program according to the upgrade command comprises:
downloading the second EPLD program from a CF card of a storage device according to the storage position information of the second EPLD program in the upgrading command;
writing the second EPLD program to a spare storage area in a memory of the EPLD that is to store the EPLD program.
7. The method according to claim 2, 4 or 6, wherein the memory for storing the EPLD program is Flash.
8. An upgrade apparatus, comprising:
the system comprises a detection module, a spare information area and a spare storage area, wherein the detection module is used for detecting whether a download identifier of a second EPLD program of an erasable and editable logic device exists in the spare information area, the spare information area is used for storing state information of the spare storage area, the second EPLD program is an upgrade version of a first EPLD program, the first EPLD program is a version to be upgraded, and the spare storage area is used for storing the second EPLD program;
the trial operation module is used for performing trial operation on the second EPLD program under the condition that the detection result is yes;
and the activation module is used for activating the second EPLD program under the condition that the trial run of the second EPLD program is successful.
9. The apparatus according to claim 8, wherein the activating module is further configured to send a successful commissioning message to a network element control board NCP if the commissioning of the second EPLD program is successful; receiving an activation command sent by the NCP to activate the second EPLD program; and according to the activation command, activating the second EPLD program by switching the standby storage area to an active storage area, wherein the active storage area is used for storing the first EPLD program.
10. The apparatus of claim 9, wherein the detection module is further configured to partition a storage area of a memory storing the EPLD program, the storage area being partitioned into at least: the system comprises an EPLD program, a main storage area for storing the EPLD program, a spare storage area for storing the EPLD program, a main information area for storing the state information of the main storage area and a spare information area for storing the state information of the spare storage area.
11. A storage medium, comprising a stored program, wherein the program when executed performs the method of any one of claims 1 to 7.
12. A processor, configured to run a program, wherein the program when running performs the method of any one of claims 1 to 7.
CN201710445482.5A 2017-06-13 2017-06-13 Upgrading method and device Active CN109144532B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710445482.5A CN109144532B (en) 2017-06-13 2017-06-13 Upgrading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710445482.5A CN109144532B (en) 2017-06-13 2017-06-13 Upgrading method and device

Publications (2)

Publication Number Publication Date
CN109144532A CN109144532A (en) 2019-01-04
CN109144532B true CN109144532B (en) 2023-04-11

Family

ID=64829857

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710445482.5A Active CN109144532B (en) 2017-06-13 2017-06-13 Upgrading method and device

Country Status (1)

Country Link
CN (1) CN109144532B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110096300B (en) * 2019-04-08 2023-03-14 上海赛治信息技术有限公司 FPGA program file backup management system, operation method and upgrading method
CN110286932A (en) * 2019-06-28 2019-09-27 海信(广东)空调有限公司 Program downloading method and device
CN110377303B (en) * 2019-07-10 2022-11-04 杭州洲钜电子科技有限公司 Method and equipment for upgrading program based on spare storage area mode
CN111309353B (en) * 2020-01-20 2023-05-23 超越科技股份有限公司 Method and equipment for updating operation board FPGA firmware based on server control board
CN114546456B (en) * 2020-11-24 2024-05-24 中移物联网有限公司 Upgrading method and device and electronic equipment
CN116225490B (en) * 2023-01-30 2023-12-22 无锡沐创集成电路设计有限公司 Upgrading method and upgrading device of memory firmware, electronic equipment and medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015051647A1 (en) * 2013-10-10 2015-04-16 中兴通讯股份有限公司 Firmware upgrade method and system, upper computer and optical module
CN105320534A (en) * 2014-08-01 2016-02-10 中兴通讯股份有限公司 BOOT remote updating method, BOOT remote updating device and BOOT remote updating system for single board

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015051647A1 (en) * 2013-10-10 2015-04-16 中兴通讯股份有限公司 Firmware upgrade method and system, upper computer and optical module
CN105320534A (en) * 2014-08-01 2016-02-10 中兴通讯股份有限公司 BOOT remote updating method, BOOT remote updating device and BOOT remote updating system for single board

Also Published As

Publication number Publication date
CN109144532A (en) 2019-01-04

Similar Documents

Publication Publication Date Title
CN109144532B (en) Upgrading method and device
EP2456257B1 (en) Method and system for upgrading wireless data card
CN110597542B (en) Software automatic OTA (over the air) upgrading method and device and electronic equipment
CN112612524A (en) Method, device and equipment for starting Linux system and storage medium
US10469620B2 (en) Method for transferring a new software version to at least one electricity meter via a communication network
CN112256294A (en) Deployment method, cloud platform, system and storage medium of terminal application
CN109413164B (en) Access service recovery method, device, equipment and readable storage medium
CN108989103A (en) Device upgrading method, debugger, network device and network system
CN112433739B (en) Firmware upgrading method
CN112596768A (en) Device updating method and device, storage medium and electronic device
CN112667265A (en) Method and device for updating bootstrap program
CN114840242A (en) System upgrading method and device of electronic equipment and readable storage medium
CN113452556A (en) Product skill configuration method and device, storage medium and electronic device
CN108874410B (en) Patch management method and device
CN111615030A (en) Upgrading method, device and medium for novel TWS earphone
CN114153484A (en) Operation method and device for updating program, electronic device and storage medium
CN105320534A (en) BOOT remote updating method, BOOT remote updating device and BOOT remote updating system for single board
CN113535202A (en) Charging pile upgrading method and device and charging pile system
CN104580360A (en) System and method for updating firmware through heterogeneous network
CN112099902A (en) Network adapter configuration method and device of virtual machine, electronic device and storage medium
CN118276887A (en) Set top box cross-system upgrading method and device, set top box and storage medium
CN111182070A (en) Application data backup and recovery method, device, equipment and storage medium
JP2006113754A (en) Software update device and method
CN114780122A (en) Embedded equipment firmware updating method and embedded equipment
CN107608809B (en) Exception handling method and device

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