CN106257417B - Boot program upgrading method, embedded equipment, control equipment and embedded system - Google Patents

Boot program upgrading method, embedded equipment, control equipment and embedded system Download PDF

Info

Publication number
CN106257417B
CN106257417B CN201510339079.5A CN201510339079A CN106257417B CN 106257417 B CN106257417 B CN 106257417B CN 201510339079 A CN201510339079 A CN 201510339079A CN 106257417 B CN106257417 B CN 106257417B
Authority
CN
China
Prior art keywords
file
upgrade
embedded
backup
program
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
CN201510339079.5A
Other languages
Chinese (zh)
Other versions
CN106257417A (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 CN201510339079.5A priority Critical patent/CN106257417B/en
Priority to PCT/CN2016/079917 priority patent/WO2016202088A1/en
Publication of CN106257417A publication Critical patent/CN106257417A/en
Application granted granted Critical
Publication of CN106257417B publication Critical patent/CN106257417B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Landscapes

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

Abstract

The invention discloses a bootstrap program upgrading method, embedded equipment, control equipment and an embedded system. The boot program upgrading method comprises the following steps: receiving an upgrade indication message sent by control equipment, wherein the upgrade indication message is used for indicating the embedded equipment to monitor a serial port between the embedded equipment and the control equipment; receiving an upgrade file sent by control equipment through a serial port, wherein the upgrade file is calculated by the control equipment according to a file path selected by a user and comprises a file length, a check field and file data; and writing the upgrade file into the memory of the embedded device to replace the current bootstrap program in the memory. The invention solves the problems of complicated operation mode and large workload of upgrading the bootstrap program caused by the need of detaching the shell of the embedded equipment to realize upgrading in the process of upgrading the bootstrap program by adopting the burner.

Description

Boot program upgrading method, embedded equipment, control equipment and embedded system
Technical Field
The present invention relates to computer technologies, and in particular, to a BOOT program (BOOT) upgrade method, an embedded device, a control device, and an embedded system.
Background
With the widespread application of Embedded Systems (ES) in the communication and industrial control fields, in order to improve the life cycle of products and adapt to new business requirements, field upgrade of the Embedded systems is generally required, wherein an important upgrade content includes upgrade of boot programs in Embedded devices.
The boot program of the embedded device is usually stored in a non-volatile Memory, such as NOR FLASH and NAND FLASH, and the main functions of the boot program include initializing devices such as a Central Processing Unit (CPU) and a Display Data Random Access Memory (DDRAM), and then booting an Operating System (OS) or an application program. The boot program is a first-stage program that runs after the embedded device is powered on, and if the boot program fails to be upgraded, the embedded device cannot be started, for example, if the boot program fails to be upgraded in a process of implementing self-update by using a command of the boot program itself to be upgraded, the embedded device cannot be started. Based on the above problems, in order to ensure the security and reliability of the boot program in the upgrade process, a burner may be used in the upgrade mode of the boot program, and specifically, the boot program of the version to be upgraded is burned into the memory of the embedded device by the burner, and at the same time, additional burning software is needed.
However, in the process of upgrading the bootstrap program by using the burner, since the interface connected to the burner in the embedded device is usually disposed inside the embedded device, the shell of the embedded device needs to be detached to implement upgrading, which results in a complicated operation mode for upgrading the bootstrap program and a large workload.
Disclosure of Invention
In order to solve the technical problems, the invention provides a bootstrap program upgrading method, an embedded device, a control device and an embedded system, so as to solve the problems that in the process of upgrading the bootstrap program by adopting a burner, the operation mode of upgrading the bootstrap program is complex and the workload is large because the shell of the embedded device needs to be detached to realize the upgrading.
In a first aspect, the present invention provides a boot program upgrade method, including:
receiving an upgrade indication message sent by a control device, wherein the upgrade indication message is used for indicating an embedded device to monitor a serial port between the embedded device and the control device;
receiving an upgrade file sent by the control equipment through the serial port, wherein the upgrade file is calculated by the control equipment according to a file path selected by a user and comprises a file length, a check field and file data;
and writing the upgrade file into a memory of the embedded device to replace the current bootstrap program in the memory.
In a first possible implementation manner of the first aspect, after receiving, by the serial port, an upgrade file sent by the control device, the method further includes:
writing the upgrade file received through the serial port into a memory of the embedded equipment, and verifying the upgrade file;
when the upgrade file is successfully verified, writing the upgrade file into a memory of the embedded equipment;
and when the verification of the upgrade file fails, loading and starting the current bootstrap program.
According to a first possible implementation manner of the first aspect, in a second possible implementation manner, the sending the upgrade indication message by the control device in an upgrade mode of a control program in the control device, before receiving the upgrade indication message sent by the control device, further includes:
executing a boot loader in the memory by a processor CPU and transmitting a first query message to the control device through the boot loader;
when the upgrade indication message is received within the preset time, starting to monitor the serial port according to the upgrade indication message;
and when the upgrade indication message is not received within a preset time, loading and starting the current bootstrap program.
According to a second possible implementation manner of the first aspect, in a third possible implementation manner, before the receiving an upgrade indication message sent by a control device, the method further includes:
receiving a backup indication message sent by the control device, wherein the backup indication message is used for indicating the control device to start monitoring the serial port;
reading the current bootstrap program in the memory according to the backup indication message, and calculating the file length, the check field and the file data of the current bootstrap program;
and sending a backup file to the control equipment so that the control equipment writes the received backup file into a memory of the control equipment, verifying the backup file, and after the verification is successful, saving the backup file to a storage position preset in the control equipment by the user, wherein the backup file comprises a calculation result of the current bootstrap program.
According to a third possible implementation manner of the first aspect, in a fourth possible implementation manner, before the receiving the backup indication message sent by the control device when the control program is in the backup mode, the method further includes:
executing the boot loader in the memory by a CPU, and transmitting a second inquiry message to the control device through the boot loader;
when the backup indication message is received within the preset time, indicating the control equipment to start monitoring the serial port according to the backup indication message;
and when the backup indication message is not received within a preset time, loading and starting the current bootstrap program.
According to a third possible implementation manner of the first aspect, in a fifth possible implementation manner, after the sending the backup file to the control device, the method further includes:
and receiving a backup failure message sent by the control device, wherein the backup failure message is used for indicating that the control device fails to verify the backup file.
According to any one of the third to fifth possible implementation manners of the first aspect, in a sixth possible implementation manner, an upgrade error occurs during writing of the upgrade file into a memory of the embedded device, and the method further includes:
restarting the embedded equipment, and sending the third inquiry message to the control equipment through the starting bootstrap program after the CPU executes the starting bootstrap program again;
receiving a recovery indication message sent by the control device, wherein the recovery indication message is used for indicating the embedded device to monitor the serial port;
receiving a recovery file sent by the control equipment through the serial port, wherein the recovery file is calculated by the control equipment according to a file path selected by the user and comprises a file length, a check field and file data;
and writing the recovery file into a memory of the embedded equipment so as to restore the bootstrap program in the memory of the embedded equipment before writing the upgrade file.
According to a sixth possible implementation manner of the first aspect, in a seventh possible implementation manner, the restore file is one of the backup files selected from the backup files stored in the control device.
In a second aspect, the present invention provides a boot program upgrade method, including:
sending an upgrade indication message to an embedded device, wherein the upgrade indication message is used for indicating the embedded device to monitor a serial port between the embedded device and the control device;
calculating the file length, the check field and the file data of the upgrade file according to the file path selected by the user;
and sending the calculated upgrade file to the embedded equipment through the serial port, so that the embedded equipment writes the upgrade file into a memory of the embedded equipment to replace the current bootstrap program in the memory.
In a first possible implementation manner of the second aspect, before sending the upgrade indication message to the embedded device, the method further includes:
starting a control program of the control equipment, and selecting an upgrading mode on the control program;
and receiving a first query message sent by the embedded device through the control program, wherein the first query message is used for prompting the control device to upgrade the current bootstrap program in the embedded device.
According to the first possible implementation manner of the second aspect, in a second possible implementation manner, before sending the upgrade indication message to the embedded device, the method further includes:
sending a backup indication message to the embedded equipment, wherein the backup indication message is used for indicating the embedded equipment to send a backup file to the terminal;
receiving a backup file sent by the embedded equipment through the serial port, wherein the backup file comprises the file length, the check field and the file data of the current bootstrap program in a memory of the embedded equipment;
writing the received backup file into a memory of the control equipment, and verifying the backup file;
after the backup file is successfully verified, saving the backup file to a storage position preset in the control equipment by the user;
and when the backup file is failed to be checked, sending a backup failure message to the embedded equipment.
According to a second possible implementation manner of the second aspect, in a third possible implementation manner, before the sending the backup indication message to the embedded device, the method further includes:
starting a control program of the control equipment, and selecting a backup mode on the control program;
and receiving a second query message sent by the embedded device through the control program, wherein the second query message is used for prompting the control device to back up the current bootstrap program in the embedded device.
According to the second possible implementation manner or the third possible implementation manner of the second aspect, in a fourth possible implementation manner, after the sending the calculated upgrade file to the embedded device through the serial port, the method further includes:
receiving, by the control program, a third query message sent by the embedded device, where the third query message is used to indicate that the embedded device fails to upgrade the current bootstrap program;
sending a recovery indication message to the embedded device, wherein the recovery indication message is used for indicating the embedded device to monitor the serial port;
calculating the file length, the check field and the file data of the recovered file according to the file path selected by the user;
and sending the recovery file to the embedded equipment through the serial port, so that the embedded equipment writes the recovery file into a memory of the embedded equipment to restore a bootstrap program in the memory of the embedded equipment before the upgrade file is written.
According to a fourth possible implementation manner of the second aspect, in a fifth possible implementation manner, the restore file is one of the backup files selected from the backup files stored in the control device.
In a third aspect, the present invention provides an embedded device, comprising:
the receiving module is used for receiving an upgrade indicating message sent by control equipment, wherein the upgrade indicating message is used for indicating the receiving module to monitor a serial port between the embedded equipment and the control equipment;
the receiving module is further configured to receive an upgrade file sent by the control device through the serial port, where the upgrade file is calculated by the control device according to a file path selected by a user, and the upgrade file includes a file length, a check field, and file data;
and the storage module is used for writing the upgrade file received by the receiving module into a memory of the embedded equipment so as to replace the current bootstrap program in the memory.
In a first possible implementation manner of the third aspect, the storage module includes: the storage unit is used for writing the upgrade file into the memory of the embedded equipment after the receiving module receives the upgrade file sent by the control equipment;
the verification unit is used for verifying the upgrade file written into the memory of the embedded equipment by the storage unit;
the storage unit is further used for writing the upgrade file into a memory of the embedded device after the verification unit successfully verifies the upgrade file;
the verification unit is further configured to load and start the current boot program after the upgrade file is failed to be verified.
According to a first possible implementation manner of the third aspect, in a second possible implementation manner, the upgrade indication message is sent by the control device in an upgrade mode of a control program in the control device, and the embedded device further includes: the processing module is used for executing the starting bootstrap program in the memory through the CPU before the receiving module receives the upgrading indication message sent by the control equipment;
a sending module, configured to send a first query message to the control device through the boot loader;
the processing module is further configured to start monitoring the serial port according to the upgrade indication message received by the receiving module when the receiving module receives the upgrade indication message within a preset time;
the processing module is further configured to load and start the current boot program when the receiving module does not receive the upgrade indication message within a preset time.
According to a second possible implementation manner of the third aspect, in a third possible implementation manner, the receiving module is further configured to receive a backup indication message sent by the control device before receiving an upgrade indication message sent by the control device, where the backup indication message is used to indicate the control device to start monitoring the serial port;
the embedded device further comprises: the calculation module is used for reading the current bootstrap program in the memory according to the backup indication message received by the receiving module and calculating the file length, the check field and the file data of the current bootstrap program;
the sending module is further configured to send a backup file to the control device, so that the control device writes the received backup file into a memory of the control device, verifies the backup file, and stores the backup file into a storage location preset in the control device by the user after the verification is successful, where the backup file includes a calculation result of the current boot program.
According to a third possible implementation manner of the third aspect, in a fourth possible implementation manner, the backup indication message is sent by the control device when the control program is in a backup mode, and the processing module is further configured to execute, by the CPU, the boot program in the memory before the receiving module receives the backup indication message sent by the control device;
the sending module is further configured to send a second query message to the control device through the boot loader;
the processing module is further configured to instruct the control device to start monitoring the serial port according to the backup indication message received by the receiving module when the receiving module receives the backup indication message within a preset time;
the processing module is further configured to load and start the current bootstrap program when the receiving module does not receive the backup indication message within a preset time.
According to a third possible implementation manner of the third aspect, in a fifth possible implementation manner, the receiving module is further configured to receive a backup failure message sent by the control device after the sending module sends the backup file to the control device, where the backup failure message is used to indicate that the control device fails to verify the backup file.
According to any one of the third to fifth possible implementation manners of the third aspect, in a sixth possible implementation manner, the processing module is further configured to restart the embedded device when an upgrade error occurs in a process that the storage module writes the upgrade file into a memory of the embedded device, and execute the boot loader again through the CPU;
the sending module is further configured to send the third query message to the control device through the boot loader;
the receiving module is further configured to receive a recovery indication message sent by the control device, where the recovery indication message is used to indicate the embedded device to monitor the serial port, and receive a recovery file sent by the control device through the serial port, where the recovery file is calculated by the control device according to a file path selected by the user, and the recovery file includes a file length, a check field, and file data;
and the storage module is also used for writing the recovery file into the memory of the embedded equipment so as to restore the bootstrap program in the memory of the embedded equipment before the upgrade file is written.
According to a sixth possible implementation manner of the third aspect, in a seventh possible implementation manner, the recovery file is one of the backup files selected from the backup files stored in the control device.
In a fourth aspect, the present invention provides a control apparatus comprising:
the sending module is used for sending an upgrading indication message to the embedded equipment, wherein the upgrading indication message is used for indicating the embedded equipment to monitor a serial port between the embedded equipment and the control equipment;
the calculation module is used for calculating the file length, the check field and the file data of the upgrade file according to the file path selected by the user;
the sending module is further configured to send the upgrade file calculated by the calculation module to the embedded device through the serial port, so that the embedded device writes the upgrade file into a memory of the embedded device to replace a current boot program in the memory.
In a first possible implementation manner of the fourth aspect, the control device further includes: the starting module is used for starting a control program of the control equipment and selecting an upgrading mode on the control program before the sending module sends the upgrading indication message to the embedded equipment;
a receiving module, configured to receive, by the control program, a first query message sent by the embedded device, where the first query message is used to prompt the control device to upgrade the current bootstrap program in the embedded device.
According to the first possible implementation manner of the fourth aspect, in a second possible implementation manner, the sending module is further configured to send a backup indication message to the embedded device before sending an upgrade indication message to the embedded device, where the backup indication message is used to indicate the embedded device to send a backup file to the terminal;
the receiving module is further configured to receive a backup file sent by the embedded device through the serial port, where the backup file includes a file length, a check field, and file data of the current boot program in a memory of the embedded device;
the control apparatus further includes: the storage module is used for writing the backup file received by the receiving module into the memory of the control equipment;
the checking module is used for checking the backup file written into the memory of the control equipment by the storage module;
the storage module is further configured to, after the verification module successfully verifies the backup file, store the backup file in a storage location preset in the control device by the user;
the sending module is further configured to send a backup failure message to the embedded device after the checking module fails to check the backup file.
According to a second possible implementation manner of the fourth aspect, in a third possible implementation manner, the starting module is further configured to start a control program of the control device before the sending module sends the backup indication message to the embedded device, and select a backup mode on the control program of the control device;
the receiving module is further configured to receive, through the control program, a second query message sent by the embedded device, where the second query message is used to prompt the control device to backup the current bootstrap program in the embedded device.
According to the second or third possible implementation manner of the fourth aspect, in a fourth possible implementation manner, the receiving module is further configured to receive, by the control program, a third query message sent by the embedded device after the sending module sends the calculated upgrade file to the embedded device through the serial port, where the third query message is used to indicate that the embedded device fails to upgrade the current bootstrap;
the sending module is further configured to send a recovery indication message to the embedded device, where the recovery indication message is used to indicate the embedded device to monitor the serial port;
the calculation module is also used for calculating the file length, the check field and the file data of the recovery file according to the file path selected by the user;
the sending module is further configured to send the recovery file calculated by the calculating module to the embedded device through the serial port, so that the embedded device writes the recovery file into a memory of the embedded device, so as to restore a boot program in the memory of the embedded device before the upgrade file is written.
According to a fourth possible implementation manner of the fourth aspect, in a fifth possible implementation manner, the restore file is one of the backup files selected from the backup files stored in the control device.
In a fifth aspect, the present invention provides an embedded system, comprising: an embedded device according to any one of the above third aspects and a control device according to any one of the above fourth aspects.
The method for upgrading the bootstrap program, the embedded device, the control device and the embedded system provided by the invention monitor the serial ports between the embedded device and the control device through the upgrade indication message sent by the receiving terminal, and receive the upgrade file sent by the control device through the serial port, wherein the upgrade file is calculated by the control device according to the file path selected by the user, so that the upgrade file is written into the memory of the embedded device to replace the current bootstrap program in the memory; the method for upgrading the bootstrap program solves the problems that in the process of upgrading the bootstrap program by adopting the burner, the operation mode of upgrading the bootstrap program is complex and the workload is large because the shell of the embedded device needs to be detached to realize upgrading.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the example serve to explain the principles of the invention and not to limit the invention.
Fig. 1 is a flowchart of a boot program upgrading method according to an embodiment of the present invention;
FIG. 2 is an application scenario for performing the boot upgrade method provided in FIG. 1;
fig. 3 is a flowchart of another boot program upgrading method according to an embodiment of the present invention;
fig. 4 is a flowchart of another boot program upgrading method according to an embodiment of the present invention;
fig. 5 is a flowchart of a boot program upgrading method according to another embodiment of the present invention;
fig. 6 is a flowchart of a boot program upgrading method according to an embodiment of the present invention;
fig. 7 is a flowchart illustrating an interactive execution of a method for booting an upgrade application according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an embedded device according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of another embedded device according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a control device according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of another control device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
The steps illustrated in the flow charts of the figures may be performed in a computer system such as a set of computer-executable instructions. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
Fig. 1 is a flowchart of a boot program upgrading method according to an embodiment of the present invention. The bootstrap program upgrading method provided by the embodiment is suitable for the case of upgrading the bootstrap program in the embedded system, and the method can be executed by an embedded device, the embedded device is usually implemented by a hardware and software method, and the embedded device implements the upgrading of the bootstrap program through the message interaction and the data interaction with the control device in the embedded system. As shown in fig. 1, the method of this embodiment may include:
s110, receiving an upgrade instruction message sent by the control device, wherein the upgrade instruction message is used for instructing the embedded device to monitor a serial port between the embedded device and the control device.
As shown in fig. 2, an application scenario for executing the boot program upgrade method provided in fig. 1 is provided. The method provided by the embodiment is specifically executed by the embedded device 100 and the control device 200, the embedded device 100 may be, for example, an industrial device such as a switch or a television set-top box, the control device 200 may be, for example, a Personal Computer (Personal Computer, abbreviated as PC), and may be connected to a serial port between the embedded device 100 and the control device 200 through a serial port cable 300; the embedded device 100 includes a CPU110 and a memory 120 connected via a bus, the memory 120 stores a current boot program 121 and a start boot program 122, and the control device 200 includes a control program 210. In this embodiment, after the embedded device is powered on, that is, before S110, the method further includes: s100, executing a starting bootstrap program in a memory through a CPU, and sending a first inquiry message to a control device through the starting bootstrap program; the first query message may be a query handshake signal, for example, 0x5a5a5a5a, and after sending the first query message, the embedded device waits for a response signal returned by the control device, that is, an upgrade indication message, for example, 0x9a9a9a, and before receiving the upgrade indication message, the embedded device does not explicitly need to perform an upgrade operation of the boot program. At this time, the control device receives the first query message when the control program of the control device is set to be in an upgrading mode, so that the control device can initiate an upgrading process of a bootstrap program of the embedded device, and thus whether to send an upgrading indication message is determined by the selection of a user; specifically, when receiving an upgrade instruction message within a preset time, the embedded device starts to monitor the serial port according to the upgrade instruction message, that is, starts to execute the upgrade operation of the boot program; in another case, when the upgrade indication message is not received within a preset time, the embedded device loads and starts the current bootstrap program, at this time, the embedded device enters a normal start program, that is, it indicates that the current bootstrap program of the embedded device is not upgraded, for example, the embedded device may reserve a waiting time of 3 seconds(s) after sending the first query message to determine whether to enter a process of upgrading the bootstrap program or enter a process of normal operation.
It should be noted that, in this embodiment, the memory 120 of the embedded device 100 may be divided into a first bootstrap program area 121a and a second bootstrap program area 122a, where the current bootstrap program 121 is specifically a bootstrap program to be upgraded, that is, a main program for booting the start of an OS or an application program, and is set in the first bootstrap program area 121a, and after the bootstrap program 122 is started to power on the embedded device 100, the CPU110 starts executing a program, which may be a program for performing preprocessing, for example, and is set in the second bootstrap program area 122 a; the boot programs with different functions are arranged in different areas of the memory, so that the specific position of the boot program to be upgraded is determined, and the reliability of the boot program to be upgraded is improved.
And S120, receiving an upgrade file sent by the control equipment through a serial port, wherein the upgrade file is calculated by the control equipment according to a file path selected by a user and comprises a file length, a check field and file data.
In this embodiment, after sending the upgrade instruction message, the control device starts to calculate the file length, the check field, and the file data of the upgrade file through the file path specified by the user in advance, where the sum of the file lengths and the check field is usually 4 bytes (byte), for example, after the user starts a control program of the control device, the user may select an upgrade mode and specify a path of the boot file to be upgraded. After the content of the upgrade file is calculated and obtained, in order to ensure that the embedded device has analyzed the current upgrade flow and enters a monitoring state, the calculated upgrade file may be sent after waiting for a certain time, so as to ensure that the embedded device may receive the upgrade file through the serial port.
And S130, writing the upgrade file into a memory of the embedded device to replace the current bootstrap program in the memory.
In this embodiment, the embedded device writes the received upgrade file into the memory to upgrade the boot program, where the upgrade file is actually the boot program of a higher version, and the boot program in the current embedded device is replaced by the boot program of the higher version to complete the upgrade process of the boot program.
It should be noted that, the patent with patent application number "CN 201210436671.3" entitled "an efficient embedded system debugging method" also provides a method for upgrading a boot program, and the method provided by the above patent has the following defects: on one hand, a boot program is loaded through a serial port by using a starter program preset in a memory (Flash), and then a command is manually input to update the boot program in the Flash, so that the method is complex in operation and easy to make mistakes, the boot program in the embedded equipment cannot be backed up, and the method cannot be applied to development and test links and is not suitable for a scene of upgrading the boot program on site under the condition of upgrading failure; on the other hand, the operation mode for triggering the boot program to be loaded from the serial port is realized by triggering the function key, specifically, whether the boot program is loaded from the serial port is determined by detecting whether the function key is triggered when the starter program is started, and then the file of the boot program is sent through computer software.
In the boot program upgrading method provided by this embodiment, an upgrade instruction message sent by a receiving terminal monitors a serial port between an embedded device and a control device, and receives an upgrade file sent by the control device through the serial port, where the upgrade file is calculated by the control device according to a file path selected by a user, so that the upgrade file is written into a memory of the embedded device to replace a current boot program in the memory, and the upgrade file in the control device is downloaded into the memory of the embedded device to achieve an object of upgrading the boot program in the embedded device; the method for upgrading the bootstrap program solves the problems that in the process of upgrading the bootstrap program by adopting the burner, the operation mode of upgrading the bootstrap program is complex and the workload is large because the shell of the embedded device needs to be detached to realize upgrading.
It should be noted that, in the embedded device in this embodiment, only when the memory of the embedded device is initially manufactured, the current boot program and the boot start program need to be burned into the memory by the burner, and after the memory is installed in the embedded device, the purpose of upgrading the boot program does not need to be achieved by detaching the device; when the bootstrap program is upgraded on site, the method provided by the embodiment can automatically realize the upgrading operation of the bootstrap program after the embedded device is powered on directly through the setting of the control program in the control device, and the intervention of an operator is not needed during the upgrading. And some embedded devices may not have an interface reserved for connecting with the burner, and if the boot program is upgraded by using the burner, the memory chip of the embedded device needs to be replaced by returning to the factory. In addition, in this embodiment, the mode of upgrading the boot program is implemented by setting the control program in the control device, which is obviously easier to operate than the mode of updating the boot program in Flash by manually inputting a command in the above patent, and is also better controlled and easier to implement than the mode of triggering the boot program to be loaded from a serial port by triggering a function key.
Further, fig. 3 is a flowchart of another boot program upgrading method according to an embodiment of the present invention. On the basis of the embodiment shown in fig. 1, after S120, the method provided by this embodiment further includes: s121, writing the upgrade file received through the serial port into a memory of the embedded device, and verifying the upgrade file; correspondingly, the method further comprises: s122, judging whether the verification of the upgrade file is successful; if the result is successful, S130 is executed, and if the result is failed, S123 is executed.
And S123, loading and starting the current bootstrap program.
In this embodiment, after the upgrade file is successfully verified, the upgrade process is continuously executed, that is, the upgrade file is written into the memory of the embedded device, and after the upgrade file is unsuccessfully verified, the use of the embedded device is not affected, that is, if the upgrade fails, the embedded device can be started through the current bootstrap program in the first bootstrap program area, and the embedded device enters a normal working process, so that the security and reliability of the upgrade bootstrap program are further ensured.
Fig. 4 is a flowchart of another boot program upgrading method according to an embodiment of the present invention. The bootstrap program upgrading method provided by this embodiment is suitable for the case of backing up and upgrading the bootstrap program in the embedded system, and the method may be executed by an embedded device, where the embedded device is usually implemented by a hardware and software method, and the embedded device implements upgrading of the bootstrap program through message interaction and data interaction with a control device in the embedded system. As shown in fig. 4, the method of this embodiment may include:
s210, receiving a backup indication message sent by the control device, wherein the backup indication message is used for indicating the control device to start monitoring the serial port.
The method provided by this embodiment may also be applied to the application scenario shown in fig. 2, and similar to the example shown in fig. 1, after the embedded device is powered on, that is, before S210, the method further includes: s200, executing the boot program in the memory by the CPU, and sending a second query message to the control device by the boot program, where the content and the effect of the second query message are the same as those of the first query message in the above embodiment, and therefore, details are not described here again. At this time, the control device receives the second query message when its control program is set to the backup mode, and thus, the control device may initiate a backup process of the bootstrap of the embedded device, thereby determining whether to transmit a backup indication message, which is, for example, 0x 9595959595, by the selection of the user; specifically, when a backup indication message is received within a preset time, the control device is indicated to start monitoring the serial port according to the backup indication message, namely, the backup operation of the bootstrap program is started to be executed; in another case, when the backup indication message is not received within the preset time, the embedded device loads and starts the current boot program, and at this time, the embedded device enters a normal start program, that is, it is stated that the current boot program of the embedded device is not backed up.
S220, reading the current bootstrap program in the memory according to the backup indication message, and calculating the file length, the check field and the file data of the current bootstrap program.
And S230, sending a backup file to the control device so that the control device writes the received backup file into a memory of the control device, verifying the backup file, and after the verification is successful, saving the backup file to a storage position preset in the control device by a user, wherein the backup file comprises a calculation result of the current bootstrap program.
In this implementation, after analyzing the backup indication message, the embedded device determines that a backup process needs to be started, and then calculates the file length, the check field, and the file data of the current bootstrap program by reading the first bootstrap program area in the memory, so as to send a backup file to the control device, where the backup file includes a calculation result of the current bootstrap program; similarly, the control device may also verify the backup file written in the memory after receiving the backup file, and save the backup file successfully verified to a storage location preset in the control device by the user, for example, the user may select a backup mode after starting a control program of the control device, and designate a path of the backup file to be saved, and the backup file may be saved to a boot.
Optionally, if the control device fails to verify the backup file, the method provided in this embodiment further includes: s240, receiving a backup failure message sent by the control device.
In the method for upgrading a boot program according to this embodiment, after backing up a current boot program in an embedded device, the current boot program in the embedded device may be continuously upgraded, and in a specific implementation, after finishing a backup operation, the embedded device is restarted to start to execute an upgrade operation, where the specific mode of upgrading includes:
and S250, receiving an upgrade indication message sent by the control device, wherein the upgrade indication message is used for indicating the embedded device to monitor the serial port.
As in the above embodiment, before S250, the method further includes: s231, the embedded device is restarted, the start-up bootstrap program in the memory is executed again by the CPU, and the first inquiry message is sent to the control device through the start-up bootstrap program.
And S260, receiving an upgrade file sent by the control equipment through a serial port, wherein the upgrade file is calculated by the control equipment according to a file path selected by a user and comprises a file length, a check field and file data.
And S270, writing the upgrade file into a memory of the embedded device to replace the current bootstrap program in the memory.
Specifically, the implementation manners of S250 to S270 may refer to S110 to S130 in the embodiment shown in fig. 1.
Further, in the method provided in this embodiment, when an upgrade error occurs in the process of executing S270, the content in the first bootstrap area in the embedded device may also be recovered, that is, the content may be returned to the state before the upgrade, for example, the upgrade flow may be executed again by using the backup file saved in the boot.
1) And restarting the embedded equipment, executing the boot program again through the CPU, and sending a third inquiry message to the control equipment through the boot program.
2) And receiving a recovery indication message sent by the control equipment, wherein the recovery indication message is used for indicating the embedded equipment to monitor the serial port.
3) And receiving a recovery file sent by the control equipment through the serial port, wherein the recovery file is calculated by the control equipment according to a file path selected by a user and comprises a file length, a check field and file data.
4) And writing the recovery file into the memory of the embedded device so as to restore the bootstrap program in the memory of the embedded device before the upgrade file is written.
In this embodiment, after the upgrade is failed, the embedded device needs to be restarted, the CPU executes the boot program again, and the control program of the control device is also in the upgrade mode when the third query message is sent, so that the processing manner of the embedded device after receiving the recovery indication message is similar to the processing manner of receiving the upgrade indication message in the embodiment shown in fig. 1, and the file content sent by the control device is used to replace the existing boot program in the memory; differently, in this embodiment, the file path selected by the user in the control device may be the path of the backup file stored in the control device through the backup process, that is, the recovery file is one of the backup files selected from the backup files stored in the control device, and may be, for example, the backup file saved in the boot.
In the method provided by this embodiment, when the upgrade operation on the embedded device fails, the backup file stored in the control device may be used to perform the upgrade operation again, that is, the boot program in the embedded device may be restored to the boot program in the memory before the upgrade operation is performed. Therefore, the method provided by the embodiment solves the problem that the upgrade failure cannot be returned in a way of backing up the current bootstrap program in the embedded device before the upgrade operation is executed, thereby realizing the application of the bootstrap program upgrade method to the scene of field upgrade, ensuring the traceability of the method and increasing the application range of the method while further improving the safety in the bootstrap program upgrade process.
Fig. 5 is a flowchart of another boot program upgrading method according to an embodiment of the present invention. The method for upgrading the bootstrap program provided by the embodiment is suitable for the case of upgrading the bootstrap program in the embedded system, and the method can be executed by a control device, the control device is usually implemented by a hardware and software method, and the control device implements the upgrading of the bootstrap program through message interaction and data interaction with the embedded device in the embedded system. As shown in fig. 5, the method of this embodiment may include:
s310, sending an upgrade indicating message to the embedded device, wherein the upgrade indicating message is used for indicating the embedded device to monitor a serial port between the embedded device and the control device.
The method provided by this embodiment may also be applied to the application scenario shown in fig. 2, and before S310, the method further includes: s300, starting a control program of the control equipment, and selecting an upgrading mode on the control program; meanwhile, after the embedded device is powered on, after the CPU starts the boot program in the foregoing embodiments, the method sends a first query signal to the control device, and accordingly, this embodiment further includes: s301, receiving a first query message sent by the embedded device through the control program, wherein the first query message is used for prompting the control device to upgrade a current bootstrap program in the embedded device. The control equipment determines whether to send an upgrade indication message or not through the selection of a user, and indicates the embedded equipment to enter an upgrade process through the message under the condition that the control equipment sends the upgrade indication message, and indicates the embedded equipment to start monitoring the serial port so as to receive an upgrade file sent by the control equipment at any time.
And S320, calculating the file length, the check field and the file data of the upgrade file according to the file path selected by the user.
In this embodiment, after selecting the upgrade mode, the user may specify a path of the boot file to be upgraded, so that the embedded device calculates and obtains the content of the upgrade file according to the file path specified by the user, where the content of the upgrade file is the same as that in each of the above embodiments.
S330, sending the calculated upgrade file to the embedded device through the serial port, so that the embedded device writes the upgrade file into a memory of the embedded device to replace the current bootstrap program in the memory.
In this embodiment, in order to ensure that the embedded device has already analyzed that the current upgrade process is the upgrade process and enters the monitoring state, the operation of sending the upgrade file may be executed after waiting for a certain time after calculating the upgrade file, for example, a delay time of 3S may be set between S320 and S330, so as to ensure that the embedded device may receive the upgrade file through the serial port.
In the bootstrap program upgrading method provided in this embodiment, an upgrade instruction message is sent to an embedded device to instruct the embedded device to start monitoring a serial port between the embedded device and the control device, and at the same time, a terminal calculates the content of an upgrade file according to a file path selected by a user, so that the upgrade file is sent to the embedded device through the serial port, so that the embedded device writes the upgrade file into a memory of the embedded device to replace a current bootstrap program in the memory; the method for upgrading the bootstrap program solves the problems that in the process of upgrading the bootstrap program by adopting the burner, the operation mode of upgrading the bootstrap program is complex and the workload is large because the shell of the embedded device needs to be detached to realize upgrading.
It should be noted that, in the method provided in this embodiment, after the embedded device sends the first query message, the corresponding operation performed according to whether the upgrade indication message is received within the preset time is performed, and after the upgrade file is received and saved in the memory, the upgrade file is verified, and the corresponding operation performed according to the verification result is the same as the operation manner in the embodiments shown in fig. 1 to 4 and has the same beneficial effects, so details are not described here again.
Fig. 6 is a flowchart of a boot program upgrading method according to an embodiment of the present invention. Similar to the embodiment shown in fig. 4, the boot program upgrading method provided by this embodiment is suitable for the case of backing up and upgrading the boot program in the embedded system. As shown in fig. 6, the method of this embodiment may include:
s410, sending a backup indication message to the embedded device, wherein the backup indication message is used for indicating the embedded device to send a backup file to the terminal.
In this embodiment, before S410, the method also includes: s400, starting a control program of the control equipment, and selecting a backup mode on the control program; s401, receiving a second query message sent by the embedded device through the control program, wherein the second query message is used for prompting the control device to backup a current bootstrap program in the embedded device. The control device determines whether to send a backup indication message through the selection of a user, indicates the embedded device that the control device has entered a backup process through the message under the condition that the control device sends the backup indication message, indicates the embedded device to calculate the file length, the check field and the file data of the current bootstrap program in the memory of the embedded device, and sends the backup file to the control device, wherein the content of the calculation result is the backup file.
And S420, receiving a backup file sent by the embedded device through a serial port, wherein the backup file comprises the file length, the check field and the file data of the current bootstrap program in the memory of the embedded device.
And S430, writing the received backup file into a memory of the control device, and verifying the backup file.
S431, judging whether the verification of the backup file is successful; if the result is successful, S440 is executed, and if the result is failed, S432 is executed.
And S440, saving the backup file to a storage position preset in the control device by the user.
S432, sending a backup failure message to the embedded device.
In this embodiment, the control device may also first store the received backup file in the memory for verification, and after the verification of the backup file is successful, complete the backup process, that is, store the backup file in a storage location preset in the control device by the user, for example, after selecting a backup mode on the control program, specify a path of the backup file to be stored in the control device, where the backup file may be stored in a boot. In addition, after the backup file fails to be checked, a backup failure message can be sent to prompt the embedded device.
In the method for upgrading a boot program provided in this embodiment, after backing up a current boot program in an embedded device, the current boot program in the embedded device may be continuously upgraded, and in a specific implementation, after finishing a backup operation, that is, after S440, the embedded device is restarted to start to execute an upgrade operation, where the specific manner of upgrading includes:
s450, sending an upgrade instruction message to the embedded device, wherein the upgrade instruction message is used for instructing the embedded device to monitor a serial port between the embedded device and the control device.
Similarly, before S450, it may also include: s441, selecting an upgrade mode on the control program; s442, receiving, by the control program, a first query message sent by the embedded device, where the first query message is used to prompt the control device to upgrade a current bootstrap program in the embedded device.
And S460, calculating the file length, the check field and the file data of the upgrade file according to the file path selected by the user.
S470, sending the calculated upgrade file to the embedded device through the serial port, so that the embedded device writes the upgrade file into the memory of the embedded device to replace the current bootstrap program in the memory.
Specifically, the implementation manners of S441 to S470 can refer to S300 to S330 in the embodiment shown in fig. 5.
Further, in the method provided in this embodiment, if an upgrade error occurs during the process that the embedded device writes the upgrade file into the memory, the content in the first boot program area in the embedded device may also be recovered, that is, the content may be returned to the state before the upgrade, for example, the upgrade flow may be executed again by using the backup file saved in the boot.
1) And receiving a third inquiry message sent by the embedded device through the control program, wherein the third inquiry message is used for indicating that the embedded device fails to upgrade the current bootstrap program.
2) And sending a recovery indication message to the embedded equipment, wherein the recovery indication message is used for indicating the embedded equipment to monitor the serial port.
3) And calculating the file length, the check field and the file data of the recovery file according to the file path selected by the user.
4) And sending the recovery file to the embedded equipment through the serial port, so that the embedded equipment writes the recovery file into a memory of the embedded equipment to restore the bootstrap program in the memory of the embedded equipment before the upgrade file is written.
In this embodiment, the embedded device also needs to be restarted after the upgrade fails, the CPU executes the boot program again, and the control program of the control device is also in the upgrade mode when the third query message is sent, so that the processing manner of the embedded device after receiving the recovery indication message is similar to the processing manner of receiving the upgrade indication message in the above embodiment, and the file content sent by the control device is used to replace the existing boot program in the memory; differently, in this embodiment, the file path selected by the user in the control device may be the path of the backup file stored in the control device through the backup process, that is, the recovery file is one of the backup files selected from the backup files stored in the control device, and may be, for example, the backup file saved in the boot.
Fig. 7 is a flowchart illustrating an interactive execution of a method for upgrading a bootstrap provided in an embodiment of the present invention. The method for upgrading the bootstrap program provided by the embodiment is suitable for the situation of backing up and upgrading the bootstrap program in the embedded system, and can be executed by the control device and the embedded device. As shown in fig. 7, the method of this embodiment may include:
executed in the control device, S501, a control program of the control device is started, and an upgrade mode is selected on the control program.
And S502, determining the path of the upgrade file through the selection of the user.
The embedded device is then powered on and starts executing, S503, the boot program in the memory is executed by the CPU.
S504, a first query message is sent to the control device through the boot loader.
S505, waiting for a preset time, and judging whether an upgrade indication message is received within the preset time; if so, executing S506; if not, executing S507 to load and start the current bootstrap program.
At this time, after receiving the first query message, the control device determines whether to send a response through the selection of the user, wherein if the upgrade flow needs to be entered, the control device executes S508 and sends an upgrade indication message to the embedded device; accordingly, the determination in S505 is that the serial port is received, and then S506 is executed to start monitoring the serial port.
After sending the upgrade instruction message, the control device continues to execute step S509, and calculates the file length, the check field, and the file data of the upgrade file according to the file path selected by the user, so as to obtain the content of the upgrade file.
And S510, sending the calculated upgrade file to the embedded device through a serial port.
The embedded device is in a monitoring state at this time, and executes S511 after receiving the upgrade file sent by the control device through the serial port, writes the upgrade file received through the serial port into the memory of the embedded device, and verifies the upgrade file.
S512, judging whether the verification of the upgrade file is successful; if the result is successful, step S513 is executed, and if the result is failed, step S514 is executed.
And S513, writing the upgrade file into the memory of the embedded device to replace the current bootstrap program in the memory.
And S514, loading and starting the current bootstrap program.
The method provided in this embodiment may also be implemented by backing up the current boot program of the embedded device before upgrading the current boot program, and the specific implementation manner is that the control device may further execute S515 before executing S501, start the control program of the control device, and select a backup mode on the control program.
S516, the saving path of the backup file is designated by the user' S selection.
The embedded device is then powered on and begins execution, S517, by the CPU executing the boot program in the memory.
S518, a second query message is sent to the control device through the boot loader.
S519, waiting for preset time, and judging whether a backup indication message is received within the preset time waiting; if yes, executing S520; if not, executing S521, loading and starting the current bootstrap program.
At this time, after receiving the second query message, the control device determines whether to send a response through the selection of the user, wherein if the backup process needs to be entered, the control device executes S522 to send a backup indication message to the embedded device; accordingly, the judgment in S519 is received, and S520 is further performed, the current boot program in the memory is read, and the file length, the check field, and the file data of the current boot program are calculated.
S523, sending a backup file to the control device, where the backup file includes a calculation result of the current boot program by the embedded device.
The control device is in a monitoring state at this time, and executes S524 after receiving the backup file sent by the embedded device through the serial port, writes the received backup file into the memory of the control device, and verifies the backup file.
S525, judging whether the verification of the backup file is successful; if the result is successful, S526 is executed, and if the result is failed, S527 is executed.
And S526, saving the backup file to a storage position preset in the control device by the user.
And S527, sending a backup failure message to the embedded device.
Similar to the foregoing embodiment, in the boot program upgrading method provided in this embodiment, when an upgrade error occurs during the execution of S513 by the embedded device, the boot program in the memory of the embedded device may also be restored, that is, returned to the state before the upgrade, for example, the backup file saved in the control device in S526 may be used to re-execute an upgrade process, that is, execute S501 to S514 again, and during this execution, the path for determining the upgrade file selected by the user specifically is as follows: the user determines the path of the backup file stored in the control device as the path of the upgrade file, thereby replacing the upgrade file in S501 to S514 with the backup file stored in the control device.
Fig. 8 is a schematic structural diagram of an embedded device according to an embodiment of the present invention. The embedded device provided by the embodiment is suitable for upgrading the bootstrap program in the embedded system, the embedded device is usually implemented by a hardware and software method, and the upgrading of the bootstrap program is implemented by message interaction and data interaction with the control device in the embedded system. As shown in fig. 8, the embedded device of this embodiment specifically includes a receiving module 11 and a storage module 12.
The receiving module 11 is configured to receive an upgrade indication message sent by the control device, where the upgrade indication message is used to indicate the receiving module 11 to monitor a serial port between the embedded device and the control device.
The method for upgrading a boot program by using an embedded device according to this embodiment may also be applied to the application scenario shown in fig. 2, where an upgrade indication message is sent by a control device when a control program in the control device is in an upgrade mode, and specifically, the embedded device according to this embodiment further includes: a processing module 13, configured to execute a boot program in the memory by the CPU before the receiving module 11 receives the upgrade indication message sent by the control device; a sending module 14, configured to send a first query message to the control device by starting the bootstrap; correspondingly, on one hand, the processing module 13 is further configured to, when the receiving module 11 receives the upgrade indication message within the preset time, start monitoring the serial port according to the upgrade indication message received by the receiving module 11; on the other hand, the processing module 13 is further configured to load and start the current boot program when the receiving module 11 does not receive the upgrade indication message within the preset time.
The receiving module 11 is further configured to receive, through the serial port, an upgrade file sent by the control device, where the upgrade file is calculated by the control device according to a file path selected by a user, and the upgrade file includes a file length, a check field, and file data.
And a storage module 12, configured to write the upgrade file received by the receiving module 11 into a memory of the embedded device to replace the current boot program in the memory.
The embedded device provided in the embodiment of the present invention is used to execute the boot program upgrading method provided in the embodiment of fig. 1 of the present invention, and has corresponding functional modules, which implement similar principles and technical effects, and are not described herein again.
Further, fig. 9 is a schematic structural diagram of another embedded device according to an embodiment of the present invention. On the basis of the embodiment shown in fig. 8, the storage module 12 in this embodiment may specifically include: the storage unit 15 is configured to write the upgrade file into a memory of the embedded device after the receiving module 11 receives the upgrade file sent by the control device; a verification unit 16, configured to verify the upgrade file written in the memory of the embedded device by the storage unit 15; correspondingly, the storage unit 15 is further configured to write the upgrade file into the memory of the embedded device after the verification unit 16 successfully verifies the upgrade file; in another possible implementation manner, the verification unit 16 is further configured to load and start the current boot program after the upgrade file is failed to be verified.
The embedded device provided by the embodiment of the invention can upgrade the bootstrap program of the embedded device, and can backup the current bootstrap program in the memory of the embedded device to the control device before upgrading, and the specific implementation mode is as follows: the receiving module 11 is further configured to receive a backup indication message sent by the control device before receiving the upgrade indication message sent by the control device, where the backup indication message is used to indicate the control device to start monitoring the serial port; correspondingly, the embedded device further comprises: a calculating module 17, configured to read a current boot program in the memory according to the backup indication message received by the receiving module 11, and calculate a file length, a check field, and file data of the current boot program; the sending module 14 is further configured to send a backup file to the control device, so that the control device writes the received backup file into a memory of the control device, verifies the backup file, and stores the backup file in a storage location preset in the control device by a user after the verification is successful, where the backup file includes a calculation result of the current boot program.
Similar to the above embodiment, if the backup indication message is sent by the control device when the control program is in the backup mode, the processing module 13 is further configured to execute the boot program in the memory by the CPU before the receiving module 11 receives the backup indication message sent by the control device; a sending module 14, configured to send a second query message to the control device by starting the bootstrap program; correspondingly, on one hand, the processing module 13 is further configured to instruct the control device to start monitoring the serial port according to the backup indication message received by the receiving module 11 when the receiving module 11 receives the backup indication message within the preset time; on the other hand, the processing module 13 is further configured to load and start the current boot program when the receiving module 11 does not receive the backup indication message within the preset time.
Optionally, if the control device fails to verify the backup file, and a prompt message may also be sent to the embedded device, the receiving module 11 in this embodiment is further configured to receive a backup failure message sent by the control device after the sending module 14 sends the backup file to the terminal device, where the backup failure message is used to indicate that the control device fails to verify the backup file.
Furthermore, in the embedded device provided in this embodiment, when an upgrade error occurs during the process of writing the upgrade file into the memory by the storage module 12, the boot program in the memory of the embedded device may also be recovered, that is, returned to the state before upgrade, for example, a backup file saved in the control device when performing a backup operation may be used to perform an upgrade operation again, and in the process of performing the upgrade operation this time, a path of the upgrade file is specifically a path of the backup file stored in the control device, so that when performing the upgrade operation, the upgrade file is replaced with the backup file stored in the control device, and the specific implementation manner is as follows: the processing module 13 is further configured to restart the embedded device when an upgrade error occurs in the process that the storage module 12 writes the upgrade file into the memory of the embedded device, and execute the boot program again through the CPU; a sending module 14, configured to send a third query message to the control device by starting the bootstrap program; the receiving module 11 is further configured to receive a recovery indication message sent by the control device, where the recovery indication message is used to indicate the embedded device to monitor the serial port, and receive a recovery file sent by the control device through the serial port, where the recovery file is calculated by the control device according to a file path selected by a user, and the recovery file includes a file length, a check field, and file data; the storage module 12 is further configured to write the recovery file into the memory of the embedded device to restore the boot program in the memory of the embedded device before writing the upgrade file. The operation of the recovery boot program is similar to that of the upgrade boot program, except that the contents of the files written in the memory of the embedded device are different, and therefore, the detailed description thereof is omitted.
The embedded device provided in the embodiment of the present invention is used to execute the boot program upgrading method provided in the embodiments shown in fig. 3 and fig. 4 of the present invention, and has corresponding functional modules, which implement similar principles and technical effects, and are not described herein again.
Fig. 10 is a schematic structural diagram of a control device according to an embodiment of the present invention. The control device provided by this embodiment is suitable for upgrading a bootstrap program in an embedded system, and the control device is usually implemented by a hardware and software method, and the upgrading of the bootstrap program is implemented by message interaction and data interaction with an embedded device in the embedded system. As shown in fig. 10, the control device of the present embodiment specifically includes a sending module 21 and a calculating module 22.
The sending module 21 is configured to send an upgrade indication message to the embedded device, where the upgrade indication message is used to indicate the embedded device to monitor a serial port between the embedded device and the control device.
The control device provided in this embodiment may also be applied to the application scenario shown in fig. 2 when performing boot program upgrade, and in a specific implementation, the control device further includes: the starting module 23 is configured to start a control program of the control device before the sending module 21 sends the upgrade instruction message to the embedded device, and select an upgrade mode on the control program; meanwhile, after the embedded device is powered on, after the CPU starts the boot program described in the above embodiments, the control device sends a first query signal to the control device, and accordingly, the control device further includes: the receiving module 24 is configured to receive, by the control program, a first query message sent by the embedded device, where the first query message is used to prompt the control device to upgrade a current boot program in the embedded device.
The calculation module 22 is used for calculating the file length, the check field and the file data of the upgrade file according to the file path selected by the user;
the sending module 21 is further configured to send the upgrade file calculated by the calculating module 22 to the embedded device through the serial port, so that the embedded device writes the upgrade file into a memory of the embedded device to replace the current boot program in the memory.
The control device provided in the embodiment of the present invention is configured to execute the boot program upgrading method provided in the embodiment of fig. 5 of the present invention, and has corresponding functional modules, which have similar implementation principles and technical effects, and are not described herein again.
It should be noted that, in the method for executing a bootstrap upgrade by a control device according to this embodiment, after sending a first query message, an embedded device performs a corresponding operation according to whether an upgrade instruction message is received within a preset time, verifies an upgrade file after receiving the upgrade file and saving the upgrade file in a memory, and performs a corresponding operation according to a verification result, which are the same as the operation manners in the foregoing embodiments and have the same beneficial effects, and therefore, details are not repeated here.
Further, fig. 11 is a schematic structural diagram of another control device according to an embodiment of the present invention. The control device provided by the embodiment of the invention can not only upgrade the bootstrap program of the control device, but also backup the current bootstrap program in the memory of the embedded device to the control device before upgrading, and the specific implementation mode is as follows: the sending module 21 is further configured to send a backup indication message to the embedded device before sending the upgrade indication message to the embedded device, where the backup indication message is used to indicate the embedded device to send a backup file to the terminal; correspondingly, the receiving module 24 is further configured to receive a backup file sent by the embedded device through the serial port, where the backup file includes a file length, a check field, and file data of a current boot program in a memory of the embedded device; on the basis of the above embodiment shown in fig. 10, the control device provided in this embodiment further includes: a storage module 25, configured to write the backup file received by the receiving module 24 into a memory of the control device; a checking module 26, configured to check the backup file written in the memory of the control device by the storage module 25; correspondingly, the storage module 25 is further configured to, after the verification module 26 successfully verifies the backup file, store the backup file in a storage location preset in the control device by the user; in another implementation manner, the sending module 21 is further configured to send a backup failure message to the embedded device after the verification module 26 fails to verify the backup file.
Similar to the foregoing embodiment, the control device provided in this embodiment, the starting module 23, is further configured to start the control program of the control device before the sending module 21 sends the backup indication message to the embedded device, and select the backup mode on the control program of the control device; meanwhile, after the embedded device is powered on, after the CPU starts the boot program in each of the above embodiments, the receiving module 24 is further configured to receive a second query message sent by the embedded device through the control program, where the second query message is used to prompt the control device to backup the current boot program in the embedded device.
Furthermore, when the control device provided in this embodiment executes the boot program upgrade mode, and when an upgrade error occurs in a process in which the embedded device writes the upgrade file into its memory, the control device may also restore the boot program in the memory of the embedded device, that is, return to a state before the upgrade, for example, a backup file saved in the control device when performing a backup operation may be used to perform an upgrade operation again, and in the process of executing the upgrade operation this time, a path of the upgrade file is specifically a path of the backup file stored in the control device, so that when executing the upgrade operation, the upgrade file is replaced with the backup file stored in the control device, which is specifically implemented as follows: the receiving module 24 is further configured to receive, by the control program, a third query message sent by the embedded device after the sending module 21 sends the calculated upgrade file to the embedded device through the serial port, where the third query message is used to indicate that the embedded device fails to upgrade the current bootstrap program; the sending module 21 is further configured to send a recovery indication message to the embedded device, where the recovery indication message is used to indicate the embedded device to monitor the serial port; the calculation module 22 is further configured to calculate a file length, a check field, and file data of the restored file according to the file path selected by the user; thus, the sending module 21 sends the recovery file calculated by the calculating module 22 to the embedded device through the serial port, so that the embedded device writes the recovery file into the memory of the embedded device to restore the boot program in the memory of the embedded device before writing the upgrade file. The operation of the recovery boot program is similar to that of the upgrade boot program, except that the contents of the files written in the memory of the embedded device are different, and therefore, the detailed description thereof is omitted.
Fig. 2 is a schematic structural diagram of an embedded system also provided in the embodiment of the present invention. As shown in fig. 2, the embedded system provided in this embodiment may include an embedded device 100 and a control device 200, where the embedded device 100 may be an embedded device shown in any one of the embodiments of fig. 8 and 9, and the control device 200 may be a control device shown in any one of the embodiments of fig. 10 and 11, and may be used to execute the boot program upgrading method shown in fig. 1 and fig. 3 to fig. 7, and the specific implementation manner and the beneficial effect thereof are the same as those in the embodiments, and therefore are not described herein again.
Although the embodiments of the present invention have been described above, the above description is only for the convenience of understanding the present invention, and is not intended to limit the present invention. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (29)

1. A boot program upgrade method, comprising:
the method comprises the steps that an embedded device sends a first inquiry message for prompting the control device to update a current bootstrap program in the embedded device to a control device by starting the bootstrap program so as to wait for receiving an update indication message which is sent by the control device and used for monitoring a serial port between the embedded device and the control device;
the embedded equipment monitors the serial port according to the received upgrading indication message so as to receive an upgrading file of a bootstrap program which is calculated according to a file path appointed by a user and sent by the control equipment after the control equipment sends the upgrading indication message from the monitored serial port, wherein the upgrading file comprises the file length of the control equipment, a check field and file data;
and checking the upgrade file of the bootstrap program, and writing the upgrade file of the bootstrap program which is successfully checked into a memory of the embedded equipment so as to replace the current bootstrap program in the memory.
2. The boot program upgrade method according to claim 1, wherein the verifying the upgrade file of the boot program includes:
and writing the upgrade file of the bootstrap program received through the serial port into a memory of the embedded equipment, verifying the upgrade file of the bootstrap program, writing the upgrade file of the bootstrap program into a memory of the embedded equipment after the upgrade file of the bootstrap program is successfully verified, and loading and starting the current bootstrap program after the upgrade file of the bootstrap program is unsuccessfully verified.
3. The method for upgrading the bootstrap program according to claim 2, wherein the upgrade indication message is sent by the control device when the control program in the control device is in an upgrade mode, and the sending, by starting the bootstrap program, a first query message to the control device for prompting the control device to upgrade a current bootstrap program in the embedded device by the embedded device to wait for receiving the upgrade indication message sent by the control device for monitoring a serial port between the embedded device and the control device includes:
executing a boot loader in the memory by a processor CPU and transmitting a first query message to the control device through the boot loader;
and waiting for receiving the upgrade indication message within a preset time, so that the serial port is monitored according to the upgrade indication message when the upgrade indication message is received within the preset time, and the current bootstrap program is loaded and started when the upgrade indication message is not received within the preset time.
4. The method for upgrading the boot program according to claim 3, wherein the embedded device sends a first query message for prompting the control device to upgrade the current boot program in the embedded device to the control device by starting the boot program to wait before receiving an upgrade instruction message sent by the control device for monitoring a serial port between the embedded device and the control device, further comprising:
receiving a backup indication message sent by the control device, wherein the backup indication message is used for indicating the control device to start monitoring the serial port;
reading the current bootstrap program in the memory according to the backup indication message, and calculating the file length, the check field and the file data of the current bootstrap program;
and sending a backup file to the control equipment so that the control equipment writes the received backup file into a memory of the control equipment, verifying the backup file, and after the verification is successful, saving the backup file to a storage position preset in the control equipment by the user, wherein the backup file comprises a calculation result of the current bootstrap program.
5. The boot program upgrading method according to claim 4, wherein the backup indication message is sent by the control device when the control program is in the backup mode, and before receiving the backup indication message sent by the control device, the method further comprises:
executing the boot loader in the memory by a CPU, and transmitting a second inquiry message to the control device through the boot loader;
when the backup indication message is received within the preset time, indicating the control equipment to start monitoring the serial port according to the backup indication message;
and when the backup indication message is not received within a preset time, loading and starting the current bootstrap program.
6. The boot program upgrade method according to claim 4, further comprising, after the sending the backup file to the control device:
and receiving a backup failure message sent by the control device, wherein the backup failure message is used for indicating that the control device fails to verify the backup file.
7. The boot program upgrading method according to any one of claims 4 to 6, wherein an upgrade error occurs during writing of the upgrade file of the boot program into the memory of the embedded device, the method further comprising:
restarting the embedded equipment, and sending a third inquiry message to the control equipment through the starting bootstrap program after the CPU executes the starting bootstrap program again;
receiving a recovery indication message sent by the control device, wherein the recovery indication message is used for indicating the embedded device to monitor the serial port;
receiving a recovery file sent by the control equipment through the serial port, wherein the recovery file is calculated by the control equipment according to a file path selected by the user and comprises a file length, a check field and file data;
and writing the recovery file into a memory of the embedded device to restore the bootstrap program in the memory of the embedded device before writing the upgrade file of the bootstrap program.
8. The boot program upgrade method according to claim 7, wherein the restore file is one of backup files selected from the backup files stored in the control device.
9. A boot program upgrade method, comprising:
after receiving a first query message which is sent to the control equipment by the embedded equipment through starting a bootstrap program and used for prompting the control equipment to upgrade a current bootstrap program in the embedded equipment, the control equipment sends an upgrade indication message for monitoring a serial port between the embedded equipment and the control equipment to the embedded equipment;
after the control equipment sends the upgrading indication message to the embedded equipment, an upgrading file of a bootstrap program comprising file length, check fields and file data is calculated according to a file path specified by a user;
the control equipment sends the upgrade file of the bootstrap program which is calculated according to the file path appointed by the user and comprises the file length, the check field and the file data to the embedded equipment through the serial port between the embedded equipment and the control equipment which indicates monitoring in the upgrade indication message, so that the embedded equipment checks the upgrade file of the bootstrap program and writes the upgrade file of the bootstrap program which is successfully checked into the memory of the embedded equipment so as to replace the current bootstrap program in the memory.
10. The boot program upgrade method according to claim 9, further comprising, before sending an upgrade indication message to the embedded device:
starting a control program of the control equipment, and selecting an upgrading mode on the control program;
and receiving a first inquiry message sent by the embedded device through the control program.
11. The boot program upgrade method according to claim 10, further comprising, before sending an upgrade indication message to the embedded device:
sending a backup indication message to the embedded equipment, wherein the backup indication message is used for indicating the embedded equipment to send a backup file to a terminal;
receiving a backup file sent by the embedded equipment through the serial port, wherein the backup file comprises the file length, the check field and the file data of the current bootstrap program in a memory of the embedded equipment;
writing the received backup file into a memory of the control equipment, and verifying the backup file;
after the backup file is successfully verified, saving the backup file to a storage position preset in the control equipment by the user;
and when the backup file is failed to be checked, sending a backup failure message to the embedded equipment.
12. The boot program upgrade method according to claim 11, further comprising, before sending the backup indication message to the embedded device:
starting a control program of the control equipment, and selecting a backup mode on the control program;
and receiving a second query message sent by the embedded device through the control program, wherein the second query message is used for prompting the control device to back up the current bootstrap program in the embedded device.
13. The method for upgrading a bootstrap program according to claim 11 or 12, after the sending the upgrade file to the embedded device through the serial port between the embedded device and the control device indicated to be monitored in the upgrade indication message, further comprising:
receiving, by the control program, a third query message sent by the embedded device, where the third query message is used to indicate that the embedded device fails to upgrade the current bootstrap program;
sending a recovery indication message to the embedded device, wherein the recovery indication message is used for indicating the embedded device to monitor the serial port;
calculating the file length, the check field and the file data of the recovered file according to the file path selected by the user;
and sending the recovery file to the embedded equipment through the serial port, so that the embedded equipment writes the recovery file into a memory of the embedded equipment to restore the bootstrap program in the memory of the embedded equipment before the upgrade file of the bootstrap program is written.
14. The boot program upgrade method according to claim 13, wherein the restoration file is one of backup files selected from the backup files stored in the control device.
15. An embedded device, comprising:
the receiving module is used for receiving an upgrading indication message which is sent by the control equipment and used for monitoring a serial port between the embedded equipment and the control equipment;
a processing module, configured to send, to the control device by starting a bootstrap program, a first query message for prompting the control device to upgrade a current bootstrap program in the embedded device, so that the receiving module waits for receiving the upgrade indication message, and monitors the serial port according to the received upgrade indication message, so that the receiving module receives, through the monitored serial port, an upgrade file of the bootstrap program, which is calculated according to a file path specified by a user and sent by the control device after sending the upgrade indication message, and includes a file length, a check field, and file data of the control device;
and the storage module is used for verifying the upgrade file of the bootstrap program and writing the upgrade file of the bootstrap program received by the receiving module, which is successfully verified, into a memory of the embedded device so as to replace the current bootstrap program in the memory.
16. The embedded device of claim 15, wherein the storage module comprises:
the storage unit is used for writing the upgrade file of the bootstrap program into the memory of the embedded equipment after the receiving module receives the upgrade file of the bootstrap program sent by the control equipment;
the verification unit is used for verifying the upgrade file of the bootstrap program written in the memory of the embedded equipment by the storage unit;
the storage unit is further configured to write the upgrade file of the boot program into a memory of the embedded device after the verification unit successfully verifies the upgrade file of the boot program;
the verification unit is further configured to load and start the current boot program after verification of the upgrade file of the boot program fails.
17. The embedded device according to claim 16, wherein the upgrade indication message is sent by the control device in an upgrade mode of a control program in the control device;
the processing module is also used for executing the boot program in the memory through a CPU (central processing unit);
the embedded device further comprises:
a sending module, configured to send a first query message to the control device through the boot loader;
the processing module is further configured to start monitoring the serial port according to the upgrade indication message received by the receiving module when the receiving module receives the upgrade indication message within a preset time, and load and start the current boot program when the receiving module does not receive the upgrade indication message within the preset time.
18. The embedded device according to claim 17, wherein the receiving module is further configured to receive a backup indication message sent by the control device before receiving an upgrade indication message sent by the control device, where the backup indication message is used to instruct the control device to start monitoring the serial port;
the embedded device further comprises: the calculation module is used for reading the current bootstrap program in the memory according to the backup indication message received by the receiving module and calculating the file length, the check field and the file data of the current bootstrap program;
the sending module is further configured to send a backup file to the control device, so that the control device writes the received backup file into a memory of the control device, verifies the backup file, and stores the backup file into a storage location preset in the control device by the user after the verification is successful, where the backup file includes a calculation result of the current boot program.
19. The embedded device according to claim 18, wherein the backup indication message is sent by the control device when the control program is in a backup mode, and the processing module is further configured to execute the boot program in the memory through a CPU before the receiving module receives the backup indication message sent by the control device;
the sending module is further configured to send a second query message to the control device through the boot loader;
the processing module is further configured to instruct the control device to start monitoring the serial port according to the backup indication message received by the receiving module when the receiving module receives the backup indication message within a preset time;
the processing module is further configured to load and start the current bootstrap program when the receiving module does not receive the backup indication message within a preset time.
20. The embedded device according to claim 18, wherein the receiving module is further configured to receive a backup failure message sent by the control device after the sending module sends the backup file to the control device, where the backup failure message is used to indicate that the control device fails to check the backup file.
21. The embedded device according to any one of claims 18 to 20, wherein the processing module is further configured to restart the embedded device when an upgrade error occurs during the process that the storage module writes the upgrade file of the boot program into the memory of the embedded device, and execute the boot program again through the CPU;
the sending module is further configured to send a third query message to the control device through the boot loader;
the receiving module is further configured to receive a recovery indication message sent by the control device, where the recovery indication message is used to indicate the embedded device to monitor the serial port, and receive a recovery file sent by the control device through the serial port, where the recovery file is calculated by the control device according to a file path selected by the user, and the recovery file includes a file length, a check field, and file data;
and the storage module is also used for writing the recovery file into a memory of the embedded equipment so as to restore the bootstrap program in the memory of the embedded equipment before the upgrade file of the bootstrap program is written.
22. The embedded device of claim 21, wherein the restore file is a selected one of the backup files stored in the control device.
23. A control apparatus, characterized by comprising:
the device comprises a sending module, a receiving module and a processing module, wherein the sending module is used for sending a first query message which is sent to the control equipment by starting a bootstrap program and used for prompting the control equipment to upgrade the current bootstrap program in the embedded equipment to the embedded equipment, and then sending an upgrade indication message used for monitoring a serial port between the embedded equipment and the control equipment to the embedded equipment;
the computing module is used for computing an upgrade file of a bootstrap program comprising file length, check fields and file data according to a file path specified by a user after the upgrade indication message is sent to the embedded equipment;
the sending module is further configured to send, to the embedded device, an upgrade file of a bootstrap program including a file length, a check field, and file data, which is calculated according to a file path specified by a user, through a serial port between the embedded device and the control device, which is monitored by the indication in the upgrade indication message, so that the embedded device checks the upgrade file of the bootstrap program, and writes the upgrade file of the bootstrap program, which is checked successfully, into a memory of the embedded device to replace the current bootstrap program in the memory.
24. The control apparatus according to claim 23, characterized in that the control apparatus further comprises: the starting module is used for starting a control program of the control equipment and selecting an upgrading mode on the control program before the sending module sends the upgrading indication message to the embedded equipment;
and the receiving module is used for receiving a first inquiry message sent by the embedded equipment through the control program.
25. The control device according to claim 24, wherein the sending module is further configured to send a backup indication message to the embedded device before sending an upgrade indication message to the embedded device, where the backup indication message is used to instruct the embedded device to send a backup file to a terminal;
the receiving module is further configured to receive a backup file sent by the embedded device through the serial port, where the backup file includes a file length, a check field, and file data of the current boot program in a memory of the embedded device;
the control apparatus further includes: the storage module is used for writing the backup file received by the receiving module into the memory of the control equipment;
the checking module is used for checking the backup file written into the memory of the control equipment by the storage module;
the storage module is further configured to, after the verification module successfully verifies the backup file, store the backup file in a storage location preset in the control device by the user;
the sending module is further configured to send a backup failure message to the embedded device after the checking module fails to check the backup file.
26. The control device according to claim 25, wherein the starting module is further configured to start the control program of the control device and select a backup mode on the control program of the control device before the sending module sends the backup indication message to the embedded device;
the receiving module is further configured to receive, through the control program, a second query message sent by the embedded device, where the second query message is used to prompt the control device to backup the current bootstrap program in the embedded device.
27. The control device according to claim 25 or 26, wherein the receiving module is further configured to receive, by the control program, a third query message sent by the embedded device after the sending module sends the computed upgrade file of the bootstrap program to the embedded device through the serial port, where the third query message is used to indicate that the embedded device fails to upgrade the current bootstrap program;
the sending module is further configured to send a recovery indication message to the embedded device, where the recovery indication message is used to indicate the embedded device to monitor the serial port;
the calculation module is also used for calculating the file length, the check field and the file data of the recovery file according to the file path selected by the user;
the sending module is further configured to send the recovery file calculated by the calculating module to the embedded device through the serial port, so that the embedded device writes the recovery file into a memory of the embedded device, so as to restore the bootstrap program in the memory of the embedded device before the upgrade file of the bootstrap program is written.
28. The control device according to claim 27, wherein the restoration file is one of the backup files selected from the backup files stored in the control device.
29. An embedded system, comprising: an embedded device according to any one of claims 15 to 22 and a control device according to any one of claims 23 to 28.
CN201510339079.5A 2015-06-17 2015-06-17 Boot program upgrading method, embedded equipment, control equipment and embedded system Active CN106257417B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510339079.5A CN106257417B (en) 2015-06-17 2015-06-17 Boot program upgrading method, embedded equipment, control equipment and embedded system
PCT/CN2016/079917 WO2016202088A1 (en) 2015-06-17 2016-04-21 Bootstrap program upgrade method, embedded device, control device and embedded system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510339079.5A CN106257417B (en) 2015-06-17 2015-06-17 Boot program upgrading method, embedded equipment, control equipment and embedded system

Publications (2)

Publication Number Publication Date
CN106257417A CN106257417A (en) 2016-12-28
CN106257417B true CN106257417B (en) 2021-07-20

Family

ID=57544970

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510339079.5A Active CN106257417B (en) 2015-06-17 2015-06-17 Boot program upgrading method, embedded equipment, control equipment and embedded system

Country Status (2)

Country Link
CN (1) CN106257417B (en)
WO (1) WO2016202088A1 (en)

Families Citing this family (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107613286A (en) * 2017-08-30 2018-01-19 深圳市芯智科技有限公司 A kind of file monitoring method for being used to avoid retest set top box
CN107608721A (en) * 2017-09-13 2018-01-19 北京小鸟看看科技有限公司 Wear the upgrade method of virtual reality device and its bootstrap loader
CN107885523B (en) * 2017-11-10 2021-08-31 航宇救生装备有限公司 Rapid and stable serial port software upgrading method
CN108572830A (en) * 2017-12-22 2018-09-25 深圳市鼎阳科技有限公司 Upgrade method, the system of a kind of embedded system and its bootstrap
CN108614717A (en) * 2018-04-11 2018-10-02 厦门亿联网络技术股份有限公司 A kind of system boot method based on USB
CN110413310A (en) * 2018-04-28 2019-11-05 深圳市优必选科技有限公司 Programme upgrade method and terminal device
CN109254727A (en) * 2018-08-20 2019-01-22 广东九联科技股份有限公司 A kind of self-regeneration method of embedded device
CN109213510A (en) * 2018-09-21 2019-01-15 深圳市鼎阳科技有限公司 A kind of application program updating method and storage medium for embedded device
CN109189461B (en) * 2018-11-27 2022-01-18 上海辛格林纳新时达电机有限公司 Procedure upgrading method for elevator control system, elevator control system and elevator equipment
CN109857433B (en) * 2019-01-15 2022-08-19 四川虹美智能科技有限公司 Single chip microcomputer software upgrading tool and method
CN110286933A (en) * 2019-06-28 2019-09-27 北京音磅其声科技有限公司 A kind of cross-system serial ports upgrade method
CN110825414B (en) * 2019-11-06 2024-03-01 许继集团有限公司 Program upgrading device, embedded device and program upgrading method thereof
CN111258604A (en) * 2020-01-14 2020-06-09 深圳市有为信息技术发展有限公司 Bootloader upgrading system and method
CN112445508B (en) * 2020-10-17 2022-10-04 中国航空工业集团公司洛阳电光设备研究所 ARM application program online upgrading method based on CAN bus
CN112527371A (en) * 2020-12-17 2021-03-19 杭州海康威视数字技术股份有限公司 Boot loader upgrading method and device, electronic equipment and storage medium
CN112748959A (en) * 2020-12-29 2021-05-04 杭州迪普科技股份有限公司 Embedded system starting method, flash memory burning method and system updating method
CN112612498A (en) * 2020-12-30 2021-04-06 深圳市九洲电器有限公司 Embedded equipment upgrading method and embedded equipment
CN112882731A (en) * 2021-01-08 2021-06-01 北京锦鸿希电信息技术股份有限公司 Embedded software upgrading method and device
CN112783692A (en) * 2021-01-12 2021-05-11 重庆海云捷迅科技有限公司 SoC data recovery system and method
CN113064621A (en) * 2021-04-14 2021-07-02 艾体威尔电子技术(北京)有限公司 Method for upgrading password keyboard system firmware through intelligent device android system
CN113157287B (en) * 2021-04-30 2023-03-10 深圳市格灵精睿视觉有限公司 File burning method and device and computer readable storage medium
CN113467842B (en) * 2021-06-25 2023-09-19 厦门码灵半导体技术有限公司 Method for starting embedded device suitable for industrial application scene, embedded device and computer readable storage medium
CN113608758A (en) * 2021-07-15 2021-11-05 东莞新能安科技有限公司 Software upgrading method and device, battery management system, battery and power utilization device
CN115981698A (en) * 2023-03-21 2023-04-18 苏州浪潮智能科技有限公司 Firmware upgrading method and device
CN117573156A (en) * 2023-10-19 2024-02-20 京源中科科技股份有限公司 Ultrasonic water meter upgrading method, system and device supporting infrared function

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101158907A (en) * 2007-10-26 2008-04-09 中兴通讯股份有限公司 Bootstrap on-line upgrading method
CN102203732A (en) * 2011-05-27 2011-09-28 华为技术有限公司 Software upgrading method, apparatus and optical module
CN102486733A (en) * 2010-12-03 2012-06-06 中兴通讯股份有限公司 Method and device for upgrading boot program
CN104090796A (en) * 2014-07-08 2014-10-08 成都万维图新信息技术有限公司 Embedded device program updating method and system
US20140351569A1 (en) * 2010-11-08 2014-11-27 Gemalto Sa Software updating process for an embedded device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100578461C (en) * 2008-03-12 2010-01-06 中兴通讯股份有限公司 Backup method and apparatus for bootstrap
CN101923500A (en) * 2010-07-14 2010-12-22 康佳集团股份有限公司 Backup and update method and device of bootstrap program in embedded equipment
CN102184109B (en) * 2011-04-12 2014-07-09 杭州华三通信技术有限公司 Boot software automatic updating control method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101158907A (en) * 2007-10-26 2008-04-09 中兴通讯股份有限公司 Bootstrap on-line upgrading method
US20140351569A1 (en) * 2010-11-08 2014-11-27 Gemalto Sa Software updating process for an embedded device
CN102486733A (en) * 2010-12-03 2012-06-06 中兴通讯股份有限公司 Method and device for upgrading boot program
CN102203732A (en) * 2011-05-27 2011-09-28 华为技术有限公司 Software upgrading method, apparatus and optical module
CN104090796A (en) * 2014-07-08 2014-10-08 成都万维图新信息技术有限公司 Embedded device program updating method and system

Also Published As

Publication number Publication date
WO2016202088A1 (en) 2016-12-22
CN106257417A (en) 2016-12-28

Similar Documents

Publication Publication Date Title
CN106257417B (en) Boot program upgrading method, embedded equipment, control equipment and embedded system
TWI633487B (en) Method and computer system for automatically recovering the bios image file
CN104102518B (en) double-CPU system and program upgrading method thereof
WO2020062887A1 (en) Firmware upgrading method and system based on flash micro-controller, and flash micro-controller
CN103106092A (en) System software updating method and device in terminal appliance
CN106020875B (en) Firmware update management method and device of embedded terminal
WO2020114431A1 (en) Fpga upgrading method based on pcie interface
WO2021136200A1 (en) Bootloader loading method, storage medium, and embedded terminal
CN110069363B (en) Method for updating boot loader of multiprocessor device, storage medium and device
CN114138295A (en) Method, device and system for upgrading application program firmware of electronic equipment
CN110908733B (en) Working mode determining method and device, and control method and device
CN112612498A (en) Embedded equipment upgrading method and embedded equipment
CN116755749A (en) On-board MCU upgrading method, on-board MCU, board card and information processing system
CN114995854A (en) Application program online upgrading method and device, terminal and operation machine
US9529581B2 (en) Circuit and method for writing program codes of basic input/output system
CN115061704A (en) Firmware upgrading method and electronic equipment
CN112685063A (en) Feature library updating method and device, network equipment and readable storage medium
CN108073481B (en) Server system capable of providing hardware operation information and processing method thereof
CN111078452A (en) BMC firmware image recovery method and device
CN116991637B (en) Operation control method and device of embedded system, electronic equipment and storage medium
CN115878145B (en) Electronic device, system upgrading method thereof and computer readable storage medium
CN113687843B (en) Method for automatically recovering firmware of baseboard management controller
CN109271191B (en) Information processing method and electronic equipment
CN117492799A (en) Software upgrading method and device, terminal equipment and storage medium
CN113778756A (en) Fault recovery method, device, equipment and medium for BMC (baseboard management controller) firmware

Legal Events

Date Code Title Description
C06 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