CN115543371A - High-reliability automatic software upgrading method for embedded platform - Google Patents

High-reliability automatic software upgrading method for embedded platform Download PDF

Info

Publication number
CN115543371A
CN115543371A CN202210940389.2A CN202210940389A CN115543371A CN 115543371 A CN115543371 A CN 115543371A CN 202210940389 A CN202210940389 A CN 202210940389A CN 115543371 A CN115543371 A CN 115543371A
Authority
CN
China
Prior art keywords
client
server
upgrading
verification
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210940389.2A
Other languages
Chinese (zh)
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.)
Luoyang Institute of Electro Optical Equipment AVIC
Original Assignee
Luoyang Institute of Electro Optical Equipment AVIC
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 Luoyang Institute of Electro Optical Equipment AVIC filed Critical Luoyang Institute of Electro Optical Equipment AVIC
Priority to CN202210940389.2A priority Critical patent/CN115543371A/en
Publication of CN115543371A publication Critical patent/CN115543371A/en
Pending legal-status Critical Current

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/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum

Abstract

The invention discloses a high-reliability automatic software upgrading method for an embedded platform, which adopts a graphical interactive interface to realize convenient interaction with a user; the only communication interface (the serial port and the Ethernet are optional) is used, and the instruction and data interaction between the upgrading equipment and the heterogeneous target product is realized through a unified interface design; an s-c interaction architecture is adopted, a target product is used as a client, upgrading equipment is used as a server, and software upgrading is realized through upgrading software resident by the client and the upgrading equipment; and various checking mechanisms are added in the data importing, transmitting and curing processes, so that the correctness of the whole upgrading process is ensured. The invention improves the reliability of software upgrading and overcomes the defects of non-uniform software upgrading interfaces, inconsistent flow, low automation degree and poor reliability of the traditional embedded platform.

Description

High-reliability automatic software upgrading method for embedded platform
Technical Field
The invention belongs to the technical field of embedding, and particularly relates to an automatic software upgrading method.
Background
Due to the fact that the traditional embedded processing platform is various in processor architecture types, software upgrading is often achieved by different methods according to specific selection types of the traditional embedded processing platform, the upgrading modes are greatly different from the interface types to the operation flow, and the problem of poor maintainability is caused by the combined use of special simulators, ethernet interfaces, serial ports and other interfaces.
While software upgrading interfaces and modes are not uniform, upgrading reliability risks exist in the process of importing, transmitting and solidifying the upgrading file from the early stage, once file errors or integrity loss occurs, failure of the whole upgrading process can be caused, and even the result that a product cannot be normally started and firmware needs to be burned again is caused.
The above disadvantages make the requirement of software upgrading for highly reliable automation of the embedded platform particularly urgent, and a software upgrading method needs to be designed, so that the software upgrading reliability is improved while a highly automated process is realized, and the purpose of reducing the maintenance cost is achieved.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a high-reliability automatic software upgrading method for an embedded platform, which adopts a graphical interactive interface to realize convenient interaction with a user; the only communication interface (the serial port and the Ethernet are optional) is used, and the instruction and data interaction between the upgrading equipment and the heterogeneous target product is realized through a unified interface design; an s-c interaction architecture is adopted, a target product is used as a client, upgrading equipment is used as a server, and software upgrading is realized through upgrading software resident in both sides; various checking mechanisms are added in the data importing, transmitting and curing processes, so that the correctness of the whole upgrading process is ensured. The invention improves the reliability of software upgrading and overcomes the defects of non-uniform software upgrading interfaces, inconsistent flow, low automation degree and poor reliability of the traditional embedded platform.
The technical scheme adopted by the invention for solving the technical problem comprises the following steps:
step 1: constructing a server side and a client side;
a server side: resident in the upgrading equipment, providing the graphical interaction control function for the operator upwards, and finishing the data interaction and the complete software upgrading process with the client downwards; the server-side program integrates the functions of log record and display, and the local program is reserved for later-stage tracing;
a client: residing in a target product, being compatible with various embedded hardware platforms through a registration callback mechanism, and being responsible for data interaction with a server-side program to complete software upgrading and verifying functions of the residing product;
step 2: in the handshake phase, the server and the client realize data interaction in a set format through the communication network port to complete the confirmation of the states of the server and the client, which is specifically described as follows:
1) In an initial state, a client monitors a communication interface and waits for an operation instruction sent by a user;
2) The server side sends a handshake message to the client side according to a handshake instruction of a user, the client side receives the handshake message, checks the correctness of the handshake message and replies a request response to the server side;
3) After sending the handshake message, the server side waits for overtime, and if the server side does not receive the request response of the client side after overtime, the handshake fails; receiving a request response and successfully checking, wherein the handshake is successful;
and 3, step 3: in the upgrading stage, the server side and the client side realize data interaction in a set format through a communication network port, and complete upgrading confirmation, data transmission, software file curing and file verification after curing, which is specifically described as follows:
1) The user finishes the loading and configuration of the upgrade file through a graphical interface and issues an upgrade instruction to the client;
2) The server side organizes an upgrade request message according to the user configuration information and the upgrade file information and sends the upgrade request message to the client side;
3) The client receives the upgrading request message, checks the correctness of the upgrading request message packet and the upgrading information, receives the upgrading operation if the checking is successful, sets the client to be in an upgrading state and organizes a reply packet to be sent to the server; if the verification fails, the upgrading operation is not accepted;
4) The server receives the reply packet, confirms that the client receives the upgrading operation, splits the upgrading file and packages the upgrading file into data packets, and sends the data packets to the client one by one;
5) The client checks the correctness of the received data packet, and organizes a reply packet to send to the server: analyzing and regrouping data corresponding to the data packet passing the verification, and synthesizing an upgrade file; for the data packet which fails in verification, discarding invalid data and requesting the server side to retransmit the invalid data;
6) The server receives the reply packet, confirms that the client finishes receiving and recombining the upgrade file, verifies the local upgrade file, and sends a verification result to the client through a verification request message packet;
7) The client receives a verification request message packet of the server, verifies the recombined upgrade file in the RAM, compares verification results of the server and the client, organizes a reply packet and sends the reply packet to the client; if the verification results are not consistent, organizing a verification request reply packet to send to the server side, and canceling the client side upgrading process; if the two are consistent, the checking request reply packet is organized and sent to the server side, and a message packet of the server side is waited;
8) The server analyzes the client verification request reply packet, and if verification fails, the server upgrading process is stopped; if the verification is successful, sending a curing request message packet to the client;
9) The client receives a curing request message packet of the server, executes the curing operation of the upgrade file, and simultaneously replies the curing progress to the server;
10 The server side confirms whether the curing is finished according to the curing progress, and when the curing operation is finished, a second file verification request message is sent to verify the resident upgrade file in the ROM;
11 The client receives the verification request message packet of the server, verifies the upgrade file solidified in the ROM, compares the verification results of the server and the client, and organizes the reply packet to send to the client;
12 The server analyzes the client check request reply packet and returns a check result to the user;
and 4, step 4: the verification mechanism is described in detail as follows:
1) CRC32 verification is adopted in all the interaction processes of the server side and the client side, and data packets with errors in the verification are discarded so as to ensure the correctness of communication interaction;
2) After the transmission and recombination of the upgrade files are completed, before the upgrade files are solidified to a ROM, MD5 verification is carried out on the files residing in the RAM so as to confirm the correctness of the files before solidification is carried out;
3) And after the operation of solidifying the upgrade file into the ROM is completed, performing MD5 verification on the file in the ROM, and confirming the correctness of the file solidified into the ROM.
Preferably, the communication network port is an RS232 or ethernet communication port.
The invention has the following beneficial effects:
according to the invention, by designing a uniform and highly reliable software curing method for the platform embedded system, the automation degree and operability of the software upgrading process are improved, and meanwhile, various data verification mechanisms are added to each stage of the upgrading process, so that the reliability of software upgrading is improved, and the defects of non-uniform software upgrading interfaces, non-uniform processes, low automation degree and poor reliability of the traditional embedded platform are overcome.
Drawings
Fig. 1 is a flowchart of the interaction between the server and the client in the handshake phase of the method of the present invention.
Fig. 2 is an interaction flowchart of the server and the client in the upgrading stage of the method of the present invention.
Fig. 3 is a schematic diagram of the checking time and the checking method in the upgrading process of the method of the present invention.
Detailed Description
The invention is further illustrated with reference to the following figures and examples.
The invention designs a high-reliability automatic software upgrading method for an embedded platform. A graphical interactive interface is adopted to realize convenient interaction with a user; the unique communication interface (the serial port and the Ethernet can be selected) is used, and the instruction and data interaction between the upgrading equipment and the heterogeneous target product is realized through a unified interface design; an s-c interaction architecture is adopted, a target product is used as a client, upgrading equipment is used as a server, and software upgrading is realized through upgrading software resident by the client and the upgrading equipment; and various checking mechanisms are added in the data importing, transmitting and curing processes to ensure the correctness of the whole upgrading process.
A high-reliability automatic software upgrading method for an embedded platform comprises the following steps:
step 1: constructing a server side and a client side;
a server side: resident in the upgrading equipment, providing the graphical interaction control function for the operator upwards, and finishing the data interaction and the complete software upgrading process with the client downwards; the server-side program integrates the functions of log record and display, and the local program is reserved for later-stage tracing;
the client side comprises: the software upgrading and verifying system is resident in a target product, is compatible with various embedded hardware platforms through a registration callback mechanism, and is responsible for data interaction with a server-side program to complete software upgrading and verifying functions of the resident product;
step 2: in the handshake phase, the server and the client implement data interaction in a set format through the communication network port to complete the confirmation of the states of the server and the client, and the flow is as shown in fig. 1 and specifically described as follows:
1) In an initial state, a client monitors a communication interface and waits for a user to send an operation instruction;
2) The server side sends a handshake message to the client side according to a handshake instruction of a user, the client side receives the handshake message, checks the correctness of the handshake message and replies a request response to the server side;
3) After sending the handshake message, the server side waits for overtime, and if the server side does not receive the request response of the client side after overtime, the handshake fails; receiving a request response and successfully checking, wherein the handshake is successful;
and step 3: in the upgrade stage, the server and the client implement data interaction in a set format through the communication network port, and complete upgrade confirmation, data transmission, software file curing, and file verification after curing, and the process is shown in fig. 2 and specifically described as follows:
1) The user finishes the loading and configuration of the upgrade file through a graphical interface and issues an upgrade instruction to the client;
2) The server side organizes an upgrade request message according to the user configuration information and the upgrade file information and sends the upgrade request message to the client side;
3) The client receives the upgrading request message, checks the correctness of the upgrading request message packet and the upgrading information, receives the upgrading operation if the checking is successful, sets the client to be in an upgrading state and organizes a reply packet to be sent to the server; if the verification fails, the upgrading operation is not accepted;
4) The server receives the reply packet, confirms that the client receives the upgrading operation, splits the upgrading file, packages the upgrading file into data packets and sends the data packets to the client one by one;
5) The client checks the correctness of the received data packet, and organizes the reply packet to be sent to the server: analyzing and regrouping data packets corresponding to the data packets passing the verification, and synthesizing an upgrade file; for the data packet which fails in verification, discarding invalid data and requesting the server side to retransmit the invalid data;
6) The server receives the reply packet, confirms that the client finishes receiving and recombining the upgrade file, verifies the local upgrade file, and sends a verification result to the client through a verification request message packet;
7) The client receives a verification request message packet of the server, verifies the recombined upgrade file in the RAM, compares the verification results of the server and the client, organizes a reply packet and sends the reply packet to the client; if the verification results are not consistent, organizing a verification request reply packet to send to the server side, and canceling the client side upgrading process; if the request is consistent with the verification request, the verification request reply packet is organized and sent to the server side, and a message packet of the server side is waited for;
8) The server analyzes the client verification request reply packet, and if verification fails, the server upgrading process is stopped; if the verification is successful, sending a curing request message packet to the client;
9) The client receives a curing request message packet of the server, executes the curing operation of the upgrade file, and simultaneously replies the curing progress to the server;
10 The server side confirms whether the curing is finished according to the curing progress, and when the curing operation is finished, a second-time file verification request message is sent to verify the upgrading file resident in the ROM;
11 The client receives the verification request message packet of the server, verifies the upgrade file solidified in the ROM, compares the verification results of the server and the client, and organizes the reply packet to send to the client;
12 The server analyzes the client check request reply packet and returns a check result to the user;
and 4, step 4: in order to ensure the correctness of the files in the stages of import, transmission, solidification and the like of the upgrading process and then find out errors in time to terminate the upgrading process, the invention adds a plurality of verification mechanisms in the upgrading process, as shown in fig. 3, and the specific description is as follows:
1) CRC32 verification is adopted in all the interaction processes of the server side and the client side, and data packets with errors in the verification are discarded so as to ensure the correctness of communication interaction;
2) After the transmission and recombination of the upgrade file are completed, before the upgrade file is solidified to a ROM, MD5 verification is carried out on the file residing in the RAM so as to confirm the correctness of the file before solidification is carried out;
3) And after the operation of solidifying the upgrade file into the ROM is completed, performing MD5 verification on the file in the ROM, and confirming the correctness of the file solidified into the ROM.
In order to realize platform compatibility of a multi-platform embedded system and improve software portability, a registration callback mechanism is designed for a client program, registration of a solidification operation interface is carried out according to the actual situation of the embedded platform in the initialization stage of the client program, and a uniform registration interface is called in the process of executing software upgrading, so that software isolation between software and the platform is realized, and the aim of multi-platform compatibility is fulfilled.
The specific embodiment is as follows:
a software upgrading method for high-reliability automation of an embedded platform comprises upgrading equipment for executing a server-side program, a software upgrading image file and an embedded platform target product for executing a client-side program. Wherein:
the server program resides in the upgrading equipment, provides a convenient graphical interaction control function for operators upwards, and completes data interaction and a complete software upgrading process with the client downwards; the server-side program integrates the functions of log record and display, and the local program is reserved for later-stage tracing;
the client program resides in the target product, is compatible with various embedded hardware platforms through a registration callback mechanism, and is mainly responsible for data interaction with the server program to complete software upgrading and verification functions on the resident product.
In an embodiment, a two-terminal system is constructed, comprising:
1 client node, is used for realizing the program run of the customer end, finish the software upgrading operation of the embedded platform, the customer end node uses and is based on the P2020 processor of Power series of the Feichal, supporting wind river VxWorks6.9 operating system, and Microsmi W3J128M72G-800LBI model DDR chip makes up the minimum system that the software runs, and dispose RS232 and debug the embedded hardware module of serial port and Ethernet communication port;
1 server end node for realizing server end program operation, wherein the server end node adopts a Feichal Power series P2020 processor, a wind river VxWorks6.9 operating system matched with the processor, and a Microsmi W3J128M72G-800LBI model DDR chip to form a minimum system for software operation, and an RS232 debugging serial port and an embedded hardware module of an Ethernet communication port are configured;
the upgrade file, the image file existing in binary format, and the execution file of the upgrade process.
The flow of the embedded multi-platform compatible high-reliability software upgrading method of the embodiment is divided into handshake and upgrading asynchronous processes, and multiple data verification mechanisms are added to ensure the correctness of the upgrading file while the reliability of the upgrading flow is ensured.

Claims (2)

1. A high-reliability automatic software upgrading method for an embedded platform is characterized by comprising the following steps:
step 1: constructing a server side and a client side;
a server side: residing in the upgrading equipment, providing an operator with a graphical interaction control function upwards, and finishing data interaction and a complete software upgrading process downwards with a client; the server-side program integrates the functions of log record and display of upgrading, and the local program is reserved for later-stage tracing;
the client side comprises: residing in a target product, being compatible with various embedded hardware platforms through a registration callback mechanism, and being responsible for data interaction with a server-side program to complete software upgrading and verifying functions of the residing product;
step 2: in the handshake phase, the server and the client realize data interaction in a set format through the communication network port to complete the confirmation of the states of the server and the client, which is specifically described as follows:
1) In an initial state, a client monitors a communication interface and waits for a user to send an operation instruction;
2) The server end sends handshake information to the client end according to the handshake command of the user, the client end receives the handshake information,
checking the correctness of the handshake message, and replying a request response to the server;
3) The server side enters into the overtime waiting after sending the handshake message, and the handshake fails if the request response of the client side is not received after the overtime; receiving a request response and successfully checking, wherein the handshake is successful;
and 3, step 3: in the upgrading stage, the server and the client realize data interaction in a set format through a communication network port to complete upgrading confirmation, data transmission, software file curing and file verification after curing, and the specific description is as follows:
1) The user finishes the loading and configuration of the upgrade file through a graphical interface, and issues an upgrade instruction to the client;
2) The server side organizes an upgrade request message according to the user configuration information and the upgrade file information and sends the upgrade request message to the client side;
3) The client receives the upgrading request message, checks the correctness of the upgrading request message packet and the upgrading information, receives the upgrading operation if the checking is successful, sets the client to be in an upgrading state and organizes a reply packet to be sent to the server; if the verification fails, the upgrading operation is not accepted;
4) The server receives the reply packet, confirms that the client receives the upgrading operation, splits the upgrading file, packages the upgrading file into data packets and sends the data packets to the client one by one;
5) The client checks the correctness of the received data packet, and organizes a reply packet to send to the server: analyzing and regrouping data corresponding to the data packet passing the verification, and synthesizing an upgrade file; for the data packet which fails in verification, discarding invalid data and requesting the server side to retransmit the invalid data;
6) The server receives the reply packet, confirms that the client finishes receiving and recombining the upgrade file, verifies the local upgrade file, and sends a verification result to the client through a verification request message packet;
7) The client receives a verification request message packet of the server, verifies the recombined upgrade file in the RAM, compares the verification results of the server and the client, organizes a reply packet and sends the reply packet to the client; if the verification results are not consistent, organizing a verification request reply packet to send to the server side, and canceling the client side upgrading process; if the two are consistent, the checking request reply packet is organized and sent to the server side, and a message packet of the server side is waited;
8) The server analyzes the client verification request reply packet, and if verification fails, the server upgrading process is stopped; if the verification is successful, sending a curing request message packet to the client;
9) The client receives the curing request message packet of the server, executes the curing operation of the upgrade file, and simultaneously replies the curing progress to the server;
10 The server side confirms whether the curing is finished according to the curing progress, and when the curing operation is finished, a second-time file verification request message is sent to verify the upgrading file resident in the ROM;
11 The client receives the verification request message packet of the server, verifies the upgrade file solidified in the ROM, compares the verification results of the server and the client, and organizes the reply packet to send to the client;
12 The server analyzes the client check request reply packet and returns a check result to the user;
and 4, step 4: the verification mechanism is described in detail as follows:
1) CRC32 check is adopted in the interaction process of the server side and the client side, and data packets with errors are discarded and processed to ensure the correctness of communication interaction;
2) After the transmission and recombination of the upgrade files are completed, before the upgrade files are solidified to a ROM, MD5 verification is carried out on the files residing in the RAM so as to confirm the correctness of the files before solidification is carried out;
3) And after the operation of solidifying the upgrade file into the ROM is finished, performing MD5 verification on the file in the ROM, and confirming the correctness of the file solidified into the ROM.
2. The method according to claim 1, wherein the communication port is an RS232 or ethernet communication port.
CN202210940389.2A 2022-08-06 2022-08-06 High-reliability automatic software upgrading method for embedded platform Pending CN115543371A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210940389.2A CN115543371A (en) 2022-08-06 2022-08-06 High-reliability automatic software upgrading method for embedded platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210940389.2A CN115543371A (en) 2022-08-06 2022-08-06 High-reliability automatic software upgrading method for embedded platform

Publications (1)

Publication Number Publication Date
CN115543371A true CN115543371A (en) 2022-12-30

Family

ID=84724402

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210940389.2A Pending CN115543371A (en) 2022-08-06 2022-08-06 High-reliability automatic software upgrading method for embedded platform

Country Status (1)

Country Link
CN (1) CN115543371A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116185460A (en) * 2023-04-26 2023-05-30 深圳市鼎盛科电子有限公司 Method and device for automatically upgrading embedded system software

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116185460A (en) * 2023-04-26 2023-05-30 深圳市鼎盛科电子有限公司 Method and device for automatically upgrading embedded system software

Similar Documents

Publication Publication Date Title
CN111190812B (en) Automatic test framework system based on embedded equipment
CN103580942B (en) A kind of simulative serial port method of testing and device
CN112612699B (en) General automatic test equipment for HID (human interface device) human-computer interaction scene use case
CN112084008A (en) Method for rapidly deploying cloud pipe system based on container technology
CN115543371A (en) High-reliability automatic software upgrading method for embedded platform
CN110405759A (en) A kind of chip control system
CN112953983A (en) SFTP transmission method and device
CN109614131A (en) A kind of broadcasting equipment upgrading control system
CN116185460A (en) Method and device for automatically upgrading embedded system software
CN110198222B (en) Plug-and-play test method and test master station for power distribution automation terminal
CN110662096A (en) Data burning method and device for converged terminal
CN114281675A (en) Test environment configuration method and device of CBTC (communication based train control) system and electronic equipment
CN115809096B (en) Batch self-adaptive upgrading method for operating system
CN110677308A (en) Code automatic deployment method
CN113127032A (en) System updating method of train controller
CN112947964A (en) Chip firmware updating method, device, equipment and storage medium
CN114579166A (en) Component module upgrading method, component module and financial robot
CN110825624A (en) Module testing system and method of embedded equipment
CN111314805A (en) Debugging method and device for intercommunication OMCI (OMCI) messages of GPON (gigabit passive optical network) system
CN111082984A (en) Method and device for simulating login of network equipment to carry out command line interaction
CN109598080A (en) A kind of fast automatic formula conversion process system of 3D design drawing and its application method
CN101594253B (en) Method and system for single board upgrading
WO2024098746A1 (en) Test method, apparatus, and related device
CN113050925B (en) Block chain intelligent contract repairing method and device
CN114896146A (en) Software testing system, method, electronic device and storage medium

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