CN-122018944-A - BOOT upgrading method, BOOT upgrading equipment and storage medium
Abstract
The application provides a BOOT upgrading method, equipment and a storage medium, which belong to the technical field of computers, wherein the BOOT upgrading method comprises the steps of calling a first BOOT program of a BOOT partition in an equipment memory, downloading an upgrading file packet to an application program partition in the equipment memory, wherein the upgrading file packet comprises a second BOOT program and an upgrading auxiliary file, calling the first program in the upgrading auxiliary file, copying the second BOOT program stored in the application program partition to the BOOT partition so as to cover the first BOOT program, and finishing BOOT upgrading. The method directly uses the storage space of the application program partition to temporarily store related programs and files required by BOOT upgrading, does not need to additionally arrange other storage spaces to store the programs and files, and can be effectively applied to BOOT upgrading in the scenes of small storage space of equipment such as household storage, micro-inverter, relay, standby power box and the like.
Inventors
- WU GUILONG
- WANG YUHUAN
- CAI XIAOXUE
Assignees
- 上海摩瓦新能源科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260413
Claims (10)
- 1. The BOOT upgrading method is characterized by comprising the following steps of: Invoking a first BOOT program of a BOOT partition in a device memory, and downloading an upgrade file package to an application program partition in the device memory, wherein the upgrade file package comprises a second BOOT program and an upgrade auxiliary file; And calling a first program in the upgrading auxiliary file, copying the second BOOT program stored in the application program partition to the BOOT partition so as to cover the first BOOT program, and finishing BOOT upgrading.
- 2. The BOOT upgrade method according to claim 1, further comprising: under the condition that the first condition is met, a second program in the upgrading auxiliary file is called, and a third BOOT program is downloaded to the equipment memory so as to cover the first BOOT program by the third BOOT program, and BOOT upgrading is completed; And the condition that the BOOT upgrading cannot be completed by the second BOOT program is characterized by meeting a first condition.
- 3. The BOOT upgrade method according to claim 2, wherein the calling the second program in the upgrade auxiliary file, and downloading a third BOOT program to the device memory to cover the first BOOT program with the third BOOT program, completes the BOOT upgrade, comprises: And calling a second program in the upgrading auxiliary file, and downloading a third BOOT program to the BOOT partition so as to cover the first BOOT program, thereby completing BOOT upgrading.
- 4. The BOOT upgrade method according to claim 2, wherein the calling the second program in the upgrade auxiliary file, and downloading a third BOOT program to the device memory to cover the first BOOT program with the third BOOT program, completes the BOOT upgrade, comprises: Invoking a second program in the upgrading auxiliary file, and downloading a third BOOT program to a partition used for storing the second BOOT program in the application program partition so as to cover the second BOOT program; And calling a first program in the upgrading auxiliary file, copying the third BOOT program to the BOOT partition so as to cover the first BOOT program, and finishing BOOT upgrading.
- 5. The BOOT upgrade method according to any one of claims 1-4, further comprising: Under the condition that the verification information also included in the upgrade file packet does not carry an upgrade mark, determining that the BOOT upgrade cannot be completed by using the second BOOT program, and waiting for invoking the second program in the upgrade auxiliary file to upgrade; And/or the number of the groups of groups, Determining that the BOOT upgrading cannot be completed by using the second BOOT program under the condition that the second BOOT program in the application program partition is detected to pass verification and the number of attempts is larger than a first preset threshold value, and waiting for calling the second program in the upgrading auxiliary file to upgrade; And/or the number of the groups of groups, After the second BOOT program in the upgrade file package is copied to the BOOT partition, if the second BOOT program in the BOOT partition is detected to be not checked and the number of attempts is larger than a second preset threshold, determining that BOOT upgrade cannot be completed by using the second BOOT program, and waiting for calling the second program in the upgrade auxiliary file to upgrade.
- 6. The BOOT upgrade method according to claim 1, wherein said calling a first program in the upgrade auxiliary file copies the second BOOT program stored in the application program partition to the BOOT partition, comprising: invoking a first program in the upgrade auxiliary file, and executing the following steps: reading verification information further included in the upgrade file package, wherein the verification information is used for verifying the second BOOT program; under the condition that the verification information carries an upgrading mark is detected, verifying a second BOOT program in the upgrading file packet by using the verification information; And copying the second BOOT program stored in the application program partition to the BOOT partition under the condition that the second BOOT program in the upgrade file packet passes verification.
- 7. The BOOT upgrade method according to claim 1 or 6, further comprising, after said copying said second BOOT program stored in said application partition to said BOOT partition: Verifying a second BOOT program in the BOOT partition by using verification information further included in the upgrade file packet; in the event that a second BOOT program in the BOOT partition is determined to pass the verification, the verification information is cleared in the application partition, Or setting a preset flag bit in the verification information to be a first value, wherein the first value is used for representing that the BOOT is updated.
- 8. The BOOT upgrade method according to claim 1, further comprising: and under the condition that the BOOT upgrading is completed, resetting and restarting the equipment, calling a second BOOT program in the BOOT partition, and upgrading the application program of the equipment to reset the application program partition.
- 9. A BOOT upgrade apparatus, comprising: the device comprises a downloading module, a loading module and a loading module, wherein the downloading module is used for calling a first BOOT program of a BOOT partition in a device memory and downloading an upgrade file package to an application program partition in the device memory, and the upgrade file package comprises a second BOOT program and an upgrade auxiliary file; And the processing module is used for calling the first program in the upgrading auxiliary file, copying the second BOOT program stored in the application program partition to the BOOT partition so as to cover the first BOOT program, and finishing BOOT upgrading.
- 10. A non-transitory computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the BOOT upgrade method of any one of claims 1 to 8.
Description
BOOT upgrading method, BOOT upgrading equipment and storage medium Technical Field The present application relates to the field of computer technologies, and in particular, to a BOOT upgrade method, apparatus, and storage medium. Background The BOOT loader is the first program executed after the micro control unit (Microcontroller Unit, MCU) is powered on, and although a technician designs the required functions as completely as possible at the beginning of BOOT development to avoid upgrading the BOOT in the future as possible, it is difficult to truly achieve never upgrading the updated BOOT with the acceleration of the update iteration period of the embedded device, so a method for upgrading the BOOT is needed to be designed. At present, a mode of reversely upgrading the BOOT program is proposed, namely, an Application (APP) upgrades the BOOT program. However, the current mode of backward upgrading the BOOT has high requirement on the storage space of the device memory, and the required storage space is larger, so that the device memory is difficult to be compatible with the scenes with smaller storage space of the devices such as user storage and the like. Disclosure of Invention The application provides a BOOT upgrading method, equipment and a storage medium, which are used for solving the problem that in the prior art, the equipment such as a user storage and the like is difficult to be compatible with a scene with a small storage space. In a first aspect, the present application provides a BOOT upgrade method, including: Invoking a first BOOT program of a BOOT partition in a device memory, and downloading an upgrade file package to an application program partition in the device memory, wherein the upgrade file package comprises a second BOOT program and an upgrade auxiliary file; And calling a first program in the upgrading auxiliary file, copying the second BOOT program stored in the application program partition to the BOOT partition so as to cover the first BOOT program, and finishing BOOT upgrading. In some of these embodiments, the method further comprises: under the condition that the first condition is met, a second program in the upgrading auxiliary file is called, and a third BOOT program is downloaded to the equipment memory so as to cover the first BOOT program by the third BOOT program, and BOOT upgrading is completed; And the condition that the BOOT upgrading cannot be completed by the second BOOT program is characterized by meeting a first condition. In some embodiments, the calling the second program in the upgrade auxiliary file, and downloading a third BOOT program to the device memory to cover the first BOOT program with the third BOOT program, so as to complete a BOOT upgrade, includes: And calling a second program in the upgrading auxiliary file, and downloading a third BOOT program to the BOOT partition so as to cover the first BOOT program, thereby completing BOOT upgrading. In some embodiments, the calling the second program in the upgrade auxiliary file, and downloading a third BOOT program to the device memory to cover the first BOOT program with the third BOOT program, so as to complete a BOOT upgrade, includes: Invoking a second program in the upgrading auxiliary file, and downloading a third BOOT program to a partition used for storing the second BOOT program in the application program partition so as to cover the second BOOT program; And calling a first program in the upgrading auxiliary file, copying the third BOOT program to the BOOT partition so as to cover the first BOOT program, and finishing BOOT upgrading. In some of these embodiments, the method further comprises: Under the condition that the verification information also included in the upgrade file packet does not carry an upgrade mark, determining that the BOOT upgrade cannot be completed by using the second BOOT program, and waiting for invoking the second program in the upgrade auxiliary file to upgrade; And/or the number of the groups of groups, Determining that the BOOT upgrading cannot be completed by using the second BOOT program under the condition that the second BOOT program in the application program partition is detected to pass verification and the number of attempts is larger than a first preset threshold value, and waiting for calling the second program in the upgrading auxiliary file to upgrade; And/or the number of the groups of groups, After the second BOOT program in the upgrade file package is copied to the BOOT partition, if the second BOOT program in the BOOT partition is detected to be not checked and the number of attempts is larger than a second preset threshold, determining that BOOT upgrade cannot be completed by using the second BOOT program, and waiting for calling the second program in the upgrade auxiliary file to upgrade. In some of these embodiments, the calling the first program in the upgrade auxiliary file copies the second BOOT program stored in the application program partiti