CN107943528A - The guard method of file download based on VxWorks system and device - Google Patents

The guard method of file download based on VxWorks system and device Download PDF

Info

Publication number
CN107943528A
CN107943528A CN201610895129.2A CN201610895129A CN107943528A CN 107943528 A CN107943528 A CN 107943528A CN 201610895129 A CN201610895129 A CN 201610895129A CN 107943528 A CN107943528 A CN 107943528A
Authority
CN
China
Prior art keywords
character string
read
length
serial ports
falling
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.)
Pending
Application number
CN201610895129.2A
Other languages
Chinese (zh)
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.)
Potevio Information Technology Co Ltd
Putian Information Technology Co Ltd
Original Assignee
Putian Information Technology Co Ltd
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 Putian Information Technology Co Ltd filed Critical Putian Information Technology Co Ltd
Priority to CN201610895129.2A priority Critical patent/CN107943528A/en
Publication of CN107943528A publication Critical patent/CN107943528A/en
Pending legal-status Critical Current

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
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0002Serial port, e.g. RS232C

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Guard method and device, this method the present invention relates to a kind of file download based on VxWorks system include:In the counting stage of falling second, character string is read from serial ports, whether the length for the character string for judging to read is equal to preset length;If so, then judge whether the character string of reading and character string set in advance are identical;If judging result continues to execute the counting of falling second downloaded for VxWorks system map file to differ.The above method can avoid bootrom caused by serial ports maloperation in the prior art or other interference from entering wait state, it is impossible to automatic the defects of downloading image file.

Description

The guard method of file download based on VxWorks system and device
Technical field
The present invention relates to the communication technology, more particularly, to a kind of guard method of the file download based on VxWorks system And device.
Background technology
Vxworks operating system is a embedded real-time operating system of WindRiver companies design, it is capable of providing Good reliability and remarkable real-time, be widely used in the high-quality precision and sophisticated technologies such as communication, military affairs, Aeronautics and Astronautics and In the high field of requirement of real-time.
In vxworks operating system, bootrom (non-disk startup ROM interfaces) is based on a of vxWorks system customizations Boot loader, the guiding for being exclusively used in vxWorks image image files developed by WindRiver companies oneself.When After bootrom is actuated for related initialization, when running to the counting stage of falling second, serial ports is output to display and there remains with showing Start within several seconds to download image image files, fall after the second count down to 0, the parameter region in bootline, downloads what can be loaded Into RAM, image images are started image image files again.
When bootrom runs to the counting stage of falling second, enter key, " M " character or other serial ports can be passed through under serial ports The character of input stops the operation for the counting of falling second, once stopping, bootrom codes enter wait state, it is impossible to automatically continue Perform and download vxWorks image image files, operating personnel input "@" character by input equipment, can just continue to download Image files.
For this reason, in bootrom starts operational process, often since artificial maloperation, or the other interference of serial ports cause Character have input in serial ports, cause the counting of falling second to stop, bootrom enters wait state, it is impossible to automatic to download image texts Part.
The content of the invention
For disadvantages described above, the present invention provides guard method and the device of a kind of file download based on VxWorks system, Bootrom caused by serial ports maloperation in the prior art or other interference can be avoided to enter wait state, it is impossible under automatic The defects of carrying image files.
In a first aspect, the guard method of the file download provided by the invention based on VxWorks system includes:Under file The counting stage of falling second carried, reads character string from serial ports, and whether the length for the character string for judging to read is equal to preset length;
If so, then judge whether the character string of reading and character string set in advance are identical;
If judging result continues to execute the counting of falling second for file download to differ.
Alternatively, the method further includes:
If judging result is identical, fall second counting of the pause for file download.
Alternatively, it is described to read character string from serial ports, including:
Bootrom non-disk startup ROM interfaces read character string from serial ports.
Alternatively, before described the step of character string is read from serial ports, the method further includes:
According to the startup program of bootrom, run to the counting stage of falling second in bootrom and preset by input unit Character string, and the length of definite character string is preset length.
Alternatively, after the step of whether length for the character string for judging to read is equal to preset length, the method is also wrapped Include:
If the length of the character string read is less than preset length, the counting of falling second for file download is performed.
Alternatively, after the step of whether length for the character string for judging to read is equal to preset length, the method is also wrapped Include:
If the length of the character string read is more than preset length, obtained since the first character of the character string of reading The character string of preset length;
Correspondingly, the character string and the whether identical step of character string set in advance read is judged, including:
Judge whether character string and the character string set in advance of acquisition preset length are identical.
Alternatively, the method further includes:
Whether the character string for judging to read from serial ports belongs to the preset characters being manually entered, if so, under then execution is used for Carry the bootrom of vxWorks system map files.
Second aspect, a kind of protective device of file download based on VxWorks system of the invention, including:
Read module, in the counting stage of falling second, character string to be read from serial ports;
Whether the first judgment module, the length of the character string for judging to read are equal to preset length;
Second judgment module, when the length of the character string for determining to read in the first judgment module is equal to preset length, Judge whether character string and the character string set in advance of reading are identical;
Processing module, for the second judgment module the second judgment module determine read character string with it is set in advance When character string differs, the counting of falling second for file download is continued to execute.
Alternatively, described device further includes:
Whether the 3rd judgment module, the character string for judging to read from serial ports belong to the preset characters being manually entered;
Correspondingly, the processing module, is additionally operable to belong in the character string that the 3rd judgment module determines to read from serial ports During the preset characters being manually entered, the bootrom for downloading vxWorks system image image files is performed.
The third aspect, a kind of operating system of the invention, including any of the above-described device.
According to above technical scheme, the guard method of the file download of the invention based on VxWorks system and device, lead to When crossing the length of character string for judging to read and being equal to preset length, then judge reading character string whether with character set in advance Go here and there identical, when result differs, the counting of falling second can be continued to execute, do not stop the download of VxWorks system map file, and then Bootrom caused by serial ports maloperation in the prior art or other interference is avoided to enter wait state, it is impossible to automatic to download The defects of image files, ensure the normal startup of VxWorks system.
Brief description of the drawings
By reference to attached drawing can be more clearly understood the present invention characteristic information and advantage, attached drawing be schematically without It is interpreted as carrying out any restrictions to the present invention, in the accompanying drawings:
Fig. 1 is the flow chart of the guard method for the file download based on VxWorks system that one embodiment of the invention provides;
Fig. 2 and Fig. 3 is respectively the protection side for the file download based on VxWorks system that another embodiment of the present invention provides The flow chart of method;
Fig. 4 is that the structure of the protective device for the file download based on VxWorks system that one embodiment of the invention provides is shown It is intended to.
Embodiment
It is to better understand the objects, features and advantages of the present invention, below in conjunction with the accompanying drawings and specific real Mode is applied the present invention is further described in detail.It should be noted that in the case where there is no conflict, the implementation of the application Feature in example and embodiment can be mutually combined.
Many details are elaborated in the following description to facilitate a thorough understanding of the present invention, still, the present invention may be used also To be implemented using other different from other modes described here, therefore, protection scope of the present invention and from described below Specific embodiment limitation.
For a better understanding of the present invention, following embodiments relate generally to embedded system technology, there is provided one kind is based on The bootrom of VxWorks system is running to the guard method for the counting stage of falling second, avoids artificial or other interference from causing Bootrom stops at the stage of falling second, it is impossible to continues to execute the counting of falling second, can not ensure the normal of VxWorks system map file The problem of download.The VxWorks system map file of the present embodiment refers to the vxWorks system images referred in the prior art Image files.
As shown in Figure 1, Fig. 1 shows the guarantor for the file download based on VxWorks system that one embodiment of the invention provides The flow diagram of maintaining method, the guard method of the file download based on VxWorks system of the present embodiment, including:
Step 101, the counting stage of falling second in file download, read character string from serial ports.
For example, character string being read from serial ports can be specially:Bootrom non-disk startup ROM interfaces are read from serial ports Take character string.
Whether step 102, the length for the character string for judging to read are equal to preset length, if so, performing step 103.Otherwise, Perform step 103a.
Step 103, when the judging result of step 102 is is, judge character string and the character string set in advance read It is whether identical, if it is not, performing step 104, otherwise, perform step 104a.
If the length for the character string for step 103a, judging to read in step 102 is less than preset length, execution is used for file The counting of falling second downloaded.
Step 104, step 103 judging result for differ when, continue to execute the counting of falling second for file download.
Step 104a, when the judging result of step 103 is identical, fall second counting of the pause for file download.
Thus, when the method for the present embodiment is equal to preset length by the length for the character string for judging to read, then judge to read Whether the character string taken is identical with character string set in advance, when result differs, can continue to execute the counting of falling second, not stop The download of VxWorks system map file, and then avoid bootrom caused by serial ports maloperation in the prior art or other interference Enter wait state, it is impossible to which automatic the defects of downloading image files, ensures the normal startup of VxWorks system.
Alternatively, before the step of character string is read in the method described in earlier figures 1, in the slave serial ports in step 101, This method may also include following contents, i.e.,:According to the startup program of bootrom, the counting stage of falling second is run in bootrom Character string is preset by input unit, and the length of definite character string is preset length.
That is, above-mentioned step 101 can be specially the step 101 not shown in following figures ':
101’:According to the startup program of bootrom, it is pre- by input unit to run to the counting stage of falling second in bootrom First set character string, and determine that the length of character string is preset length, and then in the counting stage of falling second of file download, from serial ports Middle reading character string.
That is, the Booting sequence based on bootrom in itself, introducing presets character string string x, length len Two concepts of x, after bootrom enters the counting stage of falling second, read serial ports character string, judge the character string string y read Whether length is length len x, is compared if so, will then read string y and string x, if the same bootrom Into wait state, the second is continued to execute until being counted as 0 if differing, and downloads vxWorks image image files.Protect Bootrom is demonstrate,proved from serial ports maloperation or interference, image files can be normally downloaded, ensure that the normal startup of system.
Certainly, if the curtailment len of the character string read x, bootrom continues to execute the counting of falling second, until 0 is counted as, downloads vxWorks image image files.Thus, under artificial maloperation or the other interference of serial ports, in bootrom That the counting stage of falling second simply enters is not the character string string x of the length len x subscribed, then bootrom, which falls the second, to stop Only, wait state will not be entered, may proceed to download vxWorks image image files, ensure that the normal startup of system.
In addition, as shown in Fig. 2, in the present embodiment, after abovementioned steps 102, the method shown in Fig. 1 may also include following Step 105 and step 106:
If the length of character string for judging to read in step 102 is more than preset length, perform following steps 105 with 106:
If the length for the character string for judging to read in step 105, step 102 is more than preset length, from the character of reading The first character of string starts to obtain the character string of preset length;
106th, judge whether character string and the character string set in advance of acquisition preset length are identical.
And then when the judging result of step 106 is differs, continue to execute the counting of falling second for file download.
When the judging result of step 106 is identical, fall second counting of the pause for file download.
For example, contrast character string can be preset, code name string x, set the length of character string as len x.
It should be noted that string x are as general character string, it would be desirable to be able to are inputted on common keyboard medium.
Character string is read from serial ports in the counting stage of falling second, whether the character string number for judging to read is len x, if Then by the character string string y read and to preset character string string x and contrast, if string x and String y are identical, it was demonstrated that the character string of serial ports input is correct, and the counting of falling second at this time stops by force, and bootrom is entered Wait state.If string x and string y are differed, it was demonstrated that the character string of input is wrong, it may be possible to artificial to miss Operation or other interference cause serial ports to have the input of unusual character string, and the counting of falling second continues, and after being counted as 0, download VxWorks image image files.
Thus, the method for the present embodiment is utilized runs to the counting stage of falling second from serial ports reading len x words in bootrom Symbol, judges whether the character string read and character string set in advance are identical, determines whether bootrom enters wait state, Ensure in the counting stage of falling second, when serial ports has forbidden character input, bootrom can continue to download vxWorks and reflects without interruption As image files, ensure the normal startup of system.
In addition, in practical applications, the method shown in above-mentioned Fig. 1 or Fig. 2 further includes following steps:A101, such as Fig. 3 institutes Show.
Whether A101, the character string for judging to read from serial ports belong to the preset characters being manually entered, if so, then performing A102;Otherwise foregoing step 102 is performed.
A102, perform the bootrom for being used for downloading vxWorks system map files.
Otherwise, foregoing step 102 is performed.
For example, when bootrom runs to the counting stage of falling second, character string is received from serial ports.
If after being properly received "@" character and carriage return, bootrom downloads vxWorks image image files.
That is, when bootrom runs to the stage of falling second, receive after the character string of serial ports input, judge whether It is consistent with expected string value, if unanimously, bootrom codes can just enter wait state, if inconsistent, the meter of falling second Several operations will not stop, and fall after the second count down to 0, automatic to download vxWorks system image image files.This avoid people Causing serial ports to receive character for serial ports maloperation or other interference forces the counting of falling second to stop, and bootrom enters wait shape State.
In addition, as shown in figure 4, Fig. 4 shows a kind of protective device of the file download based on VxWorks system, the dress Putting may include:
Read module 41, in the counting stage of falling second, character string to be read from serial ports;
Whether the first judgment module 42, the length of the character string for judging to read are equal to preset length;
Second judgment module 43, the length of the character string for determining to read in the first judgment module are equal to preset length When, judge whether the character string of reading and character string set in advance are identical;
Processing module 44, for determining the character string of reading with presetting in the second judgment module in the second judgment module Character string when differing, continue to execute the counting of falling second for file download.Certainly, if processing module 44, for second When the second judgment module determines that the character string of reading is identical with character string set in advance, pause is used under file judgment module The counting of falling second carried.
Further, the length for the character string that processing module 44 is additionally operable to determine to read in the first judgment module is less than default Length, then perform the counting of falling second for file download.
Processing module 44 is additionally operable to be more than preset length in the length of character string that the first judgment module determines to read, then from The first character of the character string of reading starts to obtain the character string of preset length;Correspondingly, the second judgment module is used to judge Whether character string and the character string set in advance for obtaining preset length are identical.
During specific implementation, the device shown in above-mentioned Fig. 4 may also include the 3rd judgement not shown in following figures Module;Whether the 3rd judgment module, the character string for judging to read from serial ports belong to the preset characters being manually entered;
Correspondingly, the processing module 44, is additionally operable to determine the character string category that reads from serial ports in the 3rd judgment module When the preset characters being manually entered, the bootrom for downloading vxWorks system image image files is performed.
For this reason, can the present embodiment primarily to when ensureing that bootrom runs to the counting stage of falling second, unless in serial ports Input outside character string set in advance, can normal operation be counted as 0 to falling the second, it is automatic to download vxWorks images image texts Part.
The protective device of the file download of the present embodiment can perform the protection for the file download that foregoing any embodiment is recorded Method, referring to foregoing description, the present embodiment is no longer described in detail.
In practical applications, the embodiment of the present invention also provides a kind of operating system, which may include above-mentioned any Device described in embodiment.
In the present invention, term " first ", " second " are only used for description purpose, and it is not intended that instruction or hint are opposite Importance.Term " multiple " refers to two or more, unless otherwise restricted clearly.
Although being described in conjunction with the accompanying embodiments of the present invention, those skilled in the art can not depart from this hair Various modifications and variations are made in the case of bright spirit and scope, such modifications and variations are each fallen within by appended claims Within limited range.

Claims (10)

  1. A kind of 1. guard method of the file download based on VxWorks system, it is characterised in that including:
    In the counting stage of falling second of file download, character string is read from serial ports, judge read character string length whether etc. In preset length;
    If so, then judge whether the character string of reading and character string set in advance are identical;
    If judging result continues to execute the counting of falling second for file download to differ.
  2. 2. according to the method described in claim 1, it is characterized in that, the method further includes:
    If judging result is identical, fall second counting of the pause for file download.
  3. 3. according to the method described in claim 1, it is characterized in that, described read character string from serial ports, including:
    Bootrom non-disk startup ROM interfaces read character string from serial ports.
  4. 4. according to the method described in claim 3, it is characterized in that, it is described from serial ports read character string the step of before, institute The method of stating further includes:
    According to the startup program of bootrom, run to the counting stage of falling second in bootrom and character is preset by input unit String, and the length of definite character string is preset length.
  5. 5. according to the method described in claim 1, it is characterized in that, whether the length for the character string for judging to read is equal to default length After the step of spending, the method further includes:
    If the length of the character string read is less than preset length, the counting of falling second for file download is performed.
  6. 6. according to the method described in claim 1, it is characterized in that, whether the length for the character string for judging to read is equal to default length After the step of spending, the method further includes:
    If the length of the character string read is more than preset length, obtained since the first character of the character string of reading default The character string of length;
    Correspondingly, the character string and the whether identical step of character string set in advance read is judged, including:
    Judge whether character string and the character string set in advance of acquisition preset length are identical.
  7. 7. according to the method described in claim 3, it is characterized in that, the method further includes:
    Whether the character string for judging to read from serial ports belongs to the preset characters being manually entered, and is used to download if so, then performing The bootrom of vxWorks system map files.
  8. A kind of 8. protective device of the file download based on VxWorks system, it is characterised in that including:
    Read module, in the counting stage of falling second, character string to be read from serial ports;
    Whether the first judgment module, the length of the character string for judging to read are equal to preset length;
    Second judgment module, when the length of the character string for determining to read in the first judgment module is equal to preset length, judges Whether the character string of reading is identical with character string set in advance;
    Processing module, for determining the character string of reading and character set in advance in the second judgment module in the second judgment module When string differs, the counting of falling second for file download is continued to execute.
  9. 9. device according to claim 8, it is characterised in that described device further includes:
    Whether the 3rd judgment module, the character string for judging to read from serial ports belong to the preset characters being manually entered;
    Correspondingly, the processing module, is additionally operable to belong to artificial in the character string that the 3rd judgment module determines to read from serial ports During the preset characters of input, the bootrom for downloading vxWorks system image image files is performed.
  10. 10. a kind of operating system, it is characterised in that including the device described in the claims 8 or 9.
CN201610895129.2A 2016-10-13 2016-10-13 The guard method of file download based on VxWorks system and device Pending CN107943528A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610895129.2A CN107943528A (en) 2016-10-13 2016-10-13 The guard method of file download based on VxWorks system and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610895129.2A CN107943528A (en) 2016-10-13 2016-10-13 The guard method of file download based on VxWorks system and device

Publications (1)

Publication Number Publication Date
CN107943528A true CN107943528A (en) 2018-04-20

Family

ID=61928480

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610895129.2A Pending CN107943528A (en) 2016-10-13 2016-10-13 The guard method of file download based on VxWorks system and device

Country Status (1)

Country Link
CN (1) CN107943528A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5619704A (en) * 1991-04-04 1997-04-08 Kabushiki Kaisha Toshiba Asynchronous interrupt inhibit method and apparatus for avoiding interrupt of an inseparable operation
CN102681858A (en) * 2011-03-09 2012-09-19 研祥智能科技股份有限公司 VxWorks operation system as well as method and device for configuring start waiting time thereof
CN103064751A (en) * 2012-12-27 2013-04-24 中航(苏州)雷达与电子技术有限公司 Method for removing recommend standard (RS) serial port interference of avionic devices
CN103914324A (en) * 2013-01-08 2014-07-09 海尔集团公司 Method for automatically burning firmware of embedded equipment, and system thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5619704A (en) * 1991-04-04 1997-04-08 Kabushiki Kaisha Toshiba Asynchronous interrupt inhibit method and apparatus for avoiding interrupt of an inseparable operation
CN102681858A (en) * 2011-03-09 2012-09-19 研祥智能科技股份有限公司 VxWorks operation system as well as method and device for configuring start waiting time thereof
CN103064751A (en) * 2012-12-27 2013-04-24 中航(苏州)雷达与电子技术有限公司 Method for removing recommend standard (RS) serial port interference of avionic devices
CN103914324A (en) * 2013-01-08 2014-07-09 海尔集团公司 Method for automatically burning firmware of embedded equipment, and system thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
学步园: "让uboot按下指定键停止autoboot", 《HTTPS://WWW.XUEBUYUAN.COM/1029440.HTML》 *

Similar Documents

Publication Publication Date Title
US8769553B2 (en) Deploy anywhere framework for heterogeneous mobile application development
EP3441833B1 (en) Programming support device, control method of programming support device, and control program of programming support device
CN105824657B (en) A kind of method and mobile terminal for showing application program
EP2684383A1 (en) Systems and methods for testing content of mobile communication devices
GB2407893A (en) Software development for a wireless mobile device
CN103514019B (en) Handle the method and its device of pop-up
CN106453509B (en) Processing method that browser is closed extremely, system, browser and server
CN103577070A (en) Method and device for taking photos quickly without unlocking screen
CN108628733B (en) Method and device for testing batch service processing operation
CN112882732A (en) Method and device for updating function codes in Software Development Kit (SDK)
CN100442229C (en) Non-disk workstation computer system for automatically recognizing CPU construction
CN107329763A (en) Application program interface display method and device, electronic equipment and storage medium
CN102708044A (en) Complete and compatible function
CN105959451A (en) MBN loading method and mobile terminal
CN114372256A (en) Application program running method, device, equipment and storage medium
CN110377408A (en) A kind of starting method, apparatus, terminal and the medium of application program
CN104699479B (en) A kind of mobile phone unlocking system and method
CN107943528A (en) The guard method of file download based on VxWorks system and device
CN112286414A (en) Information display method and device, electronic equipment and storage medium
CN105204907B (en) Browser starts method and apparatus
CN109684205B (en) System testing method, device, electronic equipment and storage medium
CN107315947A (en) Pay class application management method, device and mobile terminal
CN107194264A (en) A kind of network interface card with safety certification function based on UEFI
CN106227692A (en) The implementation method of a kind of computer and terminal
CN110134486A (en) A kind of asynchronous method and device to Load Image of ListView

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20180420

RJ01 Rejection of invention patent application after publication