CN106250262A - A kind of based on double-mirror prevent SD from using during the method surprisingly distorted of flash - Google Patents

A kind of based on double-mirror prevent SD from using during the method surprisingly distorted of flash Download PDF

Info

Publication number
CN106250262A
CN106250262A CN201610648536.3A CN201610648536A CN106250262A CN 106250262 A CN106250262 A CN 106250262A CN 201610648536 A CN201610648536 A CN 201610648536A CN 106250262 A CN106250262 A CN 106250262A
Authority
CN
China
Prior art keywords
mirror
subregion
parameter region
flash
verifying
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
CN201610648536.3A
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.)
SHENZHEN FENGLIAN TECHNOLOGY Co Ltd
Original Assignee
SHENZHEN FENGLIAN 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 SHENZHEN FENGLIAN TECHNOLOGY Co Ltd filed Critical SHENZHEN FENGLIAN TECHNOLOGY Co Ltd
Priority to CN201610648536.3A priority Critical patent/CN106250262A/en
Publication of CN106250262A publication Critical patent/CN106250262A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1008Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
    • G06F11/1068Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices in sector programmable memories, e.g. flash disk

Abstract

The invention discloses a kind of based on double-mirror prevent SD from using during the method surprisingly distorted of flash, bootloader subregion is included in described flash, first parameter region of mirror configuration and the second parameter region, and the first system subregion of mirror configuration and second system subregion, wherein, first parameter region correspondence the first system subregion constitutes the first mirror-image system, and the second parameter region correspondence second system subregion constitutes the second mirror-image system;First mirror-image system start time to it in data verify, if verifying successfully, the most normally starting system, if verifying unsuccessfully, then changing the second mirror-image system and starting.The present invention is ingenious utilizes double-mirror system to be tampered problem to what the flash unstable properties solving SD caused, as long as the data in bootloader subregion are normal, even if data are surprisingly distorted in parameter region or system partitioning, system can also be started by the reading of another parameter region or system partitioning, not interfere with the normal use of SD equipment.

Description

A kind of based on double-mirror prevent SD from using during flash surprisingly distorted Method
Technical field
The present invention relates to technical field of intelligent equipment, specifically, relate to a kind of based on double-mirror prevent SD from using During the method surprisingly distorted of flash.
Background technology
The most a lot of companies attempt smart machine (SD, Smart Device) field the most one after another, and SD functions of the equipments are increasingly Many, hardware integration degree is more and more higher.But it is because some cost control or design is the most perfect, and some are difficult to The reason avoided (as having a power failure suddenly) result in flash(flash memory during SD uses) upper firmware surprisingly distorted, SD equipment without Method normally works.
SD in use, due to reasons such as the hardware device unexpected power-off of use aging, normal, result in flash The firmware deposited surprisingly is distorted, and makes SD normally to use.Shown in Fig. 1, it is conventional flash layout, concrete SD equipment Manufacturer may be slightly different.First subregion must be Bootloader subregion, guides system, simultaneity factor mirror As subregion the most necessarily has, it is achieved the function that equipment is main.Depending on the demand according to each equipment of other regions.
Due to some cause specific (such as unexpected power-off), the image file in flash is tampered, and causes SD normally to open Dynamic.Run into this situation user to select goods return and replacement or certainly accept one's bad luck.The situation that Flash is surprisingly distorted causes goods return and replacement The most universal in SD device fabrication company.If able to effectively reduce the generation that flash is surprisingly distorted, can effectively reduce The loss of company.From source, reduce flash surprisingly distorted, the effort of Ge great flash manufacturer go correct, but but Cannot avoid.
Summary of the invention
For above-mentioned the deficiencies in the prior art, the present invention provide a kind of based on double-mirror prevent SD use during The method that flash is surprisingly distorted.
To achieve these goals, the technical solution used in the present invention is as follows:
A kind of based on double-mirror prevent SD from using during the method surprisingly distorted of flash, include in described flash Bootloader subregion, the first parameter region of mirror configuration and the second parameter region, and the first system subregion of mirror configuration and Second system subregion, wherein, the first parameter region correspondence the first system subregion constitutes the first mirror-image system, the second parameter region correspondence Two system subregion constitutes the second mirror-image system;The method comprises the steps:
(S1) SD device power, by the bootloader bootstrap in bootloader subregion, meanwhile, configures the first parameter region It is acquiescence startup system with the first system subregion;
(S2) in reading the first parameter region and the first system subregion, data carry out system start-up;
(S3) when system start-up, respectively the data in the first parameter region and the first system subregion are verified, and deposit in advance The original checksums value of storage compares, if verifying successfully, the most normally starting system, if verifying unsuccessfully, then carrying out next step;
(S4) in reading the second parameter region and second system subregion, data carry out system start-up;
(S5) when system start-up, respectively the data in the second parameter region and second system subregion are verified, and deposit in advance The original checksums value of storage compares, if verifying successfully, the most normally starting system, if verifying unsuccessfully, then entering the urgent of setting Upgrade mode.
Further, after system normally starts, set, every one, the mirror-image system that time upgrading is currently used.
Further, after system normally starts, to whether verifying before starting unsuccessfully detect, if there is verification Failure, then repaired verifying failed mirror-image system by currently used mirror-image system.
Specifically, the described concrete side failed mirror-image system of verification repaired by currently used mirror-image system Method is the content of currently used mirror-image system to be replicated and covered the content of the failed mirror-image system of described verification.
Preferably, carrying out described in verifying used check value is MD5 code.
Compared with prior art, the method have the advantages that
(1) present invention is ingenious utilizes double-mirror system to be tampered problem, effectively to what the flash unstable properties solving SD caused Improve SD equipment in use because having a power failure, flash parameter is erasable the most frequent etc. cause being tampered and cannot start Situation, as long as the data in bootloader subregion are normal, even if data are surprisingly distorted, also in parameter region or system partitioning System can be started by the reading of another parameter region or system partitioning, not interfere with the normal use of SD equipment, and this The ingenious novelty of inventive concept, it is easy to accomplish, application is good, and reliability is high, is with a wide range of applications, and is suitable for popularization and application.
Accompanying drawing explanation
Fig. 1 is the zoning's schematic diagram in prior art in flash.
Fig. 2 is the schematic flow sheet of the present invention.
Fig. 3 is the flash subarea schematic layout pattern in the present invention.
Detailed description of the invention
The invention will be further described with embodiment below in conjunction with the accompanying drawings, and embodiments of the present invention include but not limited to The following example.
Embodiment
As shown in Figure 2 to Figure 3, the method that during based on double-mirror should preventing SD from using, flash is surprisingly distorted, institute Bootloader subregion is included, the first parameter region of mirror configuration and the second parameter region, and the of mirror configuration in stating flash One system partitioning and second system subregion, wherein, the first parameter region correspondence the first system subregion constitutes the first mirror-image system, and second Parameter region correspondence second system subregion constitutes the second mirror-image system;Typical case's application of the technical program be frequently using, function In less SD equipment, this kind of SD equipment, due to a large amount of erasable parameter regions, easily causes bit position in flash when system power failure Redirect, cause flash to be tampered.Think that factor also easily causes firmware in flash and damages, such as SD device systems profit more simultaneously Upgrading with wireless signal, due to jitter, update time is long, causes the flash that user dislikes and power-off causes to wipe Writing half causes equipment to use.
The method comprises the steps:
(S1) SD device power, by the bootloader bootstrap in bootloader subregion, meanwhile, configures the first parameter region It is acquiescence startup system with the first system subregion;
(S2) in reading the first parameter region and the first system subregion, data carry out system start-up;
(S3) when system start-up, respectively the data in the first parameter region and the first system subregion are verified, and deposit in advance The original checksums value of storage compares, if verifying successfully, the most normally starting system, if verifying unsuccessfully, then carrying out next step;
(S4) in reading the second parameter region and second system subregion, data carry out system start-up;
(S5) when system start-up, respectively the data in the second parameter region and second system subregion are verified, and deposit in advance The original checksums value of storage compares, if verifying successfully, the most normally starting system, if verifying unsuccessfully, then entering the urgent of setting Upgrade mode.In emergency upgrade pattern, by the form being externally introduced data, the system data damaged can be repaired.
Further, after system normally starts, set, every one, the mirror-image system that time upgrading is currently used.
Further, after system normally starts, to whether verifying before starting unsuccessfully detect, if there is verification Failure, then repaired verifying failed mirror-image system by currently used mirror-image system.
Specifically, the described concrete side failed mirror-image system of verification repaired by currently used mirror-image system Method is the content of currently used mirror-image system to be replicated and covered the content of the failed mirror-image system of described verification.
Preferably, carrying out described in verifying used check value is MD5 code.
The problem that can be solved the various system data errors of individual system by this programme, the most in actual applications, After a mirror-image system upgrading, SD equipment just saves the system of two versions, if user is to the system after upgrading not Satisfied, it is also possible to return back in the oldest version use by corresponding means, be very easy to Consumer's Experience.
Above-described embodiment is only the preferred embodiments of the present invention, not limiting the scope of the invention, as long as using The design principle of the present invention, and carry out non-creativeness work on this basis and the change made, all should belong to the present invention's Within protection domain.

Claims (5)

1. one kind based on double-mirror prevent SD from using during the method surprisingly distorted of flash, it is characterised in that described Bootloader subregion is included, the first parameter region of mirror configuration and the second parameter region, and the first of mirror configuration in flash System partitioning and second system subregion, wherein, the first parameter region correspondence the first system subregion constitutes the first mirror-image system, the second ginseng Number district correspondence second system subregion constitutes the second mirror-image system;The method comprises the steps:
(S1) SD device power, by the bootloader bootstrap in bootloader subregion, meanwhile, configures the first parameter region It is acquiescence startup system with the first system subregion;
(S2) in reading the first parameter region and the first system subregion, data carry out system start-up;
(S3) when system start-up, respectively the data in the first parameter region and the first system subregion are verified, and deposit in advance The original checksums value of storage compares, if verifying successfully, the most normally starting system, if verifying unsuccessfully, then carrying out next step;
(S4) in reading the second parameter region and second system subregion, data carry out system start-up;
(S5) when system start-up, respectively the data in the second parameter region and second system subregion are verified, and deposit in advance The original checksums value of storage compares, if verifying successfully, the most normally starting system, if verifying unsuccessfully, then entering the urgent of setting Upgrade mode.
The most according to claim 1 a kind of based on double-mirror prevent SD from using during the side surprisingly distorted of flash Method, it is characterised in that after system normally starts, sets, every one, the mirror-image system that time upgrading is currently used.
The most according to claim 2 a kind of based on double-mirror prevent SD from using during the side surprisingly distorted of flash Whether method, it is characterised in that after system normally starts, to verifying before starting unsuccessfully detecting, verifying unsuccessfully if existing, Then repaired verifying failed mirror-image system by currently used mirror-image system.
The most according to claim 3 a kind of based on double-mirror prevent SD from using during the side surprisingly distorted of flash Method, it is characterised in that the described concrete side failed mirror-image system of verification repaired by currently used mirror-image system Method is the content of currently used mirror-image system to be replicated and covered the content of the failed mirror-image system of described verification.
The most according to claim 4 a kind of based on double-mirror prevent SD from using during the side surprisingly distorted of flash Method, it is characterised in that described in carry out verifying used check value be MD5 code.
CN201610648536.3A 2016-08-10 2016-08-10 A kind of based on double-mirror prevent SD from using during the method surprisingly distorted of flash Pending CN106250262A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610648536.3A CN106250262A (en) 2016-08-10 2016-08-10 A kind of based on double-mirror prevent SD from using during the method surprisingly distorted of flash

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610648536.3A CN106250262A (en) 2016-08-10 2016-08-10 A kind of based on double-mirror prevent SD from using during the method surprisingly distorted of flash

Publications (1)

Publication Number Publication Date
CN106250262A true CN106250262A (en) 2016-12-21

Family

ID=58078105

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610648536.3A Pending CN106250262A (en) 2016-08-10 2016-08-10 A kind of based on double-mirror prevent SD from using during the method surprisingly distorted of flash

Country Status (1)

Country Link
CN (1) CN106250262A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112631626A (en) * 2020-12-02 2021-04-09 广东中兴新支点技术有限公司 System upgrading method and device based on dual systems and storage medium
CN114138343A (en) * 2020-09-04 2022-03-04 青岛海信移动通信技术股份有限公司 Terminal and terminal starting method
CN115328563A (en) * 2022-10-09 2022-11-11 荣耀终端有限公司 System starting method and electronic equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090172252A1 (en) * 2007-12-28 2009-07-02 Andrew Tomlin Memory device and method for performing a write-abort-safe firmware update
CN101763279A (en) * 2010-01-15 2010-06-30 上海维宏电子科技有限公司 BootLoader architectural design method
CN102289395A (en) * 2011-07-14 2011-12-21 深圳市共进电子有限公司 Method for using double-code mirror image operation on embedded equipment
CN102289397A (en) * 2011-09-13 2011-12-21 全星科技(珠海)有限公司 Method and device for automatically restoring embedded system of set top box
CN102707980A (en) * 2012-05-29 2012-10-03 深圳市共进电子股份有限公司 Embedded product customization method based on MTD partition
CN103455750A (en) * 2013-08-26 2013-12-18 北京视博数字电视科技有限公司 High-security verification method and high-security verification system for embedded devices
CN103514013A (en) * 2013-09-11 2014-01-15 深圳市共进电子股份有限公司 Gateway product FLASH configuration loss processing method
CN104035806A (en) * 2014-06-30 2014-09-10 普联技术有限公司 System start-up method and device based on multiple mirror images
CN105279042A (en) * 2014-07-15 2016-01-27 华耀(中国)科技有限公司 Redundant backup system and method for BSD system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090172252A1 (en) * 2007-12-28 2009-07-02 Andrew Tomlin Memory device and method for performing a write-abort-safe firmware update
CN101763279A (en) * 2010-01-15 2010-06-30 上海维宏电子科技有限公司 BootLoader architectural design method
CN102289395A (en) * 2011-07-14 2011-12-21 深圳市共进电子有限公司 Method for using double-code mirror image operation on embedded equipment
CN102289397A (en) * 2011-09-13 2011-12-21 全星科技(珠海)有限公司 Method and device for automatically restoring embedded system of set top box
CN102707980A (en) * 2012-05-29 2012-10-03 深圳市共进电子股份有限公司 Embedded product customization method based on MTD partition
CN103455750A (en) * 2013-08-26 2013-12-18 北京视博数字电视科技有限公司 High-security verification method and high-security verification system for embedded devices
CN103514013A (en) * 2013-09-11 2014-01-15 深圳市共进电子股份有限公司 Gateway product FLASH configuration loss processing method
CN104035806A (en) * 2014-06-30 2014-09-10 普联技术有限公司 System start-up method and device based on multiple mirror images
CN105279042A (en) * 2014-07-15 2016-01-27 华耀(中国)科技有限公司 Redundant backup system and method for BSD system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114138343A (en) * 2020-09-04 2022-03-04 青岛海信移动通信技术股份有限公司 Terminal and terminal starting method
CN112631626A (en) * 2020-12-02 2021-04-09 广东中兴新支点技术有限公司 System upgrading method and device based on dual systems and storage medium
CN112631626B (en) * 2020-12-02 2023-11-14 广东中兴新支点技术有限公司 System upgrading method and device based on double systems and storage medium
CN115328563A (en) * 2022-10-09 2022-11-11 荣耀终端有限公司 System starting method and electronic equipment
CN115328563B (en) * 2022-10-09 2023-04-14 荣耀终端有限公司 System starting method and electronic equipment

Similar Documents

Publication Publication Date Title
CN101281469B (en) Embedded type system and start-up load application method
CN102298545B (en) System startup boot processing method and device
CN105808270A (en) Firmware variable updating method
CN105760200A (en) Terminal device and system updating method thereof
CN103473067A (en) Embedded Linux partitioning and data recovery method, embedded Linux partitioning and data recovery system and system development method
CN102681871A (en) Firmware upgrading system based on communication interfaces
CN106250262A (en) A kind of based on double-mirror prevent SD from using during the method surprisingly distorted of flash
CN110489259B (en) Memory fault detection method and equipment
CN103428333A (en) Mobile terminal, server and error restoration method
CN106897166B (en) Mobile terminal and repairing method thereof
CN106775610A (en) A kind of electronic equipment starts method and a kind of electronic equipment
CN104049999A (en) Automatic storage device repair system based on network and method thereof
CN102902563A (en) Linux operating system and method for mounting file system in starting process of Linux operating system
CN100395713C (en) Method of automatic repairing basic input output system element and module
CN105677409B (en) A kind of method for upgrading system and device
CN106775674A (en) A kind of equipment and its startup method based on universal guiding loading procedure
CN108170456B (en) Firmware upgrading method and device for electronic equipment
CN111104173A (en) Protection design method of bootstrap program
CN102479124A (en) Test method
CN106909382B (en) Method and device for outputting different types of system starting information
CN108804257A (en) SOT state of termination detection method, device, terminal and storage medium
CN102346692A (en) Verification method of IPTV (Internet Protocol Television) updating files
CN106201767A (en) A kind of based on ECC check prevent SD from using during the method surprisingly distorted of flash
CN105739928A (en) Multi-region storage based parameter storage method for distribution network terminal device
CN106325912B (en) The starting method and device of embedded OS

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20161221