Processor bootstrap program loading method and device, equipment and storage medium
Through BootRom detection and preset serial port loading, the problem of the processor in the prior art requiring the emulator or burner to load U-Boot when starting the processor is solved, and the function of loading and running U-Boot without opening the cover or external devices is realized, which simplifies the board design and improves the repair efficiency and convenience.
Patent Information
- Application Number
- CN202411625435.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-03-04
AI Technical Summary
The prior art requires U-Boot loading through an emulator or a burner when the processor is started, resulting in complex board design, occupancy of additional PCB space, and cumbersome operation, especially inconvenient in field services.
Detect whether there is a valid U-Boot in the nonvolatile storage through BootRom. If it does not exist, use the preset serial port to determine the target transmission baud rate, mode and storage location, and obtain and load the valid U-Boot to the processor.
It realizes that when non-volatile memory fails or U-Boot images are damaged, it is possible to load and run U-Boot and repair U-Boot images without opening the cover or using an emulator or burner, simplifying board design, improving U-Boot repair efficiency and field service convenience.
Smart Images

Figure CN119556997A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of embedded technology, and in particular to a method, device, equipment and storage medium for loading a processor boot program. Background Art
[0002] When the boot read-only memory (Boot Read-Only Memory, BootR om) of the prior art processor loads the universal boot loader (U-Boot), it is necessary to read the binary image of U-Boot from the non-volatile memory (NAND flash, SD card, eMMC or SPI flash) into the RAM. When the U-Boot image has not been burned in the non-volatile memory or the U-Boot image burned in the non-volatile memory is damaged, it is necessary to open the cover, load U-Boot into the specified RAM through the emulator connected to the processor, or use the burner of the non-volatile memory to burn U-Boot into the non-volatile memory, so as to realize the loading and running of U-Boot, which requires that in the board design process, an emulator connector or a burner connector needs to be reserved, which occupies additional PCB space, and opening the cover and using the emulator or burner to burn the software is also extremely inconvenient for personnel operation.
[0003] The above process of physically loading U-Boot into RAM through an emulator or a burner is not only cumbersome, but also inconvenient for field service and increases the complexity and cost of hardware design. Summary of the invention
[0004] The present invention provides a method, device, equipment and storage medium for loading a processor boot program, so as to achieve loading and running U-Boot and repairing the U-Boot image without opening the cover or using an emulator or a burner when a non-volatile memory fails or a U-Boot image is damaged.
[0005] According to one aspect of the present invention, a method for loading a processor boot program is provided, comprising:
[0006] When the processor is detected to be started, the BootRom is used to detect whether there is a valid U-Boot in the non-volatile storage;
[0007] When there is no valid U-Boot in the non-volatile storage, determining a target transmission baud rate, a target transmission mode, and a target storage location of the valid U-Boot through a preset serial port;
[0008] Based on the target transmission baud rate, the target transmission mode and the target storage location, a valid U-Boot is obtained, and the valid U-Boot is loaded into the processor.
[0009] According to another aspect of the present invention, there is provided a device for loading a processor boot program, comprising:
[0010] The validity detection module is used to detect whether there is a valid U-Boot in the non-volatile storage through BootRom when detecting that the processor is started;
[0011] A parameter setting module, used for determining a target transmission baud rate, a target transmission mode and a target storage location of the valid U-Boot through a preset serial port when no valid U-Boot exists in the non-volatile storage;
[0012] A program loading module is used to obtain the valid U-Boot based on the target transmission baud rate, the target transmission mode and the target storage location, and load the valid U-Boot into the processor.
[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0014] at least one processor;
[0015] and a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for loading a processor boot program described in any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for loading a processor boot program described in any embodiment of the present invention when executed.
[0018] The technical solution of the embodiment of the present invention includes: when detecting that the processor is started, detecting whether there is a valid U-Boot in the non-volatile storage through BootRom; when there is no valid U-Boot in the non-volatile storage, determining the target transmission baud rate, the target transmission mode and the target storage location of the valid U-Boot through the preset serial port; based on the target transmission baud rate, the target transmission mode and the target storage location, obtaining the valid U-Boot, and loading the valid U-Boot into the processor. The technical solution of the present invention does not need to open the cover or use an emulator or burner to load and run U-Boot and repair the U-Boot image when the non-volatile memory fails or the U-Boot image is damaged. The use of this method can reduce the occupied area of the board PCB where the processor is located, greatly improve the repair efficiency of U-Boot, provide convenience for field services, save manpower and service costs, and improve the competitiveness of the processor. It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easy to understand through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0020] Figure 1 A flowchart of a method for loading a processor boot program provided in Embodiment 1 of the present invention;
[0021] Figure 2 A flowchart of a method for loading U-Boot based on BootRom provided in an embodiment of the present invention;
[0022] Figure 3 A schematic diagram of the structure of a boot program loading device for a processor provided in Embodiment 2 of the present invention;
[0023] Figure 4 This is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0024] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0026] Embodiment 1
[0027] Figure 1 This is a flowchart of a method for loading a processor boot program provided in the first embodiment of the present invention. This embodiment is applicable to the case where a processor BootRom loads U-Boot. The method can be executed by a processor boot program loading device, which can be implemented in the form of hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:
[0028] S110: When it is detected that the processor is started, whether there is a valid U-Boot in the non-volatile storage is detected through BootRom.
[0029] Specifically, when the processor is detected to be started, BootRom can be used to detect whether there is a valid U-Boot in the non-volatile storage, that is, to check whether there is a U-Boot image in the non-volatile storage, and whether the U-Boot image is complete, valid and not tampered with, and whether the version information is consistent.
[0030] In the embodiment of the present invention, if there is a valid U-Boot in the non-volatile storage, the valid U-Boot is obtained through BootRom, and the valid U-Boot is loaded into the random access memory of the processor.
[0031] Specifically, if there is a valid U-Boot in the non-volatile storage, BootRom can read the priority U-Boot image in the non-volatile storage, and then load the valid U-Boot into the random access memory (RAM) of the processor, and then the processor will start to execute the U-Boot code.
[0032] S120: When no valid U-Boot exists in the non-volatile storage, determine a target transmission baud rate, a target transmission mode, and a valid target storage location of the U-Boot through a preset serial port.
[0033] Among them, the preset serial port can be a serial port pre-set for interacting with the user to obtain the target transmission baud rate, target transmission mode and target storage location; the target baud rate can be the number of bits transmitted per second during serial communication, and the target transmission mode can include asynchronous communication, synchronous communication, etc.
[0034] Specifically, if the BootROM fails to find a valid U-Boot image, for example, the non-volatile memory is damaged, the image is deleted or damaged, etc., it can interact with the developer through a preset serial port to determine the target transmission baud rate, target transmission mode, and target storage location of the valid U-Boot.
[0035] In an embodiment of the present invention, determining the target transmission baud rate, the target transmission mode and the effective target storage location of the U-Boot through a preset serial port includes: displaying a parameter setting prompt through a serial port interface corresponding to the preset serial port; receiving the target transmission baud rate, the target transmission mode and the target storage location set on the serial port interface, and determining whether the setting operation has timed out; if the setting operation has not timed out, obtaining the target transmission baud rate, the target transmission mode and the target storage location.
[0036] The parameter setting prompt includes information such as how to set the target transmission baud rate, the target transmission mode, and the target storage location; the target transmission location represents the storage location of the valid U-Boot image.
[0037] Specifically, the parameter setting prompt can be displayed on the corresponding serial port interface through the preset serial port connection and the serial port communication protocol. The user enters the corresponding parameter value in the serial port interface according to the prompt, including the target transmission baud rate, target transmission mode and target storage location. At the same time, the user's setting operation can be monitored, and it can be determined whether the parameter setting is completed within the specified time. If the setting operation does not time out, it means that the target transmission baud rate, target transmission mode and target storage location are valid and can be used for subsequent serial port communication and U-Boot image acquisition.
[0038] S130: Based on the target transmission baud rate, the target transmission mode, and the target storage location, obtain the valid U-Boot, and load the valid U-Boot into the processor.
[0039] In the embodiment of the present invention, obtaining the valid U-Boot based on the target transmission baud rate, the target transmission mode and the target storage location, and loading the valid U-Boot into the processor, includes: the BootRom reads the valid U-Boot from the target storage location based on the target transmission baud rate and the target transmission mode; and loading the valid U-Boot into the random access memory of the processor.
[0040] Specifically, according to the target transmission baud rate and target transmission mode set by the user, the serial port communication parameters are configured to ensure correct communication with the storage device corresponding to the target storage location. Then, the U-Boot image is read from the target storage location through the serial port using the configured communication parameters. Furthermore, after obtaining the U-Boot image, it can be verified again to ensure integrity and correctness. If the U-Boot image verification is valid, it is loaded into the random access memory of the processor through BootRom. In this way, the processor reads and executes the U-Boot code from the RAM for subsequent system initialization and booting.
[0041] In an optional implementation, after loading the valid U-Boot into the processor, the method further includes: guiding the U-Boot to start, and repairing the invalid U-Boot in the non-volatile storage under the command line of the U-Boot.
[0042] Specifically, after loading a valid U-Boot into the processor, the U-Boot startup process will be triggered. U-Boot is an open source boot loader that is responsible for initializing hardware devices, setting system parameters, and preparing for the loading of the operating system.
[0043] After U-Boot starts, a command line interface is provided, where users or developers can enter commands to interact with the system. For example, users can enter corresponding commands to check the U-Boot image in the non-volatile storage and repair it to ensure that a valid U-Boot can be obtained directly from the non-volatile storage next time. Specifically, the valid U-Boot in the current target storage location can be copied to the non-volatile storage, and the invalid U-Boot in the non-volatile storage can be deleted.
[0044] In the embodiment of the present invention, the method further comprises: upgrading the U-Boot image through a network or a serial port under the command line of the U-Boot.
[0045] In a preferred embodiment, when the BootROM detects that the U-Boot image in the non-volatile memory is invalid, it will automatically prompt the user to select the baud rate and loading mode through the serial port, and guide the user to load the U-Boot image into the internal RAM, and then start the normal operation of U-Boot. This process allows the loading and repair of U-Boot to be performed without physically opening the cover or using external devices. At the same time, the logic added in the BootRom is simple, ensuring the security and reliability of the BootRom. Figure 2 The present invention provides a flowchart of a method for loading U-Boot based on BootRom.
[0046] In the technical solution of the embodiment of the present invention, BootROM adds an automatic detection mechanism for the validity of U-Boot; when it is detected that U-Boot is invalid, BootROM provides a user interaction interface through a serial port, and automatically guides the user to complete the loading and starting of U-Boot; the user can complete the upgrade of the U-Boot image through a network or a serial port under the U-Boot command line without physically accessing an emulator or a burner; the physical interface requirements in hardware design are reduced, PCB space is saved, and board design is simplified; the convenience and efficiency of U-Boot repair are improved, and the complexity and cost of field services are reduced; the security and reliability of BootRom are guaranteed.
[0047] The technical solution of the embodiment of the present invention includes: when detecting that the processor is started, detecting whether there is a valid U-Boot in the non-volatile storage through BootRom; when there is no valid U-Boot in the non-volatile storage, determining the target transmission baud rate, target transmission mode and target storage location of the valid U-Boot through a preset serial port; based on the target transmission baud rate, target transmission mode and target storage location, obtaining a valid U-Boot, and loading the valid U-Boot into the processor. The technical solution of the present invention can load and run U-Boot and repair the U-Boot image without opening the cover or using an emulator or burner when the non-volatile memory fails or the U-Boot image is damaged. The method can reduce the occupied area of the board PCB where the processor is located, greatly improve the repair efficiency of U-Boot, provide convenience for field services, save manpower and service costs, and improve the competitiveness of the processor.
[0048] Embodiment 2
[0049] Figure 3This is a schematic diagram of the structure of a boot program loading device for a processor provided in Embodiment 2 of the present invention. Figure 3 As shown, the device comprises:
[0050] The validity detection module 210 is used to detect whether there is a valid U-Boot in the non-volatile storage through BootRom when detecting that the processor is started;
[0051] The parameter setting module 220 is used to determine the target transmission baud rate, the target transmission mode and the target storage location of the valid U-Boot through a preset serial port when there is no valid U-Boot in the non-volatile storage;
[0052] The program loading module 230 is used to obtain the valid U-Boot based on the target transmission baud rate, the target transmission mode and the target storage location, and load the valid U-Boot into the processor.
[0053] The technical solution of the embodiment of the present invention includes: when detecting that the processor is started, detecting whether there is a valid U-Boot in the non-volatile storage through BootRom; when there is no valid U-Boot in the non-volatile storage, determining the target transmission baud rate, target transmission mode and target storage location of the valid U-Boot through a preset serial port; based on the target transmission baud rate, target transmission mode and target storage location, obtaining a valid U-Boot, and loading the valid U-Boot into the processor. The technical solution of the present invention can load and run U-Boot and repair the U-Boot image without opening the cover or using an emulator or burner when the non-volatile memory fails or the U-Boot image is damaged. The method can reduce the occupied area of the board PCB where the processor is located, greatly improve the repair efficiency of U-Boot, provide convenience for field services, save manpower and service costs, and improve the competitiveness of the processor.
[0054] Optionally, also include:
[0055] A repair module is used to repair the invalid U-Boot in the non-volatile storage under the command line of the U-Boot.
[0056] Optionally, the device further comprises:
[0057] The direct acquisition module is used to obtain the valid U-Boot through BootRom if there is a valid U-Boot in the non-volatile storage, and load the valid U-Boot into the random access memory of the processor.
[0058] Optionally, the parameter setting module 220 is specifically used to:
[0059] Display parameter setting prompts through the serial port interface corresponding to the preset serial port;
[0060] receiving a target transmission baud rate, a target transmission mode, and a target storage location set on the serial port interface, and determining whether the setting operation has timed out;
[0061] If the setting operation does not time out, the target transmission baud rate, the target transmission mode and the target storage location are obtained.
[0062] Optionally, the program loading module 230 is specifically used for:
[0063] The BootRom reads the valid U-Boot from the target storage location based on the target transmission baud rate and the target transmission mode;
[0064] Load the valid U-Boot into the random access memory of the processor.
[0065] Optionally, the device further comprises an upgrade module, which is used to upgrade the U-Boot image through a network or a serial port under the command line of the U-Boot.
[0066] The processor boot program loading device provided in the embodiment of the present invention can execute the processor boot program loading method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0067] Embodiment 3
[0068] Figure 4 A schematic diagram of the structure of an electronic device provided for Embodiment 3 of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0069] like Figure 4As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0070] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0071] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a method for loading a processor boot program.
[0072] In some embodiments, the method for loading a processor boot program may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for loading a processor boot program described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the method for loading a processor boot program by any other appropriate means (e.g., by means of firmware).
[0073] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0074] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0075] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0076] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0077] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0078] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0079] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0080] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for loading a processor boot program, characterized in that: include: When the processor is detected to be started, the BootRom is used to detect whether there is a valid U-Boot in the non-volatile storage; When there is no valid U-Boot in the non-volatile storage, determining a target transmission baud rate, a target transmission mode, and a target storage location of the valid U-Boot through a preset serial port; Based on the target transmission baud rate, the target transmission mode and the target storage location, a valid U-Boot is obtained, and the valid U-Boot is loaded into the processor.
2. The method according to claim 1, characterized in that The method further comprises: If there is a valid U-Boot in the non-volatile storage, the valid U-Boot is obtained through BootRom, and the valid U-Boot is loaded into the random access memory of the processor.
3. The method according to claim 1, characterized in that: The step of determining a target transmission baud rate, a target transmission mode, and a valid target storage location of the U-Boot by presetting the serial port includes: Display parameter setting prompts through the serial port interface corresponding to the preset serial port; receiving a target transmission baud rate, a target transmission mode, and a target storage location set on the serial port interface, and determining whether the setting operation has timed out; If the setting operation does not time out, the target transmission baud rate, the target transmission mode and the target storage location are obtained.
4. The method according to claim 3, characterized in that The obtaining the valid U-Boot based on the target transmission baud rate, the target transmission mode and the target storage location, and loading the valid U-Boot into the processor, comprises: The BootRom reads the valid U-Boot from the target storage location based on the target transmission baud rate and the target transmission mode; Load the valid U-Boot into the random access memory of the processor.
5. The method according to claim 1, characterized in that After loading the valid U-Boot into the processor, the method further comprises: The U-Boot is guided to start, and under the command line of the U-Boot, the invalid U-Boot in the non-volatile storage is repaired.
6. The method according to claim 5, characterized in that The method further comprises: Under the command line of the U-Boot, the U-Boot image is upgraded through a network or a serial port.
7. A processor boot program loading device, characterized in that: include: The validity detection module is used to detect whether there is a valid U-Boot in the non-volatile storage through BootRom when detecting that the processor is started; A parameter setting module, used for determining a target transmission baud rate, a target transmission mode and a target storage location of the valid U-Boot through a preset serial port when no valid U-Boot exists in the non-volatile storage; A program loading module is used to obtain the valid U-Boot based on the target transmission baud rate, the target transmission mode and the target storage location, and load the valid U-Boot into the processor.
8. The device according to claim 7, characterized in that include: A repair module is used to repair the invalid U-Boot in the non-volatile storage under the command line of the U-Boot.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for loading a processor boot program according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for loading a processor boot program according to any one of claims 1 to 6 when the processor executes the computer instructions.