CN106257417A - Bootstrap upgrade method, embedded device, control equipment and embedded system - Google Patents

Bootstrap upgrade method, embedded device, control equipment and embedded system Download PDF

Info

Publication number
CN106257417A
CN106257417A CN201510339079.5A CN201510339079A CN106257417A CN 106257417 A CN106257417 A CN 106257417A CN 201510339079 A CN201510339079 A CN 201510339079A CN 106257417 A CN106257417 A CN 106257417A
Authority
CN
China
Prior art keywords
file
embedded device
control equipment
backup
bootstrap
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510339079.5A
Other languages
Chinese (zh)
Other versions
CN106257417B (en
Inventor
解义超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN201510339079.5A priority Critical patent/CN106257417B/en
Priority to PCT/CN2016/079917 priority patent/WO2016202088A1/en
Publication of CN106257417A publication Critical patent/CN106257417A/en
Application granted granted Critical
Publication of CN106257417B publication Critical patent/CN106257417B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

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

Landscapes

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

Abstract

The invention discloses a kind of bootstrap upgrade method, embedded device, control equipment and embedded system.Bootstrap upgrade method in the present invention includes: the upgrading instruction message that receiving control apparatus sends, this upgrading instruction message is for indicating embedded device to monitor the serial ports between embedded device and control equipment;The upgrade file sent by serial ports receiving control apparatus, this upgrade file is that control equipment calculates according to the file path that user selects, and this upgrade file includes file size, check field and file data;Upgrade file is write in the memorizer of embedded device, to replace the current bootstrap in memorizer.During the present invention solves employing bootstrap upgraded by cd-rom recorder, owing to needing the shell dismantling embedded device to realize upgrading, and cause the mode of operation of updated boot programs more complicated, the problem that workload is big.

Description

Bootstrap upgrade method, embedded device, control equipment and embedded system
Technical field
The present invention relates to computer technology, espespecially a kind of bootstrap (BOOT) upgrade method, embedding Formula equipment, control equipment and embedded system.
Background technology
Along with embedded system, (Embedded system, is referred to as: ES) at communication and Industry Control neck The extensive application in territory, in order to improve the life cycle of product and adapt to new business demand, it usually needs Embedded system is carried out field upgrade, and the important updated contents of one of which includes in embedded device The upgrading of bootstrap.
The bootstrap of embedded device is generally deposited in nonvolatile memory, such as NOR In the devices such as FLASH and NAND FLASH, the major function of bootstrap includes initializing centre Reason device (Central Processing Unit, referred to as: CPU) and video data random access memory (Display DDRAM) Data Random Access Memory, referred to as: the device such as, then guides operation system System (Operating System, referred to as: OS) or application program launching.Bootstrap is embedded setting For the first paragraph program of the operation after powering on, if this bootstrap is upgraded unsuccessfully, embedded device can be caused Cannot start, such as, realize, in the order using bootstrap self, the process that self renewal carries out upgrading In, if upgrading unsuccessfully, then embedded device can be caused to start.Based on the problems referred to above, in order to protect Safety and reliability in card bootstrap escalation process, the upgrading of current normally used bootstrap Mode can use cd-rom recorder, especially by cd-rom recorder, the bootstrap of version to be upgraded is burnt to embedding Enter in the memorizer of formula equipment, simultaneously need to by additional burn recording software.
But, during using cd-rom recorder that bootstrap is upgraded, due in embedded device The interface being connected with cd-rom recorder is generally disposed at the inside of this embedded device, it is therefore desirable to dismantle this embedding The shell of formula equipment is to realize upgrading, and causes the mode of operation of updated boot programs more complicated, work Measure big problem.
Summary of the invention
In order to solve above-mentioned technical problem, the invention provides a kind of bootstrap upgrade method, embedded Equipment, control equipment and embedded system, to solve the mistake using cd-rom recorder to upgrade bootstrap Cheng Zhong, owing to needing the shell dismantling embedded device to realize upgrading, and causes updated boot programs Mode of operation is more complicated, the problem that workload is big.
First aspect, the present invention provides a kind of bootstrap upgrade method, including:
The upgrading instruction message that receiving control apparatus sends, described upgrading instruction message is used for indicating embedded Equipment monitors the serial ports between described embedded device and described control equipment;
Receiving, by described serial ports, the upgrade file that described control equipment sends, described upgrade file is described The file path that control equipment selects according to user calculates, described upgrade file include file size, Check field and file data;
Described upgrade file is write in the memorizer of described embedded device, to replace in described memorizer Current bootstrap.
In the first possible implementation of first aspect, described by the described control of reception of described serial ports After the upgrade file that control equipment sends, also include:
The upgrade file received by described serial ports is write in the internal memory of described embedded device, and right Described upgrade file verifies;
After described upgrade file is verified successfully, described upgrade file is write described embedded device In memorizer;
After described upgrade file is verified unsuccessfully, load and start described current bootstrap.
According to the first possible implementation of first aspect, in the implementation that the second is possible, Described upgrading instruction message be described control equipment control program in described control equipment be upgrade mode Lower transmission, before the upgrading instruction message that described receiving control apparatus sends, also include:
Perform the Bootloader in described memorizer by processor CPU, and drawn by described startup Helical pitch sequence sends the first inquiry message to described control equipment;
When receiving described upgrading instruction message within the preset time, open according to described upgrading instruction message Begin to monitor described serial ports;
When be not received by within the preset time described upgrading instruction message, load and start described currently Bootstrap.
The implementation that the second according to first aspect is possible, in the implementation that the third is possible, Before the upgrading instruction message that described receiving control apparatus sends, also include:
Receiving the backup instruction message that described control equipment sends, described backup instruction message is used for indicating institute State control equipment and begin listening for described serial ports;
Read the described current bootstrap in described memorizer according to described backup instruction message, and calculate File size, check field and the file data of described current bootstrap;
Backup file is sent to described control equipment, so that the described backup that described control equipment will receive File writes in the internal memory of described control equipment, and verifies described backup file, is verifying successfully After, described backup file is saved in the storage position that described user pre-sets in described control equipment In, wherein, described backup file includes the result of calculation to described current bootstrap.
According to the third possible implementation of first aspect, in the 4th kind of possible implementation, Described backup instruction message is described control equipment in described control program is to send under backup mode, institute State before receiving the backup instruction message that described control equipment sends, also include:
Performed the described Bootloader in described memorizer by CPU, and guided by described startup Program sends the second inquiry message to described control equipment;
When receiving described backup instruction message within the preset time, refer to according to described backup instruction message Show that described control equipment begins listening for described serial ports;
When be not received by within the preset time described backup instruction message, load and start described currently Bootstrap.
According to the third possible implementation of first aspect, in the 5th kind of possible implementation, Described after described control equipment sends backup file, also include:
Receiving the backup failure message that described control equipment sends, described backup failure message is used for indicating institute State control equipment to described backup file verification failure.
According to the third of first aspect to any one in the 5th kind of possible implementation, the 6th Plant in possible implementation, in the mistake of the memorizer that described upgrade file is write described embedded device Staging error occurs in journey, and described method also includes:
Restart described embedded device, and again perform described Bootloader by described CPU After, send described 3rd inquiry message by described Bootloader to described control equipment;
Receiving the recovery instruction message that described control equipment sends, described recovery instruction message is used for indicating institute State embedded device and monitor described serial ports;
Receiving, by described serial ports, the recovery file that described control equipment sends, described recovery file is described The file path that control equipment selects according to described user calculates, and described recovery file includes that file is long Degree, check field and file data;
Described recovery file is write in the memorizer of described embedded device, writing described liter with reduction Bootstrap in the memorizer of described embedded device before level file.
The 6th kind of possible implementation according to first aspect, in the 7th kind of possible implementation, Described recovery file is one of them selected in the described backup file of storage in described control equipment Backup file.
Second aspect, the present invention provides a kind of bootstrap upgrade method, including:
Sending upgrading instruction message to embedded device, described upgrading instruction message is used for indicating described embedding Formula equipment monitors the serial ports between described embedded device and described control equipment;
The file size of upgrade file, check field and number of files is calculated according to the file path that user selects According to;
By described serial ports to the upgrade file calculated described in the transmission of described embedded device so that described Described upgrade file is write in the memorizer of described embedded device by embedded device, deposits described in replacing Current bootstrap in reservoir.
In the first possible implementation of second aspect, described to embedded device send upgrading refer to Before showing message, also include:
Start the control program of described control equipment, and in described control program, select upgrade mode;
The the first inquiry message sent by the described control program described embedded device of reception, described first Inquiry message is for pointing out described control equipment to enter the described current bootstrap in described embedded device Row upgrading.
According to the first possible implementation of second aspect, in the implementation that the second is possible, Described before embedded device sends upgrading instruction message, also include:
Sending backup instruction message to described embedded device, described backup instruction message is used for indicating described Embedded device sends backup file to described terminal;
Receiving, by described serial ports, the backup file that described embedded device sends, described backup file includes The file size of described current bootstrap, check field and literary composition in the memorizer of described embedded device Number of packages evidence;
The described backup file received is write in the internal memory of described control equipment, and to described backup literary composition Part verifies;
After to described backup file verification success, described backup file is saved in described user described In the storage position pre-set in control equipment;
After to described backup file verification failure, send backup failure message to described embedded device.
The implementation that the second according to second aspect is possible, in the implementation that the third is possible, Described before described embedded device sends backup instruction message, also include:
Start the control program of described control equipment, and in described control program, select backup mode;
The the second inquiry message sent by the described control program described embedded device of reception, described second Inquiry message is for pointing out described control equipment to enter the described current bootstrap in described embedded device Row backup.
The second according to second aspect or the third possible implementation, the 4th kind of possible realization In mode, described by described serial ports to described embedded device send described in the upgrade file that calculates it After, also include:
The 3rd inquiry message sent by the described control program described embedded device of reception, the described 3rd Inquiry message is used for indicating described embedded device to upgrade described current bootstrap unsuccessfully;
Sending to described embedded device and recover instruction message, described recovery instruction message is used for indicating described Embedded device monitors described serial ports;
The file path selected according to described user calculates and recovers the file size of file, check field and literary composition Number of packages evidence;
Described recovery file is sent to described embedded device so that described embedded set by described serial ports In the standby memorizer that described recovery file is write described embedded device, writing described upgrading with reduction Bootstrap in the memorizer of described embedded device before file.
The 4th kind of possible implementation according to second aspect, in the 5th kind of possible implementation, Described recovery file is one of them selected in the described backup file of storage in described control equipment Backup file.
The third aspect, the present invention provides a kind of embedded device, including:
Receiver module, the upgrading instruction message sent for receiving control apparatus, described upgrading instruction message For indicating described receiver module to monitor the serial ports between described embedded device and described control equipment;
Described receiver module, is additionally operable to receive, by described serial ports, the upgrade file that described control equipment sends, Described upgrade file is that described control equipment calculates according to the file path that user selects, described upgrading File includes file size, check field and file data;
Memory module, writes described embedded device for the upgrade file received by described receiver module Memorizer in, to replace the current bootstrap in described memorizer.
In the first possible implementation of the third aspect, described memory module includes: memory element, After receiving, at described receiver module, the described upgrade file that described control equipment sends, by described Upgrade file writes in the internal memory of described embedded device;
Verification unit, the upgrading literary composition in the internal memory that described memory element is write described embedded device Part verifies;
Described memory element, is additionally operable to after described upgrade file is verified successfully by described verification unit, will Described upgrade file writes in the memorizer of described embedded device;
Described verification unit, is additionally operable to after verifying described upgrade file unsuccessfully, loads and starts described Current bootstrap.
According to the first possible implementation of the third aspect, in the implementation that the second is possible, Described upgrading instruction message be described control equipment control program in described control equipment be upgrade mode Lower transmission, described embedded device also includes: processing module, for receiving control at described receiver module Before the upgrading instruction message that control equipment sends, perform the startup in described memorizer by processor CPU Bootstrap;
Sending module, disappears for sending the first inquiry by described Bootloader to described control equipment Breath;
Described processing module, is additionally operable to when described receiver module receives described upgrading within the preset time Instruction message, begins listening for described serial ports according to the upgrading instruction message that described receiver module receives;
Described processing module, is additionally operable to when described receiver module is not received by described within the preset time Upgrading instruction message, loads and starts described current bootstrap.
The implementation that the second according to the third aspect is possible, in the implementation that the third is possible, Described receiver module, is additionally operable to, before receiving the upgrading instruction message that described control equipment sends, receive The backup instruction message that described control equipment sends, described backup instruction message is used for indicating described control to set For beginning listening for described serial ports;
Described embedded device also includes: computing module, for the backup received according to described receiver module Instruction message reads the described current bootstrap in described memorizer, and calculates described current bootstrap File size, check field and file data;
Described sending module, is additionally operable to send backup file, so that described control sets to described control equipment In the standby internal memory that the described backup file received is write described control equipment, and to described backup file Verify, after verifying successfully, described backup file is saved in described user at described control equipment In in the storage position that pre-sets, wherein, described backup file includes described current bootstrap Result of calculation.
According to the third possible implementation of the third aspect, in the 4th kind of possible implementation, Described backup instruction message is described control equipment in described control program is to send under backup mode, institute State processing module, be additionally operable to receive, at described receiver module, the backup instruction message that described control equipment sends Before, the described Bootloader in described memorizer is performed by CPU;
Described sending module, is additionally operable to send second by described Bootloader to described control equipment Inquiry message;
Described processing module, is additionally operable to when described receiver module receives described backup within the preset time Instruction message, indicates described control equipment to start prison according to the backup instruction message that described receiver module receives Listen described serial ports;
Described processing module, is additionally operable to when described receiver module is not received by described within the preset time Backup instruction message, loads and starts described current bootstrap.
According to the third possible implementation of the third aspect, in the 5th kind of possible implementation, Described receiver module, is additionally operable at described sending module after described control equipment sends backup file, Receiving the backup failure message that described control equipment sends, described backup failure message is used for indicating described control Control equipment is to described backup file verification failure.
According to the third of the third aspect to any one in the 5th kind of possible implementation, the 6th Plant in possible implementation, described processing module, it is additionally operable to described upgrading literary composition in described memory module When there is staging error during the memorizer of the part described embedded device of write, restart described embedding Enter formula equipment, and again perform described Bootloader by described CPU;
Described sending module, is additionally operable to send described to described control equipment by described Bootloader 3rd inquiry message;
Described receiver module, is additionally operable to receive the recovery instruction message that described control equipment sends, described extensive Instruction message is used for indicating described embedded device to monitor described serial ports again, and receives institute by described serial ports Stating the recovery file that control equipment sends, described recovery file is that described control equipment selects according to described user The file path selected calculates, and described recovery file includes file size, check field and file data;
Memory module, be additionally operable to by described recovery file write described embedded device memorizer in, with The bootstrap reduced in the memorizer of described embedded device before writing described upgrade file.
The 6th kind of possible implementation according to the third aspect, in the 7th kind of possible implementation, Described recovery file is one of them selected in the described backup file of storage in described control equipment Backup file.
Fourth aspect, the present invention provides a kind of control equipment, including:
Sending module, for sending upgrading instruction message to embedded device, described upgrading instruction message is used The serial ports between described embedded device and described control equipment is monitored in indicating described embedded device;
Computing module, calculates the file size of upgrade file, school for the file path selected according to user Test field and file data;
Described sending module, is additionally operable to send described calculating mould by described serial ports to described embedded device The upgrade file that block calculates so that described embedded device is by described embedded for the write of described upgrade file In the memorizer of equipment, to replace the current bootstrap in described memorizer.
In the first possible implementation of fourth aspect, described control equipment also includes: start mould Block, before sending, to described embedded device, instruction message of upgrading at described sending module, starts institute State the control program of control equipment, and in described control program, select upgrade mode;
Receiver module, for receiving, by described control program, the first inquiry that described embedded device sends Message, described first inquiry message is for pointing out described control equipment to described in described embedded device Current bootstrap is upgraded.
According to the first possible implementation of fourth aspect, in the implementation that the second is possible, Described sending module, is additionally operable to before sending upgrading instruction message to described embedded device, to described Embedded device sends backup instruction message, and described backup instruction message is used for indicating described embedded device Backup file is sent to described terminal;
Described receiver module, is additionally operable to receive, by described serial ports, the backup literary composition that described embedded device sends Part, described backup file includes the literary composition of the described current bootstrap in the memorizer of described embedded device Part length, check field and file data;
Described control equipment also includes: memory module, for the backup literary composition received by described receiver module Part writes in the internal memory of described control equipment;
Correction verification module, the backup file in the internal memory that described memory module is write described control equipment Verify;
Described memory module, is additionally operable to after described correction verification module is to described backup file verification success, will Described backup file is saved in the storage position that described user pre-sets in described control equipment;
Described sending module, is additionally operable to after described correction verification module is to described backup file verification failure, to Described embedded device sends backup failure message.
The implementation that the second according to fourth aspect is possible, in the implementation that the third is possible, Described startup module, is additionally operable to send backup instruction message at described sending module to described embedded device Before, start the control program of described control equipment, and select in the control program of described control equipment Backup mode;
Described receiver module, is additionally operable to receive that described embedded device sends by described control program the Two inquiry message, described second inquiry message is used for pointing out described control equipment in described embedded device Described current bootstrap back up.
The second according to fourth aspect or the third possible implementation, the 4th kind of possible realization In mode, described receiver module, it is additionally operable to pass through described serial ports to described embedded at described sending module Equipment send described in after the upgrade file that calculates, receive described embedded set by described control program The 3rd inquiry message that preparation is sent, described 3rd inquiry message is used for indicating described embedded device to described Current bootstrap is upgraded unsuccessfully;
Described sending module, is additionally operable to send to described embedded device recover instruction message, described recovery Instruction message is used for indicating described embedded device to monitor described serial ports;
Described computing module, is additionally operable to calculate the literary composition recovering file according to the file path that described user selects Part length, check field and file data;
Described sending module, is additionally operable to send described calculating mould by described serial ports to described embedded device The recovery file that block calculates so that described embedded device is by described embedded for the write of described recovery file In the memorizer of equipment, with reduction writing before described upgrade file in the memorizer of described embedded device Bootstrap.
The 4th kind of possible implementation according to fourth aspect, in the 5th kind of possible implementation, Described recovery file is one of them selected in the described backup file of storage in described control equipment Backup file.
5th aspect, the present invention provides a kind of embedded system, including: as arbitrary in the above-mentioned third aspect Embedded device described in Xiang and the control equipment according to any one of above-mentioned fourth aspect.
Bootstrap upgrade method, embedded device, control equipment and the embedded system that the present invention provides System, before the upgrading instruction message sent by reception terminal monitors embedded device and this control equipment Serial ports, and the upgrade file sent by this serial ports receiving control apparatus, this upgrade file is control equipment The file path selected according to user calculates, thus depositing this upgrade file write embedded device Reservoir, to replace the current bootstrap in memorizer, the present embodiment is by by the upgrading in control equipment File download is in the memorizer of embedded device, it is achieved carry out the bootstrap in this embedded device The target of upgrading;The bootstrap upgrade method that the present embodiment provides, solves employing cd-rom recorder to guiding During program is upgraded, owing to needing the shell dismantling embedded device to realize upgrading, and lead The mode of operation causing updated boot programs is more complicated, the problem that workload is big.
Accompanying drawing explanation
Accompanying drawing is used for providing being further appreciated by technical solution of the present invention, and constitutes one of description Point, it is used for explaining technical scheme together with embodiments herein, is not intended that the present invention The restriction of technical scheme.
The flow chart of a kind of bootstrap upgrade method that Fig. 1 provides for the embodiment of the present invention;
Fig. 2 is by performing a kind of application scenarios of the bootstrap upgrade method that Fig. 1 is provided;
The flow chart of the another kind of bootstrap upgrade method that Fig. 3 provides for the embodiment of the present invention;
The flow chart of another bootstrap upgrade method that Fig. 4 provides for the embodiment of the present invention;
The flow chart of another bootstrap upgrade method that Fig. 5 provides for the embodiment of the present invention;
The flow chart of a kind of bootstrap upgrade method that Fig. 6 provides for the embodiment of the present invention;
The mutual flow process performed of a kind of bootstrap upgrade method that Fig. 7 provides for the embodiment of the present invention Figure;
The structural representation of a kind of embedded device that Fig. 8 provides for the embodiment of the present invention;
The structural representation of the another kind of embedded device that Fig. 9 provides for the embodiment of the present invention;
A kind of structural representation controlling equipment that Figure 10 provides for the embodiment of the present invention;
The structural representation of the another kind of control equipment that Figure 11 provides for the embodiment of the present invention.
Detailed description of the invention
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing Embodiments of the invention are described in detail.It should be noted that in the case of not conflicting, this Shen Embodiment in please and the feature in embodiment can mutual combination in any.
Can be at the computer of such as one group of computer executable instructions in the step shown in the flow chart of accompanying drawing System performs.And, although show logical order in flow charts, but in some cases, Can be to be different from the step shown or described by order execution herein.
The flow chart of a kind of bootstrap upgrade method that Fig. 1 provides for the embodiment of the present invention.The present embodiment The bootstrap upgrade method provided is be applicable to the situation upgrading the bootstrap embedded system In, the method can be performed by embedded device, and this embedded device is generally with the method for hardware and software Realizing, this embedded device is by handing over the interacting message controlling equipment in embedded system and data Realize the upgrading of bootstrap mutually.As it is shown in figure 1, the method for the present embodiment may include that
S110, the upgrading instruction message that receiving control apparatus sends, this upgrading instruction message is used for indicating embedding Enter formula equipment and monitor the serial ports between this embedded device and control equipment.
As in figure 2 it is shown, a kind of application scenarios of the bootstrap upgrade method provided by execution Fig. 1. The method that the present embodiment provides specifically is performed by embedded device 100 and control equipment 200, embedded sets Standby 100 can be such as the industrial equipments such as switch, TV set-top box, controls equipment 200 the most permissible It is that (Personal Computer is referred to as: PC), can pass through serial ports cable a personal computer 300 connect embedded device 100 and the serial ports controlled between equipment 200;Wherein, embedded device 100 Including CPU110 and the memorizer 120 being connected by bus, in memorizer 120, storage has current Bootstrap 121 and Bootloader 122, have control program 210 in control equipment 200.At this In embodiment, after embedded device powers on, namely also included before S110: S100, pass through CPU Perform the Bootloader in memorizer, and send first by this Bootloader to controlling equipment Inquiry message;This first inquiry message can be inquiry handshake, for example, a 0x5a5a5a5a, After it sends this first inquiry message, wait the answer signal that equipment to be controlled returns, the finger to be upgraded such as i.e. Showing message, for example, 0x9a9a9a9a, this embedded device is before receiving upgrading instruction message, not It it is clearly the updating operation needing to guide program.Now, control equipment is set in its control program Receiving this first inquiry message under upgrade mode, therefore, this control equipment can initiate to set embedded The upgrading flow process of standby bootstrap, thus determine whether to send upgrading instruction message by the selection of user; Specifically, when receiving upgrading instruction message within the preset time, embedded device is then according to this upgrading Instruction message begins listening for serial ports, i.e. starts to perform the updating operation of bootstrap;In another case, When being not received by upgrading instruction message within the preset time, embedded device loads and starts above-mentioned working as Front bootstrap, now, embedded device enters normal start-up procedure, i.e. illustrates not set embedded Standby current bootstrap is upgraded, and such as embedded device can be pre-after sending the first inquiry message Stay the waiting time of 3 seconds (s), to determine the flow process being to enter updated boot programs, or enter normal The flow process of work.
It should be noted that the present embodiment can divide in the memorizer 120 of embedded device 100 First bootstrap region 121a and the second bootstrap region 122a, wherein, current bootstrap 121 It is specially bootstrap to be upgraded, namely guides OS or the main program of application program launching, its Being arranged in the first bootstrap region 121a, Bootloader 122 powers on for embedded device 100 After, CPU110 starts the program performed, such as, can be by the program of pretreatment, and it is arranged at the In two bootstrap region 122a;By the bootstrap of difference in functionality being arranged at the not same district of memorizer In territory, specify the particular location of bootstrap to be upgraded, to improve the reliability of updated boot programs.
S120, the upgrade file sent by serial ports receiving control apparatus, this upgrade file is control equipment Calculate according to the file path that user selects, this upgrade file include file size, check field and File data.
In the present embodiment, control equipment is after sending upgrading instruction message, preassigned by user File path starts to calculate the file size of upgrade file, check field and file data, file size and, Check field is usually 4 bytes (byte), such as user can be in the control opening control equipment After program, select upgrade mode, and specify the path of guiding file to be upgraded.Calculating and getting liter After the content of level file, it is upgrading flow process to ensure that embedded device has parsed current, and enters Enter listening state, start after generally can waiting the regular hour to send the above-mentioned upgrade file calculated, Thus ensure that embedded device can receive this upgrade file by serial ports.
S130, writes in the memorizer of embedded device by upgrade file, to replace working as in this memorizer Front bootstrap.
In the present embodiment, embedded device is written in memorizer by the upgrade file received, Realizing the upgrading of bootstrap, this upgrade file is actually the bootstrap of higher-version, by this The bootstrap of higher-version replaces the bootstrap in currently embedded formula equipment, to complete bootstrap Upgrading flow process.
It should be noted that number of patent application is " CN201210436671.3 ", invention entitled " one Kind of high-efficiency embedded type system debug method " patent a kind of also provide updated boot programs method, on There is following defect in the method that stating patent provides: on the one hand, utilizes and is preset in memorizer (Flash) Starter program passes through serial ports bootload program, and then manual input commands is to the bootstrap in Flash Being updated, the operation of which is complicated, easily makes mistakes, and can not be to the guiding in embedded device Program backs up, in the case of upgrading unsuccessfully cannot rollback, can be only applied to exploitation and test link In, it is not suitable in the scene of field upgrade bootstrap;On the other hand, the triggering that this patent proposes is drawn The mode of operation that helical pitch sequence loads from serial ports realizes especially by Trigger Function key, specifically in starter journey Whether it is triggered to decide whether to load from serial ports by detection function key when sequence starts, then passes through computer Software sends the file of bootstrap, when the method needs the strict triggering controlling embedded device and button Between, especially in the case of embedded device is distant with control main frame, it is very difficult to operation.
The bootstrap upgrade method that the present embodiment is provided, the upgrading instruction sent by receiving terminal disappears Breath monitors the serial ports before embedded device and this control equipment, and is sent out by this serial ports receiving control apparatus The upgrade file sent, this upgrade file is that control equipment calculates according to the file path that user selects, Thus by the memorizer of this upgrade file write embedded device, to replace memorizer currently guides journey Sequence, the present embodiment by the upgrade file in control equipment being downloaded in the memorizer of embedded device, Realize the target that the bootstrap in this embedded device is upgraded;The guiding journey that the present embodiment provides Sequence upgrade method, solves during using cd-rom recorder to upgrade bootstrap, owing to needs are torn open Unload the shell of embedded device and realize upgrading, and cause the mode of operation of updated boot programs more multiple Miscellaneous, that workload is big problem.
It should be noted that the embedded device in the present embodiment, only when its memorizer of initial fabrication, Need current bootstrap and Bootloader to be burnt in memorizer by cd-rom recorder, this is being deposited After reservoir is installed on embedded device, then need not realize updated boot programs by detaching equipment Purpose;During the method updated boot programs at the scene that the present embodiment provides, can be directly by controlling to set The setting of standby middle control program, is automatically obtained the updating operation of bootstrap after embedded device powers on, Need not the intervention of operator during upgrading, compared with prior art, operating process is safer, just Prompt, it is ensured that the reliability in bootstrap escalation process and safety.And in some embedded device May not reserve the interface being connected with cd-rom recorder, according to guiding journey of upgrading by the way of cd-rom recorder Sequence, then need to return factory and change the memory chip of embedded device.It addition, to controlling to set in the present embodiment The setting of standby middle control program, realizes the mode of updated boot programs, it is clear that than in above-mentioned patent more manually The mode that bootstrap in Flash is updated by input order more easily operates, and same ratio passes through Trigger Function key triggers the mode of operation that bootstrap loads from serial ports and more preferably controls, it is easy to accomplish.
Further, the flow process of the another kind of bootstrap upgrade method that Fig. 3 provides for the embodiment of the present invention Figure.On the basis of above-mentioned embodiment illustrated in fig. 1, the method that the present embodiment provides is gone back after S120 Including: S121, by the internal memory of the upgrade file write embedded device received by serial ports and right This upgrade file verifies;Correspondingly, the method also includes: S122, it is judged that the school to upgrade file Test the most successful;If success, then perform S130, if failure, then perform S123.
S123, loads and starts current bootstrap.
In the present embodiment, after upgrade file is verified successfully, continue executing with upgrading flow process, will upgrade In the memorizer of file write embedded device, after upgrade file is verified unsuccessfully, do not interfere with this yet The use of embedded device, even upgrading unsuccessfully can be by the current guiding in the first bootstrap region Program starts embedded device, and embedded device enters in normal workflow, further ensures upgrading The safety and reliability of bootstrap.
The flow chart of another bootstrap upgrade method that Fig. 4 provides for the embodiment of the present invention.This enforcement The bootstrap upgrade method that example provides backs up be applicable to the bootstrap embedded system and rises In the case of Ji, the method can be performed by embedded device, and this embedded device is generally with hardware and soft The method of part realizes, and this embedded device is by the interacting message with the control equipment in embedded system With the upgrading that data interaction realizes bootstrap.As shown in Figure 4, the method for the present embodiment may include that
S210, the backup instruction message that receiving control apparatus sends, this backup instruction message is used for indicating control Control equipment begins listening for serial ports.
The method that the present embodiment provides can be applied equally in the application scenarios shown in Fig. 2, with Fig. 1 institute As showing example class, after embedded device powers on, namely also included before S210: S200, logical Cross CPU and perform the Bootloader in memorizer, and sent out to control equipment by this Bootloader Send the second inquiry message, the content of this second inquiry message and effect and the first inquiry in above-described embodiment Message is identical, therefore does not repeats them here.Now, control equipment is set to backup mode in its control program Under receive this second inquiry message, therefore, this control equipment can initiate the guiding to embedded device The backup flow process of program, thus determine whether to send backup instruction message, this backup by the selection of user Instruction message for example, 0x95959595;Specifically, when receiving backup instruction within the preset time Message, begins listening for serial ports according to this backup instruction message instruction control equipment, i.e. starts to perform to guide journey The backup operation of sequence;In another case, when be not received by within the preset time back up instruction disappear Breath, embedded device loads and starts current bootstrap, and now, embedded device enters normal startup Program, i.e. illustrates not back up the current bootstrap of embedded device.
S220, reads the current bootstrap in memorizer according to backup instruction message, and leading is worked as in calculating The file size of helical pitch sequence, check field and file data.
S230, sends backup file, so that the backup file received is write by control equipment to controlling equipment Enter to control in the internal memory of equipment, and backup file is verified, after verifying successfully, file will be backed up Being saved in the storage position that user pre-sets in control equipment, wherein, it is right that this backup file includes The result of calculation of current bootstrap.
In this embodiment, embedded device, after resolving this backup instruction message, determines that needs start to perform Backup flow process, then by reading the first bootstrap region in memorizer, calculate current bootstrap File size, check field and file data, thus to control equipment send backup file, this backup File includes the result of calculation to current bootstrap;Similarly, control equipment is receiving this backup literary composition Equally backup file in write internal memory is verified after part, and will verification successfully backup file guarantor Being stored in the storage position that user pre-sets in control equipment, such as user can set opening control After standby control program, select backup mode, and specify the to be preserved path backing up file, this backup File such as can be saved in BOOT.bak.
Alternatively, if controlling equipment and backup file verification failure, the then method that the present embodiment provides also being wrapped Include: S240, receive the backup failure message that described control equipment sends.
The bootstrap upgrade method that the present embodiment provides, to the current bootstrap in embedded device After backing up, can continue the current bootstrap in embedded device is upgraded, concrete real In Xian, after terminating backup operation, restart embedded device and start to perform updating operation, the tool of upgrading Body mode includes:
S250, the upgrading instruction message that receiving control apparatus sends, this upgrading instruction message is used for indicating embedding Enter formula equipment and monitor serial ports.
Same as the previously described embodimentsly, it is also to include before S250: S231, restarts embedded Equipment, again performs the Bootloader in memorizer by CPU, and by this Bootloader The first inquiry message is sent to control equipment.
S260, the upgrade file sent by serial ports receiving control apparatus, this upgrade file is control equipment Calculate according to the file path that user selects, this upgrade file include file size, check field and File data.
S270, writes in the memorizer of embedded device by upgrade file, to replace working as in this memorizer Front bootstrap.
Specifically, the implementation of S250~S270 is referred to S110~S130 in embodiment illustrated in fig. 1.
Further, the method that the present embodiment provides, during performing S270, there is staging error In the case of, it is also possible to the content in the first bootstrap region in embedded device is recovered, i.e. Return to the state before upgrading, such as, can use in S230 the backup file being saved in BOOT.bak, Re-executing flow process of once upgrading, the specific implementation of the present embodiment may comprise steps of:
1), embedded device is restarted, and after again performing Bootloader by CPU, logical Cross Bootloader and send the 3rd inquiry message to controlling equipment.
2), the recovery instruction message that sends of receiving control apparatus, recover instruction message and be used for indicating embedded Equipment monitors serial ports.
3) the recovery file, by serial ports receiving control apparatus sent, recover file be control equipment according to The file path that user selects calculates, and recovers file and includes file size, check field and number of files According to.
4), by the memorizer recovering file write embedded device, with reduction before write upgrade file Bootstrap in the memorizer of embedded device.
In the present embodiment, restart embedded device needing after upgrading unsuccessfully, again held by CPU Row Bootloader, the control program sending the 3rd inquiry message time control control equipment is similarly upgrade mode, Therefore, the processing mode that embedded device receives after recovering instruction message connects in embodiment illustrated in fig. 1 The processing mode receiving upgrading instruction message is similar to, and is all that the file content using control equipment to send is replaced Existing bootstrap in memorizer;Except for the difference that, in the present embodiment, user selects in control equipment File path can be the path above by the backup file in backup flow storage to control equipment, i.e. This recovery file is one of them the backup file selected in the backup file of storage in control equipment, It can be such as the backup file being saved in BOOT.bak in above-mentioned S230.
The method that the present embodiment provides, when carrying out updating operation failure to embedded device, it is possible to use Store the backup file in control equipment, re-execute a updating operation, can be by embedded device In bootstrap return to perform before updating operation, the bootstrap having in memorizer.Therefore originally The method that embodiment provides, is carried out the current bootstrap in embedded device before performing updating operation The mode of backup, solves the problem unsuccessfully cannot return of upgrading, it is achieved thereby that bootstrap upgraded Method is applied in the scene of field upgrade, the safety in further increasing bootstrap escalation process While property, it is ensured that the method has reversibility, and adds the range of the method.
The flow chart of another bootstrap upgrade method that Fig. 5 provides for the embodiment of the present invention.This enforcement The bootstrap upgrade method that example provides is be applicable to the feelings upgrading the bootstrap embedded system In condition, the method can be performed by controlling equipment, and this control equipment generally comes with the method for hardware and software Realizing, this control equipment is by the interacting message and data interaction with the embedded device in embedded system Realize the upgrading of bootstrap.As it is shown in figure 5, the method for the present embodiment may include that
S310, sends upgrading instruction message to embedded device, and this upgrading instruction message is used for indicating embedding Formula equipment monitors the serial ports between embedded device and control equipment.
The method that the present embodiment provides can be applied equally in the application scenarios shown in Fig. 2, at S310 The most also include: S300, start the control program of control equipment, and in this control program, select upgrading Pattern;Simultaneously, after embedded device powers on, start opening described in the various embodiments described above at CPU After dynamic bootstrap, send the first interrogation signal to control equipment, correspondingly, the present embodiment also include: S301, receives, by controlling program, the first inquiry message that embedded device sends, and the first inquiry message is used In prompting control equipment, the current bootstrap in embedded device is upgraded.Control equipment is by using The selection at family determines whether to send upgrading instruction message, in the case of it sends this upgrading instruction message, Having been enter into, to embedded device instruction control equipment, flow process of upgrading by this message, instruction embedded device is opened Begin to monitor serial ports, the upgrade file sent with receiving control apparatus at any time.
S320, according to user select file path calculate the file size of upgrade file, check field and File data.
In the present embodiment, user can be after selecting upgrade mode, it is intended that the road of guiding file to be upgraded Footpath, thus embedded device calculates according to the file path that user has specified and obtains in upgrade file Holding, the content of this upgrade file is identical with the various embodiments described above.
S330, sends the upgrade file calculated so that embedded device by serial ports to embedded device Upgrade file is write in the memorizer of embedded device, to replace the current bootstrap in memorizer.
In the present embodiment, it is upgrading flow process to ensure that embedded device has parsed current, and Enter listening state, generally can perform transmission after waiting the regular hour after calculating upgrade file The operation of upgrade file, such as, can set the time delay of 3s between S320 to S330, thus protect Card embedded device can receive this upgrade file by serial ports.
The bootstrap upgrade method that the present embodiment is provided, by sending upgrading instruction to embedded device Message, to indicate embedded device to begin listening for the serial ports before embedded device and this control equipment, in This simultaneously, terminal calculates the content of upgrade file according to the file path that user selects, thus by this liter Level file is sent to embedded device by serial ports so that upgrade file is write it and deposits by this embedded device In reservoir, to replace the current bootstrap in memorizer, the present embodiment is by by the liter in control equipment Level file download is in the memorizer of embedded device, it is achieved enter the bootstrap in this embedded device The target of row upgrading;The bootstrap upgrade method that the present embodiment provides, solves employing cd-rom recorder to drawing During helical pitch sequence is upgraded, owing to needing the shell dismantling embedded device to realize upgrading, and The mode of operation causing updated boot programs is more complicated, the problem that workload is big.
It should be noted that in the method for the present embodiment offer, embedded device sends the first inquiry message After, according to whether receiving the corresponding operating that upgrading instruction message performs, Yi Ji within the preset time Receive after upgrade file is saved in internal memory, this upgrade file is verified, and according to the result The corresponding operating performed, all identical with the mode of operation in above-mentioned Fig. 1 to embodiment illustrated in fig. 4, and There is identical beneficial effect, therefore do not repeat them here.
The flow chart of a kind of bootstrap upgrade method that Fig. 6 provides for the embodiment of the present invention.With Fig. 4 Similarly, the bootstrap upgrade method that the present embodiment provides is applicable to embedded system illustrated embodiment In bootstrap back up and upgrade in the case of.As shown in Figure 6, the method for the present embodiment is permissible Including:
S410, sends backup instruction message to embedded device, and this backup instruction message is used for indicating embedding Formula equipment sends backup file to terminal.
In the present embodiment, the most also included before S410: S400, start the control of control equipment Program, and in this control program, select backup mode;S401, receives embedded setting by control program The second inquiry message that preparation is sent, the second inquiry message is for pointing out control equipment in embedded device Current bootstrap backs up.By the selection of user, control equipment determines whether that sending backup instruction disappears Breath, in the case of it sends this backup instruction message, is controlled to embedded device instruction by this message Equipment has been enter into backing up flow process, and instruction embedded device calculates the literary composition of the current bootstrap in its memorizer Part length, check field and file data, the content of this result of calculation is i.e. backup file, and to control Equipment sends this backup file.
S420, receives, by serial ports, the backup file that embedded device sends, and this backup file includes embedding The file size of current bootstrap, check field and file data in the memorizer of formula equipment.
S430, writes the backup file received in the internal memory of control equipment, and carries out backup file Verification.
S431, it is judged that the verification to backup file is the most successful;If success, then perform S440, if failure, Then perform S432.
S440, is saved in backup file in the storage position that user pre-sets in control equipment.
S432, sends backup failure message to embedded device.
In the present embodiment, the backup file received equally first is saved in internal memory by control equipment Verify, after to backup file verification success, complete to back up flow process, file will be backed up and be saved in In the storage position that user pre-sets in control equipment, such as, can be in control program, to select backup After pattern, specifying the path of backup file to be preserved in control equipment, this backup file is the most permissible It is saved in BOOT.bak;It addition, after to backup file verification failure, backup failure can be sent Message is to point out embedded device.
The bootstrap upgrade method that the present embodiment provides, to the current bootstrap in embedded device After backing up, can continue the current bootstrap in embedded device is upgraded, concrete real In Xian, after terminating backup operation, i.e. after S440, restart embedded device and start to perform liter Level operation, the concrete mode of upgrading includes:
S450, sends upgrading instruction message to embedded device, and this upgrading instruction message is used for indicating embedding Formula equipment monitors the serial ports between embedded device and control equipment.
Similarly, equally included before S450: S441, this control program selects upgrading Pattern;S442, receives the first inquiry message that embedded device sends, the first inquiry by controlling program Message is for pointing out control equipment to upgrade the current bootstrap in embedded device.
S460, according to user select file path calculate the file size of upgrade file, check field and File data.
S470, sends the upgrade file calculated so that embedded device by serial ports to embedded device Upgrade file is write in the memorizer of embedded device, to replace the current bootstrap in memorizer.
Specifically, the implementation of S441~S470 is referred to S300~S330 in embodiment illustrated in fig. 5.
Further, the method that the present embodiment provides, at embedded device, upgrade file is write memorizer In the case of there is staging error during if, it is also possible to the first bootstrap district in embedded device Content in territory is recovered, and i.e. returns to the state before upgrading, such as, can use in S440 and preserve Backup file in BOOT.bak, re-executes flow process of once upgrading, implementing of the present embodiment Mode may comprise steps of:
1), by controlling the 3rd inquiry message that program reception embedded device sends, the 3rd inquiry disappears Breath is used for indicating embedded device to upgrade current bootstrap unsuccessfully.
2), to embedded device sending and recover instruction message, this recovery instruction message is used for indicating embedded Equipment monitors serial ports.
3), the file path selected according to user calculates and recovers the file size of file, check field and literary composition Number of packages evidence.
4), recovery file is sent by serial ports to embedded device so that embedded device will recover file In the memorizer of write embedded device, with reduction memorizer of embedded device before write upgrade file In bootstrap.
In the present embodiment, need also exist for restarting embedded device, by CPU again after upgrading unsuccessfully Performing Bootloader, the control program sending the 3rd inquiry message time control control equipment is similarly upgrading mould Formula, therefore, the processing mode that embedded device receives after recovering instruction message connects in above-described embodiment The processing mode receiving upgrading instruction message is similar to, and is all that the file content using control equipment to send is replaced Existing bootstrap in memorizer;Except for the difference that, in the present embodiment, user selects in control equipment File path can be the path above by the backup file in backup flow storage to control equipment, i.e. This recovery file is one of them the backup file selected in the backup file of storage in control equipment, It can be such as the backup file being saved in BOOT.bak in above-mentioned S440.
The mutual flow process performed of a kind of bootstrap upgrade method that Fig. 7 provides for the embodiment of the present invention Figure.The bootstrap upgrade method that the present embodiment provides is entered be applicable to the bootstrap embedded system In the case of row backup and upgrading, the method can be by controlling equipment and embedded device execution.Such as Fig. 7 Shown in, the method for the present embodiment may include that
Control equipment performs, S501, start the control program of control equipment, and in this control program Upper selection upgrade mode.
S502, determines the path of upgrade file by the selection of user.
Powering on embedded device subsequently, embedded device starts to perform, S503, performs to deposit by CPU Bootloader in reservoir.
S504, sends the first inquiry message by this Bootloader to control equipment.
S505, waits the preset time, and judges whether receive upgrading within the time that this wait is preset Instruction message;If receiving, then perform S506;If being not received by, then performing S507, loading also Start current bootstrap.
Now, control equipment, after receiving the first inquiry message, determines whether to send out by the selection of user Send response, wherein, if desired enter upgrading flow process, control equipment and perform S508, set to embedded Preparation send upgrading instruction message;Correspondingly, the judgement in S505 is for receiving, and then performs S506, Begin listening for serial ports.
Control equipment, after sending upgrading instruction message, continues executing with S509, the file selected according to user The file size of path computing upgrade file, check field and file data, to obtain out upgrade file Content.
S510, sends the upgrade file having calculated that by serial ports to embedded device.
Embedded device is in listening state at this moment, is receiving, by serial ports, the liter that control equipment sends After level file, perform S511, the upgrade file received by serial ports is write the internal memory of embedded device In, and upgrade file is verified.
S512, it is judged that the verification to upgrade file is the most successful;If success, then perform S513, if failure, Then perform S514.
S513, writes in the memorizer of embedded device by upgrade file, current with replace in memorizer Bootstrap.
S514, loads and starts current bootstrap.
The method that the present embodiment provides, is equally rising the current bootstrap of embedded device Before Ji, first backing up bootstrap before deserving, specific implementation is, controls equipment and is performing S501 Can also carry out S515 before, start the control program of control equipment, and select standby in this control program Part pattern.
S516, by the storing path selecting appointment backup file of user.
Powering on embedded device subsequently, this embedded device starts to perform, and S517 is performed by CPU Bootloader in memorizer.
S518, sends the second inquiry message by this Bootloader to control equipment.
S519, waits the preset time, and judges whether receive backup within the time that this wait is preset Instruction message;If receiving, then perform S520;If being not received by, then performing S521, loading also Start current bootstrap.
Now, control equipment, after receiving the second inquiry message, determines whether to send out by the selection of user Send response, wherein, if desired enter backup flow process, control equipment and perform S522, set to embedded Preparation send backup instruction message;Correspondingly, the judgement in S519 is for receiving, and then performs S520, Read the current bootstrap in memorizer, and the front file size of bootstrap, check word are deserved in calculating Section and file data.
S523, sends backup file to described control equipment, and this backup file includes that embedded device is to working as The result of calculation of front bootstrap.
Control equipment is in listening state at this moment, is receiving the standby of embedded device transmission by serial ports After part file, perform S524, in the internal memory of the backup file write control equipment that will receive, and to standby Part file verifies.
S525, it is judged that the verification to backup file is the most successful;If success, then perform S526, if failure, Then perform S527.
S526, is saved in backup file in the storage position that user pre-sets in control equipment.
S527, sends backup failure message to embedded device.
It should be noted that the bootstrap upgrade method that the present embodiment provides is similar to the above embodimentsly, When there is the situation of staging error during embedded device performs S513, it is also possible to embedded Bootstrap in the memorizer of equipment is recovered, and i.e. returns to the state before upgrading, such as, can make With the backup file being saved in S526 in control equipment, re-execute flow process of once upgrading, the most again Performing S501~S514, during this performs, the selection of user determines that the path of upgrade file is concrete For: the path of the backup file of storage in control equipment is defined as the path of upgrade file by user, thus Upgrade file in S501~S514 is replaced with the backup file of storage in control equipment.
The structural representation of a kind of embedded device that Fig. 8 provides for the embodiment of the present invention.The present embodiment carries The embedded device of confession is in the case of upgrading to the bootstrap embedded system, and this is embedding Enter formula equipment generally to realize with the method for hardware and software, by with the control equipment in embedded system Interacting message and data interaction realize the upgrading of bootstrap.As shown in Figure 8, the embedding of the present embodiment Formula equipment specifically includes receiver module 11 and memory module 12.
Wherein, receiver module 11, the upgrading instruction message sent for receiving control apparatus, upgrading instruction Message is for indicating receiver module 11 to monitor the serial ports between embedded device and control equipment.
The embedded device provided by the present embodiment can be applied equally to figure when guiding program upgrading In application scenarios shown in 2, upgrading instruction message is that control equipment control program in control equipment is Sending under upgrade mode, specifically, the embedded device that the present embodiment provides also includes: processing module 13, before the upgrading instruction message sent at receiver module 11 receiving control apparatus, pass through CPU Perform the Bootloader in memorizer;Sending module 14, is used for by Bootloader to control Equipment sends the first inquiry message;Correspondingly, on the one hand, processing module 13, it is additionally operable to work as receiver module 11 receive upgrading instruction message within the preset time, the upgrading instruction received according to receiver module 11 Message begins listening for serial ports;On the other hand, processing module 13, it is additionally operable to when receiver module 11 is preset Time in be not received by upgrading instruction message, load and start current bootstrap.
Receiver module 11, is additionally operable to the upgrade file sent by serial ports receiving control apparatus, this upgrading literary composition Part is that control equipment calculates according to the file path that user selects, this upgrade file include file size, Check field and file data.
Memory module 12, writes embedded device for the upgrade file received by receiver module 11 In memorizer, to replace the current bootstrap in memorizer.
The embedded device that the embodiment of the present invention provides is for performing what embodiment illustrated in fig. 1 of the present invention provided Bootstrap upgrade method, possesses corresponding functional module, and it is similar with technique effect that it realizes principle, this Place repeats no more.
Further, the structural representation of the another kind of embedded device that Fig. 9 provides for the embodiment of the present invention Figure.On the basis of above-mentioned embodiment illustrated in fig. 8, the memory module 12 in the present embodiment specifically can be wrapped Include: memory element 15, after receiving, at receiver module 11, the upgrade file that control equipment sends, By in the internal memory of this upgrade file write embedded device;Verification unit 16, for memory element 15 Upgrade file in the internal memory of write embedded device verifies;Correspondingly, memory element 15, also use After upgrade file being verified successfully in verification unit 16, upgrade file is write the storage of embedded device In device;In alternatively possible implementation, verification unit 16, it is additionally operable to upgrade file is being verified After failure, load and start current bootstrap.
The embedded device that the embodiment of the present invention provides is possible not only to upgrade its bootstrap, is rising Can also the current bootstrap in its memorizer be backuped in control equipment before Ji, specific implementation For: receiver module 11, it is additionally operable to, before the upgrading instruction message that receiving control apparatus sends, receive control The backup instruction message that control equipment sends, this backup instruction message is used for indicating control equipment to begin listening for string Mouthful;Correspondingly, this embedded device also includes: computing module 17, for connecing according to receiver module 11 The backup instruction message received reads the current bootstrap in memorizer, and calculates the literary composition of current bootstrap Part length, check field and file data;Sending module 14, is additionally operable to send backup literary composition to control equipment Part, so that control equipment is by the internal memory of the backup file write control equipment received and civilian to backup Part verifies, and after verifying successfully, backup file is saved in user and pre-sets in control equipment Storage position in, wherein, this backup file includes the result of calculation to current bootstrap.
Similar to the above embodimentsly, backup instruction message be control equipment be backup mode in control program Lower transmission, then processing module 13, it is additionally operable to the backup sent at receiver module 11 receiving control apparatus Before instruction message, perform the Bootloader in memorizer by CPU;Sending module 14, also For sending the second inquiry message by Bootloader to control equipment;Correspondingly, on the one hand, place Reason module 13, is additionally operable to when receiver module 11 receives backup instruction message, root within the preset time The backup instruction message instruction control equipment received according to receiver module 11 begins listening for serial ports;On the other hand, Processing module 13, is additionally operable to disappear when receiver module 11 is not received by backing up instruction within the preset time Breath, loads and starts current bootstrap.
Alternatively, if controlling equipment to backup file verification failure, it is also possible to send to embedded device and carry Show message, then the receiver module 11 in the present embodiment, be additionally operable to send to terminal preparation at sending module 14 After backup file, receiving the backup failure message that this control equipment sends, backup failure message is used for referring to Show that described control equipment is to described backup file verification failure.
Further, the embedded device that the present embodiment provides, in memory module 12, upgrade file is write In the case of there is staging error during entering memorizer, it is also possible to in the memorizer of embedded device Bootstrap recover, i.e. return to the state before upgrading, such as, can use execution backup operation Time the backup file that is saved in control equipment, re-execute a updating operation, perform upgrading at this In operating process, the path of upgrade file is specially in control equipment the path of the backup file of storage, from And when performing updating operation, above-mentioned upgrade file is replaced with the backup file of storage in control equipment, Its specific implementation is: processing module 13, is additionally operable to be write by upgrade file embedding in memory module 12 When there is staging error during entering the memorizer of formula equipment, restart embedded device, and pass through CPU performs Bootloader again;Sending module 14, is additionally operable to by Bootloader to control Equipment sends the 3rd inquiry message;Receiver module 11, is additionally operable to the recovery instruction that receiving control apparatus sends Message, this recovery instruction message is used for indicating this embedded device to monitor serial ports, and receives control by serial ports The recovery file that control equipment sends, this recovery file is the file path meter that control equipment selects according to user Calculating, this recovery file includes file size, check field and file data;Memory module 12, also For by the memorizer recovering file write embedded device, embedding before write upgrade file with reduction Bootstrap in the memorizer of formula equipment.The mode of operation of above-mentioned recovery bootstrap guides journey with upgrading The mode of operation of sequence is similar to, and simply writes the file content in the memorizer of embedded device different, therefore This no longer illustrates.
The embedded device that the embodiment of the present invention provides is used for performing Fig. 3 of the present invention and embodiment illustrated in fig. 4 The bootstrap upgrade method provided, possesses corresponding functional module, and it realizes principle and technique effect class Seemingly, here is omitted.
A kind of structural representation controlling equipment that Figure 10 provides for the embodiment of the present invention.The present embodiment carries The control equipment of confession in the case of the bootstrap embedded system is upgraded, this control Equipment generally realizes with the method for hardware and software, by with the embedded device in embedded system Interacting message and data interaction realize the upgrading of bootstrap.As shown in Figure 10, the control of the present embodiment Equipment specifically includes sending module 21 and computing module 22.
Wherein, sending module 21, for sending upgrading instruction message to embedded device, upgrading instruction disappears Breath monitors the serial ports between embedded device and control equipment for indicating embedded device.
The control equipment provided by the present embodiment can be applied equally to Fig. 2 when guiding program upgrading In shown application scenarios, in implementing, this control equipment also includes: starts module 23, is used for At sending module 21 before embedded device sends upgrading instruction message, start the control journey of control equipment Sequence, and in this control program, select upgrade mode;Simultaneously, after embedded device powers on, at CPU After starting the Bootloader described in the various embodiments described above, send the first interrogation signal to control equipment, Correspondingly, control equipment also includes: receiver module 24, for by controlling program reception embedded device The the first inquiry message sent, this first inquiry message is for pointing out control equipment in embedded device Current bootstrap is upgraded.
Computing module 22, for according to user select file path calculate upgrade file file size, Check field and file data;
Sending module 21, is additionally operable to send what computing module 22 calculated by serial ports to embedded device Upgrade file so that upgrade file is write in the memorizer of embedded device by embedded device, to replace Current bootstrap in memorizer.
The control equipment that the embodiment of the present invention provides is for performing drawing of embodiment illustrated in fig. 5 of the present invention offer Leading programme upgrade method, possess corresponding functional module, it is similar with technique effect that it realizes principle, herein Repeat no more.
It should be noted that the control equipment that the present embodiment provides is in performing bootstrap upgrade method, After embedded device sends the first inquiry message, according to whether receiving upgrading instruction within the preset time The corresponding operating that message performs, and receiving after upgrade file is saved in internal memory, to this upgrade file Verify, and the corresponding operating performed according to the result, all with the operation in the various embodiments described above Mode is identical, and has identical beneficial effect, therefore does not repeats them here.
Further, the structural representation of the another kind of control equipment that Figure 11 provides for the embodiment of the present invention. The control equipment that the embodiment of the present invention provides is possible not only to upgrade its bootstrap, before upgrading also Can the current bootstrap in the memorizer of embedded device be backuped in this control equipment, specifically real Existing mode is: sending module 21, is additionally operable to before sending upgrading instruction message to embedded device, to Embedded device sends backup instruction message, and this backup instruction message is used for indicating embedded device to terminal Send backup file;Correspondingly, receiver module 24, it is additionally operable to receive embedded device by serial ports and sends Backup file, backup file includes that the file of the current bootstrap in the memorizer of embedded device is long Degree, check field and file data;On the basis of above-mentioned embodiment illustrated in fig. 10, the present embodiment provides Control equipment also include: memory module 25, write for backup file that receiver module 24 is received Enter to control in the internal memory of equipment;Correction verification module 26, for writing in control equipment memory module 25 Backup file in depositing verifies;Correspondingly, memory module 25, it is right to be additionally operable at correction verification module 26 After backup file verification success, backup file is saved in the storage that user pre-sets in control equipment In position;In another kind of implementation, sending module 21, it is additionally operable at correction verification module 26 backup After file verification failure, send backup failure message to embedded device.
Similar to the above embodimentsly, the control equipment that the present embodiment provides, start module 23, be additionally operable to At sending module 21 before embedded device sends backup instruction message, start the control journey of control equipment Sequence, and in the control program controlling equipment, select backup mode;Simultaneously, embedded device powers on After, after the Bootloader in CPU starts the various embodiments described above, send second to control equipment and ask Ask signal, correspondingly, receiver module 24, be additionally operable to receive what embedded device sent by control program Second inquiry message, the second inquiry message is for pointing out control equipment to the current guiding in embedded device Program backs up.
Further, when the control equipment that the present embodiment provides performs bootstrap upgrading mode, embedding Enter in the case of there is staging error during upgrade file is write its memorizer by formula equipment, it is also possible to Bootstrap in the memorizer of embedded device is recovered, i.e. returns to the state before upgrading, example Such as the backup file being saved in control equipment when can use and perform backup operation, re-execute and once rise Level operation, during this performs updating operation, deposits in the specially control equipment of the path of upgrade file The path of the backup file of storage, thus when performing updating operation, above-mentioned upgrade file is replaced with control The backup file of storage in equipment, its specific implementation is: receiver module 24, is additionally operable to sending mould Block 21, is received by controlling program by serial ports after embedded device sends the upgrade file calculated The 3rd inquiry message that embedded device sends, the 3rd inquiry message is used for indicating embedded device to working as Front bootstrap is upgraded unsuccessfully;Sending module 21, is additionally operable to send to embedded device recover instruction message, This recovery instruction message is used for indicating embedded device to monitor serial ports;Computing module 22, be additionally operable to according to The file path that family selects calculates and recovers the file size of file, check field and file data;Thus, Sending module 21 sends, to embedded device, the recovery file that computing module 22 calculates by serial ports, makes Must enter in the memorizer that recovery file is write embedded device by formula equipment, with reduction at write upgrade file Bootstrap in the memorizer of front embedded device.The mode of operation of above-mentioned recovery bootstrap and upgrading The mode of operation of bootstrap is similar to, and simply writes the file content in the memorizer of embedded device different, Therefore no longer illustrate at this.
Fig. 2 is for being similarly the structural representation of a kind of embedded system that the embodiment of the present invention provides.Such as figure Shown in 2, the embedded system that the present embodiment provides can include embedded device 100 and control equipment 200, this embedded device 100 can be that embedded shown in above-mentioned Fig. 8 and Fig. 9 any embodiment sets Standby, this control equipment 200 can be the control equipment shown in above-mentioned Figure 10 and Figure 11 any embodiment, May be used for performing Fig. 1, the bootstrap upgrade method shown in Fig. 3 to Fig. 7, its concrete side realized The beneficial effect of formula and realization is the most same as the previously described embodiments, therefore does not repeats them here.
Although the embodiment that disclosed herein is as above, but described content only readily appreciates the present invention And the embodiment used, it is not limited to the present invention.Technology people in any art of the present invention Member, on the premise of without departing from the spirit and scope that disclosed herein, can be in the form implemented and thin Any amendment and change is carried out on joint, but the scope of patent protection of the present invention, still must be with appended right Claim is defined in the range of standard.

Claims (29)

1. a bootstrap upgrade method, it is characterised in that including:
The upgrading instruction message that receiving control apparatus sends, described upgrading instruction message is used for indicating embedded Equipment monitors the serial ports between described embedded device and described control equipment;
Receiving, by described serial ports, the upgrade file that described control equipment sends, described upgrade file is described The file path that control equipment selects according to user calculates, described upgrade file include file size, Check field and file data;
Described upgrade file is write in the memorizer of described embedded device, to replace in described memorizer Current bootstrap.
Bootstrap upgrade method the most according to claim 1, it is characterised in that described in pass through institute After stating the upgrade file that serial ports receives the transmission of described control equipment, also include:
The upgrade file received by described serial ports is write in the internal memory of described embedded device, and right Described upgrade file verifies;
After described upgrade file is verified successfully, described upgrade file is write described embedded device In memorizer;
After described upgrade file is verified unsuccessfully, load and start described current bootstrap.
Bootstrap upgrade method the most according to claim 2, it is characterised in that described upgrading refers to Show message be described control equipment control program in described control equipment be under upgrade mode send, Before the upgrading instruction message that described receiving control apparatus sends, also include:
Perform the Bootloader in described memorizer by processor CPU, and drawn by described startup Helical pitch sequence sends the first inquiry message to described control equipment;
When receiving described upgrading instruction message within the preset time, open according to described upgrading instruction message Begin to monitor described serial ports;
When be not received by within the preset time described upgrading instruction message, load and start described currently Bootstrap.
Bootstrap upgrade method the most according to claim 3, it is characterised in that described reception control Before the upgrading instruction message that control equipment sends, also include:
Receiving the backup instruction message that described control equipment sends, described backup instruction message is used for indicating institute State control equipment and begin listening for described serial ports;
Read the described current bootstrap in described memorizer according to described backup instruction message, and calculate File size, check field and the file data of described current bootstrap;
Backup file is sent to described control equipment, so that the described backup that described control equipment will receive File writes in the internal memory of described control equipment, and verifies described backup file, is verifying successfully After, described backup file is saved in the storage position that described user pre-sets in described control equipment In, wherein, described backup file includes the result of calculation to described current bootstrap.
Bootstrap upgrade method the most according to claim 4, it is characterised in that described backup refers to Show that message be described control equipment in described control program is to send, described in described reception under backup mode Before the backup instruction message that control equipment sends, also include:
Performed the described Bootloader in described memorizer by CPU, and guided by described startup Program sends the second inquiry message to described control equipment;
When receiving described backup instruction message within the preset time, refer to according to described backup instruction message Show that described control equipment begins listening for described serial ports;
When be not received by within the preset time described backup instruction message, load and start described currently Bootstrap.
Bootstrap upgrade method the most according to claim 4, it is characterised in that described to described After control equipment sends backup file, also include:
Receiving the backup failure message that described control equipment sends, described backup failure message is used for indicating institute State control equipment to described backup file verification failure.
7. according to the bootstrap upgrade method according to any one of claim 4~6, it is characterised in that Staging error, institute is there is during the memorizer that described upgrade file is write described embedded device Method of stating also includes:
Restart described embedded device, and again perform described Bootloader by described CPU After, send described 3rd inquiry message by described Bootloader to described control equipment;
Receiving the recovery instruction message that described control equipment sends, described recovery instruction message is used for indicating institute State embedded device and monitor described serial ports;
Receiving, by described serial ports, the recovery file that described control equipment sends, described recovery file is described The file path that control equipment selects according to described user calculates, and described recovery file includes that file is long Degree, check field and file data;
Described recovery file is write in the memorizer of described embedded device, writing described liter with reduction Bootstrap in the memorizer of described embedded device before level file.
Bootstrap upgrade method the most according to claim 7, it is characterised in that described recovery literary composition Part is one of them the backup file selected in the described backup file of storage in described control equipment.
9. a bootstrap upgrade method, it is characterised in that including:
Sending upgrading instruction message to embedded device, described upgrading instruction message is used for indicating described embedding Formula equipment monitors the serial ports between described embedded device and described control equipment;
The file size of upgrade file, check field and number of files is calculated according to the file path that user selects According to;
By described serial ports to the upgrade file calculated described in the transmission of described embedded device so that described Described upgrade file is write in the memorizer of described embedded device by embedded device, deposits described in replacing Current bootstrap in reservoir.
Bootstrap upgrade method the most according to claim 9, it is characterised in that described to embedding Before entering formula equipment transmission upgrading instruction message, also include:
Start the control program of described control equipment, and in described control program, select upgrade mode;
The the first inquiry message sent by the described control program described embedded device of reception, described first Inquiry message is for pointing out described control equipment to enter the described current bootstrap in described embedded device Row upgrading.
11. bootstrap upgrade methods according to claim 10, it is characterised in that described to embedding Before entering formula equipment transmission upgrading instruction message, also include:
Sending backup instruction message to described embedded device, described backup instruction message is used for indicating described Embedded device sends backup file to described terminal;
Receiving, by described serial ports, the backup file that described embedded device sends, described backup file includes The file size of described current bootstrap, check field and literary composition in the memorizer of described embedded device Number of packages evidence;
The described backup file received is write in the internal memory of described control equipment, and to described backup literary composition Part verifies;
After to described backup file verification success, described backup file is saved in described user described In the storage position pre-set in control equipment;
After to described backup file verification failure, send backup failure message to described embedded device.
12. bootstrap upgrade methods according to claim 11, it is characterised in that described to institute Before stating embedded device transmission backup instruction message, also include:
Start the control program of described control equipment, and in described control program, select backup mode;
The the second inquiry message sent by the described control program described embedded device of reception, described second Inquiry message is for pointing out described control equipment to enter the described current bootstrap in described embedded device Row backup.
13. according to the bootstrap upgrade method described in claim 11 or 12, it is characterised in that institute State by described serial ports after the upgrade file calculated described in described embedded device sends, also include:
The 3rd inquiry message sent by the described control program described embedded device of reception, the described 3rd Inquiry message is used for indicating described embedded device to upgrade described current bootstrap unsuccessfully;
Sending to described embedded device and recover instruction message, described recovery instruction message is used for indicating described Embedded device monitors described serial ports;
The file path selected according to described user calculates and recovers the file size of file, check field and literary composition Number of packages evidence;
Described recovery file is sent to described embedded device so that described embedded set by described serial ports In the standby memorizer that described recovery file is write described embedded device, writing described upgrading with reduction Bootstrap in the memorizer of described embedded device before file.
14. bootstrap upgrade methods according to claim 13, it is characterised in that described recovery File is one of them the backup literary composition selected in the described backup file of storage in described control equipment Part.
15. 1 kinds of embedded devices, it is characterised in that including:
Receiver module, the upgrading instruction message sent for receiving control apparatus, described upgrading instruction message For indicating described receiver module to monitor the serial ports between described embedded device and described control equipment;
Described receiver module, is additionally operable to receive, by described serial ports, the upgrade file that described control equipment sends, Described upgrade file is that described control equipment calculates according to the file path that user selects, described upgrading File includes file size, check field and file data;
Memory module, writes described embedded device for the upgrade file received by described receiver module Memorizer in, to replace the current bootstrap in described memorizer.
16. embedded devices according to claim 15, it is characterised in that described memory module bag Include: memory element, for receiving, at described receiver module, the described upgrading literary composition that described control equipment sends After part, described upgrade file is write in the internal memory of described embedded device;
Verification unit, the upgrading literary composition in the internal memory that described memory element is write described embedded device Part verifies;
Described memory element, is additionally operable to after described upgrade file is verified successfully by described verification unit, will Described upgrade file writes in the memorizer of described embedded device;
Described verification unit, is additionally operable to after verifying described upgrade file unsuccessfully, loads and starts described Current bootstrap.
17. embedded devices according to claim 16, it is characterised in that described upgrading instruction disappears Breath is to send under upgrade mode for described control equipment control program in described control equipment, described Embedded device also includes: processing module, for the liter sent at described receiver module receiving control apparatus Before level instruction message, perform the Bootloader in described memorizer by processor CPU;
Sending module, disappears for sending the first inquiry by described Bootloader to described control equipment Breath;
Described processing module, is additionally operable to when described receiver module receives described upgrading within the preset time Instruction message, begins listening for described serial ports according to the upgrading instruction message that described receiver module receives;
Described processing module, is additionally operable to when described receiver module is not received by described within the preset time Upgrading instruction message, loads and starts described current bootstrap.
18. embedded devices according to claim 17, it is characterised in that described receiver module, It is additionally operable to, before receiving the upgrading instruction message that described control equipment sends, receive described control equipment and send out The backup instruction message sent, it is described that described backup instruction message is used for indicating described control equipment to begin listening for Serial ports;
Described embedded device also includes: computing module, for the backup received according to described receiver module Instruction message reads the described current bootstrap in described memorizer, and calculates described current bootstrap File size, check field and file data;
Described sending module, is additionally operable to send backup file, so that described control sets to described control equipment In the standby internal memory that the described backup file received is write described control equipment, and to described backup file Verify, after verifying successfully, described backup file is saved in described user at described control equipment In in the storage position that pre-sets, wherein, described backup file includes described current bootstrap Result of calculation.
19. embedded devices according to claim 18, it is characterised in that described backup instruction disappears Breath is to send under backup mode for described control equipment in described control program, described processing module, also Before receiving, at described receiver module, the backup instruction message that described control equipment sends, pass through CPU Perform the described Bootloader in described memorizer;
Described sending module, is additionally operable to send second by described Bootloader to described control equipment Inquiry message;
Described processing module, is additionally operable to when described receiver module receives described backup within the preset time Instruction message, indicates described control equipment to start prison according to the backup instruction message that described receiver module receives Listen described serial ports;
Described processing module, is additionally operable to when described receiver module is not received by described within the preset time Backup instruction message, loads and starts described current bootstrap.
20. embedded devices according to claim 18, it is characterised in that described receiver module, It is additionally operable at described sending module after described control equipment sends backup file, receives described control and set The backup failure message that preparation is sent, described backup failure message is used for indicating described control equipment to described standby Part file verification failure.
21. according to the embedded device according to any one of claim 18~20, it is characterised in that institute State processing module, be additionally operable to, in described memory module, described upgrade file is write described embedded device When there is staging error during memorizer, restart described embedded device, and by described CPU Again perform described Bootloader;
Described sending module, is additionally operable to send described to described control equipment by described Bootloader 3rd inquiry message;
Described receiver module, is additionally operable to receive the recovery instruction message that described control equipment sends, described extensive Instruction message is used for indicating described embedded device to monitor described serial ports again, and receives institute by described serial ports Stating the recovery file that control equipment sends, described recovery file is that described control equipment selects according to described user The file path selected calculates, and described recovery file includes file size, check field and file data;
Memory module, be additionally operable to by described recovery file write described embedded device memorizer in, with The bootstrap reduced in the memorizer of described embedded device before writing described upgrade file.
22. embedded devices according to claim 21, it is characterised in that described recovery file is One of them the backup file selected in the described backup file of storage in described control equipment.
23. 1 kinds control equipment, it is characterised in that including:
Sending module, for sending upgrading instruction message to embedded device, described upgrading instruction message is used The serial ports between described embedded device and described control equipment is monitored in indicating described embedded device;
Computing module, calculates the file size of upgrade file, school for the file path selected according to user Test field and file data;
Described sending module, is additionally operable to send described calculating mould by described serial ports to described embedded device The upgrade file that block calculates so that described embedded device is by described embedded for the write of described upgrade file In the memorizer of equipment, to replace the current bootstrap in described memorizer.
24. control equipment according to claim 23, it is characterised in that described control equipment also wraps Include: start module, for described sending module to described embedded device send upgrading instruction message it Before, start the control program of described control equipment, and in described control program, select upgrade mode;
Receiver module, for receiving, by described control program, the first inquiry that described embedded device sends Message, described first inquiry message is for pointing out described control equipment to described in described embedded device Current bootstrap is upgraded.
25. control equipment according to claim 24, it is characterised in that described sending module, also For, before sending upgrading instruction message to described embedded device, sending standby to described embedded device Part instruction message, described backup instruction message is used for indicating described embedded device to send standby to described terminal Part file;
Described receiver module, is additionally operable to receive, by described serial ports, the backup literary composition that described embedded device sends Part, described backup file includes the literary composition of the described current bootstrap in the memorizer of described embedded device Part length, check field and file data;
Described control equipment also includes: memory module, for the backup literary composition received by described receiver module Part writes in the internal memory of described control equipment;
Correction verification module, the backup file in the internal memory that described memory module is write described control equipment Verify;
Described memory module, is additionally operable to after described correction verification module is to described backup file verification success, will Described backup file is saved in the storage position that described user pre-sets in described control equipment;
Described sending module, is additionally operable to after described correction verification module is to described backup file verification failure, to Described embedded device sends backup failure message.
26. control equipment according to claim 25, it is characterised in that described startup module, also For described sending module to described embedded device send backup instruction message before, start described control The control program of control equipment, and in the control program of described control equipment, select backup mode;
Described receiver module, is additionally operable to receive that described embedded device sends by described control program the Two inquiry message, described second inquiry message is used for pointing out described control equipment in described embedded device Described current bootstrap back up.
27. according to the control equipment described in claim 25 or 26, it is characterised in that described reception mould Block, is additionally operable to be calculated to described in the transmission of described embedded device by described serial ports at described sending module Upgrade file after, by described control program receive described embedded device send the 3rd inquiry disappear Breath, described 3rd inquiry message is used for indicating described embedded device to lose the upgrading of described current bootstrap Lose;
Described sending module, is additionally operable to send to described embedded device recover instruction message, described recovery Instruction message is used for indicating described embedded device to monitor described serial ports;
Described computing module, is additionally operable to calculate the literary composition recovering file according to the file path that described user selects Part length, check field and file data;
Described sending module, is additionally operable to send described calculating mould by described serial ports to described embedded device The recovery file that block calculates so that described embedded device is by described embedded for the write of described recovery file In the memorizer of equipment, with reduction writing before described upgrade file in the memorizer of described embedded device Bootstrap.
28. control equipment according to claim 27, it is characterised in that described recovery file be One of them the backup file selected in the described backup file of storage in described control equipment.
29. 1 kinds of embedded systems, it is characterised in that including: as any one of claim 15~22 Described embedded device and the control equipment as according to any one of claim 23~28.
CN201510339079.5A 2015-06-17 2015-06-17 Boot program upgrading method, embedded equipment, control equipment and embedded system Active CN106257417B (en)

Priority Applications (2)

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

Applications Claiming Priority (1)

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

Publications (2)

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

Family

ID=57544970

Family Applications (1)

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

Country Status (2)

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

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107613286A (en) * 2017-08-30 2018-01-19 深圳市芯智科技有限公司 A kind of file monitoring method for being used to avoid retest set top box
CN107608721A (en) * 2017-09-13 2018-01-19 北京小鸟看看科技有限公司 Wear the upgrade method of virtual reality device and its bootstrap loader
CN108572830A (en) * 2017-12-22 2018-09-25 深圳市鼎阳科技有限公司 Upgrade method, the system of a kind of embedded system and its bootstrap
CN108614717A (en) * 2018-04-11 2018-10-02 厦门亿联网络技术股份有限公司 A kind of system boot method based on USB
CN109189461A (en) * 2018-11-27 2019-01-11 上海辛格林纳新时达电机有限公司 The programme upgrade method and elevator control system and lift facility of elevator control system
CN109213510A (en) * 2018-09-21 2019-01-15 深圳市鼎阳科技有限公司 A kind of application program updating method and storage medium for embedded device
CN109254727A (en) * 2018-08-20 2019-01-22 广东九联科技股份有限公司 A kind of self-regeneration method of embedded device
CN109857433A (en) * 2019-01-15 2019-06-07 四川虹美智能科技有限公司 A kind of scm software upgrading tool and method
CN110286933A (en) * 2019-06-28 2019-09-27 北京音磅其声科技有限公司 A kind of cross-system serial ports upgrade method
CN111258604A (en) * 2020-01-14 2020-06-09 深圳市有为信息技术发展有限公司 Bootloader upgrading system and method
CN112748959A (en) * 2020-12-29 2021-05-04 杭州迪普科技股份有限公司 Embedded system starting method, flash memory burning method and system updating method
CN112882731A (en) * 2021-01-08 2021-06-01 北京锦鸿希电信息技术股份有限公司 Embedded software upgrading method and device
CN113467842A (en) * 2021-06-25 2021-10-01 厦门码灵半导体技术有限公司 Starting method of embedded equipment suitable for industrial application scene, embedded equipment and computer readable storage medium
CN113608758A (en) * 2021-07-15 2021-11-05 东莞新能安科技有限公司 Software upgrading method and device, battery management system, battery and power utilization device
CN114356855A (en) * 2021-12-06 2022-04-15 深圳市亚略特科技股份有限公司 File management method, file management device, electronic device and readable storage medium

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107885523B (en) * 2017-11-10 2021-08-31 航宇救生装备有限公司 Rapid and stable serial port software upgrading method
CN110413310A (en) * 2018-04-28 2019-11-05 深圳市优必选科技有限公司 Programme upgrade method and terminal device
CN110825414B (en) * 2019-11-06 2024-03-01 许继集团有限公司 Program upgrading device, embedded device and program upgrading method thereof
CN112445508B (en) * 2020-10-17 2022-10-04 中国航空工业集团公司洛阳电光设备研究所 ARM application program online upgrading method based on CAN bus
CN112527371B (en) * 2020-12-17 2024-06-04 杭州海康威视数字技术股份有限公司 Boot loader upgrading method and device, electronic equipment and storage medium
CN112612498A (en) * 2020-12-30 2021-04-06 深圳市九洲电器有限公司 Embedded equipment upgrading method and embedded equipment
CN112783692A (en) * 2021-01-12 2021-05-11 重庆海云捷迅科技有限公司 SoC data recovery system and method
CN113064621B (en) * 2021-04-14 2024-06-18 艾体威尔电子技术(北京)有限公司 Method for upgrading firmware of password keyboard system by android system of intelligent device
CN113157287B (en) * 2021-04-30 2023-03-10 深圳市格灵精睿视觉有限公司 File burning method and device and computer readable storage medium
CN115981698A (en) * 2023-03-21 2023-04-18 苏州浪潮智能科技有限公司 Firmware upgrading method and device
CN117573156A (en) * 2023-10-19 2024-02-20 京源中科科技股份有限公司 Ultrasonic water meter upgrading method, system and device supporting infrared function

Citations (5)

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

Family Cites Families (3)

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

Patent Citations (5)

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

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107613286A (en) * 2017-08-30 2018-01-19 深圳市芯智科技有限公司 A kind of file monitoring method for being used to avoid retest set top box
CN107608721A (en) * 2017-09-13 2018-01-19 北京小鸟看看科技有限公司 Wear the upgrade method of virtual reality device and its bootstrap loader
CN108572830A (en) * 2017-12-22 2018-09-25 深圳市鼎阳科技有限公司 Upgrade method, the system of a kind of embedded system and its bootstrap
CN108614717A (en) * 2018-04-11 2018-10-02 厦门亿联网络技术股份有限公司 A kind of system boot method based on USB
CN109254727A (en) * 2018-08-20 2019-01-22 广东九联科技股份有限公司 A kind of self-regeneration method of embedded device
CN109213510A (en) * 2018-09-21 2019-01-15 深圳市鼎阳科技有限公司 A kind of application program updating method and storage medium for embedded device
CN109189461A (en) * 2018-11-27 2019-01-11 上海辛格林纳新时达电机有限公司 The programme upgrade method and elevator control system and lift facility of elevator control system
CN109857433A (en) * 2019-01-15 2019-06-07 四川虹美智能科技有限公司 A kind of scm software upgrading tool and method
CN110286933A (en) * 2019-06-28 2019-09-27 北京音磅其声科技有限公司 A kind of cross-system serial ports upgrade method
CN111258604A (en) * 2020-01-14 2020-06-09 深圳市有为信息技术发展有限公司 Bootloader upgrading system and method
CN112748959A (en) * 2020-12-29 2021-05-04 杭州迪普科技股份有限公司 Embedded system starting method, flash memory burning method and system updating method
CN112882731A (en) * 2021-01-08 2021-06-01 北京锦鸿希电信息技术股份有限公司 Embedded software upgrading method and device
CN113467842A (en) * 2021-06-25 2021-10-01 厦门码灵半导体技术有限公司 Starting method of embedded equipment suitable for industrial application scene, embedded equipment and computer readable storage medium
CN113467842B (en) * 2021-06-25 2023-09-19 厦门码灵半导体技术有限公司 Method for starting embedded device suitable for industrial application scene, embedded device and computer readable storage medium
CN113608758A (en) * 2021-07-15 2021-11-05 东莞新能安科技有限公司 Software upgrading method and device, battery management system, battery and power utilization device
CN114356855A (en) * 2021-12-06 2022-04-15 深圳市亚略特科技股份有限公司 File management method, file management device, electronic device and readable storage medium

Also Published As

Publication number Publication date
CN106257417B (en) 2021-07-20
WO2016202088A1 (en) 2016-12-22

Similar Documents

Publication Publication Date Title
CN106257417A (en) Bootstrap upgrade method, embedded device, control equipment and embedded system
CN102289397B (en) Method and device for automatically restoring embedded system of set top box
CN104102518B (en) double-CPU system and program upgrading method thereof
US9015458B2 (en) Computer system and method for updating basic input/output system by switching between local mode and bypass mode through baseboard management controller
CN104090796A (en) Embedded device program updating method and system
US20060224723A1 (en) Data updating system and method
CN101594613A (en) The method of terminal equipment and upgrading thereof, system
US20150331754A1 (en) Boot recovery system
CN111142911B (en) Embedded system with abnormal recovery function and upgrading method thereof
CN109284117A (en) Firmware upgrade method and system and flash memory microcontroller based on flash memory microcontroller
US20090271660A1 (en) Motherboard, a method for recovering the bios thereof and a method for booting a computer
CN103106083B (en) A kind of loading method of firmware and device
CN103634668A (en) System upgrading method and device in smart television
CN109871334B (en) Cable modem and method of operation
CN104991805B (en) Smart machine and its system calamity are for control method
CN107396185B (en) Upgrading method and system
CN109885322A (en) A kind of long-range programming system of intelligence instrument
CN112612498A (en) Embedded equipment upgrading method and embedded equipment
CN109634782B (en) Method and device for detecting system robustness, storage medium and terminal
CN105704707A (en) Slave equipment and air upgrading method thereof
CN110928727A (en) Method for rapidly restoring factory settings of operating system
KR101529713B1 (en) Method for improving system stability of android devices in abnormal power switching, and computer-readable recording medium for the same
JP2005284902A (en) Terminal device, control method and control program thereof, host device, control method and control program thereof, and method, system, and program for remote updating
CN115658152A (en) Firmware upgrading method, firmware, electronic device and computer readable storage medium
CN114546455A (en) MCU software upgrading method and device for double partitions

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant