CN103970564A - Automatic repairing and upgrading method of embedded operating system and embedded operating system with automatic repairing and upgrading functions - Google Patents

Automatic repairing and upgrading method of embedded operating system and embedded operating system with automatic repairing and upgrading functions Download PDF

Info

Publication number
CN103970564A
CN103970564A CN201410166589.2A CN201410166589A CN103970564A CN 103970564 A CN103970564 A CN 103970564A CN 201410166589 A CN201410166589 A CN 201410166589A CN 103970564 A CN103970564 A CN 103970564A
Authority
CN
China
Prior art keywords
embedded
software package
reparation
operating system
upgrade
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
CN201410166589.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.)
Comba Network Systems Co Ltd
Original Assignee
Comba Telecom Systems China 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 Comba Telecom Systems China Ltd filed Critical Comba Telecom Systems China Ltd
Priority to CN201410166589.2A priority Critical patent/CN103970564A/en
Publication of CN103970564A publication Critical patent/CN103970564A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention provides an automatic repairing and upgrading method of an embedded operating system. A repairing software package used for repairing the embedded operating system is preset on an upgrading server. The method includes the following steps that whether the embedded operating system breaks down or not is judged, the repairing software package is downloaded from the upgrading server, contents of the repairing software package are loaded into the embedded operating system, and the embedded operating system is upgraded automatically after repairing is conducted successfully. By the adoption of the method, the embedded operating system can automatically complete the repairing and upgrading functions without the need of manual triggering, and storage resources of embedded equipment do not need to be occupied.

Description

Embedded OS is repaired method and the system thereof of upgrade function automatically
Technical field
The present invention relates to embedded OS, the method and the system thereof that particularly relate to a kind of embedded OS and automatically repair upgrade function.
Background technology
Embedded system is mainly made up of flush bonding processor, associated support hardware and embedded software system.Be mainly used in control, monitoring or auxiliary engine, device or other equipment for factory's running.Embedded system is different from general computer processing system, and it does not possess jumbo storage medium as hard disk, and mostly uses flash memory as storage medium.Embedded OS chief component as shown in Figure 1, comprises file system, kernel and Bootloader.Wherein Bootloader is boot, operation before operating system nucleus operation, can initiating hardware equipment, set up memory headroom mapping graph, thereby take the hardware environment of system to a proper states, to be ready to correct environment for final call operation system kernel.In embedded system, the common not firmware program as BIOS, therefore the loading initiating task of whole system is just completed by Bootloader completely.After device start, enter Bootloader, then load kernel by Bootloader, kernel startup process can carry file system.
For various reasons, need to upgrade to operating system, conventional method is, in kernel and file system, ROMPaq is set, and destroyed as long as kernel and file system do not have, operating system possesses auto-update function.But in the process of upgrading, may interrupt because the reasons such as power-off suddenly, maloperation cause escalation process, order is upgraded unsuccessfully, even may destroy kernel and file system, causes operating system to lose upgrade function.For this problem, common solution is in flash memory, to store two cover operating systems, i.e. main system and standby system, can start standby system and repair main system because escalation process interrupts causing when destroyed in main system.Due to for embedded device, flash memory space is very valuable resource, and the method is obviously wasted flash memory space.If the standby system on flash memory is also destroyed simultaneously, backup upgrading function also lost efficacy, and system cannot be repaired again.
Summary of the invention
Based on this, be necessary to provide a kind of embedded OS automatically to repair the method for upgrade function, in the case of the kernel of embedded OS and file system unsuccessfully cause owing to upgrading destroyed, utilize the method, thereby the self-regeneration that can realize safely and reliably embedded system recovers auto-update function, and save the storage space of embedded device.
Therefore, the invention provides a kind of embedded OS and automatically repair the method for upgrade function and comprise, judge whether described embedded OS exists fault; If the fault of existence, downloads the reparation software package for repairing described embedded OS from upgrade server; Described upgrade server is used for setting in advance reparation software package; Be written into the content of described reparation software package in described embedded OS, carry out the reparation of described embedded OS.
In optional embodiment, realize the reparation to described embedded OS by the boot of operating system.
In optional embodiment, after the reparation of described operating system completes, described system is upgraded automatically.
In optional embodiment, determine by reading zone bit whether described embedded OS exists fault, specifically, if being error identification, described zone bit judges that described operating system exists fault, judge that described operating system is normal if described zone bit is correct mark, start and enter operating system.
In optional embodiment, after the reparation of described operating system completes, described identification module is designated described zone bit correctly.
In optional embodiment, determine by reading zone bit and number of times parameter whether described embedded OS exists fault, specifically, be greater than predetermined threshold value and judge that described operating system exists fault if described zone bit is error identification and described number of times parameter.
In optional embodiment, after the reparation of described operating system completes, described identification module is designated described zone bit correctly, and described number of times parameter is made zero.
In optional embodiment, when being also included in each described embedded OS and restarting, described number of times parameter is added to 1.
In optional embodiment, downloading from described upgrade server before described reparation software comprises, comprising: first download index file from described upgrade server; Draw the title of described reparation software package according to the facility information of described index file and embedded device, there is the reparation software package of corresponding title in described upgrade server search.
The present invention also provides a kind of embedded OS with automatic reparation upgrade function, comprise boot, kernel and file system, described kernel and file system have auto-update function, described boot is for automatically repairing the fault of kernel and file system, comprise in boot: judge module, download module and insmoding; Wherein,
Described judge module, for judging whether described embedded OS breaks down;
Described download module, for downloading and repair software package from upgrade server; On described upgrade server, set in advance the reparation software package that is useful on repairing built-in operating system
Described insmoding, for the content of described reparation software package is loaded into embedded OS, completes the fault restoration to described embedded OS.
Optional scheme is, embedded OS is also provided with zone bit, described judge module judges by reading described zone bit whether described system breaks down, and in described boot, be also provided with identification module, described identification module, for after described fault restoration, is designated described zone bit correctly.
Optional scheme is, described embedded OS is also provided with number of times parameter and is preset with number of times parameter threshold, described identification module is also in the time that each startup enters described kernel and file system, described number of times parameter is added to 1, and also for described insmod the content of described reparation software package is loaded into described embedded OS after, described number of times parameter is made zero.
Therefore, described embedded OS provided by the invention and the method for automatically repairing upgrade function thereof, can be in kernel and file system destroyed in the situation that, by the boot of described embedded OS, on predetermined server, download and repair software package and complete the reparation to embedded OS, kernel and file system are automatically upgraded after being repaired.Whole reparation escalation process is automatically to be carried out by operating system, without manual activation; Meanwhile, owing on the server beyond the embedded device current, reparation software package being set, saved the storage resources of current embedded device.
Brief description of the drawings
Fig. 1 is the module map of the embedded OS of prior art;
Fig. 2 is the module map of the embedded OS of embodiment mono-;
Fig. 3 is the module map of the embedded OS of another embodiment;
Fig. 4 is again the module map of the embedded OS of an embodiment;
Fig. 5 is the process flow diagram that embedded OS is repaired the method for upgrade function automatically;
Fig. 6 is the process flow diagram that another embedded OS is repaired the method for upgrade function automatically;
Fig. 7 downloads the process flow diagram of repairing software package.
Embodiment
Embedded OS of the present invention as shown in Figure 2, is provided with judge module in the boot of embedded OS, and download module, insmods.In each starting of embedded operation system, judge module judge file system and kernel whether destroyed; When judged result is for destroyed, download module is downloaded reparation software package from setting in advance the upgrade server of the reparation software package that is useful on repairing built-in operating system; Afterwards, insmod the content of repairing software package is loaded in embedded OS, complete the fault restoration to embedded OS.
When optional scheme, after each boot completes the fault restoration of embedded OS, the embedded OS renewal of automatically upgrading.
Referring to Fig. 3, for the schematic diagram of the embedded OS of another embodiment, in embedded OS, be provided with flag, and in boot, be also provided with identification module, in the time that embedded system starts, first judge module reads zone bit, if zone bit is designated correctly, judgement system non-fault, starts kernel and file system; If zone bit is designated mistake, the destroyed needs of decision operation system are repaired.Insmod at every turn by repair the content of software package be loaded into embedded system in after, identification module is designated zone bit correctly.
Participating in Fig. 4, is the embedded OS of an embodiment again, is also provided with number of times parameter and predetermined threshold value in this system, and identification module also, in the time that each embedded OS is restarted, adds 1 by number of times parameter; Judge module reads zone bit and number of times parameter to be carried out decision operation system and whether has fault, in the time that zone bit is designated mistake and number of times parameter and is greater than predetermined threshold value, judges that embedded OS need to carry out fault restoration; Insmod the content of repairing software package is loaded in kernel and file system, complete after the fault restoration of embedded OS, identification module makes zero number of times parameter.
The beneficial effect of this embodiment is, in some cases, need to test embedded OS, debugging, even if at this moment its file system or kernel exist fault also not need to repair immediately, be provided with after number of times parameter, user can arrange the threshold value of number of times parameter neatly as required, after system auto-update unsuccessfully reaches default number of times, boot just starts the reparation to system.
Fig. 5, for embedded OS of the present invention is repaired the process flow diagram of the method for upgrade function automatically, in the time of starting of embedded operation system, first boot judges whether system exists fault (step 51); If the fault of existence, boot is downloaded the reparation software package (step 52) for repairing this embedded OS from upgrade server, and wherein upgrade server is used for setting in advance reparation software package; Afterwards, boot is loaded into the content of repairing software package in this embedded OS, completes the reparation (step 53) to system.
Embedded system is in normal operation, can automatically upgrade, and the process of upgrading, because causing, the reasons such as power-off suddenly upgrade unsuccessfully, even destroy file system and kernel, caused embedded system to lose the function of auto-update, in the time that each embedded system is restarted, all first check by boot whether file system and kernel exist fault, and complete the reparation to embedded OS after definite fault.Reparation software package is arranged on upgrade server simultaneously, does not need to take the storage resources of embedded OS preciousness, the whole process of repair system is completed automatically by boot, does not need manual control operation, also saves the cost of safeguarding.
Optionally scheme is, boot judges by reading zone bit whether system exists fault, if zone bit is designated mistake, boot judges system mistake fault.
Optionally scheme is, in boot, the content of repairing software package is loaded into embedded OS, completes after the reparation of system, and embedded OS upgrades automatically.
As shown in Figure 6, whether boot judgement symbol position is designated mistake (step 61) to another improved embodiment; If not, start kernel and the file operation system (step 62) of entering; If so, boot continues to judge whether number of times parameter is greater than predetermined threshold value (step 63); If not, by behind number of times parameter+1, start kernel and the file operation system (step 64) of entering; If boot is downloaded and is repaired software package (step 65) from upgrade server; And the content of repairing software package is loaded into (step 66) in embedded OS; After reparation completes, boot makes zero number of times parameter and zone bit is designated to correctly (step 67).
In above-mentioned all embodiment, zone bit, number of times parameter is all arranged on boot, in the subregion beyond kernel and file system.
Shown in Fig. 7, be that boot is downloaded and repaired the process flow diagram that software comprises from upgrade server, first boot downloads index file (step 71) from upgrade server; Then draw according to the facility information of described index file and embedded device the title (step 72) that needs the reparation software package of downloading; Boot finds the reparation software package with the reparation software package title obtaining in step 72 from upgrade server, and download (step 73).Wherein, described facility information can be the unit type of current embedded device etc.
Optionally scheme is, a default IP address in boot is arranged on the equipment with this IP address repairing software package in advance, and boot is directly repaired software package from this device downloads.
The above embodiment has only expressed several embodiment of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be as the criterion with claims.

Claims (10)

1. embedded OS is repaired a method for upgrade function automatically, it is characterized in that, the method comprising the steps of:
Judge whether described embedded OS exists fault;
If the fault of existence, downloads the reparation software package for repairing described embedded OS from upgrade server; Described upgrade server is used for setting in advance reparation software package;
Be written into the content of described reparation software package in described embedded OS, carry out the reparation of described embedded OS.
2. embedded OS according to claim 1 is repaired the method for upgrade function automatically, it is characterized in that, carries out the reparation to described embedded OS upgrade function by the boot of described embedded OS.
3. embedded OS according to claim 1 is repaired the method for upgrade function automatically, it is characterized in that, describedly judges whether embedded OS exists the step of fault, specifically:
Whether the zone bit that checks described embedded OS is error identification.
4. embedded OS according to claim 1 is repaired the method for upgrade function automatically, it is characterized in that:
Describedly judge that whether embedded OS exists the step of fault, specifically comprises:
A1 checks the zone bit of described embedded OS, enters steps A 2 if described zone bit is error identification;
A2 checks that whether the number of times parameter of described operating system is greater than predetermined threshold value, judges whether to exist fault according to described predetermined threshold value.
5. embedded OS according to claim 1 is repaired the method for upgrade function automatically, it is characterized in that, if there is fault in described embedded OS, download for before repairing the reparation software package step of described embedded OS from upgrade server described, also comprise:
B1 downloads index file from described upgrade server;
B2 draws the title of described reparation software package according to the facility information of described index file and embedded device;
B3 finds the reparation software package with described reparation software package title from described upgrade server.
6. embedded OS according to claim 4 is repaired the method for upgrade function automatically, it is characterized in that, after the content that is written into described reparation software package is in described operating system, also comprise: described zone bit is designated correctly, described number of times parameter is made zero, and described embedded OS carries out auto-update.
7. embedded OS according to claim 6 is repaired the method for upgrade function automatically, it is characterized in that: in the time that each described embedded OS is restarted, number of times parameter is added to 1.
8. one kind has the embedded OS of automatic reparation upgrade function, comprise boot, kernel and file system, described kernel and file system have auto-update function, it is characterized in that: described boot is for automatically repairing the fault of described embedded OS, comprise in boot: judge module, download module and insmoding; Wherein,
Described judge module, for judging whether described embedded OS breaks down;
Described download module, for downloading and repair software package from upgrade server; On described upgrade server, set in advance the reparation software package that is useful on repairing built-in operating system;
Described insmoding, for the content of described reparation software package is written into described embedded OS, completes the fault restoration of described operating system.
9. embedded OS according to claim 8, it is characterized in that: in described embedded OS, be also provided with zone bit, and described boot also comprises identification module, described identification module, for the content of described reparation software package being written into after described embedded OS described insmoding, is designated described zone bit correctly.
10. embedded OS according to claim 9, it is characterized in that, described embedded OS is also provided with number of times parameter and is preset with number of times parameter threshold, described identification module is also in the time that each startup enters described kernel and file system, described number of times parameter is added to 1, and for described insmod the content of described reparation software package is loaded into described embedded OS after, described number of times parameter is made zero.
CN201410166589.2A 2014-04-23 2014-04-23 Automatic repairing and upgrading method of embedded operating system and embedded operating system with automatic repairing and upgrading functions Pending CN103970564A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410166589.2A CN103970564A (en) 2014-04-23 2014-04-23 Automatic repairing and upgrading method of embedded operating system and embedded operating system with automatic repairing and upgrading functions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410166589.2A CN103970564A (en) 2014-04-23 2014-04-23 Automatic repairing and upgrading method of embedded operating system and embedded operating system with automatic repairing and upgrading functions

Publications (1)

Publication Number Publication Date
CN103970564A true CN103970564A (en) 2014-08-06

Family

ID=51240101

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410166589.2A Pending CN103970564A (en) 2014-04-23 2014-04-23 Automatic repairing and upgrading method of embedded operating system and embedded operating system with automatic repairing and upgrading functions

Country Status (1)

Country Link
CN (1) CN103970564A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107168734A (en) * 2017-04-27 2017-09-15 纳瓦电子(上海)有限公司 A kind of embedded system upgrading backup method
CN107608879A (en) * 2017-08-24 2018-01-19 北京珠穆朗玛移动通信有限公司 A kind of fault detection method, device and storage medium
CN108664357A (en) * 2018-05-14 2018-10-16 许继集团有限公司 A kind of embedded device system repair and system based on startup Information Statistics
CN108694051A (en) * 2018-05-18 2018-10-23 深圳市先河系统技术有限公司 Upgrade method, device based on dual system and storage device
CN108958827A (en) * 2017-05-25 2018-12-07 贵州白山云科技有限公司 A kind of method and system of processing routine upgrade failure
CN108958769A (en) * 2018-06-26 2018-12-07 四川斐讯信息技术有限公司 A kind of embedded device software systems restorative procedure and system
CN109254727A (en) * 2018-08-20 2019-01-22 广东九联科技股份有限公司 A kind of self-regeneration method of embedded device
CN112988201A (en) * 2021-04-27 2021-06-18 上海飞斯信息科技有限公司 Program updating method and device and electronic equipment
CN113110955A (en) * 2021-04-15 2021-07-13 山东英信计算机技术有限公司 System disk repair method, storage medium and device
WO2021208564A1 (en) * 2020-04-15 2021-10-21 杭州海康威视数字技术股份有限公司 Device failure repair method and apparatus, electronic device, and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102122258A (en) * 2011-03-22 2011-07-13 四川长虹电器股份有限公司 Method for repairing damaged embedded equipment file system
CN102508734A (en) * 2011-09-30 2012-06-20 Tcl集团股份有限公司 Operating system recovery method and intelligent equipment
US20130232325A1 (en) * 2012-03-04 2013-09-05 Samsung Electronics Co., Ltd. Electronic device to restore mbr, method thereof, and computer-readable medium
CN103605536A (en) * 2013-11-06 2014-02-26 华为技术有限公司 Starting method and starting device of embedded operating system and baseboard management controller

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102122258A (en) * 2011-03-22 2011-07-13 四川长虹电器股份有限公司 Method for repairing damaged embedded equipment file system
CN102508734A (en) * 2011-09-30 2012-06-20 Tcl集团股份有限公司 Operating system recovery method and intelligent equipment
US20130232325A1 (en) * 2012-03-04 2013-09-05 Samsung Electronics Co., Ltd. Electronic device to restore mbr, method thereof, and computer-readable medium
CN103605536A (en) * 2013-11-06 2014-02-26 华为技术有限公司 Starting method and starting device of embedded operating system and baseboard management controller

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107168734A (en) * 2017-04-27 2017-09-15 纳瓦电子(上海)有限公司 A kind of embedded system upgrading backup method
CN108958827A (en) * 2017-05-25 2018-12-07 贵州白山云科技有限公司 A kind of method and system of processing routine upgrade failure
CN108958827B (en) * 2017-05-25 2021-11-02 贵州白山云科技股份有限公司 Method and system for processing program upgrading fault
CN107608879A (en) * 2017-08-24 2018-01-19 北京珠穆朗玛移动通信有限公司 A kind of fault detection method, device and storage medium
CN108664357B (en) * 2018-05-14 2021-07-13 许继集团有限公司 Embedded equipment system repairing method and system based on starting information statistics
CN108664357A (en) * 2018-05-14 2018-10-16 许继集团有限公司 A kind of embedded device system repair and system based on startup Information Statistics
CN108694051A (en) * 2018-05-18 2018-10-23 深圳市先河系统技术有限公司 Upgrade method, device based on dual system and storage device
CN108958769A (en) * 2018-06-26 2018-12-07 四川斐讯信息技术有限公司 A kind of embedded device software systems restorative procedure and system
CN109254727A (en) * 2018-08-20 2019-01-22 广东九联科技股份有限公司 A kind of self-regeneration method of embedded device
WO2021208564A1 (en) * 2020-04-15 2021-10-21 杭州海康威视数字技术股份有限公司 Device failure repair method and apparatus, electronic device, and storage medium
CN113542318A (en) * 2020-04-15 2021-10-22 杭州海康威视数字技术股份有限公司 Equipment fault repairing method
CN113110955A (en) * 2021-04-15 2021-07-13 山东英信计算机技术有限公司 System disk repair method, storage medium and device
CN113110955B (en) * 2021-04-15 2022-12-27 山东英信计算机技术有限公司 System disk repair method, storage medium and device
CN112988201A (en) * 2021-04-27 2021-06-18 上海飞斯信息科技有限公司 Program updating method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN103970564A (en) Automatic repairing and upgrading method of embedded operating system and embedded operating system with automatic repairing and upgrading functions
US8423991B2 (en) Embedded network device and firmware upgrading method
US8751783B2 (en) Booting computing devices with EFI aware operating systems
US8468389B2 (en) Firmware recovery system and method of baseboard management controller of computing device
US9471435B2 (en) Information processing device, information processing method, and computer program
CN105094927B (en) A kind of device firmware upgrade method and apparatus
US9703635B2 (en) Method, computer program, and computer for restoring set of variables
US20100180108A1 (en) Electronic device and method for secure operating system update in embedded system
CN101719072A (en) Embedded type terminal equipment software upgrading method and upgrading device
CN103455354A (en) Method and equipment for preventing hardware update from failing
CN103150231A (en) Computer booting method and computer system
CN105760200A (en) Terminal device and system updating method thereof
CN106775610B (en) Electronic equipment starting method and electronic equipment
CN102799499B (en) Method and vehicle-mounted Android equipment that vehicle-mounted Android device systems recovers
US20160335071A1 (en) System firmware configuration data
CN109101247B (en) Method and device for installing driver and server
US20090271660A1 (en) Motherboard, a method for recovering the bios thereof and a method for booting a computer
CN110647333A (en) Firmware upgrading method and equipment configured to upgrade firmware therein
CN102262574A (en) Boot protecting method and device of operating system
CN112612524A (en) Method, device and equipment for starting Linux system and storage medium
CN106775674B (en) Equipment based on universal boot loader and starting method thereof
CN104281479A (en) Firmware upgrading method and device
CN108345464A (en) A kind of the startup method and Android vehicle device of Android system
CN111767172A (en) Self-repairing method for set top box based on watchdog and bootloader
CN103514014A (en) Method for designing boot system of embedded terminal equipment

Legal Events

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

Application publication date: 20140806

RJ01 Rejection of invention patent application after publication