Method, electronic device and storage medium for upgrading signed firmware
By generating random numbers and storing public key parameter information and digital signature algorithm type in a trusted and secure operating system, the signature firmware upgrade process is ensured to be carried out in a trusted environment, which solves the problem of insufficient security in signature firmware upgrades and achieves a highly secure upgrade process and improved device debugging efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- FUZHOU ROCKCHIP SEMICON
- Filing Date
- 2023-01-09
- Publication Date
- 2026-04-10
AI Technical Summary
In existing technologies, the upgrade of signature firmware involves verifying and checking public key information in an untrusted environment, which makes it impossible to guarantee security and meet the application scenarios with high security requirements.
The system generates random numbers, public key parameters, and digital signature algorithm types in a static trusted application within a trusted and secure operating system. These are then stored in secure storage. The random numbers are written into command-line parameters, and the static trusted application verifies the signed firmware to be upgraded based on this information. Once the verification is successful, the upgrade is performed.
By performing both public key storage and verification in a trusted environment and using random numbers to ensure that the values are different each time the device is started, the security of signed firmware upgrades is maximized, the problem of upgrade failure after device meltdown is solved, and the development and debugging efficiency before the device leaves the factory is improved.
Smart Images

Figure CN116204867B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of embedded devices, and particularly relates to a method for upgrading signed firmware, an electronic device and a storage medium. BACKGROUND
[0002] In the existing upgrading scheme for signed firmware for secure boot, the public key information of the signed firmware is usually verified to be delivered in a non-trustworthy environment, and the verification itself is also executed in the non-trustworthy environment, the non-trustworthy environment refers to a rich execution environment (REE), thus the security of the signed firmware upgrading cannot be guaranteed, and thus some application scenarios with high security requirements cannot be met. SUMMARY
[0003] Embodiments of the present application provide a method for upgrading signed firmware, an electronic device and a storage medium, which can maximize the security of the signed firmware upgrading.
[0004] In an aspect of the present application, a method for upgrading signed firmware is provided. The method comprises: obtaining public key parameter information and a digital signature algorithm type from a boot loader firmware in signed to-be-upgraded firmware; generating a random number by a static trusted application in a trusted secure operating system, and saving the random number, the public key parameter information and the digital signature algorithm type to a secure storage; writing the random number into a command line parameter; verifying the signed to-be-upgraded firmware based on the random number in the command line parameter, the public key parameter information in the secure storage and the digital signature algorithm type by the static trusted application; and if the result of the verification is successful, upgrading the signed to-be-upgraded firmware.
[0005] In another aspect of the present application, an electronic device is provided. The electronic device comprises a memory configured to store a computer program; and a processor configured to execute the computer program to perform the above-mentioned method for upgrading signed firmware.
[0006] In still another aspect of the present application, a computer readable medium is provided. The medium has a computer program stored thereon, the computer program being executed by a processor to implement the above-mentioned method for upgrading signed firmware.
[0007] According to the application, a random number is generated by a static trusted application in a trusted security operating system, and the random number, public key parameter information and digital signature algorithm type are saved to a secure storage, the random number is written into a command line parameter, and the static trusted application verifies the signed to-be-upgraded firmware based on the random number in the command line parameter, the public key parameter information in the secure storage and the digital signature algorithm type, and the upgrading is performed only after the verification is successful, so that the public key storage and verification process are both performed in a trusted environment, and the random number is used to ensure that the value is different each time the device is started, thereby maximizing the security of the signed firmware upgrading. BRIEF DESCRIPTION OF DRAWINGS
[0008] Figure 1 A flowchart of steps of the method for upgrading signed firmware according to the embodiment of the application;
[0009] Figure 2 A flowchart of the method for upgrading signed firmware according to the embodiment of the application;
[0010] Figure 3 A structural schematic diagram of the electronic device according to the embodiment of the application. DETAILED DESCRIPTION
[0011] To make the technical content, the achieved purposes and effects of the application clear, the following will be described in detail in combination with the embodiments and the accompanying drawings.
[0012] In the prior art, the public key information of the signed firmware is usually verified in a non-trusted environment, and the verification itself is also performed in a non-trusted environment, the non-trusted environment refers to a rich execution environment (REE), and thus the security of the signed firmware upgrading cannot be guaranteed.
[0013] To solve at least the above technical problem, the disclosure provides a method for upgrading signed firmware. According to the disclosure, a random number is generated by a static trusted application in a trusted security operating system, and the random number, public key parameter information and digital signature algorithm type are saved to a secure storage, the random number is written into a command line parameter, and the static trusted application verifies the signed to-be-upgraded firmware based on the random number in the command line parameter, the public key parameter information in the secure storage and the digital signature algorithm type, and the upgrading is performed only after the verification is successful. In this way, according to the embodiment of the disclosure, the public key storage and verification process are both performed in a trusted environment, and the random number is used to ensure that the value is different each time the device is started, thereby maximizing the security of the signed firmware upgrading.
[0014] Hereinafter, the technical solution according to the disclosure will be described with reference to specific embodiments and in combination with the accompanying drawings.
[0015] Figure 1is a flow chart illustrating a method 100 of upgrading signed firmware according to an embodiment of the present disclosure. Referring to Figure 1 The method 100 comprises the following steps 102-110.
[0016] At step 102, the public key parameter information and the digital signature algorithm type are obtained from the boot loader firmware in the signed firmware to be upgraded. In some embodiments, the device is securely booted, and the corresponding firmware is loaded from the boot storage medium (such as eMMC, embedded Multi Media Card) step by step and verified. After the secure boot boot loader and the trusted secure operating system are booted, the public key parameter information and the digital signature algorithm type in the boot loader firmware contained in the signed firmware to be upgraded are read out by the boot loader.
[0017] In some embodiments, the method 100 can further comprise signing the firmware to be upgraded to obtain the signed firmware to be upgraded; writing the public key parameter information and the digital signature algorithm type to a preset position of the boot loader firmware in the signed firmware to be upgraded; and storing the signed firmware to be upgraded to a firmware upgrade package. In this way, the public key related information can be obtained through the boot loader firmware.
[0018] At step 104, a random number is generated by a static trusted application in the trusted secure operating system (such as OP-TEE), and the random number, the public key parameter information and the digital signature algorithm type are saved to a secure storage. In some embodiments, a first instruction is generated by the boot loader based on the digital signature algorithm type and the public key parameter, and the first instruction is sent to the static trusted application. In some embodiments, the first instruction is received by the static trusted application in the trusted secure operating system, and the public key parameter information and the digital signature algorithm type are obtained based on the first instruction; a random number is generated by the static trusted application, and the random number, the public key parameter information and the digital signature algorithm type are saved to a secure storage; and the generated random number is returned. In this way, using the method of generating a random number can ensure that the value is different every time the device is started, thereby maximizing the security of communication.
[0019] In step 106, the random number is written into a command line parameter (e.g., verify_random). In some embodiments, the random number is written into the command line parameter by the boot loader. In this way, the device generates a random number in the trusted secure operating system each time it boots and returns the random number to the boot loader firmware to write into the command line parameter. Subsequently, each time the CA (Client Application) upgrades, it needs to obtain the random number from the command line parameter as a communication credential with the TA (Trusted Application) so that the TA authenticates the CA to ensure that the communication is secure and legal, thereby improving the security of the signed firmware upgrade.
[0020] In some embodiments, step 106 can further include writing a fuse flag (e.g., fuse.programmed) and a system flag (e.g., androidboot.slot_suffix) into the command line parameter by the boot loader together with the random number. In this way, the upgrade is facilitated based on the fuse flag and the system flag in the command line parameter subsequently.
[0021] In step 108, the signed firmware to be upgraded is verified by the Trusted Application based on the random number in the command line parameter, the public key parameter information in the secure storage, and the digital signature algorithm type. In some embodiments, the random number is read from the command line parameter by the Client Application corresponding to the Trusted Application, a second instruction is generated based on the random number, and the second instruction is sent to the Trusted Application. In some embodiments, the second instruction is received by the Trusted Application, and the random number is obtained based on the second instruction; the random number is read from the secure storage by the Trusted Application; it is determined by the Trusted Application whether the obtained random number is consistent with the read random number; if consistent, the public key parameter information and the digital signature algorithm type are read from the secure storage by the Trusted Application; and the signed firmware to be upgraded is verified by the Trusted Application using the public key parameter information and the digital signature algorithm type.
[0022] In some embodiments, the method 100 can further include: obtaining, by the upgrade program client, the firmware upgrade package, and calculating a digital digest corresponding to the firmware upgrade package using a preset digital digest algorithm; selecting, by the upgrade program client, all signed firmware to be upgraded from the firmware upgrade package, and writing binary files of the all signed firmware to be upgraded into a memory or a read-write file system partition; sorting, by the upgrade program client, the all signed firmware to be upgraded according to file sizes, so as to sequentially verify the sorted all signed firmware to be upgraded. In some embodiments, sending, by the static trusted application, binary data of the signed firmware to be upgraded to a client application corresponding to the static trusted application; reading, by the client application, a random number in the command line parameter, and generating a plurality of second instructions according to the random number, the binary data of the signed firmware to be upgraded, and whether the last block of data flag; sequentially sending, by the client application, the plurality of second instructions to the static trusted application; reading, by the static trusted application, the random number from the secure storage, and determining whether the read random number is consistent with the random number in the second instruction; if consistent, extracting, by the static trusted application, binary data of the firmware to be upgraded carried by the second instruction; when receiving the last block of data, reading, by the static trusted application, the public key parameter information and the digital signature algorithm type from the secure storage, to verify the firmware to be upgraded; if the verification result is successful, encrypting, by the client application, the digital digest corresponding to the firmware upgrade package and the verification result using a preset symmetric encryption algorithm and key, to obtain a ciphertext, and storing the ciphertext to a first position of the boot communication partition. In this way, the key storage and verification process are all executed in a trusted execution environment (TEE), and the key storage and the entire verification process are invisible to a non-secure operating system environment (such as Android), thereby maximizing the upgrade security of the signed firmware.
[0023] At step 110, if the result of the verification is successful, the signed firmware to be upgraded is upgraded. In some embodiments, if the result of the verification is successful, the ciphertext in the first position is read; the ciphertext is decrypted using a preset symmetric encryption algorithm and key; if the result of the decryption is successful, the signed firmware to be upgraded is upgraded according to the system mark. In some embodiments, it is determined whether the system mark indicates that the device is a dual-system; if yes, the signed firmware to be upgraded is subjected to a normal dual-system upgrade process, and after the upgrade is completed, garbage code is written to the first position; if no, the device is guided to enter a firmware upgrade mode for upgrade. In this way, when the system type is a single-system, the device is guided to enter the firmware upgrade mode for upgrade, and when the system type is a dual-system, the normal dual-system upgrade process is executed, thereby improving the firmware upgrade efficiency. In some embodiments, the single-system is a non-A / B system, i.e., there is only one set of firmware, and the dual-system is an A / B system, i.e., there are two sets of firmware.
[0024] In some embodiments, step 110 can further include: if the result of the verification is unsuccessful, it is determined whether the fuse mark indicates that the device is fused; if yes, the upgrade process is exited; and if no, a risk prompt information is output, and feedback information corresponding to the risk prompt information is received; if the feedback information indicates that the upgrade is continued, the signed firmware to be upgraded is upgraded according to the system mark; and if the feedback information indicates that the upgrade is not continued, the upgrade process is exited. In this way, the problem that the device cannot be started after the device is fused and the firmware without signature or with incorrect signature is upgraded is solved, and at the same time, the legal upgrade package without signature or with incorrect signature is supported to be upgraded when the device is not fused, thereby improving the development and debugging efficiency before the device is shipped.
[0025] Hereinafter, the application scenarios of the method and device for upgrading the signed firmware according to the embodiments of the present application will be described by examples.
[0026] Figure 2 FIG. 1 is a flowchart illustrating a method for upgrading a signed firmware according to an embodiment of the present application, including the following steps 101 to 110.
[0027] At step 101, a firmware to be upgraded is signed to obtain a signed firmware to be upgraded; when the boot program firmware is signed, public key parameter information and a digital signature algorithm type are written to a preset position of the boot program firmware in the signed firmware to be upgraded; and the signed firmware to be upgraded is stored into a firmware upgrade package.
[0028] 0At step 202, the device is securely booted, and the corresponding firmware is loaded from the boot storage medium step by step and verified. After the secure booting boot program and the trusted secure operating system are booted, the boot program obtains the public key parameter information and the digital signature algorithm type from the boot program firmware in the signed to-be-upgraded firmware, and generates an instruction 1 by taking the digital signature algorithm type and the public key parameter information as input parameters. The instruction 1 is sent to a static trusted application (static TA) in the trusted secure operating system.
[0029] 5At step 203, after the static TA in the trusted secure operating system receives the instruction 1, the static TA saves the digital signature algorithm type and the public key parameter information to a secure storage, then generates a random number and saves the random number to the secure storage, and returns the generated random number to the boot program.
[0030] At step 204, the boot program writes the returned random number into a command line parameter (such as verify_random), and also writes a fuse mark (such as fuse.programmed) and a system mark (such as 0androidboot.slot_suffix) into the command line parameter, and verifies the boot program (such as boot) in the storage medium to be booted.
[0031] After the verification is passed, the boot program is booted.
[0032] At step 205, when the upgrade program client detects that there is a new version of firmware to be upgraded, the complete firmware upgrade package is obtained, a digital digest corresponding to the firmware upgrade package is calculated by using a preset digital digest algorithm, and all signed to-be-upgraded firmware is extracted from the firmware upgrade package.
[0033] The binary file of the signed to-be-upgraded firmware is written into the memory or the read-write file system partition.
[0034] At step 206, the binary files of all the signed to-be-upgraded firmware are sorted according to file sizes, and the verification is sequentially performed on the signed to-be-upgraded firmware from the smallest file size.
[0035] At step 207, the upgrade program client sends an instruction to the CA corresponding to the TA, so that the binary data of the signed to-be-upgraded firmware is completely sent to the CA.
[0036] At step 208, the CA program receives the random number from the command line parameter, and sends an instruction 2 to the corresponding TA in the trusted security operating system, the instruction 2 including the random number read from the command line parameter, the binary data of the signed firmware to be upgraded, and a last block data flag. The CA can send the instruction 2 to the TA multiple times by dividing the binary data of the signed firmware to be upgraded into blocks, until the last block of data is sent, at which time the last block data flag is set to true, otherwise it is set to false.
[0037] At step 209, the TA in the trusted security operating system receives the instruction 2, reads the saved random number from the secure storage, and determines whether the read random number is consistent with the random number in the instruction 2. If not, an error message is returned. If so, the binary data of the signed firmware to be upgraded in the instruction 2 is obtained. When the last block of data is received, the digital signature algorithm type and public key parameter information are read from the secure storage, the binary data of the signed firmware to be upgraded is verified, and the verification result is returned to the CA. When the received data is not the last block of data, the received data is temporarily saved, and the success or failure of the operation is returned to the CA.
[0038] At step 210, the CA waits for the return of the operation result after sending each instruction 2. If it is not the last block of data and the operation result returns success, the next block of data is sent. If the operation result returns failure, the verification result is set to failure, the digital digest of the firmware upgrade package and the verification result are encrypted using a preset symmetric encryption algorithm and key, the encrypted ciphertext is stored in position 1 of the boot communication partition, and an operation error message is returned to the upgrade program client. If it is the last block of data, the verification result is waited for, the digital digest of the firmware upgrade package and the verification result are encrypted using a preset symmetric encryption algorithm and key, the encrypted ciphertext is stored in position 1 of the boot communication partition, and an operation success message is returned to the upgrade program client.
[0039] At step 211, if the upgrade program client receives an operation error message, it determines whether the fuse flag indicates that the device is fused. If it indicates that the device is fused, the user is prompted to exit the upgrade process. If it indicates that the device is not fused, a risk prompt message is output, and feedback information corresponding to the risk prompt message is received. If the feedback information indicates that the upgrade is to continue, step 213 is performed. If the feedback information indicates that the upgrade is not to continue, the upgrade process is exited.
[0040] At step 212, if the operation is successful, the upgrade program client reads the ciphertext of the boot communication partition location 1, and decrypts the ciphertext using the preset symmetric encryption algorithm and key to obtain the verification result. If the verification is successful and all signed firmware to be upgraded in the upgrade package has been verified, the following step 213 is performed, otherwise, the next binary file of the signed firmware to be upgraded is taken out and step 207 is performed. If the verification fails, step 211 is performed.
[0041] At step 213, it is determined whether the system flag indicates that the device is an A / B system. If yes, the normal A / B system upgrade process is performed on the verified firmware upgrade package, and after the upgrade is completed, garbage code is written to location 1 of the boot communication partition. If no, the device is guided into the firmware upgrade mode (such as recovery) for upgrade.
[0042] At step 214, the device is securely started, and the corresponding firmware is loaded from the starting storage medium (such as eMMC) step by step and verified. After the secure boot starts the boot program, the boot program writes the fuse flag (such as fuse.programmed) to the command line parameter, and then verifies the upgrade mode firmware (such as recovery) in the storage medium to be guided. After the verification is passed, the upgrade mode firmware is guided.
[0043] At step 215, in the firmware upgrade mode, the ciphertext is read from location 1 of the boot communication partition, and the ciphertext is decrypted using the preset symmetric encryption algorithm and key to obtain the verification result and the digital digest of the firmware upgrade package.
[0044] At step 216, the digital digest 1 of the current firmware upgrade package is calculated using the preset digital digest algorithm, and it is determined whether the calculated digital digest 1 is the same as the digital digest of the firmware upgrade package obtained by decryption. If not, an error is prompted, and the upgrade process is exited. If yes, step 217 is performed.
[0045] At step 217, it is determined whether the verification result is successful. If yes, the firmware upgrade process is performed to complete the upgrade of the device firmware, and after the upgrade is completed, garbage code is written to location 1 of the boot communication partition to overwrite the ciphertext storing the verification result and the digital digest of the firmware upgrade package. If no, the fuse flag is read from the command line parameter.
[0046] At step 218, it is determined whether the fuse flag indicates that the device is fused. If yes, the firmware upgrade process is performed to complete the upgrade of the device firmware, and after the upgrade is completed, garbage code is written to location 1 of the boot communication partition. If no, the user is prompted that the verification is incorrect, and the upgrade process is exited.
[0047] The application is particularly suitable for security verification of small firmware, and the small firmware usually includes boot firmware of each level, firmware of a trusted security operating system, and the like.
[0048] According to another aspect of the application, Figure 3 is a schematic diagram of an electronic device 300 for upgrading signed firmware according to an embodiment of the application. Referring to Figure 3 The electronic device 300 comprises a memory 302, a processor 304, and a computer program stored in the memory and executable on the processor, and the processor implements each step of the method for upgrading signed firmware as described above when executing the computer program.
[0049] According to another aspect of the application, a computer readable medium is provided. The computer readable medium stores a computer program executable by a processor to implement the method for upgrading signed firmware as described above.
[0050] To sum up, the method for upgrading signed firmware, the electronic device, and the storage medium provided by the application obtain public key parameter information and a digital signature algorithm type from boot firmware in signed firmware to be upgraded; a static trusted application in a trusted security operating system generates a random number, and saves the random number, the public key parameter information, and the digital signature algorithm type to a secure storage; writes the random number into a command line parameter; verifies the signed firmware to be upgraded based on the random number in the command line parameter, the public key parameter information, and the digital signature algorithm type in the secure storage by the static trusted application; and upgrades the signed firmware to be upgraded after verification succeeds. In this way, the public key storage and verification process are both performed in a trusted environment, and the use of the random number ensures that the value of each device startup is different, thereby maximizing the security of the signed firmware upgrade, solving the problem that the device cannot be started due to no signature or signature error of firmware after device fusing, and supporting upgrading of a legal upgrade package without signature or with signature error in the case that the device is not fused, thereby improving the development and debugging efficiency before the device is shipped.
[0051] The above description is only an embodiment of the application, and does not limit the patent scope of the application, and any equivalent transformation or direct or indirect application in the related technical field based on the content of the specification and drawings of the application is also included in the patent protection scope of the application.
Claims
1. A method of upgrading a signed firmware, the method comprising: The method comprises: obtaining public key parameter information and a digital signature algorithm type from a boot loader firmware in signed firmware to be upgraded; generating a random number by a static trusted application in a trusted secure operating system, and saving the random number, the public key parameter information and the digital signature algorithm type to a secure storage; writing the random number into a command line parameter; verifying the signed firmware to be upgraded by the static trusted application based on the random number in the command line parameter, the public key parameter information and the digital signature algorithm type in the secure storage; and if the verification result is successful, upgrading the signed firmware to be upgraded. The verifying the signed firmware to be upgraded by the static trusted application based on the random number in the command line parameter, the public key parameter information and the digital signature algorithm type in the secure storage comprises: receiving a second instruction by the static trusted application, and obtaining the random number based on the second instruction; reading the random number from the secure storage by the static trusted application; determining whether the obtained random number is consistent with the read random number by the static trusted application; if consistent, reading the public key parameter information and the digital signature algorithm type from the secure storage by the static trusted application; and verifying the signed firmware to be upgraded by the static trusted application using the public key parameter information and the digital signature algorithm type. The obtaining public key parameter information and a digital signature algorithm type from a boot loader firmware in signed firmware to be upgraded comprises:
2. The method of claim 1, wherein, reading out the public key parameter information and the digital signature algorithm type in the boot loader firmware contained in the signed firmware to be upgraded by the boot loader after booting the boot loader and the trusted secure operating system. The method further comprises:
3. The method of claim 2, wherein, generating a first instruction by the boot loader based on the digital signature algorithm type and the public key parameter, and sending the first instruction to the static trusted application. The generating a random number by a static trusted application in a trusted secure operating system, and saving the random number, the public key parameter information and the digital signature algorithm type to a secure storage comprises:
4. The method of claim 1, wherein, receiving a first instruction by the static trusted application in the trusted secure operating system, and obtaining the public key parameter information and the digital signature algorithm type based on the first instruction; generating a random number by the static trusted application, and saving the random number, the public key parameter information and the digital signature algorithm type to a secure storage; and returning the generated random number. The method further comprises:
5. The method of claim 1, wherein, reading out the random number from the command line parameter by a client application corresponding to the static trusted application, generating a second instruction based on the random number, and sending the second instruction to the static trusted application. The method further comprises:
6. The method of claim 1, wherein, obtaining a firmware upgrade package by an upgrade program client, and calculating a digital digest corresponding to the firmware upgrade package using a preset digital digest algorithm; selecting, by the upgrade program client, all signed-to-be-upgraded firmware from the firmware upgrade package, and writing binary files of the all signed-to-be-upgraded firmware into a memory or a read-write file system partition; sequentially sorting, by the upgrade program client, the all signed-to-be-upgraded firmware according to file sizes, so as to sequentially verify the sorted all signed-to-be-upgraded firmware.
7. The method of claim 6, wherein, sequentially verifying the sorted all signed-to-be-upgraded firmware includes: sending, by the static trusted application, binary data of the signed-to-be-upgraded firmware to a client application corresponding to the static trusted application; reading, by the client application, a random number in the command line parameter, and generating a plurality of second instructions according to the random number, the binary data of the signed-to-be-upgraded firmware, and whether the last block of data flag; sequentially sending, by the client application, the plurality of second instructions to the static trusted application; reading, by the static trusted application, the random number from the secure storage, and determining whether the read random number is consistent with the random number in the second instruction; if consistent, extracting, by the static trusted application, binary data of the to-be-upgraded firmware carried by the second instruction; when receiving the last block of data, reading, by the static trusted application, the public key parameter information and the digital signature algorithm type from the secure storage, to verify the to-be-upgraded firmware; if the verification result is successful, encrypting, by the client application, a digital digest corresponding to the firmware upgrade package and the verification result using a preset symmetric encryption algorithm and key, to obtain ciphertext, and storing the ciphertext to a first position of a boot communication partition.
8. The method of claim 7, wherein, further comprising: writing, by the boot program, a fuse flag and a system flag into the command line parameter together with the random number; wherein, upgrading the signed-to-be-upgraded firmware includes: if the verification result is successful, reading the ciphertext in the first position; decrypting the ciphertext using a preset symmetric encryption algorithm and key; if the decrypted verification result is successful, upgrading the signed-to-be-upgraded firmware according to the system flag.
9. The method of claim 8, wherein, upgrading the signed-to-be-upgraded firmware according to the system flag includes: determining whether the system flag indicates that the device is a dual system; if yes, performing a normal dual system upgrade process on the signed-to-be-upgraded firmware, and writing random codes to the first position after the upgrade ends; if no, booting the device into a firmware upgrade mode for upgrading.
10. The method of claim 8, wherein, further comprising: if the verification result is failed, determining whether the fuse flag indicates that the device is fused; if yes, exiting the upgrade process; and if no, outputting a risk prompt information, and receiving feedback information corresponding to the risk prompt information; if the feedback information indicates to continue upgrading, upgrading the signed-to-be-upgraded firmware according to the system flag; if the feedback information indicates not to continue upgrading, exiting the upgrade process.
11. The method of claim 1, wherein, further comprising: signing the to-be-upgraded firmware to obtain signed-to-be-upgraded firmware; writing the public key parameter information and the digital signature algorithm type into a preset position of the boot loader firmware in the signed firmware to be upgraded; and storing the signed firmware to be upgraded into a firmware upgrade package.
12. An electronic device, comprising: comprising: a memory configured to store a computer program; and a processor configured to execute the computer program to perform the method according to any one of claims 1 to 11.
13. A computer readable medium having stored thereon a computer program, characterized in that, the computer program is executed to implement the method according to any one of claims 1 to 11. the computer program is executed to implement the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Firmware upgrading method and device for intelligent equipment, equipment and storage medium
CN110457908A
Method for upgrading signature firmware, electronic equipment and storage medium
CN115357293A