CN111796848A - Bootloader software updating method and device, embedded controller and storage medium - Google Patents

Bootloader software updating method and device, embedded controller and storage medium Download PDF

Info

Publication number
CN111796848A
CN111796848A CN202010651758.7A CN202010651758A CN111796848A CN 111796848 A CN111796848 A CN 111796848A CN 202010651758 A CN202010651758 A CN 202010651758A CN 111796848 A CN111796848 A CN 111796848A
Authority
CN
China
Prior art keywords
bootloader
storage area
software
updating
embedded controller
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.)
Pending
Application number
CN202010651758.7A
Other languages
Chinese (zh)
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.)
FAW Group Corp
Original Assignee
FAW Group Corp
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 FAW Group Corp filed Critical FAW Group Corp
Priority to CN202010651758.7A priority Critical patent/CN111796848A/en
Publication of CN111796848A publication Critical patent/CN111796848A/en
Priority to PCT/CN2021/102761 priority patent/WO2022007656A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application relates to a Bootloader software updating method, a Bootloader software updating device, an embedded controller and a storage medium. The method comprises the following steps: and starting the system, wherein the embedded controller runs the Bootloader software in the Bootloader storage area, downloads the Bootloader updating program through the Bootloader software, stores the Bootloader updating program into the application storage area as the application program of the embedded controller, and runs the Bootloader updating program in the application storage area after the system is restarted so as to realize the updating of the Bootloader software. In the process of updating the Bootloader software, the downloaded Bootloader updating program can be directly stored by using the original application storage area of the embedded controller, and the Bootloader updating program is operated as the application program of the embedded controller, so that the Bootloader software in the Bootloader storage area is updated, and the embedded controller does not need to be newly provided with a special updating partition, so that the updating mode has stronger universality aiming at the embedded controllers of various design schemes, and the application range of the updating mode is improved.

Description

Bootloader software updating method and device, embedded controller and storage medium
Technical Field
The present application relates to the field of software upgrading, and in particular, to a Bootloader software updating method, apparatus, embedded controller, and storage medium.
Background
The embedded controller software system generally comprises Bootloader software and application software, after the system is started, the Bootloader software initializes each relevant device in the system and loads and guides the application software to run, so that the corresponding service function is completed by running the application software. Therefore, in order to meet the software updating requirements of application software, such as function upgrade and bug fixing, the Bootloader software also has a software updating requirement.
In the conventional technology, a storage main area and a storage spare area of Bootloader software can be preset in an embedded controller and used for respectively storing complete Bootloader software. When the Bootloader software needs to be updated, operating Bootloader upgrading software in the storage spare area, and storing the Bootloader upgrading software into the storage main area after the Bootloader upgrading software operates normally, thereby completing upgrading of the Bootloader software. However, the conventional updating method is only suitable for the embedded controller provided with the main storage area and the spare storage area, and the application range is narrow.
Disclosure of Invention
Therefore, it is necessary to provide a Bootloader software updating method, device, embedded controller, and storage medium for solving the technical problem that the application range of the conventional updating method is narrow.
In a first aspect, an embodiment of the present application provides a Bootloader software updating method, which is applied to an embedded controller, where a storage area of the embedded controller includes a Bootloader storage area and an application storage area, and the method includes:
starting a system, operating Bootloader software in a Bootloader storage area, downloading a Bootloader updating program through the Bootloader software, and storing the Bootloader updating program into the application storage area as an application program of the embedded controller;
and restarting the system, and operating the Bootloader updating program to update the Bootloader software.
In a second aspect, an embodiment of the present application provides a Bootloader software updating apparatus, which is integrated in an embedded controller, a storage area of the embedded controller includes a Bootloader storage area and an application storage area, and the apparatus includes:
the downloading module is used for operating the Bootloader software in the Bootloader storage area when the system is started, downloading a Bootloader updating program through the Bootloader software, and storing the Bootloader updating program into the application storage area as an application program of the embedded controller;
and the updating module is used for running the Bootloader updating program when the system is restarted so as to realize the updating of the Bootloader software.
In a third aspect, an embodiment of the present application provides an embedded controller, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the Bootloader software updating method provided in the first aspect of the embodiment of the present application when executing the computer program.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the Bootloader software updating method provided in the first aspect of the embodiment of the present application.
The method and the device for updating the Bootloader software, the embedded controller and the storage medium provided by the embodiment of the application are used for starting a system, the embedded controller runs the Bootloader software in a Bootloader storage area, downloads the Bootloader updating program through the Bootloader software, stores the Bootloader updating program into an application storage area as an application program of the embedded controller, and runs the Bootloader updating program in the application storage area after the system is restarted so as to update the Bootloader software. In the process of updating the Bootloader software, the downloaded Bootloader updating program can be directly stored by using the original application storage area of the embedded controller, and the Bootloader updating program is operated as the application program of the embedded controller, so that the Bootloader software in the Bootloader storage area is updated, and the embedded controller does not need to be newly provided with a special updating partition, so that the updating mode has stronger universality aiming at the embedded controllers of various design schemes, and the application range of the updating mode is improved.
Drawings
Fig. 1 is a schematic diagram of a storage area of an embedded controller according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a Bootloader software updating method provided in an embodiment of the present application;
fig. 3 is another schematic flow chart of the Bootloader software updating method provided in the embodiment of the present application;
fig. 4 is a schematic flowchart of another Bootloader software updating method provided in the embodiment of the present application;
fig. 5 is a schematic structural diagram of a Bootloader software updating apparatus provided in an embodiment of the present application;
fig. 6 is a schematic structural diagram of an embedded controller according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions in the embodiments of the present application are further described in detail by the following embodiments in combination with the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It should be noted that the execution subject of the method embodiments described below may be a Bootloader software updating apparatus, and the apparatus may be implemented as part or all of an embedded controller by software, hardware, or a combination of software and hardware. The following method embodiments are described by taking the example where the execution body is an embedded controller.
For the understanding of those skilled in the art, the following brief description is provided for the division of the storage area of the embedded controller and the function of the Bootloader software:
as shown in fig. 1, a storage area of a general embedded controller may include a Bootloader storage area and an application storage area, where the Bootloader storage area stores Bootloader software, and the application storage area is used to store application programs for implementing various service functions. The Bootloader software has the following functions: booting the application program in the application storage area; downloading a new application program from a server to an application storage area through Over-the-air technology (OTA) or establishing communication with a computer device (such as a diagnostic instrument) through related software and downloading the new application program in the computer device to the application storage area when the application program is upgraded; and when the application program is damaged, the executable binary file of the reloading application program is guided to the application storage area. According to the embodiment of the application, the Bootloader software can be updated by utilizing the existing partition of the storage area of the embedded controller.
Fig. 2 is a schematic flowchart of a Bootloader software updating method provided in an embodiment of the present application. The embodiment relates to a specific process of how the embedded controller updates Bootloader software. As shown in fig. 2, the method may include:
s101, starting a system, operating Bootloader software in a Bootloader storage area, downloading a Bootloader updating program through the Bootloader software, and storing the Bootloader updating program into the application storage area as an application program of the embedded controller.
Specifically, when a system of the embedded controller is started, Bootloader software in a Bootloader storage area is operated, and a Bootloader updating program is obtained by establishing connection between the Bootloader software and an upgrading medium. Optionally, the Bootloader software may download the Bootloader update program from the remote server through the OTA, or establish communication with the computer device (e.g., a diagnostic apparatus) through related software, and download the Bootloader update program stored in the computer device. After the Bootloader updating program is obtained, the Bootloader updating program is stored in an application storage area as an application program of the embedded controller. The Bootloader updating program is used for updating Bootloader software in the Bootloader storage area.
For a general embedded controller, the embedded controller includes a Bootloader storage area and an application storage area, so that the downloaded Bootloader update program can be directly stored by using the existing application storage area of the embedded controller, and a special update partition does not need to be reset for embedded controllers with different architectures.
Optionally, the memory of the embedded controller may be a flash memory (flash), and for this reason, the Bootloader update program may include a flash driver code, so that the storage area of the embedded controller can be changed based on the flash driver code.
And S102, restarting the system, and operating the Bootloader updating program to update the Bootloader software.
Specifically, after downloading of the Bootloader update program is completed, the system is restarted, and the Bootloader update program is operated as an application program of the embedded controller, that is, bootstraper update program in the application storage area is started through bootstraper software in the bootstraper storage area, and the bootstraper update program is operated. After the Bootloader updating program is completely operated, the embedded controller automatically resets, and therefore the Bootloader software is updated.
Through the process, the Bootloader updating program can be automatically and silently operated after the Bootloader updating program is downloaded, the updating of the Bootloader software in the Bootloader storage area is completed, the updating of the Bootloader software is realized without using a special reading and writing tool by a professional, and the updating difficulty of the Bootloader software is greatly reduced.
The method for updating the Bootloader software provided by the embodiment of the application comprises the steps that the system is started, the embedded controller runs the Bootloader software in a Bootloader storage area, the Bootloader updating program is downloaded through the Bootloader software, the Bootloader updating program is stored in an application storage area as the application program of the embedded controller, and the Bootloader updating program in the application storage area is run after the system is restarted, so that the Bootloader software is updated. In the process of updating the Bootloader software, the downloaded Bootloader updating program can be directly stored by using the original application storage area of the embedded controller, and the Bootloader updating program is operated as the application program of the embedded controller, so that the Bootloader software in the Bootloader storage area is updated, and the embedded controller does not need to be newly provided with a special updating partition, so that the updating mode has stronger universality aiming at the embedded controllers of various design schemes, and the application range of the updating mode is improved.
In one embodiment, a running process of the Bootloader updating program is further provided. Optionally, the Bootloader update program includes new Bootloader software, and on the basis of the foregoing embodiment, as shown in fig. 3, the foregoing S102 may include:
s201, erasing data in the Bootloader storage area.
The method comprises the steps that an area to be erased can be preset, so that the area to be erased completely covers a Bootloader storage area, and an embedded controller erases data in the area to be erased, so that the data in the Bootloader storage area can be erased. After the erasing is finished, the embedded controller judges whether the data in the area to be erased is 0xFFFF, if so, the data in the area to be erased is successfully erased. If not, continuing erasing until the data in the area to be erased is 0 xFFFF.
Optionally, the downloaded Bootloader update program may further include location information of the Bootloader storage area, for example, the location information may be a start address and an end address of the Bootloader storage area, or the location information may be a start address of the Bootloader storage area and a size of the Bootloader storage area. In contrast, in S201, data in the Bootloader storage area may be erased according to the location information of the Bootloader storage area.
S202, writing the new Bootloader software into the Bootloader storage area to update the Bootloader software.
After the data in the Bootloader storage area is successfully erased, the embedded controller executes flash write operation, and writes new Bootloader software (namely binary data converted from new Bootloader codes) contained in the Bootloader updating program into the Bootloader storage area. Optionally, after the write operation is completed, the embedded controller may further perform data consistency check on the written data, and if the check is passed, it indicates that the write is successful. If the verification fails, the erasing and writing operations are executed again. By adding data consistency check in the updating process of the Bootloader software, the updating accuracy of the Bootloader software can be improved, and the updating risk of the Bootloader software is reduced.
In order to perform data consistency check, optionally, the downloaded Bootloader update program may further include a first checksum result corresponding to the new Bootloader software, and the data consistency check may be performed in the following process: the embedded controller calculates a second checksum result of the data written into the Bootloader storage area, matches the second checksum result with the first checksum result, and if the second checksum result is matched with the first checksum result, the verification is passed; if the two are not matched, the verification is not passed.
Further, optionally, after the new Bootloader software is successfully written, the embedded controller may further modify a boot identifier of an application program corresponding to the Bootloader software, so that after the system is restarted, the new Bootloader software is run based on the modified boot identifier.
The method includes the steps that a Bootloader updating program is currently stored in an application storage area of an embedded controller, and after new Bootloader software is successfully written in, in order to avoid that the Bootloader updating program is guided to run again after a system is restarted, so that the Bootloader updating program runs repeatedly, a boot identifier of an application program corresponding to the Bootloader software needs to be modified, the new Bootloader software runs based on the modified boot identifier after the system is restarted, and then the application program needed by a corresponding service function is downloaded again through the new Bootloader software.
In practical applications, in order to prevent a false update of the Bootloader software, on the basis of the foregoing embodiment, optionally before the foregoing S201, the method may further include: reading the version number of Bootloader software in a Bootloader storage area; and determining whether the Bootloader software is to-be-updated Bootloader software according to the version number. Correspondingly, the process of S201 may be: and erasing the data in the Bootloader storage area under the condition that the Bootloader software is determined to be the Bootloader software to be updated.
In this embodiment, the embedded controller erases data in the Bootloader storage area, and writes new Bootloader software in the Bootloader update program into the Bootloader storage area to update the Bootloader software, and the update of the Bootloader software can be completed without a professional read-write tool, thereby reducing the update difficulty of the Bootloader software. Meanwhile, data consistency verification is added in the updating process of the Bootloader software, so that the updating accuracy of the Bootloader software is improved, and the updating risk of the Bootloader software is greatly reduced.
On the basis of the foregoing embodiment, optionally before S201, the method may further include, in order to prevent the embedded controller from having a system unresponsive condition, that is, in order to enable the embedded controller to directly run the Bootloader update program after being powered on, for a case that the embedded controller is suddenly powered off during an actual Bootloader software update process, where: and changing the starting zone bit of the embedded controller to enable the starting zone bit to point to the initial address of the application storage area.
Therefore, after power-on, the embedded controller can directly run the Bootloader updating program according to the address information (namely the initial address of the application storage area) pointed by the starting zone bit, and execute the updating process of Bootloader software.
Optionally, the above-mentioned manner of changing the start flag of the embedded controller to make the start flag point to the start address of the application storage area may include the following manner:
the first method is as follows: when the embedded controller has a plurality of starting zone bits, the starting zone bit with empty content points to the initial address of the application storage area, and the content of other starting zone bits is erased.
In the case that the embedded controller has two start flag bits, the content of the first start flag bit points to the start address of the Bootloader storage area, and the content of the second start flag bit is null, the second start flag bit may be assigned to point the second start flag bit to the start address of the application storage area, and the content of the first start flag bit is erased.
The second method comprises the following steps: when the embedded controller has a start flag bit, the content of the start flag bit is erased, and the start flag bit is pointed to the initial address of the application storage area.
When the embedded controller has a start flag bit and the start flag bit is in an independent partition, the content of the start flag bit is directly erased, and the start flag bit is pointed to the initial address of the application storage area.
Meanwhile, after writing the new Bootloader software into the Bootloader storage area, in order to ensure that the updated new Bootloader software can normally operate, correspondingly, after the above S202, the method may further include: and continuously changing the starting zone bit to enable the starting zone bit to point to the initial address of the Bootloader storage area again.
The above-mentioned manner of changing the start flag bit of the embedded controller to make the start flag bit point to the start address of the Bootloader storage area again may include the following manner:
the first method is as follows: when the embedded controller has a plurality of starting zone bits, the starting zone bit pointing to the initial address of the application storage area is erased, so that the starting zone bit points to the initial address of the Bootloader storage area again.
Taking the example that the embedded controller includes two start-up flag bits as an example, after the content of the first start-up flag bit is changed, the second start-up flag bit points to the start address of the application storage area, and at this time, the content of the second start-up flag bit may be erased, so that the second start-up flag bit points to the start address of the Bootloader storage area again.
The second method comprises the following steps: when the embedded controller has a start flag bit, erasing the content of the start flag bit, and redirecting the start flag bit to the initial address of the Bootloader storage area.
In this embodiment, the start flag bit of the embedded controller is changed to point to the start address of the application storage area during the update process of the Bootloader software, and after the new Bootloader software is written into the Bootloader storage area, the start flag bit of the embedded controller is changed again to point to the start address of the Bootloader storage area again. Through the technical scheme, the situation that the embedded controller has no response due to the fact that the embedded controller is electrified again after sudden power failure can be effectively prevented, the embedded controller can directly run the Bootloader updating program after being electrified, and therefore smooth running of the Bootloader software updating process is guaranteed.
To facilitate understanding of those skilled in the art, the following describes an update process of Bootloader software in a flowchart shown in fig. 4, specifically, as shown in fig. 4, the method may include:
s301, downloading a Bootloader updating program, and storing the Bootloader updating program into the application storage area as an application program of the embedded controller.
When a system of the embedded controller is started, firstly, Bootloader software in a Bootloader storage area is operated, connection is established with an upgrading medium through the Bootloader software, and a Bootloader updating program is downloaded.
S302, reading the version number of the Bootloader software in the Bootloader storage area, and determining whether the Bootloader software is to-be-updated Bootloader software according to the version number.
If yes, executing S303; if not, go to S308.
S303, changing a starting zone bit of the embedded controller to enable the starting zone bit to point to the initial address of the application storage area.
And S304, erasing the data in the Bootloader storage area.
If the erase is successful, S305 is continuously executed; if the erase fails, the process continues to execute S304 until the erase succeeds.
S305, writing the new Bootloader software into the Bootloader storage area.
S306, data consistency check is carried out on the data written into the Bootloader storage area.
If the check is passed, continuing to execute step S307; if the check fails, the process jumps to S304.
S307, continuously changing the starting zone bit to enable the starting zone bit to point to the initial address of the Bootloader storage area again.
And S308, modifying the boot identifier of the application program corresponding to the Bootloader software, and running the new Bootloader software based on the modified boot identifier after the system is restarted.
After S308, the embedded controller is reset and the new Bootloader software is run.
Fig. 5 is a schematic structural diagram of a Bootloader software updating apparatus provided in an embodiment of the present application, where the apparatus is integrated in an embedded controller, a storage area of the embedded controller includes a Bootloader storage area and an application storage area, and as shown in fig. 5, the apparatus may include: a download module 10 and an update module 11.
Specifically, the downloading module 10 is configured to, when the system is started, run Bootloader software in a Bootloader storage area, download a Bootloader update program through the Bootloader software, and store the Bootloader update program in the application storage area as an application program of the embedded controller;
the update module 11 is configured to run the Bootloader update program when the system is restarted, so as to update the Bootloader software.
According to the Bootloader software updating device provided by the embodiment of the application, when the system is started, the embedded controller runs Bootloader software in a Bootloader storage area, downloads the Bootloader updating program through the Bootloader software, stores the Bootloader updating program in the application storage area as the application program of the embedded controller, and runs the Bootloader updating program in the application storage area after the system is restarted so as to update the Bootloader software. In the process of updating the Bootloader software, the downloaded Bootloader updating program can be directly stored by using the original application storage area of the embedded controller, and the Bootloader updating program is operated as the application program of the embedded controller, so that the Bootloader software in the Bootloader storage area is updated, and the embedded controller does not need to be newly provided with a special updating partition, so that the updating mode has stronger universality aiming at the embedded controllers of various design schemes, and the application range of the updating mode is improved.
On the basis of the foregoing embodiment, optionally, the Bootloader update program includes new Bootloader software, and the update module 11 may include: an erase unit and a write unit.
Specifically, the erasing unit is used for erasing data in the Bootloader storage area;
and the writing unit is used for writing the new Bootloader software into the Bootloader storage area so as to update the Bootloader software.
On the basis of the foregoing embodiment, optionally, the update module 11 may further include: and a changing unit.
Specifically, the changing unit is configured to change a start flag bit of the embedded controller before the erasing unit erases data in the Bootloader storage area, so that the start flag bit points to an initial address of the application storage area;
correspondingly, the changing unit is further configured to continue to change the start flag bit after the writing unit writes the new Bootloader software into the Bootloader storage area, so that the start flag bit points to the start address of the Bootloader storage area again.
On the basis of the foregoing embodiment, optionally, the update module 11 may further include: and modifying the unit.
Specifically, the modification unit is configured to modify, after the writing unit writes the new Bootloader software into the Bootloader storage area, a boot identifier of an application program corresponding to the Bootloader software, so that after the system is restarted, the new Bootloader software is run based on the modified boot identifier.
On the basis of the foregoing embodiment, optionally, the changing unit is specifically configured to, when the embedded controller has a plurality of start flag bits, point the start flag bit whose content is empty to the start address of the application storage area, and erase the content of other start flag bits; when the embedded controller has a start flag bit, the content of the start flag bit is erased, and the start flag bit is pointed to the initial address of the application storage area.
On the basis of the foregoing embodiment, optionally, the Bootloader update program further includes location information of the Bootloader storage area, and the erasing unit is specifically configured to erase data in the Bootloader storage area according to the location information.
On the basis of the foregoing embodiment, optionally, the update module 11 may further include: a reading unit and a determination unit.
The reading unit is used for reading the version number of the Bootloader software in the Bootloader storage area before the erasing unit erases the data in the Bootloader storage area;
the determining unit is used for determining whether the Bootloader software is to-be-updated Bootloader software according to the version number;
correspondingly, the erasing unit is specifically configured to erase the data in the Bootloader storage area when it is determined that the Bootloader software is to-be-updated Bootloader software.
In one embodiment, an embedded controller is provided, the internal structure of which may be as shown in fig. 6. The electronic device includes a processor and a memory connected by a system bus. Wherein the processor of the embedded controller is configured to provide computing and control capabilities. The memory of the embedded controller is used for storing a computer program, and the computer program is executed by the processor to realize a Bootloader software updating method.
Those skilled in the art will appreciate that the structure shown in fig. 6 is a block diagram of only a portion of the structure associated with the present application and does not constitute a limitation on the embedded controller to which the present application is applied, and that a particular embedded controller may include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.
In one embodiment, an embedded controller is provided, the embedded controller comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the following steps when executing the computer program:
starting a system, operating Bootloader software in a Bootloader storage area, downloading a Bootloader updating program through the Bootloader software, and storing the Bootloader updating program into the application storage area as an application program of the embedded controller;
and restarting the system, and operating the Bootloader updating program to update the Bootloader software.
In one embodiment, the Bootloader update program includes new Bootloader software, and the processor executes the computer program and further implements the following steps: erasing the data in the Bootloader storage area; and writing the new Bootloader software into the Bootloader storage area to update the Bootloader software.
In one embodiment, the processor, when executing the computer program, further performs the steps of: changing a starting zone bit of the embedded controller to enable the starting zone bit to point to the initial address of the application storage area;
correspondingly, after the new Bootloader software is written into the Bootloader storage area, the starting zone bit is continuously changed, so that the starting zone bit points to the initial address of the Bootloader storage area again.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and modifying the boot identifier of the application program corresponding to the Bootloader software so as to run the new Bootloader software based on the modified boot identifier after the system is restarted.
In one embodiment, the processor, when executing the computer program, further performs the steps of: when the embedded controller has a plurality of starting zone bits, the starting zone bit with empty content points to the initial address of the application storage area, and the content of other starting zone bits is erased; when the embedded controller has a start flag bit, the content of the start flag bit is erased, and the start flag bit is pointed to the initial address of the application storage area.
In one embodiment, the Bootloader update program further includes location information of the Bootloader storage area, and the processor further implements the following steps when executing the computer program: and erasing the data in the Bootloader storage area according to the position information.
In one embodiment, the processor, when executing the computer program, further performs the steps of: reading the version number of Bootloader software in a Bootloader storage area; determining whether the Bootloader software is to-be-updated Bootloader software according to the version number; and erasing the data in the Bootloader storage area under the condition that the Bootloader software is determined to be the Bootloader software to be updated.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
starting a system, operating Bootloader software in a Bootloader storage area, downloading a Bootloader updating program through the Bootloader software, and storing the Bootloader updating program into the application storage area as an application program of the embedded controller;
and restarting the system, and operating the Bootloader updating program to update the Bootloader software.
In one embodiment, the Bootloader update program includes new Bootloader software, and the processor executes the computer program and further implements the following steps: erasing the data in the Bootloader storage area; and writing the new Bootloader software into the Bootloader storage area to update the Bootloader software.
In one embodiment, the computer program when executed by the processor further performs the steps of: changing a starting zone bit of the embedded controller to enable the starting zone bit to point to the initial address of the application storage area;
correspondingly, after the new Bootloader software is written into the Bootloader storage area, the starting zone bit is continuously changed, so that the starting zone bit points to the initial address of the Bootloader storage area again.
In one embodiment, the computer program when executed by the processor further performs the steps of: and modifying the boot identifier of the application program corresponding to the Bootloader software so as to run the new Bootloader software based on the modified boot identifier after the system is restarted.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the embedded controller has a plurality of starting zone bits, the starting zone bit with empty content points to the initial address of the application storage area, and the content of other starting zone bits is erased; when the embedded controller has a start flag bit, the content of the start flag bit is erased, and the start flag bit is pointed to the initial address of the application storage area.
In one embodiment, the Bootloader update program further includes location information of the Bootloader storage area, and when executed by the processor, the computer program further implements the following steps: and erasing the data in the Bootloader storage area according to the position information.
In one embodiment, the computer program when executed by the processor further performs the steps of: reading the version number of Bootloader software in a Bootloader storage area; determining whether the Bootloader software is to-be-updated Bootloader software according to the version number; and erasing the data in the Bootloader storage area under the condition that the Bootloader software is determined to be the Bootloader software to be updated.
The Bootloader software updating device, the embedded controller and the storage medium provided in the above embodiments may execute the Bootloader software updating method provided in any embodiment of the present application, and have corresponding functional modules and beneficial effects for executing the method. Technical details that are not described in detail in the above embodiments may be referred to a Bootloader software updating method provided in any embodiments of the present application.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A Bootloader software updating method is applied to an embedded controller, a storage area of the embedded controller comprises a Bootloader storage area and an application storage area, and the method comprises the following steps:
starting a system, operating Bootloader software in a Bootloader storage area, downloading a Bootloader updating program through the Bootloader software, and storing the Bootloader updating program into the application storage area as an application program of the embedded controller;
and restarting the system, and operating the Bootloader updating program to update the Bootloader software.
2. The method according to claim 1, wherein the Bootloader update program includes new Bootloader software, and the running the Bootloader update program to update the Bootloader software includes:
erasing the data in the Bootloader storage area;
and writing the new Bootloader software into the Bootloader storage area to update the Bootloader software.
3. The method of claim 2, wherein prior to the erasing the data in the Bootloader storage area, the method further comprises:
changing a starting zone bit of the embedded controller to enable the starting zone bit to point to the initial address of the application storage area;
correspondingly, after the writing the new Bootloader software into the Bootloader storage area, the method further includes:
and continuously changing the starting zone bit to enable the starting zone bit to point to the initial address of the Bootloader storage area again.
4. A method according to claim 2 or 3, wherein after said writing the new Bootloader software into the Bootloader storage area, the method further comprises:
and modifying the boot identifier of the application program corresponding to the Bootloader software so as to run the new Bootloader software based on the modified boot identifier after the system is restarted.
5. The method of claim 2, wherein the altering the start flag of the embedded controller to point the start flag to a start address of the application storage area comprises:
when the embedded controller has a plurality of starting zone bits, the starting zone bit with empty content points to the initial address of the application storage area, and the content of other starting zone bits is erased;
when the embedded controller has a start flag bit, the content of the start flag bit is erased, and the start flag bit is pointed to the initial address of the application storage area.
6. The method according to claim 2, wherein the Bootloader update program further includes location information of the Bootloader storage area, and the erasing data in the Bootloader storage area includes:
and erasing the data in the Bootloader storage area according to the position information.
7. A method according to claim 2 or 3, wherein before said erasing data in said Bootloader storage area, the method further comprises:
reading the version number of Bootloader software in a Bootloader storage area;
determining whether the Bootloader software is to-be-updated Bootloader software according to the version number;
correspondingly, the erasing data in the Bootloader storage area includes:
and erasing the data in the Bootloader storage area under the condition that the Bootloader software is determined to be the Bootloader software to be updated.
8. A Bootloader software updating device is integrated in an embedded controller, a storage area of the embedded controller comprises a Bootloader storage area and an application storage area, and the device comprises:
the downloading module is used for operating the Bootloader software in the Bootloader storage area when the system is started, downloading a Bootloader updating program through the Bootloader software, and storing the Bootloader updating program into the application storage area as an application program of the embedded controller;
and the updating module is used for running the Bootloader updating program when the system is restarted so as to realize the updating of the Bootloader software.
9. An embedded controller comprising a memory and a processor, the memory storing a computer program, wherein the processor when executing the computer program implements the steps of a Bootloader software updating method according to any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of a Bootloader software updating method according to any one of claims 1 to 7.
CN202010651758.7A 2020-07-08 2020-07-08 Bootloader software updating method and device, embedded controller and storage medium Pending CN111796848A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010651758.7A CN111796848A (en) 2020-07-08 2020-07-08 Bootloader software updating method and device, embedded controller and storage medium
PCT/CN2021/102761 WO2022007656A1 (en) 2020-07-08 2021-06-28 Bootloader software updating method and apparatus, embedded controller, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010651758.7A CN111796848A (en) 2020-07-08 2020-07-08 Bootloader software updating method and device, embedded controller and storage medium

Publications (1)

Publication Number Publication Date
CN111796848A true CN111796848A (en) 2020-10-20

Family

ID=72809787

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010651758.7A Pending CN111796848A (en) 2020-07-08 2020-07-08 Bootloader software updating method and device, embedded controller and storage medium

Country Status (2)

Country Link
CN (1) CN111796848A (en)
WO (1) WO2022007656A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112631625A (en) * 2020-11-20 2021-04-09 展讯通信(上海)有限公司 System upgrading method and device of embedded equipment and embedded equipment
CN112882731A (en) * 2021-01-08 2021-06-01 北京锦鸿希电信息技术股份有限公司 Embedded software upgrading method and device
CN113254048A (en) * 2021-06-21 2021-08-13 深之蓝(天津)水下智能科技有限公司 Method, device and equipment for updating boot program and computer readable medium
CN113885928A (en) * 2021-05-31 2022-01-04 荣耀终端有限公司 Program updating method and electronic device
WO2022007656A1 (en) * 2020-07-08 2022-01-13 中国第一汽车股份有限公司 Bootloader software updating method and apparatus, embedded controller, and storage medium
CN114880008A (en) * 2022-05-17 2022-08-09 联陆智能交通科技(上海)有限公司 Software upgrading method and system
CN116302019A (en) * 2023-05-11 2023-06-23 江苏大秦新能源科技有限公司 BootLoader program self-updating method, system and storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114661326B (en) * 2022-03-22 2024-04-30 中国北方车辆研究所 Method for quickly updating multiprocessor embedded system software
CN114610415B (en) * 2022-03-23 2024-01-16 北京经纬恒润科技股份有限公司 Program starting method, system, storage medium and electronic equipment
CN115221824B (en) * 2022-07-18 2023-05-02 北京极光星通科技有限公司 Asynchronous reconstruction method, device and computer equipment
CN117591163A (en) * 2024-01-18 2024-02-23 北京智芯微电子科技有限公司 Kernel upgrading method, device, medium, chip and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103299276A (en) * 2010-11-08 2013-09-11 金雅拓股份有限公司 Software updating process for an embedded device
US20170024221A1 (en) * 2013-12-13 2017-01-26 Ping He Devices, updaters, methods for controlling a device, and methods for controlling an updater
CN109857426A (en) * 2018-12-27 2019-06-07 百度在线网络技术(北京)有限公司 Bootloader method for updating program, device, electronic equipment and storage medium
CN110134415A (en) * 2019-04-12 2019-08-16 深圳市致宸信息科技有限公司 A kind of controller and its method for upgrading software and device
CN110209420A (en) * 2019-08-01 2019-09-06 潍柴动力股份有限公司 A kind of method and device updating bootstrap loader

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040030877A1 (en) * 2002-08-06 2004-02-12 Aleksandr Frid Using system BIOS to update embedded controller firmware
CN111796848A (en) * 2020-07-08 2020-10-20 中国第一汽车股份有限公司 Bootloader software updating method and device, embedded controller and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103299276A (en) * 2010-11-08 2013-09-11 金雅拓股份有限公司 Software updating process for an embedded device
US20170024221A1 (en) * 2013-12-13 2017-01-26 Ping He Devices, updaters, methods for controlling a device, and methods for controlling an updater
CN109857426A (en) * 2018-12-27 2019-06-07 百度在线网络技术(北京)有限公司 Bootloader method for updating program, device, electronic equipment and storage medium
CN110134415A (en) * 2019-04-12 2019-08-16 深圳市致宸信息科技有限公司 A kind of controller and its method for upgrading software and device
CN110209420A (en) * 2019-08-01 2019-09-06 潍柴动力股份有限公司 A kind of method and device updating bootstrap loader

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022007656A1 (en) * 2020-07-08 2022-01-13 中国第一汽车股份有限公司 Bootloader software updating method and apparatus, embedded controller, and storage medium
CN112631625A (en) * 2020-11-20 2021-04-09 展讯通信(上海)有限公司 System upgrading method and device of embedded equipment and embedded equipment
CN112631625B (en) * 2020-11-20 2022-10-21 展讯通信(上海)有限公司 System upgrading method and device for embedded equipment and embedded equipment
CN112882731A (en) * 2021-01-08 2021-06-01 北京锦鸿希电信息技术股份有限公司 Embedded software upgrading method and device
CN113885928A (en) * 2021-05-31 2022-01-04 荣耀终端有限公司 Program updating method and electronic device
CN113254048A (en) * 2021-06-21 2021-08-13 深之蓝(天津)水下智能科技有限公司 Method, device and equipment for updating boot program and computer readable medium
CN113254048B (en) * 2021-06-21 2021-09-28 深之蓝(天津)水下智能科技有限公司 Method, device and equipment for updating boot program and computer readable medium
CN114880008A (en) * 2022-05-17 2022-08-09 联陆智能交通科技(上海)有限公司 Software upgrading method and system
CN116302019A (en) * 2023-05-11 2023-06-23 江苏大秦新能源科技有限公司 BootLoader program self-updating method, system and storage medium
CN116302019B (en) * 2023-05-11 2023-08-04 江苏大秦新能源科技有限公司 BootLoader program self-updating method, system and storage medium

Also Published As

Publication number Publication date
WO2022007656A1 (en) 2022-01-13

Similar Documents

Publication Publication Date Title
CN111796848A (en) Bootloader software updating method and device, embedded controller and storage medium
CN110231952B (en) ECU program backup and cyclic upgrade control method and device
KR100584338B1 (en) Method and system for updating software
KR100506203B1 (en) Booting and boot code update method and system thereof
KR101427755B1 (en) Device and method for firmware upgrade using usb
CN109358887B (en) On-line upgrading method, device and system for single chip microcomputer program
CN110597542B (en) Software automatic OTA (over the air) upgrading method and device and electronic equipment
CN110321170B (en) Starting-up method
GB2466685A (en) Fault tolerant updating of firmware
CN111240720A (en) Boot program upgrading method and device and storage medium
CN111813428A (en) Method and device for upgrading terminal firmware, electronic equipment and storage medium
CN112667265B (en) Method and device for updating bootstrap program
WO2012071852A1 (en) Method and apparatus for upgrading bootstrap program
US20220405083A1 (en) Ota master, system, method, non-transitory storage medium, and vehicle
CN115756561A (en) Software upgrading method and device, computer equipment and storage medium
CN111026417A (en) Embedded equipment upgrading method and embedded equipment
CN116954674A (en) eMMC firmware upgrading method, firmware upgrading equipment and storage device
JP3805195B2 (en) Program rewriting apparatus and program rewriting method
US11995429B2 (en) Software update device, update control method, non-transitory storage medium, and server
US11768669B2 (en) Installing application program code on a vehicle control system
CN112667444A (en) System upgrading method, storage medium and terminal equipment
KR100876748B1 (en) Method for updating boot code
US11847439B2 (en) Center, management method, and non-transitory storage medium
KR101113342B1 (en) Boot-loader version managing method for mobile communication terminal
CN118092373A (en) OTA rollback control method of vehicle-mounted controller based on partition downloading technology

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20201020