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

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

Info

Publication number
CN112379932A
CN112379932A CN202011320686.4A CN202011320686A CN112379932A CN 112379932 A CN112379932 A CN 112379932A CN 202011320686 A CN202011320686 A CN 202011320686A CN 112379932 A CN112379932 A CN 112379932A
Authority
CN
China
Prior art keywords
memory
target data
program
boot
check value
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.)
Granted
Application number
CN202011320686.4A
Other languages
Chinese (zh)
Other versions
CN112379932B (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)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The Boot method of the 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; 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 SOC boot program jumps and executes the upgrade program to rewrite the repair file containing the local boot program into the memory. A Boot device of the electronic equipment and the electronic equipment are also provided. When the method is in operation, the target data in the target area in the memory is firstly read by the system-on-chip bootstrap program, the target data is verified before the local bootstrap program is executed by skipping, and the correctness of the data in the memory is discriminated. And entering a repair mode when the verification fails, and repairing the data in the memory to avoid starting failure caused by local boot program errors due to data errors or physical damage of the Flash memory.

Description

Boot method and Boot device of electronic equipment and electronic equipment
Technical Field
The present invention relates to the field of electronic devices, and in particular, to a Boot method of an electronic device, a Boot apparatus of an electronic device, and an electronic device.
Background
In the SoC Boot solution of the existing wearable device, a simple bootstrap program is generally integrated inside 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 to complete the Boot. This branch of the boot program can only be selected by pulling the hardware pins low and high. The whole Boot design is relatively simple, the production requirements of wearable equipment are more and more difficult to meet, and especially Flash upgrading, erasing and mark writing cannot be finished.
To solve this problem, the existing solution is to create a product-customized Bootloader program in a specific area of the Flash memory. After simple hardware inspection and initialization, a bootstrap program in the SoC jumps to a customized Bootloader program of the product, and then the customized Bootloader of the product completes extra work such as Flash upgrading, erasing, mark writing and the like. However, in a product testing link or an early use process, the customized Bootloader program of the product is easily damaged due to byte jump (accidental erasure and the like) of the Flash memory. A corrupted Bootloader program will cause a product boot exception.
The above information disclosed in this background section is only for enhancement of understanding of the background of the application and therefore it may comprise prior art that does not constitute known to a person of ordinary skill in the art.
Disclosure of Invention
The invention designs and provides a Boot method of electronic equipment, aiming at the problem that in the prior art, in the product testing link or the early use process, a customized Boot program of a product is easy to damage due to byte jump of a Flash memory, and further causes abnormal product starting.
In order to realize the purpose of the invention, the invention is realized by adopting the following technical scheme:
a Boot method of an electronic device comprises the following steps: reading target data of a target area in a memory by a system-on-chip bootstrap program, wherein the memory is provided with a local bootstrap program; verifying the target data; if the target data is verified successfully, the system-on-chip bootstrap program is started normally and jumps to execute the local bootstrap program in the memory; and if the target data fails to be checked, entering a repair mode, and skipping and executing the upgrading program by the boot program of the system on chip so as to rewrite a repair file containing the local boot program into the memory.
Further, before the soc Boot program reads the target data of the target area in the memory, the Boot method of the electronic device further includes the following steps: the electronic equipment is powered on, and the system-on-chip bootstrap program executes power-on self-test; if the power-on self-test is normal, the system-on-chip bootstrap program judges whether a hardware upgrading signal is received; if a hardware upgrading signal is received, entering an upgrading mode, and skipping to execute an upgrading program; 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.
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 pre-stored in the memory; judging whether the calculated check value is consistent with the preset check value or not, and if the calculated check value is consistent with the preset check value, 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 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 device of an electronic device, including: a read module configured to cause a system-on-chip boot program to read target data of a target area 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 normally started and jump to execute the local bootstrap program in the memory when the verification module successfully verifies the target data; and the repair module is configured to enter a repair mode when the detection module fails to verify the target data, and in the repair mode, the system-on-chip boot program jumps and executes the upgrade program to rewrite a repair file containing the local boot program into the memory.
Further, the method also comprises the following steps: the self-checking module is configured to enable the system-on-chip bootstrap program to execute power-on 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 upgrading signal when the power-on self-test is normal; an upgrade module configured to cause the electronic device 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 the target data of the target area in the memory when the system-on-chip does not receive the hardware upgrading signal.
Further, the verification module comprises: a first acquisition unit for reading target data of a target area in the memory; a calculation unit for calculating a calculation check value of the target data; a second obtaining unit, configured to read a preset check value of target data of the target area pre-stored in the memory; 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 the verification result of the target data verification failure is output 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, wherein the electronic device executes the following Boot method, and the electronic device includes the following steps: reading target data of a target area in a memory by a system-on-chip bootstrap program, wherein the memory is provided with a local bootstrap program; verifying the target data; if the target data is verified successfully, the system-on-chip bootstrap program is started normally and jumps to execute the local bootstrap program in the memory; and if the target data fails to be checked, entering a repair mode, and skipping and executing the upgrading program by the boot program of the system on chip so as to rewrite a repair file containing the local boot program into the memory.
Compared with the prior art, the invention has the advantages and positive effects that:
the Boot method of the electronic equipment provided by the invention firstly reads the target data of the target area in the memory through the system-on-chip bootstrap program during running, and checks the target data before skipping to execute the local bootstrap program so as to discriminate the correctness of the data in the memory. And skipping to execute the local bootstrap program in the memory when the verification is successful, and entering a repair mode when the verification is failed to repair the data in the memory, so as to avoid the starting failure caused by the local bootstrap program error due to the data error or physical damage of the Flash memory.
Other features and advantages of the present invention will become more apparent from the following detailed description of the invention when taken in conjunction with the accompanying drawings.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a Boot method of an electronic device according to a first embodiment of the present invention;
fig. 2 is a flowchart of a Boot method of an electronic device according to a second embodiment of the present invention;
fig. 3 is a flowchart of the target data verification in the Boot method of the electronic device provided by the present invention;
fig. 4 is a block diagram schematically illustrating a structure of a Boot device of an electronic device according to a first embodiment of the present invention;
fig. 5 is a block diagram schematically illustrating a structure of a Boot device of an electronic device according to a second embodiment of the present invention;
fig. 6 is a schematic block diagram of a structure of a check module in a Boot apparatus of an electronic device provided by the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the accompanying drawings and examples.
It should be noted that in the description of the present invention, the terms of direction or positional relationship indicated by the terms "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. are 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 device or element must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first" and "second" 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 a customized Bootloader program of a product is easily damaged due to byte jump of a Flash memory in a product testing link or an early use process, and further causes abnormal starting of an electronic device product, the invention designs and provides a Boot method of electronic equipment, and the Boot method is particularly suitable for small wearable equipment, such as an intelligent wrist strap or an intelligent 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, etc., while controlling overall power consumption. In a system on chip (SoC), not only one processor is built in, but also analog circuits and digital circuits that can realize most basic functions, such as built-in connection devices, power managers, bluetooth subsystems, antennas, clocks, and the like are packaged. Based on the different processors selected, the 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, hardware equipment can be initialized, and a mapping table of a memory space is established, so that a proper system software and hardware environment is established, and preparation is made for finally calling an operating system kernel. The SOC boot program can be started from a storage medium, further boots an operating system and supports a serial port and an Ethernet interface.
As described in the background section, the boot program of the system on chip is generally simple, and in order to meet the requirements of production of wearable device products, especially the requirements of completing Flash upgrade, erasure, and mark writing, a local boot program, i.e., a custom Bootloader, is usually created in a Flash memory that can be in communication connection with the system on chip or a specific area in a Flash memory built in the system on chip, and the local boot program further completes upgrade, erasure, and mark writing of the Flash memory. In order to avoid a Boot failure caused by a local Boot program error due to Flash byte jump, the electronic device Boot method provided by the invention comprises a plurality of steps as shown in fig. 1.
Referring to fig. 1, in step S101, the soc boot program reads target data of a target area in the memory. The memory referred to here may be a Flash memory built in the system on chip, or an external Flash memory communicatively connected to the system on chip, and a local boot program is disposed in the memory. 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 the processor in the system-on-chip.
Step S102, unlike the direct jump in the prior art, in the present invention, the target data is checked first.
In step S103, the target data is successfully verified, i.e. it indicates that there is no hardware error or software error in the target area of the memory.
And step S104, after the result that the target data is successfully verified is obtained, the system-on-chip bootstrap program is normally started and jumps to execute the local bootstrap program in the memory. And starting a local bootstrap program, and normally operating the system.
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 there is a data error such as bit reversal or byte transition.
And step S106, skipping to enter a repair mode after the target data fails to be checked. And the system-on-chip bootstrap program skips to the upgrading program, and the memory is upgraded automatically or after the user confirms manually. 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 into 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 upgrading 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 normally started under the guidance of the local boot program.
The Boot method of the electronic equipment provided by the invention firstly reads the target data of the target area in the memory through the system-on-chip bootstrap program during running, and checks the target data before skipping to execute the local bootstrap program so as to discriminate the correctness of the data in the memory. And skipping to execute the local bootstrap program in the memory when the verification is successful, and entering a repair mode when the verification is failed to repair the data in the memory, so as to avoid the starting failure caused by the local bootstrap program error due to the data error or physical damage of the Flash memory.
A Boot method of an electronic device with more various functions is provided as shown in fig. 2. Specifically, before the soc Boot program reads the target data in the target area of the memory, the Boot method of the electronic device further includes the steps of power-on self-test and upgrade mode determination.
In step S201, the electronic device is powered on. After the electronic device is powered on, the processor starts to execute programs from a set address, which is determined by the design of the processor, the ROM or Flash in the system on chip is mapped to the address, and the boot program of the system on chip is stored in a corresponding Flash storage position. After the electronic equipment is powered on, the processor automatically executes the system-on-chip bootstrap program.
In step S202, the soc boot program executes the power on self test program to determine whether all components in the soc can work normally.
In step S203, the power-on self-test is normal.
In step S204, the soc boot program determines whether a hardware upgrade signal is received. The hardware upgrade signal is preferably generated by a user or a tester through manual operation, and may be embodied in the form of an upgrade flag bit.
In step S205, if the hardware upgrade signal is not received, the soc boot program reads the target data in the target area in the memory. In accordance with the first embodiment, the memory referred to herein may be a Flash memory built in the system on chip, or 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 the processor in the system-on-chip.
Step S206, the target data is verified.
In step S207, the target data is successfully verified, which indicates that there is no hardware error or software error in the target area of the memory.
In step S208, after the result that the target data is successfully verified is obtained, the soc boot program is normally started and jumps to execute the local boot program in the memory. And starting a local bootstrap program, and normally operating the system.
In another case, as shown in step 209, the target data check fails, which indicates that there is a bad area or block in the memory, or there is a data error such as bit reversal, byte transition, etc.
And step S210, jumping to enter a repair mode after the target data fails to be checked. And the system-on-chip bootstrap program skips to execute the upgrading program, and automatically or after the user manually confirms the upgrading program, the memory is repaired. When the memory is repaired, the memory is in communication connection with an external device (for example, through a serial interface connection), and a repair file containing a local boot program is rewritten into 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 upgrading 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 normally started under the guidance of the local boot program.
Step S211, before the soc boot program reads the target data in the target area of the memory, if the soc boot program determines that the hardware upgrade signal is received, the soc boot program enters an upgrade mode, skips to execute the upgrade program, and automatically or waits for a manual confirmation from the user to upgrade the memory. When the memory is upgraded, the memory is in communication connection with an external device (for example, through 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 carries out iterative update on the program in time while keeping normal operation, and the miniaturization of the program code is kept.
Fig. 3 is a flowchart for checking 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;
step S302, reading a preset check value N' of target data of a target area pre-stored in a memory.
Step S303, determining whether the calculated check value N is consistent with the preset check value N'.
In 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 verification value N is inconsistent with the preset verification value N', the target data verification fails.
Wherein the predetermined 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 reading the target data of the target area, calculating a CRC (cyclic redundancy check) value of 1 to 4 bytes at the end of the target area as a calculated check value N, calling 1 to 4 bytes at the end of the target area pre-stored in a memory, and comparing the calculated check value N with a preset check value N' based on the calculated and stored CRC value of the same algorithm to obtain the conclusion that the target data is successfully checked or the target data is failed to check.
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 reading the target data of the target area, calculating a parity check value of 1-4 bytes at the end of the target area as a calculated check value N, calling the target area end 1-4 bytes stored in the memory in advance, and comparing the calculated check value N with the preset check value N' based on the parity check value calculated and stored by the same algorithm to draw the conclusion that the target data check is successful or the target data check is failed.
Referring to fig. 4, fig. 4 is a block diagram illustrating a structure of a Boot device of an electronic device according to an embodiment of the present disclosure. The device includes:
a reading module configured to cause the system-on-chip boot program to read target data of a target area in the memory.
And the checking module is configured to check the target data.
And the starting module is configured to enable the system-on-chip bootstrap program to be normally started and jump to the local bootstrap program in the execution memory when the verification module successfully verifies the target data.
The restoration module is configured to enter a restoration mode when the verification module fails to verify the target data; in repair mode, the system-on-chip boot program jumps and executes the upgrade program to rewrite the repair file containing the local boot program into memory.
In another alternative embodiment, as shown in fig. 5, the electronic device Boot apparatus further includes:
and the self-checking module is configured to enable the system-on-chip bootstrap program to execute power-on self-checking when the electronic equipment is powered on.
And the judging module is configured to judge whether the system-on-chip bootstrap program receives a hardware upgrading signal when the power-on self-test is normal.
And the upgrading module is configured to enable the electronic equipment to enter an upgrading mode when the on-chip system 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 the target data of the 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 units.
The verification module comprises:
and the first acquisition unit is used for reading the target data of the 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.
And the judging unit is used for judging whether the calculated check value is consistent with the 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 the verification result of the target data verification failure is output 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 application, in another aspect the invention also provides an electronic device. The electronic device executes a 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. For the specific steps of the Boot method of the electronic device, please refer to 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 using the Boot method may achieve the same technical effects.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that various changes may be made and equivalents may be substituted for elements thereof; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions.

Claims (10)

1. A Boot method of an electronic device is characterized by comprising the following steps:
reading target data of a target area in a memory by a system-on-chip bootstrap program, wherein the memory is provided with a local bootstrap program;
verifying the target data;
if the target data is verified successfully, the system-on-chip bootstrap program is started normally and jumps to execute the local bootstrap program in the memory;
and if the target data fails to be checked, entering a repair mode, and skipping and executing the upgrading program by the boot program of the system on chip so as to rewrite a repair file containing the local boot program into the memory.
2. Boot method of an electronic device according to claim 1,
before the soc Boot program reads the target data of the target area in the memory, the Boot method of the electronic device further includes the following steps:
the electronic equipment is powered on, and the system-on-chip bootstrap program executes power-on self-test;
if the power-on self-test is normal, the system-on-chip bootstrap program judges whether a hardware upgrading signal is received; if a hardware upgrading signal is received, entering an upgrading mode, and skipping to execute an upgrading program; 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.
3. Boot method of an electronic device according to claim 1,
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 pre-stored in the memory;
judging whether the calculated check value is consistent with the preset check value or not, and if the calculated check value is consistent with the preset check value, successfully checking the target data; and if the calculated check value is inconsistent with a preset check value, the target data check fails.
4. Boot method of an electronic device according to claim 3,
the preset check value is a CRC check value of 1-4 bytes at the end of the target area in the memory.
5. Boot method of an electronic device according to claim 3,
the preset check value is a parity check value of 1-4 bytes at the end of the target area in the memory.
6. A Boot device of an electronic device, comprising:
a read module configured to cause a system-on-chip boot program to read target data of a target area 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 normally started and jump to execute the local bootstrap program in the memory when the verification module successfully verifies the target data; and
a repair module configured to enter a repair mode when the detection module fails to verify the target data, in which a system-on-chip boot program jumps and executes an upgrade program to rewrite a repair file including a local boot program into the memory.
7. Boot apparatus of an electronic device according to claim 6, characterized in that: further comprising:
the self-checking module is configured to enable the system-on-chip bootstrap program to execute power-on 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 upgrading signal when the power-on self-test is normal;
an upgrade module configured to cause the electronic device to enter an upgrade mode when the system-on-chip receives a hardware upgrade signal; and
the drive module is configured to drive the read module to enable a system-on-chip bootstrap program to read target data of a target area in a memory when the system-on-chip does not receive a hardware upgrade signal.
8. Boot apparatus of an electronic device according to claim 6, characterized in that:
the verification module comprises:
a first acquisition unit for reading target data of a target area in the memory;
a calculation unit for calculating a calculation check value of the target data;
a second obtaining unit, configured to read a preset check value of target data of the target area pre-stored in the memory;
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 the verification result of the target data verification failure is output when the calculated verification value is inconsistent with a preset verification value.
9. Boot apparatus of an electronic device according to claim 8, characterized in that:
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 Boot method of the electronic device according to any one of 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 true CN112379932A (en) 2021-02-19
CN112379932B 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)

Cited By (5)

* 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
CN113849212A (en) * 2021-09-30 2021-12-28 蜂巢能源科技有限公司 Software upgrading control method and device and electronic equipment
CN114398087A (en) * 2021-12-20 2022-04-26 鹏城实验室 Method for improving running stability of single chip microcomputer after program updating and single chip microcomputer
CN114780153A (en) * 2022-03-31 2022-07-22 深圳曦华科技有限公司 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

Cited By (8)

* 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
CN113849212A (en) * 2021-09-30 2021-12-28 蜂巢能源科技有限公司 Software upgrading control method and device and electronic equipment
CN113849212B (en) * 2021-09-30 2024-05-14 蜂巢能源科技有限公司 Software upgrading control method and device and electronic equipment
CN114398087A (en) * 2021-12-20 2022-04-26 鹏城实验室 Method for improving running stability of single chip microcomputer after program updating and single chip microcomputer
CN114398087B (en) * 2021-12-20 2023-08-18 鹏城实验室 Method for improving running stability of singlechip after program updating and singlechip
CN114780153A (en) * 2022-03-31 2022-07-22 深圳曦华科技有限公司 Boot program starting method and related device
CN114780153B (en) * 2022-03-31 2023-08-08 深圳曦华科技有限公司 Boot program starting method and related device

Also Published As

Publication number Publication date
CN112379932B (en) 2023-05-23

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
US8423991B2 (en) Embedded network device and firmware upgrading method
US7900036B2 (en) System and method for implementing boot/recovery on a data processing sysem
US7017038B1 (en) Method and system to provide first boot to a CPU system
CN112231136A (en) SoC chip, method for acquiring repair information, storage medium and electronic equipment
US7127596B2 (en) Method and system for improving computer system boot reliability by executing an application specific test during a boot prior loading an operating system
CN107301042A (en) A kind of SoC application program bootstrap techniques with self-checking function
TW201901427A (en) Error detecting apparatus of server and error detecting method thereof
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
WO2015184732A1 (en) Bootstrap storage method, bootstrap fault recovery method and device, and computer storage medium
US7428635B2 (en) Method of writing non-volatile memory that avoids corrupting the vital initialization code
WO2017143513A1 (en) Method, cpu and single board for starting boot
US11061689B2 (en) Synchronization method for performing bi-directional data synchronization for bios
CN111857785B (en) MCU starting method and device and terminal equipment
US20050144611A1 (en) Method for determining program code
KR101844095B1 (en) Method and apparatus for executing bootloader
US11586504B2 (en) Electronic apparatus and boot method thereof
CN110083393B (en) Flash memory and implantable medical device
KR100907550B1 (en) Apparatus and method for recovering corrupted data of serial EPEPROM
TWI467484B (en) Bios for self-verifying option rom and the verifying method thereof
TWI807521B (en) Warning method
TWI685787B (en) Computer apparatus and automatically selecting customized program method thereof
CN110060726B (en) Program detection method of flash memory and implantable medical device

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