WO2022105595A1 - 嵌入式设备的系统升级方法、装置及嵌入式设备 - Google Patents

嵌入式设备的系统升级方法、装置及嵌入式设备 Download PDF

Info

Publication number
WO2022105595A1
WO2022105595A1 PCT/CN2021/128200 CN2021128200W WO2022105595A1 WO 2022105595 A1 WO2022105595 A1 WO 2022105595A1 CN 2021128200 W CN2021128200 W CN 2021128200W WO 2022105595 A1 WO2022105595 A1 WO 2022105595A1
Authority
WO
WIPO (PCT)
Prior art keywords
partition
data
spl
download
romcode
Prior art date
Application number
PCT/CN2021/128200
Other languages
English (en)
French (fr)
Inventor
李峥
周勃
田伍红
Original Assignee
展讯通信(上海)有限公司
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 展讯通信(上海)有限公司 filed Critical 展讯通信(上海)有限公司
Publication of WO2022105595A1 publication Critical patent/WO2022105595A1/zh

Links

Images

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
    • 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

Definitions

  • the present application relates to the field of computer technology, and in particular, to a system upgrade method and device for an embedded device, and an embedded device.
  • An embedded device is a customized device that can flexibly tailor software and hardware modules according to user needs (function, reliability, cost, volume, power consumption, environment, etc.).
  • user needs function, reliability, cost, volume, power consumption, environment, etc.
  • More and more embedded system devices are widely used in industrial control, traffic management, information appliances, home intelligent management, aerospace and other fields. Due to its high reliability, strong real-time performance, and customizability, embedded devices have brought great convenience to our production and life.
  • the system upgrade protection of an embedded device is usually implemented by setting an upgrade partition or an upgrade flag.
  • this method will cause a waste of memory space, and requires an external trigger mechanism (download button, etc.) to trigger the system to restart, and then download and upgrade the system file by detecting the upgrade flag bit information.
  • an external trigger mechanism download button, etc.
  • the above-mentioned method cannot be used for system upgrade protection.
  • the present application provides a system upgrade method, device and embedded device for an embedded device, so as to solve the problem of wasting memory space and requiring external triggering caused by the system upgrade solution in the prior art.
  • an embodiment of the present application provides a system upgrade method for an embedded device, the method comprising:
  • the data of the first partition is erased, and the data of the first partition is a boot loader, and the boot loader is used to boot the system kernel;
  • the system upgrade data is sequentially programmed in the second partition by the download tool, and the boot loader is programmed in the first partition.
  • the method further includes:
  • the data of the first partition is loaded, and the system is started.
  • the method further includes:
  • the first partition is an SPL partition.
  • the data of the first partition is erased, including:
  • the Romcode is used to initialize the system startup environment
  • the download tool connection signal including:
  • the Romcode detects that the data of the SPL partition is incomplete, it waits for the download tool connection signal.
  • the data of the first partition is loaded, and the system is started, including:
  • the Romcode detects that the data of the SPL partition is complete, it starts SPL, Uboot and Kernel in sequence, the SPL is used to load the Uboot image to the external RAM for operation, the Uboot is used to boot the system kernel, and the Kernel is system kernel.
  • restarting the system includes:
  • erasing the data of the first partition and restarting the system includes:
  • 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 the download tool is detected in the process of system startup, and the data of the first partition is a boot loader, and the boot loader Used to boot the system kernel;
  • the download tool is used for sequentially programming system upgrade data in the second partition, and programming a boot loader in the first partition.
  • the device further comprises:
  • a detection unit configured to detect whether the data of the first partition is complete during the system startup process
  • the device further comprises:
  • the restart automatic download unit is used to restart the system if a restart automatic download signal is received during the system operation; during the system startup process, if the automatic download signal is received, erase the data of the first partition, Reboot the system.
  • the first partition is an SPL partition.
  • the data of the first partition is erased, including:
  • the Romcode is used to initialize the system startup environment
  • the download tool connection signal including:
  • the Romcode detects that the data of the SPL partition is incomplete, it waits for the download tool connection signal.
  • the data of the first partition is loaded, and the system is started, including:
  • the Romcode detects that the data of the SPL partition is complete, it starts SPL, Uboot and Kernel in sequence, the SPL is used to load the Uboot image to the external RAM for operation, the Uboot is used to boot the system kernel, and the Kernel is system kernel.
  • restarting the system includes:
  • erasing the data of the first partition and restarting the system includes:
  • 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 made to perform the above-mentioned first aspect The method of any one.
  • the boot loader partition is first erased, and after the system download is completed, the boot loader partition is rewritten. This method does not occupy additional memory space and does not require external triggering.
  • FIG. 1 is a schematic diagram of a startup flow of an embedded device provided by an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a system upgrade method for an embedded device provided by an embodiment of the present application
  • FIG. 3 is a schematic flowchart of another system upgrade method for an embedded device provided by an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of another method for system upgrading of an embedded device provided by an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of a system upgrade method for an embedded device SOC provided by an embodiment of the present application
  • FIG. 6 is a schematic flowchart of a system integrity protection mechanism of an embedded device SOC provided by an embodiment of the present application
  • FIG. 7 is a schematic flowchart of a system compatible Adb Reboot Autoloader download mode of an embedded device SOC provided by 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.
  • Embedded devices Customized devices that can flexibly tailor software and hardware modules according to user requirements (function, reliability, cost, volume, power consumption, environment, etc.), and are used in scenarios with high requirements for reliability and real-time performance.
  • SOC System on a Chip
  • DRAM Dynamic Random Access Memory
  • Static random access memory Static Random Access Memory, SRAM: a type of random access memory, as long as the memory is kept powered on, the data stored in it can be kept constantly.
  • SDRAM Synchronous Dynamic Random Access Memory
  • DRAM Dynamic Random Access Memory
  • SDRAM is a type of DRAM, synchronous dynamic memory, using a single system clock to synchronize all address data and control signals, power-down information will be lost.
  • Using SDRAM can not only improve system performance, but also simplify design and provide high-speed data transfer.
  • EPROM Erasable Programmable Read-Only Memory
  • Bootloader A boot loader that runs before the operating system kernel runs. Hardware devices can be initialized, and a memory space map can be established to bring the system's hardware and software environment to a suitable state to prepare the correct environment for the eventual invocation of the operating system kernel.
  • Romcode used to initialize the kernel, initialize the boot program storage device interface, and load the Bootloader by detecting the startup mode.
  • SPL Secondary Program Loader
  • Uboot A kind of Bootloader, used to boot the kernel, its purpose is to read the kernel of the operating system from the storage unit and put it into the system memory to start the kernel.
  • Kernel refers to the core part of the operating system, which consists of the parts of the operating system used to manage memory, files, peripherals, and system resources.
  • Autoloader Make the operating system enter the automatic download mode, which is used to download the version of the embedded device.
  • Adb Reboot Autoloader Adb Reboot supports restarting with parameters, so adding the Autoloader parameter is used to make the system enter the automatic download mode after restarting.
  • the system upgrade protection of an embedded device is usually implemented by setting an upgrade partition or an upgrade flag.
  • setting the upgrade partition will cause a waste of memory space; the upgrade flag usually needs to be implemented with an external trigger mechanism.
  • the external trigger mechanism download button, etc.
  • the system file download and upgrade by detecting the upgrade flag information.
  • the above-mentioned method cannot be used for system upgrade protection.
  • the embodiments of the present application provide a system upgrade of an embedded device, which modifies the system download process by using the feature that a boot loader partition is loaded when the system is started. When downloading the system, erase the boot loader partition first, and then rewrite the boot loader partition after the system download is complete. This method does not require an external trigger mechanism and does not occupy additional memory space. A detailed description will be given below.
  • FIG. 1 it is a schematic diagram of a startup flow of an embedded device according to an embodiment of the present application.
  • the SOC is used as an example for description. It can be understood that, in addition to the SOC, the embedded device may also be in other forms, which are not limited in this embodiment of the present application.
  • the firmware in the Romcode is executed first when the SOC is started, and the second-stage Bootlader is loaded by detecting the startup method. For some SOCs, their internal SRAM capacity is limited and the next complete Uboot image cannot be loaded. At this time, Romcode will load SPL first. After completing the initialization of external RAM and environment, SPL will load the real Uboot image into external RAM. Execute to complete the subsequent Uboot and Kernel startup.
  • FIG. 2 it is a schematic flowchart of a system upgrade method for an embedded device provided by an embodiment of the present application. As shown in Figure 2, it mainly includes the following steps.
  • Step S201 During the process of system startup, if the connection of the download tool is detected, the data of the first partition is erased, and the data of the first partition is a boot loader, and the boot loader is used to boot the boot system kernel.
  • the system startup process can be understood as any time node from triggering the system startup to the completion of the system startup.
  • the system startup process can be any time node for starting Romcode, SPL, Uboot and Kernel.
  • the first partition may be an SPL partition.
  • the user inserts the download tool into the USB interface of the embedded device.
  • the firmware in the Romcode is executed first, and the Romcode detects the connection of the download tool and erases the data in the SPL partition. It is understandable that when the data of the SPL partition is erased, the normal startup process cannot continue to be executed, and at this time, the system enters the download process.
  • the first partition may also be other partitions in the system startup process, such as a Romcode partition, a Uboot partition, etc., which is not limited in this embodiment of the present application.
  • Step S202 Program the system upgrade data in the second partition sequentially by using the download tool, and program the startup loader in the first partition.
  • the system After the data of the first partition is erased, the system enters the download process. First, use the download tool to program the system upgrade data in the second partition, and after the data in the second partition is completed, reprogram the data in the first partition, and then restart the system. Since the data of the first partition is reprogrammed, the system can be started normally when the system is restarted. It can be understood that when the first partition is an SPL partition, the erasing and rewriting operations are erasing and rewriting operations performed on the SPL partition.
  • the second partition is used to store operating system data, and the number of the second partition may be one or more, which is specifically set according to the architecture of the embedded device, which is not limited in this embodiment of the present application.
  • the boot loader partition is first erased, and after the system download is completed, the boot loader partition is rewritten. This method does not occupy additional memory space and does not require external triggering.
  • the system may not be restarted normally.
  • the system is abnormally interrupted, eg, power down
  • the system may not be restarted normally.
  • the system is abnormally interrupted, and the Bootlader required for system startup is missing in the first partition.
  • the download tool may not complete the download of the system, and therefore, the system upgrade cannot be completed.
  • the embodiment of the present application further provides another system upgrade method for an embedded device.
  • FIG. 3 it is a schematic flowchart of another method for system upgrading of an embedded device provided by an embodiment of the present application. As shown in FIG. 3 , on the basis of the embodiment shown in FIG. 2 , it further includes a "data integrity detection step of the first partition", which is specifically as follows.
  • Step S301 During the system startup process, if it is detected that the data of the first partition is incomplete, wait for a download tool connection signal.
  • Step S201 is entered, and the download mode is entered.
  • Step S302 If it is detected that the data of the first partition is complete, load the data of the first partition and start the system.
  • the next startup will recognize that the data in the first partition is missing, automatically enter the download mode, and re-download the system to ensure that the system is completeness.
  • FIG. 4 it is a schematic flowchart of another method for system upgrading of an embedded device provided by an embodiment of the present application. As shown in FIG. 4 , it further includes the following steps on the basis of the steps shown in FIG. 3 .
  • Step S401 During the operation of the system, if a restart automatic download signal is received, the system is restarted.
  • the reboot autoloader signal can be issued through the adb service during the normal operation of the system, and if the system receives the reboot autoloader signal, the system is restarted.
  • Step S402 During the system startup process, if an automatic download signal is received, the data of the first partition is erased, and the system is restarted.
  • the system in order to be compatible with the commonly used Adb Reboot Autoloader download method, the system enters the Uboot stage after Reboot. If Uboot detects the Autoloader signal, it will actively erase the SPL partition and restart again. At this time, Romcode will recognize When the SPL partition is missing, the system is set to enter the download mode, which realizes automatic detection and download, and ensures the integrity of the system.
  • Scenario 1 connect the download tool to the embedded device.
  • FIG. 5 is a schematic flowchart of a system upgrade method for an embedded device SOC provided by an embodiment of the present application. As shown in Figure 5, it mainly includes the following steps.
  • Step S501 Start Romcode. After the user triggers the start button to power on, the Romcode is started first.
  • Step S502 Detect whether there is a download tool connection, if the judgment result is yes, go to step S503; otherwise, go to step S507.
  • Step S503 Erase the SPL partition.
  • Step S504 Burn the operating system partition by using the download tool.
  • Step S505 Reprogram the SPL partition.
  • Step S506 Restart the system.
  • Step S507 Start SPL, start Uboot, and start Kernel.
  • the download tool is connected to the embedded device.
  • Romcode detects that there is a download tool connected to the USB port and starts, the system enters the download mode. Specifically, first erase the data of the SPL partition, and then perform the data programming of the operating system partition. When the data programming of the operating system partition is completed, re-program the SPL partition data before exiting the download mode to indicate that the download data is completed and No abnormal exits.
  • Scenario 2 Abnormal exit or interruption during the previous system upgrade.
  • FIG. 6 is a schematic flowchart of a system integrity protection mechanism of an embedded device SOC provided by an embodiment of the present application. As shown in Figure 6, it mainly includes the following steps.
  • Step S601 Start Romcode. After the user triggers the start button to turn on the device, the Romcode is first started.
  • Step S602 Check whether the data of the SPL partition is complete. If the judgment result is yes, go to step S603; otherwise, go to step S604.
  • Step S603 Start SPL, start Uboot, and start Kernel.
  • Step S604 Wait for the download tool connection signal.
  • FIG. 7 is a schematic flowchart of a system compatible Adb Reboot Autoloader downloading method of an embedded device SOC provided by an embodiment of the present application. As shown in Figure 7, it mainly includes the following steps.
  • Step S701 the system operates normally.
  • Step S702 judging whether the reboot autoloader signal issued by the adb service is received, if the judgment result is yes, go to step S703; otherwise, return to step S701.
  • Step S703 the system is restarted, SPL is started, and Uboot is started.
  • Step S704 judging whether the Autoloader signal is detected, if the judgment result is yes, go to step S705; otherwise, go to step S707.
  • Step S705 Erase the SPL partition.
  • Step S706 Restart the system.
  • Step S707 Start the Kernel.
  • the reboot autoloader signal is issued through the adb service when the system is running normally.
  • the system receives the reboot autoloader signal, the system restarts.
  • the system After completing the Romcode CPU initialization and SPL loading, the system enters the Uboot startup phase.
  • Uboot will perform the action of erasing the SPL partition, and then restart the system.
  • the system restarts it jumps to step S602 shown in FIG. 6 , thereby realizing the automatic download of the embedded device.
  • the present application further provides a system upgrade apparatus for an embedded device, the apparatus comprising:
  • the first erasing unit is used for erasing the data of the first partition if the connection of the download tool is detected in the process of system startup, and the data of the first partition is a boot loader, and the boot loader Used to boot the system kernel;
  • the download tool is used for sequentially programming system upgrade data in the second partition, and programming a boot loader in the first partition.
  • the apparatus further includes: a detection unit, configured to detect whether the data of the first partition is complete during the system startup process;
  • the apparatus further includes:
  • the restart automatic download unit is used to restart the system if a restart automatic download signal is received during the system operation; during the system startup process, if the automatic download signal is received, erase the data of the first partition, Reboot the system.
  • the first partition is an SPL partition.
  • erasing the data of the first partition includes: starting Romcode, where the Romcode is used to initialize the system startup environment; The Romcode detects that the download tool is connected, and then erases the data of the SPL partition.
  • a download tool connection signal including: starting Romcode; if the Romcode detects the data of the SPL partition Incomplete, wait for the download tool connection signal.
  • restarting the system includes: during system operation, if a reboot autoloader signal issued by the adb service is received, then Reboot the system.
  • erasing the data of the first partition and restarting the system includes: starting Romcode, SPL and Uboot in sequence, if The Uboot detects the Autodloader signal, erases the data of the SPL partition, and restarts the system.
  • the boot loader partition is first erased, and after the system download is completed, the boot loader partition is rewritten. This method does not occupy additional memory space and does not require external triggering.
  • FIG. 8 is a schematic structural diagram of an embedded device according to an embodiment of the present invention.
  • the embedded device 800 may include: a processor 801 , a memory 802 , and a communication unit 803 . These components communicate through one or more buses.
  • a processor 801 may be a central processing unit 801 .
  • a memory 802 may be a central processing unit 803 .
  • a communication unit 803 may be a central processing unit 803 .
  • These components communicate through one or more buses.
  • the structure of the server shown in the figure does not constitute a limitation on the embodiments of the present invention, and it may be a bus-shaped structure or a star-shaped structure. , may also include more or fewer components than shown, or combine certain components, or arrange components differently.
  • the communication unit 803 is configured to establish a communication channel, so that the storage device can communicate with other devices. Receive user data sent by other devices or send user data to other devices.
  • the processor 801 which is the control center of the storage device, uses various interfaces and lines to connect various parts of the entire electronic device, runs or executes the software programs and/or modules stored in the memory 802, and invokes the software programs and/or modules stored in the memory. data to perform various functions of the electronic device and/or process data.
  • the processor may be composed of an integrated circuit (IC), for example, may be composed of a single packaged IC, or may be composed of a plurality of packaged ICs connected with the same function or different functions.
  • the processor 801 may only include a central processing unit (CPU).
  • the CPU may be a single computing core, or may include multiple computing cores.
  • the memory 802 is used to store the execution instructions of the processor 801.
  • the memory 802 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), which can be 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 Disk or Optical Disk.
  • SRAM static random access memory
  • EEPROM Electrically Erasable Programmable Read Only Memory
  • EPROM Erasable Programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Magnetic Disk Magnetic Disk or Optical Disk.
  • the embedded device 800 is enabled to execute some or all of the steps in the embodiment shown in FIG. 7 .
  • the present invention also provides a computer storage medium, wherein the computer storage medium can store a program, and when the program is executed, it can include some or all of the steps in the various embodiments of the calling method provided by the present invention.
  • the storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), and the like.
  • the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform.
  • the technical solutions in the embodiments of the present invention may be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products may be stored in a storage medium, such as ROM/RAM , magnetic disk, optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of the present invention.
  • a computer device which may be a personal computer, a server, or a network device, etc.

Abstract

一种嵌入式设备的系统升级方法、装置及嵌入式设备,所述方法包括在系统启动的过程中,若检测到下载工具连接,则擦除所述第一分区的数据,所述第一分区的数据为启动装载程序,所述启动装载程序用于引导启动系统内核(S201);通过所述下载工具依次在第二分区烧写系统升级数据,在所述第一分区烧写启动装载程序(S202)。采用该方案,利用现有的系统启动流程,当进行系统下载时,首先擦除启动装载程序分区,待系统下载完成后,再重新写入启动装载程序分区。该方式不会占用额外内存空间,且不需要外部触发。

Description

嵌入式设备的系统升级方法、装置及嵌入式设备
本申请要求于2020年11月20日提交中国专利局、申请号为202011316461.1、申请名称为“嵌入式设备的系统升级方法、装置及嵌入式设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,具体地涉及一种嵌入式设备的系统升级方法、装置及嵌入式设备。
背景技术
嵌入式设备是一种能够根据用户需求(功能、可靠性、成本、体积、功耗、环境等)灵活裁剪软硬件模块的定制化设备,随着信息技术的高速发展和电子产品的普及,越来越多的嵌入式系统设备被广泛应用于工业控制、交通管理、信息家电、家庭智能管理、航天航空等领域。由于其可靠性高、实时性强、可定制化等特性,嵌入式设备给我们的生产、生活带来了巨大的便利。
随着嵌入式设备的应用场景更加复杂和多样,也对嵌入式设备系统的稳定性带来了更高的要求。嵌入式设备的软件版本更新周期短,需要经常进行版本下载和升级。但是,在嵌入式设备的系统升级过程中,由于环境的差异不同可能会发生系统升级过程的异常中断,导致已有系统文件损坏。
相关技术中,嵌入式设备的系统升级保护通常采用设置升级分区或升级标志位的方式来实现。但是,该方式会造成内存空间的浪费,且需要外部触发机制(下载按键等)触发系统重启后,通过检测升级标志位信息进行系统文件下载升级。但是,对于车载T-Box等一些嵌入式设备并没有上述外部触发机制,进而无法采用上述方式进行系统升级保护。
发明内容
有鉴于此,本申请提供一种嵌入式设备的系统升级方法、装置及嵌入式设备,以利于解决现有技术中系统升级方案造成内存空间浪费,且需要外部触发的问题。
第一方面,本申请实施例提供了一种嵌入式设备的系统升级方法,所述方法包括:
在系统启动的过程中,若检测到下载工具连接,则擦除所述第一分区的数据,所述第一分区的数据为启动装载程序,所述启动装载程序用于引导启动系统内核;
通过所述下载工具依次在第二分区烧写系统升级数据,在所述第一分区烧写启动装载程序。
优选地,所述方法还包括:
在系统启动的过程中,若检测所述第一分区的数据不完整,则等待下载工具连接信号;
若检测所述第一分区的数据完整,则加载所述第一分区的数据,启动系统。
优选地,所述方法还包括:
在系统运行过程中,若接收到重启自动下载信号,则重启系统;
在系统启动的过程中,若接收到自动下载信号,则擦除所述第一分区的数据,重启系统。
优选地,所述第一分区为SPL分区。
优选地,在系统启动的过程中,若检测到下载工具连接,则擦除所述第一分区的数据,包括:
启动Romcode,所述Romcode用于初始化系统启动环境;
若所述Romcode检测到下载工具连接,则擦除所述SPL分区的数据。
优选地,在系统启动的过程中,若检测所述第一分区的数据不完整,则等待下载工具连接信号,包括:
启动Romcode;
若所述Romcode检测到SPL分区的数据不完整,则等待下载工具连接信号。
优选地,若检测所述第一分区的数据完整,则加载所述第一分区的数据,启动系统,包括:
若所述Romcode检测到所述SPL分区的数据完整,则依次启动SPL、Uboot和Kernel,所述SPL用于加载Uboot镜像到外部RAM运行,所述Uboot用于引导启动系统内核,所述Kernel为系统内核。
优选地,所述在系统运行过程中,若接收到重启自动下载信号,则重启系统,包括:
在系统运行过程中,若接收到adb服务下发的reboot autoloader信号,则重启系统。
优选地,所述在系统启动的过程中,若接收到自动下载信号,则擦除所述第一分区的数据,重启系统,包括:
依次启动Romcode、SPL和Uboot,若所述Uboot检测到Autoloader信号,则擦除所述SPL分区的数据,重启系统。
第二方面,本申请实施例提供了一种嵌入式设备的系统升级装置,包括:
第一擦除单元,用于在系统启动的过程中,若检测到下载工具连接,则擦除所述第一分区的数据,所述第一分区的数据为启动装载程序,所述启动装载程序用于引导启动系统内核;
下载工具,用于依次在第二分区烧写系统升级数据,在所述第一分区烧写启动装载程序。
优选地,所述装置还包括:
检测单元,用于在系统启动的过程中,检测所述第一分区的数据是否完整;
其中,若检测所述第一分区的数据不完整,则等待下载工具连接信号;若检测所述第一分区的数据完整,则加载所述第一分区的数据,启动系统。
优选地,所述装置还包括:
重启自动下载单元,用于在系统运行过程中,若接收到重启自动下载信号,则重启系统;在系统启动的过程中,若接收到自动下载信号,则擦除所述第一分区的数据,重启系统。
优选地,所述第一分区为SPL分区。
优选地,在系统启动的过程中,若检测到下载工具连接,则擦除所述第一分区的数据,包括:
启动Romcode,所述Romcode用于初始化系统启动环境;
若所述Romcode检测到下载工具连接,则擦除所述SPL分区的数据。
优选地,在系统启动的过程中,若检测所述第一分区的数据不完整,则等待下载工具连接信号,包括:
启动Romcode;
若所述Romcode检测到SPL分区的数据不完整,则等待下载工具连接信号。
优选地,若检测所述第一分区的数据完整,则加载所述第一分区的数据,启动系统,包括:
若所述Romcode检测到所述SPL分区的数据完整,则依次启动SPL、Uboot和Kernel,所述SPL用于加载Uboot镜像到外部RAM运行,所述Uboot用于引导启动系统内核,所述Kernel为系统内核。
优选地,所述在系统运行过程中,若接收到重启自动下载信号,则重启系统,包括:
在系统运行过程中,若接收到adb服务下发的reboot autoloader信号,则重启系统。
优选地,所述在系统启动的过程中,若接收到自动下载信号,则擦除所述第一分区的数据,重启系统,包括:
依次启动Romcode、SPL和Uboot,若所述Uboot检测到Autodloader信号,则擦除所述SPL分区的数据,重启系统。
第三方面,本申请实施例提供了一种嵌入式设备,包括处理器和存储器,所述存储器存储有计算机程序,当所述计算机程序被执行时,使得所述嵌入式设备执行上述第一方面任一项所述的方法。
采用本申请实施例所提供的方案,利用现有的系统启动流程,当进行系统下载时,首先擦除启动装载程序分区,待系统下载完成后,再重新写入启动装载程序分区。该方式不会占用额外内存空间,且不需要外部触发。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其它的附图。
图1为本申请实施例提供的一种嵌入式设备的启动流程示意图;
图2为本申请实施例提供的一种嵌入式设备的系统升级方法流程示意图;
图3为本申请实施例提供的另一种嵌入式设备的系统升级方法流程示意图;
图4为本申请实施例提供的另一种嵌入式设备的系统升级方法流程示意图;
图5为本申请实施例提供的一种嵌入式设备SOC的系统升级方法流程示意图;
图6为本申请实施例提供的一种嵌入式设备SOC的系统完整性保护机制流程示意图;
图7为本申请实施例提供的一种嵌入式设备SOC的系统兼容Adb Reboot Autoloader下载方式的流程示意图;
图8为本发明实施例提供的一种嵌入式设备的结构示意图。
具体实施方式
为了更好的理解本申请的技术方案,下面结合附图对本申请实施例进行详细描述。
应当明确,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其它实施例,都属于本申请保护的范围。
在本申请实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请。在本申请实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。
应当理解,本文中使用的术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,甲和/或乙,可以表示:单独存在甲,同时存在甲和乙,单独存在乙这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
在对本申请实施例进行具体介绍之前,首先对本申请实施例应用或可能应用的术语进行解释。
嵌入式设备:能够根据用户需求(功能、可靠性、成本、体积、功耗、环境等)灵活裁剪软硬件模块的定制化设备,应用于对可靠性、实时性有较高要求场景。
片上系统(System on a Chip,SOC):在单个芯片上集成一个完整的系统,可以有效地降低电子/信息系统产品的开发成本,缩短开发周期,提高产品的竞争力,是未来工业界将采用的最主要的产品开发方式。在本申请实施例中,SOC可以作为嵌入式设备的一种具体表现形式。
动态随机存取存储器(Dynamic Random Access Memory,DRAM):一种半导体存储器,利用电容内存储电荷的多寡来代表一个二进制比特(bit)是1还是0,由于这种需要定时刷新的特性,因此被称为“动态”存储器。
静态随机存取存储器(Static Random Access Memory,SRAM):随机存取存储器的一种,该存储器只要保持通电,里面储存的数据就可以恒常保持。
随机存取存储器(Synchronous Dynamic Random Access Memory,SDRAM):SDRAM是DRAM的一种,同步动态存储器,利用一个单一的系统时钟同步所有的地址数据和控制信号,掉电信息会丢失。使用SDRAM不但能提高系统表现,还能简化设计、提供高速的数据传输。
可擦除可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM): 只读存储器,掉电后数据不会丢失。但是写入时间长,速度慢。
Bootloader:启动装载程序,在操作系统内核运行之前运行。可以初始化硬件设备、建立内存空间映射图,从而将系统的软硬件环境带到一个合适状态,以便为最终调用操作系统内核准备好正确的环境。
Romcode:用于实现内核初始化、引导程序存储设备接口初始化,通过检测启动方式来加载Bootloader。
SPL(Secondary Program Loader):一个非常小的Bootloader,可以运行于SOC的内部SRAM中,它的主要功能就是加载Uboot镜像到外部RAM运行。
Uboot:Bootloader的一种,用来引导启动内核,其目的为从存储单元中读取操作系统的内核并放到系统内存中,启动内核。
Kernel:操作系统内核,是指操作系统的核心部分,它由操作系统中用于管理存储器、文件、外设和系统资源的部分组成。
Autoloader:使操作系统进入自动下载模式,用于进行嵌入式设备的版本下载。
Adb Reboot Autoloader:Adb Reboot支持跟参数重启,所以增加Autoloader参数用于使系统重启后进入自动下载模式。
相关技术中,嵌入式设备的系统升级保护通常采用设置升级分区或升级标志位的方式来实现。但是,设置升级分区会造成内存空间的浪费;升级标志位通常需要配合外部触发机制来实现,例如,外部触发机制(下载按键等)触发系统重启后,通过检测升级标志位信息进行系统文件下载升级。但是,对于车载T-Box等一些嵌入式设备并没有上述外部触发机制,进而无法采用上述方式进行系统升级保护。
针对上述问题,本申请实施例提供了一种嵌入式设备的系统升级,利用系统启动时会加载启动装载程序分区的特点,对系统下载流程进行修改。当进行系统下载时,先擦除启动装载程序分区,待系统下载完成后,再重新写入启动装载程序分区。该方式无需外部触发机制,且不会占用额外内存空间。以下进行详细说明。
参见图1,为本申请实施例提供的一种嵌入式设备的启动流程示意图。在该实施例中以SOC为例进行说明,可理解,除了SOC以外,嵌入式设备还可以为其它形式,本申请实施例对此不作限制。
SOC启动时最先执行SOC启动时最先执行Romcode中的固化程序,通过检测启动方式来加载第二阶段的Bootlader。对于一些SOC来说,它的内部SRAM容量有限,无法装载下一个完整的Uboot镜像,此时Romcode会先加载SPL,完成外部RAM和环境的初始化后,SPL会加载真正的Uboot镜像到外部RAM中执行,从而完成后续Uboot和Kernel的启动。
参见图2,为本申请实施例提供的一种嵌入式设备的系统升级方法流程示意图。如图2所示,其主要包括以下步骤。
步骤S201:在系统启动的过程中,若检测到下载工具连接,则擦除所述第一分区的数据,所述第一分区的数据为启动装载程序,所述启动装载程序用于引导启动系统内核。
在本申请实施例中,所述系统启动的过程可以理解为从触发系统启动至系统完成启动的任一时间节点。以嵌入式设备SOC为例,用户触发开机或重启按键后,系统依 次启动Romcode、SPL、Uboot和Kernel,则所述系统启动的过程可以为启动Romcode、SPL、Uboot和Kernel的任一时间节点。
在一种可选实施例中,所述第一分区可以为SPL分区。在系统启动前,用户将下载工具插入嵌入式设备的USB接口。当用户触发系统启动按键后,最先执行Romcode中的固化程序,Romcode检测到下载工具连接,则擦除所述SPL分区的数据。可理解,当SPL分区的数据擦除后,则正常的启动流程无法继续执行,此时,系统进入下载流程。
需要指出的是,所述第一分区除了SPL分区外,还可以为系统启动流程中的其他分区,例如Romcode分区、Uboot分区等,本申请实施例对此不作限制。
步骤S202:通过所述下载工具依次在第二分区烧写系统升级数据,在所述第一分区烧写启动装载程序。
在第一分区的数据擦除后,系统进入下载流程。首先通过下载工具在第二分区烧写系统升级数据,待第二分区的数据烧写完成后,再重新烧写第一分区的数据,之后进行系统重启。由于重新烧写了第一分区的数据,则系统重启时可以正常启动。可理解,当第一分区为SPL分区时,该擦除、重写操作为对SPL分区执行的擦除、重写操作。
可理解,所述第二分区用于存储操作系统数据,其数量可以为一个或多个,具体根据嵌入式设备的架构进行设置,本申请实施例对此不作限定。
采用本申请实施例所提供的方案,利用现有的系统启动流程,当进行系统下载时,首先擦除启动装载程序分区,待系统下载完成后,再重新写入启动装载程序分区。该方式不会占用额外内存空间,且不需要外部触发。
在一种可能的应用场景中,若执行图2所示的步骤的过程中,系统异常中断(例如掉电),可能会导致系统无法正常重启。例如,在将第一分区擦除后,系统异常中断,第一分区内缺少系统启动时需要的Bootlader。另外,在该过程,下载工具也可能未完成系统的下载,因此,也无法完成系统升级。
针对该场景,本申请实施例还提供了另一种嵌入式设备的系统升级方法。参见图3,为本申请实施例提供的另一种嵌入式设备的系统升级方法流程示意图。如图3所示,其在图2所示实施例的基础上还包括“第一分区的数据完整性检测步骤”,具体如下。
步骤S301:在系统启动的过程中,若检测所述第一分区的数据不完整,则等待下载工具连接信号。
以嵌入式设备SOC为例。Romcode启动后,首先检测SPL分区是否完整,若SPL分区不完整,说明上次下载过程中系统异常中断,则等待下载工具连接信号。若接收到下载工具连接信号,则进入步骤S201,进入下载模式。
步骤S302:若检测所述第一分区的数据完整,则加载所述第一分区的数据,启动系统。
若检测SPL分区的数据完整,说明系统未发生过异常中断,则依次启动SPL、Uboot和Kernel,系统正常启动。
采用本申请实施例提供的技术方案,若在某些情况中系统下载被异常中断,则在下次启动时,会识别到第一分区的数据缺失,自动进入下载模式,重新下载系统,保 证系统的完整性。
为了兼容常用的Adb Reboot Autoloader下载方式,本申请实施例还提供了另一种嵌入式设备的系统升级方法。参见图4,为本申请实施例提供的另一种嵌入式设备的系统升级方法流程示意图。如图4所述,其在图3所示步骤的基础上还包括以下步骤。
步骤S401:在系统运行过程中,若接收到重启自动下载信号,则重启系统。
在本申请实施例中,为了兼容常用的Adb Reboot Autoloader下载方式,可在系统正常运行过程中通过adb服务下发reboot autoloader信号,若系统接收到reboot autoloader信号,则重启系统。
步骤S402:在系统启动的过程中,若接收到自动下载信号,则擦除所述第一分区的数据,重启系统。
以嵌入式系统SOC为例。依次启动Romcode、SPL和Uboot,若所述Uboot检测到Autoloader信号,则擦除所述SPL分区的数据,重启系统。由于此时,SPL分区数据缺失,在系统启动的过程中,检测SPL分区的数据不完整,进入步骤S301。
采用本申请实施例提供的技术方案,为兼容常用的Adb Reboot Autoloader下载方式,系统在Reboot后进入Uboot阶段,如果Uboot检测到Autoloader信号,则主动擦除SPL分区后再次重启,此时Romcode会识别到SPL分区缺失而设置系统进入下载模式,实现自动检测进下载,保证了系统的完整性。
为了便于本领域技术人员更好地理解本申请技术方案,下面以嵌入式设备SOC为例,结合不同的应用场景进行说明。
场景一,将下载工具连接至嵌入式设备。
图5为本申请实施例提供的一种嵌入式设备SOC的系统升级方法流程示意图。如图5所示,其主要包括以下步骤。
步骤S501:启动Romcode。用户触发启动按键开机后,首先启动Romcode。
步骤S502:检测是否存在下载工具连接,若判断结果为是,进入步骤S503;否则,进入步骤S507。
步骤S503:擦除SPL分区。
步骤S504:通过下载工具烧写操作系统分区。
步骤S505:重新烧写SPL分区。
步骤S506:重启系统。
步骤S507:启动SPL,启动Uboot,启动Kernel。
在本申请实施例应用场景中,将下载工具连接至嵌入式设备。当Romcode检测到USB端口有下载工具连接并启动后,系统进入下载模式。具体为,首先擦除SPL分区的数据,然后进行操作系统分区的数据烧写,当操作系统分区的数据烧写完成后,在退出下载模式前重新烧写SPL分区数据,来标识下载数据完成且无异常退出情况。
场景二,前一次系统升级过程中异常退出或中断。
图6为本申请实施例提供的一种嵌入式设备SOC的系统完整性保护机制流程示意图。如图6所示,其主要包括以下步骤。
步骤S601:启动Romcode。用户触发启动按键开机后,首先启动Romcode。
步骤S602:检测SPL分区的数据是否完整。若判断结果为是,则进入步骤S603; 否则进入步骤S604。
步骤S603:启动SPL,启动Uboot,启动Kernel。
步骤S604:等待下载工具连接信号。
在本申请实施例中,当Romcode检测到SPL数据不完整时,表明前一次系统升级过程中发生异常退出或中断,此时Romcode会设置系统进入下载模式,等待下载工具连接信号,跳转至图5所示的步骤S502。当检测到SPL数据完整时,表明当前系统无异常,从而启动SPL,完成系统初始化配置,进而启动Uboot、Kernel。
场景三,兼容Adb Reboot Autoloader下载方式。
图7为本申请实施例提供的一种嵌入式设备SOC的系统兼容Adb Reboot Autoloader下载方式的流程示意图。如图7所示,其主要包括以下步骤。
步骤S701:系统正常运行。
步骤S702:判断是否接收到adb服务下发的reboot autoloader信号,若判断结果为是,进入步骤S703;否则,返回步骤S701。
步骤S703:系统重启,启动SPL,启动Uboot。
步骤S704:判断是否检测到Autoloader信号,若判断结果为是,进入步骤S705;否则进入步骤S707。
步骤S705:擦除SPL分区。
步骤S706:重启系统。
步骤S707:启动Kernel。
在本申请实施例中,兼容Adb Reboot Autoloader下载方式。首先在系统正常运行时通过adb服务下发reboot autoloader信号,当系统接收到reboot autoloader信号后,系统重启。在完成Romcode的CPU初始化、SPL加载后,系统进入Uboot启动阶段。在此阶段获取到Autoloader信号后,Uboot会执行擦除SPL分区动作,然后重启系统。系统重启后,跳转至图6所示的步骤S602,从而实现了嵌入式设备的自动下载。
与上述方法实施例相对应,本申请还提供了一种嵌入式设备的系统升级装置,所述装置包括:
第一擦除单元,用于在系统启动的过程中,若检测到下载工具连接,则擦除所述第一分区的数据,所述第一分区的数据为启动装载程序,所述启动装载程序用于引导启动系统内核;
下载工具,用于依次在第二分区烧写系统升级数据,在所述第一分区烧写启动装载程序。
在一种可选实施例中,所述装置还包括:检测单元,用于在系统启动的过程中,检测所述第一分区的数据是否完整;
其中,若检测所述第一分区的数据不完整,则等待下载工具连接信号;若检测所述第一分区的数据完整,则加载所述第一分区的数据,启动系统。
在一种可选实施例中,所述装置还包括:
重启自动下载单元,用于在系统运行过程中,若接收到重启自动下载信号,则重启系统;在系统启动的过程中,若接收到自动下载信号,则擦除所述第一分区的数据,重启系统。
在一种可选实施例中,所述第一分区为SPL分区。
在一种可选实施例中,在系统启动的过程中,若检测到下载工具连接,则擦除所述第一分区的数据,包括:启动Romcode,所述Romcode用于初始化系统启动环境;若所述Romcode检测到下载工具连接,则擦除所述SPL分区的数据。
在一种可选实施例中,在系统启动的过程中,若检测所述第一分区的数据不完整,则等待下载工具连接信号,包括:启动Romcode;若所述Romcode检测到SPL分区的数据不完整,则等待下载工具连接信号。
在一种可选实施例中,若检测所述第一分区的数据完整,则加载所述第一分区的数据,启动系统,包括:若所述Romcode检测到所述SPL分区的数据完整,则依次启动SPL、Uboot和Kernel,所述SPL用于加载Uboot镜像到外部RAM运行,所述Uboot用于引导启动系统内核,所述Kernel为系统内核。
在一种可选实施例中,所述在系统运行过程中,若接收到重启自动下载信号,则重启系统,包括:在系统运行过程中,若接收到adb服务下发的reboot autoloader信号,则重启系统。
在一种可选实施例中,所述在系统启动的过程中,若接收到自动下载信号,则擦除所述第一分区的数据,重启系统,包括:依次启动Romcode、SPL和Uboot,若所述Uboot检测到Autodloader信号,则擦除所述SPL分区的数据,重启系统。
采用本申请实施例所提供的方案,利用现有的系统启动流程,当进行系统下载时,首先擦除启动装载程序分区,待系统下载完成后,再重新写入启动装载程序分区。该方式不会占用额外内存空间,且不需要外部触发。
与上述实施例相对应,本申请还提供了一种嵌入式设备。图8为本发明实施例提供的一种嵌入式设备的结构示意图,所述嵌入式设备800可以包括:处理器801、存储器802及通信单元803。这些组件通过一条或多条总线进行通信,本领域技术人员可以理解,图中示出的服务器的结构并不构成对本发明实施例的限定,它既可以是总线形结构,也可以是星型结构,还可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
其中,所述通信单元803,用于建立通信信道,从而使所述存储设备可以与其它设备进行通信。接收其他设备发是的用户数据或者向其他设备发送用户数据。
所述处理器801,为存储设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器802内的软件程序和/或模块,以及调用存储在存储器内的数据,以执行电子设备的各种功能和/或处理数据。所述处理器可以由集成电路(integrated circuit,IC)组成,例如可以由单颗封装的IC所组成,也可以由连接多颗相同功能或不同功能的封装IC而组成。举例来说,处理器801可以仅包括中央处理器(central processing unit,CPU)。在本发明实施方式中,CPU可以是单运算核心,也可以包括多运算核心。
所述存储器802,用于存储处理器801的执行指令,存储器802可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或 光盘。
当存储器802中的执行指令由处理器801执行时,使得嵌入式设备800能够执行图7所示实施例中的部分或全部步骤。
具体实现中,本发明还提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时可包括本发明提供的呼叫方法的各实施例中的部分或全部步骤。所述的存储介质可为磁碟、光盘、只读存储记忆体(read-only memory,ROM)或随机存储记忆体(random access memory,RAM)等。
本领域的技术人员可以清楚地了解到本发明实施例中的技术可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本发明实施例中的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例或者实施例的某些部分所述的方法。
本说明书中各个实施例之间相同相似的部分互相参见即可。尤其,对于装置实施例和终端实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例中的说明即可。

Claims (19)

  1. 一种嵌入式设备的系统升级方法,其特征在于,包括:
    在系统启动的过程中,若检测到下载工具连接,则擦除所述第一分区的数据,所述第一分区的数据为启动装载程序,所述启动装载程序用于引导启动系统内核;
    通过所述下载工具依次在第二分区烧写系统升级数据,在所述第一分区烧写启动装载程序。
  2. 根据权利要求1所述的方法,其特征在于,还包括:
    在系统启动的过程中,若检测所述第一分区的数据不完整,则等待下载工具连接信号;
    若检测所述第一分区的数据完整,则加载所述第一分区的数据,启动系统。
  3. 根据权利要求2所述的方法,其特征在于,还包括:
    在系统运行过程中,若接收到重启自动下载信号,则重启系统;
    在系统启动的过程中,若接收到自动下载信号,则擦除所述第一分区的数据,重启系统。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述第一分区为SPL分区。
  5. 根据权利要求4所述的方法,其特征在于,在系统启动的过程中,若检测到下载工具连接,则擦除所述第一分区的数据,包括:
    启动Romcode,所述Romcode用于初始化系统启动环境;
    若所述Romcode检测到下载工具连接,则擦除所述SPL分区的数据。
  6. 根据权利要求4所述的方法,其特征在于,在系统启动的过程中,若检测所述第一分区的数据不完整,则等待下载工具连接信号,包括:
    启动Romcode;
    若所述Romcode检测到SPL分区的数据不完整,则等待下载工具连接信号。
  7. 根据权利要求6所述的方法,其特征在于,若检测所述第一分区的数据完整,则加载所述第一分区的数据,启动系统,包括:
    若所述Romcode检测到所述SPL分区的数据完整,则依次启动SPL、Uboot和Kernel,所述SPL用于加载Uboot镜像到外部RAM运行,所述Uboot用于引导启动系统内核,所述Kernel为系统内核。
  8. 根据权利要求4所述的方法,其特征在于,所述在系统运行过程中,若接收到重启自动下载信号,则重启系统,包括:
    在系统运行过程中,若接收到adb服务下发的reboot autoloader信号,则重启系统。
  9. 根据权利要求8所述的方法,其特征在于,所述在系统启动的过程中,若接收到自动下载信号,则擦除所述第一分区的数据,重启系统,包括:
    依次启动Romcode、SPL和Uboot,若所述Uboot检测到Autoloader信号,则擦除所述SPL分区的数据,重启系统。
  10. 一种嵌入式设备的系统升级装置,其特征在于,包括:
    第一擦除单元,用于在系统启动的过程中,若检测到下载工具连接,则擦除所述第一分区的数据,所述第一分区的数据为启动装载程序,所述启动装载程序用于引导启动系统内核;
    下载工具,用于依次在第二分区烧写系统升级数据,在所述第一分区烧写启动装载程序。
  11. 根据权利要求10所述的装置,其特征在于,还包括:
    检测单元,用于在系统启动的过程中,检测所述第一分区的数据是否完整;
    其中,若检测所述第一分区的数据不完整,则等待下载工具连接信号;若检测所述第一分区的数据完整,则加载所述第一分区的数据,启动系统。
  12. 根据权利要求11所述的装置,其特征在于,还包括:
    重启自动下载单元,用于在系统运行过程中,若接收到重启自动下载信号,则重启系统;在系统启动的过程中,若接收到自动下载信号,则擦除所述第一分区的数据,重启系统。
  13. 根据权利要求10-12任一项所述的装置,其特征在于,所述第一分区为SPL分区。
  14. 根据权利要求13所述的装置,其特征在于,在系统启动的过程中,若检测到下载工具连接,则擦除所述第一分区的数据,包括:
    启动Romcode,所述Romcode用于初始化系统启动环境;
    若所述Romcode检测到下载工具连接,则擦除所述SPL分区的数据。
  15. 根据权利要求13所述的装置,其特征在于,在系统启动的过程中,若检测所述第一分区的数据不完整,则等待下载工具连接信号,包括:
    启动Romcode;
    若所述Romcode检测到SPL分区的数据不完整,则等待下载工具连接信号。
  16. 根据权利要求15所述的装置,其特征在于,若检测所述第一分区的数据完整,则加载所述第一分区的数据,启动系统,包括:
    若所述Romcode检测到所述SPL分区的数据完整,则依次启动SPL、Uboot和Kernel,所述SPL用于加载Uboot镜像到外部RAM运行,所述Uboot用于引导启动系统内核,所述Kernel为系统内核。
  17. 根据权利要求13所述的装置,其特征在于,所述在系统运行过程中,若接收到重启自动下载信号,则重启系统,包括:
    在系统运行过程中,若接收到adb服务下发的reboot autoloader信号,则重启系统。
  18. 根据权利要求17所述的装置,其特征在于,所述在系统启动的过程中,若接收到自动下载信号,则擦除所述第一分区的数据,重启系统,包括:
    依次启动Romcode、SPL和Uboot,若所述Uboot检测到Autodloader信号,则擦除所述SPL分区的数据,重启系统。
  19. 一种嵌入式设备,其特征在于,包括处理器和存储器,所述存储器存储有计算机程序,当所述计算机程序被执行时,使得所述嵌入式设备执行权利要求1-9任一项所述的方法。
PCT/CN2021/128200 2020-11-20 2021-11-02 嵌入式设备的系统升级方法、装置及嵌入式设备 WO2022105595A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011316461.1A CN112631625B (zh) 2020-11-20 2020-11-20 嵌入式设备的系统升级方法、装置及嵌入式设备
CN202011316461.1 2020-11-20

Publications (1)

Publication Number Publication Date
WO2022105595A1 true WO2022105595A1 (zh) 2022-05-27

Family

ID=75303597

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/128200 WO2022105595A1 (zh) 2020-11-20 2021-11-02 嵌入式设备的系统升级方法、装置及嵌入式设备

Country Status (2)

Country Link
CN (1) CN112631625B (zh)
WO (1) WO2022105595A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112631625B (zh) * 2020-11-20 2022-10-21 展讯通信(上海)有限公司 嵌入式设备的系统升级方法、装置及嵌入式设备
CN113157301B (zh) * 2021-05-20 2023-04-11 厦门紫光展锐科技有限公司 终端版本升级方法、系统、存储介质及终端
CN114655140B (zh) * 2022-03-15 2024-03-26 东软睿驰汽车技术(沈阳)有限公司 一种车辆启动控制方法和相关装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090271780A1 (en) * 2008-04-24 2009-10-29 Moschip Semiconductor Technology Limited Automatic complete firmware upgrade
CN110134426A (zh) * 2019-04-18 2019-08-16 深圳市致宸信息科技有限公司 一种嵌入式系统升级方法、装置及终端设备
CN110908733A (zh) * 2019-11-15 2020-03-24 展讯通信(上海)有限公司 工作模式确定方法及装置、控制方法及装置
CN111522602A (zh) * 2020-04-22 2020-08-11 展讯通信(上海)有限公司 通信装置的启动方法
CN111651185A (zh) * 2020-05-30 2020-09-11 展讯通信(上海)有限公司 一种软件升级方法及装置
CN112631625A (zh) * 2020-11-20 2021-04-09 展讯通信(上海)有限公司 嵌入式设备的系统升级方法、装置及嵌入式设备

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102629206B (zh) * 2012-02-29 2018-02-06 深圳市赛格导航科技股份有限公司 一种嵌入式系统软件升级方法及系统
CN111104173A (zh) * 2019-11-25 2020-05-05 晶晨半导体(深圳)有限公司 一种引导程序的保护设计方法
CN111459508B (zh) * 2020-03-27 2023-12-01 北京经纬恒润科技股份有限公司 一种BootLoader自升级的方法及系统
CN111796848A (zh) * 2020-07-08 2020-10-20 中国第一汽车股份有限公司 Bootloader软件更新方法、装置、嵌入式控制器以及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090271780A1 (en) * 2008-04-24 2009-10-29 Moschip Semiconductor Technology Limited Automatic complete firmware upgrade
CN110134426A (zh) * 2019-04-18 2019-08-16 深圳市致宸信息科技有限公司 一种嵌入式系统升级方法、装置及终端设备
CN110908733A (zh) * 2019-11-15 2020-03-24 展讯通信(上海)有限公司 工作模式确定方法及装置、控制方法及装置
CN111522602A (zh) * 2020-04-22 2020-08-11 展讯通信(上海)有限公司 通信装置的启动方法
CN111651185A (zh) * 2020-05-30 2020-09-11 展讯通信(上海)有限公司 一种软件升级方法及装置
CN112631625A (zh) * 2020-11-20 2021-04-09 展讯通信(上海)有限公司 嵌入式设备的系统升级方法、装置及嵌入式设备

Also Published As

Publication number Publication date
CN112631625B (zh) 2022-10-21
CN112631625A (zh) 2021-04-09

Similar Documents

Publication Publication Date Title
WO2022105595A1 (zh) 嵌入式设备的系统升级方法、装置及嵌入式设备
KR100804647B1 (ko) 병렬형 플래시 인터페이스를 지원하는 직렬형 플래시메모리 장치를 이용한 시스템 부팅 방법 및 장치
TWI514408B (zh) 於裝置開機期間處置來自非揮發性記憶體之錯誤
US10303459B2 (en) Electronic system with update control mechanism and method of operation thereof
US20080010446A1 (en) Portable apparatus supporting multiple operating systems and supporting method therefor
KR101555210B1 (ko) 휴대용 단말기에서 내장 대용량 메모리를 이용한 컨텐츠 다운로드 방법 및 장치
JP2007213571A (ja) 新奇的なメモリアーキテクチャ内の直接メモリアクセスを用いてシステムを起動する方法
US11144328B2 (en) System method to update failover process by running basic input/output (BIOS) system boot code from non-volatile memory express device (NVME)
CN101593120A (zh) 带外升级方法和系统
JP2023020861A (ja) ファームウェアの更新
CN112231005A (zh) 一种基于uboot管理fpga版本的方法
CN101477838A (zh) 一种与非快闪记忆体状态检测装置、系统及电子设备
CN102033767A (zh) 一种单板及单板在线升级的方法
CN116521209B (zh) 操作系统的升级方法及装置、存储介质及电子设备
WO2022188690A1 (zh) 升级电子设备的方法及装置
WO2022199622A1 (zh) 一种电子设备的启动程序的运行方法和电子设备
US11106457B1 (en) Updating firmware runtime components
KR101118111B1 (ko) 이동통신단말기 및 그 부팅방법
CN114020308A (zh) 一种摄像设备升级方法、装置、设备及介质
KR101420026B1 (ko) 부팅 프로세스 중에 파일들을 로딩하기 위한 방법, 장치 및 컴퓨터 판독가능 저장 매체
CN112667544A (zh) 一种控制主板插槽使能的方法、装置、系统及介质
CN113986261A (zh) 一种数据刷写的方法、相关装置、设备以及可读存储介质
CN117687703B (zh) 服务器的启动方法、装置、系统、存储介质和电子设备
US11789821B1 (en) Out-of-band method to change boot firmware configuration
US20230350755A1 (en) Coordinated operating system rollback

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21893743

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21893743

Country of ref document: EP

Kind code of ref document: A1