CN112631625A - System upgrading method and device of embedded equipment and embedded equipment - Google Patents
System upgrading method and device of embedded equipment and embedded equipment Download PDFInfo
- Publication number
- CN112631625A CN112631625A CN202011316461.1A CN202011316461A CN112631625A CN 112631625 A CN112631625 A CN 112631625A CN 202011316461 A CN202011316461 A CN 202011316461A CN 112631625 A CN112631625 A CN 112631625A
- Authority
- CN
- China
- Prior art keywords
- partition
- starting
- data
- spl
- detected
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
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 method comprises the steps of erasing data of a first partition if connection of a downloading tool is detected in the system starting process, wherein the data of the first partition is a starting loader used for guiding and starting a system kernel; and sequentially programming system upgrading data in a second subarea through the downloading tool, and programming a starting loading program in the first subarea. By adopting the scheme provided by the embodiment of the application, the existing system starting process is utilized, when the system is downloaded, the starting loader partition is firstly erased, and after the system is downloaded, the starting loader partition is rewritten. This approach does not take up additional memory space and does not require external triggering.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for upgrading a system of an embedded device, and an embedded device.
Background
The embedded device is a customized device capable of flexibly cutting software and hardware modules according to user requirements (function, reliability, cost, volume, power consumption, environment and the like), and with the high-speed development of information technology and the popularization of electronic products, more and more embedded system devices are widely applied to the fields of industrial control, traffic management, information home appliances, household intelligent management, aerospace and the like. Due to the characteristics of high reliability, strong real-time performance, customizability and the like, the embedded device brings great convenience to production and life of people.
With the application scenes of the embedded device being more complex and diversified, higher requirements are brought to the stability of the embedded device system. The software version of the embedded device has a short updating period, and the version needs to be downloaded and updated frequently. However, in the system upgrade process of the embedded device, due to different environments, an abnormal interruption of the system upgrade process may occur, resulting in damage to existing system files.
In the related art, system upgrade protection of an embedded device is usually implemented by setting an upgrade partition or an upgrade flag bit. However, this method will cause waste of memory space, and needs an external trigger mechanism (such as a download key) to trigger the system to restart, and then performs the system file download upgrade by detecting the upgrade flag bit information. However, some embedded devices such as the vehicle-mounted T-Box do not have the external trigger mechanism, and thus the system upgrade protection cannot be performed by using the above method.
Disclosure of Invention
In view of this, the present application provides a method and an apparatus for upgrading a system of an embedded device, and an embedded device, so as to solve the problems of memory space waste and external triggering required in the system upgrading scheme in the prior art.
In a first aspect, an embodiment of the present application provides a method for upgrading a system of an embedded device, where the method includes:
in the process of starting a system, if the connection of a downloading tool is detected, erasing the data of the first partition, wherein the data of the first partition is a starting loader, and the starting loader is used for guiding and starting a system kernel;
and sequentially programming system upgrading data in a second subarea through the downloading tool, and programming a starting loading program in the first subarea.
Preferably, the method further comprises:
in the process of starting the system, if the data of the first partition is detected to be incomplete, waiting for a connection signal of a downloading tool;
and if the data of the first partition is detected to be complete, loading the data of the first partition and starting the system.
Preferably, the method further comprises:
in the running process of the system, if a restart automatic download signal is received, restarting the system;
and in the process of starting the system, if an automatic downloading signal is received, erasing the data of the first partition, and restarting the system.
Preferably, the first partition is an SPL partition.
Preferably, in the process of starting the system, if a downloading tool connection is detected, erasing data of the first partition includes:
starting Romcode, wherein the Romcode is used for initializing a system starting environment;
and if the Romcode detects the connection of a downloading tool, erasing the data of the SPL partition.
Preferably, in the process of starting the system, if the data of the first partition is detected to be incomplete, waiting for a download tool connection signal includes:
starting Romcode;
and if the data of the SPL partition is detected to be incomplete by the Romcode, waiting for a connection signal of a downloading tool.
Preferably, if it is detected that the data of the first partition is complete, loading the data of the first partition, and starting the system includes:
if the data of the SPL partition is detected to be complete by the Romcode, starting the SPL, the Uboot and the Kernel in sequence, wherein the SPL is used for loading a Uboot image to an external RAM for running, the Uboot is used for guiding and starting a system Kernel, and the Kernel is the system Kernel.
Preferably, in the system operation process, if a restart automatic download signal is received, restarting the system includes:
in the running process of the system, if a reboot autoloader signal issued by adb service is received, the system is restarted.
Preferably, in the process of starting the system, if an automatic download signal is received, erasing data of the first partition, and restarting the system includes:
and sequentially starting the Romcode, the SPL and the Uboot, if the Uboot detects an Autoloader signal, erasing the data of the SPL partition, and restarting the system.
In a second aspect, an embodiment of the present application provides a system upgrade apparatus for an embedded device, including:
the first erasing unit is used for erasing the data of the first partition if the connection of a downloading tool is detected in the system starting process, wherein the data of the first partition is a starting loader, and the starting loader is used for guiding and starting a system kernel;
and the downloading tool is used for programming system upgrading data in the second subarea in sequence and programming the starting loading program in the first subarea.
Preferably, the apparatus further comprises:
the detection unit is used for detecting whether the data of the first partition is complete or not in the system starting process;
if the data of the first partition is detected to be incomplete, waiting for a downloading tool connection signal; and if the data of the first partition is detected to be complete, loading the data of the first partition and starting the system.
Preferably, the apparatus further comprises:
the automatic downloading restarting unit is used for restarting the system if receiving an automatic downloading restarting signal in the running process of the system; and in the process of starting the system, if an automatic downloading signal is received, erasing the data of the first partition, and restarting the system.
Preferably, the first partition is an SPL partition.
Preferably, in the process of starting the system, if a downloading tool connection is detected, erasing data of the first partition includes:
starting Romcode, wherein the Romcode is used for initializing a system starting environment;
and if the Romcode detects the connection of a downloading tool, erasing the data of the SPL partition.
Preferably, in the process of starting the system, if the data of the first partition is detected to be incomplete, waiting for a download tool connection signal includes:
starting Romcode;
and if the data of the SPL partition is detected to be incomplete by the Romcode, waiting for a connection signal of a downloading tool.
Preferably, if it is detected that the data of the first partition is complete, loading the data of the first partition, and starting the system includes:
if the data of the SPL partition is detected to be complete by the Romcode, starting the SPL, the Uboot and the Kernel in sequence, wherein the SPL is used for loading a Uboot image to an external RAM for running, the Uboot is used for guiding and starting a system Kernel, and the Kernel is the system Kernel.
Preferably, in the system operation process, if a restart automatic download signal is received, restarting the system includes:
in the running process of the system, if a reboot autoloader signal issued by adb service is received, the system is restarted.
Preferably, in the process of starting the system, if an automatic download signal is received, erasing data of the first partition, and restarting the system includes:
and starting the Romcode, the SPL and the Uboot in sequence, if the Uboot detects an Autodloader signal, erasing the data of the SPL partition, and restarting the system.
In a third aspect, an embodiment of the present application provides an embedded device, including a processor and a memory, where the memory stores a computer program, and when the computer program is executed, the embedded device is caused to execute the method of any one of the above first aspects.
By adopting the scheme provided by the embodiment of the application, the existing system starting process is utilized, when the system is downloaded, the starting loader partition is firstly erased, and after the system is downloaded, the starting loader partition is rewritten. This approach does not take up additional memory space and does not require external triggering.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a schematic diagram of a start-up process of an embedded device according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a system upgrade method for an embedded device according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of another system upgrading method for an embedded device according to an embodiment of the present disclosure;
fig. 4 is a schematic flowchart of a system upgrade method for an embedded device according to an embodiment of the present application;
fig. 5 is a schematic flowchart of a system upgrading method for an embedded device SOC according to an embodiment of the present disclosure;
fig. 6 is a schematic flowchart of a system integrity protection mechanism of an embedded device SOC according to an embodiment of the present application;
fig. 7 is a schematic flowchart of a system compatible Adb rebot Autoloader downloading method for an embedded device SOC according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an embedded device according to an embodiment of the present invention.
Detailed Description
For better understanding of the technical solutions of the present application, the following detailed descriptions of the embodiments of the present application are provided with reference to the accompanying drawings.
It should be understood that the embodiments described are only a few embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the examples of this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of associative relationship that describes an associated object, meaning that three types of relationships may exist, e.g., A and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Before specifically describing the embodiments of the present application, terms applied or likely to be applied to the embodiments of the present application will be explained first.
The embedded equipment: the customized equipment of the software and hardware module can be flexibly cut according to the user requirements (function, reliability, cost, volume, power consumption, environment and the like), and is applied to scenes with higher requirements on reliability and real-time performance.
System on a Chip (SOC): the integration of a complete system on a single chip can effectively reduce the development cost of electronic/information system products, shorten the development period and improve the competitiveness of the products, and is the most important product development mode to be adopted in the future industry. In the embodiment of the present application, the SOC may be a concrete representation of the embedded device.
Dynamic Random Access Memory (DRAM): a semiconductor memory device uses the magnitude of the stored charge in a capacitor to represent whether a binary bit (bit) is a 1 or a 0, and is called a "dynamic" memory device because of the nature of the need for timed refresh.
Static Random Access Memory (SRAM): random access memory, which stores data that is constantly maintained as long as it remains powered.
Random Access Memory (SDRAM): SDRAM is a synchronous dynamic memory of DRAM, and all address data and control signals are synchronized using a single system clock, and power down information is lost. The SDRAM can not only improve the system performance, but also simplify the design and provide high-speed data transmission.
Erasable Programmable Read-Only Memory (EPROM): and the read-only memory can not lose data after power failure. But the writing time is long and the speed is slow.
Bootloader: and starting a loading program to run before the kernel of the operating system runs. Hardware devices can be initialized, and a memory space mapping graph can be established, so that the software and hardware environment of the system is brought to a proper state, and a correct environment is prepared for finally calling an operating system kernel.
Romcode: the method is used for realizing kernel initialization, bootstrap program storage device interface initialization and loading Bootloader by detecting a starting mode.
Spl (secondary Program loader): a very small Bootloader can run in an internal SRAM of the SOC, and the main function of the Bootloader is to load a Uboot image to an external RAM for running.
Uboot: one type of Bootloader is used to boot the kernel, and the purpose of the Bootloader is to read the kernel of the operating system from the storage unit and place the kernel into the system memory to boot the kernel.
Kernel: the operating system kernel refers to the core part of the operating system, and is composed of parts used for managing memory, files, peripheral devices and system resources in the operating system.
Autoloader: and enabling the operating system to enter an automatic downloading mode for downloading the version of the embedded equipment.
Adb rebot Autoloader: adb rebot supports parameter restart, so the addition of an Autoloader parameter is used for enabling the system to enter an automatic download mode after being restarted.
In the related art, system upgrade protection of an embedded device is usually implemented by setting an upgrade partition or an upgrade flag bit. However, setting up the upgrade partition may cause waste of memory space; the upgrade flag bit is usually implemented by matching with an external trigger mechanism, for example, after the external trigger mechanism (download key, etc.) triggers the system to restart, the system file is downloaded and upgraded by detecting the upgrade flag bit information. However, some embedded devices such as the vehicle-mounted T-Box do not have the external trigger mechanism, and thus the system upgrade protection cannot be performed by using the above method.
In view of the above problems, embodiments of the present application provide a system upgrade for an embedded device, which modifies a system download process by using a characteristic that a boot loader partition is loaded when a system is booted. When the system is downloaded, the starting loader partition is erased, and after the system is downloaded, the starting loader partition is rewritten. The method does not need an external trigger mechanism and does not occupy additional memory space. The details will be described below.
Referring to fig. 1, a schematic diagram of a start-up process of an embedded device according to an embodiment of the present application is provided. In this embodiment, the SOC is taken as an example for illustration, and it is understood that the embedded device may be in other forms besides the SOC, and this is not limited in this embodiment of the application.
When the SOC is started, the solidification program in the Romcode is executed firstly, and the bootloader at the second stage is loaded through detecting a starting mode. For some SOCs, the internal SRAM capacity of the SOC is limited, and the next complete Uboot image cannot be loaded, at this time, the Romcode will load the SPL first, and after the initialization of the external RAM and the environment is completed, the SPL will load the real Uboot image to the external RAM for execution, thereby completing the startup of the subsequent Uboot and Kernel.
Referring to fig. 2, a schematic flowchart of a system upgrade method for an embedded device according to an embodiment of the present application is provided. As shown in fig. 2, it mainly includes the following steps.
Step S201: in the process of starting the system, if the connection of a downloading tool is detected, erasing the data of the first partition, wherein the data of the first partition is a starting loader, and the starting loader is used for guiding to start a system kernel.
In the embodiment of the present application, the process of system startup may be understood as any time node from triggering system startup to completing system startup. Taking the embedded device SOC as an example, after the user triggers the startup or restart key, the system sequentially starts the Romcode, SPL, Uboot and Kernel, and the system starting process may be any time node for starting the Romcode, SPL, Uboot and Kernel.
In an alternative embodiment, the first partition may be an SPL partition. Before the system is started, a user inserts the downloading tool into the USB interface of the embedded device. And after a user triggers a system start key, firstly executing a curing program in Romcode, and erasing the data of the SPL partition when the Romcode detects the connection of a downloading tool. It can be understood that, after the data of the SPL partition is erased, the normal boot process cannot be executed continuously, and at this time, the system enters the download process.
It should be noted that the first partition may be, besides the SPL partition, another partition in the system boot process, such as a Romcode partition, a Uboot partition, and the like, which is not limited in this embodiment of the present application.
Step S202: and sequentially programming system upgrading data in a second subarea through the downloading tool, and programming a starting loading program in the first subarea.
After the data of the first partition is erased, the system enters a downloading process. Firstly, programming system upgrading data in a second partition by a downloading tool, after the programming of the data in the second partition is finished, re-programming the data in the first partition, and then restarting the system. And due to the fact that the data of the first partition are re-programmed, the system can be normally started when being restarted. It is understood that when the first partition is an SPL partition, the erase/rewrite operation is an erase/rewrite operation performed on the SPL partition.
It is understood that the second partition is used for storing operating system data, and the number of the second partition may be one or more, and is set according to the architecture of the embedded device, which is not limited in this embodiment of the application.
By adopting the scheme provided by the embodiment of the application, the existing system starting process is utilized, when the system is downloaded, the starting loader partition is firstly erased, and after the system is downloaded, the starting loader partition is rewritten. This approach does not take up additional memory space and does not require external triggering.
In one possible application scenario, if the system is abnormally interrupted (e.g., powered down) during the execution of the steps shown in fig. 2, the system may not be normally restarted. For example, after the first partition is erased, the system is abnormally interrupted, and the bootloader required for system startup is absent in the first partition. In addition, during this process, the download tool may not complete the download of the system, and therefore, the system upgrade may not be complete.
Aiming at the scene, the embodiment of the application also provides another system upgrading method of the embedded device. Referring to fig. 3, a schematic flowchart of a system upgrade method for another embedded device according to an embodiment of the present application is provided. As shown in fig. 3, it further includes a "data integrity detection step of the first partition" based on the embodiment shown in fig. 2, which is described as follows.
Step S301: and in the process of starting the system, if the data of the first partition is detected to be incomplete, waiting for a downloading tool connection signal.
Take embedded device SOC as an example. After the Romcode is started, whether the SPL partition is complete or not is detected, if the SPL partition is incomplete, and the system is abnormally interrupted in the last downloading process, a downloading tool connection signal is waited. If the download tool connection signal is received, the process goes to step S201 and enters the download mode.
Step S302: and if the data of the first partition is detected to be complete, loading the data of the first partition and starting the system.
And if the data of the SPL partition is detected to be complete, which indicates that the system has not been subjected to abnormal interruption, starting the SPL, the Uboot and the Kernel in sequence, and normally starting the system.
By adopting the technical scheme provided by the embodiment of the application, if the system downloading is abnormally interrupted in some cases, the data loss of the first partition can be identified when the system is started next time, the system automatically enters a downloading mode, and the system is downloaded again, so that the integrity of the system is ensured.
In order to be compatible with a common Adb rebot Autoloader downloading mode, the embodiment of the application further provides another system upgrading method for the embedded device. Referring to fig. 4, a schematic flowchart of a system upgrade method for another embedded device provided in the embodiment of the present application is shown. As shown in fig. 4, the method further includes the following steps on the basis of the steps shown in fig. 3.
Step S401: and in the running process of the system, if a restart automatic download signal is received, restarting the system.
In the embodiment of the application, in order to be compatible with a commonly used Adb Reboot Autoloader downloading method, a Reboot Autoloader signal may be issued through an Adb service in a normal operation process of the system, and if the system receives the Reboot Autoloader signal, the system is restarted.
Step S402: and in the process of starting the system, if an automatic downloading signal is received, erasing the data of the first partition, and restarting the system.
Take embedded system SOC as an example. And sequentially starting the Romcode, the SPL and the Uboot, if the Uboot detects an Autoloader signal, erasing the data of the SPL partition, and restarting the system. At this time, since the SPL partition data is missing, the data of the SPL partition is detected to be incomplete during the system startup, and the process proceeds to step S301.
By adopting the technical scheme provided by the embodiment of the application, for being compatible with a common Adb rebot Autoloader downloading mode, the system enters a Uboot stage after rebot, if the Uboot detects an Autoloader signal, the system is restarted after actively erasing the SPL partition, and at the moment, Romcode can identify that the SPL partition is lost and set the system to enter a downloading mode, so that automatic detection for downloading is realized, and the integrity of the system is ensured.
In order to facilitate better understanding of the technical solution of the present application by those skilled in the art, the following takes an embedded device SOC as an example, and is described with reference to different application scenarios.
Scenario one, the download tool is connected to the embedded device.
Fig. 5 is a schematic flowchart of a system upgrading method for an embedded device SOC according to an embodiment of the present disclosure. As shown in fig. 5, it mainly includes the following steps.
Step S501: the Romcode is started. After a user triggers a start key to start up, the Romcode is started firstly.
Step S502: detecting whether a downloading tool connection exists, and if so, entering the step S503; otherwise, the process advances to step S507.
Step S503: the SPL partition is erased.
Step S504: the operating system partition is programmed by the download tool.
Step S505: the SPL partition is re-programmed.
Step S506: and restarting the system.
Step S507: starting SPL, starting Uboot, and starting Kernel.
In an application scenario of the embodiment of the application, the downloading tool is connected to the embedded device. And when the Romcode detects that the USB port is connected with a downloading tool and is started, the system enters a downloading mode. Specifically, the data of the SPL partition is erased firstly, then the data of the operating system partition is programmed, and after the programming of the data of the operating system partition is completed, the SPL partition data is programmed again before the downloading mode exits, so that the completion of the downloading of the data is identified and the abnormal exiting condition is avoided.
And in a second scenario, the system is abnormally quitted or interrupted in the previous system upgrading process.
Fig. 6 is a schematic flowchart of a system integrity protection mechanism of an embedded device SOC according to an embodiment of the present application. As shown in fig. 6, it mainly includes the following steps.
Step S601: the Romcode is started. After a user triggers a start key to start up, the Romcode is started firstly.
Step S602: and detecting whether the data of the SPL partition is complete. If the determination result is yes, go to step S603; otherwise, the process proceeds to step S604.
Step S603: start SPL, start Uboot, start Kerne l.
Step S604: waiting for a download tool connection signal.
In this embodiment of the present application, when the Romcode detects that the SPL data is incomplete, it indicates that an abnormal exit or interruption occurs in the previous system upgrade process, and at this time, the Romcode sets the system to enter a download mode, waits for a download tool connection signal, and jumps to step S502 shown in fig. 5. And when the SPL data is detected to be complete, indicating that the current system has no abnormity, starting the SPL, completing the initialization configuration of the system, and further starting the Uboot and the Kernel.
And a third scenario is compatible with an Adb rebot Autoloader downloading mode.
Fig. 7 is a schematic flowchart of a system-compatible Adb rebot Autoloader downloading method for an embedded device SOC according to an embodiment of the present application. As shown in fig. 7, it mainly includes the following steps.
Step S701: the system operates normally.
Step S702: judging whether a reboot autoloader signal issued by an adb service is received or not, and if so, entering step S703; otherwise, return to step S701.
Step S703: and restarting the system, starting the SPL and starting the Uboot.
Step S704: judging whether an Autoloader signal is detected or not, and if so, entering step S705; otherwise, the process proceeds to step S707.
Step S705: the SPL partition is erased.
Step S706: and restarting the system.
Step S707: kerne l was initiated.
In the embodiment of the application, the Adb rebot Autoloader downloading mode is compatible. Firstly, a reboot autoloader signal is issued through adb service when the system normally operates, and the system is restarted after the system receives the reboot autoloader signal. After the CPU initialization and SPL loading of the Romcode are finished, the system enters a Uboot starting stage. After the Autoloader signal is acquired at this stage, the Uboot performs an action of erasing the SPL partition, and then restarts the system. After the system is restarted, the process jumps to step S602 shown in fig. 6, thereby implementing automatic downloading of the embedded device.
Corresponding to the above method embodiment, the present application further provides a system upgrade apparatus for an embedded device, where the apparatus includes:
the first erasing unit is used for erasing the data of the first partition if the connection of a downloading tool is detected in the system starting process, wherein the data of the first partition is a starting loader, and the starting loader is used for guiding and starting a system kernel;
and the downloading tool is used for programming system upgrading data in the second subarea in sequence and programming the starting loading program in the first subarea.
In an alternative embodiment, the apparatus further comprises: the detection unit is used for detecting whether the data of the first partition is complete or not in the system starting process;
if the data of the first partition is detected to be incomplete, waiting for a downloading tool connection signal; and if the data of the first partition is detected to be complete, loading the data of the first partition and starting the system.
In an alternative embodiment, the apparatus further comprises:
the automatic downloading restarting unit is used for restarting the system if receiving an automatic downloading restarting signal in the running process of the system; and in the process of starting the system, if an automatic downloading signal is received, erasing the data of the first partition, and restarting the system.
In an alternative embodiment, the first partition is an SPL partition.
In an optional embodiment, during system startup, if a downloader connection is detected, erasing data of the first partition includes: starting Romcode, wherein the Romcode is used for initializing a system starting environment; and if the Romcode detects the connection of a downloading tool, erasing the data of the SPL partition.
In an optional embodiment, during the system startup, if the data of the first partition is detected to be incomplete, waiting for a download tool connection signal includes: starting Romcode; and if the data of the SPL partition is detected to be incomplete by the Romcode, waiting for a connection signal of a downloading tool.
In an optional embodiment, if it is detected that the data of the first partition is complete, loading the data of the first partition, and starting the system includes: if the data of the SPL partition is detected to be complete by the Romcode, starting the SPL, the Uboot and the Kernel in sequence, wherein the SPL is used for loading a Uboot image to an external RAM for running, the Uboot is used for guiding and starting a system Kernel, and the Kernel is the system Kernel.
In an optional embodiment, in the system operation process, if a restart automatic download signal is received, restarting the system includes: in the running process of the system, if a reboot autoloader signal issued by adb service is received, the system is restarted.
In an optional embodiment, in the process of starting the system, if an automatic download signal is received, erasing data of the first partition, and restarting the system includes: and starting the Romcode, the SPL and the Uboot in sequence, if the Uboot detects an Autodloader signal, erasing the data of the SPL partition, and restarting the system.
By adopting the scheme provided by the embodiment of the application, the existing system starting process is utilized, when the system is downloaded, the starting loader partition is firstly erased, and after the system is downloaded, the starting loader partition is rewritten. This approach does not take up additional memory space and does not require external triggering.
Corresponding to the embodiment, the application also provides the embedded equipment. Fig. 8 is a schematic structural diagram of an embedded device according to an embodiment of the present invention, where the embedded device 800 may include: a processor 801, a memory 802, and a communication unit 803. The components communicate over one or more buses, and those skilled in the art will appreciate that the configuration of the servers shown in the figures are not meant to limit embodiments of the present invention, and may be in the form of buses, stars, more or fewer components than those shown, some components in combination, or a different arrangement of components.
The communication unit 803 is configured to establish a communication channel so that the storage device can communicate with other devices. Receiving the user data sent by other devices or sending the user data to other devices.
The processor 801, which is a control center of the storage device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and/or processes data by operating or executing software programs and/or modules stored in the memory 802 and calling data stored in the memory. The processor may be composed of Integrated Circuits (ICs), for example, a single packaged IC, or a plurality of packaged ICs connected to the same or different functions. For example, the processor 801 may include only a Central Processing Unit (CPU). In the embodiment of the present invention, the CPU may be a single operation core, or may include multiple operation cores.
The memory 802, for storing instructions executed by the processor 801, may be implemented by any type of volatile or non-volatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The execution instructions in the memory 802, when executed by the processor 801, enable the embedded device 800 to perform some or all of the steps in the embodiment shown in FIG. 7.
In a specific implementation, the present invention further provides a computer storage medium, where the computer storage medium may store a program, and the program may include some or all of the steps in the embodiments of the calling method provided by the present invention when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like.
Those skilled in the art will readily appreciate that the techniques of the embodiments of the present invention may be implemented as software plus a required general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
The same and similar parts in the various embodiments in this specification may be referred to each other. Especially, as for the device embodiment and the terminal embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant points can be referred to the description in the method embodiment.
Claims (19)
1. A system upgrading method for an embedded device is characterized by comprising the following steps:
in the process of starting a system, if the connection of a downloading tool is detected, erasing the data of the first partition, wherein the data of the first partition is a starting loader, and the starting loader is used for guiding and starting a system kernel;
and sequentially programming system upgrading data in a second subarea through the downloading tool, and programming a starting loading program in the first subarea.
2. The method of claim 1, further comprising:
in the process of starting the system, if the data of the first partition is detected to be incomplete, waiting for a connection signal of a downloading tool;
and if the data of the first partition is detected to be complete, loading the data of the first partition and starting the system.
3. The method of claim 2, further comprising:
in the running process of the system, if a restart automatic download signal is received, restarting the system;
and in the process of starting the system, if an automatic downloading signal is received, erasing the data of the first partition, and restarting the system.
4. The method of any of claims 1-3, wherein the first partition is an SPL partition.
5. The method of claim 4, wherein erasing data of the first partition if a downloader connection is detected during system startup comprises:
starting Romcode, wherein the Romcode is used for initializing a system starting environment;
and if the Romcode detects the connection of a downloading tool, erasing the data of the SPL partition.
6. The method of claim 4, wherein during system startup, if the data of the first partition is detected to be incomplete, waiting for a download tool connection signal comprises:
starting Romcode;
and if the data of the SPL partition is detected to be incomplete by the Romcode, waiting for a connection signal of a downloading tool.
7. The method of claim 6, wherein if the data of the first partition is detected to be complete, loading the data of the first partition, and starting up a system comprises:
if the data of the SPL partition is detected to be complete by the Romcode, starting the SPL, the Uboot and the Kernel in sequence, wherein the SPL is used for loading a Uboot image to an external RAM for running, the Uboot is used for guiding and starting a system Kernel, and the Kernel is the system Kernel.
8. The method of claim 4, wherein restarting the system if the restart automatic download signal is received during the system operation comprises:
in the running process of the system, if a reboot autoloader signal issued by adb service is received, the system is restarted.
9. The method of claim 8, wherein during system startup, if an automatic download signal is received, erasing data of the first partition, and restarting the system comprises:
and sequentially starting the Romcode, the SPL and the Uboot, if the Uboot detects an Autoloader signal, erasing the data of the SPL partition, and restarting the system.
10. A system upgrading device of an embedded device is characterized by comprising:
the first erasing unit is used for erasing the data of the first partition if the connection of a downloading tool is detected in the system starting process, wherein the data of the first partition is a starting loader, and the starting loader is used for guiding and starting a system kernel;
and the downloading tool is used for programming system upgrading data in the second subarea in sequence and programming the starting loading program in the first subarea.
11. The apparatus of claim 10, further comprising:
the detection unit is used for detecting whether the data of the first partition is complete or not in the system starting process;
if the data of the first partition is detected to be incomplete, waiting for a downloading tool connection signal; and if the data of the first partition is detected to be complete, loading the data of the first partition and starting the system.
12. The apparatus of claim 11, further comprising:
the automatic downloading restarting unit is used for restarting the system if receiving an automatic downloading restarting signal in the running process of the system; and in the process of starting the system, if an automatic downloading signal is received, erasing the data of the first partition, and restarting the system.
13. The apparatus of any of claims 10-12, wherein the first partition is an SPL partition.
14. The apparatus of claim 13, wherein erasing data of the first partition if a downloader connection is detected during system startup comprises:
starting Romcode, wherein the Romcode is used for initializing a system starting environment;
and if the Romcode detects the connection of a downloading tool, erasing the data of the SPL partition.
15. The apparatus of claim 13, wherein during system startup, if the data of the first partition is detected to be incomplete, waiting for a download tool connection signal comprises:
starting Romcode;
and if the data of the SPL partition is detected to be incomplete by the Romcode, waiting for a connection signal of a downloading tool.
16. The apparatus of claim 15, wherein if the data of the first partition is detected to be complete, loading the data of the first partition, and starting up a system comprises:
if the data of the SPL partition is detected to be complete by the Romcode, starting the SPL, the Uboot and the Kernel in sequence, wherein the SPL is used for loading a Uboot image to an external RAM for running, the Uboot is used for guiding and starting a system Kernel, and the Kernel is the system Kernel.
17. The apparatus of claim 13, wherein restarting the system if the restart automatic download signal is received during the system operation comprises:
in the running process of the system, if a reboot autoloader signal issued by adb service is received, the system is restarted.
18. The apparatus of claim 17, wherein during system startup, if an automatic download signal is received, erasing data of the first partition, and restarting the system comprises:
and starting the Romcode, the SPL and the Uboot in sequence, if the Uboot detects an Autodloader signal, erasing the data of the SPL partition, and restarting the system.
19. An embedded device, comprising a processor and a memory, the memory storing a computer program that, when executed, causes the embedded device to perform the method of any of claims 1-9.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011316461.1A CN112631625B (en) | 2020-11-20 | 2020-11-20 | System upgrading method and device for embedded equipment and embedded equipment |
PCT/CN2021/128200 WO2022105595A1 (en) | 2020-11-20 | 2021-11-02 | Method and apparatus for upgrading system of embedded device, and embedded device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011316461.1A CN112631625B (en) | 2020-11-20 | 2020-11-20 | System upgrading method and device for embedded equipment and embedded equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112631625A true CN112631625A (en) | 2021-04-09 |
CN112631625B CN112631625B (en) | 2022-10-21 |
Family
ID=75303597
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011316461.1A Active CN112631625B (en) | 2020-11-20 | 2020-11-20 | System upgrading method and device for embedded equipment and embedded equipment |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112631625B (en) |
WO (1) | WO2022105595A1 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113157301A (en) * | 2021-05-20 | 2021-07-23 | 厦门紫光展锐科技有限公司 | Terminal version upgrading method, system, storage medium and terminal |
WO2022105595A1 (en) * | 2020-11-20 | 2022-05-27 | 展讯通信(上海)有限公司 | Method and apparatus for upgrading system of embedded device, and embedded device |
CN114655140A (en) * | 2022-03-15 | 2022-06-24 | 东软睿驰汽车技术(沈阳)有限公司 | Vehicle starting control method and related device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102629206A (en) * | 2012-02-29 | 2012-08-08 | 深圳市赛格导航科技股份有限公司 | Embedded system software upgrading method and system |
CN110134426A (en) * | 2019-04-18 | 2019-08-16 | 深圳市致宸信息科技有限公司 | A kind of embedded system upgrade method, device and terminal device |
CN111104173A (en) * | 2019-11-25 | 2020-05-05 | 晶晨半导体(深圳)有限公司 | Protection design method of bootstrap program |
CN111459508A (en) * | 2020-03-27 | 2020-07-28 | 北京经纬恒润科技有限公司 | Boot L loader self-upgrading method and system |
CN111796848A (en) * | 2020-07-08 | 2020-10-20 | 中国第一汽车股份有限公司 | Bootloader software updating method and device, embedded controller and storage medium |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090271780A1 (en) * | 2008-04-24 | 2009-10-29 | Moschip Semiconductor Technology Limited | Automatic complete firmware upgrade |
CN110908733B (en) * | 2019-11-15 | 2023-01-13 | 展讯通信(上海)有限公司 | Working mode determining method and device, and control method and device |
CN111522602B (en) * | 2020-04-22 | 2023-07-11 | 展讯通信(上海)有限公司 | Method for starting communication device |
CN111651185B (en) * | 2020-05-30 | 2022-11-11 | 展讯通信(上海)有限公司 | Software upgrading method and device |
CN112631625B (en) * | 2020-11-20 | 2022-10-21 | 展讯通信(上海)有限公司 | System upgrading method and device for embedded equipment and embedded equipment |
-
2020
- 2020-11-20 CN CN202011316461.1A patent/CN112631625B/en active Active
-
2021
- 2021-11-02 WO PCT/CN2021/128200 patent/WO2022105595A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102629206A (en) * | 2012-02-29 | 2012-08-08 | 深圳市赛格导航科技股份有限公司 | Embedded system software upgrading method and system |
CN110134426A (en) * | 2019-04-18 | 2019-08-16 | 深圳市致宸信息科技有限公司 | A kind of embedded system upgrade method, device and terminal device |
CN111104173A (en) * | 2019-11-25 | 2020-05-05 | 晶晨半导体(深圳)有限公司 | Protection design method of bootstrap program |
CN111459508A (en) * | 2020-03-27 | 2020-07-28 | 北京经纬恒润科技有限公司 | Boot L loader self-upgrading method and system |
CN111796848A (en) * | 2020-07-08 | 2020-10-20 | 中国第一汽车股份有限公司 | Bootloader software updating method and device, embedded controller and storage medium |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022105595A1 (en) * | 2020-11-20 | 2022-05-27 | 展讯通信(上海)有限公司 | Method and apparatus for upgrading system of embedded device, and embedded device |
CN113157301A (en) * | 2021-05-20 | 2021-07-23 | 厦门紫光展锐科技有限公司 | Terminal version upgrading method, system, storage medium and terminal |
CN114655140A (en) * | 2022-03-15 | 2022-06-24 | 东软睿驰汽车技术(沈阳)有限公司 | Vehicle starting control method and related device |
CN114655140B (en) * | 2022-03-15 | 2024-03-26 | 东软睿驰汽车技术(沈阳)有限公司 | Vehicle starting control method and related device |
Also Published As
Publication number | Publication date |
---|---|
WO2022105595A1 (en) | 2022-05-27 |
CN112631625B (en) | 2022-10-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112631625B (en) | System upgrading method and device for embedded equipment and embedded equipment | |
CN109634645B (en) | Firmware upgrading method and terminal | |
US9507604B2 (en) | Boot method and boot system | |
US7073053B1 (en) | Method and apparatus for a boot progression scheme for reliably initializing a system | |
US9304788B2 (en) | Electronic device, configurable component and configuration information storage method thereof | |
CN110825563B (en) | System recovery method and device and electronic equipment | |
CN106020875B (en) | Firmware update management method and device of embedded terminal | |
CN109408122B (en) | Equipment starting method, electronic equipment and computer storage medium | |
WO2022188690A1 (en) | Method and apparatus for upgrading electronic device | |
CN109413497B (en) | Intelligent television and system starting method thereof | |
CN114385251A (en) | Operating system booting method, system, terminal and storage medium based on memory | |
CN109710297A (en) | A kind of equipment entirety or sub-module carry out upgrading and backing method | |
CN113032183A (en) | System management method, device, computer equipment and storage medium | |
CN111596964A (en) | Method and device for realizing batch deployment of Windows systems based on wireless network | |
CN115981694A (en) | OTA (over the air) upgrading method and device of terminal equipment, readable storage medium and terminal equipment | |
CN117389578A (en) | Cloud terminal system upgrading method and device, cloud terminal and storage medium | |
KR101118111B1 (en) | Mobile communication terminal and booting method thereof | |
CN114020308A (en) | Camera equipment upgrading method, device, equipment and medium | |
KR101420026B1 (en) | A method, apparatus and computer program for loading files during a boot-up process | |
CN114879995B (en) | Firmware updating method and device | |
CN113986261A (en) | Data flashing method, related device, equipment and readable storage medium | |
WO2003010661A1 (en) | Automated upgrading of memory data structures | |
CN117270976A (en) | Method, device, equipment and storage medium for starting basic input/output system | |
CN118409804A (en) | Version switching method and device of boot loader | |
CN117873579A (en) | Operating system jump method, chip and device |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |