CN117940892A - Program updating method and program updating device - Google Patents

Program updating method and program updating device Download PDF

Info

Publication number
CN117940892A
CN117940892A CN202280054960.9A CN202280054960A CN117940892A CN 117940892 A CN117940892 A CN 117940892A CN 202280054960 A CN202280054960 A CN 202280054960A CN 117940892 A CN117940892 A CN 117940892A
Authority
CN
China
Prior art keywords
program
storage area
application program
boot
update
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
CN202280054960.9A
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.)
Contemporary Amperex Technology Co Ltd
Original Assignee
Contemporary Amperex Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Contemporary Amperex Technology Co Ltd filed Critical Contemporary Amperex Technology Co Ltd
Publication of CN117940892A publication Critical patent/CN117940892A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping

Landscapes

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

Abstract

The embodiment of the disclosure provides a program updating method and a program updating device. The program updating method comprises the following steps: starting a first bootstrap program from a first storage area of a memory, wherein the memory further comprises a second storage area and a third storage area, the second storage area is in an inactive state, and the third storage area is in an active state; storing a first application program corresponding to a program update task into the second storage area through the first bootstrap program when the program update task exists; executing a storage area state configuration operation through the first bootstrap program so as to enable the second storage area to be in an activated state and enable the third storage area to be in a non-activated state; and starting the first application program through the first bootstrap program. By the program updating method provided by the embodiment of the disclosure, the safety of program updating can be improved.

Description

Program updating method and program updating device Technical Field
The present disclosure relates to the field of electronic and electrical technology, and more particularly, to a program update method and program update apparatus.
Background
Program update is a common technology in the fields of electronics, electrics and the like, and is related to many application scenes. Taking an electronic control unit (electronic control unit, ECU) of a vehicle device as an example, the ECU often includes a processor and a memory, the memory storing a boot program and/or an application program, the processor of the ECU activates the vehicle control system by executing the boot program stored in the memory and further realizes a corresponding function by activating the application program. In the process of updating the bootstrap program and/or the application program in the memory, if an emergency such as power failure occurs, the processor cannot normally read the bootstrap program and/or the application program from the memory after the power failure is again conducted, so that the vehicle control system cannot realize corresponding functions, and even the vehicle control system cannot be started.
Therefore, how to improve the security of program update is a urgent problem to be solved.
Disclosure of Invention
The embodiment of the disclosure provides a program updating method and a program updating device, which can improve the safety of program updating.
In a first aspect, a program update method is provided, the method including: starting a first bootstrap program from a first storage area of a memory, wherein the memory further comprises a second storage area and a third storage area, the second storage area is in an inactive state, and the third storage area is in an active state; storing a first application program corresponding to a program update task into the second storage area through the first bootstrap program when the program update task exists; executing a storage area state configuration operation through the first bootstrap program so as to enable the second storage area to be in an activated state and enable the third storage area to be in a non-activated state; and starting the first application program through the first bootstrap program.
By the program updating method provided by the embodiment of the disclosure, in the process of program updating, if conditions such as sudden power failure and the like are met, the condition that corresponding functions of the program cannot be realized is avoided, the condition that a system cannot be started is avoided, and the program can be safely updated.
In some possible embodiments, before the launching of the first application by the first bootstrap, the method further comprises: executing a restarting function through the first bootstrap program; the first boot program is started from the first storage area.
In some possible embodiments, the storing, by the first bootstrap program, the first application program corresponding to the update task in the second storage area includes: determining, by the first boot program, a storage area in an inactive state as the second storage area; and storing the first application program corresponding to the update task into the second storage area through the first guide program.
In some possible embodiments, the launching of the first application by the first bootstrap program includes: determining, by the first boot program, that a storage area in an activated state is the second storage area; and starting the first application program stored in the second storage area through the first bootstrap program.
In some possible embodiments, the first application program includes control instructions to update the first boot program to a second boot program, the method further comprising: the second boot program is stored to the first storage area by the first application program.
In some possible embodiments, the memory further comprises a fourth storage area, the method further comprising: starting a boot program from the first storage area; in the event of an abnormality in starting a boot program from the first storage area, starting a jump program from the fourth storage area; starting the first application program through the jump program; the second boot program is stored to the first storage area by the first application program.
In some possible embodiments, the launching of the first application by the jump procedure includes: determining the storage area in the activated state as the second storage area through the jump procedure; the first application program in the second storage area is started through the jump program.
In some possible embodiments, after the storing of the second boot program to the first storage area by the first application, the method further comprises: executing a storage area state configuration operation through the first application program so as to enable the second storage area to be in an inactive state and enable the third storage area to be in an active state; starting the second bootstrap program from the first storage area; and starting a second application program in the third storage area through the second guide.
In some possible embodiments, before the launching of the second boot program from the first storage area, the method further comprises: and executing a restarting function through the first application program.
In some possible embodiments, the method further comprises: determining, by the first boot program, that a storage area in an active state is the third storage area when no program update task exists; and starting a second application program in the third storage area through the first bootstrap program.
In some possible embodiments, the method further comprises: receiving program update indication information through the second application program, wherein the program update indication information indicates that a program update task exists; determining, by the second application, whether the program update task can be performed; executing a restart function by the second application program in the case where it is determined that the program update task can be executed; the first boot program is started from the first storage area.
In a second aspect, a program updating apparatus is provided, the apparatus comprising a processor, and further comprising a memory mentioned in the first aspect, the processor implementing the program updating method according to any one of the first aspect by executing the computer instructions.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings that are needed in the embodiments of the present disclosure will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present disclosure, and other drawings may be obtained according to the drawings without inventive effort for a person of ordinary skill in the art.
FIG. 1 is a block diagram of a program update apparatus provided by one or more embodiments of the present disclosure;
FIG. 2 is a flow diagram of a program update method provided by one or more embodiments of the present disclosure;
FIG. 3 is a flow diagram of yet another program update method provided by one or more embodiments of the present disclosure;
Fig. 4 is a block diagram of a program update apparatus provided by one or more embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure are described in further detail below with reference to the drawings and examples. The following detailed description of the embodiments and the accompanying drawings are provided to illustrate the principles of the disclosure and are not intended to limit the scope of the disclosure, i.e., the disclosure is not limited to the embodiments described.
In the description of the present disclosure, it is to be noted that, unless otherwise indicated, the meaning of "plurality" is two or more; the terms "upper," "lower," "left," "right," "inner," "outer," and the like indicate an orientation or positional relationship merely for convenience of describing the present disclosure and simplifying the description, and do not indicate or imply that the devices or elements being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus are not to be construed as limiting the present disclosure. Furthermore, the terms "first," "second," "third," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Program update is involved in many application scenarios in the fields of electronics, electrics, etc. A common computer system, such as a vehicle control system or an ECU of a vehicle device, includes a processor and a memory in which a boot program and an application program are stored, and when the computer system is started, the processor first executes the boot program in the memory and starts the application program through the boot program, thereby realizing various application functions of the computer system through the application program. In the process of updating the boot program and/or the application program, if an interrupt such as power failure is encountered, no executable boot program and/or application program exists in the memory, so that the computer system cannot realize the application function or even cannot start.
In order to ensure that a program can be safely updated, the present disclosure proposes a program updating method and a program updating apparatus.
Fig. 1 illustrates a block diagram of a program update apparatus provided by one or more embodiments of the present disclosure. As shown in fig. 1, the program updating apparatus 100 includes a processor 101 and a memory 102, where the memory 102 includes a first storage area 1021, a second storage area 1022, and a third storage area 1023, and the processor 101 may be configured to execute computer programs and/or instructions stored in the memory to implement a program updating method provided by one or more embodiments of the present disclosure. It will be appreciated by those skilled in the art that although the first memory region 1021, the second memory region 1022, and the third memory region 1023 are illustrated in fig. 1 as occupying three regions of the memory 102, respectively, it is not intended that the first memory region 1021, the second memory region 1022, and the third memory region 1023 be necessarily physically and/or logically contiguous memory regions, nor are the areas of the respective memory regions in fig. 1 intended to represent the size of the memory space of the memory regions, and in the embodiments of the present disclosure, the respective memory regions of the memory should be construed broadly. As an example, the program updating apparatus 100 includes an ECU of the vehicle apparatus, the processor 101 includes a processor of the ECU, the memory 102 includes a memory of the ECU, the processor of the ECU starts the vehicle control system by executing a boot program stored in the memory of the ECU, and further realizes management control of the vehicle apparatus by starting an application program stored in the memory, and the boot program and/or an update program corresponding to the application program may be stored in the memory to realize the program updating function. It should be noted that the present disclosure is not limited to the form, structure, model, etc. of the program updating apparatus 100, the processor 101, and the memory 102, and any apparatus capable of implementing the corresponding processing and storage functions may be applied to one or more embodiments provided in the present disclosure.
Fig. 2 illustrates a flow diagram of a program update method 200 provided by one or more embodiments of the present disclosure.
Referring to fig. 2, the program update method 200 includes:
Step S201: starting a first bootstrap program from a first storage area of a memory, wherein the memory further comprises a second storage area and a third storage area, the second storage area is in an inactive state, and the third storage area is in an active state;
The program update method in one or more embodiments provided by the present disclosure may be performed by the program update apparatus 100 shown in fig. 1. Referring to fig. 1, for example, a first boot program is stored in the first storage area 1021 of the memory 102, and in step S201, the program updating apparatus 100 may pass through the first boot program in the first storage area 1021 in the processor 101. As will be appreciated by those skilled in the art, a boot strap program may be a bootloader or firmware program, or may be another form of program, for performing the basic functions when the computer system is started.
The second storage area 1022 of the memory 102 is in an active state and the third storage area 1023 is in an inactive state, which may be indicated by any means, existing or future, of the second storage area 1022 and the third storage area 1023 in an active or inactive state. For example, by the memory 102, storing status identifying information including a first value and a second value (e.g., 0 and 1), the status identifying information indicating that the second storage area 1022 is in an active state and the third storage area 1023 is in an inactive state when the status identifying information is in the first value, and the status identifying information indicating that the second storage area 1022 is in an inactive state and the third storage area 1023 is in an active state when the status identifying information is in the second value; for example, the state identification information of the second storage area 1022, a first value and a second value of the state identification information indicating that the second storage area 1022 is in an activated state and a deactivated state, respectively, are stored by the memory 102, and the state identification information of the third storage area 1023 is stored by the memory 102, the first value and the second value of the state identification information indicating that the third storage area 1023 is in the activated state and the deactivated state, respectively; the state identification information of the second storage area 1022 and the state identification information of the third storage area 1023 are also stored, for example, by the memory 102, and the activation states of the two storage areas are determined based on the relationship of the state identification information of the second storage area 1022 and the state identification information of the third storage area 1023, for example, when the value corresponding to the state identification information of the second storage area 1022 is greater than the value corresponding to the state identification information of the third storage area 1023, the second storage area 1022 is in the inactive state, and the third storage area 1023 is in the active state. In the embodiments of the present disclosure, the status identification information may be stored in any location of the memory.
Step S202: storing a first application program corresponding to a program update task into the second storage area through the first bootstrap program when the program update task exists;
In step S202, when there is a program update task, the program update apparatus 100 stores a first application program corresponding to the update task in the second storage area 1022 through the first boot program, and the second storage area 1022 is in an inactive state. Optionally, storing, by the first bootstrap program, the first application program corresponding to the update task in the second storage area includes: determining, by the first boot program, a storage area in an inactive state as the second storage area; and storing the first application program corresponding to the update task into the second storage area through the first bootstrap program. As an example, the program update task indication information may be stored in any position in the memory 102, the first value of the update task indication information indicates that an update task exists, the second value of the update task indication information indicates that no update task exists, in step S202, after the program update apparatus 100 starts the first boot program in step S101, the update task indication information may be obtained through the first boot program, and in the case where the update task indication information indicates that an update task exists, the first application program corresponding to the update task is stored in the storage area in the inactive state of the two storage areas, i.e., the second storage area 1022 and the third storage area 1023, by the first boot program, for example, the second storage area 1022 may be stored in the second storage area 1022, where the first application program is an updated version of the legacy application program, or may be an application program implementing other various functions, which is not limited in this disclosure. It will be appreciated by those skilled in the art that the program updating apparatus may obtain the first application program in a wireless manner or a wired manner, for example, by an over-the-air technique, and the present disclosure is not limited to how to obtain various programs from outside the program updating apparatus.
Step S203: executing a storage area state configuration operation through the first bootstrap program so as to enable the second storage area to be in an activated state and enable the third storage area to be in a non-activated state;
In step S202, the program updating apparatus 100 has stored the first application program corresponding to the update task into the second storage area 1022 in the inactive state through the first boot program, and in step S203, the program updating apparatus may configure the state in which the second storage area 1022 is in the inactive state to the active state and configure the state in which the third storage area 1023 is in the inactive state to the active state through the first boot program.
Step S204: and starting the first application program through the first bootstrap program.
Since the second storage area 1022 is configured to be in the active state and the third storage area 1023 is configured to be in the inactive state in step S203 by the storage area state configuration operation, and the first bootstrap program is stored in the second storage area, the first application program in the second storage area 1022 in the active state may be started by the first bootstrap program in step S204.
In an alternative embodiment, said step S204: starting the first application program through the first bootstrap program comprises the following steps: determining, by the first boot program, that a storage area in an activated state is the second storage area; and starting the first application program stored in the second storage area through the first bootstrap program. For example, based on step S203, the second storage area 1022 is configured to be in an active state, and in step S204, the storage area in the active state may be determined to be the second storage area 1022 by the first bootstrap program according to the state identification information, and then the first application program stored in the second storage area 1022 in the active state may be started by the first bootstrap program.
Taking the ECU of the vehicle device as an example of the program updating device 100, the first storage area 1021 in the memory 102 of the ECU stores the first boot program, and the state identification information stored by the memory 102 indicates that the second storage area 1022 is in the inactive state and the third storage area 1023 is in the active state, if the second application program is stored in the third storage area 1023, in this case, if the ECU of the vehicle device is powered on, the first boot program will first be started from the first storage area 1021, and if it is determined that the program updating task does not exist according to the program updating task indication information, the first boot program will determine that the storage area in the active state is the third storage area 1023, and then start the second application program stored in the third storage area 1023, which is used for example to implement the control function of the vehicle device, so that the ECU implements the control of the vehicle through the above procedure. Based on step S201, the ECU of the vehicle device starts the first boot program from the first storage area 1021, based on step S202, in the case where the first boot program determines that there is a program update task according to the program update task instruction information, the storage area in the inactive state may be determined according to the state identification information and the first application program corresponding to the program update task may be stored in the storage area in the inactive state, since the state identification information of the second storage area 1022 indicates that the second storage area 1022 is in the inactive state, the first application program is stored in the second storage area 1022, based on step S203, the first boot program modifies the state identification information of the second storage area 1022 so that the second storage area 1022 is in the active state, and also modifies the state identification information of the third storage area 1023 so that the third storage area 1023 is in the inactive state, based on step S204, the first boot program starts the application program in the storage area in the active state, since the second storage area 1022 is configured to be in the active state, the first application program is started up in the second storage area 1022 through the first boot area in step S204, and the updated application program in the active state is safely stored in the storage area. Assuming that the first application program is an updated version of the second application program, the ECU may start the first boot program from the first storage area 1021 after power-up through the above-described flow, and further the first application program of which the updated version is started by the first boot program replaces the second application program to realize the control function of the vehicle device.
By the program updating method and/or the program updating device provided by one or more embodiments of the present disclosure, when a program updating task exists, an update program corresponding to the program updating task is stored in a storage area in an inactive state, the storage area is modified from the inactive state to the active state, and then the update program is started, so that the program updating can be safely completed.
In an alternative embodiment, in the absence of a program update task, determining, by the first boot program, that the storage area in the active state is the third storage area; and starting a second application program in the third storage area through the first bootstrap program. For example, based on step S201, the program updating apparatus 100 starts the first boot program from the first storage area 1021 of the memory 102, at this time, the second storage area 1022 is in the inactive state, and the third storage area 1023 is in the active state, and further, the first boot program may determine, in the case where it is determined that no program update task exists, that the storage area in the active state is the third storage area 1023 according to the state identification information, so as to run the second application program stored in the third storage area 1023. In the above embodiment, after the program updating apparatus 100 is powered on, the first boot program is started first, and since the program updating task does not exist, the first boot program starts the second application program from the third storage area 1023 in the active state, and the corresponding function is implemented by the second application program. Further, if there is a program update task, referring to the foregoing one or more embodiments, the first bootstrap program may store the first application program corresponding to the program update task in the second storage area 1022 in the inactive state, then configure the second storage area 1022 to be in the active state through the storage area state configuration operation, and then start the first application program corresponding to the update task from the second storage area 1022 in the active state, so as to safely complete the program update, where the first application program is an updated version of the second application program, for example.
In an alternative embodiment, at step S204: before the first application program is started by the first bootstrap program, the program update method 200 further includes: executing a restarting function through the first bootstrap program; the first boot program is started from the first storage area. For example, the boot program of the program updating apparatus 100 may be configured to determine a storage area in an activated state from two storage areas of the second storage area 1022 and the third storage area 1023 and start the application program stored in the storage area in the activated state, so that, based on the foregoing embodiment, taking the first boot program stored in the first storage area 1021 as an example, after the updated first application program is stored in the second storage area 1022 and the second storage area 1022 is configured in the activated state through the storage area state configuration operation in steps S201 to S203, a restart function may be performed by the first boot program, so that the program updating apparatus 100 will restart and restart the first boot program from the first storage area 1021 of the memory 102, which will start the first application program stored in the second storage area 1022 in the activated state.
Fig. 3 is a flowchart illustrating a program update method 300 according to one or more embodiments of the present disclosure, and steps S201 to S204 of the program update method 300 shown in fig. 3 are referred to in the corresponding description, and are not repeated herein. As an alternative embodiment, the first application program includes a control instruction for updating the first bootstrap program to the second bootstrap program, and the program updating method 300 further includes step S305: the second boot program is stored to the first storage area by the first application program.
For example, the second boot program is an updated version of the first boot program, in step S204, the first application program stored in the second storage area 1022 in the active state is started by the first boot program, and the first application program includes a control instruction to update the first boot program to the second boot program, so that after the first application program is started, in step S305, the first application program writes the second boot program into the first storage area 1021 to implement the update of the first boot program. After the update is completed, as an alternative embodiment, the first application program performs a restart function, so that the program update apparatus 100 starts the boot program stored in the first storage area 1021, and since the second boot program has been written into the first storage area 1021 by the first application program in step S305, the program update apparatus 100 starts the second boot program from the first storage area 1021, so that the updated boot program can run normally. Further, the second bootstrap program may be configured to determine the storage area in the active state from the two storage areas of the second storage area 1022 and the third storage area 1023, and start the application program stored in the storage area in the active state, and the specific implementation may refer to the previous description and will not be repeated herein.
In an alternative embodiment, the memory 102 further includes a fourth storage area 1024, and the method further includes: starting a boot program from the first storage area; in the event of an abnormality in starting a boot program from the first storage area, starting a jump program from the fourth storage area; starting the first application program through the jump program; the second boot program is stored to the first storage area by the first application program. For example, in the process of step S305, that is, in the process that the first application program writes the second boot program into the first storage area 1021, an unexpected event such as power failure occurs, which causes that the first boot program stored originally is deleted from the memory due to the writing of the second boot program, the second boot program is not completely written into the memory due to the power failure, and thus cannot be operated, when the power is turned on, the program updating apparatus 100 starts the boot program from the first storage area 1021, and since the first storage area 1021 does not store any complete boot program, an abnormality occurs in starting the boot program, and the system cannot be started. Therefore, the program updating apparatus 100 may store a jump program in the fourth storage area 1024, the program updating apparatus 100 may start a boot program from the first storage area 1021 after power is applied, and in case of an abnormality in starting the boot program from the first storage area 1021, may start the jump program from the fourth storage area 1024, and start the first application program through the jump program, and the first application program may include a control instruction to update the first boot program to the second boot program, so that the second boot program may be stored in the first storage area 1021 through the first application program, thereby safely completing the update function of the boot program. The program update device 100 may initiate the jump program in a similar manner as the boot program is initiated, for example by the memory 102 or other storage device storing the fourth storage area 1024 and/or the logical and/or physical address of the jump program, and in the event of an exception in the boot program from the first storage area 1021, the jump program may be initiated based on the logical and/or physical address, although other manners of initiating the jump program are possible.
In an alternative embodiment, said launching said first application by said jump procedure comprises: determining the storage area in the activated state as the second storage area through the jump procedure; the first application program in the second storage area is started through the jump program. In accordance with one or more of the foregoing optional embodiments, the storage area in the active state is determined, for example, by the state identification information stored in the memory 102, and the specific implementation may refer to the foregoing description and will not be repeated herein. As an example, according to the foregoing steps S201-204, the program updating apparatus 100 starts the first application program in the second storage area 1022 in the active state through the first boot program, and the first application program includes a control instruction to update the boot program (for example, the first boot program) stored in the first storage area 1021 to the second boot program, further according to the foregoing step S305, the second boot program is stored in the first storage area through the first application program, so as to update the first boot program to the second boot program, in the process of executing the step S305, if an unexpected event such as a power failure occurs, any complete boot program is not stored in the first storage area 1021, so that after the system is powered on, the program updating apparatus starts the boot program from the first storage area 1021, an abnormality occurs in the start-up boot program, and then the program updating apparatus starts the skip program from the fourth storage area 1024, determines that the storage area in the active state is the second storage area 1022 through the skip program, and then continues to update the first application program in the second storage area 1021.
In yet another alternative embodiment, after said storing said second bootstrap program to said first storage region by said first application program, said method further comprises: executing a storage area state configuration operation through the first application program so as to enable the second storage area to be in an inactive state and enable the third storage area to be in an active state; starting the second bootstrap program from the first storage area; and starting a second application program in the third storage area through the second guide. Optionally, before the second boot program is started from the first storage area, the method further includes: and executing a restarting function through the first application program.
Taking the ECU of the vehicle device as the program updating device 100, for example, a first boot program is stored in the first storage area 1021 in the memory 102 of the ECU, and the state identification information stored in the memory 102 indicates that the second storage area 1022 is in the inactive state and the third storage area 1023 is in the active state, and a second application program is stored in the third storage area 1023, in which case, if the ECU of the vehicle device is powered on, the first boot program is first started from the first storage area 1021, and if it is determined that there is no program updating task according to the program updating task indication information, the first boot program will determine that the storage area in the active state is the third storage area 1023, and then the second application program stored in the third storage area 1023 is started, for example, to implement the vehicle device control function, so that the ECU implements the control of the vehicle through the above procedure. If it is determined that there is an update task according to the program update task indication information, it is possible to determine a storage area in an inactive state according to the state identification information and store the first application program corresponding to the program update task to the storage area in the inactive state, since the state identification information of the second storage area 1022 indicates that the second storage area 1022 is in the inactive state, the first application program is stored in the second storage area 1022, based on step S203, the first bootstrap program modifies the state identification information of the second storage area 1022 so that the second storage area 1022 is in the active state, and also modifies the state identification information of the third storage area 1023 so that the third storage area 1023 is in the inactive state, based on step S204, the first bootstrap program starts the application program in the storage area in the active state, and since the second storage area 1022 is configured to be in the active state in step S204, the first application program in the second storage area 1022 is started by the first bootstrap program, and the first application program is safely updated into the second storage area as an update program corresponding to the program update task. Further, the first application program includes a control instruction for updating the first boot program to the second boot program, so after the first application program is started, according to step S305, the second boot program is stored in the first storage area 1021, after the second boot program is stored in the first storage area 1021, a storage area status configuration operation is performed by the first application program, so that the second storage area 1022 is in an inactive state, and the third storage area 1023 is in an active state, then a restart function is performed by the first application program, the after-restart program updating device 100 reads the boot program from the first storage area 1021, and since the updated second boot program is already stored in the first storage area 1021, the second boot program is read and run, then the active storage area is determined by the second boot program, and since the second storage area 1022 and the third storage area 1023 in the third storage area 1023 are configured to be in an active state by the first application program, the third storage area 1023 in an active state is executed, and then the first application program is further controlled by the first application program, and the first application program is further started, for example, the first application program is further controlled by the first application program, and the first application program is further started, and the vehicle is further controlled by the first application program, and the first application program is further stored in the first storage device.
Fig. 4 is a schematic block diagram of a program update apparatus provided in one or more embodiments of the present disclosure. As shown in fig. 4, the program updating apparatus 400 includes a processor 401 and further includes a memory 402, where the processor 401 implements the program updating method provided in one or more of the foregoing embodiments by executing computer instructions. Wherein, the description of the processor 401 and the memory 402 may refer to the description of the processor 101 and the memory 102, which are not repeated herein.
Furthermore, the embodiments of the present disclosure also provide a readable storage medium for storing a computer program for implementing the method of the various embodiments of the present disclosure described above when the computer program is executed by a computer.
It should be understood that the specific examples herein are intended only to facilitate a better understanding of the disclosed embodiments by those skilled in the art and are not intended to limit the scope of the disclosed embodiments.
It should also be understood that, in various embodiments of the present disclosure, the size of the sequence number of each process does not mean the order of execution, and the order of execution of each process should be determined by its functions and internal logic, and should not constitute any limitation on the implementation of the embodiments of the present disclosure.
It should also be understood that the various implementations described in this specification may be implemented alone or in combination, and that the disclosed embodiments are not limited in this regard.
While the present disclosure has been described with reference to a preferred embodiment, various modifications may be made and equivalents may be substituted for elements thereof without departing from the scope of the present disclosure. In particular, the technical features mentioned in the respective embodiments may be combined in any manner as long as there is no structural conflict. The present disclosure is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.

Claims (12)

  1. A program update method, comprising:
    Starting a first bootstrap program from a first storage area of a memory, wherein the memory further comprises a second storage area and a third storage area, the second storage area is in an inactive state, and the third storage area is in an active state;
    Storing a first application program corresponding to a program update task into the second storage area through the first bootstrap program when the program update task exists;
    Executing a storage area state configuration operation through the first bootstrap program so as to enable the second storage area to be in an activated state and enable the third storage area to be in a non-activated state;
    And starting the first application program through the first bootstrap program.
  2. The program update method of claim 1, wherein prior to said launching of said first application by said first boot program, said method further comprises:
    Executing a restarting function through the first bootstrap program;
    The first boot program is started from the first storage area.
  3. The program update method according to claim 1 or 2, characterized in that the storing, by the first boot program, the first application program corresponding to the update task to the second storage area includes:
    Determining, by the first boot program, a storage area in an inactive state as the second storage area;
    And storing the first application program corresponding to the update task into the second storage area through the first guide program.
  4. The program update method according to claim 1 or 2, characterized in that the launching of the first application program by the first boot program includes:
    Determining, by the first boot program, that a storage area in an activated state is the second storage area;
    and starting the first application program stored in the second storage area through the first bootstrap program.
  5. The program update method according to any one of claims 1 to 4, wherein the first application program includes control instructions to update the first boot program to a second boot program, the method further comprising:
    The second boot program is stored to the first storage area by the first application program.
  6. The program updating method according to claim 5, wherein the memory further comprises a fourth storage area, the method further comprising:
    Starting a boot program from the first storage area;
    In the event of an abnormality in starting a boot program from the first storage area, starting a jump program from the fourth storage area;
    starting the first application program through the jump program;
    The second boot program is stored to the first storage area by the first application program.
  7. The program update method according to claim 6, wherein the launching of the first application program by the jump program includes:
    Determining the storage area in the activated state as the second storage area through the jump procedure;
    The first application program in the second storage area is started through the jump program.
  8. The program update method according to claim 5, characterized in that after the second boot program is stored to the first storage area by the first application program, the method further comprises:
    Executing a storage area state configuration operation through the first application program so as to enable the second storage area to be in an inactive state and enable the third storage area to be in an active state;
    starting the second bootstrap program from the first storage area;
    and starting a second application program in the third storage area through the second guide.
  9. The program update method of claim 8, wherein prior to said launching of said second boot program from said first storage area, said method further comprises:
    and executing a restarting function through the first application program.
  10. The program updating method according to claim 1 or 2, characterized in that the method further comprises:
    Determining, by the first boot program, that a storage area in an active state is the third storage area when no program update task exists;
    And starting a second application program in the third storage area through the first bootstrap program.
  11. The program updating method according to claim 10, characterized in that the method further comprises:
    Receiving program update indication information through the second application program, wherein the program update indication information indicates that a program update task exists;
    Determining, by the second application, whether the program update task can be performed;
    Executing a restart function by the second application program in the case where it is determined that the program update task can be executed;
    The first boot program is started from the first storage area.
  12. A program update apparatus comprising a processor and further comprising a memory as claimed in any one of claims 1 to 11, the processor implementing the program update method as claimed in any one of claims 1 to 11 by executing computer instructions.
CN202280054960.9A 2022-01-26 2022-01-26 Program updating method and program updating device Pending CN117940892A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/074107 WO2023141832A1 (en) 2022-01-26 2022-01-26 Program updating method and program updating apparatus

Publications (1)

Publication Number Publication Date
CN117940892A true CN117940892A (en) 2024-04-26

Family

ID=87470166

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202280054960.9A Pending CN117940892A (en) 2022-01-26 2022-01-26 Program updating method and program updating device

Country Status (2)

Country Link
CN (1) CN117940892A (en)
WO (1) WO2023141832A1 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102023876B (en) * 2009-09-14 2013-04-17 漳州科能电器有限公司 Embedded system capable of upgrading software on line and online upgrading method
CN106990982B (en) * 2017-03-20 2021-07-02 北京新能源汽车股份有限公司 Program updating method and device
JP7216559B2 (en) * 2019-02-05 2023-02-01 日立Astemo株式会社 How to use electronic controllers and non-volatile memory
CN113360175A (en) * 2021-08-11 2021-09-07 新石器慧通(北京)科技有限公司 Application updating method of vehicle controller and vehicle controller

Also Published As

Publication number Publication date
WO2023141832A1 (en) 2023-08-03

Similar Documents

Publication Publication Date Title
CN109634645B (en) Firmware upgrading method and terminal
US9507604B2 (en) Boot method and boot system
US8751783B2 (en) Booting computing devices with EFI aware operating systems
US9424022B2 (en) Method for updating firmware of an electronic device within a computer
CN103970557B (en) The method and storage device of storage device activation system
CN104123153A (en) Apparatus and method for firmware upgrade using USB
CN110874237A (en) Software upgrading method, device, terminal and readable storage medium
CN113672263B (en) Firmware parameter updating control method and device and electronic equipment
CN115237647A (en) Firmware abnormity repairing method and device, electronic equipment and computer storage medium
CN113806139B (en) Operating system recovery method, operating system recovery device, storage medium and computer program product
CN117940892A (en) Program updating method and program updating device
JP2007058412A (en) On-vehicle system and method for managing resource in the system
CN111045709B (en) Firmware upgrading method and firmware upgrading device
WO2020246213A1 (en) Information processing device and information processing method
CN112667444A (en) System upgrading method, storage medium and terminal equipment
JP2005050079A (en) Server device, bios updating program, bootstrap program, and bios updating method
KR101420026B1 (en) A method, apparatus and computer program for loading files during a boot-up process
US20220342653A1 (en) Ota master, center, system, update method, non-transitory storage medium, and vehicle
CN116450059B (en) Data management method, apparatus, electronic device, storage medium, and program product
CN110134456A (en) For managing the method, apparatus, equipment and storage medium of operating system
JP5950290B1 (en) Nonvolatile storage device and processing method of nonvolatile storage device
JP2012194675A (en) Information apparatus and emergency access method for information apparatus
US20170109220A1 (en) Image forming apparatus that ensures operation while hdd is inoperative, and recording medium therefor
JP4715189B2 (en) Disk device and firmware determination method
CN113126883B (en) Data processing method, system and storage medium

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