CN112379932B - Boot method and device of electronic equipment and electronic equipment - Google Patents

Boot method and device of electronic equipment and electronic equipment Download PDF

Info

Publication number
CN112379932B
CN112379932B CN202011320686.4A CN202011320686A CN112379932B CN 112379932 B CN112379932 B CN 112379932B CN 202011320686 A CN202011320686 A CN 202011320686A CN 112379932 B CN112379932 B CN 112379932B
Authority
CN
China
Prior art keywords
memory
target data
program
boot
chip
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.)
Active
Application number
CN202011320686.4A
Other languages
Chinese (zh)
Other versions
CN112379932A (en
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.)
Goertek Techology Co Ltd
Original Assignee
Goertek Techology 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 Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN202011320686.4A priority Critical patent/CN112379932B/en
Publication of CN112379932A publication Critical patent/CN112379932A/en
Application granted granted Critical
Publication of CN112379932B publication Critical patent/CN112379932B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers
    • 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/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/76Architectures of general purpose stored program computers
    • G06F15/78Architectures of general purpose stored program computers comprising a single central processing unit
    • G06F15/7807System on chip, i.e. computer system on a single chip; System in package, i.e. computer system on one or more chips in a single package
    • G06F15/7817Specially adapted for signal processing, e.g. Harvard architectures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Computing Systems (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The Boot method of the electronic equipment comprises the following steps: the system on chip bootstrap program reads the target data of the target area in the memory, wherein the memory is configured with a local bootstrap program; checking target data; if the verification is successful, the system on chip bootstrap program is normally started and jumps to execute the local bootstrap program in the memory; if the verification fails, a repair mode is entered, the system-on-chip boot program jumps to and executes the upgrade program to rewrite the repair file containing the local boot program into memory. A Boot device of electronic equipment and the electronic equipment are also provided. The method comprises the steps of firstly reading target data of a target area in a memory through a system-on-chip bootstrap program during operation, checking the target data before skipping to execute a local bootstrap program, and screening the correctness of the data in the memory. And when the verification fails, the method enters a repair mode, repairs the data in the memory, and avoids the starting failure caused by the local boot program error due to the data error or physical damage of the Flash memory.

Description

Boot method and device of electronic equipment and electronic equipment
Technical Field
The invention belongs to the technical field of electronic equipment, and particularly relates to a Boot method of electronic equipment, a Boot device of the electronic equipment and the electronic equipment.
Background
In the SoC Boot solution in the existing wearable device, a simple bootstrap program is usually integrated in the SoC, and the bootstrap program is responsible for simple hardware inspection and initialization, and jumps to a fixed address of a memory for configuration so as to complete starting. The branch of this bootstrap can only be selected by pulling the hardware pin low, high. The whole Boot design is relatively simple, and the production requirements of the wearable equipment are more and more difficult to meet, and particularly Flash upgrading, erasing and mark writing cannot be completed.
To solve this problem, the existing solution is to create a Bootloader program for product customization in a specific area of Flash memory. After simple hardware inspection and initialization, the boot program in the SoC jumps to the Bootloader program customized by the product, and the Bootloader customized by the product completes additional works such as Flash upgrading, erasing, mark writing and the like. However, in the product testing link or in the early use process, the Bootloader program customized by the product is easily damaged due to byte transitions (accidental erasure, etc.) of the Flash memory. The corrupted Bootloader program will cause a product start-up exception.
The above information disclosed in this background section is only for enhancement of understanding of the background section of the application and therefore it may not form the prior art that is already known to those of ordinary skill in the art.
Disclosure of Invention
Aiming at the problem that in the prior art, in the process of product testing or early use, a Bootloader program customized by the product is easy to damage due to byte jump of a Flash memory, and further causes abnormal starting of the product, the invention designs and provides a Boot method of electronic equipment.
In order to achieve the aim of the invention, the invention is realized by adopting the following technical scheme:
a Boot method of electronic equipment comprises the following steps: the method comprises the steps that a system on chip bootstrap program reads target data of a target area in a memory, wherein a local bootstrap program is configured in the memory; verifying the target data; if the target data is successfully checked, the system on chip bootstrap program is normally started and the local bootstrap program in the memory is jumped to be executed; if the target data check fails, a repair mode is entered, the system-on-chip bootstrap program jumps and executes an upgrade program to rewrite a repair file containing the local bootstrap program into the memory.
Further, before the system-on-chip bootstrap program reads the target data of the target area in the memory, the Boot method of the electronic device further includes the following steps: powering on the electronic equipment, and executing starting self-checking by the system on chip bootstrap program; if the starting self-check is normal, the system on chip bootstrap program judges whether a hardware upgrade signal is received or not; if the hardware upgrade signal is received, entering an upgrade mode, and jumping to execute an upgrade program; if the hardware upgrade signal is not received, the system on chip bootstrap program reads target data of a target area in the memory.
Further, verifying the target data includes the steps of: reading target data of a target area in the memory, and calculating a calculation check value of the target data; reading a preset check value of target data of the target area stored in the memory in advance; judging whether the calculated check value is consistent with the preset check value, and if so, successfully checking the target data; and if the calculated check value is inconsistent with a preset check value, the target data check fails.
Preferably, the preset check value is a CRC check value of 1 to 4 bytes at the end of the target area in the memory.
Preferably, the preset check value is a parity check value of 1 to 4 bytes at the end of the target area in the memory.
Another aspect of the present invention provides a Boot apparatus of an electronic device, including: a reading module configured to cause a system-on-chip bootstrap program to read target data of a target region in a memory; a verification module configured to verify the target data; the starting module is configured to enable the system on chip bootstrap program to be started normally and to skip to execute the local bootstrap program in the memory when the verification module verifies the target data successfully; and a repair module configured to enter a repair mode in which a system-on-chip bootstrap program jumps and executes an upgrade program to rewrite a repair file containing a local bootstrap program into the memory when the detection module fails to verify the target data.
Further, the method further comprises the following steps: the self-checking module is configured to enable the system-on-chip bootstrap program to execute startup self-checking when the electronic equipment is powered on; the judging module is configured to judge whether the system on chip bootstrap program receives a hardware upgrade signal or not when the startup self-check is normal; the upgrade module is configured to enable the electronic equipment to enter an upgrade mode when the system on chip receives a hardware upgrade signal; and the driving module is configured to drive the reading module to enable the system-on-chip bootstrap program to read target data of a target area in the memory when the system-on-chip does not receive the hardware upgrade signal.
Further, the verification module includes: the first acquisition unit is used for reading target data of a target area in the memory; a calculation unit for calculating a calculation check value of the target data; the second acquisition unit is used for reading a preset check value of target data of the target area stored in the memory in advance; the judging unit is used for judging whether the calculated check value is consistent with the preset check value or not; the output unit is used for outputting a verification result of successful verification of the target data when the calculated verification value is consistent with a preset verification value; or outputting a verification result of failure in verification of the target data when the calculated verification value is inconsistent with a preset verification value.
Preferably, the preset check value is a CRC check value of 1 to 4 bytes at the end of the target area in the memory or a parity check value of 1 to 4 bytes at the end of the target area in the memory.
A third aspect of the present invention provides an electronic device, which executes the following Boot method, including the steps of: the method comprises the steps that a system on chip bootstrap program reads target data of a target area in a memory, wherein a local bootstrap program is configured in the memory; verifying the target data; if the target data is successfully checked, the system on chip bootstrap program is normally started and the local bootstrap program in the memory is jumped to be executed; if the target data check fails, a repair mode is entered, the system-on-chip bootstrap program jumps and executes an upgrade program to rewrite a repair file containing the local bootstrap program into the memory.
Compared with the prior art, the invention has the advantages and positive effects that:
according to the Boot method of the electronic equipment, the target data of the target area in the memory is firstly read through the system-on-chip bootstrap program during operation, and the target data is checked before the local bootstrap program is executed in a jumping mode, so that the correctness of the data in the memory is screened. And when the verification is successful, the local boot program in the memory is jumped to execute, and when the verification is failed, the method enters a repair mode to repair the data in the memory, so that the starting failure caused by the data error or physical damage of the Flash memory is avoided.
Other features and advantages of the present invention will become apparent upon review of the detailed description of the invention in conjunction with the drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a first embodiment of a Boot method of an electronic device provided by the present invention;
FIG. 2 is a flowchart of a second embodiment of a Boot method of an electronic device provided by the present invention;
FIG. 3 is a flowchart of verifying target data in the Boot method of the electronic device provided by the invention;
FIG. 4 is a schematic block diagram of a first embodiment of a Boot device of an electronic device according to the present invention;
FIG. 5 is a schematic block diagram of a second embodiment of a Boot device of an electronic device according to the present invention;
fig. 6 is a schematic block diagram of a verification module in a Boot device of an electronic device provided by the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail with reference to the accompanying drawings and examples.
It should be noted that, in the description of the present invention, terms such as "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", and the like indicate directions or positional relationships based on the directions or positional relationships shown in the drawings, which are merely for convenience of description, and do not indicate or imply that the apparatus or elements must have a specific orientation, be constructed and operated in a specific orientation, and thus are not to be construed as limiting the present invention. Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In order to solve the problem that in a product testing link or in a front-stage use process, a Bootloader program customized by a product is easy to damage due to byte jump of a Flash memory, and further the starting abnormality of the electronic equipment product is caused, the invention designs and provides a Boot method of the electronic equipment, which is particularly suitable for small wearable equipment, such as a smart wristband or a smart watch product. Such products typically employ a system-on-a-chip (SoC) based architecture to reduce the complexity of employing discrete electronic components in terms of electrical compatibility and testing, while controlling overall power consumption. In a system on chip (SoC), not only one processor is built in, but also analog and digital circuits that can implement most basic functions, such as built-in connection devices, power manager, bluetooth subsystem, antenna, clock, etc., are packaged. Based on the processor selected, a system-on-chip (SoC) is configured with a system-on-chip boot loader (SoC Bootloader). The system on chip bootstrap program is a small program executed before the system on chip runs, and through the small program, the hardware equipment can be initialized, and a mapping table of the memory space is built, so that a proper system software and hardware environment is built, and preparation is made for finally calling the kernel of the operating system. The system on chip boot program can be started from the storage medium, further boot the operating system, and support the serial port and the Ethernet interface.
As introduced in the background section, the system-on-chip bootstrap program is generally simpler, and in order to meet the requirements of the production of the wearable device product, especially to fulfill the requirements of Flash upgrading, erasing and writing of the mark, a local bootstrap program for customizing the product, namely a custom Bootloader, is usually created in a specific area in a Flash memory which can be in communication connection with the system-on-chip or a Flash memory built in the system-on-chip, and the local bootstrap program further fulfills the requirements of upgrading, erasing and writing of the Flash memory. In order to avoid a Boot failure caused by a local Boot error due to Flash byte transitions, the Boot method of the electronic device provided by the invention comprises a plurality of steps as shown in fig. 1.
Referring to fig. 1, in step S101, a system on chip bootstrap program reads target data of a target area in a memory. The memory referred to herein may be a Flash memory built in the system on chip, or may be an external Flash memory communicatively connected to the system on chip, in which a local boot program is configured. Since the local boot program is typically placed at the bottom or top of the memory, the target area is preferably the bottom or top area of the memory and may be set according to a reset vector in a processor in the system-on-chip.
Step S102, unlike the direct jump in the prior art, in the present invention, the target data is first checked.
Step S103, the target data is successfully checked, namely, the target area of the memory has no hardware error or software error.
Step S104, after the result of successful verification of the target data is obtained, the system on chip bootstrap program is started normally and jumps to execute the local bootstrap program in the memory. The local boot program is started and the system operates normally.
In another case, as shown in step S105, if the target data check fails, it indicates that there is a bad area or a bad block in the memory, or that there is a data error such as bit inversion, byte transition, etc.
Step S106, after the target data check fails, the method jumps to enter a repair mode. The system on chip bootstrap program jumps to the upgrade program and upgrades the memory automatically or after waiting for manual confirmation by the user. When the memory is upgraded, the memory is in communication connection with an external device (for example, through a serial interface), and a repair file containing a local boot program is rewritten in the memory, so that the detection and correction of error data in the memory are realized. If a certain bit corresponding to a physical storage unit of the memory is physically changed, the upgrade program automatically writes a repair file containing the local boot program into a fault-free area, so that the electronic equipment product is ensured to be started normally under the guidance of the local boot program.
According to the Boot method of the electronic equipment, the target data of the target area in the memory is firstly read through the system-on-chip bootstrap program during operation, and the target data is checked before the local bootstrap program is executed in a jumping mode, so that the correctness of the data in the memory is screened. And when the verification is successful, the local boot program in the memory is jumped to execute, and when the verification is failed, the method enters a repair mode to repair the data in the memory, so that the starting failure caused by the data error or physical damage of the Flash memory is avoided.
As shown in fig. 2, a Boot method of an electronic device with more various functions is provided. Specifically, before the system on chip bootstrap program reads the target data of the target area in the memory, the Boot method of the electronic device further includes the steps of Boot self-checking and upgrading mode judging.
In step S201, the electronic device is powered on. After the electronic device is powered on, the processor starts to execute the program from a set address, which is determined by the design of the processor, and the ROM or Flash in the system on chip is mapped to the address, and the system on chip boot program is stored in the corresponding Flash storage location. After the electronic device is powered on, the processor automatically executes the system-on-chip bootstrap program.
In step S202, the system on chip bootstrap program executes a boot self-test procedure to determine whether all components in the system on chip can operate normally.
Step S203, the power-on self-test is normal.
In step S204, the system on chip bootstrap program determines whether a hardware upgrade signal is received. The hardware upgrade signal is preferably generated by a manual operation by a user or tester and may be embodied in the form of an upgrade flag bit.
In step S205, if the hardware upgrade signal is not received, the system on chip bootstrap program reads the target data of the target area in the memory. Consistent with the first embodiment, the memory referred to herein may be a Flash memory built in the system on chip, or may be an external Flash memory communicatively connected to the system on chip. The bottom or top of the memory is configured with a local boot program. The target area is preferably the bottom or top area of the memory and is set according to a reset vector in a processor in the system-on-chip.
Step S206, checking the target data.
Step S207, the target data check is successful, which indicates that the target area of the memory has no hardware error or software error.
Step S208, after the result of successful verification of the target data is obtained, the system on chip bootstrap program is started normally and jumps to execute the local bootstrap program in the memory. The local boot program is started and the system operates normally.
In another case, as shown in step 209, the target data verification fails, indicating that there is a bad region or block of memory, or that there is a data error such as bit inversion, byte transitions, etc.
Step S210, after the target data check fails, the method jumps to a repair mode. The system on chip bootstrap program jumps to execute the upgrade program, and repairs the memory automatically or after waiting for manual confirmation by the user. When the memory is repaired, the memory is in communication connection with an external device (for example, through a serial interface), and a repair file containing a local boot program is rewritten in the memory, so that the detection and correction of error data in the memory are realized. If a certain bit corresponding to a physical storage unit of the memory is physically changed, the upgrade program automatically writes a repair file containing the local boot program into a fault-free area, so that the electronic equipment product is ensured to be started normally under the guidance of the local boot program.
Step S211, if the system on chip bootstrap program judges that the hardware upgrade signal is received before the system on chip bootstrap program reads the target data of the target area in the memory, the system on chip bootstrap program enters an upgrade mode, jumps to execute the upgrade program, and upgrades the memory automatically or after waiting for the manual confirmation of the user. When the memory is upgraded, the memory is communicatively connected to an external device (e.g., via a serial interface), and the upgrade file is rewritten into the memory. The upgrade file and the repair file can be the same, namely the upgrade repair file containing the latest version of the local boot program, and the program is iteratively updated in time while keeping normal operation, so that miniaturization of the program code is kept.
Fig. 3 is a flowchart showing the verification of the target data of the target area. The method specifically comprises the following steps:
step S301, reading target data of a target area in a memory, and calculating a calculation check value N of the target data;
in step S302, a preset check value N' of target data of a target area stored in advance in the memory is read.
In step S303, it is determined whether the calculated check value N is consistent with the preset check value N'.
Step S304, if the calculated check value N is consistent with the preset check value N', the target data is successfully checked.
In step S305, if the calculated check value N is inconsistent with the preset check value N', the target data check fails.
Wherein the preset check value N' is preferably a CRC check value of 1 to 4 bytes at the end of the target area in the memory. After the target data of the target area is read, calculating CRC check values of 1-4 bytes at the tail end of the target area as a calculated check value N, calling the CRC check values of 1-4 bytes at the tail end of the target area stored in advance in a memory, which are already calculated and stored based on the same algorithm as a preset check value N ', and comparing the calculated check value N with the preset check value N' to obtain a conclusion that the target data is successfully checked or the target data is failed to be checked.
The preset check value N' may also be a parity value of 1 to 4 bytes at the end of the target area in memory. After the target data of the target area is read, calculating the parity check value of 1 to 4 bytes at the tail end of the target area as a calculated check value N, calling the parity check value of 1 to 4 bytes at the tail end of the target area stored in advance in the memory, which is already calculated and stored based on the same algorithm as a preset check value N ', and comparing the calculated check value N with the preset check value N' to obtain the conclusion that the target data is successfully checked or the target data is failed to be checked.
Referring to fig. 4, fig. 4 is a schematic block diagram of a Boot device of an electronic apparatus according to an embodiment of the present application. The device comprises:
and the reading module is configured to enable the system on chip bootstrap program to read target data of the target area in the memory.
And the verification module is configured to verify the target data.
And the starting module is configured to enable the system on chip bootstrap program to be started normally and to jump to execute the local bootstrap program in the memory when the verification module is successful in verifying the target data.
The repair module is configured to enter a repair mode when the verification module fails to verify the target data; in repair mode, the system on chip bootstrap jumps and executes the upgrade program to re-write the repair file containing the local bootstrap program into memory.
In another alternative embodiment of the Boot device of the electronic apparatus as shown in fig. 5, the method further includes:
and the self-checking module is configured to enable the system-on-chip bootstrap program to execute startup self-checking when the electronic equipment is powered on.
And the judging module is configured to judge whether the on-chip system boot program receives the hardware upgrading signal or not when the startup self-check is normal.
And the upgrading module is configured to enable the electronic equipment to enter an upgrading mode when the system on chip receives the hardware upgrading signal. And
and the driving module is configured to drive the reading module to enable the system on chip bootstrap program to read target data of a target area in the memory when the system on chip does not receive the hardware upgrading signal.
In some preferred embodiments, the verification module may be composed of the following elements.
The verification module comprises:
the first acquisition unit is used for reading target data of a target area in the memory.
And the calculating unit is used for calculating a calculation check value of the target data.
And the second acquisition unit is used for reading a preset check value of target data of a target area stored in the memory in advance.
The judging unit is used for judging whether the calculated check value is consistent with a preset check value.
And the output unit is used for outputting a verification result of successful verification of the target data when the calculated verification value is consistent with the preset verification value. Or outputting a verification result of failure in verification of the target data when the calculated verification value is inconsistent with the preset verification value.
In some preferred embodiments, the preset check value is a CRC check value of 1 to 4 bytes at the end of the target area in the memory or a parity check value of 1 to 4 bytes at the end of the target area in the memory.
According to an embodiment of the present application, in another aspect, the present invention further provides an electronic device. The electronic device performs the Boot method of the electronic device according to any one of claims 1 to 5. The electronic device is preferably a wearable device, more preferably a smart wristband or a smart watch. The specific steps of the Boot method of the electronic device are shown in the detailed description of the above embodiments and the detailed description of the drawings in the specification, which are not repeated herein, and the electronic device adopting the Boot method can achieve the same technical effects.
The above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be apparent to one skilled in the art that modifications may be made to the technical solutions described in the foregoing embodiments, or equivalents may be substituted for some of the technical features thereof; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.

Claims (10)

1. The Boot method of the electronic equipment is characterized by comprising the following steps of:
the method comprises the steps that a system on chip bootstrap program reads target data of a target area in a memory, wherein a local bootstrap program is configured in the memory;
verifying the target data;
if the target data is successfully checked, the system on chip bootstrap program is normally started and the local bootstrap program in the memory is jumped to be executed;
if the target data fails to be checked, entering a repair mode, jumping and executing an upgrade program by a system on chip bootstrap program, and upgrading the memory automatically or after waiting for manual confirmation; when the memory is upgraded, the memory is in communication connection with an external device so as to rewrite a repair file containing a local boot program into the memory, or the upgrade program automatically writes the repair file containing the local boot program into a fault-free area of the memory, and an electronic device product is normally started under the guidance of the local boot program.
2. The Boot method of an electronic device according to claim 1, wherein,
before the system-on-chip bootstrap program reads the target data of the target area in the memory, the Boot method of the electronic device further comprises the following steps:
powering on the electronic equipment, and executing starting self-checking by the system on chip bootstrap program;
if the starting self-check is normal, the system on chip bootstrap program judges whether a hardware upgrade signal is received or not; if the hardware upgrade signal is received, entering an upgrade mode, and jumping to execute an upgrade program; if the hardware upgrade signal is not received, the system on chip bootstrap program reads target data of a target area in the memory.
3. The Boot method of an electronic device according to claim 1, wherein,
the verification target data comprises the following steps:
reading target data of a target area in the memory, and calculating a calculation check value of the target data;
reading a preset check value of target data of the target area stored in the memory in advance;
judging whether the calculated check value is consistent with the preset check value, and if so, successfully checking the target data; and if the calculated check value is inconsistent with a preset check value, the target data check fails.
4. The Boot method of an electronic device according to claim 3, wherein,
the preset check value is a CRC check value of 1 to 4 bytes at the end of the target area in the memory.
5. The Boot method of an electronic device according to claim 3, wherein,
the preset check value is a parity check value of 1 to 4 bytes at the end of the target area in the memory.
6. The Boot device of the electronic equipment is characterized by comprising:
a reading module configured to cause a system-on-chip bootstrap program to read target data of a target region in a memory;
a verification module configured to verify the target data;
the starting module is configured to enable the system on chip bootstrap program to be started normally and to skip to execute the local bootstrap program in the memory when the verification module verifies the target data successfully; and
the repair module is configured to enter a repair mode when the detection module fails to check the target data, and in the repair mode, the system on chip bootstrap program jumps and executes an upgrade program to upgrade the memory automatically or after waiting for manual confirmation; when the memory is upgraded, the memory is in communication connection with an external device so as to rewrite a repair file containing a local boot program into the memory, or the upgrade program automatically writes the repair file containing the local boot program into a fault-free area of the memory, and an electronic device product is normally started under the guidance of the local boot program.
7. The Boot apparatus of an electronic device according to claim 6, wherein: further comprises:
the self-checking module is configured to enable the system-on-chip bootstrap program to execute startup self-checking when the electronic equipment is powered on;
the judging module is configured to judge whether the system on chip bootstrap program receives a hardware upgrade signal or not when the startup self-check is normal;
the upgrade module is configured to enable the electronic equipment to enter an upgrade mode when the system on chip receives a hardware upgrade signal; and
and the driving module is configured to drive the reading module to enable the system on chip bootstrap program to read target data of a target area in the memory when the system on chip does not receive the hardware upgrading signal.
8. The Boot apparatus of an electronic device according to claim 6, wherein:
the verification module comprises:
the first acquisition unit is used for reading target data of a target area in the memory;
a calculation unit for calculating a calculation check value of the target data;
the second acquisition unit is used for reading a preset check value of target data of the target area stored in the memory in advance;
the judging unit is used for judging whether the calculated check value is consistent with the preset check value or not; and
the output unit is used for outputting a verification result of successful verification of the target data when the calculated verification value is consistent with a preset verification value; or outputting a verification result of failure in verification of the target data when the calculated verification value is inconsistent with a preset verification value.
9. The Boot apparatus of an electronic device according to claim 8, wherein:
the preset check value is a CRC check value of 1 to 4 bytes at the end of the target area in the memory or a parity check value of 1 to 4 bytes at the end of the target area in the memory.
10. An electronic device, characterized in that the electronic device performs a Boot method of the electronic device according to any of the claims 1 to 5.
CN202011320686.4A 2020-11-23 2020-11-23 Boot method and device of electronic equipment and electronic equipment Active CN112379932B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011320686.4A CN112379932B (en) 2020-11-23 2020-11-23 Boot method and device of electronic equipment and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011320686.4A CN112379932B (en) 2020-11-23 2020-11-23 Boot method and device of electronic equipment and electronic equipment

Publications (2)

Publication Number Publication Date
CN112379932A CN112379932A (en) 2021-02-19
CN112379932B true CN112379932B (en) 2023-05-23

Family

ID=74589054

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011320686.4A Active CN112379932B (en) 2020-11-23 2020-11-23 Boot method and device of electronic equipment and electronic equipment

Country Status (1)

Country Link
CN (1) CN112379932B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113421606A (en) * 2021-07-08 2021-09-21 成都盛芯微科技有限公司 flash detection method and detection system thereof
CN113687970A (en) * 2021-08-25 2021-11-23 东莞新能安科技有限公司 Memory recovery method, battery management system, battery pack and electric device
CN114398087B (en) * 2021-12-20 2023-08-18 鹏城实验室 Method for improving running stability of singlechip after program updating and singlechip
CN114780153B (en) * 2022-03-31 2023-08-08 深圳曦华科技有限公司 Boot program starting method and related device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1783001A (en) * 2004-11-29 2006-06-07 华为技术有限公司 Method for starting basic input and output system
CN1808385A (en) * 2006-01-20 2006-07-26 北京朗通环球科技有限公司 Guide system of embedded system
CN101431441A (en) * 2008-12-12 2009-05-13 北京邮电大学 Method for on-line updating FPGA system embedded with CPU
CN102622249A (en) * 2012-03-05 2012-08-01 山东华芯半导体有限公司 Safety starting method preventing central processing unit (CPU) from self locking
CN106775610A (en) * 2016-03-22 2017-05-31 新华三技术有限公司 A kind of electronic equipment starts method and a kind of electronic equipment
CN111273928A (en) * 2019-09-10 2020-06-12 深圳市汇泰科电子有限公司 Self-upgrading bootloader design method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1783001A (en) * 2004-11-29 2006-06-07 华为技术有限公司 Method for starting basic input and output system
CN1808385A (en) * 2006-01-20 2006-07-26 北京朗通环球科技有限公司 Guide system of embedded system
CN101431441A (en) * 2008-12-12 2009-05-13 北京邮电大学 Method for on-line updating FPGA system embedded with CPU
CN102622249A (en) * 2012-03-05 2012-08-01 山东华芯半导体有限公司 Safety starting method preventing central processing unit (CPU) from self locking
CN106775610A (en) * 2016-03-22 2017-05-31 新华三技术有限公司 A kind of electronic equipment starts method and a kind of electronic equipment
CN111273928A (en) * 2019-09-10 2020-06-12 深圳市汇泰科电子有限公司 Self-upgrading bootloader design method

Also Published As

Publication number Publication date
CN112379932A (en) 2021-02-19

Similar Documents

Publication Publication Date Title
CN112379932B (en) Boot method and device of electronic equipment and electronic equipment
US6651188B2 (en) Automatic replacement of corrupted BIOS image
JP4668416B2 (en) Protecting boot block code when enabling write access to the boot block
US8423991B2 (en) Embedded network device and firmware upgrading method
US8930931B2 (en) Information processing apparatus using updated firmware and system setting method
KR100248757B1 (en) Method of damaged rom bios recovery function
JP6825029B2 (en) Streamlined server design methods and systems
US20150199190A1 (en) System and method for updating firmware
CN110865830A (en) Firmware updating method and computer system
CN112231136A (en) SoC chip, method for acquiring repair information, storage medium and electronic equipment
CN114443175B (en) Startup configuration method for missile-borne FPGA (field programmable Gate array) online upgrading
CN109634781A (en) One kind is based on embedded program two-region Backup Images system and starting method
CN115718610A (en) Reliable method for updating application program of single chip microcomputer
WO2015184732A1 (en) Bootstrap storage method, bootstrap fault recovery method and device, and computer storage medium
JP2008198060A (en) Information processor, patch code mounting system, electronic equipment, and patch code mounting method
CN111736882B (en) Remote upgrading method of DSP program
CN109117299B (en) Error detecting device and method for server
US20050144611A1 (en) Method for determining program code
WO2017143513A1 (en) Method, cpu and single board for starting boot
KR101844095B1 (en) Method and apparatus for executing bootloader
EP4296860A1 (en) Method for running startup program of electronic device, and electronic device
JP2008052354A (en) External basic input/output system device
CN111696614B (en) Control test circuit and control test method for non-volatile memory redundant storage
CN114741091A (en) Firmware loading method and device, electronic equipment and computer readable storage medium
CN113946360A (en) Method and device for upgrading boot program of power conversion controller

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant