A kind of method of firmware program on-line upgrading and hardware device
[affiliated technical field]
The present invention relates to a kind of method and hardware device of firmware program on-line upgrading, particularly about utilizing computer operating system to automatically perform method and hardware device that mechanism realizes firmware program on-line upgrading.
[background technology]
Firmware be hardware device (programmable logic device (PLD) is as controller) can normally move needed software, firmware (Firmware) connotation the earliest is the hardware with software function, early stage this device generally is meant the EPROM that there is software or EEPROM or the like, development along with memory technology, the appearance of flash memory (FlashMemory), the feasible read-write operation that can simply realize the storage medium store information by programmable circuit, if select the needed firmware of flash memory storage hardware for use, then under the situation of not changing physical hardware, just can realize firmware upgrade, make the function of hardware device obtain to increase or improve by refreshing flash information.Generally rely on computer operating system at present, adopt special firmware update program that the firmware program of hardware is refreshed.
Firmware file is the storage mode of firmware at computer file system, usually regularly or irregularly issue by hardware device provider, the user can pass through particular memory medium (disk, CD etc.) or firmware file to be upgraded is downloaded in the storage space of local computer by network, at firmware upgrade procedure by installing in this locality, content with firmware file, programming is used for the ad-hoc location of the non-volatile memory medium (volatile memory) of storing firmware to hardware device, firmware shows as physical address or one section continuous instruction of logical address on this non-volatile memory medium, after hardware device re-powers (Reset), controller can begin order from reference position and read in instruction, thereby makes original hardware realize new function.Prior art has the mode of multiple firmware updating, now is described below:
The network connecting function that prior art one utilizes hardware device to carry is realized the online firmware update of Internet (similar computing machine is by network auto-update operating system).Controller sends instruction, request of Control Network control module and far-end server connect, and present firmware version information is sent to server, the server controls program is with all the other latest edition contrasts, if latest edition then finishes escalation process, if non-latest edition, the latest firmware download location then is provided, and the network equipment is downloaded the back original firmware is upgraded.This upgrading mode needs hardware device self to be equipped with mixed-media network modules mixed-media, needs simultaneously to finish complicated BlueDrama process, is applicable to the comparison costliness usually, and the hardware device of 26S Proteasome Structure and Function more complicated is not suitable for the consumer digital product of most low to medium price levels.
Prior art two need be from the manual download firmware file of network to local computer, firmware file is downloaded in the storage space of hardware device by specific I/O mechanism again, hardware device can discern automatically newly copy into the firmware file version whether be higher than existing firmware, if be redaction, new firmware file is installed automatically then.Deficiency is that intellectuality is confined to whether need to upgrade at hardware device internal judgment version, and can not obtain new firmware program by network automatically, this scheme does not reduce the user by the manual download firmware of network with firmware file is sent to the fussy degree of hardware inside, simultaneously because built-in version determinating mode and firmware installation procedure, very high requirement has been proposed for the arithmetic capability of this body controller of hardware.
" implementation method of firmware program on-line upgrading in the embedded system " that prior art three is disclosed for Chinese patent CN02121474.3, this method will support the firmware program of online upgrading to separate with the firmware program of systemic-function, and will support the firmware program of online upgrading to be stored in the permanent staying space that is arranged on program storage; System's electrifying startup then, directly go to and carry out the firmware program of supporting online upgrading, after the firmware program of support online upgrading carries out initialization with the necessary hardware resource, judge whether to carry out online upgrading, if then upgrade-system function firmware program, instruction code from the firmware program of upgrading to program storage that write are stored in the dynamic storage; Go to the above-mentioned instruction code in the dynamic storage,, go to the systemic-function firmware program after operation is upgraded then the address space outside the permanent staying space in the firmware program write-in program storer of upgrading.This scheme has improved the security of firmware upgrade, but still has following defective: 1, support the start-up course of online firmware updating program not realize full automation, extra driver need be installed on operating system; 2, operation requires to be equipped with jumbo dynamic storage to the instruction code that program storage writes the firmware program of upgrading in the dynamic storage of embedded system, and this body controller of hardware will have higher performance.
Above-mentioned prior art is owing to there are a plurality of steps to need manual operations, and the operator for being unfamiliar with computing machine is easy to misoperation, causes the updating firmware program failure.
[summary of the invention]
At existing deficiency in the prior art, the objective of the invention is to realize a kind of method and hardware device of firmware program on-line upgrading, to the demand of hardware system with under, need not the reliable automatic on-line upgrading that manual intervention just can realize the firmware program of hardware device to the not high situation of operator's computing machine familiarity requirement.
A first aspect of the present invention provides a kind of method of firmware program on-line upgrading, and its method is to comprise:
1) hardware device is by the computing machine step of connecting of communication interface and networking;
2) step that automatically performs mechanism of activation computer operating system;
3) operating system is carried out and is automatically performed the configuration file step that is stored in the online upgrading program in the hardware device institute tape storage pointed;
4) the online upgrading program is by the step of network from predetermined downloaded firmware program;
5) firmware program of downloading is write hardware device and be with non-volatile scratch pad memory particular space, replace former firmware program, thereby finish the step of updating firmware program.
This method also needs to have communication interface, and this interface can be USB interface, IEEE1394 interface, Wireless USB interface or blue tooth interface.
Wherein, in step 1, between 2, this method also is provided with a step of opening or closing auto-update.This step is used for controlling the online upgrading program of whether carrying out, and after avoiding each hardware device to insert local computer, all will carry out the auto-update order.
Step 2,3 essence are to utilize the mechanism that automatically performs of computer operating system to make the online upgrading program that is stored in the hardware device institute tape storage to move automatically.Usually be that CD-ROM drive on the local computer or other are supported the memory device of automatic executing functions with the initialize memory of hardware device, utilize the Autorun application module then, start online ROMPaq.Its concrete grammar " utilizes semiconductor storage to realize the method that automatically performs " by Chinese patent application, and (application number 03146090.9) discloses and openly, the content of this application is quoted at this.
Further, for better location upgrade server, in the online upgrading program pre-stored with the IP address or the domain name of location-server.When the online upgrading program brought into operation, the IP address or the domain name of the server by pre-stored just can promptly be located upgrade server.
Between step 3 and step 4, after local computer and far-end server connect, to contrast with the upgraded version information in present firmware version information and the server, if present firmware version information is higher than or is equal to the upgraded version information in the server, then finish escalation process, if be lower than the upgraded version information in the server, then execution in step 4.
The firmware program of downloading in the step 4) can be pre-stored in the temporary folder of hard disc of computer.
Also comprise the step of the firmware program of having downloaded being carried out verification between step 4) and the step 5), errorless as verification, then continue step 5).
The firmware of at last that verification is errorless latest edition is written to the nonvolatile storage space of hardware device, covers former firmware version, thereby can realize being stored in the function of the firmware program automatic on-line upgrading of the hardware device in the electronic equipment.
But a second aspect of the present invention provides a kind of hardware device of online upgrading firmware program, this hardware device comprises: the communication interface of line data exchange and the non-volatile scratch pad memory of storing firmware program of going forward side by side that be used for linking to each other with the computing machine of networking, and be used to store the initialization information memory storage that automatically performs machine-processed initialization information that can activate computer operating system, be used to store the configuration file stores device that automatically performs configuration file and be used to store the described online upgrading program storage device that automatically performs configuration file online upgrading program pointed.IP address or domain name have been stored in the online upgrading program storage device in advance in order to location-server.The online upgrading program comprises by network and writes the non-volatile scratch pad memory of described storing firmware program by described communication interface to replace the firmware update module of former firmware program from the download module of predetermined downloaded firmware program with the firmware program of downloading.In addition, this device also is provided with the starting and upgrading switch, and described starting and upgrading switch links to each other with the initialization information memory storage, can open or shut down computer the access path of initialization information memory storage.
Wherein, non-volatile scratch pad memory can be flash memory, hard disk, EEPROM etc.; Communication interface can be USB interface, IEEE1394 interface, Wireless USB interface or blue tooth interface etc.
The present invention's's " a kind of method of firmware program on-line upgrading and hardware device " effect is as follows:
The first, reduced the chance that misoperation causes the firmware upgrade failure, and can be at any time the firmware update situation of querying server end easily, if find to need to upgrade, then finish upgrading automatically;
The second, the step of finishing firmware upgrade is all finished by means of the software and hardware platform of computing machine, and the hardware device of upgrading for need does not have very high software and hardware requirement, thereby can be applied in widely in the middle of the industrial or civilian various electronic equipments.
Three, owing to utilized platform, can increase the successful measure of many assurance upgradings, thereby have better security with powerful processing capacity PC.For example: in the firmware upgrade procedure downloading process, adopt breakpoint transmission and calibration technology, thereby guaranteed the integrality that program is downloaded; Firmware upgrade procedure is stored in the temporary folder of local computer after finishing download, thereby makes the refreshing in the process of updating firmware program, even the accidental interruption of upgrading takes place, also can refresh again until upgrading successfully.In addition, also can with firmware stores position to be upgraded with separate in order to the program location of realizing online upgrading, thereby avoided because the firmware upgrade failure situation that causes this hardware device to use.
In sum, the present invention have more convenient, safe, simultaneously to the less demanding characteristics of the software and hardware of self.
[description of drawings]
Fig. 1 is the video player storage space synoptic diagram that the embodiment of the invention one can online firmware upgrade.
Fig. 2 is the process flow diagram that the present invention supports to start automatically behind the video player connecting system of online upgrading online ROMPaq.
Fig. 3 is the process flow diagram that online upgrading Automatic Program of the present invention is downloaded the redaction firmware file and video player carried out firmware upgrade.
Fig. 4 is a Bluetooth multifunctional mouse firmware on line upgrading process flow diagram of the present invention.
[embodiment]
Further describe in detail we are bright below in conjunction with drawings and Examples.
Embodiment one is a kind of video player.The structure of the video player of embodiment one among the present invention once at first is described.The hardware device of this equipment contains shown in three storeies (as Fig. 1): storer 01 is the core apparatus of online upgrading function, and this storer is divided into first memory block 011, second memory block 012 and the 3rd memory block 013 3 parts.The initialization information that automatically performs mechanism that can activate computer operating system has been stored in first memory block 011, in the present embodiment, device type in the initialization information is made as CD, and computer operating system will be defaulted as CD with storer 01.Because most of operating systems have all been given tacit consent to automatic running program to CD, the semiconductor memory apparatus that inserts is initialized as the automatic running scheme that CD just can utilize this operating system acquiescence.Second memory block 012 has been stored and has been automatically performed configuration file, and in windows operating system, the configuration file that needs to be provided with is autorun.ini, has write down the filename of online upgrading program and its startup complete trails therein.The configuration file online upgrading program pointed that automatically performs has been stored in the 3rd memory block 013, and the online upgrading program comprises by network and writes the non-volatile scratch pad memory of described storing firmware program by communication interface to replace the firmware update module of former firmware program from the download module of predetermined downloaded firmware program with the firmware program of downloading.Storer 01 adopts ROM as storage medium, and ROM is a kind of non-volatile not scratch pad memory, can be owing to maloperation is lost with the core that guarantees the online upgrading function.The IP address or the domain name of server also stored in the 3rd memory block 013, in order to location-server.What storer 02 was stored is the application layer firmware, make controller can coordinate the resource of hardware module, realize the various functions that hardware device possessed, also be to need the firmware part of upgrading among the present invention, storer 02 can adopt nonvolatile memorys such as flash memory, hard disk, EEPROM as storage medium, and the part of storing firmware is hidden, to guarantee the security of firmware.Storer 03 is a file storage area, storage be the file that needs video player to play, as movie file, MTV file etc., this storer generally adopts jumbo storage mediums such as hard disk, flash memory.Communication interface 04 is the communication interface that connects video player and Net-connected computer, in the present embodiment, is USB interface, also can adopt other communication interfaces such as IEEE1394 interface, Wireless USB interface or blue tooth interface certainly.
Video player in the present embodiment realizes that the method for automatically upgrading firmware is as follows:
It at first is the process that in local computer, starts the online upgrading program in the video player.As shown in Figure 2, comprise following steps:
Step 101: video player is connected with local computer by USB interface 04;
Step 102: operation system of computer is visited the initialization information in first memory block 011, and storer 01 is defaulted as CD.;
Step 103: after initialization was finished, the mechanism that automatically performs of operating system was activated, and operating system will be sought in storer 01 and automatically perform configuration file.
Step 104: the computer operating system visit automatically performs configuration file, locatees online ROMPaq;
Step 105: online upgrading program on computers brings into operation;
Step 106: the temporary folder of online upgrading program on local computer backed up, enter the firmware file download step then.
Be loaded in the local computer under the firmware file with server end then.Shown in (Fig. 3), for using the process flow diagram that is loaded under the firmware file with server end of the present invention in the local computer.
Step 201: after the online upgrading program brings into operation, can survey automatically, judge that can local computer be connected to server end for network condition.If can not connect, re-execute step 201; If can connect, then execution in step 202;
Step 202: the online upgrading program is at first partly inquired about the firmware of equipment, the firmware version number Ver A that the equipment that obtains is current;
Step 203: online upgrading program inquiring server end obtains up-to-date firmware version number Ver B;
Step 204: the online upgrading program compares Ver A and Ver B, if version number is identical, the firmware that present equipment then is described is a latest edition, need not to upgrade, and the online upgrading program can withdraw from automatically, cuts off communicating by letter of computing machine and hardware device simultaneously; If Ver B is higher than Ver A, then explanation has more the firmware of highest version to upgrade;
Step 205: auto-update software is connected to server end, utilizes means download Ver B firmware files such as breakpoint transmission, and the firmware file deposit position is the temporary file catalogue of local computer;
Step 206: the firmware file that the verification of online upgrading program is downloaded, if the verification failure, then execution in step 205; If verification succeeds is then carried out firmware upgrade procedure in the hardware device;
The firmware file that the final online ROMPaq will be stored in the errorless latest edition of verification in the local computer temporary file catalogue is written to storer 02 part of equipment by communication interface, thereby has realized automatic online firmware update.If the upgrading failure, then online upgrading software is written to the firmware file in the temporary file catalogue in the hardware device once more, up to upgrading successfully.
Embodiment two is a kind of multifunction blue tooth mouse.Described multifunction blue tooth MouseAcross is crossed blue tooth interface and is connected local computer, and described multifunction blue tooth mouse has multifunction key simultaneously, can send prefabricated multiple instruction.
The structure of described once multifunction blue tooth mouse is described.The hardware device of this equipment contains a non-volatile scratch pad memory, for example: flash memory, be divided into 3 zones: zone 1, what store is system-level firmware, this firmware has been undertaken with computing machine and has been carried out the function that I/O communicates by letter, and connects computing machine after hardware powers on and just can normally realize communication function; Zone 2, this intra-zone is divided first memory storage, second memory storage and the 3rd memory storage three parts, wherein first memory device stores can activate the initialization information that automatically performs mechanism of computer operating system, second memory device stores automatically perform configuration file autorun.ini, the 3rd memory device stores automatically perform configuration file online upgrading program pointed; Zone 3, storage be the application layer firmware, make controller can coordinate hardware module resource, realize the various functions that hardware device possessed, also be to need the firmware part of upgrading among the present invention.Communication interface is a blue tooth interface.
This mouse also comprises a starting and upgrading switch, and the starting and upgrading switch links to each other with first memory storage, can open or shut down computer the access path of initialization information memory storage.
Simultaneously, can this non-volatile scratch pad memory to be set to the user invisible, to prevent its initialization information of being stored of the improper deletion of user, to automatically perform configuration file, online upgrading program, application layer firmware etc.
The firmware program on-line upgrading steps flow chart of multifunction blue tooth mouse is as shown in Figure 4:
Step 301: the multifunction blue tooth MouseAcross is crossed blue tooth interface be connected with local computer;
Step 302: open " the online upgrading switch " of multifunction blue tooth mouse, start online upgrade function;
Step 303: the configuration file in the hardware device of multifunction blue tooth mouse is with the mechanism that automatically performs of activating computer system.Mouse is initialized as memory device or CD-ROM drive on the trimmed book ground computing machine, starts the autorun application module then;
Step 304: multifunction blue tooth mouse visit on-line information part, locate online ROMPaq;
Step 305: the configuration file instruct computer of multifunction blue tooth mouse is the online ROMPaq of operation automatically;
Step 306: after the online upgrading program brings into operation, can be connected to server end, obtain up-to-date firmware version number by the assigned ip address;
Step 307: the online upgrading program will compare version, if find that latest edition is higher than local version, then carry out firmware upgrade;
Step 308: auto-update software is connected to server end, utilizes means download latest edition firmware files such as breakpoint transmission, and the download location is the temporary file catalogue of local computer;
Step 309: the firmware file that the verification of online upgrading program is downloaded, up to verification succeeds, then carry out firmware upgrade procedure in the hardware device;
Step 310: the firmware that the final online ROMPaq will be stored in the errorless latest edition of verification in the local computer temporary file catalogue is written in the storer of equipment, replaces former firmware program, thereby has realized automatic online firmware update.
Above embodiment is the technical scheme of unrestricted our face in order to explanation only, although the present invention is had been described in detail with reference to the foregoing description, those of ordinary skill in the art is to be understood that: still can make amendment or be equal to replacement the present invention, and the task of not breaking away from the spirit and scope of the present invention is revised or local the replacement, and it all should be encompassed in the middle of the claim scope of the present invention.