WO2021103745A1 - Method for protectively desiging boot program - Google Patents
Method for protectively desiging boot program Download PDFInfo
- Publication number
- WO2021103745A1 WO2021103745A1 PCT/CN2020/114999 CN2020114999W WO2021103745A1 WO 2021103745 A1 WO2021103745 A1 WO 2021103745A1 CN 2020114999 W CN2020114999 W CN 2020114999W WO 2021103745 A1 WO2021103745 A1 WO 2021103745A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- partition
- boot program
- bootloader
- boot1
- boot0
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
- G06F11/1433—Saving, restoring, recovering or retrying at system level during software upgrading
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
Definitions
- the invention relates to the application field of an embedded system, in particular to a protection design method of a boot program.
- the software system of the current smart terminal equipment often needs to be upgraded with the use cycle.
- the upgrading software can effectively solve the various problems of the software of the smart terminal equipment after the manufacturer leaves the factory, including the boot program part. Bugs require the use of Ethernet to upgrade the end-user’s machine; on the other hand, in order to improve the market competitiveness of their products, manufacturers will launch new software products every once in a while, and some of them may need to modify the boot program. Corresponding upgrades are also required at this time.
- the industry in order to ensure the integrity of the upgrade, the industry usually adopts this approach, that is, first erase the Bootloader partition (the partition that stores the boot program), and then upgrade other partitions, such as the Boot partition (kernel partition) , System partition (file system partition), Data partition (user data partition), etc. After the upgrade of other partitions is completed, upgrade the bootloader of the Bootloader partition.
- the advantage of this is that it can ensure the integrity of the upgrade, but if the upgrade process loses power, the system will not start. However, for the end user, if the power is lost during the upgrade process, the boot program in the Bootloader partition will be empty or the boot program will be destroyed, causing the smart device to fail to respond and cause failure. If you want to perform a Recovery (recovery), the operation will be very troublesome. .
- the present invention proposes a boot program protection design method, which can effectively prevent the intelligent terminal device from powering down during the upgrade process, resulting in the boot program being empty or the boot program in the Bootloader partition being damaged, causing the system to fail to start. The problem.
- the present invention proposes a boot program protection design method, including:
- a bootloader is stored in the Bootloader partition of the logical partition of the storage device.
- Boot0 and Boot1 of the storage device the same boot program as the bootloader in the Bootloader partition is also stored, and the bootloader is set to be backed up in the partition.
- the order is: Bootloader first, Boot0 second, Boot1 last;
- Boot1 partition When starting the data in Boot1 partition, first check its integrity, if it is complete, the boot program will be loaded from Boot1 partition.
- Boot partition, System partition, and Data partition are upgraded, first wipe out the Bootloader partition and then upgrade the Bootloader to the latest boot program, then erase the Boot0 partition and then upgrade the latest backup boot program to Boot0, and finally erase the Boot1 partition and then boot1 Upgrade the latest backup boot program.
- the boot program protection design method proposed by the present invention can effectively prevent the intelligent terminal device from powering down during the upgrade process, which causes the boot program to be empty or the boot program in the Bootloader partition is destroyed.
- the boot program in the Bootloaer partition is wrong or the partition is empty, the system can still boot normally from the Boot0 or Boot1 partition; it can ensure that if there is a power failure during the upgrade process, at least one partition has boot program data, so Make the system not be unable to respond because of this, solve the problem that the boot program cannot start.
- Fig. 1 is a schematic flow diagram of the protection design method of the boot program of the present invention.
- the present invention proposes a boot program protection design method, including:
- a bootloader is stored in the Bootloader partition of the logical partition of the storage device.
- Boot0 and Boot1 of the storage device the same boot program as the bootloader in the Bootloader partition is also stored, and the bootloader is set to be backed up in the partition.
- the order is: Bootloader first, Boot0 second, Boot1 last;
- Boot1 partition When starting the data in Boot1 partition, first check its integrity. If it is complete, the boot program is loaded from Boot1 partition; if it is incomplete, it means the startup failed.
- the present invention introduces the storage backup mechanism of the boot program as described above.
- eMMC embedded Multi Media Card
- it can be divided into two partitions: logical partition and inherent partition.
- the size of each partition is about 2M or 4M, and users generally do not operate it.
- a bootloader can be stored in the Bootloader partition of the logical partition of the storage device, and the inherent partition Boot0 and Boot1 of the storage device can also be stored separately with the Bootloader partition.
- the boot program in the boot program is the same as the boot program, and the backup startup sequence of the boot program in the partition is set as: first is Bootloader, second is Boot0, and finally is Boot1.
- the Bootloader partition is not erased;
- Boot partition, System partition, and Data partition are upgraded, first wipe out the Bootloader partition and then upgrade the Bootloader to the latest boot program, then erase the Boot0 partition and then upgrade the latest backup boot program to Boot0, and finally erase the Boot1 partition and then boot1 Upgrade the latest backup boot program.
- the Bootloader partition (the partition storing the boot program) is erased first, and then other partitions, such as the Boot partition (kernel partition), System partition (file system), are erased. Partition), Data partition (user data partition), after the other partitions are upgraded, then upgrade the bootloader of the Bootloader partition. If the power is lost before upgrading Bootloader, Boot0, Boot1, the three partitions will be empty. At this time, the system cannot be started without a boot program.
- the boot program protection design method proposed by the present invention can effectively prevent the intelligent terminal device from powering down during the upgrade process, which causes the boot program to be empty or the boot program in the Bootloader partition is destroyed.
- the boot program in the Bootloaer partition is wrong or the partition is empty, the system can still boot normally from the Boot0 or Boot1 partition; it can ensure that if there is a power failure during the upgrade process, at least one partition has boot program data, so Make the system not be unable to respond because of this, solve the problem that the boot program cannot start.
- the present invention can also have many other embodiments. Based on this embodiment, other embodiments obtained by a person of ordinary skill in the art without any creative work are within the protection scope of the present invention.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Quality & Reliability (AREA)
- Stored Programmes (AREA)
Abstract
Description
Claims (2)
- 一种引导程序的保护设计方法,其特征在于,包括:A boot program protection design method, which is characterized in that it includes:在存储器件逻辑分区的Bootloader分区存储有一份引导程序,在存储器件的固有分区Boot0和Boot1中也分别存储与Bootloader分区中的引导程序一样的引导程序,并且设定引导程序在分区中的备份启动顺序为:首先是Bootloader,其次是Boot0,最后是Boot1;A bootloader is stored in the Bootloader partition of the logical partition of the storage device. In the inherent partition Boot0 and Boot1 of the storage device, the same boot program as the bootloader in the Bootloader partition is also stored, and the bootloader is set to be backed up in the partition. The order is: Bootloader first, Boot0 second, Boot1 last;在启动Bootloader分区的数据的时候,先检测其完整性,如果完整,则引导程序从Bootloader分区中装载;如果不完整,则迅速启动备份方案中的Boot0分区数据;When starting the data of the Bootloader partition, first check its integrity, if it is complete, the boot program is loaded from the Bootloader partition; if it is incomplete, start the Boot0 partition data in the backup scheme quickly;在启动Boot0分区的数据的时候,先检测其完整性,如果完整,则引导程序从Boot0分区中装载,如果不完整,则迅速启动备份方案中的Boot1分区数据;When starting the data in the Boot0 partition, first check its integrity. If it is complete, the boot program is loaded from the Boot0 partition. If it is incomplete, the Boot1 partition data in the backup scheme will be quickly started;在启动在启动Boot1分区的数据的时候,先检测其完整性,如果完整,则引导程序从Boot1分区中装载。When starting the data in Boot1 partition, first check its integrity, if it is complete, the boot program will be loaded from Boot1 partition.
- 根据权利要求1所述的引导程序的保护设计方法,其特征在于,包括:The boot program protection design method according to claim 1, characterized in that it comprises:在线升级的过程中,在完成升级Boot分区、System分区、Data分区之前,先不对Bootloader分区进行擦除;During the online upgrade process, do not erase the Bootloader partition before completing the upgrade of the Boot partition, System partition, and Data partition;待Boot分区、System分区、Data分区升级完毕后,先擦出Bootloader分区然后对Bootloader升级最新的引导程序,接着擦除Boot0分区然后对Boot0升级最新的备份引导程序,最后擦除Boot1分区然后对Boot1升级最新的备份引导程序。After the Boot partition, System partition, and Data partition are upgraded, first wipe out the Bootloader partition and then upgrade the Bootloader to the latest boot program, then erase the Boot0 partition and then upgrade the latest backup boot program to Boot0, and finally erase the Boot1 partition and then boot1 Upgrade the latest backup boot program.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911166979.9 | 2019-11-25 | ||
CN201911166979.9A CN111104173A (en) | 2019-11-25 | 2019-11-25 | Protection design method of bootstrap program |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021103745A1 true WO2021103745A1 (en) | 2021-06-03 |
Family
ID=70421255
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/114999 WO2021103745A1 (en) | 2019-11-25 | 2020-09-14 | Method for protectively desiging boot program |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111104173A (en) |
WO (1) | WO2021103745A1 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111104173A (en) * | 2019-11-25 | 2020-05-05 | 晶晨半导体(深圳)有限公司 | Protection design method of bootstrap program |
CN112631625B (en) * | 2020-11-20 | 2022-10-21 | 展讯通信(上海)有限公司 | System upgrading method and device for embedded equipment and embedded equipment |
CN113741944A (en) * | 2021-08-16 | 2021-12-03 | 南京苏美达智能技术有限公司 | Machine program system with upgrading function, upgrading method and application |
CN115357908B (en) * | 2022-10-19 | 2022-12-23 | 中国人民解放军军事科学院系统工程研究院 | Network equipment kernel credibility measurement and automatic restoration method |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102169442A (en) * | 2011-03-24 | 2011-08-31 | 杭州华三通信技术有限公司 | Method, equipment, device and system for performing system boot by using USB (universal serial bus) device |
CN102945176A (en) * | 2012-11-09 | 2013-02-27 | 青岛海信移动通信技术股份有限公司 | Terminal equipment booting and updating method and equipment |
CN103699421A (en) * | 2014-01-08 | 2014-04-02 | 金三立视频科技(深圳)有限公司 | Method and device for upgrading embedded device system |
CN107967141A (en) * | 2017-11-27 | 2018-04-27 | 北京小米移动软件有限公司 | Operating system update method, apparatus and terminal |
CN111104173A (en) * | 2019-11-25 | 2020-05-05 | 晶晨半导体(深圳)有限公司 | Protection design method of bootstrap program |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110210210A (en) * | 2019-05-27 | 2019-09-06 | 北京中电华大电子设计有限责任公司 | A kind of the logical security design method and physical security design structure of terminal device |
-
2019
- 2019-11-25 CN CN201911166979.9A patent/CN111104173A/en active Pending
-
2020
- 2020-09-14 WO PCT/CN2020/114999 patent/WO2021103745A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102169442A (en) * | 2011-03-24 | 2011-08-31 | 杭州华三通信技术有限公司 | Method, equipment, device and system for performing system boot by using USB (universal serial bus) device |
CN102945176A (en) * | 2012-11-09 | 2013-02-27 | 青岛海信移动通信技术股份有限公司 | Terminal equipment booting and updating method and equipment |
CN103699421A (en) * | 2014-01-08 | 2014-04-02 | 金三立视频科技(深圳)有限公司 | Method and device for upgrading embedded device system |
CN107967141A (en) * | 2017-11-27 | 2018-04-27 | 北京小米移动软件有限公司 | Operating system update method, apparatus and terminal |
CN111104173A (en) * | 2019-11-25 | 2020-05-05 | 晶晨半导体(深圳)有限公司 | Protection design method of bootstrap program |
Also Published As
Publication number | Publication date |
---|---|
CN111104173A (en) | 2020-05-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021103745A1 (en) | Method for protectively desiging boot program | |
US9164756B2 (en) | Software updating process for an embedded device | |
JP5909264B2 (en) | Secure recovery apparatus and method | |
US8041988B2 (en) | Firmware update for consumer electronic device | |
TWI664574B (en) | Method of patching boot code of read-only memory and system-on-chip | |
TWI515660B (en) | Firmware variable update method | |
JP5575338B2 (en) | Information processing apparatus, information processing method, and computer program | |
US20170039075A1 (en) | Rapid start up method for electronic equipment | |
WO2020062887A1 (en) | Firmware upgrading method and system based on flash micro-controller, and flash micro-controller | |
CN104572206A (en) | Application program self updating and backup recovery method | |
CN105917306B (en) | System and method for configuring system firmware configuration data | |
CN102508686A (en) | Method and system for realizing safe upgrading of system | |
CN111552592A (en) | Double-backup starting method and system | |
CN108345464A (en) | A kind of the startup method and Android vehicle device of Android system | |
CN111143132A (en) | BIOS recovery method, device, equipment and readable storage medium | |
JP2023064689A (en) | Board management controller of computer system and start method | |
WO2016155524A1 (en) | Method and apparatus for realizing safe upgrade of system | |
KR101601751B1 (en) | Ecu of vehicle and boot software re-programming method thereof | |
CN113190256A (en) | Upgrading method, device and equipment | |
WO2023103755A1 (en) | Terminal starting method, electronic device, and computer-readable storage medium | |
CN111078452A (en) | BMC firmware image recovery method and device | |
CN102402447A (en) | Equipment starting method and equipment | |
CN108958769A (en) | A kind of embedded device software systems restorative procedure and system | |
US9529581B2 (en) | Circuit and method for writing program codes of basic input/output system | |
JP2004192329A (en) | Program rewriting method and terminal device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20893399 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20893399 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 230922) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20893399 Country of ref document: EP Kind code of ref document: A1 |