CN101770383A - Method and device for on-line upgrade of cross-platform version - Google Patents
Method and device for on-line upgrade of cross-platform version Download PDFInfo
- Publication number
- CN101770383A CN101770383A CN201010002621A CN201010002621A CN101770383A CN 101770383 A CN101770383 A CN 101770383A CN 201010002621 A CN201010002621 A CN 201010002621A CN 201010002621 A CN201010002621 A CN 201010002621A CN 101770383 A CN101770383 A CN 101770383A
- Authority
- CN
- China
- Prior art keywords
- version
- new
- data
- file
- main
- 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 OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
- G06F8/66—Updates of program code stored in read-only memory [ROM]
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
本发明提供一种跨平台版本在线升级的方法及装置,其中,该方法包括下列步骤:步骤A:预先在新的Bootloader版本和旧的主版本中分别预留固定内存,分别存储新的主版本和旧的主版本中待保存的数据;步骤B:获取版本文件和待保存的数据,将版本文件中新的主版本保存到预留固定内存,将待保存的数据适配后保留到预留固定内存;并且将版本文件中新的Bootloader版本烧写到bootrom区,然后重启系统;步骤C:新的Bootloader版本在启动过程中获取预留固定内存中的新的主版本和保存的数据,将新的版本和保存的数据解析并保存到本地flash或者文件系统中,加载新的版本并启动。本发明能够完成不兼容跨平台版本的在线升级。
The present invention provides a method and device for online upgrade of cross-platform versions, wherein the method includes the following steps: Step A: respectively reserve fixed memory in the new Bootloader version and the old main version in advance, and store the new main version respectively and the data to be saved in the old main version; Step B: Obtain the version file and the data to be saved, save the new main version in the version file to the reserved fixed memory, and reserve the data to be saved to the reserved Fixed memory; and burn the new Bootloader version in the version file to the bootrom area, and then restart the system; Step C: The new Bootloader version obtains the new main version and saved data in the reserved fixed memory during the startup process, and will The new version and saved data are parsed and saved to the local flash or file system, and the new version is loaded and started. The invention can complete the online upgrade of incompatible cross-platform versions.
Description
技术领域technical field
本发明涉及通讯技术领域,特别涉及一种跨平台版本在线升级的方法及装置。The invention relates to the field of communication technology, in particular to a method and device for online upgrading of cross-platform versions.
背景技术Background technique
版本升级是通讯产品中最常见的一种操作。为了满足新增功能或者新的需求,产品版本需要升级,并且有可能出现跨平台或跨系统的版本升级。比如原来系统采用的是vxWorks的操作系统,为了支持某些新的功能,需要更换为linux的操作系统;再比如,由于采用平台的关系,有可能出现新旧版本的数据结构和模块接口不一致。而要对这些系统进行版本升级,首先要考虑升级前后版本的数据兼容,同时要满足系统所需要的重要数据不能丢失;其次从版本升级的成本考虑,版本最好支持远程批量在线升级。Version upgrade is the most common operation in communication products. In order to meet new functions or new requirements, product versions need to be upgraded, and there may be cross-platform or cross-system version upgrades. For example, the original system uses the vxWorks operating system. In order to support some new functions, it needs to be replaced with a linux operating system; another example, due to the relationship between the platform, there may be inconsistencies between the data structure and module interface of the old and new versions. In order to upgrade the versions of these systems, the data compatibility of the versions before and after the upgrade must be considered first, and at the same time, the important data required by the system must not be lost; secondly, considering the cost of version upgrades, it is best to support remote batch online upgrades.
在目前的版本升级方法中,如果老的系统启动引导程序能够正确引导新的主版本,并且新老文件系统兼容的话,则在升级过程中把版本直接存到flash等非易失的存储介质中,或者版本先暂时保存到内存中,然后保存到flash中。如果老版本中的数据和模块接口在新版本中不兼容,则在新版本中作兼容处理后使用。如果老的系统启动引导程序不能够引导新的主版本,或者新老文件系统不兼容的话,则只能在老系统中先把待备份数据上传到网管服务器或者计算机上,然后升级新的系统启动引导版本,待系统启动引导版本启动之后,再升级主版本文件,主版本启动运行,在主版本中恢复之前预先备份的数据,解析这些数据以满足新版本的数据接口和模块接口的兼容并保存。In the current version upgrade method, if the old system startup boot program can correctly guide the new main version, and the old and new file systems are compatible, then the version is directly stored in non-volatile storage media such as flash during the upgrade process , or the version is temporarily saved to memory first, and then saved to flash. If the data and module interfaces in the old version are not compatible in the new version, they will be used after compatibility processing in the new version. If the bootloader of the old system cannot boot the new main version, or if the old and new file systems are not compatible, you can only upload the data to be backed up to the network management server or computer in the old system, and then upgrade the new system to start Boot version, after the boot version starts, upgrade the main version file, the main version starts running, restore the pre-backed data in the main version, parse the data to meet the compatibility of the new version of the data interface and the module interface and save it .
但是,这种方法的缺点在于:新的主版本不能在老的版本中直接升级,必须在新的启动引导软件中升级主版本,操作复杂,不能够满足在线升级;由于新老文件系统不兼容,则数据不能保存,需要提前备份到其他服务器上,待新主版本运行之后才能恢复数据,操作复杂,很难满足批量在线升级。However, the disadvantage of this method is that the new main version cannot be directly upgraded in the old version, and the main version must be upgraded in the new boot software, which is complicated to operate and cannot satisfy online upgrades; due to the incompatibility of the old and new file systems , the data cannot be saved, and needs to be backed up to other servers in advance, and the data can only be restored after the new main version runs. The operation is complicated and it is difficult to meet the batch online upgrade.
发明内容Contents of the invention
本发明的目的在于,提供一种跨平台版本在线升级的方法,能够完成不兼容跨平台版本的在线升级。The purpose of the present invention is to provide a method for online upgrading of cross-platform versions, which can complete online upgrading of incompatible cross-platform versions.
本发明的另一目的在于,提供一种跨平台版本在线升级的装置,能够完成不兼容跨平台版本的在线升级。Another object of the present invention is to provide an online upgrade device for cross-platform versions, which can complete online upgrades for incompatible cross-platform versions.
本发明的跨平台版本在线升级的方法,包括下列步骤:The method for cross-platform version online upgrade of the present invention comprises the following steps:
步骤A:预先在新的系统启动引导软件Bootloader版本和旧的主版本中分别预留固定内存,分别存储版本文件和旧的主版本中待保存的数据;Step A: Reserving fixed memory respectively in the new system startup guide software Bootloader version and the old main version in advance, respectively storing the data to be saved in the version file and the old main version;
步骤B:获取版本文件和旧的主版本中待保存的数据,将所述版本文件中新的主版本保存到预留固定内存,将所述旧的主版本中待保存的数据适配后保留到预留固定内存;并且将所述版本文件中新的Bootloader版本烧写到bootrom区,然后重启系统;Step B: Obtain the version file and the data to be saved in the old main version, save the new main version in the version file to the reserved fixed memory, and keep the data to be saved in the old main version after adaptation To reserve a fixed memory; and burn the new Bootloader version in the version file to the bootrom area, and then restart the system;
步骤C:新的Bootloader版本在启动过程中获取所述预留固定内存中的新的主版本和保存的数据,将所述新的主版本和保存的数据解析并保存到本地flash或者文件系统中,加载新的主版本并启动。Step C: The new Bootloader version obtains the new main version and the saved data in the reserved fixed memory during the startup process, and parses and saves the new main version and the saved data into the local flash or the file system , load the new major version and start.
其中,所述在新的Bootloader版本和旧的主版本中分别预留的固定内存,物理地址相同,所述新的Bootloader版本和旧的主版本均能对所述预留固定内存进行读写访问。Wherein, the fixed memory reserved respectively in the new Bootloader version and the old main version has the same physical address, and the new Bootloader version and the old main version can both read and write access to the reserved fixed memory .
其中,在所述步骤B中,通过USB或者FTP方式,从计算机服务器、或者网管服务器上获取新的主版本、旧的主版本中待保存的数据,以及新的Bootloader版本;或者主用主控板通过板间通讯从相邻设备上获取新的主版本文件,并下载到预留固定内存。Wherein, in the step B, obtain the new main version, the data to be saved in the old main version, and the new Bootloader version from the computer server or the network management server through USB or FTP; The board obtains the new main version file from the adjacent device through inter-board communication, and downloads it to the reserved fixed memory.
其中,在获取的新的主版本有多种版本文件时,根据文件名或者版本头里面记录的信息,将所述新的主版本存储至预留固定内存的相应存储地址。Wherein, when the obtained new main version has multiple version files, according to the file name or the information recorded in the version header, the new main version is stored in the corresponding storage address of the reserved fixed memory.
其中,所述版本文件包括新的主版本、固件版本以及Bootloader版本,并且,在所述步骤B中,在获取版本文件时,进一步包括下列步骤:Wherein, described version file comprises new main version, firmware version and Bootloader version, and, in described step B, when obtaining version file, further comprises the following steps:
将获取的版本文件下载到内存中或者flash中,然后对其校验,如果校验通过,则将版本文件中的新的主版本、固定版本保存到预留固定内存,并将版本文件中的Bootloader版本烧写到bootrom区。Download the obtained version file into memory or flash, and then verify it. If the verification is passed, save the new main version and fixed version in the version file to the reserved fixed memory, and save the new main version and fixed version in the version file to the reserved fixed memory, and save the The Bootloader version is burned into the bootrom area.
本发明的跨平台版本在线升级的装置,包括软件版本和数据获取模块,预留固定内存模块,软件版本和数据存储模块,和版本和数据解析保存模块,其中,所述预留固定内存模块,用于预先在新的Bootloader版本和旧的主版本中分别预留固定内存,分别存储新的版本文件和旧的主版本中待保存的数据;所述软件版本和数据获取模块,用于获取版本文件和旧的主版本中待保存的数据;所述软件版本和数据存储模块,用于将版本文件中新的主版本保存到预留固定内存,将所述旧的主版本中待保存的数据适配后保留到预留固定内存;并且将版本文件中新的Bootloader版本烧写到bootrom区,然后通知重启系统;所述版本和数据解析保存模块,用于对新的Bootloader版本在启动过程中获取的预留固定内存中的新的主版本和数据进行解析并保存到本地flash或者文件系统中。The cross-platform version online upgrade device of the present invention includes a software version and data acquisition module, a reserved fixed memory module, a software version and data storage module, and a version and data analysis and storage module, wherein the reserved fixed memory module, It is used to reserve fixed memory respectively in the new Bootloader version and the old main version in advance, and store the data to be saved in the new version file and the old main version respectively; the software version and the data acquisition module are used to obtain the version The data to be saved in the file and the old main version; the software version and the data storage module are used to save the new main version in the version file to the reserved fixed memory, and store the data to be saved in the old main version After adaptation, it is reserved to the reserved fixed memory; and the new Bootloader version in the version file is burned into the bootrom area, and then the system is notified to restart; the version and data parsing and saving module are used for the new Bootloader version during the startup process The obtained new master version and data in the reserved fixed memory are parsed and saved to the local flash or file system.
其中,所述在新的Bootloader版本和旧的主版本中分别预留的固定内存,物理地址相同,所述新的Bootloader版本和旧的主版本都能对所述预留固定内存进行读写访问。Wherein, the fixed memory reserved respectively in the new Bootloader version and the old main version has the same physical address, and the new Bootloader version and the old main version can both read and write access to the reserved fixed memory .
其中,所述软件版本和数据获取模块,进一步用于将获取的数据转换为新版本识别的数据,包括对数据进行压缩处理或者适配处理。Wherein, the software version and data acquisition module is further used to convert the acquired data into data recognized by the new version, including compressing or adapting the data.
其中,所述软件版本和数据获取模块,通过USB或者FTP方式,从计算机服务器、或者网管服务器上获取新的主版本、旧的主版本中待保存的数据,以及新的Bootloader版本;或者主用主控板通过板间通讯、FTP方式从相邻设备上获取新的主版本文件,并下载到预留固定内存。Wherein, the software version and the data acquisition module obtain the new main version, the data to be saved in the old main version, and the new Bootloader version from the computer server or the network management server through USB or FTP; The main control board obtains the new main version file from the adjacent device through inter-board communication and FTP, and downloads it to the reserved fixed memory.
其中,所述版本文件包括新的主版本、固件版本以及Bootloader版本,并且,所述软件版本和数据获取模块,在获取版本文件时,进一步用于将获取的版本文件下载到内存中或者flash中,然后对其校验,如果校验通过,则将版本文件中的新的主版本、固定版本保存到预留固定内存,并将版本文件中的新的Bootloader版本烧写到bootrom区。Wherein, the version file includes a new main version, firmware version and Bootloader version, and the software version and data acquisition module, when acquiring the version file, are further used to download the acquired version file into the internal memory or in the flash , and then verify it, if the verification is passed, save the new main version and fixed version in the version file to the reserved fixed memory, and burn the new Bootloader version in the version file to the bootrom area.
本发明的有益效果是:依照本发明的跨平台版本在线升级的方法及装置,通过预留固定内存暂时保存数据和新版本的方式,待新的系统启动引导软件启动之后再把预留固定内存版本和数据保存到flash,系统自动获取并适配数据,从而完成了不兼容跨平台版本的在线升级,降低了产品的成本,提高了升级速度,减少了人为操作。The beneficial effects of the present invention are: according to the cross-platform version online upgrade method and device of the present invention, the data and the new version are temporarily saved by reserving a fixed memory, and then the reserved fixed memory will be saved after the new system is started and the boot software is started. The version and data are saved to the flash, and the system automatically acquires and adapts the data, thus completing the online upgrade of incompatible cross-platform versions, reducing the cost of the product, improving the upgrade speed, and reducing manual operations.
附图说明Description of drawings
图1为本发明在单系统中的跨平台版本在线升级的方法的流程图;Fig. 1 is the flow chart of the method for the cross-platform version online upgrade of the present invention in single system;
图2为本发明实施例的跨平台版本在线升级的装置的结构示意图。FIG. 2 is a schematic structural diagram of an apparatus for online cross-platform version upgrade according to an embodiment of the present invention.
具体实施方式Detailed ways
以下,参考附图1~2详细描述本发明的跨平台版本在线升级的方法及装置。Hereinafter, the cross-platform version online upgrade method and device of the present invention will be described in detail with reference to the accompanying drawings 1-2.
如图1所示,本发明的跨平台版本在线升级的方法,包括下列步骤:As shown in Figure 1, the method for cross-platform version online upgrade of the present invention comprises the following steps:
步骤100:预先在新的系统启动引导软件(Bootloader)版本和旧的主版本中分别预留固定内存,例如预留11M固定内存,分别存储新的主版本和旧的主版本中待保存的数据。Step 100: Reserve fixed memory respectively in the new system boot software (Bootloader) version and the old main version in advance, for example reserve 11M fixed memory, respectively store the data to be saved in the new main version and the old main version .
其中,预留固定内存的大小根据待存版本和数据的大小计算得来,由于考虑新版本大小会在不断变化,所以预留固定内存大小要相对大一些,这样有一定的余量防止新版本变大而预留固定内存不够的情况。另外,对预留固定内存地址分成4个逻辑区,分别存放主版本文件、启动参数数据、用户配置命令数据和业务配置命令数据。每个逻辑分区对应着一个数据管理结构,包括对分区名、分区大小、分区数据类型、实际保存数据的长度等进行管理。另外,对预留固定内存进行了ramdisk映射操作。版本下载过程中,版本文件是先依次保存到内存中,这个内存直接指向提前预留的高端内存的版本逻辑分区存储地址,版本文件进行校验成功后,命令可直接返回。这就要求ramdisk操作必须要对其读写的数据和物理内存一一对应。标准的ramdisk并不能满足这个条件,所以在对预留固定内存进行映射操作的时候需要创建一个内存文件设备,并单独对其管理,来实现需要的功能,在此不再详述。Among them, the size of the reserved fixed memory is calculated according to the size of the version to be stored and the data. Considering that the size of the new version will continue to change, the size of the reserved fixed memory should be relatively large, so that there is a certain margin to prevent new versions When the size becomes larger and the fixed memory is not enough. In addition, the reserved fixed memory address is divided into 4 logical areas, which respectively store the main version file, startup parameter data, user configuration command data and service configuration command data. Each logical partition corresponds to a data management structure, including the management of the partition name, partition size, partition data type, and the length of the actual stored data. In addition, the ramdisk mapping operation is performed on the reserved fixed memory. During the version download process, the version files are first saved in the memory one by one. This memory directly points to the storage address of the version logical partition of the high-end memory reserved in advance. After the version file is verified successfully, the command can return directly. This requires that the ramdisk operation must have a one-to-one correspondence between the data it reads and writes and the physical memory. The standard ramdisk cannot meet this condition, so when performing mapping operations on reserved fixed memory, it is necessary to create a memory file device and manage it separately to achieve the required functions, which will not be described in detail here.
步骤200:获取版本文件和旧的主版本中待保存的数据;其中,版本文件包括新的主版本、固件版本以及Bootloader版本。Step 200: Obtain the version file and data to be saved in the old main version; wherein, the version file includes the new main version, firmware version and Bootloader version.
其中,在步骤200中,可以通过USB或者FTP方式,从计算机服务器、或者网管服务器上获取新的主版本、旧的主版本中待保存的数据,以及新的Bootloader版本;或者主用主控板通过板间通讯、FTP方式从相邻设备上获取新的主版本文件,并下载到预留固定内存。Wherein, in step 200, the new main version, the data to be saved in the old main version, and the new Bootloader version can be obtained from the computer server or the network management server through USB or FTP; or the main main control board Obtain the new main version file from the adjacent device through inter-board communication and FTP, and download it to the reserved fixed memory.
其中,在主用主控板通过板间通讯从相邻设备上获取新的主版本文件时,具体实现过程如下:主用主控板通过命令行或者网管发起获取新的主版本操作。备用主控板根据主控板发起的消息发起操作,这样备用主控板的版本升级过程可以完全随主用主控板的升级自动进行。主用主控板通过启动一个ftp客户端,向计算机服务器或者网管服务器获取主版本文件,并下载到预留固定内存。如果待获取的版本文件有多种版本文件,则可以多次获取版本文件,根据文件名或者版本头里面记录的信息来区分对应的存储地址。Wherein, when the main main control board obtains a new main version file from an adjacent device through inter-board communication, the specific implementation process is as follows: the main main control board initiates an operation of obtaining a new main version through a command line or a network management system. The standby main control board initiates an operation according to the message initiated by the main control board, so that the version upgrade process of the standby main control board can be carried out automatically along with the upgrade of the active main control board. The main main control board obtains the main version file from the computer server or the network management server by starting an ftp client, and downloads it to the reserved fixed memory. If there are multiple versions of the version file to be obtained, the version file can be obtained multiple times, and the corresponding storage addresses are distinguished according to the information recorded in the file name or the version header.
步骤300:对该新的主版本校验成功后,将其保存到预留固定内存,并将旧的主版本中待保存的数据适配保留到预留固定内存。Step 300: After the verification of the new main version is successful, save it to the reserved fixed memory, and adapt and save the data to be saved in the old main version to the reserved fixed memory.
其中,在步骤300中,由于获取的新的版本文件里面有版本头,里面保存有数据长度和版本异或校验和,通过这些信息可以对下载的版本文件进行校验。如果校验并保留到预留固定内存成功,则主用主控板给备用主控板发送消息,主用主控板等待备用主控板应答。备用主控板收到消息后会启动一个ftp客户端,主用主控板启动ftp服务器,这样只要主用主控板告诉备用主控板获取的文件名,备用主控板就可以通过ftp从主用主控板访问ramdisk设备,即预留固定内存获取相应的版本文件。备用主控板校验完成后给主用主控板应答校验保存成功消息。如果版本文件获取失败,或者主备用主控板版本文件校验失败,命令行返回失败和错误原因。用户决定是否继续新版本加载,如果不继续新版本加载,也不影响原保存到文件系统中的老主版本文件。Wherein, in step 300, since the acquired new version file contains a version header, which stores the data length and version XOR checksum, the downloaded version file can be verified through these information. If the verification and reservation are successful until the reserved fixed memory is successful, the active main control board sends a message to the standby main control board, and the active main control board waits for the standby main control board to reply. After receiving the message, the standby main control board will start an ftp client, and the active main control board will start the ftp server. In this way, as long as the active main control board tells the standby main control board the name of the file obtained, the standby main control board can use ftp from The main control board accesses the ramdisk device, that is, reserves fixed memory to obtain corresponding version files. After the verification of the standby main control board is completed, the main main control board shall reply with a verification and save success message. If the acquisition of the version file fails, or the version file verification of the active and standby main control boards fails, the command line returns the failure and the error reason. The user decides whether to continue loading the new version. If not, the old master version files originally saved in the file system will not be affected.
另外,在步骤300中,需要获取的数据包括启动参数数据、用户配置命令和业务配置命令数据,分别通过各自模块获取并保存对应的预留固定内存的分区里面。其中,配置命令数据由于老版本和新版本命令格式不兼容,所以需要作适配处理。获取旧的主版本中待保存的数据,将其适配并保留到预留固定内存,该操作可以在对该新的主版本校验成功后将其保存到预留固定内存之后进行,这样两个命令可以合并成一个命令执行,用户操作也简单,如果操作失败,则可以一起返回错误提示。In addition, in step 300, the data to be obtained includes startup parameter data, user configuration commands and service configuration command data, which are respectively obtained and stored in corresponding partitions of reserved fixed memory through respective modules. Among them, the configuration command data needs to be adapted because the command formats of the old version and the new version are not compatible. Obtain the data to be saved in the old main version, adapt it and save it in the reserved fixed memory. This operation can be performed after the new main version is successfully verified and saved in the reserved fixed memory. Two commands can be combined into one command to execute, and the user operation is also simple. If the operation fails, an error message can be returned together.
步骤400:对获取的新的Bootloader版本校验成功后,将其烧写到bootrom区,然后重启系统。Step 400: After successfully verifying the obtained new Bootloader version, burn it into the bootrom area, and then restart the system.
在步骤400中,获取新的Bootloader版本文件的命令是主用主控板通过命令行或者网管发起操作,备用主控板通过主控板给它发消息发起操作。新的Bootloader版本在获取成功后,可以直接保存到系统bootrom中,不需要保留到预留固定内存。In step 400, the command to obtain the new Bootloader version file is initiated by the active main control board through a command line or network management, and the standby main control board sends a message to it through the main control board to initiate the operation. After the new Bootloader version is successfully obtained, it can be directly saved to the system bootrom, and does not need to be reserved for fixed memory.
具体地,新的Bootloader版本文件在内存中校验通过后直接烧写到bootrom芯片里面,同时备份到文件系统,然后主用主控板给备用板发送消息,备用主控板启动ftp客户端,主用主控板启动ftp服务器端,从主用主控板文件系统中获取系统启动引导软件版本文件,校验后直接烧写到备用主控板的bootrom区,并发消息给主控板升级成功。如果主备用主控板有操作失败,则随主用主控板命令行一起返回,由用户决定是重新升级或者版本回退。Specifically, after the new Bootloader version file passes the verification in the memory, it is directly burned into the bootrom chip, and backed up to the file system at the same time, and then the active main control board sends a message to the standby main control board, and the standby main control board starts the ftp client. The main control board starts the ftp server, obtains the system startup boot software version file from the file system of the main control board, and after verification, directly writes it to the bootrom area of the standby main control board, and sends a message to the main control board that the upgrade is successful . If there is an operation failure on the main and standby main control boards, it will be returned together with the command line of the active main control board, and it is up to the user to decide whether to re-upgrade or roll back the version.
步骤500:新的Bootloader版本在启动过程中获取预留固定内存中的新的主版本文件和保存的数据,解析并保存到flash或文件系统,新版本加载并启动。Step 500: During startup, the new Bootloader version acquires the new main version file and stored data in the reserved fixed memory, parses and saves them to flash or file system, and the new version is loaded and started.
其中,在步骤500中,新的Bootloader版本在启动过程中,不能对预留补丁内存进行初始化等操作,可以直接获取数据,新的主版本文件保存到文件系统,数据解析后保存到预定位置。Wherein, in step 500, during the startup process of the new Bootloader version, the reserved patch memory cannot be initialized and other operations can be directly obtained, and the new main version file is saved to the file system, and the data is parsed and saved to a predetermined location.
如图2所示,本发明的跨平台版本在线升级的装置,包括:预留固定内存模块、软件版本获取模块。As shown in FIG. 2 , the cross-platform version online upgrade device of the present invention includes: a reserved fixed memory module and a software version acquisition module.
其中,预留固定内存模块,用于通过对预留固定内存进行逻辑分区,不同分区用于分别存放新的各种主版本和旧的主版本中待保存的重要数据。另外,为了其他系统(比如备用系统)能够通过ftp方式方便获取固定内存中的数据,预留固定内存模块,还用于对固定内存进行映射为文件映像的操作。Wherein, the reserved fixed memory module is used for logically partitioning the reserved fixed memory, and different partitions are used to respectively store important data to be saved in various new main versions and old main versions. In addition, for other systems (such as standby systems) to conveniently obtain data in the fixed memory through ftp, a fixed memory module is reserved, and it is also used to map the fixed memory to a file image.
软件版本和数据获取模块,用于提供获取版本文件的通道,从PC服务器、网管服务器,或者主控板获取待升级的版本文件,以及获取旧的主版本中待保存的数据。其中,软件版本包括系统主版本文件、固件版本文件(比如套片初始化文件)以及系统启动引导软件Bootloader版本文件。在版本文件获取过程中,通过USB或者FTP方式,从计算机服务器、或者网管服务器上获取新的主版本、旧的主版本中待保存的数据,以及新的Bootloader版本;或者主用主控板通过板间通讯、FTP方式从相邻设备上获取新的主版本文件,并下载到预留固定内存。另外,在获取过程中,首先要将版本文件下载到内存中或者flash中,然后对其校验,如果校验没有问题之后才会对其进行保存。考虑到系统内存有限,软件版本和数据获取模块通过一定条件的判断和分析,采用缓存的内存和用于保存的预留固定内存共用的方式,这样可以解决由于预留一块固定内存,导致系统内存无法提供大的内存给版本文件缓存的问题。当然如果系统内存足够多,也可以不采取这种方式。The software version and data acquisition module is used to provide a channel for obtaining version files, obtain the version files to be upgraded from the PC server, the network management server, or the main control board, and obtain the data to be saved in the old main version. Wherein, the software version includes a system main version file, a firmware version file (such as a chip initialization file) and a system startup boot software Bootloader version file. In the process of obtaining the version file, obtain the new main version, the data to be saved in the old main version, and the new Bootloader version from the computer server or the network management server through USB or FTP; Obtain the new main version file from the adjacent device through inter-board communication and FTP, and download it to the reserved fixed memory. In addition, in the acquisition process, the version file must first be downloaded into memory or flash, and then verified, and it will be saved only after the verification is correct. Considering that the system memory is limited, the software version and data acquisition module use the method of sharing the cached memory and the reserved fixed memory for storage through the judgment and analysis of certain conditions. Unable to provide large memory for version file cache. Of course, if the system memory is sufficient, this method may not be adopted.
另外,软件版本和数据获取模块,可以进一步用于将获取的数据转换为新版本识别的数据,包括对数据进行压缩处理或者适配处理,可以根据待获取的数据功能划分成不同的子模块,各子模块从系统中获取相应功能的数据。In addition, the software version and data acquisition module can be further used to convert the acquired data into data recognized by the new version, including compressing or adapting the data, and can be divided into different sub-modules according to the function of the data to be acquired. Each sub-module obtains the data of the corresponding function from the system.
软件版本和数据存储模块,用于识别获取的新的版本是否是当前系统兼容的软件版本,如果新的版本是当前系统不兼容的版本,则将新的主版本保存到预留固定内存,并将获取的旧的主版本中待保存的数据保存到预留的固定内存分区,将新的Bootloader版本,烧写到bootrom区,如果待升级的版本是目前系统兼容的版本文件,则按照原来的存储方式,版本文件直接保存到flash。The software version and data storage module are used to identify whether the new version obtained is a software version compatible with the current system, and if the new version is a version incompatible with the current system, save the new main version to the reserved fixed memory, and Save the data to be saved in the obtained old main version to the reserved fixed memory partition, and burn the new Bootloader version to the bootrom area. If the version to be upgraded is a version file compatible with the current system, follow the original Storage method, the version file is directly saved to flash.
另外,软件版本和数据存储模块,进一步用于将烧写到bootrom的新的Bootloader版本文件重新读出来与内存的文件比较,如果一致才返回升级成功;如果升级失败,只要把原有的Bootloader版本文件重新获取并烧写到bootrom,系统就回退到原有版本。In addition, the software version and data storage module are further used to reread the new Bootloader version file programmed into the bootrom and compare it with the file in the internal memory. The file is reacquired and programmed into the bootrom, and the system returns to the original version.
版本和数据解析保存模块,用于对新的Bootloader版本在启动过程中获取的预留固定内存中的新的主版本和数据进行解析并保存到本地flash或者文件系统中。有些系统需要把cpld等固件版本文件更新到cpld里面,并将预留固定内存中的数据进行解析并保存到相应的位置。The version and data parsing and saving module is used for parsing the new main version and data in the reserved fixed memory acquired by the new Bootloader version during startup and saving them in the local flash or file system. Some systems need to update the cpld and other firmware version files into the cpld, and analyze and save the data in the reserved fixed memory to the corresponding location.
综上所述,依照本发明的跨平台版本在线升级的方法及装置,通过预留固定内存暂时保存数据和新版本的方式,待新的系统启动引导软件启动之后再把预留固定内存版本和数据保存到flash,系统自动获取并适配数据,从而完成了不兼容跨平台版本的在线升级,降低了产品的成本,提高了升级速度,减少了人为操作。To sum up, according to the cross-platform version online upgrade method and device of the present invention, the data and the new version are temporarily saved by reserving a fixed memory, and the reserved fixed memory version and the new version are saved after the new system boot software is started. The data is saved to flash, and the system automatically acquires and adapts the data, thus completing the online upgrade of incompatible cross-platform versions, reducing product costs, improving the upgrade speed, and reducing manual operations.
以上是为了使本领域普通技术人员理解本发明,而对本发明所进行的详细描述,但可以想到,在不脱离本发明的权利要求所涵盖的范围内还可以做出其它的变化和修改,这些变化和修改均在本发明的保护范围内。The above is a detailed description of the present invention for those skilled in the art to understand the present invention, but it is conceivable that other changes and modifications can be made without departing from the scope covered by the claims of the present invention. Variations and modifications are within the scope of the present invention.
Claims (10)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201010002621.5A CN101770383B (en) | 2010-01-22 | 2010-01-22 | Method and device for on-line upgrade of cross-platform version |
| PCT/CN2010/078787 WO2011088701A1 (en) | 2010-01-22 | 2010-11-16 | Method and device for online upgrading cross-platform version |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201010002621.5A CN101770383B (en) | 2010-01-22 | 2010-01-22 | Method and device for on-line upgrade of cross-platform version |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN101770383A true CN101770383A (en) | 2010-07-07 |
| CN101770383B CN101770383B (en) | 2014-04-09 |
Family
ID=42503262
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201010002621.5A Expired - Fee Related CN101770383B (en) | 2010-01-22 | 2010-01-22 | Method and device for on-line upgrade of cross-platform version |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN101770383B (en) |
| WO (1) | WO2011088701A1 (en) |
Cited By (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2011088701A1 (en) * | 2010-01-22 | 2011-07-28 | 中兴通讯股份有限公司 | Method and device for online upgrading cross-platform version |
| CN104049985A (en) * | 2013-03-12 | 2014-09-17 | 中兴通讯股份有限公司 | Cross-file-system version on-line upgrading method and device |
| CN104881604A (en) * | 2014-02-27 | 2015-09-02 | 中兴通讯股份有限公司 | Method and apparatus for operating versions files |
| CN105677409A (en) * | 2015-12-31 | 2016-06-15 | 中科创达软件股份有限公司 | System upgrading method and device |
| CN108845822A (en) * | 2018-05-28 | 2018-11-20 | 烽火通信科技股份有限公司 | Realize the EMS memory management process and system of the upgrading of software non-interrupting service |
| CN109408075A (en) * | 2018-10-19 | 2019-03-01 | 中影环球(北京)科技有限公司 | A kind of method and apparatus for retaining current business and carrying out remote upgrade |
| CN111045714A (en) * | 2019-12-19 | 2020-04-21 | 歌尔股份有限公司 | Firmware updating method and device, earphone and computer readable storage medium |
| CN111742297A (en) * | 2019-07-23 | 2020-10-02 | 深圳市大疆创新科技有限公司 | Firmware booting method, device and computer-readable storage medium |
| CN112328296A (en) * | 2020-11-30 | 2021-02-05 | 北京百度网讯科技有限公司 | Software update method, apparatus, device and medium for cross-platform application |
| CN113391833A (en) * | 2021-06-16 | 2021-09-14 | 杭州爱华仪器有限公司 | Remote upgrading system and method for measuring amplifier |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102955711A (en) * | 2012-11-23 | 2013-03-06 | 深圳市航盛电子股份有限公司 | Method for upgrading vehicle-mounted terminal firmware based on WCDMA (Wideband Code Division Multiple Access) channel |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1862503A (en) * | 2006-03-03 | 2006-11-15 | 华为技术有限公司 | Text on-line upgrading method and device |
| CN101196823A (en) * | 2007-12-24 | 2008-06-11 | 杭州华三通信技术有限公司 | Method, system and device for online software upgrade in open application architecture |
| CN101477471A (en) * | 2009-01-07 | 2009-07-08 | 杭州海康威视数字技术股份有限公司 | Embedded system firmware on-line upgrading system |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101770383B (en) * | 2010-01-22 | 2014-04-09 | 中兴通讯股份有限公司 | Method and device for on-line upgrade of cross-platform version |
-
2010
- 2010-01-22 CN CN201010002621.5A patent/CN101770383B/en not_active Expired - Fee Related
- 2010-11-16 WO PCT/CN2010/078787 patent/WO2011088701A1/en not_active Ceased
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1862503A (en) * | 2006-03-03 | 2006-11-15 | 华为技术有限公司 | Text on-line upgrading method and device |
| CN101196823A (en) * | 2007-12-24 | 2008-06-11 | 杭州华三通信技术有限公司 | Method, system and device for online software upgrade in open application architecture |
| CN101477471A (en) * | 2009-01-07 | 2009-07-08 | 杭州海康威视数字技术股份有限公司 | Embedded system firmware on-line upgrading system |
Cited By (15)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2011088701A1 (en) * | 2010-01-22 | 2011-07-28 | 中兴通讯股份有限公司 | Method and device for online upgrading cross-platform version |
| CN104049985A (en) * | 2013-03-12 | 2014-09-17 | 中兴通讯股份有限公司 | Cross-file-system version on-line upgrading method and device |
| CN104881604A (en) * | 2014-02-27 | 2015-09-02 | 中兴通讯股份有限公司 | Method and apparatus for operating versions files |
| CN104881604B (en) * | 2014-02-27 | 2019-07-16 | 中兴通讯股份有限公司 | The operation method and device of version file |
| CN105677409A (en) * | 2015-12-31 | 2016-06-15 | 中科创达软件股份有限公司 | System upgrading method and device |
| CN105677409B (en) * | 2015-12-31 | 2019-02-05 | 中科创达软件股份有限公司 | A kind of method for upgrading system and device |
| CN108845822B (en) * | 2018-05-28 | 2022-03-01 | 烽火通信科技股份有限公司 | Memory management method and system for realizing uninterrupted service upgrade of software |
| CN108845822A (en) * | 2018-05-28 | 2018-11-20 | 烽火通信科技股份有限公司 | Realize the EMS memory management process and system of the upgrading of software non-interrupting service |
| CN109408075A (en) * | 2018-10-19 | 2019-03-01 | 中影环球(北京)科技有限公司 | A kind of method and apparatus for retaining current business and carrying out remote upgrade |
| CN111742297A (en) * | 2019-07-23 | 2020-10-02 | 深圳市大疆创新科技有限公司 | Firmware booting method, device and computer-readable storage medium |
| CN111045714B (en) * | 2019-12-19 | 2022-03-01 | 歌尔股份有限公司 | Firmware updating method and device, earphone and computer readable storage medium |
| CN111045714A (en) * | 2019-12-19 | 2020-04-21 | 歌尔股份有限公司 | Firmware updating method and device, earphone and computer readable storage medium |
| CN112328296A (en) * | 2020-11-30 | 2021-02-05 | 北京百度网讯科技有限公司 | Software update method, apparatus, device and medium for cross-platform application |
| CN112328296B (en) * | 2020-11-30 | 2024-04-02 | 北京百度网讯科技有限公司 | Method, device, equipment and medium for updating software aiming at cross-platform application |
| CN113391833A (en) * | 2021-06-16 | 2021-09-14 | 杭州爱华仪器有限公司 | Remote upgrading system and method for measuring amplifier |
Also Published As
| Publication number | Publication date |
|---|---|
| WO2011088701A1 (en) | 2011-07-28 |
| CN101770383B (en) | 2014-04-09 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN101770383B (en) | Method and device for on-line upgrade of cross-platform version | |
| CN103365696B (en) | BIOS image file acquisition methods and device | |
| CN110597542B (en) | Software automatic OTA (over the air) upgrading method and device and electronic equipment | |
| CN112732310B (en) | Firmware upgrade method, system, device and medium based on embedded boot partition | |
| CN102541604B (en) | The terminal device of a kind of remote upgrade method, remote upgrade and remote update system | |
| US20160085537A1 (en) | Software installation onto a client using existing resources | |
| CN113900693A (en) | Firmware upgrading method, device and system, electronic equipment and storage medium | |
| CN104881604B (en) | The operation method and device of version file | |
| US20130007724A1 (en) | Firmware repairable customer premises equipment and firmware repairing method thereof | |
| CN112231005A (en) | Method for managing FPGA (field programmable Gate array) version based on UBOOT (Universal boot on Board) | |
| WO2010081323A1 (en) | Method for realizing single board application version and system thereof | |
| CN100389389C (en) | The Method of Realizing Bootstrap Hot Upgrade in Embedded System | |
| CN111026417A (en) | Embedded equipment upgrading method and embedded equipment | |
| CN116954752A (en) | Differentiated system configuration and loading method and device and computer equipment | |
| WO2017173924A1 (en) | Method and device for switching between file systems | |
| CN106878486A (en) | A method and system for preventing the MAC address of the onboard network card from being modified | |
| CN101593122B (en) | Method and device for starting embedded system | |
| CN113805933A (en) | Set top box system upgrading method and device, set top box, system and storage medium | |
| CN115357262A (en) | Method for upgrading driver firmware in batch | |
| CN109697077B (en) | Method, device and equipment for starting hard disk firmware | |
| CN113986324B (en) | A frame-type equipment board software incremental upgrade method and system | |
| CN117348905A (en) | BMC firmware update method, system, terminal and storage medium | |
| CN104049985A (en) | Cross-file-system version on-line upgrading method and device | |
| CN114296770A (en) | Differential upgrading method, device, equipment and readable storage medium | |
| CN113791810A (en) | ZYNQ platform-based remote upgrading method, device and system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20140409 |
|
| CF01 | Termination of patent right due to non-payment of annual fee |
