WO2016202088A1 - 引导程序升级方法、嵌入式设备、控制设备及嵌入式系统 - Google Patents

引导程序升级方法、嵌入式设备、控制设备及嵌入式系统 Download PDF

Info

Publication number
WO2016202088A1
WO2016202088A1 PCT/CN2016/079917 CN2016079917W WO2016202088A1 WO 2016202088 A1 WO2016202088 A1 WO 2016202088A1 CN 2016079917 W CN2016079917 W CN 2016079917W WO 2016202088 A1 WO2016202088 A1 WO 2016202088A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
upgrade
control device
backup
embedded device
Prior art date
Application number
PCT/CN2016/079917
Other languages
English (en)
French (fr)
Inventor
解义超
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016202088A1 publication Critical patent/WO2016202088A1/zh

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

Definitions

  • This document refers to, but is not limited to, computer technology, especially a boot program (BOOT) upgrade method, embedded devices, control devices, and embedded systems.
  • BOOT boot program
  • ES embedded System
  • Boot devices for embedded devices are usually stored in non-volatile memory, such as NOR FLASH and NAND FLASH.
  • the main functions of the boot program include initializing the CPU (Central Processing Unit) and DDRAM (Display Data Random Access). Memory, display data random access memory, etc., and then boot the OS (Operating System, operating system) or application startup.
  • the boot program is the first program of the operation after the embedded device is powered on. If the boot program fails to be upgraded, the embedded device cannot be started. For example, in the process of using the boot program's own commands to implement self-updating and upgrading, If the upgrade fails, it will cause the embedded device to fail to start.
  • the boot program currently used usually can use the burner, and the boot program of the version to be upgraded is burned to the embedded machine through the writer.
  • the boot program of the version to be upgraded is burned to the embedded machine through the writer.
  • additional programming software is required at the same time.
  • the embodiment of the invention provides a boot program upgrade method, an embedded device, a control device and an embedded system, which can solve the problem that the boot device is upgraded by using a writer, and the shell of the embedded device needs to be removed to implement the upgrade.
  • the operation method of the upgrade boot program is complicated and the workload is large.
  • a bootloader upgrade method including:
  • an upgrade indication message where the upgrade indication message is used to notify the embedded device to monitor a serial port between the embedded device and the control device, and receive, by using the serial port, an upgrade file sent by the control device,
  • the upgrade file is calculated by the control device according to the selected file path, where the upgrade file includes a file length, a check field, and file data;
  • the upgrade file is written to the memory of the embedded device to replace the current boot program in the memory.
  • the method further includes:
  • the upgrade indication message is sent by the control device in an upgrade mode
  • the upgrade indication message sent by the control device includes:
  • the method further includes:
  • the current boot program is loaded and started.
  • the method before the upgrade indication message sent by the receiving control device, the method further includes:
  • the backup file is saved to a pre-set storage location, and the backup file includes a calculation result for the current boot program.
  • the backup indication message is sent by the control device in a backup mode
  • the receiving the backup indication message sent by the control device further includes:
  • the method further includes:
  • the control device If the backup indication message is received in the preset second time, the control device is instructed to start listening to the serial port according to the backup indication message;
  • the current boot program is loaded and started.
  • the method further includes:
  • the method further includes:
  • the recovery file is written to the memory of the embedded device to restore a bootloader in the memory of the embedded device prior to writing the upgrade file.
  • the recovery file is a backup file selected from the backup files stored in the control device.
  • a bootloader upgrade method including:
  • the method before the sending the upgrade indication message to the embedded device, the method further includes:
  • the method before the sending the upgrade indication message to the embedded device, the method further includes:
  • a backup failure message is sent to the embedded device.
  • the method before the sending the backup indication message to the embedded device, the method further includes:
  • the method further includes:
  • the recovery file is a backup file selected from the backup files stored in the control device.
  • An embedded device that includes:
  • a first receiving module configured to receive an upgrade indication message sent by the control device, where the upgrade refers to The message is used to indicate that the first receiving module monitors a serial port between the embedded device and the control device; and receives an upgrade file sent by the control device by using the serial port, where the upgrade file is the control device Calculated according to the selected file path, the upgrade file includes a file length, a check field, and file data;
  • a first storage module configured to write an upgrade file received by the first receiving module into a memory of the embedded device to replace a current boot program in the memory.
  • the first storage module includes: a storage unit, configured to write the upgrade file to the embedded device after the first receiving module receives the upgrade file sent by the control device
  • a storage unit configured to write the upgrade file to the embedded device after the first receiving module receives the upgrade file sent by the control device
  • a verification unit configured to verify an upgrade file written in the memory of the embedded device by the storage unit
  • the storage unit is further configured to write 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 verification of the upgrade file fails.
  • the upgrade indication message is that the control device is sent by the control device in an upgrade mode
  • the embedded device further includes:
  • a processing module configured to execute a booting boot program in the memory by the central processing unit CPU before the first receiving module receives the upgrade indication message sent by the control device;
  • a first sending module configured to send a first query message to the control device by using the booting program
  • the processing module is further configured to: if the first receiving module receives the upgrade indication message within a preset first time, start listening to the serial port according to the upgrade indication message received by the first receiving module; The first receiving module does not receive the upgrade indication message within a preset first time, and loads and starts the current booting procedure.
  • the first receiving module is further configured to: before receiving the upgrade indication message sent by the control device, receive a backup indication message sent by the control device, where the backup indication message is used to indicate that the control device starts Listening to the serial port;
  • the embedded device further includes: a first calculating module, configured to read the current booting program in the memory according to a backup indication message received by the first receiving module, and calculate a file length of the current booting program , check field and file data;
  • the first 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, and performs calibration on the backup file.
  • the backup file is saved to a preset storage location, and the backup file includes a calculation result of the current boot program.
  • the backup indication message is sent by the control device in a backup mode
  • the processing module is further configured to: before the first receiving module receives the backup indication message sent by the control device, by using the The CPU executes the boot boot program in the memory;
  • the first sending module is further configured to send a second inquiry message to the control device by using the startup booting program
  • the processing module is further configured to: if the first receiving module receives the backup indication message within a preset second time, instructing the control device to start monitoring according to the backup indication message received by the first receiving module The serial port; if the first receiving module does not receive the backup indication message within a preset second time, loading and starting the current booting program.
  • the first receiving module is further configured to: after the first sending module sends the backup file to the control device, receive a backup failure message sent by the control device, where the backup failure message is used to indicate The control device fails to verify the backup file.
  • the processing module is further configured to restart the embedded device when an upgrade error occurs in the process that the first storage module writes the upgrade file into a memory of the embedded device, and The CPU executes the boot boot process again;
  • the first sending module is further configured to send a third query message to the control device by using the startup booting program
  • the first receiving module is further configured to receive a recovery indication message sent by the control device, where the recovery indication message is used to instruct the embedded device to listen to the serial port, and receive, by using the serial port, the control device to send Recovering the file, the recovery file being calculated by the control device according to the selected file path, where the recovery file includes a file length, a check field, and file data;
  • the first storage module is further configured to write the recovery file to a memory of the embedded device to restore a boot program in a memory of the embedded device prior to writing the upgrade file.
  • the recovery file is a backup file selected from the backup files stored in the control device.
  • a control device comprising:
  • a second sending module configured to send an upgrade indication message to the embedded device, where the upgrade indication message is used to instruct the embedded device to monitor a serial port between the embedded device and the control device;
  • a second calculating module configured to calculate a file length, a check field, and file data of the upgrade file according to the selected file path;
  • the second sending module is further configured to send, by using the serial port, the upgrade file calculated by the second computing module to the embedded device, so that the embedded device writes the upgrade file to the embedded device In the memory to replace the current boot program in the memory.
  • control device further includes: a startup module, configured to start a control program of the control device before the second sending module sends an upgrade indication message to the embedded device, and in the control program Select the upgrade mode on;
  • a second receiving module configured to receive, by using 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 perform the The current bootloader is being upgraded.
  • the second sending module 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 Sending a backup file to the control device;
  • the second receiving module is further configured to receive, by using the serial port, a backup file sent by the embedded device, where the backup file includes a file length and a check field of the current boot program in a memory of the embedded device. And file data;
  • the control device further includes:
  • a second storage module configured to write the backup file received by the second receiving module into the Control the memory of the device
  • a verification module configured to perform verification on the backup file written in the memory of the control device by the second storage module
  • the second storage module is further configured to save the backup file to a storage location preset by the user in the control device after the verification module successfully verifies the backup file;
  • the second sending module is further configured to send a backup failure message to the embedded device after the verification module fails to verify the backup file.
  • the startup module is further configured to start a control program of the control device and select a control program of the control device before the second sending module sends a backup indication message to the embedded device.
  • Backup mode
  • the second receiving module is further configured to receive, by 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 be in the embedded device
  • the current boot program performs a backup.
  • the second receiving module is further configured to receive the embedded by using the control program after the second sending module sends the calculated upgrade file to the embedded device by using the serial port.
  • a third query message sent by the device where the third query message is used to indicate that the embedded device fails to upgrade the current boot program;
  • the second sending module is further configured to send a recovery indication message to the embedded device, where the recovery indication message is used to instruct the embedded device to listen to the serial port;
  • the second calculating module 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;
  • the second sending module is further configured to send, by using the serial port, the recovery file calculated by the second computing module to the embedded device, so that the embedded device writes the recovery file to the embedded device In the memory to restore the bootloader in the memory of the embedded device before writing the upgrade file.
  • the recovery file is a backup file selected from the backup files stored in the control device.
  • An embedded system comprising: the above embedded device and the above control device.
  • a computer readable storage medium storing computer executable instructions for performing the above method.
  • the boot program upgrade method, the embedded device, the control device, and the embedded system provided by the embodiments of the present invention solve the problem that the boot device is upgraded by using the writer to upgrade the boot device, and The operation method of the upgrade boot program is complicated and the workload is large.
  • FIG. 1 is a flowchart of a method for upgrading a boot program according to an embodiment of the present invention
  • FIG. 2 is an application scenario of performing the bootloader upgrade method provided in FIG. 1;
  • FIG. 3 is a flowchart of another method for upgrading a bootloader according to an embodiment of the present invention.
  • FIG. 4 is a flowchart of still another method for upgrading a boot program according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of still another method for upgrading a booting program according to an embodiment of the present invention.
  • FIG. 6 is a flowchart of still another method for upgrading a booting program according to an embodiment of the present invention.
  • FIG. 7 is a flowchart of interaction execution of a bootloader upgrade method 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 disclosure.
  • FIG. 9 is a schematic structural diagram of an optional solution of an embedded device according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of another embedded device according to an embodiment of the present disclosure.
  • FIG. 11 is a schematic structural diagram of a control device according to an embodiment of the present disclosure.
  • FIG. 12 is a schematic structural diagram of an optional solution of a control device according to an embodiment of the present disclosure.
  • FIG. 13 is a schematic structural diagram of another control device according to an embodiment of the present invention.
  • FIG. 1 is a flowchart of a method for upgrading a boot program according to an embodiment of the present invention.
  • the bootloader upgrade method provided in this embodiment is applicable to upgrade a bootloader in an embedded system
  • the method may be performed by an embedded device, which is usually implemented by a hardware and software method, and the embedding is performed.
  • the device implements an upgrade of the bootloader through message interaction and data interaction with the control device in the embedded system.
  • the method in this embodiment may include S110 to S130:
  • S110 Receive an upgrade indication message sent by the control device, where the upgrade indication message is used to instruct the embedded device to monitor a serial port between the embedded device and the control device.
  • the method provided in this embodiment is performed by the embedded device 100.
  • the embedded device 100 can be, for example, an industrial device such as a switch or a TV set-top box.
  • the control device 200 can be, for example, a PC (Personal Computer), and can be connected through a serial cable. 300 is connected to the serial port between the embedded device 100 and the control device 200.
  • the embedded device 100 includes a CPU 110 and a memory 120 connected by a bus.
  • the memory 120 stores a current boot program 121 and a booting program 122, and the control device There is a control program 210 in 200.
  • the method may further include: S100.
  • the booting program in the memory 120 is executed by the CPU 110, and the first booting program is sent to the control device 200 through the booting program.
  • the first inquiry message may be an inquiry handshake signal, for example, 0x5a5a5a5a.
  • the embedded device 100 After sending the first inquiry message, waiting for the response signal returned by the control device 200, that is, waiting for the upgrade indication message, for example, 0x9a9a9a9a, the embedded device 100 does not explicitly need to perform an upgrade operation of the boot program before receiving the upgrade indication message.
  • the control device 200 receives the first inquiry message in the upgrade mode (may be, but not limited to, the case where the control program 210 is set to the upgrade mode), and therefore, the control device can initiate a boot program to the embedded device.
  • the upgrade process so that whether the upgrade indication message is sent by the user's selection may be determined; optionally, if the upgrade indication message is received within the preset first time, the embedded device 100 starts according to the upgrade indication message.
  • the monitoring device starts to perform the upgrade operation of the boot program; in another case, if the upgrade indication message is not received within the preset first time, the embedded device loads and starts the above-mentioned current boot program 121, The embedded device 100 enters the normal startup program, that is, the current boot program 121 of the embedded device 100 is not upgraded. For example, the embedded device 100 can reserve a waiting time of 3 seconds after sending the first query message. Determine whether to go into the process of upgrading the bootloader or the process of getting into normal work.
  • the first boot program area 121a and the second boot program area 122a may be divided, wherein the current boot program 121 is a boot program to be upgraded, that is, booting.
  • the OS or application-initiated main program is set in the first boot program area 121a.
  • the CPU 110 starts executing the program, for example, it may be a pre-processed program. It is disposed in the second boot program area 122a; by setting the boot programs of different functions in different areas of the memory 120, the location of the boot program to be upgraded is clarified to improve the reliability of the upgrade boot program.
  • S120 Receive, by using a serial port, an upgrade file sent by the control device, where the upgrade file is calculated by the control device according to the selected file path, where the upgrade file includes a file length, a check field, and file data.
  • the control device after sending the upgrade indication message, the control device starts to calculate the file length, the check field, and the file data of the upgrade file by using a file path specified by the user, and the file length and the check field are generally It is 4 bytes.
  • the user can select the upgrade mode after opening the control program of the control device and specify the path of the boot file to be upgraded.
  • After calculating and obtaining the content of the upgrade file in order to ensure that the embedded device has been parsed out of the current upgrade process and has entered the listening state, it is usually possible to wait for a certain period of time to start sending the above-mentioned calculated upgrade file, thereby ensuring the embedded
  • the device can receive the upgrade file through the serial port.
  • the embedded device implements an upgrade of the boot program by writing the upgrade file received by the embedded device, and the upgrade file is actually a higher version of the boot program, and the boot code of the higher version is passed. Replace the bootloader in the current embedded device to complete the bootloader upgrade process.
  • the related art also provides a method for upgrading a boot program, which uses a starter program preset in a memory (Flash) to load a boot program through a serial port, and then manually inputs a command to update a boot program in the Flash.
  • the operation of this method is complicated, error-prone, and cannot back up the boot program in the embedded device. If the upgrade fails, it cannot be rolled back. It can only be used in development and testing, and is not applicable to the field upgrade boot program.
  • the method for triggering the boot program to be loaded from the serial port by the method is implemented by triggering a function key, and when the starter program is started, it is determined whether the function key is triggered or not, and then is sent through the computer software.
  • the file of the boot program which requires strict control of the trigger time of the embedded device and the button, especially when the embedded device is far away from the control host.
  • the method for upgrading the boot program monitors the serial port of the embedded device and the control device by receiving an upgrade indication message sent by the control device (which may be, but is not limited to, the terminal), and receives the upgrade sent by the control device through the serial port.
  • a file (which may be calculated by the control device according to a file path selected by the user), thereby writing the upgrade file to the memory of the embedded device to replace the current boot program in the memory, in this embodiment, by using the control device
  • the upgrade file is downloaded to the memory of the embedded device, and the target of upgrading the boot program in the embedded device is implemented.
  • the boot program upgrade method provided in this embodiment solves the process of upgrading the boot program by using the writer. In the process of upgrading, the operation of the upgrade bootloader is complicated and the workload is large.
  • the method of the present embodiment does not need to be disassembled to implement the upgrade boot program.
  • the method provided in this embodiment can be automatically implemented after the embedded device is powered on by directly setting the control program in the control device when the boot program is upgraded in the field.
  • the upgrade operation of the boot program does not require the intervention of the operator during the upgrade. Compared with the related technology, the operation process is safer and more convenient, and the reliability and security during the upgrade process of the boot program are ensured.
  • the interface connected to the programmer may not be reserved.
  • the boot program is upgraded by means of a programmer, the memory chip of the embedded device needs to be returned to the factory.
  • the setting of the control program in the control device is implemented to upgrade the boot program, which is obviously more manual than the related art. It is easier to operate by inputting commands to update the bootloader in Flash. It is also easier to control than the triggering function key to trigger the bootloader to load from the serial port.
  • FIG. 3 is a flowchart of another optional bootloader upgrade method according to an embodiment of the present invention.
  • the method provided in this embodiment may further include: S121, writing an upgrade file received through the serial port into the memory of the embedded device, and performing the upgrade file.
  • the method may further include: S122, determining whether the verification of the upgrade file is successful; if successful, executing S130; if not, executing S123.
  • This embodiment may further include the above step S100 before S110.
  • the upgrade process is continued, and the upgrade file is written into the memory of the embedded device, and the verification of the upgrade file does not affect the use of the embedded device. That is, if the upgrade fails, the embedded device can be started through the current boot program in the first boot program area, and the embedded device enters the normal workflow, which ensures the security and reliability of the upgrade boot program.
  • FIG. 4 is a flowchart of still another optional booting method upgrade method according to an embodiment of the present invention.
  • the bootloader upgrade method provided in this embodiment may be applicable to the backup and upgrade of the bootloader in the embedded system.
  • the method may be performed by an embedded device, and the embedded device is usually implemented by hardware and software.
  • the embedded device implements an upgrade of the boot program by message interaction and data interaction with a control device in the embedded system. As shown in FIG. 4, the method in this embodiment may include S210 to S270:
  • the S210 further includes: S200, and the booting in the memory is performed by the CPU.
  • the booting program sends a second query message to the control device through the booting program.
  • the content and function of the second query message are the same as the first query message in the foregoing embodiment, and therefore are not described herein again.
  • the control device receives the second inquiry message in the backup mode (which may be, but is not limited to, the case where its control program is set to the backup mode), and therefore, the control device
  • the backup process of the boot device of the embedded device can be initiated, so that whether the backup indication message is sent by the user's selection, for example, is 0x95959595; optionally, when received in the preset second time Backing up the indication message, according to the backup indication message, instructing the control device to start listening to the serial port, that is, starting the backup operation of the boot program; in another case, when the backup indication message is not received within the preset second time, the embedded The device loads and starts the current boot program. At this point, the embedded device enters the normal boot program, indicating that the current boot program of the embedded device is not backed up.
  • S230 Send a backup file to the control device, so that the control device writes the received backup file into the memory of the control device, and performs verification on the backup file. After the verification succeeds, the backup file is saved to a preset (may be However, it is not limited to a storage location preset by a user, wherein the backup file includes a calculation result for the current boot program.
  • the embedded device may determine that the backup process needs to be started, and then calculate the file length and check field of the current boot program by reading the first boot program area in the memory. And file data, thereby sending a backup file to the control device, the backup file including the calculation result of the current boot program; similarly, after receiving the backup file, the control device can verify the backup file written in the memory, and The backup file successfully verified is saved to a storage location preset by the user in the control device. For example, after the control program of the control device is turned on, the user can select a backup mode and specify a path of the backup file to be saved, for example, the backup file. Can be saved to BOOT.bak.
  • the method provided in this embodiment further includes: S240, receiving a backup failure message sent by the control device.
  • the boot program upgrade method provided in this embodiment can continue to upgrade the current boot program in the embedded device after backing up the current boot program in the embedded device, and restart the embedded device after the backup operation is finished. Perform the upgrade operation.
  • the upgrade method includes S250 to S270:
  • S250 Receive an upgrade indication message sent by the control device, where the upgrade indication message is used to instruct the embedded device to listen to the serial port.
  • S250 it may further include: S231, restarting the embedded device, executing the booting boot program in the memory again by the CPU, and transmitting the first query message to the control device through the booting boot program.
  • S260 Receive, by using a 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 the user, where the upgrade file includes a file length, a check field, and file data.
  • the content in the first boot program area of the embedded device may be restored, that is, returned to the pre-upgrade state.
  • This embodiment can include the following steps:
  • the third query message is sent to the control device by starting the booting program.
  • the embedded device after the upgrade fails, the embedded device needs to be restarted, and the startup boot program is executed again by the CPU.
  • the control program of the control device is also in the upgrade mode, and therefore, the embedded device receives the recovery instruction.
  • the processing manner after the message is similar to the processing method of receiving the upgrade indication message in the embodiment shown in FIG.
  • the file path selected 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 in the backup file stored in the control device, and may be, for example, the backup file saved in BOOT.bak in the above S230.
  • the backup file stored in the control device may be used to perform an upgrade operation, and the boot program in the embedded device may be restored to perform the upgrade operation.
  • the method provided in this embodiment restores the current boot program in the embedded device before performing the upgrade operation, and solves the problem that the upgrade fails to be returned, thereby implementing the scenario in which the bootloader upgrade method is applied to the field upgrade.
  • the method is guaranteed to be traceable and the scope of use of the method is increased.
  • FIG. 5 is a flowchart of still another optional booting method upgrade method according to an embodiment of the present invention.
  • the method may be performed by a control device, which is usually implemented by a hardware and software method, and the control device passes A message exchange and data interaction with an embedded device in an embedded system enables an upgrade of the bootstrap.
  • the method in this embodiment may include S310 to S330:
  • S310 Send an upgrade indication message to the embedded device, where the upgrade indication message is used to instruct the embedded device to monitor a serial port between the embedded device and the control device.
  • the method provided in this embodiment can also be applied to the application scenario shown in FIG. 2, and before S310, the method may further include: S300, starting a control program of the control device, and selecting an upgrade mode on the control program; After the CPU starts the booting procedure described in the foregoing embodiment, the first query signal is sent to the control device.
  • the method further includes: S301, receiving, by the control program, the embedded device. An inquiry message, the first inquiry message is used to prompt the control device to upgrade the current boot program in the embedded device.
  • the control device may determine whether to send the upgrade indication message by using the user's selection. If the upgrade indication message is sent, the control device indicates to the embedded device that the control device has entered the upgrade process, and the embedded device starts to listen to the serial port. Receive the upgrade file sent by the control device.
  • the user can specify the path of the boot file to be upgraded after selecting the upgrade mode.
  • the embedded device calculates and obtains the content of the upgrade file according to the file path selected by the user, and the content of the upgrade file is the same as in the above embodiment.
  • S330 Send 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 boot program in the memory.
  • the operation of sending the upgrade file may be performed after waiting for a certain time after calculating the upgrade file, for example, in S320 to S330.
  • a delay of 3 seconds can be set to ensure that the embedded device can receive the upgrade file through the serial port.
  • the method for upgrading the boot program provided by the embodiment, by sending an upgrade indication message to the embedded device, to instruct the embedded device to start monitoring the serial port before the embedded device and the control device, and the control device (which may be, but is not limited to, the terminal)
  • the file path selected by the user calculates the content of the upgrade file, 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 its memory to replace the current boot program in the memory.
  • the target of upgrading the boot program in the embedded device is implemented by downloading the upgrade file in the control device to the memory of the embedded device.
  • the boot program upgrade method provided in this embodiment solves the problem of using the programmer. During the process of upgrading the boot program, the upgrade of the boot device is complicated and the workload is large due to the need to disassemble the shell of the embedded device.
  • the embedded device after the embedded device sends the first query message, according to whether the corresponding operation performed by receiving the upgrade indication message in the preset first time, and receiving the upgrade file After being saved to the memory, the upgrade file is verified, and the corresponding operations performed according to the verification result may be the same as the operation modes in the embodiment shown in FIG. 1 to FIG. 4, and have the same beneficial effects, so No longer.
  • FIG. 6 is a flowchart of still another optional boot program upgrade method according to an embodiment of the present invention. Similar to the embodiment shown in FIG. 4, the bootloader upgrade method provided by this embodiment is applicable to the case of backing up and upgrading the bootloader in the embedded system. As shown in FIG. 6, the method in this embodiment may include S410 to S470:
  • the method may further include: S400, starting a control program of the control device, and selecting a backup mode on the control program; S401, receiving, by the control program, a second inquiry message sent by the embedded device, where The second inquiry message is used to prompt the control device to back up the current boot program in the embedded device.
  • the control device may determine, by the user's selection, whether to send a backup indication message, and in the case that the backup indication message is sent, indicate to the embedded device that the control device has entered the backup process by the message, instructing the embedded device to calculate the current period in the memory.
  • the content of the calculation result is the backup file and the backup file is sent to the control device.
  • S420 Receive, by using a serial port, a backup file sent by the embedded device, 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.
  • S430 Write the received backup file into the memory of the control device, and verify the backup file.
  • S431 may also include S431 and S432;
  • S431 Determine whether the verification of the backup file is successful; if successful, execute S440, and if it fails, execute S432.
  • control device may save the received backup file to the memory for verification. After the backup file is successfully verified, the backup process is completed, and the backup file is saved to the user preset in the control device.
  • the storage location for example, after selecting the backup mode on the control program, specify the path of the backup file to be saved in the control device, and the backup file may be saved to BOOT.bak, for example, and after verifying the backup file fails. You can send a backup failure message to prompt the embedded device.
  • the boot program upgrade method provided in this embodiment can continue to upgrade the current boot program in the embedded device after backing up the current boot program in the embedded device.
  • the upgrade mode includes S450 to S470:
  • S450 Send an upgrade indication message to the embedded device, where the upgrade indication message is used to instruct the embedded device to monitor a serial port between the embedded device and the control device.
  • the method may 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 be embedded The current bootloader in the device is upgraded.
  • S470 Send 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 boot program in the memory.
  • implementation manners of S441 to S470 may refer to S300 to S330 in the embodiment shown in FIG. 5.
  • the content in the first boot program area of the embedded device may be restored. That is, the status of the pre-upgrade state is returned.
  • the backup file saved in the BOOT.bak in the S440 can be used to re-execute the upgrade process.
  • the optional implementation of this embodiment may include the following steps:
  • the embedded device after the upgrade fails, the embedded device needs to be restarted again, and the booting program is executed again by the CPU.
  • the control program of the control device When the third query message is sent, the control program of the control device is also in the upgrade mode, so the embedded device receives the recovery.
  • the processing manner after the indication message is similar to the processing manner of receiving the upgrade indication message in the foregoing embodiment, and the existing boot program in the memory is replaced by the file content sent by the control device; the difference is that the user is controlling in this embodiment.
  • Selected in the device The file path 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 in the backup file stored in the control device, for example, may be saved to the BOOT in the above S440. Backup file in .bak.
  • FIG. 7 is a flowchart of interaction execution of a bootloader upgrade method according to an embodiment of the present invention.
  • the bootloader upgrade method provided in this embodiment is applicable to the backup and upgrade of the bootloader in the embedded system, and the method can be performed by the control device and the embedded device. As shown in FIG. 7, the method in this embodiment may include S501 to S514:
  • S501 is executed in the control device, the control program of the control device is started, and the upgrade mode is selected on the control program.
  • the embedded device is powered on, the embedded device starts to execute, and S503, the boot boot program in the memory is executed by the CPU.
  • the control device may determine whether to send the response response by using the user's selection. If the upgrade process is required, the control device executes S508 to send an upgrade indication message to the embedded device; If the determination in S505 is received, then S506 is further executed to start listening to the serial port.
  • control device After sending the upgrade indication message, the control device continues to execute 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, to obtain the content of the upgrade file.
  • the embedded device is in the listening state at this time. After receiving the upgrade file sent by the control device through the serial port, execute S511, write the upgrade file received through the serial port to the memory of the embedded device, and verify the upgrade file. .
  • the method provided in this embodiment may perform the backup of the current boot program before the current boot program of the embedded device is upgraded.
  • the implementation manner includes: the control device may further execute S515-S527 before executing S501:
  • the save path of the backup file is specified by the user's selection.
  • the embedded device is powered on, the embedded device starts to execute, and S517, the boot boot program in the memory is executed by the CPU.
  • the control device determines whether to send the response response by the user's selection. If the backup process is required, the control device executes S522 to send a backup indication message to the embedded device; If the determination in S519 is received, then S520 is executed, the current boot program in the memory is read, and the file length, check field and file data of the current boot program are calculated.
  • the control device is in the listening state at this time. After receiving the backup file sent by the embedded device through the serial port, executing S524, writing the received backup file into the memory of the control device, and verifying the backup file.
  • S525 Determine whether the verification of the backup file is successful; if successful, execute S526, and if it fails, execute S527.
  • the boot program in the memory of the embedded device may also be performed.
  • Recovery that is, returning to the state before the upgrade.
  • the user selects the upgrade file.
  • the path may be: 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 is usually implemented by a hardware and software method, and interacts with a message of a control device in the embedded system. Interact with data to implement an upgrade of the bootstrap.
  • the embedded device of this embodiment includes a first receiving module 11 and a first storage module 12.
  • the first receiving module 11 is configured to receive an upgrade indication message sent by the control device, where the upgrade indication message is used to instruct the first receiving module 11 to monitor the serial port between the embedded device and the control device.
  • the first storage module 12 is configured to write an upgrade file received by the first receiving module 11 into a memory of the embedded device to replace a current boot program in the memory.
  • the upgrade procedure is also applicable to the application scenario shown in FIG. 2 when the boot device is upgraded by the embedded device provided by the embodiment.
  • the upgrade indication message is sent by the control device in the control device in the upgrade mode, optionally As shown in FIG. 9, the embedded device provided by an optional embodiment of the present embodiment further includes: a processing module 13 configured to execute in the memory by the CPU before the first receiving module 11 receives the upgrade indication message sent by the control device Starting the booting program; the first sending module 14 is configured to send the first query message to the control device by starting the booting program; correspondingly, on the one hand, the processing module 13 is further configured to be when the first receiving module 11 is in the preset Receiving the upgrade indication message in one time, starting to listen to the serial port according to the upgrade indication message received by the first receiving module 11; on the other hand, the processing module 13 is further configured to not when the first receiving module 11 is in the preset first time Received an upgrade indication message, loaded and started the current bootstrap.
  • the first receiving module 11 may be further configured to receive, by using a 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 the user, where the upgrade file includes a file length, a check field, and file data. .
  • the embedded device provided by the embodiment of the present invention is configured to perform the booting program upgrade method provided by the embodiment shown in FIG. 1 and has a corresponding functional module.
  • the implementation principle and the technical effect are similar, and details are not described herein again.
  • FIG. 10 is a schematic structural diagram of another embedded device according to an embodiment of the present invention.
  • the first storage module 12 in this embodiment may include: a storage unit 15 configured to be configured after the first receiving module 11 receives the upgrade file sent by the control device. Writing the upgrade file into the memory of the embedded device; the verification unit 16 is configured to check 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 After the verification unit 16 successfully verifies the upgrade file, the upgrade file is written into the memory of the embedded device; in another possible implementation manner, the verification unit 16 is further configured to verify that the upgrade file fails. After that, load and start the current bootloader.
  • the embedded device provided by the embodiment of the present invention can not only upgrade the boot program, but also backs up the current boot program in the memory to the control device before the upgrade.
  • the implementation manner is as follows: the first receiving module 11 And the method further includes: before receiving the upgrade indication message sent by the control device, receiving a backup indication message sent by the control device, where the backup indication message is used to instruct the control device to start listening to the serial port; correspondingly, the embedded device may further include: The calculating module 17 is configured to read the current booting program in the memory according to the backup indication message received by the first receiving module 11, and calculate a file length, a check field, and file data of the current booting program; the first sending module 14 further sets The backup control device sends a backup file, so that the control device writes the received backup file into the memory of the control device, and checks the backup file. After the verification succeeds, the backup file is saved to the user in the control device. a pre-set storage location, wherein the backup file includes the current boot program The result.
  • the backup indication message may be sent by the control device in the backup mode, and the processing module 13 may be configured to pass the first receiving module 11 before receiving the backup indication message sent by the control device.
  • the CPU executes the booting boot program in the memory; the first sending module 14 can also be configured to send the second query to the control device by starting the booting program.
  • the processing module 13 may be further configured to: when the first receiving module 11 receives the backup indication message within a preset first time, and instruct the control device according to the backup indication message received by the first receiving module 11
  • the monitoring module 13 is further configured to: when the first receiving module 11 does not receive the backup indication message within the preset first time, load and start the current booting program.
  • the first receiving module 11 in this embodiment may also be configured to be in the first sending module 14 to the control device ( After the backup file is sent to the terminal, the backup failure message sent by the control device is received, and the backup failure message is used to indicate that the control device fails to verify the backup file.
  • the embedded device provided by an optional solution in the embodiment may be in the memory of the embedded device when the first storage module 12 generates an upgrade error in the process of writing the upgrade file into the memory.
  • the boot program is restored, that is, it is returned to the pre-upgrade state.
  • the path of the upgrade file is controlled.
  • the implementation mode is: the processing module 13 can also be configured to be upgraded in the first storage module 12.
  • the first sending module 14 can also be configured to send the first to the control device by starting the booting program.
  • Three inquiry messages can also be configured to receive the control device
  • the recovery indication message is sent to indicate that the embedded device listens to the serial port, and receives the recovery file sent by the control device through the serial port, where the recovery file is calculated by the control device according to the file path selected by the user, and the recovery file is used.
  • the file length, the check field and the file data are included; the first storage module 12 can also be 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 mode of the above-mentioned recovery boot program is similar to that of the upgrade boot program, except that the contents of the file written in the memory of the embedded device are different, and therefore will not be described in detail herein.
  • the embedded device provided by the embodiment of the present invention is configured to perform the boot program upgrade method provided by the embodiment shown in FIG. 3 and FIG. 4, and has a corresponding function module, and the implementation principle and the technical effect are similar. I will not repeat them here.
  • FIG. 11 is a schematic structural diagram of a control device according to an embodiment of the present invention.
  • the control device is usually implemented in a hardware and software manner, through message interaction with an embedded device in the embedded system. Data interaction implements an upgrade of the bootstrap.
  • the control device of this embodiment includes a second sending module 21 and a second calculating module 22.
  • the second sending module 21 is configured to send an upgrade indication message to the embedded device, where the upgrade indication message is used to instruct the embedded device to monitor the serial port between the embedded device and the control device.
  • the second calculating module 22 is configured to calculate a file length, a check field, and file data of the upgrade file according to the selected file path;
  • the second sending module 21 is further configured to send, by using the serial port, the upgrade file calculated by the second computing module to the embedded device, so that the embedded device writes the upgrade file into the embedded The memory of the device to replace the current boot program in the memory.
  • the control device may further include: a booting module 23, Set to start the control program of the control device before the second sending module 21 sends the upgrade indication message to the embedded device, and select the upgrade mode on the control program; after the embedded device is powered on, the CPU starts the above embodiment.
  • the first query signal is sent to the control device.
  • the control device may further include: the second receiving module 24, configured to receive the first query message sent by the embedded device by using the control program, where The first inquiry message is used to prompt the control device to upgrade the current boot program in the embedded device.
  • control device provided by the embodiment of the present invention may be configured to perform the bootloader upgrade method provided by the embodiment shown in FIG. 5, and has a corresponding function module, and the implementation principle and technical effect thereof are similar, and details are not described herein again.
  • the control device provided by the embodiment may send the first query message according to whether the upgrade instruction message is received in the preset first time.
  • the operation, and after the upgrade file is saved to the memory, the upgrade file is verified, and the corresponding operation performed according to the verification result is the same as in the above embodiment.
  • the operation mode is the same, and has the same beneficial effects, so it will not be described here.
  • FIG. 13 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 present invention can not only upgrade the booting program, but also back up the current booting program in the memory of the embedded device to the control device before the upgrade.
  • the second sending module 21 further The method may be configured to send a backup indication message to the embedded device before the sending the upgrade indication message to the embedded device, where the backup indication message is used to instruct the embedded device to send the backup file to the control device (which may be, but is not limited to, the terminal);
  • the second receiving module 24 is further configured to receive, by using a serial port, a backup file sent by the embedded device, 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;
  • the control device provided in this embodiment may further include: a second storage module 25 configured to write the backup file received by the second receiving module 24 into the memory of the control device; the verification module 26, set to verify the backup file in the memory of the second storage module 25 written to the control device
  • the second storage module 25 can also be configured to save the backup file to the storage location preset by the user in the control device after the verification module 26 successfully verifies the backup file;
  • the second sending module 21 may be configured to send a backup indication message
  • the startup module 23 may be further configured to start the control program of the control device before the second sending module 21 sends the backup indication message to the embedded device, and in the control device
  • the backup mode is selected on the control program; after the embedded device is powered on, after the CPU starts the booting program in the above embodiment, the second query signal is sent to the control device, and accordingly, the second receiving module 24 can also be set.
  • the second query message sent by the embedded device is received by the control program, and the second query message is used to prompt the control device to back up the current boot program in the embedded device.
  • the bootloader upgrade mode in the case that an upgrade error occurs in the process of the embedded device writing the upgrade file to the memory thereof, the booting in the memory of the embedded device may also be performed.
  • the program is restored, that is, it is returned to the pre-upgrade state.
  • the path of the upgrade file is the control device.
  • the path of the backup file stored in the file, so that when the upgrade operation is performed, the above upgrade file is replaced with the control device.
  • the stored backup file is implemented in the following manner: the second receiving module 24 is further configured to: after the second sending module 21 sends the calculated upgrade file to the embedded device through the serial port, receive the first sent by the embedded device through the control program.
  • the third query message is used to indicate that the embedded device fails to upgrade the current boot program.
  • the second sending module 21 is further configured to send a recovery indication message to the embedded device, where the resume indication message is used to indicate the embedded
  • the second computing module 22 can be configured to calculate the file length, the verification field and the file data of the restored file according to the file path selected by the user; thus, the second sending module 21 can send the embedded device to the embedded device through the serial port.
  • the recovery file calculated by the second calculation module 22 causes the embedded device 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 mode of the above-mentioned recovery boot program is similar to that of the upgrade boot program, except that the contents of the file written in the memory of the embedded device are different, and therefore will not be described in detail herein.
  • FIG. 2 is a schematic structural diagram of an embedded system according to an embodiment of the present invention.
  • the embedded system provided in this embodiment may include an embedded device 100 and a control device 200, and the embedded device 100 may be the embedded device shown in any of the foregoing embodiments of FIG. 8 and FIG.
  • the control device 200 may be the control device shown in any of the foregoing embodiments of FIG. 11 and FIG. 13 , and may be configured to perform the boot program upgrade method shown in FIG. 1 and FIG. 3 to FIG. 7 , and the implementation manner and implementation thereof.
  • the beneficial effects are the same as those of the above embodiment, and therefore will not be described herein.
  • a computer readable storage medium storing computer executable instructions for performing the above method.
  • the boot program upgrade method, the embedded device, the control device, and the embedded system provided by the embodiments of the present invention solve the problem that the boot device is upgraded by using the writer to upgrade the boot device, and The operation method of the upgrade boot program is complicated and the workload is large.

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

一种引导程序升级方法、嵌入式设备、控制设备及嵌入式系统。所述引导程序升级方法包括:接收控制设备发送的升级指示消息,该升级指示消息用于指示嵌入式设备监听嵌入式设备与控制设备之间的串口;通过串口接收控制设备发送的升级文件,该升级文件为控制设备根据用户选择的文件路径计算出的,该升级文件包括文件长度、校验字段和文件数据;将升级文件写入嵌入式设备的存储器中,以替换存储器中的当前引导程序。

Description

引导程序升级方法、嵌入式设备、控制设备及嵌入式系统 技术领域
本文涉及但不限于计算机技术,尤指一种引导程序(BOOT)升级方法、嵌入式设备、控制设备及嵌入式系统。
背景技术
随着ES(Embedded system,嵌入式系统)在通信及工业控制领域的广泛应用,为了提高产品的生命周期以及适应新的业务需求,通常需要对嵌入式系统进行现场升级,其中一项重要的升级内容包括对嵌入式设备中引导程序的升级。
嵌入式设备的引导程序通常存放于非易失性存储器中,例如NOR FLASH和NAND FLASH等器件中,引导程序的主要功能包括初始化CPU(Central Processing Unit,中央处理器)和DDRAM(Display Data Random Access Memory,显示数据随机存储器)等器件,然后引导OS(Operating System,操作系统)或应用程序启动。引导程序是嵌入式设备上电后的运行的第一段程序,若该引导程序升级失败则会造成嵌入式设备无法启动,例如,在使用引导程序自身的命令实现自我更新进行升级的过程中,如果升级失败,则会造成嵌入式设备无法启动。基于上述问题,为了保证引导程序升级过程中的安全性和可靠性,目前通常使用的引导程序的升级方式中可以采用烧录器,通过烧录器将待升级版本的引导程序烧录到嵌入式设备的存储器中,同时需要借助附加的烧录软件。
然而,在采用烧录器对引导程序进行升级的过程中,由于嵌入式设备中与烧录器连接的接口通常设置于该嵌入式设备的内部,因此需要拆卸该嵌入式设备的外壳以实现升级,而导致升级引导程序的操作方式比较复杂,工作量大的问题。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本发明实施例提供了一种引导程序升级方法、嵌入式设备、控制设备及嵌入式系统,可以解决采用烧录器对引导程序进行升级的过程中,由于需要拆卸嵌入式设备的外壳以实现升级,而导致升级引导程序的操作方式比较复杂,工作量大的问题。
本发明实施例采用如下技术方案。
一种引导程序升级方法,包括:
接收控制设备发送的升级指示消息,所述升级指示消息用于指示嵌入式设备监听所述嵌入式设备与所述控制设备之间的串口;通过所述串口接收所述控制设备发送的升级文件,所述升级文件为所述控制设备根据选择的文件路径计算出的,所述升级文件包括文件长度、校验字段和文件数据;
将所述升级文件写入所述嵌入式设备的存储器中,以替换所述存储器中的当前引导程序。
可选地,所述通过所述串口接收所述控制设备发送的升级文件之后、将所述升级文件写入所述嵌入式设备的存储器中之前还包括:
将通过所述串口接收到的升级文件写入所述嵌入式设备的内存中,并对所述升级文件进行校验;
如果对所述升级文件校验成功,则进行所述将升级文件写入所述嵌入式设备的存储器中的操作;
如果对所述升级文件校验失败,则加载并启动所述当前引导程序。
可选地,所述升级指示消息为所述控制设备在升级模式下发送的,所述接收控制设备发送的升级指示消息之前还包括:
通过中央处理器CPU执行所述存储器中的启动引导程序,并通过所述启动引导程序向所述控制设备发送第一问询消息;
所述方法还包括:
如果在预置的第一时间内接收到所述升级指示消息,根据所述升级指示 消息开始监听所述串口;
如果在预置的第一时间内没有接收到所述升级指示消息,则加载并启动所述当前引导程序。
可选地,所述接收控制设备发送的升级指示消息之前还包括:
接收所述控制设备发送的备份指示消息,所述备份指示消息用于指示所述控制设备开始监听所述串口;
根据所述备份指示消息读取所述存储器中的所述当前引导程序,并计算所述当前引导程序的文件长度、校验字段和文件数据;
向所述控制设备发送备份文件,以使所述控制设备将接收到的所述备份文件写入所述控制设备的内存中,并对所述备份文件进行校验,在校验成功后,将所述备份文件保存到预先设置的存储位置中,所述备份文件包括对所述当前引导程序的计算结果。
可选地,所述备份指示消息为所述控制设备在备份模式下发送的,所述接收所述控制设备发送的备份指示消息之前还包括:
通过所述CPU执行所述存储器中的所述启动引导程序,并通过所述启动引导程序向所述控制设备发送第二问询消息;
所述方法还包括:
如果在预置的第二时间内接收到所述备份指示消息,则根据所述备份指示消息指示所述控制设备开始监听所述串口;
如果在预置的第二时间内没有接收到所述备份指示消息,则加载并启动所述当前引导程序。
可选地,所述向所述控制设备发送备份文件之后还包括:
接收所述控制设备发送的备份失败消息,所述备份失败消息用于指示所述控制设备对所述备份文件校验失败。
可选地,所述方法还包括:
如果在将所述升级文件写入所述嵌入式设备的存储器的过程中发生升级错误,则重新启动所述嵌入式设备,并通过所述CPU再次执行所述启动引导 程序后,通过所述启动引导程序向所述控制设备发送第三问询消息;
接收所述控制设备发送的恢复指示消息,所述恢复指示消息用于指示所述嵌入式设备监听所述串口;
通过所述串口接收所述控制设备发送的恢复文件,所述恢复文件为所述控制设备根据选择的文件路径计算出的,所述恢复文件包括文件长度、校验字段和文件数据;
将所述恢复文件写入所述嵌入式设备的存储器中,以还原在写入所述升级文件前所述嵌入式设备的存储器中的引导程序。
可选地,所述恢复文件为在所述控制设备中存储的所述备份文件中选择出的一个备份文件。
一种引导程序升级方法,包括:
向嵌入式设备发送升级指示消息,所述升级指示消息用于指示所述嵌入式设备监听所述嵌入式设备与所述控制设备之间的串口;
根据选择的文件路径计算升级文件的文件长度、校验字段和文件数据;
通过所述串口向所述嵌入式设备发送所述计算出的升级文件,使得所述嵌入式设备将所述升级文件写入所述嵌入式设备的存储器中,以替换所述存储器中的当前引导程序。
可选地,所述向嵌入式设备发送升级指示消息之前还包括:
启动所述控制设备的控制程序,并在所述控制程序上选择升级模式;
通过所述控制程序接收所述嵌入式设备发送的第一问询消息,所述第一问询消息用于提示所述控制设备对所述嵌入式设备中的所述当前引导程序进行升级。
可选地,所述向嵌入式设备发送升级指示消息之前还包括:
向所述嵌入式设备发送备份指示消息,所述备份指示消息用于指示所述嵌入式设备向所述控制设备发送备份文件;
通过所述串口接收所述嵌入式设备发送的备份文件,所述备份文件包括 所述嵌入式设备的存储器中的所述当前引导程序的文件长度、校验字段和文件数据;
将所述接收到的备份文件写入所述控制设备的内存中,并对所述备份文件进行校验;
当对所述备份文件校验成功后,将所述备份文件保存到所述控制设备中预先设置的存储位置中;
当对所述备份文件校验失败后,向所述嵌入式设备发送备份失败消息。
可选地,所述向所述嵌入式设备发送备份指示消息之前还包括:
启动所述控制设备的控制程序,并在所述控制程序上选择备份模式;
通过所述控制程序接收所述嵌入式设备发送的第二问询消息,所述第二问询消息用于提示所述控制设备对所述嵌入式设备中的所述当前引导程序进行备份。
可选地,所述通过所述串口向所述嵌入式设备发送所述计算出的升级文件之后还包括:
通过所述控制程序接收所述嵌入式设备发送的第三问询消息,所述第三询问消息用于指示所述嵌入式设备对所述当前引导程序升级失败;
向所述嵌入式设备发送恢复指示消息,所述恢复指示消息用于指示所述嵌入式设备监听所述串口;
根据选择的文件路径计算恢复文件的文件长度、校验字段和文件数据;
通过所述串口向所述嵌入式设备发送所述恢复文件,使得所述嵌入式设备将所述恢复文件写入所述嵌入式设备的存储器中,以还原在写入所述升级文件前所述嵌入式设备的存储器中的引导程序。
可选地,所述恢复文件为在所述控制设备中存储的所述备份文件中选择出的一个备份文件。
一种嵌入式设备,包括:
第一接收模块,设置成接收控制设备发送的升级指示消息,所述升级指 示消息用于指示所述第一接收模块监听所述嵌入式设备与所述控制设备之间的串口;通过所述串口接收所述控制设备发送的升级文件,所述升级文件为所述控制设备根据选择的文件路径计算出的,所述升级文件包括文件长度、校验字段和文件数据;
第一存储模块,设置成将所述第一接收模块接收到的升级文件写入所述嵌入式设备的存储器中,以替换所述存储器中的当前引导程序。
可选地,所述第一存储模块包括:存储单元,设置成在所述第一接收模块接收到所述控制设备发送的所述升级文件之后,将所述升级文件写入所述嵌入式设备的内存中;
校验单元,设置成对所述存储单元写入所述嵌入式设备的内存中的升级文件进行校验;
所述存储单元还设置成在所述校验单元对所述升级文件校验成功后,将所述升级文件写入所述嵌入式设备的存储器中;
所述校验单元还设置成在对所述升级文件校验失败后,加载并启动所述当前引导程序。
可选地,所述升级指示消息为所述控制设备为所述控制设备在升级模式下发送的,所述嵌入式设备还包括:
处理模块,设置成在所述第一接收模块接收控制设备发送的升级指示消息之前,通过中央处理器CPU执行所述存储器中的启动引导程序;
第一发送模块,设置成通过所述启动引导程序向所述控制设备发送第一问询消息;
所述处理模块还设置成如果所述第一接收模块在预置的第一时间内接收到所述升级指示消息,则根据所述第一接收模块接收的升级指示消息开始监听所述串口;如果所述第一接收模块在预置的第一时间内没有接收到所述升级指示消息,则加载并启动所述当前引导程序。
可选地,所述第一接收模块还设置成在接收所述控制设备发送的升级指示消息之前,接收所述控制设备发送的备份指示消息,所述备份指示消息用于指示所述控制设备开始监听所述串口;
所述嵌入式设备还包括:第一计算模块,设置成根据所述第一接收模块接收的备份指示消息读取所述存储器中的所述当前引导程序,并计算所述当前引导程序的文件长度、校验字段和文件数据;
所述第一发送模块还设置成向所述控制设备发送备份文件,以使所述控制设备将接收到的所述备份文件写入所述控制设备的内存中,并对所述备份文件进行校验,在校验成功后,将所述备份文件保存到预先设置的存储位置中,所述备份文件包括对所述当前引导程序的计算结果。
可选地,所述备份指示消息为所述控制设备在备份模式下发送的,所述处理模块还设置成在所述第一接收模块接收所述控制设备发送的备份指示消息之前,通过所述CPU执行所述存储器中的所述启动引导程序;
所述第一发送模块还设置成通过所述启动引导程序向所述控制设备发送第二问询消息;
所述处理模块还设置成如果所述第一接收模块在预置的第二时间内接收到所述备份指示消息,则根据所述第一接收模块接收的备份指示消息指示所述控制设备开始监听所述串口;如果所述第一接收模块在预置的第二时间内没有接收到所述备份指示消息,则加载并启动所述当前引导程序。
可选地,所述第一接收模块还设置成在所述第一发送模块向所述控制设备发送备份文件之后,接收所述控制设备发送的备份失败消息,所述备份失败消息用于指示所述控制设备对所述备份文件校验失败。
可选地,所述处理模块还设置成在所述第一存储模块将所述升级文件写入所述嵌入式设备的存储器的过程中发生升级错误时,重新启动所述嵌入式设备,并通过所述CPU再次执行所述启动引导程序;
所述第一发送模块还设置成通过所述启动引导程序向所述控制设备发送第三问询消息;
所述第一接收模块还设置成接收所述控制设备发送的恢复指示消息,所述恢复指示消息用于指示所述嵌入式设备监听所述串口,并通过所述串口接收所述控制设备发送的恢复文件,所述恢复文件为所述控制设备根据选择的文件路径计算出的,所述恢复文件包括文件长度、校验字段和文件数据;
所述第一存储模块还设置成将所述恢复文件写入所述嵌入式设备的存储器中,以还原在写入所述升级文件前所述嵌入式设备的存储器中的引导程序。
可选地,所述恢复文件为在所述控制设备中存储的所述备份文件中选择出的一个备份文件。
一种控制设备,包括:
第二发送模块,设置成向嵌入式设备发送升级指示消息,所述升级指示消息用于指示所述嵌入式设备监听所述嵌入式设备与所述控制设备之间的串口;
第二计算模块,设置成根据选择的文件路径计算升级文件的文件长度、校验字段和文件数据;
所述第二发送模块还设置成通过所述串口向所述嵌入式设备发送所述第二计算模块计算出的升级文件,使得所述嵌入式设备将所述升级文件写入所述嵌入式设备的存储器中,以替换所述存储器中的当前引导程序。
可选地,所述控制设备还包括:启动模块,设置成在所述第二发送模块向所述嵌入式设备发送升级指示消息之前,启动所述控制设备的控制程序,并在所述控制程序上选择升级模式;
第二接收模块,设置成通过所述控制程序接收所述嵌入式设备发送的第一问询消息,所述第一问询消息用于提示所述控制设备对所述嵌入式设备中的所述当前引导程序进行升级。
可选地,所述第二发送模块还设置成在向所述嵌入式设备发送升级指示消息之前,向所述嵌入式设备发送备份指示消息,所述备份指示消息用于指示所述嵌入式设备向所述控制设备发送备份文件;
所述第二接收模块还设置成通过所述串口接收所述嵌入式设备发送的备份文件,所述备份文件包括所述嵌入式设备的存储器中的所述当前引导程序的文件长度、校验字段和文件数据;
所述控制设备还包括:
第二存储模块,设置成将所述第二接收模块接收到的备份文件写入所述 控制设备的内存中;
校验模块,设置成对所述第二存储模块写入所述控制设备的内存中的备份文件进行校验;
所述第二存储模块还设置成在所述校验模块对所述备份文件校验成功后,将所述备份文件保存到所述用户在所述控制设备中预先设置的存储位置中;
所述第二发送模块还设置成在所述校验模块对所述备份文件校验失败后,向所述嵌入式设备发送备份失败消息。
可选地,所述启动模块还设置成在所述第二发送模块向所述嵌入式设备发送备份指示消息之前,启动所述控制设备的控制程序,并在所述控制设备的控制程序上选择备份模式;
所述第二接收模块还设置成通过所述控制程序接收所述嵌入式设备发送的第二问询消息,所述第二问询消息用于提示所述控制设备对所述嵌入式设备中的所述当前引导程序进行备份。
可选地,所述第二接收模块还设置成在所述第二发送模块通过所述串口向所述嵌入式设备发送所述计算出的升级文件之后,通过所述控制程序接收所述嵌入式设备发送的第三问询消息,所述第三询问消息用于指示所述嵌入式设备对所述当前引导程序升级失败;
所述第二发送模块还设置成向所述嵌入式设备发送恢复指示消息,所述恢复指示消息用于指示所述嵌入式设备监听所述串口;
所述第二计算模块还设置成根据所述用户选择的文件路径计算恢复文件的文件长度、校验字段和文件数据;
所述第二发送模块还设置成通过所述串口向所述嵌入式设备发送所述第二计算模块计算出的恢复文件,使得所述嵌入式设备将所述恢复文件写入所述嵌入式设备的存储器中,以还原在写入所述升级文件前所述嵌入式设备的存储器中的引导程序。
可选地,所述恢复文件为在所述控制设备中存储的所述备份文件中选择出的一个备份文件。
一种嵌入式系统,包括:上述的嵌入式设备和上述的控制设备。
一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行上述方法。
本发明实施例提供的引导程序升级方法、嵌入式设备、控制设备及嵌入式系统,解决了采用烧录器对引导程序进行升级的过程中,由于需要拆卸嵌入式设备的外壳来实现升级,而导致升级引导程序的操作方式比较复杂,工作量大的问题。
在阅读并理解了附图和详细描述后,可以明白其它方面。
附图概述
图1为本发明实施例提供的一种引导程序升级方法的流程图;
图2为执行图1所提供的引导程序升级方法的一种应用场景;
图3为本发明实施例提供的另一种引导程序升级方法的流程图;
图4为本发明实施例提供的又一种引导程序升级方法的流程图;
图5为本发明实施例提供的再一种引导程序升级方法的流程图;
图6为本发明实施例提供的还一种引导程序升级方法的流程图;
图7为本发明实施例提供的一种引导程序升级方法的交互执行的流程图;
图8为本发明实施例提供的一种嵌入式设备的结构示意图;
图9为本发明实施例提供的嵌入式设备的可选方案的结构示意图;
图10为本发明实施例提供的另一种嵌入式设备的结构示意图;
图11为本发明实施例提供的一种控制设备的结构示意图;
图12为本发明实施例提供的控制设备的可选方案的结构示意图;
图13为本发明实施例提供的另一种控制设备的结构示意图。
本发明的实施方式
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。
在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行。并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。
图1为本发明实施例提供的一种引导程序升级方法的流程图。本实施例提供的引导程序升级方法适用于对嵌入式系统中的引导程序进行升级的情况中,该方法可以由嵌入式设备执行,该嵌入式设备通常以硬件和软件的方法来实现,该嵌入式设备通过与嵌入式系统中的控制设备的消息交互和数据交互实现引导程序的升级。如图1所示,本实施例的方法可以包括S110~S130:
S110,接收控制设备发送的升级指示消息,该升级指示消息用于指示嵌入式设备监听该嵌入式设备与控制设备之间的串口。
如图2所示,为执行图1所提供的引导程序升级方法的一种可选应用场景。本实施例提供的方法由嵌入式设备100执行,嵌入式设备100例如可以为交换机,电视机顶盒等工业设备,控制设备200例如可以为一台PC(Personal Computer,个人计算机),可以通过串口线缆300连接嵌入式设备100与控制设备200之间的串口;其中,嵌入式设备100中包括通过总线相连接的CPU110和存储器120,存储器120中存储有当前引导程序121和启动引导程序122,控制设备200中具有控制程序210。在本实施例中,嵌入式设备100上电后,也就是在S110之前还可以包括:S100,通过CPU 110执行存储器120中的启动引导程序,并通过该启动引导程序向控制设备200发送第一问询消息;该第一问询消息可以为一个问询握手信号,例如为0x5a5a5a5a,在其发送该第一问询消息后,等待控制设备200返回的应答信号,即等待升级指示消息,例如为0x9a9a9a9a,该嵌入式设备100在接收到升级指示消息前,并不明确是需要进行引导程序的升级操作。此时,控制设备200在升级模式(可以但不限于为:控制程序210设置为升级模式的情况)下接收到该第一问询消息,因此,该控制设备可以发起对嵌入式设备的引导程序的升级流程,从而可以通过用户的选择确定是否发送升级指示消息;可选地,如果在预置的第一时间内接收到升级指示消息,嵌入式设备100则根据该升级指示消息开 始监听串口,即开始执行引导程序的升级操作;在另一种情况下,如果在预置的第一时间内没有接收到升级指示消息则,嵌入式设备加载并启动上述当前引导程序121,此时,嵌入式设备100进入正常启动程序,即说明没有对嵌入式设备100的当前引导程序121进行升级,例如嵌入式设备100在发送第一问询消息后可以预留3秒的等待时间,以确定是进入升级引导程序的流程,还是进入正常工作的流程。
需要说明的是,本实施例中嵌入式设备100的存储器120中可以划分有第一引导程序区域121a和第二引导程序区域122a,其中,当前引导程序121为待升级的引导程序,也就是引导OS或应用程序启动的主要程序,其设置于第一引导程序区域121a中,启动引导程序122为嵌入式设备100上电后,CPU 110开始执行的程序,例如可以是进行预处理的程序,其设置于第二引导程序区域122a中;通过将不同功能的引导程序设置于存储器120的不同区域中,明确待升级引导程序的位置,以提高升级引导程序的可靠性。
S120,通过串口接收控制设备发送的升级文件,该升级文件为控制设备根据选择的文件路径计算出的,该升级文件包括文件长度、校验字段和文件数据。
可选地,在本实施例中,控制设备在发送升级指示消息后,通过用户预先指定的文件路径开始计算升级文件的文件长度、校验字段和文件数据,文件长度和,校验字段通常均为4个字节,例如用户可以在开启控制设备的控制程序后,选择升级模式,并指定待升级引导文件的路径。在计算并获取到升级文件的内容后,为了保证嵌入式设备已经解析出当前为升级流程,并已进入监听状态,通常可以等待一定的时间后开始发送上述计算出的升级文件,从而保证嵌入式设备可以通过串口接收到该升级文件。
S130,将升级文件写入嵌入式设备的存储器中,以替换该存储器中的当前引导程序。
在本实施例中,嵌入式设备通过将其接收到的升级文件写入到存储器中,实现引导程序的升级,该升级文件实际上就是较高版本的引导程序,通过该较高版本的引导程序替换掉当前嵌入式设备中的引导程序,以完成引导程序的升级流程。
需要说明的是,相关技术也提供了一种升级引导程序的方法,该方法利用预置在存储器(Flash)中的starter程序通过串口加载引导程序,然后手动输入命令对Flash中的引导程序进行更新,该方式的操作复杂,容易出错,并且不能对嵌入式设备内的引导程序进行备份,在升级失败的情况下无法回退,只能应用于开发和测试环节中,不适用于现场升级引导程序的场景中;另外,该方法提出的触发引导程序从串口加载的操作方式通过触发功能键来实现,在starter程序启动时通过检测功能键是否被触发来决定是否从串口加载,然后通过电脑软件发送引导程序的文件,该方法需要严格控制嵌入式设备及按键的触发时间,尤其在嵌入式设备与控制主机距离较远的情况下非常难以操作。
本实施例所提供的引导程序升级方法,通过接收控制设备(可以但不限于为终端)发送的升级指示消息监听嵌入式设备与该控制设备之前的串口,并通过该串口接收控制设备发送的升级文件(该升级文件可以为控制设备根据用户选择的文件路径计算出的),从而将该升级文件写入嵌入式设备的存储器,以替换存储器中的当前引导程序,本实施例通过将控制设备中的升级文件下载到嵌入式设备的存储器中,实现对该嵌入式设备中的引导程序进行升级的目标;本实施例提供的引导程序升级方法,解决了采用烧录器对引导程序进行升级的过程中,由于需要拆卸嵌入式设备的外壳来实现升级,而导致升级引导程序的操作方式比较复杂,工作量大的问题。
需要说明的是,本实施例中的嵌入式设备,仅在初始制作其存储器时,需要通过烧录器将当前引导程序和启动引导程序烧录到存储器中,在将该存储器安装于嵌入式设备之后,则不需要通过拆卸设备来实现升级引导程序的目的;本实施例提供的方法在现场升级引导程序时,可以直接通过对控制设备中控制程序的设置,在嵌入式设备上电后自动实现引导程序的升级操作,升级期间不需要操作人员的干预,与相关技术相比,操作过程更加安全、便捷,保证了引导程序升级过程中的可靠性和安全性。并且有些嵌入式设备中可能并没有预留与烧录器连接的接口,若采用通过烧录器的方式升级引导程序,则需要返厂更换嵌入式设备的存储器芯片。另外,本实施例中对控制设备中控制程序的设置,来实现升级引导程序的方式,显然比相关技术中手动 输入命令对Flash中的引导程序进行更新的方式更加易于操作,同样比通过触发功能键来触发引导程序从串口加载的操作方式更好控制,易于实现。
图3为本发明实施例提供的另一种可选的引导程序升级方法的流程图。在上述图1所示实施例的基础上,本实施例提供的方法在S120之后还可以包括:S121,将通过串口接收到的升级文件写入嵌入式设备的内存中,并对该升级文件进行校验;相应地,该方法可以还包括:S122,判断对升级文件的校验是否成功;若成功,则执行S130,若失败,则执行S123。
S123,加载并启动当前引导程序。
本实施例还可以在S110之前包含上述步骤S100。
本实施例中,在对升级文件校验成功后,继续执行升级流程,即将升级文件写入嵌入式设备的存储器中,在对升级文件校验失败后,也不会影响该嵌入式设备的使用,即若升级失败可以通过第一引导程序区域中的当前引导程序启动嵌入式设备,嵌入式设备进入正常工作流程中,保证了升级引导程序的安全性和可靠性。
图4为本发明实施例提供的又一种可选的引导程序升级方法的流程图。本实施例提供的引导程序升级方法可以适用于对嵌入式系统中的引导程序进行备份和升级的情况中,该方法可以由嵌入式设备执行,该嵌入式设备通常以硬件和软件的方法来实现,该嵌入式设备通过与嵌入式系统中的控制设备的消息交互和数据交互实现引导程序的升级。如图4所示,本实施例的方法可以包括S210~S270:
S210,接收控制设备发送的备份指示消息,该备份指示消息用于指示控制设备开始监听串口。
本实施例提供的方法同样可以应用于图2所示的应用场景中,与图1所示实施例类似地,嵌入式设备上电后,S210之前还包括:S200,通过CPU执行存储器中的启动引导程序,并通过该启动引导程序向控制设备发送第二问询消息,该第二问询消息的内容和作用与上述实施例中的第一问询消息相同,故在此不再赘述。此时,控制设备在备份模式(可以但不限于为:其控制程序设置为备份模式的情况)下接收到该第二问询消息,因此,该控制设 备可以发起对嵌入式设备的引导程序的备份流程,从而可以通过用户的选择确定是否发送备份指示消息,该备份指示消息例如为0x95959595;可选地,当在预置的第二时间内接收到备份指示消息,根据该备份指示消息指示控制设备开始监听串口,即开始执行引导程序的备份操作;在另一种情况下,当在预置的第二时间内没有接收到备份指示消息,嵌入式设备加载并启动当前引导程序,此时,嵌入式设备进入正常启动程序,即说明没有对嵌入式设备的当前引导程序进行备份。
S220,根据备份指示消息读取存储器中的当前引导程序,并计算当前引导程序的文件长度、校验字段和文件数据。
S230,向控制设备发送备份文件,以使控制设备将接收到的备份文件写入控制设备的内存中,并对备份文件进行校验,在校验成功后,将备份文件保存到预先设置(可以但不限于由用户预先设置)的存储位置中,其中,该备份文件包括对当前引导程序的计算结果。
在本实施例中,嵌入式设备在解析该备份指示消息后,可以确定需要开始执行备份流程,则通过读取存储器中的第一引导程序区域,计算出当前引导程序的文件长度、校验字段和文件数据,从而向控制设备发送备份文件,该备份文件包括对当前引导程序的计算结果;类似地,控制设备在接收到该备份文件后可以对写入内存中备份文件进行校验,并将校验成功的备份文件保存到用户在控制设备中预先设置的存储位置中,例如用户可以在开启控制设备的控制程序后,选择备份模式,并指定要保存的备份文件的路径,该备份文件例如可以保存到BOOT.bak中。
可选地,若控制设备对备份文件校验失败,则本实施例提供的方法还包括:S240,接收所述控制设备发送的备份失败消息。
本实施例提供的引导程序升级方法,在对嵌入式设备中的当前引导程序进行备份后,可以继续对嵌入式设备中的当前引导程序进行升级,在结束备份操作后,重新启动嵌入式设备开始执行升级操作,升级的方式包括S250~S270:
S250,接收控制设备发送的升级指示消息,该升级指示消息用于指示嵌入式设备监听串口。
与上述实施例相同地,在S250之前还可以包括:S231,重新启动嵌入式设备,通过CPU再次执行存储器中的启动引导程序,并通过该启动引导程序向控制设备发送第一问询消息。
S260,通过串口接收控制设备发送的升级文件,该升级文件为控制设备根据用户选择的文件路径计算出的,该升级文件包括文件长度、校验字段和文件数据。
S270,将升级文件写入嵌入式设备的存储器中,以替换该存储器中的当前引导程序。
S250~S270的实现方式可以参照图1所示实施例中S110~S130。
可选地,本实施例提供的方法,在执行S270的过程中发生升级错误的情况下,还可以对嵌入式设备中第一引导程序区域中的内容进行恢复,即退回到升级前的状态,例如可以使用S230中保存到BOOT.bak中的备份文件,重新执行一次升级流程,本实施例可以包括以下步骤:
1)、重新启动嵌入式设备,并通过CPU再次执行启动引导程序后,通过启动引导程序向控制设备发送第三问询消息。
2)、接收控制设备发送的恢复指示消息,恢复指示消息用于指示嵌入式设备监听串口。
3)、通过串口接收控制设备发送的恢复文件,恢复文件为控制设备根据用户选择的文件路径计算出的,恢复文件包括文件长度、校验字段和文件数据。
4)、将恢复文件写入嵌入式设备的存储器中,以还原在写入升级文件前嵌入式设备的存储器中的引导程序。
在本实施例中,在升级失败后需要重启嵌入式设备,通过CPU再次执行启动引导程序,发送第三问询消息时控制设备的控制程序同样为升级模式,因此,嵌入式设备接收到恢复指示消息后的处理方式与图1所示实施例中接收到升级指示消息的处理方式类似,均是采用控制设备发送的文件内容替换存储器中现有的引导程序;不同的是,本实施例中用户在控制设备中选择的文件路径可以是上述通过备份流程存储到控制设备中的备份文件的路径,即 该恢复文件为在控制设备中存储的备份文件中选择出的其中一个备份文件,例如可以是上述S230中保存到BOOT.bak中的备份文件。
本实施例提供的方法,在对嵌入式设备进行升级操作失败时,可以利用存储到控制设备中的备份文件,重新执行一次升级操作,即可将嵌入式设备中的引导程序恢复到执行升级操作之前,存储器中具有的引导程序。因此本实施例提供的方法,在执行升级操作前对嵌入式设备中的当前引导程序进行备份的方式,解决了升级失败无法退回的问题,从而实现了将引导程序升级方法应用于现场升级的场景中,在提高了引导程序升级过程中的安全性的同时,保证该方法具有可回溯性,并增加了该方法的使用范围。
图5为本发明实施例提供的再一种可选的引导程序升级方法的流程图。本实施例提供的引导程序升级方法适用于对嵌入式系统中的引导程序进行升级的情况中,该方法可以由控制设备执行,该控制设备通常以硬件和软件的方法来实现,该控制设备通过与嵌入式系统中的嵌入式设备的消息交互和数据交互实现引导程序的升级。如图5所示,本实施例的方法可以包括S310~S330:
S310,向嵌入式设备发送升级指示消息,该升级指示消息用于指示嵌入式设备监听嵌入式设备与控制设备之间的串口。
本实施例提供的方法同样可以应用于图2所示的应用场景中,在S310之前还可以包括:S300,启动控制设备的控制程序,并在该控制程序上选择升级模式;嵌入式设备上电后,在CPU启动上述实施例中所述的启动引导程序后,向控制设备发送第一问询信号,相应地,本实施例中还可以包括:S301,通过控制程序接收嵌入式设备发送的第一问询消息,第一问询消息用于提示控制设备对嵌入式设备中的当前引导程序进行升级。控制设备可以通过用户的选择确定是否发送升级指示消息,在其发送该升级指示消息的情况下,通过该消息向嵌入式设备指示控制设备已进入升级流程,指示嵌入式设备开始监听串口,以随时接收控制设备发送的升级文件。
S320,根据选择的文件路径计算升级文件的文件长度、校验字段和文件数据。
在本实施例中,用户可以在选择升级模式后,指定待升级引导文件的路 径,从而嵌入式设备根据用户选择的文件路径计算并获取升级文件的内容,该升级文件的内容与上述实施例中相同。
S330,通过串口向嵌入式设备发送计算出的升级文件,使得嵌入式设备将升级文件写入嵌入式设备的存储器中,以替换存储器中的当前引导程序。
在本实施例中,为了保证嵌入式设备已经解析出当前为升级流程,并已进入监听状态,通常可以在计算出升级文件后等待一定的时间之后执行发送升级文件的操作,例如在S320到S330之间可以设定3秒的延迟时间,从而保证嵌入式设备可以通过串口接收到该升级文件。
本实施例所提供的引导程序升级方法,通过向嵌入式设备发送升级指示消息,以指示嵌入式设备开始监听嵌入式设备与该控制设备之前的串口,控制设备(可以但不限于为终端)根据用户选择的文件路径计算出升级文件的内容,从而将该升级文件通过串口发送给嵌入式设备,使得该嵌入式设备将升级文件写入其存储器中,以替换存储器中的当前引导程序,本实施例通过将控制设备中的升级文件下载到嵌入式设备的存储器中,实现对该嵌入式设备中的引导程序进行升级的目标;本实施例提供的引导程序升级方法,解决了采用烧录器对引导程序进行升级的过程中,由于需要拆卸嵌入式设备的外壳来实现升级,而导致升级引导程序的操作方式比较复杂,工作量大的问题。
需要说明的是,本实施例提供的方法中,嵌入式设备发送第一问询消息后,根据在预置的第一时间内是否接收到升级指示消息执行的相应操作,以及在接收到升级文件保存到内存后,对该升级文件进行验证,并且根据验证结果执行的相应操作,均可以与上述图1到图4所示实施例中的操作方式相同,并且具有相同的有益效果,故在此不再赘述。
图6为本发明实施例提供的又一种可选的引导程序升级方法的流程图。与图4所示实施例类似地,本实施例提供的引导程序升级方法适用于对嵌入式系统中的引导程序进行备份和升级的情况中。如图6所示,本实施例的方法可以包括S410~S470:
S410,向嵌入式设备发送备份指示消息,该备份指示消息用于指示嵌入式设备向控制设备(可以但不限于为终端)发送备份文件。
在本实施例中,在S410之前还可以包括:S400,启动控制设备的控制程序,并在该控制程序上选择备份模式;S401,通过控制程序接收嵌入式设备发送的第二问询消息,第二问询消息用于提示控制设备对嵌入式设备中的当前引导程序进行备份。控制设备可以通过用户的选择确定是否发送备份指示消息,在其发送该备份指示消息的情况下,通过该消息向嵌入式设备指示控制设备已进入备份流程,指示嵌入式设备计算其存储器中的当期引导程序的文件长度、校验字段和文件数据,该计算结果的内容即是备份文件,并向控制设备发送该备份文件。
S420,通过串口接收嵌入式设备发送的备份文件,该备份文件包括嵌入式设备的存储器中的当前引导程序的文件长度、校验字段和文件数据。
S430,将接收到的备份文件写入控制设备的内存中,并对备份文件进行校验。S430后还可以包括S431和S432;
S431,判断对备份文件的校验是否成功;若成功,则执行S440,若失败,则执行S432。
S440,将备份文件保存到用户在控制设备中预先设置的存储位置中。
S432,向嵌入式设备发送备份失败消息。
在本实施例中,控制设备可以将接收到的备份文件先保存到内存中进行校验,在对备份文件校验成功后,完成备份流程,即将备份文件保存到用户在控制设备中预先设置的存储位置中,例如可以是控制程序上选择备份模式后,在控制设备中指定要保存的备份文件的路径,该备份文件例如可以保存到BOOT.bak中;另外,在对备份文件校验失败后,可以发送备份失败消息以提示嵌入式设备。
本实施例提供的引导程序升级方法,在对嵌入式设备中的当前引导程序进行备份后,可以继续对嵌入式设备中的当前引导程序进行升级,在实际实现中,结束备份操作后,即在S440之后,重新启动嵌入式设备开始执行升级操作,升级的方式包括S450~S470:
S450,向嵌入式设备发送升级指示消息,该升级指示消息用于指示嵌入式设备监听嵌入式设备与控制设备之间的串口。
类似地,在S450之前可以包括:S441,在该控制程序上选择升级模式;S442,通过控制程序接收嵌入式设备发送的第一问询消息,第一问询消息用于提示控制设备对嵌入式设备中的当前引导程序进行升级。
S460,根据用户选择的文件路径计算升级文件的文件长度、校验字段和文件数据。
S470,通过串口向嵌入式设备发送计算出的升级文件,使得嵌入式设备将升级文件写入嵌入式设备的存储器中,以替换存储器中的当前引导程序。
可选地,S441~S470的实现方式可以参照图5所示实施例中的S300~S330。
可选地,本实施例提供的方法,在嵌入式设备将升级文件写入存储器的过程中若发生升级错误的情况下,还可以对嵌入式设备中第一引导程序区域中的内容进行恢复,即退回到升级前的状态,例如可以使用S440中保存到BOOT.bak中的备份文件,重新执行一次升级流程,本实施例的可选实现方式可以包括以下步骤:
1)、通过控制程序接收嵌入式设备发送的第三问询消息,该第三询问消息用于指示嵌入式设备对当前引导程序升级失败。
2)、向嵌入式设备发送恢复指示消息,该恢复指示消息用于指示嵌入式设备监听串口。
3)、根据用户选择的文件路径计算恢复文件的文件长度、校验字段和文件数据。
4)、通过串口向嵌入式设备发送恢复文件,使得嵌入式设备将恢复文件写入嵌入式设备的存储器中,以还原在写入升级文件前嵌入式设备的存储器中的引导程序。
在本实施例中,在升级失败后同样需要重启嵌入式设备,通过CPU再次执行启动引导程序,发送第三问询消息时控制设备的控制程序同样为升级模式,因此,嵌入式设备接收到恢复指示消息后的处理方式与上述实施例中接收到升级指示消息的处理方式类似,均是采用控制设备发送的文件内容替换存储器中现有的引导程序;不同的是,本实施例中用户在控制设备中选择的 文件路径可以是上述通过备份流程存储到控制设备中的备份文件的路径,即该恢复文件为在控制设备中存储的备份文件中选择出的其中一个备份文件,例如可以是上述S440中保存到BOOT.bak中的备份文件。
图7为本发明实施例提供的一种引导程序升级方法的交互执行的流程图。本实施例提供的引导程序升级方法适用于对嵌入式系统中的引导程序进行备份和升级的情况中,该方法可以由控制设备和嵌入式设备执行。如图7所示,本实施例的方法可以包括S501~S514:
在控制设备中执行S501,启动控制设备的控制程序,并在该控制程序上选择升级模式。
S502,通过用户的选择确定升级文件的路径。
随后对嵌入式设备上电,嵌入式设备开始执行,S503,通过CPU执行存储器中的启动引导程序。
S504,通过该启动引导程序向控制设备发送第一问询消息。
S505,等待预置的第一时间,并判断在该预置的第一时间内是否接收到升级指示消息;若接收到,则执行S506;若没有接收到,则执行S507,加载并启动当前引导程序。
此时,控制设备在接收到第一问询消息后,可以通过用户的选择确定是否发送应答响应,其中,若需要进入升级流程,控制设备执行S508,向嵌入式设备发送升级指示消息;相应地,S505中的判断若为接收到,则进而执行S506,开始监听串口。
控制设备在发送升级指示消息后,继续执行S509,根据用户选择的文件路径计算升级文件的文件长度、校验字段和文件数据,以获取出升级文件的内容。
S510,通过串口向嵌入式设备发送已计算出的升级文件。
嵌入式设备在此时处于监听状态,在通过串口接收到控制设备发送的升级文件后,执行S511,将通过串口接收到的升级文件写入嵌入式设备的内存中,并对升级文件进行校验。
S512,判断对升级文件的校验是否成功;若成功,则执行S513,若失败, 则执行S514。
S513,将升级文件写入嵌入式设备的存储器中,以替换存储器中的当前引导程序。
S514,加载并启动当前引导程序。
本实施例提供的方法,可以在对嵌入式设备的当前引导程序进行升级前,对该当前引导程序先进行备份,实现方式包括,控制设备在执行S501之前还可以执行S515~S527:
S515、启动控制设备的控制程序,并在该控制程序上选择备份模式。
S516,通过用户的选择指定备份文件的保存路径。
随后对嵌入式设备上电,该嵌入式设备开始执行,S517,通过CPU执行存储器中的启动引导程序。
S518,通过该启动引导程序向控制设备发送第二问询消息。
S519,等待预置的第二时间,并判断在该预置的第二时间内是否接收到备份指示消息;若接收到,则执行S520;若没有接收到,则执行S521,加载并启动当前引导程序。
此时,控制设备在接收到第二问询消息后,通过用户的选择确定是否发送应答响应,其中,若需要进入备份流程,控制设备执行S522,向嵌入式设备发送备份指示消息;相应地,S519中的判断若为接收到,则执行S520,读取存储器中的当前引导程序,并计算该当前引导程序的文件长度、校验字段和文件数据。
S523,向所述控制设备发送备份文件,该备份文件包括嵌入式设备对当前引导程序的计算结果。
控制设备在此时处于监听状态,在通过串口接收到嵌入式设备发送的备份文件后,执行S524,将接收到的备份文件写入控制设备的内存中,并对备份文件进行校验。
S525,判断对备份文件的校验是否成功;若成功,则执行S526,若失败,则执行S527。
S526,将备份文件保存到用户在控制设备中预先设置的存储位置中。
S527,向嵌入式设备发送备份失败消息。
需要说明的是,本实施例提供的引导程序升级方法与上述实施例类似地,在嵌入式设备执行S513的过程中发生升级错误的情况时,还可以对嵌入式设备的存储器中的引导程序进行恢复,即退回到升级前的状态,例如可以使用S526中保存到控制设备中的备份文件,重新执行一次升级流程,即再次执行S501~S514,在本次执行过程中,用户的选择确定升级文件的路径可以为:用户将控制设备中存储的备份文件的路径确定为升级文件的路径,从而将S501~S514中的升级文件替换为控制设备中存储的备份文件。
图8为本发明实施例提供的一种嵌入式设备的结构示意图。本实施例提供的嵌入式设备适用于对嵌入式系统中的引导程序进行升级的情况中,该嵌入式设备通常以硬件和软件的方法来实现,通过与嵌入式系统中的控制设备的消息交互和数据交互实现引导程序的升级。如图8所示,本实施例的嵌入式设备包括第一接收模块11和第一存储模块12。
其中,第一接收模块11设置成接收控制设备发送的升级指示消息,升级指示消息用于指示第一接收模块11监听嵌入式设备与控制设备之间的串口。
所述第一存储模块12设置成将所述第一接收模块11接收到的升级文件写入所述嵌入式设备的存储器中,以替换所述存储器中的当前引导程序。
通过本实施例提供的嵌入式设备进行引导程序升级时同样可以应用于图2所示的应用场景中,升级指示消息为控制设备在控制设备中的控制程序为升级模式下发送的,可选地,如图9所示,本实施例一个可选方案提供的嵌入式设备还包括:处理模块13,设置成在第一接收模块11接收控制设备发送的升级指示消息之前,通过CPU执行存储器中的启动引导程序;第一发送模块14,设置成通过启动引导程序向控制设备发送第一问询消息;相应地,一方面,处理模块13,还设置成当第一接收模块11在预置的第一时间内接收到升级指示消息,根据第一接收模块11接收的升级指示消息开始监听串口;另一方面,处理模块13,还设置成当第一接收模块11在预置的第一时间内没有接收到升级指示消息,加载并启动当前引导程序。
所述第一接收模块11还可以设置成通过串口接收控制设备发送的升级文件,该升级文件为控制设备根据用户选择的文件路径计算出的,该升级文件包括文件长度、校验字段和文件数据。
本发明实施例提供的嵌入式设备设置成执行图1所示实施例提供的引导程序升级方法,具备相应的功能模块,其实现原理和技术效果类似,此处不再赘述。
可选地,图10为本发明实施例提供的另一种嵌入式设备的结构示意图。在上述图9所示实施例的可选方案的基础上,本实施例中的第一存储模块12可以包括:存储单元15,设置成在第一接收模块11接收到控制设备发送的升级文件之后,将该升级文件写入嵌入式设备的内存中;校验单元16,设置成对存储单元15写入嵌入式设备的内存中的升级文件进行校验;相应地,存储单元15,还设置成在校验单元16对升级文件校验成功后,将升级文件写入嵌入式设备的存储器中;在另一种可能的实现方式中,校验单元16,还设置成在对升级文件校验失败后,加载并启动当前引导程序。
本发明实施例的可选方案提供的嵌入式设备不仅可以对其引导程序进行升级,在升级前还可以将其存储器中的当前引导程序备份到控制设备中,实现方式为:第一接收模块11,还设置成在接收控制设备发送的升级指示消息之前,接收控制设备发送的备份指示消息,该备份指示消息用于指示控制设备开始监听串口;相应地,该嵌入式设备还可以包括:第一计算模块17,用于根据第一接收模块11接收的备份指示消息读取存储器中的当前引导程序,并计算当前引导程序的文件长度、校验字段和文件数据;第一发送模块14,还设置成向控制设备发送备份文件,以使控制设备将接收到的备份文件写入控制设备的内存中,并对备份文件进行校验,在校验成功后,将备份文件保存到用户在控制设备中预先设置的存储位置中,其中,该备份文件包括对当前引导程序的计算结果。
与上述实施例类似地,备份指示消息可以为控制设备在控制程序为备份模式下发送的,则处理模块13,还可以设置成在第一接收模块11接收控制设备发送的备份指示消息之前,通过CPU执行存储器中的启动引导程序;第一发送模块14,还可以设置成通过启动引导程序向控制设备发送第二问询消 息;相应地,一方面,处理模块13,还可以设置成当第一接收模块11在预置的第一时间内接收到备份指示消息,根据第一接收模块11接收的备份指示消息指示控制设备开始监听串口;另一方面,处理模块13,还可以设置成当第一接收模块11在预置的第一时间内没有接收到备份指示消息,加载并启动当前引导程序。
可选地,若控制设备对备份文件校验失败,还可以向嵌入式设备发送提示消息,则本实施例中的第一接收模块11,还可以设置成在第一发送模块14向控制设备(可以但不限于为终端)发送备份文件之后,接收该控制设备发送的备份失败消息,备份失败消息用于指示所述控制设备对所述备份文件校验失败。
可选地,本实施例一种可选方案提供的嵌入式设备,在第一存储模块12将升级文件写入存储器的过程中发生升级错误的情况下,还可以对嵌入式设备的存储器中的引导程序进行恢复,即退回到升级前的状态,例如可以使用执行备份操作时保存到控制设备中的备份文件,重新执行一次升级操作,在本次执行升级操作过程中,升级文件的路径为控制设备中存储的备份文件的路径,从而在执行升级操作时,将上述升级文件替换为控制设备中存储的备份文件,实现方式为:处理模块13,还可以设置成在第一存储模块12将升级文件写入嵌入式设备的存储器的过程中发生升级错误时,重新启动嵌入式设备,并通过CPU再次执行启动引导程序;第一发送模块14,还可以设置成通过启动引导程序向控制设备发送第三问询消息;第一接收模块11,还可以设置成接收控制设备发送的恢复指示消息,该恢复指示消息用于指示该嵌入式设备监听串口,并通过串口接收控制设备发送的恢复文件,该恢复文件为控制设备根据用户选择的文件路径计算出的,该恢复文件包括文件长度、校验字段和文件数据;第一存储模块12,还可以设置成将恢复文件写入嵌入式设备的存储器中,以还原在写入升级文件前嵌入式设备的存储器中的引导程序。上述恢复引导程序的操作方式与升级引导程序的操作方式类似,只是写入嵌入式设备的存储器中的文件内容不同,故在此不再详细说明。
本发明实施例提供的嵌入式设备设置成执行图3和图4所示实施例提供的引导程序升级方法,具备相应的功能模块,其实现原理和技术效果类似, 此处不再赘述。
图11为本发明实施例提供的一种控制设备的结构示意图。本实施例提供的控制设备适用于对嵌入式系统中的引导程序进行升级的情况中,该控制设备通常以硬件和软件的方法来实现,通过与嵌入式系统中的嵌入式设备的消息交互和数据交互实现引导程序的升级。如图11所示,本实施例的控制设备包括第二发送模块21和第二计算模块22。
其中,第二发送模块21,设置成向嵌入式设备发送升级指示消息,升级指示消息用于指示嵌入式设备监听嵌入式设备与控制设备之间的串口。
第二计算模块22,设置成根据选择的文件路径计算升级文件的文件长度、校验字段和文件数据;
所述第二发送模块21还设置成通过所述串口向所述嵌入式设备发送所述第二计算模块计算出的升级文件,使得所述嵌入式设备将所述升级文件写入所述嵌入式设备的存储器中,以替换所述存储器中的当前引导程序。
通过本实施例提供的控制设备进行引导程序升级时同样可以应用于图2所示的应用场景中,在可选实现方案中,该控制设备如图12所示,还可以包括:启动模块23,设置成在第二发送模块21向嵌入式设备发送升级指示消息之前,启动控制设备的控制程序,并在该控制程序上选择升级模式;嵌入式设备上电后,在CPU启动上述实施例中所述的启动引导程序后,向控制设备发送第一问询信号,相应地,控制设备还可以包括:第二接收模块24,设置成通过控制程序接收嵌入式设备发送的第一问询消息,该第一问询消息用于提示控制设备对嵌入式设备中的当前引导程序进行升级。
本发明实施例提供的控制设备可以设置成执行图5所示实施例提供的引导程序升级方法,具备相应的功能模块,其实现原理和技术效果类似,此处不再赘述。
需要说明的是,本实施例提供的控制设备在执行引导程序升级方法中,嵌入式设备发送第一问询消息后,可以根据在预置的第一时间内是否接收到升级指示消息执行的相应操作,以及在接收到升级文件保存到内存后,对该升级文件进行验证,并且根据验证结果执行的相应操作,均与上述实施例中 的操作方式相同,并且具有相同的有益效果,故在此不再赘述。
可选地,图13为本发明实施例提供的另一种控制设备的结构示意图。本发明实施例提供的控制设备不仅可以对其引导程序进行升级,在升级前还可以将嵌入式设备的存储器中的当前引导程序备份到该控制设备中,实现方式为:第二发送模块21还可以设置成在向嵌入式设备发送升级指示消息之前,向嵌入式设备发送备份指示消息,该备份指示消息用于指示嵌入式设备向控制设备(可以但不限于为终端)发送备份文件;相应地,第二接收模块24,还可以设置成通过串口接收嵌入式设备发送的备份文件,备份文件包括嵌入式设备的存储器中的当前引导程序的文件长度、校验字段和文件数据;在上述图11所示可选方案的基础上,本实施例提供的控制设备还可以包括:第二存储模块25,设置成将第二接收模块24接收到的备份文件写入控制设备的内存中;校验模块26,设置成对第二存储模块25写入控制设备的内存中的备份文件进行校验;相应地,第二存储模块25,还可以设置成在校验模块26对备份文件校验成功后,将备份文件保存到用户在控制设备中预先设置的存储位置中;在另一种实现方式中,第二发送模块21,还可以设置成在校验模块26对备份文件校验失败后,向嵌入式设备发送备份失败消息。
与上述实施例类似地,本实施例提供的控制设备,启动模块23,还可以设置成在第二发送模块21向嵌入式设备发送备份指示消息之前,启动控制设备的控制程序,并在控制设备的控制程序上选择备份模式;嵌入式设备上电后,在CPU启动上述实施例中的启动引导程序后,向控制设备发送第二问询信号,相应地,第二接收模块24,还可以设置成通过控制程序接收嵌入式设备发送的第二问询消息,第二问询消息用于提示控制设备对嵌入式设备中的当前引导程序进行备份。
可选地,本实施例提供的控制设备执行引导程序升级方式时,在嵌入式设备将升级文件写入其存储器的过程中发生升级错误的情况下,还可以对嵌入式设备的存储器中的引导程序进行恢复,即退回到升级前的状态,例如可以使用执行备份操作时保存到控制设备中的备份文件,重新执行一次升级操作,在本次执行升级操作过程中,升级文件的路径为控制设备中存储的备份文件的路径,从而在执行升级操作时,将上述升级文件替换为控制设备中存 储的备份文件,其实现方式为:第二接收模块24,还可以设置成在第二发送模块21通过串口向嵌入式设备发送计算出的升级文件之后,通过控制程序接收嵌入式设备发送的第三问询消息,该第三询问消息用于指示嵌入式设备对当前引导程序升级失败;第二发送模块21,还可以设置成向嵌入式设备发送恢复指示消息,该恢复指示消息用于指示嵌入式设备监听串口;第二计算模块22,还可以设置成根据用户选择的文件路径计算恢复文件的文件长度、校验字段和文件数据;从而,第二发送模块21可以通过串口向嵌入式设备发送第二计算模块22计算出的恢复文件,使得嵌入式设备将恢复文件写入嵌入式设备的存储器中,以还原在写入升级文件前嵌入式设备的存储器中的引导程序。上述恢复引导程序的操作方式与升级引导程序的操作方式类似,只是写入嵌入式设备的存储器中的文件内容不同,故在此不再详细说明。
图2为本发明实施例提供的一种嵌入式系统的结构示意图。如图2所示,本实施例提供的嵌入式系统中可以包括嵌入式设备100和控制设备200,该嵌入式设备100可以为上述图8和图10任一实施例中所示的嵌入式设备,该控制设备200可以为上述图11和图13任一实施例中所示的控制设备,可以设置成执行图1,图3到图7所示的引导程序升级方法,其实现的方式和实现的有益效果均与上述实施例相同,故在此不再赘述。
一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行上述方法。
工业实用性
本发明实施例提供的引导程序升级方法、嵌入式设备、控制设备及嵌入式系统,解决了采用烧录器对引导程序进行升级的过程中,由于需要拆卸嵌入式设备的外壳来实现升级,而导致升级引导程序的操作方式比较复杂,工作量大的问题。

Claims (29)

  1. 一种引导程序升级方法,包括:
    接收控制设备发送的升级指示消息,所述升级指示消息用于指示嵌入式设备监听所述嵌入式设备与所述控制设备之间的串口;通过所述串口接收所述控制设备发送的升级文件,所述升级文件为所述控制设备根据选择的文件路径计算出的,所述升级文件包括文件长度、校验字段和文件数据;
    将所述升级文件写入所述嵌入式设备的存储器中,以替换所述存储器中的当前引导程序。
  2. 根据权利要求1所述的引导程序升级方法,其中,所述通过所述串口接收所述控制设备发送的升级文件之后、将所述升级文件写入所述嵌入式设备的存储器中之前还包括:
    将通过所述串口接收到的升级文件写入所述嵌入式设备的内存中,并对所述升级文件进行校验;
    如果对所述升级文件校验成功,则进行所述将升级文件写入所述嵌入式设备的存储器中的操作;
    如果对所述升级文件校验失败,则加载并启动所述当前引导程序。
  3. 根据权利要求2所述的引导程序升级方法,其中,所述升级指示消息为所述控制设备在升级模式下发送的,所述接收控制设备发送的升级指示消息之前还包括:
    通过中央处理器CPU执行所述存储器中的启动引导程序,并通过所述启动引导程序向所述控制设备发送第一问询消息;
    所述方法还包括:
    如果在预置的第一时间内接收到所述升级指示消息,根据所述升级指示消息开始监听所述串口;
    如果在预置的第一时间内没有接收到所述升级指示消息,则加载并启动所述当前引导程序。
  4. 根据权利要求3所述的引导程序升级方法,其中,所述接收控制设备 发送的升级指示消息之前还包括:
    接收所述控制设备发送的备份指示消息,所述备份指示消息用于指示所述控制设备开始监听所述串口;
    根据所述备份指示消息读取所述存储器中的所述当前引导程序,并计算所述当前引导程序的文件长度、校验字段和文件数据;
    向所述控制设备发送备份文件,以使所述控制设备将接收到的所述备份文件写入所述控制设备的内存中,并对所述备份文件进行校验,在校验成功后,将所述备份文件保存到预先设置的存储位置中,所述备份文件包括对所述当前引导程序的计算结果。
  5. 根据权利要求4所述的引导程序升级方法,其中,所述备份指示消息为所述控制设备在备份模式下发送的,所述接收所述控制设备发送的备份指示消息之前还包括:
    通过所述CPU执行所述存储器中的所述启动引导程序,并通过所述启动引导程序向所述控制设备发送第二问询消息;
    所述方法还包括:
    如果在预置的第二时间内接收到所述备份指示消息,则根据所述备份指示消息指示所述控制设备开始监听所述串口;
    如果在预置的第二时间内没有接收到所述备份指示消息,则加载并启动所述当前引导程序。
  6. 根据权利要求4所述的引导程序升级方法,其中,所述向所述控制设备发送备份文件之后还包括:
    接收所述控制设备发送的备份失败消息,所述备份失败消息用于指示所述控制设备对所述备份文件校验失败。
  7. 根据权利要求4~6中任一项所述的引导程序升级方法,还包括:
    如果在将所述升级文件写入所述嵌入式设备的存储器的过程中发生升级错误,则重新启动所述嵌入式设备,并通过所述CPU再次执行所述启动引导程序后,通过所述启动引导程序向所述控制设备发送第三问询消息;
    接收所述控制设备发送的恢复指示消息,所述恢复指示消息用于指示所述嵌入式设备监听所述串口;
    通过所述串口接收所述控制设备发送的恢复文件,所述恢复文件为所述控制设备根据选择的文件路径计算出的,所述恢复文件包括文件长度、校验字段和文件数据;
    将所述恢复文件写入所述嵌入式设备的存储器中,以还原在写入所述升级文件前所述嵌入式设备的存储器中的引导程序。
  8. 根据权利要求7所述的引导程序升级方法,其中,所述恢复文件为在所述控制设备中存储的所述备份文件中选择出的一个备份文件。
  9. 一种引导程序升级方法,包括:
    向嵌入式设备发送升级指示消息,所述升级指示消息用于指示所述嵌入式设备监听所述嵌入式设备与所述控制设备之间的串口;
    根据选择的文件路径计算升级文件的文件长度、校验字段和文件数据;
    通过所述串口向所述嵌入式设备发送所述计算出的升级文件,使得所述嵌入式设备将所述升级文件写入所述嵌入式设备的存储器中,以替换所述存储器中的当前引导程序。
  10. 根据权利要求9所述的引导程序升级方法,其中,所述向嵌入式设备发送升级指示消息之前还包括:
    启动所述控制设备的控制程序,并在所述控制程序上选择升级模式;
    通过所述控制程序接收所述嵌入式设备发送的第一问询消息,所述第一问询消息用于提示所述控制设备对所述嵌入式设备中的所述当前引导程序进行升级。
  11. 根据权利要求10所述的引导程序升级方法,其中,所述向嵌入式设备发送升级指示消息之前还包括:
    向所述嵌入式设备发送备份指示消息,所述备份指示消息用于指示所述嵌入式设备向所述控制设备发送备份文件;
    通过所述串口接收所述嵌入式设备发送的备份文件,所述备份文件包括 所述嵌入式设备的存储器中的所述当前引导程序的文件长度、校验字段和文件数据;
    将所述接收到的备份文件写入所述控制设备的内存中,并对所述备份文件进行校验;
    当对所述备份文件校验成功后,将所述备份文件保存到所述控制设备中预先设置的存储位置中;
    当对所述备份文件校验失败后,向所述嵌入式设备发送备份失败消息。
  12. 根据权利要求11所述的引导程序升级方法,其中,所述向所述嵌入式设备发送备份指示消息之前还包括:
    启动所述控制设备的控制程序,并在所述控制程序上选择备份模式;
    通过所述控制程序接收所述嵌入式设备发送的第二问询消息,所述第二问询消息用于提示所述控制设备对所述嵌入式设备中的所述当前引导程序进行备份。
  13. 根据权利要求11或12所述的引导程序升级方法,其中,所述通过所述串口向所述嵌入式设备发送所述计算出的升级文件之后还包括:
    通过所述控制程序接收所述嵌入式设备发送的第三问询消息,所述第三询问消息用于指示所述嵌入式设备对所述当前引导程序升级失败;
    向所述嵌入式设备发送恢复指示消息,所述恢复指示消息用于指示所述嵌入式设备监听所述串口;
    根据选择的文件路径计算恢复文件的文件长度、校验字段和文件数据;
    通过所述串口向所述嵌入式设备发送所述恢复文件,使得所述嵌入式设备将所述恢复文件写入所述嵌入式设备的存储器中,以还原在写入所述升级文件前所述嵌入式设备的存储器中的引导程序。
  14. 根据权利要求13所述的引导程序升级方法,其中,所述恢复文件为在所述控制设备中存储的所述备份文件中选择出的一个备份文件。
  15. 一种嵌入式设备,包括:
    第一接收模块,设置成接收控制设备发送的升级指示消息,所述升级指 示消息用于指示所述第一接收模块监听所述嵌入式设备与所述控制设备之间的串口;通过所述串口接收所述控制设备发送的升级文件,所述升级文件为所述控制设备根据选择的文件路径计算出的,所述升级文件包括文件长度、校验字段和文件数据;
    第一存储模块,设置成将所述第一接收模块接收到的升级文件写入所述嵌入式设备的存储器中,以替换所述存储器中的当前引导程序。
  16. 根据权利要求15所述的嵌入式设备,其中,所述第一存储模块包括:存储单元,设置成在所述第一接收模块接收到所述控制设备发送的所述升级文件之后,将所述升级文件写入所述嵌入式设备的内存中;
    校验单元,设置成对所述存储单元写入所述嵌入式设备的内存中的升级文件进行校验;
    所述存储单元还设置成在所述校验单元对所述升级文件校验成功后,将所述升级文件写入所述嵌入式设备的存储器中;
    所述校验单元还设置成在对所述升级文件校验失败后,加载并启动所述当前引导程序。
  17. 根据权利要求16所述的嵌入式设备,其中,所述升级指示消息为所述控制设备为所述控制设备在升级模式下发送的,所述嵌入式设备还包括:
    处理模块,设置成在所述第一接收模块接收控制设备发送的升级指示消息之前,通过中央处理器CPU执行所述存储器中的启动引导程序;
    第一发送模块,设置成通过所述启动引导程序向所述控制设备发送第一问询消息;
    所述处理模块还设置成如果所述第一接收模块在预置的第一时间内接收到所述升级指示消息,则根据所述第一接收模块接收的升级指示消息开始监听所述串口;如果所述第一接收模块在预置的第一时间内没有接收到所述升级指示消息,则加载并启动所述当前引导程序。
  18. 根据权利要求17所述的嵌入式设备,其中,所述第一接收模块还设置成在接收所述控制设备发送的升级指示消息之前,接收所述控制设备发送的备份指示消息,所述备份指示消息用于指示所述控制设备开始监听所述串 口;
    所述嵌入式设备还包括:第一计算模块,设置成根据所述第一接收模块接收的备份指示消息读取所述存储器中的所述当前引导程序,并计算所述当前引导程序的文件长度、校验字段和文件数据;
    所述第一发送模块还设置成向所述控制设备发送备份文件,以使所述控制设备将接收到的所述备份文件写入所述控制设备的内存中,并对所述备份文件进行校验,在校验成功后,将所述备份文件保存到预先设置的存储位置中,所述备份文件包括对所述当前引导程序的计算结果。
  19. 根据权利要求18所述的嵌入式设备,其中,所述备份指示消息为所述控制设备在备份模式下发送的,所述处理模块还设置成在所述第一接收模块接收所述控制设备发送的备份指示消息之前,通过所述CPU执行所述存储器中的所述启动引导程序;
    所述第一发送模块还设置成通过所述启动引导程序向所述控制设备发送第二问询消息;
    所述处理模块还设置成如果所述第一接收模块在预置的第二时间内接收到所述备份指示消息,则根据所述第一接收模块接收的备份指示消息指示所述控制设备开始监听所述串口;如果所述第一接收模块在预置的第二时间内没有接收到所述备份指示消息,则加载并启动所述当前引导程序。
  20. 根据权利要求18所述的嵌入式设备,其中,所述第一接收模块还设置成在所述第一发送模块向所述控制设备发送备份文件之后,接收所述控制设备发送的备份失败消息,所述备份失败消息用于指示所述控制设备对所述备份文件校验失败。
  21. 根据权利要求18~20中任一项所述的嵌入式设备,其中,所述处理模块还设置成在所述第一存储模块将所述升级文件写入所述嵌入式设备的存储器的过程中发生升级错误时,重新启动所述嵌入式设备,并通过所述CPU再次执行所述启动引导程序;
    所述第一发送模块还设置成通过所述启动引导程序向所述控制设备发送第三问询消息;
    所述第一接收模块还设置成接收所述控制设备发送的恢复指示消息,所述恢复指示消息用于指示所述嵌入式设备监听所述串口,并通过所述串口接收所述控制设备发送的恢复文件,所述恢复文件为所述控制设备根据选择的文件路径计算出的,所述恢复文件包括文件长度、校验字段和文件数据;
    所述第一存储模块还设置成将所述恢复文件写入所述嵌入式设备的存储器中,以还原在写入所述升级文件前所述嵌入式设备的存储器中的引导程序。
  22. 根据权利要求21所述的嵌入式设备,其中,所述恢复文件为在所述控制设备中存储的所述备份文件中选择出的一个备份文件。
  23. 一种控制设备,包括:
    第二发送模块,设置成向嵌入式设备发送升级指示消息,所述升级指示消息用于指示所述嵌入式设备监听所述嵌入式设备与所述控制设备之间的串口;
    第二计算模块,设置成根据选择的文件路径计算升级文件的文件长度、校验字段和文件数据;
    所述第二发送模块还设置成通过所述串口向所述嵌入式设备发送所述第二计算模块计算出的升级文件,使得所述嵌入式设备将所述升级文件写入所述嵌入式设备的存储器中,以替换所述存储器中的当前引导程序。
  24. 根据权利要求23所述的控制设备,其中,所述控制设备还包括:启动模块,设置成在所述第二发送模块向所述嵌入式设备发送升级指示消息之前,启动所述控制设备的控制程序,并在所述控制程序上选择升级模式;
    第二接收模块,设置成通过所述控制程序接收所述嵌入式设备发送的第一问询消息,所述第一问询消息用于提示所述控制设备对所述嵌入式设备中的所述当前引导程序进行升级。
  25. 根据权利要求24所述的控制设备,其中,所述第二发送模块还设置成在向所述嵌入式设备发送升级指示消息之前,向所述嵌入式设备发送备份指示消息,所述备份指示消息用于指示所述嵌入式设备向所述控制设备发送备份文件;
    所述第二接收模块还设置成通过所述串口接收所述嵌入式设备发送的备 份文件,所述备份文件包括所述嵌入式设备的存储器中的所述当前引导程序的文件长度、校验字段和文件数据;
    所述控制设备还包括:
    第二存储模块,设置成将所述第二接收模块接收到的备份文件写入所述控制设备的内存中;
    校验模块,设置成对所述第二存储模块写入所述控制设备的内存中的备份文件进行校验;
    所述第二存储模块还设置成在所述校验模块对所述备份文件校验成功后,将所述备份文件保存到所述用户在所述控制设备中预先设置的存储位置中;
    所述第二发送模块还设置成在所述校验模块对所述备份文件校验失败后,向所述嵌入式设备发送备份失败消息。
  26. 根据权利要求25所述的控制设备,其中,所述启动模块还设置成在所述第二发送模块向所述嵌入式设备发送备份指示消息之前,启动所述控制设备的控制程序,并在所述控制设备的控制程序上选择备份模式;
    所述第二接收模块还设置成通过所述控制程序接收所述嵌入式设备发送的第二问询消息,所述第二问询消息用于提示所述控制设备对所述嵌入式设备中的所述当前引导程序进行备份。
  27. 根据权利要求25或26所述的控制设备,其中,所述第二接收模块还设置成在所述第二发送模块通过所述串口向所述嵌入式设备发送所述计算出的升级文件之后,通过所述控制程序接收所述嵌入式设备发送的第三问询消息,所述第三询问消息用于指示所述嵌入式设备对所述当前引导程序升级失败;
    所述第二发送模块还设置成向所述嵌入式设备发送恢复指示消息,所述恢复指示消息用于指示所述嵌入式设备监听所述串口;
    所述第二计算模块还设置成根据所述用户选择的文件路径计算恢复文件的文件长度、校验字段和文件数据;
    所述第二发送模块还设置成通过所述串口向所述嵌入式设备发送所述第 二计算模块计算出的恢复文件,使得所述嵌入式设备将所述恢复文件写入所述嵌入式设备的存储器中,以还原在写入所述升级文件前所述嵌入式设备的存储器中的引导程序。
  28. 根据权利要求27所述的控制设备,其中,所述恢复文件为在所述控制设备中存储的所述备份文件中选择出的一个备份文件。
  29. 一种嵌入式系统,包括:如权利要求15~22中任一项所述的嵌入式设备和如权利要求23~28中任一项所述的控制设备。
PCT/CN2016/079917 2015-06-17 2016-04-21 引导程序升级方法、嵌入式设备、控制设备及嵌入式系统 WO2016202088A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510339079.5 2015-06-17
CN201510339079.5A CN106257417B (zh) 2015-06-17 2015-06-17 引导程序升级方法、嵌入式设备、控制设备及嵌入式系统

Publications (1)

Publication Number Publication Date
WO2016202088A1 true WO2016202088A1 (zh) 2016-12-22

Family

ID=57544970

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/079917 WO2016202088A1 (zh) 2015-06-17 2016-04-21 引导程序升级方法、嵌入式设备、控制设备及嵌入式系统

Country Status (2)

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

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107885523A (zh) * 2017-11-10 2018-04-06 航宇救生装备有限公司 一种快速稳定的串口升级软件方法
CN110286933A (zh) * 2019-06-28 2019-09-27 北京音磅其声科技有限公司 一种跨系统串口升级方法
CN110413310A (zh) * 2018-04-28 2019-11-05 深圳市优必选科技有限公司 程序升级方法及终端设备
CN110825414A (zh) * 2019-11-06 2020-02-21 许继集团有限公司 一种程序升级装置、嵌入式装置及其程序升级方法
CN112445508A (zh) * 2020-10-17 2021-03-05 中国航空工业集团公司洛阳电光设备研究所 一种基于can总线的arm应用程序在线升级的方法
CN112527371A (zh) * 2020-12-17 2021-03-19 杭州海康威视数字技术股份有限公司 一种引导加载程序升级方法、装置、电子设备及存储介质
CN112612498A (zh) * 2020-12-30 2021-04-06 深圳市九洲电器有限公司 一种嵌入式设备升级方法和嵌入式设备
CN112783692A (zh) * 2021-01-12 2021-05-11 重庆海云捷迅科技有限公司 一种SoC数据恢复系统及方法
CN113064621A (zh) * 2021-04-14 2021-07-02 艾体威尔电子技术(北京)有限公司 一种智能设备安卓系统对密码键盘系统固件升级的方法
CN113157287A (zh) * 2021-04-30 2021-07-23 深圳市格灵精睿视觉有限公司 文件烧录方法、装置及计算机可读存储介质
CN115981698A (zh) * 2023-03-21 2023-04-18 苏州浪潮智能科技有限公司 一种固件升级的方法及装置
CN117573156A (zh) * 2023-10-19 2024-02-20 京源中科科技股份有限公司 支持红外功能的超声波水表升级方法、系统及装置
CN112527371B (zh) * 2020-12-17 2024-06-04 杭州海康威视数字技术股份有限公司 一种引导加载程序升级方法、装置、电子设备及存储介质

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107613286A (zh) * 2017-08-30 2018-01-19 深圳市芯智科技有限公司 一种用于避免重复测试机顶盒的文件监测方法
CN107608721A (zh) * 2017-09-13 2018-01-19 北京小鸟看看科技有限公司 头戴虚拟现实设备及其引导加载程序的升级方法
CN108572830A (zh) * 2017-12-22 2018-09-25 深圳市鼎阳科技有限公司 一种嵌入式系统及其引导程序的升级方法、系统
CN108614717A (zh) * 2018-04-11 2018-10-02 厦门亿联网络技术股份有限公司 一种基于usb的系统引导方法
CN109254727A (zh) * 2018-08-20 2019-01-22 广东九联科技股份有限公司 一种嵌入式设备的自我修复方法
CN109213510A (zh) * 2018-09-21 2019-01-15 深圳市鼎阳科技有限公司 一种用于嵌入式设备的应用程序升级方法及存储介质
CN109189461B (zh) * 2018-11-27 2022-01-18 上海辛格林纳新时达电机有限公司 电梯控制系统的程序升级方法和电梯控制系统及电梯设备
CN109857433B (zh) * 2019-01-15 2022-08-19 四川虹美智能科技有限公司 一种单片机软件升级工具和方法
CN111258604A (zh) * 2020-01-14 2020-06-09 深圳市有为信息技术发展有限公司 Bootloader升级系统和方法
CN112748959A (zh) * 2020-12-29 2021-05-04 杭州迪普科技股份有限公司 嵌入式系统启动方法、闪存烧录方法与系统更新方法
CN112882731A (zh) * 2021-01-08 2021-06-01 北京锦鸿希电信息技术股份有限公司 嵌入式软件升级方法和装置
CN113467842B (zh) * 2021-06-25 2023-09-19 厦门码灵半导体技术有限公司 适用于工业级应用场景的嵌入式设备的启动方法、嵌入式设备和计算机可读存储介质
CN113608758A (zh) * 2021-07-15 2021-11-05 东莞新能安科技有限公司 软件升级方法、装置、电池管理系统、电池及用电装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101256527A (zh) * 2008-03-12 2008-09-03 中兴通讯股份有限公司 一种引导程序的备份方法及其备份装置
CN101923500A (zh) * 2010-07-14 2010-12-22 康佳集团股份有限公司 一种嵌入式设备中引导程序备份及更新的方法及装置
CN102184109A (zh) * 2011-04-12 2011-09-14 杭州华三通信技术有限公司 一种Boot软件自动升级控制方法和装置
CN104090796A (zh) * 2014-07-08 2014-10-08 成都万维图新信息技术有限公司 一种嵌入式设备程序更新方法和系统

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100549959C (zh) * 2007-10-26 2009-10-14 中兴通讯股份有限公司 引导程序在线升级方法
EP2453352A1 (en) * 2010-11-08 2012-05-16 Gemalto SA Software updating process for an embedded device
CN102486733B (zh) * 2010-12-03 2015-10-21 中兴通讯股份有限公司 引导程序的升级方法和装置
WO2011144104A2 (zh) * 2011-05-27 2011-11-24 华为技术有限公司 软件升级方法、装置和光模块

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101256527A (zh) * 2008-03-12 2008-09-03 中兴通讯股份有限公司 一种引导程序的备份方法及其备份装置
CN101923500A (zh) * 2010-07-14 2010-12-22 康佳集团股份有限公司 一种嵌入式设备中引导程序备份及更新的方法及装置
CN102184109A (zh) * 2011-04-12 2011-09-14 杭州华三通信技术有限公司 一种Boot软件自动升级控制方法和装置
CN104090796A (zh) * 2014-07-08 2014-10-08 成都万维图新信息技术有限公司 一种嵌入式设备程序更新方法和系统

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107885523A (zh) * 2017-11-10 2018-04-06 航宇救生装备有限公司 一种快速稳定的串口升级软件方法
CN110413310A (zh) * 2018-04-28 2019-11-05 深圳市优必选科技有限公司 程序升级方法及终端设备
CN110286933A (zh) * 2019-06-28 2019-09-27 北京音磅其声科技有限公司 一种跨系统串口升级方法
CN110825414A (zh) * 2019-11-06 2020-02-21 许继集团有限公司 一种程序升级装置、嵌入式装置及其程序升级方法
CN110825414B (zh) * 2019-11-06 2024-03-01 许继集团有限公司 一种程序升级装置、嵌入式装置及其程序升级方法
CN112445508B (zh) * 2020-10-17 2022-10-04 中国航空工业集团公司洛阳电光设备研究所 一种基于can总线的arm应用程序在线升级的方法
CN112445508A (zh) * 2020-10-17 2021-03-05 中国航空工业集团公司洛阳电光设备研究所 一种基于can总线的arm应用程序在线升级的方法
CN112527371A (zh) * 2020-12-17 2021-03-19 杭州海康威视数字技术股份有限公司 一种引导加载程序升级方法、装置、电子设备及存储介质
CN112527371B (zh) * 2020-12-17 2024-06-04 杭州海康威视数字技术股份有限公司 一种引导加载程序升级方法、装置、电子设备及存储介质
CN112612498A (zh) * 2020-12-30 2021-04-06 深圳市九洲电器有限公司 一种嵌入式设备升级方法和嵌入式设备
CN112783692A (zh) * 2021-01-12 2021-05-11 重庆海云捷迅科技有限公司 一种SoC数据恢复系统及方法
CN113064621A (zh) * 2021-04-14 2021-07-02 艾体威尔电子技术(北京)有限公司 一种智能设备安卓系统对密码键盘系统固件升级的方法
CN113157287A (zh) * 2021-04-30 2021-07-23 深圳市格灵精睿视觉有限公司 文件烧录方法、装置及计算机可读存储介质
CN115981698A (zh) * 2023-03-21 2023-04-18 苏州浪潮智能科技有限公司 一种固件升级的方法及装置
CN117573156A (zh) * 2023-10-19 2024-02-20 京源中科科技股份有限公司 支持红外功能的超声波水表升级方法、系统及装置

Also Published As

Publication number Publication date
CN106257417A (zh) 2016-12-28
CN106257417B (zh) 2021-07-20

Similar Documents

Publication Publication Date Title
WO2016202088A1 (zh) 引导程序升级方法、嵌入式设备、控制设备及嵌入式系统
KR100506203B1 (ko) 부팅 및 부트 코드 업데이트 방법 및 시스템
US10514930B2 (en) Setting a startup parameter and controlling startup of a mainboard
TWI633487B (zh) 自動回復基本輸入輸出系統映像檔的方法及電腦系統
CN104102518B (zh) 一种双cpu系统及其程序升级方法
WO2017219861A1 (zh) 系统启动模式的控制方法及装置
WO2020062887A1 (zh) 基于闪存微控制器的固件升级方法和系统及闪存微控制器
JP2002244874A (ja) 情報処理装置およびファームウェア更新方法
EP2513781A1 (en) Methods and devices for updating firmware of a component using a firmware update application
WO2020114431A1 (zh) 基于PCIe接口的FPGA升级方法
CN111240753A (zh) 引导程序的加载方法、存储介质及嵌入式终端
CN115113905A (zh) 固件升级方法和固件升级装置
WO2018049798A1 (zh) 一种缓存分区重构的方法和装置
WO2015098811A1 (ja) 電子機器
CN114090107A (zh) 计算机和系统启动方法
CN110908733B (zh) 工作模式确定方法及装置、控制方法及装置
CN116755749A (zh) 板载mcu的升级方法、板载mcu、板卡及信息处理系统
JP6192089B2 (ja) 情報処理装置、情報処理装置の制御方法及び制御プログラム
US20230133270A1 (en) Bios updates
WO2012077604A1 (ja) 処理装置、プログラム更新方法、およびプログラム
CN211427090U (zh) 微控制单元设备
CN113721959A (zh) 一种信息处理方法、装置及电子设备
TW591524B (en) Updating method of keyboard controller in notebook computer
CN111078452A (zh) 一种bmc固件镜像恢复方法与装置
TW201604781A (zh) 寫入基本輸入輸出系統程式碼的電路與寫入方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16810829

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16810829

Country of ref document: EP

Kind code of ref document: A1