A system startup method and system based on multi-partition technology firmware protection

By adopting a multi-partition technology firmware protection system in smart electronic information products, using backup firmware to temporarily start and restore damaged startup firmware, system startup problems caused by firmware damage are solved, and the robustness and service life of the system are improved.

CN112698985BActive Publication Date: 2024-10-18REACH TECH XIAMEN +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011521569.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-21
Publication Date
2024-10-18
Estimated Expiration
2040-12-21

AI Technical Summary

Technical Problem

In intelligent electronic information products, due to long-term operation of the system or abnormal power on and off, the firmware may be damaged, causing the system to fail to boot or function abnormally. It is difficult to effectively solve this problem with existing technology.

Method used

A firmware protection system based on multi-partition technology is adopted to ensure that the system can be temporarily started when the firmware is damaged by loading startup firmware and backup startup firmware, and uses backup firmware to restore damaged startup firmware, thereby improving the robustness and service life of the system.

Benefits of technology

Effectively ensure the robustness of the system, reduce fault location and repair time, reduce return to factory repair costs, and extend the service life of electronic equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112698985B_ABST
    Figure CN112698985B_ABST
Patent Text Reader

Abstract

The present application provides a system startup method and system based on multi-partition technology firmware protection, wherein the startup method includes: loading a startup firmware, wherein the startup firmware is independently stored in a storage partition; if the loading of the startup firmware is successful, the system startup is completed; if the loading of the startup firmware fails, a backup startup firmware is loaded.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of firmware protection in electronic information products, and in particular relates to a system startup method based on multi-partition technology firmware protection and a system based on multi-partition technology firmware protection. Background Art

[0002] At present, most intelligent electronic information products contain microprocessors and firmware. The firmware runs on the microprocessor to realize various intelligent functions. However, after the system has been running for a long time, due to improper use such as abnormal power on and off, or reliability and inconsistency issues of storage devices, the firmware may be partially damaged, resulting in the system being unable to boot or malfunctioning. Summary of the invention

[0003] Based on this, the present application provides a system startup method based on multi-partition technology firmware protection, including: loading startup firmware; the startup firmware is independently stored in a storage partition; if the loading of the startup firmware is successful, the system startup is completed; if the loading of the startup firmware fails, the backup startup firmware is loaded.

[0004] The present application also provides an electronic device, including a processor and a memory, and a program executable by the processor and stored in the memory. When the program is executed, the processor executes any one of the aforementioned startup methods.

[0005] The present application also provides a storage medium storing a program executable by a processor. When the program is executed, the processor performs any of the aforementioned startup methods.

[0006] The present application also provides a system for firmware protection based on multi-partition technology, including: a startup firmware for starting the system; a backup startup firmware for starting the system instead of the startup firmware when the startup firmware is damaged; and a recovery function firmware for restoring the startup firmware using the backup firmware startup component.

[0007] By using the above-mentioned startup method and system, the system firmware can be modularly decomposed into multiple independent startup firmwares, and backups can be configured for each startup firmware. When the system firmware has an error and is damaged, the backup startup firmware can be used to temporarily start the system instead of the startup firmware. And after the temporary startup, the backup startup firmware can be used to restore the damaged startup firmware. In this way, the robustness of the system can be effectively ensured. The service life of the electronic equipment using this system can be improved. And the cost of returning damaged equipment to the factory for repair can be reduced.

[0008] Since the firmware in the system is decomposed into multiple components in this solution, the fault point of the system can be located relatively accurately, and the system can be repaired according to the fault point. This can reduce the time of system repair and restore the original appearance of the system to the greatest extent.

[0009] At the same time, in this solution, multiple backup partitions can be set, and a boot firmware can be independently stored in at least one backup partition, or a backup boot firmware can be independently stored. This can effectively reduce the possibility of failure of the boot firmware and the backup firmware, and improve the service life of the electronic equipment using this system. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without exceeding the scope of protection required by the present application.

[0011] Figure 1 A schematic flow chart of a system startup method based on multi-partition technology firmware protection according to an embodiment of the present application is shown.

[0012] Figure 2 A flowchart of a system startup method based on multi-partition technology firmware protection according to another embodiment of the present application is shown.

[0013] Figure 3 A schematic diagram of the composition of a system for firmware protection based on multi-partition technology according to another embodiment of the present application is shown.

[0014] Figure 4 Shows Figure 3 A schematic diagram of the memory partitions included in the system shown.

[0015] Figure 5 A block diagram of an electronic device according to an exemplary embodiment is shown. DETAILED DESCRIPTION

[0016] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0017] Figure 1 A schematic flow chart of a system startup method based on multi-partition technology firmware protection according to an embodiment of the present application is shown.

[0018] like Figure 1 As shown, in S110, a boot firmware may be loaded. Optionally, the system to which the present method is applied may include two or more boot firmwares. S110 may include sequentially loading the two or more boot firmwares in a preset order. Optionally, the system to which the present method is applied may include a memory for storing firmware, and the memory may include multiple boot partitions. At least one of the two or more boot firmwares may occupy a storage partition exclusively.

[0019] If the two or more boot firmwares mentioned above are successfully started, S120 can be entered. If any one of the boot firmwares fails to start, S130 can be entered. Optionally, when any one of the boot firmwares fails to start, the boot firmware can be considered damaged, and a bad firmware mark corresponding to the boot firmware can be marked. Optionally, the system applying this method can have multiple bad firmware marks, corresponding to different boot firmwares. Optionally, the storage partition of the system applying this method can include a marked partition. The marked partition can be used to store the bad firmware mark.

[0020] like Figure 1 As shown, in S120, all the boot firmwares are loaded successfully. At this time, the system using this method is normally started and the system will enter a normal working state.

[0021] like Figure 1 As shown, in S130, if any one of the boot firmware fails to start, it can be determined that the boot firmware is damaged. At this time, the backup boot firmware corresponding to the boot firmware can be loaded. And the backup boot firmware can be used to temporarily start the system to which the present method is applied. Optionally, the system can include one backup boot firmware, or two or more backup boot firmwares. Optionally, at least one backup boot firmware can be a backup of the aforementioned at least one boot firmware.

[0022] Optionally, after S130, the following may be included: restoring the damaged boot firmware. Optionally, the damaged boot firmware may be restored using the backup boot firmware corresponding to the damaged boot firmware. Optionally, the damaged boot firmware may be restored by replacing the damaged boot firmware with the corresponding backup boot firmware. Optionally, the damaged boot firmware and the corresponding backup boot firmware may each occupy a storage partition exclusively. Optionally, the storage partition where the damaged boot firmware is located may be overwritten with the content of the storage partition where the corresponding backup boot firmware is located, thereby restoring the damaged boot firmware. Optionally, the damaged boot firmware may be located among the multiple boot firmwares included in the system according to the bad firmware mark, and the damaged boot component may be restored after temporary startup. And the corresponding bad firmware mark may be cleared after restoring the damaged boot firmware.

[0023] Optionally, the system to which the method is applied may include recovery function firmware. The recovery function firmware may be used to recover the damaged startup firmware according to the aforementioned steps. Optionally, S130 may include starting the recovery function firmware. Optionally, the storage partition may include a recovery function partition. The recovery function partition may be used to store the recovery function firmware.

[0024] Optionally, after restoring the boot firmware, the steps starting from S110 may be performed to try to boot the system to which the method is applied again.

[0025] Optionally, the boot firmware may include at least one of: a master boot program, an application boot program, a system security firmware, a kernel firmware, a communication firmware, and a system firmware. Optionally, the system may include multiple storage partitions. Optionally, the storage partitions of the system may include at least one of a master boot program partition, a partition table, a communication parameter partition, a system security partition, an application boot program partition, a kernel partition, a communication system partition, and a system partition. Among them, the master boot program partition may be used to store the master boot program. The application boot program partition may be used to store the application boot program. The system security partition may store the system security firmware. The kernel partition may be used to store the kernel firmware. The communication system partition may be used to store the communication firmware. The system partition may store the system firmware. The communication parameter partition may be used to store the parameters of the communication firmware.

[0026] Optionally, the backup boot firmware may include: at least one of: application boot program backup firmware, system security backup firmware, kernel backup firmware, communication backup firmware and system backup firmware. Among them, the application boot program backup firmware may be a backup of the application boot program. The system security backup firmware may be a backup of the system security firmware. The kernel backup firmware may be a backup of the kernel firmware. The communication backup firmware may be a backup of the communication firmware. The system backup firmware may be a backup of the system firmware.

[0027] Optionally, the storage partitions included in the system to which the present method is applied may also include: at least one of: a communication parameter backup partition, a system security backup partition, an application boot program backup partition, a kernel backup firmware partition, and a mirror partition. The communication parameter backup partition is used to restore the backup firmware of the communication parameter partition. The system security backup partition stores the system security backup firmware and can be used to restore the system security partition. The application boot program backup partition can be used to store the application boot program backup firmware and can be used to restore the application boot program partition. The kernel backup partition can be used to store the kernel backup firmware and can be used to restore the kernel partition. The mirror partition can store the system backup firmware and can be used to restore the system firmware. Optionally, the mirror partition can also be used to store the communication backup firmware.

[0028] Figure 2A flowchart of a system startup method based on multi-partition technology firmware protection according to another embodiment of the present application is shown.

[0029] like Figure 2 As shown, in S205, the master boot program SBL can be started. The master boot program SBL can be independently stored in the master boot program partition. After the system is powered on, the master boot program SBL can be started first. After the master boot program SBL is successfully started, S210 can be entered.

[0030] like Figure 2 As shown, in S210, the master boot program SBL can be used to detect whether there is a bad firmware mark. The bad firmware mark can be used to mark whether the corresponding startup firmware is damaged. Optionally, there can be multiple bad firmware marks, corresponding to different startup firmware. Optionally, the bad firmware mark can be centrally stored in the marked partition MISC. If there is no bad firmware mark, then S215 can be entered to perform subsequent startup steps. If there is a bad firmware mark, then S240 can be entered to perform corresponding bad firmware processing.

[0031] like Figure 2 As shown, the system security firmware TZ can be loaded in S215. Optionally, the system security firmware TZ can be stored independently in the system security partition. If the system security firmware TZ is loaded successfully, you can enter S220 to perform subsequent startup steps. If the system security firmware TZ fails to load, you can enter S240 to perform corresponding bad firmware processing. When the system security firmware TZ fails to load, the system security firmware loading failure mark can be marked in the annotation partition MISC.

[0032] like Figure 2 As shown, in S220, the application boot program Aboot can be loaded by using the main boot program SBL. Optionally, the application boot program Aboot can be stored independently in the application boot program partition. If the application boot program Aboot is loaded successfully, the process can enter S225 to perform the first startup step. If the application boot program Aboot fails to load, the process can enter S245 to perform corresponding bad firmware processing. When the application boot program Aboot fails to load, a loading failure mark of the application boot program Aboot can be marked in the mark partition MISC.

[0033] like Figure 2As shown, the kernel firmware Boot can be loaded by using the application boot program Aboot in S225. Optionally, the kernel firmware Boot can be stored independently in the kernel partition. If the kernel firmware Boot is loaded successfully, S230 can be entered to perform subsequent startup steps. If the kernel firmware Boot fails to load, S250 can be entered to perform corresponding bad firmware processing. When the kernel firmware Boot fails to load, the kernel firmware Boot loading failure mark can be marked in the annotation partition MISC.

[0034] like Figure 2 As shown, the communication firmware Modem can be loaded by using the kernel firmware Boot in S230. Optionally, the communication firmware Modem can be stored independently in the communication system partition. If the communication firmware Modem is loaded successfully, then S235 can be entered to perform subsequent startup steps. If the communication firmware Modem fails to load, then S260 can be entered to perform corresponding bad firmware processing. When the communication firmware Modem fails to load, a communication firmware loading failure mark can be marked in the marking partition MISC.

[0035] like Figure 2 As shown, the system firmware System can be loaded by using the kernel firmware Boot in S235. The system firmware System can be stored independently in the system partition. If the system firmware System is loaded successfully, you can enter S290, indicating that there is no firmware damage and the startup process is successfully completed. If the system firmware System fails to load, you can enter S265 to perform corresponding bad firmware processing. When the system firmware System fails to load, the system firmware loading failure mark can be marked in the annotation partition MISC.

[0036] like Figure 2 As shown, in S265, the system backup firmware can be loaded. The system backup firmware can be the backup boot firmware of the system firmware System. The system firmware System can be stored in the mirror partition. The system backup firmware can be loaded by the kernel firmware Boot. After the system backup firmware is successfully loaded, S280 can be entered.

[0037] like Figure 2 As shown, the system security backup firmware TZBAK can be loaded in 240. The system security backup firmware TZBAK is the backup boot firmware of the system security firmware TZ. The system security backup firmware TZBAK can be loaded by the main boot program SBL. The system security backup firmware TZBAK can be independently stored in the system security backup partition. After the system security backup firmware TZBAK is successfully loaded, S245 can be entered.

[0038] like Figure 2As shown, in S245, the application boot program backup firmware ABootBAK can be loaded. The application boot program backup firmware ABootBAK can be loaded by the main boot program SBL. The application boot program backup firmware ABootBAK can be the backup startup firmware of the application boot program Aboot. The application boot program backup firmware ABootBAK can be stored independently in the application boot program backup partition. After the application boot program backup firmware ABootBAK is loaded successfully, S250 can be entered.

[0039] like Figure 2 As shown, the kernel backup firmware Recovery can be loaded in S250. The kernel backup firmware Recovery can be the backup boot firmware of the kernel firmware Boot. The kernel backup firmware Recovery can be loaded by the application boot program Aboot, or by the application boot program backup firmware ABootBAK. The kernel backup firmware Recovery can be stored independently in the kernel backup partition. After the kernel backup firmware Recovery is loaded successfully, S255 can be entered.

[0040] like Figure 2 As shown, in S255, the communication firmware Modem can be loaded by the kernel backup firmware Recovery. When the communication firmware Modem is loaded, the communication parameters in the communication parameter partition can be loaded at the same time. If the communication firmware Modem is loaded successfully, the process can proceed to S280. If the communication firmware Modem fails to load, the process can proceed to S260. When the communication firmware Modem fails to load, a communication firmware loading failure mark can be marked in the mark partition MISC.

[0041] like Figure 2 As shown, the communication backup firmware can be loaded in S260. The communication backup firmware can be the backup startup firmware of the communication firmware Modem. When the communication backup firmware is loaded, the communication parameter backup in the communication parameter backup partition can be loaded at the same time. The communication backup firmware can be loaded by the kernel firmware Boot, and can also be loaded by the kernel backup firmware Recovery. After the communication backup firmware is loaded successfully, S280 can be entered.

[0042] like Figure 2 As shown, the recovery function firmware can be loaded in S280. The recovery function firmware can be used to recover the damaged boot firmware. Optionally, the recovery function firmware can be stored independently in the recovery function partition. The recovery function firmware can be loaded by the kernel backup firmware Recovery or by the kernel firmware Boot. After the recovery function firmware is loaded successfully, S285 can be entered.

[0043] like Figure 2As shown, in S285, the damaged aforementioned boot firmware can be restored by the recovery function firmware. In S285, the bad firmware mark in the marked partition MISC can be detected, and the damaged boot firmware can be determined according to the bad firmware mark. The damaged boot firmware can be replaced with the backup boot firmware corresponding to the damaged boot firmware. Optionally, the storage partition where the damaged boot firmware is located can be overwritten with the storage partition where the backup boot firmware is located. Optionally, when restoring the communication firmware, the communication parameters can be restored at the same time. Restoring the communication parameters can include overwriting the communication parameter partition with the communication parameter backup partition. Optionally, after restoring the damaged boot firmware, the bad firmware mark in the marked partition MISC can be cleared. After the restoration of the damaged aforementioned boot firmware is completed, S205 can be entered to re-execute the steps starting from S205.

[0044] Figure 3 A schematic diagram of the composition of a system for firmware protection based on multi-partition technology according to another embodiment of the present application is shown.

[0045] like Figure 3 As shown, the system 3000 may include at least one boot firmware, at least one backup boot firmware and a recovery function firmware 33 .

[0046] The boot firmware may be used to boot the system 3000. As shown in the example embodiment, the boot firmware in the system 3000 may include: main boot program firmware 311, system security firmware 312, application boot program firmware 313, kernel firmware 314, communication firmware 315, and system firmware 316. Optionally, the system 3000 may be booted by sequentially loading the main boot program firmware 311, system security firmware 312, application boot program firmware 313, kernel firmware 314, communication firmware 315, and system firmware 316.

[0047] When the boot firmware is damaged, the backup boot firmware can be used to replace the boot firmware to boot the system 3000. As shown in the example embodiment, the backup boot firmware in the system 3000 may include: system security backup firmware 322, application boot program backup firmware 323, kernel backup firmware 324, communication backup firmware 325 and system backup firmware 326. Among them, the system security backup firmware 322 is a backup boot firmware that can be used to replace the system security firmware 312. The application boot program backup firmware 323 is a backup boot firmware that can be used to replace the application boot program firmware 313. The kernel backup firmware 324 is a backup boot firmware that can be used to replace the kernel firmware 314. The communication backup firmware 325 is a backup boot firmware that can be used to replace the communication firmware 315. The system backup firmware 326 is a backup boot firmware that can be used to replace the system firmware 316.

[0048] When the aforementioned boot firmware is damaged, the recovery function firmware 33 can be used to restore the damaged boot firmware using the aforementioned backup boot firmware. The recovery function firmware 33 can replace the damaged boot firmware with its corresponding backup boot firmware, thereby realizing the recovery of the damaged boot firmware. For example: the recovery function firmware 33 can restore the system security firmware 312 using the system security backup firmware 322, restore the application boot firmware 313 using the application boot firmware backup firmware 323, restore the kernel firmware 314 using the kernel backup firmware 324, restore the communication firmware 315 using the communication backup firmware 325, and restore the system firmware 316 using the system backup firmware 326.

[0049] Optionally, the system 3000 may include a memory (not shown). At least one of the boot firmware 311-316, the boot firmware 322-326, and the recovery function firmware 33 may be a program and may be partitioned and stored in the memory. Optionally, the memory may be a non-volatile memory.

[0050] Figure 4 Shows Figure 3 A schematic diagram of the memory partitions included in the system shown.

[0051] like Figure 4 As shown, the storage partitions in the memory included in the system 3000 may include: a main boot program partition 3411, a system security partition 3412, an application boot program partition 3413, a kernel partition 3414, a communication system partition 3415, and a system partition 3416. The above storage partitions may be used to store at least one of the aforementioned startup firmwares, such as: the main boot program firmware 311, the system security firmware 312, the application boot program firmware 313, the kernel firmware 314, the communication firmware 315, and the system firmware 316.

[0052] like Figure 4 As shown, the internal storage partitions of the memory included in the system 3000 may include: a system security backup partition 3422, an application boot program backup partition 3423, a kernel backup partition 3424, and a mirror partition 3426. The above storage partitions may be used to store at least one of the aforementioned backup boot firmwares, such as: system security backup firmware 322, application boot program backup firmware 323, kernel backup firmware 324, communication backup firmware 325, and system backup firmware 326. Among them, the mirror partition 3426 may store the communication firmware 315 and the system firmware 316.

[0053] Optionally, at least one of the aforementioned boot firmwares may occupy a storage partition exclusively. At least one of the aforementioned backup boot firmwares may also occupy a boot partition exclusively. Optionally, the boot firmware may be restored by overwriting the storage partition where the corresponding boot firmware is located with the storage partition where the backup boot firmware is located.

[0054] like Figure 4 As shown, optionally, the storage partitions included in the system 3000 may also include: a partition table 3431, a communication system parameter 3432, a communication system parameter backup 3433, a recovery function partition 3434, and a marked partition 3435. Among them, the partition table 3431 can be used to record the physical address distribution of each storage partition. The communication system parameter 3432 can be used to record the communication parameters of the communication firmware 315. The communication system parameter backup 3433 can be used to back up the communication parameters in the communication system parameter 3432. The recovery function partition 3434 can be used to store the recovery function firmware 33. The marked partition 3435 can be used to store a bad firmware mark. Among them, the bad firmware mark can be used to mark whether the aforementioned at least one boot firmware is damaged.

[0055] Figure 5 A block diagram of an electronic device according to an exemplary embodiment is shown.

[0056] Refer to the following Figure 5 The electronic device 200 according to this embodiment of the present application is described. Figure 5 The electronic device 200 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0057] like Figure 5 As shown, the electronic device 200 is in the form of a general computing device. The firmware of the electronic device 200 may include but is not limited to: at least one processing unit 210, at least one storage unit 220, a bus 230 connecting different system firmware (including the storage unit 220 and the processing unit 210), a display unit 240, etc.

[0058] The storage unit stores a program code, which can be executed by the processing unit 210, so that the processing unit 210 executes the method described in this specification according to various exemplary embodiments of the present application. For example, the processing unit 210 can execute the following Figure 1-Figure 2 The system startup method based on multi-partition technology firmware protection is shown.

[0059] The storage unit 220 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 2201 and / or a cache memory unit 2202 , and may further include a read-only memory unit (ROM) 2203 .

[0060] The storage unit 220 may also include a program / utility 2204 having a set (at least one) of program modules 2205, such program modules 2205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.

[0061] Bus 230 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0062] The electronic device 200 may also communicate with one or more external devices 300 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 200, and / or may communicate with any device that enables the electronic device 200 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 250. In addition, the electronic device 200 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 260. The network adapter 260 may communicate with other modules of the electronic device 200 via a bus 230. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup firmware storage systems, etc.

[0063] By using the above-mentioned startup method and system, the firmware in the system can be modularly decomposed into multiple independent startup firmwares, and backups can be configured for each startup firmware. When the system firmware has an error and is damaged, the backup startup firmware can be used to temporarily start the system instead of the startup firmware. And after the temporary startup, the backup startup firmware can be used to restore the damaged startup firmware. In this way, the robustness of the system can be effectively ensured. The service life of the electronic equipment using this system can be improved. And the cost of returning damaged equipment to the factory for repair can be reduced.

[0064] Since the system firmware is decomposed into multiple components in this solution, the fault point of the system can be located relatively accurately, and the system can be repaired according to the fault point. This can reduce the time of system repair and restore the original appearance of the system to the greatest extent.

[0065] At the same time, in this solution, multiple backup partitions can be set, and a boot firmware can be independently stored in at least one backup partition, or a backup boot firmware can be independently stored. This can effectively reduce the possibility of failure of the boot firmware and the backup firmware, and improve the service life of the electronic device using this system.

[0066] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It is understood that each box in the flowchart and / or block diagram, as well as the combination of multiple boxes in the flowchart and / or block diagram, can be executed by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the instructions executed by the processor of the computer or other programmable data processing device create a device for implementing the functions / actions specified in one or more boxes of the flowchart and / or block diagram.

[0067] These computer program instructions may also be stored in a computer-readable medium that can instruct a computer or other programmable data processing device to implement functions in a specific manner, so that the instructions stored in the computer-readable medium produce an instruction device including an instruction to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0068] Computer program instructions may also be loaded onto a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide a process for implementing the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0069] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present application. In this regard, each frame in the flow chart or block diagram may represent a part of a module, section or code, which includes one or more executable instructions for realizing a specific logical function. It should also be noted that in some alternative implementations, the function marked in the frame may not occur in the order marked in the accompanying drawings. For example, depending on the functionality involved, the two frames shown in succession can actually be executed roughly at the same time, or these frames are sometimes executed in the opposite order. It can also be noted that each frame in the block diagram and / or the flow chart diagram, and the combination of multiple frames in the block diagram and / or the flow chart diagram can be realized by a hardware-based system or a combination of special-purpose hardware and computer instructions for the special purpose of performing a specific function or action.

[0070] In the above embodiments, the description of each embodiment has its own emphasis. For the part not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0071] The embodiments of the present application are described in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and its core idea of ​​the present application. At the same time, changes or deformations made by those skilled in the art based on the ideas of the present application, the specific implementation methods and the scope of application of the present application, all belong to the scope of protection of the present application. In summary, the content of this specification should not be construed as a limitation on the present application.

Claims

1. A system startup method based on multi-partition technology firmware protection, characterized in that: include: Loading a startup firmware, wherein the startup firmware is independently stored in a storage partition; If the loading of the startup firmware is successful, the system startup is completed; If the loading of the boot firmware fails, loading the backup boot firmware; Before loading the startup firmware, the method further includes: Decomposing the boot firmware into multiple independent boot firmwares, and configuring backup for each boot firmware respectively; After the backup startup firmware is loaded, the startup method further includes: Restoring the storage partition where the boot firmware is located by using the storage partition where the backup boot firmware is located; The boot firmware and the backup boot firmware are independently stored in different storage partitions, and the number of the backup boot firmware is greater than or equal to 2; The boot firmware includes at least one of a main boot program, an application boot program, a system security firmware, a kernel firmware, a communication firmware and a system firmware; The backup boot firmware includes at least one of application boot program backup firmware, system security backup firmware, kernel backup firmware, communication backup firmware and system backup firmware; The loading startup firmware includes: Starting the master boot program; Detect whether there is a bad firmware mark; If loading the boot firmware fails, load the backup boot firmware, including: If the bad firmware mark exists, the main boot program loads the system security backup firmware; and / or the main boot program loads the application boot program backup firmware; and / or the application boot program backup firmware loads the kernel backup firmware; and / or the kernel backup firmware loads the communication firmware; and the main boot program loads the system security firmware; If loading the boot firmware fails, load the backup boot firmware, including: If the system security firmware fails to be loaded by the main boot program, the system security backup firmware is loaded by the main boot program; and / or the application boot program backup firmware is loaded by the main boot program; and / or the kernel backup firmware is loaded by the application boot program backup firmware; and / or the communication firmware is loaded by the kernel backup firmware; The marking of the bad firmware mark corresponding to the boot firmware includes: marking a security module loading failure mark; and loading the application boot program by the main boot program; If loading the boot firmware fails, load the backup boot firmware, including: If the main boot program fails to load the application boot program, the main boot program loads the application boot program backup firmware; and / or the application boot program backup firmware loads the kernel backup firmware; and / or the kernel backup firmware loads the communication firmware; the marking of the bad firmware mark corresponding to the startup firmware also includes: marking the application boot program loading failure mark; The kernel firmware is loaded by the application boot program; If loading the boot firmware fails, load the backup boot firmware, including: If the kernel firmware fails to be loaded by the application boot program, the kernel backup firmware is loaded by the application boot program; and / or the communication firmware is loaded by the kernel backup firmware; the marking of the bad firmware mark corresponding to the boot firmware also includes: marking the kernel firmware loading failure; The communication firmware is loaded by the kernel firmware; If loading the boot firmware fails, load the backup boot firmware, including: If the communication firmware fails to be loaded by the kernel firmware, then the communication backup firmware is loaded; The marking of the bad firmware mark corresponding to the boot firmware also includes: marking a communication firmware loading failure mark; and loading the system firmware by the kernel firmware; If the loading of the boot firmware fails, then loading the backup boot firmware includes: If the system firmware is loaded by the kernel firmware, the backup boot firmware is loaded from the mirror partition; the marking of the bad firmware mark corresponding to the boot firmware also includes: marking the system firmware loading failure mark; After restoring the storage partition where the boot firmware is located by using the storage partition where the backup boot firmware is located, the boot method further includes: Execute the step of loading the boot firmware to start; The restoring the storage partition where the boot firmware is located by using the storage partition where the backup boot firmware is located includes: Load the recovery function firmware; The recovery function firmware uses the storage partition where the backup startup firmware is located to restore the storage partition where the startup firmware is located; The storage partitions include: The recovery function partition stores the recovery function firmware.

2. The startup method according to claim 1, characterized in that: Before restoring the storage partition where the boot firmware is located by using the storage partition where the backup boot firmware is located, the method further includes: Marking a bad firmware mark corresponding to the boot firmware; The restoring the storage partition where the boot firmware is located by using the storage partition where the backup boot firmware is located includes: Restoring the storage partition where the boot firmware is located by using the storage partition where the backup boot firmware is located according to the bad firmware mark; Clearing the bad firmware mark; The storage partitions include: The marking partition is used to store the bad firmware mark.

3. The startup method according to claim 2, characterized in that: The storage partition includes at least one of: a master boot program partition, a partition table, a communication parameter partition, a system security partition, an application boot program partition, a kernel partition, a communication system partition and a system partition, wherein: The master boot program partition stores the master boot program; The application boot program partition stores the application boot program; The system security partition stores the system security firmware; The kernel partition stores the kernel firmware; The communication system partition stores the communication firmware; The system partition stores the system firmware; The storage partition also includes: At least one of a communication parameter backup partition, a system security backup partition, an application boot program backup partition, a kernel backup partition, and a mirror partition, wherein: The communication parameter backup partition is used to restore the backup firmware of the communication parameter partition; The system security backup partition stores the system security backup firmware and is used to restore the system security partition; The application boot program backup partition stores the application boot program backup firmware and is used to restore the backup firmware of the application boot program partition; The kernel backup partition stores the kernel backup firmware and is used to restore the kernel partition; The mirror partition stores the system backup firmware and is used to restore the system firmware.

4. A system for firmware protection based on multi-partition technology, characterized in that: include: Decomposing the firmware, for decomposing the boot firmware into multiple independent boot firmwares, and configuring each boot firmware module separately; A startup firmware, used for starting the system; backing up the boot firmware, and when the boot firmware is damaged, replacing the boot firmware to start the system; Restoring the functional firmware, using the backup startup firmware to restore the startup firmware; Restoring the boot firmware storage partition, used to restore the storage partition where the boot firmware is located by using the storage partition where the backup boot firmware is located; Wherein, the boot firmware and the backup boot firmware are independently stored in different storage partitions; The startup firmware includes: At least one of a master boot program, an application boot program, a system security firmware, a kernel firmware, a communication firmware, and a system firmware; The backup boot firmware includes: At least one of application boot program backup firmware, system security backup firmware, kernel backup firmware, communication backup firmware and system backup firmware; The boot firmware is used to: Starting the master boot program; Detect whether there is a bad firmware mark; If loading the boot firmware fails, load the backup boot firmware, including: If the bad firmware mark exists, the system security backup firmware is loaded by the main boot program; and / or the application boot program backup firmware is loaded by the main boot program; and / or the kernel backup firmware is loaded by the application boot program backup firmware; and / or the communication firmware is loaded by the kernel backup firmware; The system security firmware is loaded by the main boot program; If loading the boot firmware fails, load the backup boot firmware, including: If the system security firmware fails to be loaded by the main boot program, the system security backup firmware is loaded by the main boot program; and / or the application boot program backup firmware is loaded by the main boot program; and / or the kernel backup firmware is loaded by the application boot program backup firmware; and / or the communication firmware is loaded by the kernel backup firmware; The marking of the bad firmware mark corresponding to the boot firmware includes: marking a security module loading failure mark; and loading the application boot program by the main boot program; If loading the boot firmware fails, load the backup boot firmware, including: If the main boot program fails to load the application boot program, the main boot program loads the application boot program backup firmware; and / or the application boot program backup firmware loads the kernel backup firmware; and / or the kernel backup firmware loads the communication firmware; the marking of the bad firmware mark corresponding to the startup firmware also includes: marking the application boot program loading failure mark; The kernel firmware is loaded by the application boot program; If loading the boot firmware fails, load the backup boot firmware, including: If the kernel firmware fails to be loaded by the application boot program, the kernel backup firmware is loaded by the application boot program; and / or the communication firmware is loaded by the kernel backup firmware; the marking of the bad firmware mark corresponding to the boot firmware also includes: marking the kernel firmware loading failure; The communication firmware is loaded by the kernel firmware; If loading the boot firmware fails, load the backup boot firmware, including: If the communication firmware fails to be loaded by the kernel firmware, then the communication backup firmware is loaded; The marking of the bad firmware mark corresponding to the boot firmware also includes: marking a communication firmware loading failure mark; and loading the system firmware by the kernel firmware; If loading the boot firmware fails, load the backup boot firmware, including: If the system firmware is loaded by the kernel firmware, the backup boot firmware is loaded from the mirror partition; the marking of the bad firmware mark corresponding to the boot firmware also includes: marking the system firmware loading failure mark.

5. The system according to claim 4, characterized in that The startup firmware includes: At least one of main boot program firmware, application boot program firmware, system security firmware, kernel firmware, communication firmware and system firmware; The backup boot firmware includes: At least one of application boot program backup firmware, system security backup firmware, kernel backup firmware, communication backup firmware and system backup firmware; wherein The application boot program backup firmware is used to replace the application boot program firmware and to restore the application boot program firmware; The system security backup firmware is used to replace the system security firmware and to restore the system security firmware; The kernel backup firmware is used to replace the kernel firmware and to restore the kernel firmware; The communication backup firmware is used to replace the communication firmware and to restore the communication firmware; The system backup firmware is used to replace the system firmware and to restore the system firmware.

Citation Information

Patent Citations

  • Embedded system starting brick prevention method and device

    CN109783150A

  • Guide program recorder and method for guarantee of online upgrading thereof

    CN1490817A