A kind of EMMC firmware upgrade methods and device
Technical field
The present embodiments relate to computer storage technology more particularly to a kind of EMMC firmware upgrade methods and device.
Background technology
EMMC is for embedded memories ordered by MMC associations, primarily directed to products such as mobile phone or tablet computers
Standard specification.EMMC includes NAND and controller, is configured with firmware in controller, the operational process of EMMC can be controlled
System.
It, substantially all can be by the use of EMMC as storage device on the intelligent terminals such as current mobile phone.EMMC firmwares are in itself
When batch production, exception (bug) may be tested, repairs problem at this time, need to upgrade the firmware of EMMC.Work as EMMC
After having been fitted to terminal, the operating system and user information of storage terminal are just used in EMMC.If it is carried out again after dismounting
Firmware upgrade necessarily so that the information in EMMC is lost, influences to use.
A kind of upgrade method of the prior art is to carry out firmware upgrade using the EMMC in specific purpose tool connection terminal, but
This aspect can break the information stored on ring EMMC, on the other hand, the inconvenience of firmware upgrade operation be also resulted in using specific purpose tool.
Invention content
The embodiment of the present invention provides a kind of EMMC firmware upgrade methods and device, to improve the convenient of EMMC firmware upgrades
Property.
In a first aspect, an embodiment of the present invention provides a kind of EMMC firmware upgrade methods, the EMMC firmware upgrade method packets
It includes:
Terminal operating system receives the firmware data to be upgraded of EMMC by Data Transport Protocol;
The terminal operating system sends upgrade request to EMMC, and reads upgrading configuration information from the EMMC;
According to the upgrading configuration information EMMC is written in the firmware data to be upgraded by the terminal operating system
In;
The terminal operating system reads from the EMMC after the completion of write-in and has been written into firmware data, treated with described
Firmware updating data are compared, if comparing consistent, it is determined that upgrade successfully.
Second aspect, the embodiment of the present invention additionally provide a kind of EMMC device for upgrading firmware, the EMMC device for upgrading firmware
Including:
Firmware data receiving module to be upgraded, is configured in terminal operating system, for being received by Data Transport Protocol
The firmware data to be upgraded of EMMC;
Upgrading configuration information read module, is configured in terminal operating system, for EMMC send upgrade request, and from
Upgrading configuration information is read in the EMMC;
Firmware data writing module to be upgraded, is configured in terminal operating system, for according to the upgrading configuration information,
The firmware data to be upgraded is written in the EMMC;
Data comparing module is configured in terminal operating system, and firmware data is had been written into for being read from the EMMC,
It is compared with the firmware data to be upgraded, if comparing consistent, it is determined that upgrade successfully.
As shown from the above technical solution, the present invention is written by terminal operating system to the EMMC firmwares in terminal
Firmware upgrade data and then completion EMMC updating operations solve the prior art in EMMC firmware upgrade process, being grasped because dismantling
The problem of information caused by work is lost, realizes under the premise of EMMC firmwares not being physically contacted, utilizes terminal operation
System completes the upgrading to EMMC, not only avoids the problem of information is lost, and improve the convenience of EMMC firmware upgrades.
Description of the drawings
Fig. 1 is a kind of EMMC firmware upgrade methods flow diagram of the offer in the embodiment of the present invention one;
Fig. 2 is a kind of EMMC firmware upgrade methods flow diagram of the offer in the embodiment of the present invention two;
Fig. 3 is a kind of EMMC device for upgrading firmware structure diagram of the offer in the embodiment of the present invention three.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining the present invention rather than limitation of the invention.It also should be noted that in order to just
Part related to the present invention rather than entire infrastructure are illustrated only in description, attached drawing.
Embodiment one
Fig. 1 is a kind of EMMC firmware upgrade methods flow diagram of the offer in the embodiment of the present invention one, the present embodiment
It is applicable to have in the electronic equipment of EMMC, this method can be performed by EMMC device for upgrading firmware, be specifically included as follows
Step:
S110, terminal operating system receive the firmware data to be upgraded of EMMC by Data Transport Protocol;
Terminal operating system is the computer program of management and control computer hardware and software resource, is to run directly in
The most basic system software of terminal.The terminal operating system can be Windows operating system, (SuSE) Linux OS,
Android operation system or IOS operating system.
Data Transport Protocol is the transportation protocol that terminal room communicates, and can be used for PC ends, mobile terminal, server end etc.
The communication of terminal room.
EMMC includes a controller and at least one nand-flash storage units, and the firmware data to be upgraded is protected
There are a fixed area of EMMC, which is made of nand-flash storage units.
Firmware data to be upgraded includes the model data of EMMC, the edition data of firmware data and corresponding mark, eventually
End operating system completes the upgrading to EMMC firmwares by detecting and updating firmware data to be upgraded.
S120, the terminal operating system send upgrade request to EMMC, and read upgrading with confidence from the EMMC
Breath.
Before upgrading to EMMC, terminal operating system can send upgrade request to EMMC first, and the upgrade request is used for
Judge whether can to start the updating operation of EMMC.
After the confirmation message to upgrade request is received, terminal operating system can read upgrading configuration information from EMMC,
The upgrading configuration information can be creation time, modification time, committed memory size, the firmware data of EMMC firmware informations
The storage address of version information, mark corresponding with version information and firmware data.Writing these information can be to different firmware
Information distinguishes;The firmware information of EMMC can be preserved after the completion of reading, in order to subsequent operation.
According to the upgrading configuration information institute is written in the firmware data to be upgraded by S130, the terminal operating system
It states in EMMC.
After the completion of reading, terminal operating system can be according to the version information and version of firmware data in upgrading configuration information
The storage address of the corresponding mark of information and firmware data firmware data to be upgraded is written in the EMMC, and then complete firmware
The upgrading of data.
S140, the terminal operating system read from the EMMC after the completion of write-in and have been written into firmware data, with institute
It states firmware data to be upgraded to be compared, if comparing consistent, it is determined that upgrade successfully.
To having been written into the comparison process of firmware data and firmware data to be upgraded, meeting is first to the mark in two kinds of data
Code is compared, and identification code compares unanimously, can be carried out to having been written into the total data in firmware data and firmware data to be upgraded
It compares, if comparison result is all identical, is confirmed as upgrading successfully.If there are different data, stop comparing, will wait to rise
Grade firmware data is re-write in EMMC, and then ensure that the correctness for having been written into firmware data.
Firmware liter is written to the EMMC firmwares in terminal by terminal operating system in the technical solution of the present embodiment
Level data and then EMMC updating operations are completed, so as to solve the prior art in EMMC firmware upgrade process, because of disassembling section
The problem of caused information is lost, realizes under the premise of EMMC firmwares not being physically contacted, utilizes terminal operation system
System completes the upgrading to EMMC, not only avoids the problem of information is lost, and improve the convenience of EMMC firmware upgrades.
Embodiment two
Fig. 2 is a kind of EMMC firmware upgrade methods flow diagram of the offer in the embodiment of the present invention two, the present embodiment
The detailed step in EMMC firmware upgrade methods is described on the basis of embodiment one, is specifically comprised the following steps:
S210, terminal operating system receive the firmware data to be upgraded of EMMC by Data Transport Protocol.
Further, the Data Transport Protocol includes TFTP, ADB, USB or OTA;The terminal operating system is Android
System.
EMMC firmware upgrade methods are unfolded to describe by taking Android system as an example in the present embodiment, when the terminal operating system
During for Android system, the terminal can be Android smartphone, smart television, digital camera or game machine etc. by Android system
Electronic equipment as operating system.
Simple File Transfer Protocol (Trivial File Transfer Protocol, TFTP) is in TCP/IP protocol suite
One be used between clients and a server carry out simple files transmission agreement.
Universal serial bus (Universal Serial Bus, USB) is an external bus standard, for specification computer
With being connected and communicate with for external equipment.It is the interfacing applied in PC fields.
Over the air (Over the Air Technology, OTA) is by mobile communication (GSM or CDMA)
Air interface carries out SIM card data and application the technology of remote management.
Before updating operation, first to ensure that Android system is in normal operating condition, in Android smartphone
EMMC is performed in updating operation, and Android system can be driven, such as uboot System guides (Universal by included EMMC
Boot Loader) or lk System guides (Little Kernel), realize the operation of escalation process.
After the completion of the firmware data to be upgraded for receiving EMMC, can to all information of firmware data to be upgraded that receives into
Row detection, when detection without mistake can just start in next step operate, otherwise can deletion error firmware data to be upgraded and connect again
It receives.
S220, the terminal operating system check the operating status of the EMMC, if the operating status is no data
The idle state of read-write operation then triggers the transmission operation of upgrade request.
The operating status of EMMC includes busy condition and idle state.When the EMMC and the read-write of Android system no data are grasped
When making, EMMC is in idle condition, on the contrary, EMMC is in busy condition.
S230, the terminal operating system send upgrade request to EMMC, and firmware data are read from the EMMC
Writing address, as the upgrading configuration information;
Writing address is the address for being used to store firmware data to be upgraded in emmc internal storage locations.
The current version of firmware information of S240, the terminal operating system in the upgrading configuration information, it is and described
The version information of firmware data to be upgraded is compared.
In addition to writing address, upgrading configuration information can also be included in the other information needed in escalation process, such as when
Preceding firmware version information, current version of firmware information include the particular content of version information and corresponding version identifier, are comparing
When, it can identify to obtain comparison result by comparing current version of firmware mark and firmware version to be upgraded.
S250, the terminal operating system, will be described in the firmware data to be upgraded that need to upgrade write-ins according to comparison result
In EMMC.
When comparison result is higher than the version information of current firmware data for the version information of firmware data to be upgraded, then will
Firmware data to be upgraded is judged for the firmware data to be upgraded that need to upgrade, and is written in EMMC in corresponding internal storage location.
S260, the terminal operating system read from the EMMC after the completion of write-in and have been written into firmware data, with institute
It states firmware data to be upgraded to be compared, if comparing consistent, it is determined that upgrade successfully.
It should be noted that by different data transport protocol escalation process, part operation can there are some differences.
When being upgraded by TFTP/ADB/USB agreements, Android system can directly receive firmware data to be upgraded, not need to other
The auxiliary of carrier;And when being upgraded by OTA agreements, Android system needs to create a carrier to complete to receive and write-in is treated
The process of firmware updating data.When being upgraded by TFTP/ADB/USB agreements, firmware data to be upgraded can directly be write
Enter in EMMC, firmware data to be upgraded can cover current firmware data automatically;And when being upgraded by OTA agreements, it need to wait to rise
Current firmware data are deleted before grade firmware data write-in.
The technical solution of the present embodiment treats connecing for firmware updating data by the escalation process of EMMC, increasing
The verification operation with ablation process is received, and then avoids the failure of the escalation process caused by file error of transmission, so as to accurate
The errorless upgrading completed to EMMC.
Embodiment three
Fig. 3 is a kind of EMMC device for upgrading firmware structure diagram of the offer in the embodiment of the present invention one, such as Fig. 3 institutes
Show, which includes:Firmware data receiving module 310 to be upgraded, upgrading configuration information read module 320,
Firmware data writing module 330 to be upgraded and data comparing module 340.
Firmware data receiving module 310 to be upgraded, is configured in terminal operating system, is connect for passing through Data Transport Protocol
Receive the firmware data to be upgraded of EMMC;
Upgrading configuration information read module 320, is configured in terminal operating system, for sending upgrade request to EMMC,
And read upgrading configuration information from the EMMC;
Firmware data writing module 330 to be upgraded, is configured in terminal operating system, for matching confidence according to the upgrading
The firmware data to be upgraded is written in the EMMC breath;
Data comparing module 340, is configured in terminal operating system, and firmware number is had been written into for being read from the EMMC
According to being compared with the firmware data to be upgraded, if comparing consistent, it is determined that upgrade successfully.
Further, the upgrading configuration information read module includes:
Firmware data address reading unit, is configured in terminal operating system, for reading firmware number from the EMMC
According to writing address, as the upgrading configuration information.
Further, firmware data writing module to be upgraded includes:
Version information comparing unit, is configured in terminal operating system, for working as in the upgrading configuration information
Preceding firmware version information is compared with the version information of the firmware data to be upgraded;
Firmware updating data write unit, is configured in terminal operating system, for the terminal operating system according to than
Pair as a result, the firmware data to be upgraded that need to upgrade is written in the EMMC.
Further, operating status checks module, is configured in the terminal operating system, for checking the EMMC's
Operating status if the operating status is the idle state of no data read-write operation, triggers the transmission operation of upgrade request.
Further, the Data Transport Protocol includes TFTP, ADB, USB or OTA;The terminal operating system is Android
System.
The technical solution of the present embodiment is established the outpost of the tax office in game level by the outpost of the tax office logical file with tree structure and is saved
Triggering logic between point, scene node, behavior node and condition node, and called according to triggering logic and perform outpost of the tax office information or feelings
Scape information or behavioural information.And since outpost of the tax office scene library, outpost of the tax office behavior library and outpost of the tax office logical file can flexibly be set and change,
During solving game design, designer can not be met to the flexible expansion of outpost of the tax office logic behavior and the need efficiently edited
The problem of asking effectively prevents the single curing of game level event triggering, is not easy to extend, is difficult to realize the shortcomings that customizing,
The realization method of game triggering logic is optimized, and then designs flexible and changeable and creative game play, so as to improve
The interest of game, improves user experience.
Firmware liter is written to the EMMC firmwares in terminal by terminal operating system in the technical solution of the present embodiment
Level data and then EMMC updating operations are completed, so as to solve the prior art in EMMC firmware upgrade process, because of disassembling section
The problem of caused information is lost, realizes under the premise of EMMC firmwares not being physically contacted, utilizes terminal operation system
System completes the upgrading to EMMC, not only avoids the problem of information is lost, and improve the convenience of EMMC firmware upgrades.
The EMMC device for upgrading firmware that the embodiment of the present invention is provided can be used for performing what the embodiment of the present invention was provided
EMMC firmware upgrade methods have corresponding function and advantageous effect.The not technical detail of detailed description in the present embodiment, can
The EMMC firmware upgrade methods provided referring to any embodiment of the present invention.
Note that it above are only presently preferred embodiments of the present invention and institute's application technology principle.It will be appreciated by those skilled in the art that
The present invention is not limited to specific embodiment described here, can carry out for a person skilled in the art various apparent variations,
It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above example to the present invention
It is described in further detail, but the present invention is not limited only to above example, without departing from the inventive concept, also
It can include other more equivalent embodiments, and the scope of the present invention is determined by scope of the appended claims.