[go: up one dir, main page]

CN102830984B - Method, chip and the communication terminal that firmware updates - Google Patents

Method, chip and the communication terminal that firmware updates Download PDF

Info

Publication number
CN102830984B
CN102830984B CN201110159548.7A CN201110159548A CN102830984B CN 102830984 B CN102830984 B CN 102830984B CN 201110159548 A CN201110159548 A CN 201110159548A CN 102830984 B CN102830984 B CN 102830984B
Authority
CN
China
Prior art keywords
firmware
update
communication terminal
value
predetermined flag
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.)
Active
Application number
CN201110159548.7A
Other languages
Chinese (zh)
Other versions
CN102830984A (en
Inventor
宋祎斐
席振新
彭绍平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201110159548.7A priority Critical patent/CN102830984B/en
Publication of CN102830984A publication Critical patent/CN102830984A/en
Application granted granted Critical
Publication of CN102830984B publication Critical patent/CN102830984B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

Embodiments of the invention provide method, chip and the communication terminal that firmware updates, and wherein, the method that firmware updates includes: communication terminal knows that the second firmware needs to update;Communication terminal is downloaded the second firmware and is updated the more new data needed;Predetermined flag position is set to the second value by communication terminal;When communication terminal is again started up, the first firmware knows that predetermined flag position is after the second value, it is determined that more new data writing position in the second firmware, and the more new data that the second firmware updates needs writes this writing position, it is achieved the renewal of the second firmware;After second firmware is updated successfully, predetermined flag position is set to the first value by the first firmware;Wherein, the first firmware is firmware more new module, and the second firmware includes: operating system nucleus.Method, chip and the communication terminal that the firmware provided by the embodiment of the present invention is updated, it may be achieved directly completed the renewal of firmware by terminal.

Description

固件更新的方法、芯片以及通信终端Firmware update method, chip and communication terminal

技术领域 technical field

本发明涉及通信领域,尤其涉及固件更新的方法、芯片以及通信终端。The invention relates to the communication field, in particular to a firmware update method, a chip and a communication terminal.

背景技术 Background technique

随着科技的发展,移动终端智能化程度越来越高,随着各版本的不断优化,移动终端中的大部分固件频繁需要升级,而目前除了由操作系统内核来实现操作系统的升级能直接在移动终端上完成之外,包括操作系统内核在内的其余需要更新的固件,也只能先通过网络将升级文件下载至个人电脑(PC机),再使用PC机对与移动终端连接来实现更新。With the development of science and technology, the intelligence of mobile terminals is getting higher and higher. With the continuous optimization of each version, most of the firmware in mobile terminals needs to be upgraded frequently. In addition to the completion on the mobile terminal, the rest of the firmware that needs to be updated, including the operating system kernel, can only be downloaded to a personal computer (PC) through the network first, and then use the PC to connect to the mobile terminal. renew.

发明内容 Contents of the invention

为了使终端能够直接对其中需升级的固件进行更新,本发明实施例提供一种固件更新的方法,适用于通信终端,该方法包括:In order to enable the terminal to directly update the firmware that needs to be upgraded, an embodiment of the present invention provides a firmware update method, which is suitable for communication terminals, and the method includes:

通信终端获知第二固件需要更新;The communication terminal learns that the second firmware needs to be updated;

通信终端下载第二固件更新需要的更新数据;The communication terminal downloads the update data required for the second firmware update;

通信终端将预定标志位设置为第二值;The communication terminal sets the predetermined flag bit as the second value;

通信终端再次启动时,第一固件获知预定标志位为第二值后,确定更新数据在第二固件中的写入位置,并将第二固件更新需要的更新数据写入该写入位置,实现第二固件的更新;When the communication terminal starts up again, after the first firmware learns that the predetermined flag is the second value, it determines the write position of the update data in the second firmware, and writes the update data needed for the second firmware update into the write position, realizing an update of the second firmware;

第二固件更新成功后,第一固件将预定标志位设置为第一值;After the second firmware is successfully updated, the first firmware sets the predetermined flag to the first value;

其中,第一固件为固件更新模块,第二固件包括:操作系统内核。Wherein, the first firmware is a firmware update module, and the second firmware includes: an operating system kernel.

较优的,通信终端下载第二固件更新需要的更新数据包括:通信终端对第二固件更新需要的更新数据进行验证,并将通过验证的更新数据存入预定位置;Preferably, the communication terminal downloading the update data required for the second firmware update includes: the communication terminal verifies the update data required for the second firmware update, and stores the verified update data in a predetermined location;

将第二固件更新需要的更新数据写入该写入位置包括:从预定位置获得第二固件更新需要的更新数据,并将第二固件更新需要的更新数据写入该写入位置。Writing the update data needed for the second firmware update into the writing location includes: obtaining the update data needed for the second firmware update from a predetermined location, and writing the update data needed for the second firmware update into the write location.

较优的,通信终端下载第二固件更新需要的更新数据包括:通信终端下载第二固件更新需要的差分包;Preferably, the update data required for the communication terminal to download the second firmware update includes: the communication terminal downloads the differential packet required for the second firmware update;

第一固件将第二固件更新需要的更新数据写入该写入位置包括:第一固件使用预定算法将差分包写入该写入位置。Writing the update data required by the second firmware update to the write position by the first firmware includes: writing the differential packet into the write position by the first firmware using a predetermined algorithm.

较优的,通信终端下载第二固件更新需要的更新数据包括:通信终端对第二固件更新需要的更新数据进行验证,并将通过验证的更新数据存入预定位置;Preferably, the communication terminal downloading the update data required for the second firmware update includes: the communication terminal verifies the update data required for the second firmware update, and stores the verified update data in a predetermined location;

将第二固件更新需要的更新数据写入该写入位置包括:从预定位置获得第二固件更新需要的更新数据,并将第二固件更新需要的更新数据写入该写入位置。Writing the update data needed for the second firmware update into the writing location includes: obtaining the update data needed for the second firmware update from a predetermined location, and writing the update data needed for the second firmware update into the write location.

较优的,通信终端再次启动时,第一固件获知预定标志位为第二值包括:Preferably, when the communication terminal starts up again, the first firmware knowing that the predetermined flag bit is the second value includes:

通信终端再次启动时,由第三固件获知预定标志位设置为第二值后,加载第一固件,使第一固件获知预定标志位为第二值;When the communication terminal starts up again, after the third firmware learns that the predetermined flag is set to the second value, the first firmware is loaded, so that the first firmware knows that the predetermined flag is the second value;

其中,第三固件为,在通信终端启动过程中,直接加载第一固件的固件。Wherein, the third firmware is the firmware directly loading the first firmware during the startup process of the communication terminal.

进一步的,通信终端包括处理器,处理器包括第一核和第二核,第一固件位于第二核,操作系统内核位于第二核;Further, the communication terminal includes a processor, the processor includes a first core and a second core, the first firmware is located in the second core, and the operating system kernel is located in the second core;

第二固件进一步包括:位于第一核的固件。The second firmware further includes: firmware located on the first core.

更进一步的,第二值用于指示第二固件中任一个固件的状态为需要更新。Furthermore, the second value is used to indicate that the status of any firmware in the second firmware needs to be updated.

较优的,第二固件更新成功后,第一固件将预定标志位设置为第一值具体包括:Preferably, after the second firmware is successfully updated, the first firmware sets the predetermined flag bit to the first value, specifically including:

第二固件更新成功后,将预定标志位设置为第三值;After the second firmware update is successful, the predetermined flag is set to a third value;

操作系统内核判断操作系统内核对应的操作系统是否需要更新;The operating system kernel judges whether the operating system corresponding to the operating system kernel needs to be updated;

如果需要更新,操作系统内核对操作系统进行更新,在更新成功后,通知第一固件;If an update is required, the operating system kernel updates the operating system, and notifies the first firmware after the update is successful;

第一固件将预定标志位设置为第一值。The first firmware sets a predetermined flag bit to a first value.

更优的,在将预定标志位设置为第三值后,在第一固件将预定标志位设置为第一值前,方法进一步包括:More preferably, after setting the predetermined flag bit to the third value, before the first firmware sets the predetermined flag bit to the first value, the method further includes:

如果通信终端再次启动时,第二固件获知预定标志位为第三值,返回对操作系统进行更新的步骤。If the communication terminal starts up again, the second firmware learns that the predetermined flag bit is the third value, and returns to the step of updating the operating system.

进一步的,在第二固件更新成功之前,第一固件确定更新数据在第二固件中的写入位置之后,方法进一步包括:Further, before the second firmware update is successful, after the first firmware determines the write location of the update data in the second firmware, the method further includes:

将第二固件更新需要的更新数据写入该写入位置,实现第二固件的更新。The update data required for updating the second firmware is written into the writing position to realize the update of the second firmware.

本发明实施例同时提供了另一种固件更新的方法,适用于通信终端,包括:The embodiment of the present invention also provides another firmware update method, which is suitable for communication terminals, including:

通信终端获知第五固件需要更新;The communication terminal learns that the fifth firmware needs to be updated;

通信终端下载第五固件更新需要的更新数据;The communication terminal downloads the update data required for the fifth firmware update;

通信终端将预定标志位设置为第四值;The communication terminal sets the predetermined flag bit as the fourth value;

通信终端再次启动时,第四固件获知预定标志位为第四值后,形成第五固件的备份固件,确定第五固件更新需要的更新数据在第五固件的备份固件中的第一写入位置,并将第五固件更新需要的更新数据写入第一写入位置,形成第五固件的备份更新固件;When the communication terminal starts again, after the fourth firmware learns that the predetermined flag is the fourth value, it forms the backup firmware of the fifth firmware, and determines the first write position of the update data required for the fifth firmware update in the backup firmware of the fifth firmware , and write the update data needed for the fifth firmware update into the first writing position, forming the backup update firmware of the fifth firmware;

第四固件确定第五固件中的第二写入位置,将第五固件的备份更新固件中的数据,写入第二写入位置,实现第五固件的更新;The fourth firmware determines the second write location in the fifth firmware, and writes the backup of the fifth firmware to update the data in the firmware, and writes it into the second write location to realize the update of the fifth firmware;

第五固件更新成功后,第四固件将预定标志位设置为第五值;After the fifth firmware is successfully updated, the fourth firmware sets the predetermined flag to the fifth value;

其中,第四固件为固件更新模块,第五固件为第四固件,和/或通信终端启动过程中,需要先行加载才能使第四固件加载的固件。Wherein, the fourth firmware is a firmware update module, the fifth firmware is the fourth firmware, and/or the firmware that needs to be loaded before the fourth firmware can be loaded during the startup process of the communication terminal.

较优的,通信终端下载第五固件更新需要的更新数据具体为,通信终端对第五固件更新需要的更新数据进行验证,并将通过验证的第五固件更新需要的更新数据存入预定位置;Preferably, the communication terminal downloads the update data required for the fifth firmware update specifically, the communication terminal verifies the update data required for the fifth firmware update, and stores the update data required for the fifth firmware update that has passed the verification into a predetermined location;

将第五固件更新需要的更新数据写入第一写入位置包括:从预定位置获得第五固件更新需要的更新数据,并将第五固件更新需要的更新数据写入第一写入位置。Writing the update data required for the fifth firmware update into the first writing location includes: obtaining the update data required for the fifth firmware update from a predetermined location, and writing the update data required for the fifth firmware update into the first write location.

较优的,第五固件更新需要的更新数据为第五固件更新需要的差分包;Preferably, the update data required for the fifth firmware update is the differential packet required for the fifth firmware update;

第四固件将第五固件更新需要的更新数据写入第一写入位置包括:第四固件使用预定算法将第五固件更新需要的差分包写入第一写入位置。Writing the update data required by the fifth firmware update into the first write location by the fourth firmware includes: the fourth firmware writes the differential packet required by the fifth firmware update into the first write location by using a predetermined algorithm.

较优的,第四固件形成第五固件的备份固件之后,方法进一步包括:第四固件将预定标志位设置为第六值;Preferably, after the fourth firmware forms the backup firmware of the fifth firmware, the method further includes: the fourth firmware sets the predetermined flag bit to a sixth value;

在第五固件更新成功之前,方法进一步包括:Before the fifth firmware update is successful, the method further includes:

如果通信终端再次启动时,第四固件获知预定标志位为第六值,返回确定第五固件更新需要的更新数据在第五固件的备份固件中的第一写入位置的步骤。If the communication terminal starts up again, the fourth firmware learns that the predetermined flag is the sixth value, and returns to the step of determining the first write position of the update data needed for the fifth firmware update in the backup firmware of the fifth firmware.

较优的,第四固件形成第五固件的备份更新固件之后,方法进一步包括:第四固件将预定标志位设置为第七值;Preferably, after the fourth firmware forms a backup of the fifth firmware to update the firmware, the method further includes: the fourth firmware sets the predetermined flag bit to the seventh value;

在第五固件更新成功之前,方法进一步包括:Before the fifth firmware update is successful, the method further includes:

如果通信终端再次启动时,第四固件获知预定标志位为第七值,则返回确定第五固件中的第二写入位置的步骤。If the fourth firmware learns that the predetermined flag bit is the seventh value when the communication terminal starts up again, return to the step of determining the second writing position in the fifth firmware.

更优的,通信终端再次启动时,在第四固件获知预定标志位为第七值之前进一步包括:More preferably, when the communication terminal starts up again, before the fourth firmware learns that the predetermined flag bit is the seventh value, it further includes:

第六固件获知预定标志位为第七值后,将对第五固件的加载替换为对第五固件的备份更新固件的加载。After the sixth firmware learns that the predetermined flag bit is the seventh value, it replaces the loading of the fifth firmware with the loading of the backup update firmware of the fifth firmware.

较优的,该方法进一步包括:Preferably, the method further includes:

通信终端获知第七固件需要更新;The communication terminal learns that the seventh firmware needs to be updated;

通信终端下载第七固件更新需要的更新数据;The communication terminal downloads the update data required for the seventh firmware update;

通信终端将预定标志位设置为第八值;The communication terminal sets the predetermined flag bit as the eighth value;

通信终端再次启动时,第四固件获知预定标志位为第八值后,确定第七固件更新需要的更新数据在第七固件中的写入位置,并将第七固件更新需要的更新数据写入该写入位置,实现第七固件的更新;When the communication terminal starts again, after the fourth firmware learns that the predetermined flag is the eighth value, it determines the write position of the update data required by the seventh firmware update in the seventh firmware, and writes the update data required by the seventh firmware update The writing location realizes the updating of the seventh firmware;

第七固件更新成功后,第四固件将预定标志位设置为第五值;After the seventh firmware is successfully updated, the fourth firmware sets the predetermined flag to the fifth value;

其中,第七固件包括:操作系统内核。Wherein, the seventh firmware includes: an operating system kernel.

更优的,通信终端包括处理器,处理器包括第三核和第四核,第四固件位于第四核,操作系统内核位于第四核,第七固件进一步包括:位于第三核的固件。More preferably, the communication terminal includes a processor, the processor includes a third core and a fourth core, the fourth firmware is located in the fourth core, the operating system kernel is located in the fourth core, and the seventh firmware further includes: firmware located in the third core.

较优的,第七固件更新成功后,第四固件将预定标志位设置为第五值具体包括:Preferably, after the seventh firmware update is successful, the fourth firmware sets the predetermined flag bit to the fifth value, specifically including:

第七固件更新成功后,将预定标志位设置为第九值;After the seventh firmware update is successful, the predetermined flag is set to the ninth value;

操作系统内核判断操作系统内核对应的操作系统是否需要更新;The operating system kernel judges whether the operating system corresponding to the operating system kernel needs to be updated;

如果需要更新,操作系统内核对操作系统进行更新,在更新成功后,通知第四固件;If an update is required, the operating system kernel updates the operating system, and notifies the fourth firmware after the update is successful;

第四固件将预定标志位设置为第五值。The fourth firmware sets the predetermined flag bit to a fifth value.

更优的,在将预定标志位设置为第九值后,在第四固件将预定标志位设置为第五值之前,方法进一步包括:如果通信终端再次启动时,操作系统内核获知预定标志位为第九值,返回对操作系统进行更新的步骤。More preferably, after the predetermined flag is set to the ninth value, before the fourth firmware sets the predetermined flag to the fifth value, the method further includes: if the communication terminal starts up again, the operating system kernel learns that the predetermined flag is The ninth value returns the step of updating the operating system.

较优的,在第七固件更新成功之前,第四固件确定第七固件更新需要的更新数据在第七固件中的写入位置之后,方法进一步包括:将第七固件更新需要的更新数据写入该写入位置,实现第七固件的更新。Preferably, before the seventh firmware update is successful, after the fourth firmware determines the write position of the update data required for the seventh firmware update in the seventh firmware, the method further includes: writing the update data required for the seventh firmware update This write position realizes the update of the seventh firmware.

本发明实施例同时还提供一种芯片,应用于通信终端中,芯片包含第一固件和第二固件,其中,第一固件包含:The embodiment of the present invention also provides a chip, which is applied to a communication terminal. The chip includes a first firmware and a second firmware, wherein the first firmware includes:

预定标志位读取模块,用于获知通信终端上的预定标志位为第二值后,获知第二固件需要更新;The predetermined flag reading module is used to learn that the second firmware needs to be updated after learning that the predetermined flag on the communication terminal is the second value;

写入位置确定模块,用于预定标志位读取模块获知第二固件需要更新后,确定第二固件更新需要的更新数据在第二固件中的写入位置;The write position determination module is used to determine the write position of the update data required by the second firmware update in the second firmware after the predetermined flag reading module knows that the second firmware needs to be updated;

更新写入模块,用于写入位置确定模块确定第二固件更新需要的更新数据在第二固件中的写入位置后,将第二固件更新需要的更新数据写入第二固件中的写入位置;The update writing module is used to write the update data required by the second firmware update into the second firmware after the write position determination module determines the write position of the update data required by the second firmware update in the second firmware Location;

预定标志位设置模块,用于在第二固件更新成功后,将预定标志位设置为第一值;A predetermined flag bit setting module, configured to set the predetermined flag bit to a first value after the second firmware update is successful;

其中,第一固件为固件更新模块,第二固件包括:操作系统内核。Wherein, the first firmware is a firmware update module, and the second firmware includes: an operating system kernel.

较优的,芯片包括第一核与第二核,第一固件以及操作系统内核位于第二核;Preferably, the chip includes a first core and a second core, and the first firmware and the operating system kernel are located in the second core;

第二固件进一步包括:位于第一核的固件。The second firmware further includes: firmware located on the first core.

较优的,预定标志位设置模块进一步用于,第二固件更新成功后,将预定标志位设置为第三值,并通知操作系统内核;并在接到操作系统内核的更新成功通知后,将预定标志位设置为第一值;Preferably, the predetermined flag bit setting module is further used to set the predetermined flag bit to a third value after the second firmware update is successful, and notify the operating system kernel; and after receiving the operating system kernel update success notification, set The predetermined flag bit is set to the first value;

操作系统内核进一步用于,判断自身对应的操作系统是否需要更新,如果需要更新,则对操作系统进行更新,并在更新成功后向第一固件发送更新成功通知。The operating system kernel is further used to determine whether the corresponding operating system needs to be updated, and if so, update the operating system, and send an update success notification to the first firmware after the update is successful.

本发明实施例同时提供另一种芯片,应用于通信终端中,芯片包含第四固件和第五固件,第四固件包含:The embodiment of the present invention also provides another chip, which is applied to a communication terminal. The chip includes fourth firmware and fifth firmware, and the fourth firmware includes:

预定标志位读取模块,用于获知通信终端上的预定标志位为第四值后,获知第五固件需要更新;The predetermined flag reading module is used to learn that the fifth firmware needs to be updated after knowing that the predetermined flag on the communication terminal is the fourth value;

固件备份模块,用于获知所述预定标志位为第四值后,形成所述第五固件的备份固件;A firmware backup module, configured to form backup firmware of the fifth firmware after learning that the predetermined flag bit is a fourth value;

第一写入位置确定模块,用于形成所述第五固件的备份固件后,确定第五固件更新需要的更新数据在第五固件的备份固件中的第一写入位置;The first writing position determination module is used to determine the first writing position of the update data required for updating the fifth firmware in the backup firmware of the fifth firmware after forming the backup firmware of the fifth firmware;

备份固件更新模块,用于将第五固件更新需要的更新数据写入第一写入位置,形成第五固件的备份更新固件;The backup firmware update module is used to write the update data needed for the fifth firmware update into the first write position, forming the backup update firmware of the fifth firmware;

第二写入位置确定模块,用于备份固件更新模块形成第五固件的备份更新固件之后,确定第五固件中的第二写入位置;The second write position determination module is used to determine the second write position in the fifth firmware after the backup firmware update module forms the backup update firmware of the fifth firmware;

备份更新固件写入模块,用于第二写入位置确定后,将第五固件的备份更新固件中的数据,写入第二写入位置,实现第五固件的更新;Backup update firmware write module, after the second write position is determined, the data in the backup update firmware of the fifth firmware is written into the second write position to realize the update of the fifth firmware;

预定标志位设置模块,用于在第五固件更新成功后,将预定标志位设置为第五值;A predetermined flag bit setting module, configured to set the predetermined flag bit to a fifth value after the fifth firmware update is successful;

其中,第四固件为固件更新模块,第五固件为第四固件,和/或通信终端启动过程中,需要先行加载才能使第四固件加载的固件。Wherein, the fourth firmware is a firmware update module, the fifth firmware is the fourth firmware, and/or the firmware that needs to be loaded before the fourth firmware can be loaded during the startup process of the communication terminal.

更优的,预定标志位设置模块进一步用于,在所述固件备份模块形成所述第五固件的备份固件之后,将所述预定标志位设置为第六值;More preferably, the predetermined flag bit setting module is further configured to set the predetermined flag bit to a sixth value after the firmware backup module forms the backup firmware of the fifth firmware;

所述预定标志位读取模块进一步用于,当所述通信终端再次启动时,在获知通信终端上的预定标志位为第六值后,通知所述备份固件更新模块形成所述第五固件的备份更新固件。The predetermined flag reading module is further configured to, when the communication terminal starts up again, notify the backup firmware update module to form the fifth firmware after knowing that the predetermined flag on the communication terminal is the sixth value. Backup and update firmware.

较优的,预定标志位设置模块进一步用于,在备份固件更新模块形成第五固件的备份更新固件之后,将预定标志位设置为第七值;Preferably, the predetermined flag bit setting module is further used to set the predetermined flag bit to the seventh value after the backup firmware update module forms the backup update firmware of the fifth firmware;

预定标志位读取模块进一步用于,当通信终端再次启动时,在获知通信终端上的预定标志位为第七值后,通知备份更新固件写入模块实现第五固件的更新。The predetermined flag bit reading module is further used to notify the backup update firmware writing module to implement the fifth firmware update after knowing that the predetermined flag bit on the communication terminal is the seventh value when the communication terminal starts up again.

更优的,芯片进一步包含第六固件,用于当通信终端再次启动时,在获知预定标志位为第七值后,将对第五固件的加载替换为对第五固件的备份更新固件的加载。More preferably, the chip further includes sixth firmware, which is used to replace the loading of the fifth firmware with the loading of the backup update firmware of the fifth firmware after knowing that the predetermined flag bit is the seventh value when the communication terminal starts up again .

较优的,芯片进一步包含第七固件;预定标志位读取模块进一步用于,当预定标志位设置为第八值时,获知第七固件需要更新;Preferably, the chip further includes the seventh firmware; the predetermined flag reading module is further used to know that the seventh firmware needs to be updated when the predetermined flag is set to the eighth value;

第四固件进一步包含:The fourth firmware further includes:

写入位置确定模块,用于所述预定标志位读取模块获知所述第七固件需要更新后,确定所述第七固件更新需要的更新数据在所述第七固件中的写入位置;以及A writing location determination module, configured to determine the writing location of the update data required for updating the seventh firmware in the seventh firmware after the predetermined flag bit reading module learns that the seventh firmware needs to be updated; and

更新写入模块,用于所述写入位置确定模块确定所述第七固件更新需要的更新数据在所述第七固件中的写入位置后,将所述第七固件更新需要的更新数据写入第七固件中的写入位置,实现第七固件的更新;The update writing module is used for the write position determining module to write the update data required for the seventh firmware update after determining the write position of the update data required for the seventh firmware update in the seventh firmware Enter the write position in the seventh firmware to realize the update of the seventh firmware;

预定标志位设置模块进一步用于,在第七固件更新成功后,将预定标志位设置为第五值;The predetermined flag bit setting module is further used to set the predetermined flag bit to a fifth value after the seventh firmware update is successful;

第七固件包括:操作系统内核。The seventh firmware includes: an operating system kernel.

本发明实施例还提供一种通信终端,包含第一固件和第二固件,通信终端进一步包含:The embodiment of the present invention also provides a communication terminal, including the first firmware and the second firmware, and the communication terminal further includes:

更新状态获知模块,用于获知第二固件需要更新;An update status learning module, configured to learn that the second firmware needs to be updated;

下载模块,用于下载第二固件更新需要的更新数据;以及a download module, configured to download the update data required for the second firmware update; and

标志位设置模块,用于更新状态获知模块获知第二固件需要更新后,将预定标志位设置为第二值;The flag bit setting module is used to set the predetermined flag bit to a second value after the update state acquisition module learns that the second firmware needs to be updated;

第一固件用于,当通信终端再次启动时,在获知预定标志位为第二值后,确定更新数据在第二固件中的写入位置,并将第二固件更新需要的更新数据写入该写入位置,实现第二固件的更新;并当第二固件更新成功后,将预定标志位设置为第一值;The first firmware is used for, when the communication terminal starts up again, after knowing that the predetermined flag bit is the second value, determine the write position of the update data in the second firmware, and write the update data required by the second firmware update into this Write the location to realize the update of the second firmware; and when the second firmware update is successful, set the predetermined flag bit to the first value;

其中,第一固件为固件更新模块,第二固件包括:操作系统内核。Wherein, the first firmware is a firmware update module, and the second firmware includes: an operating system kernel.

本发明实施例还提供另一种通信终端,包含第四固件和第五固件,通信终端进一步包含:The embodiment of the present invention also provides another communication terminal, including fourth firmware and fifth firmware, and the communication terminal further includes:

更新状态获知模块,用于获知第五固件需要更新;An update status learning module, configured to learn that the fifth firmware needs to be updated;

下载模块,用于下载第五固件更新需要的更新数据;以及A download module, configured to download update data needed for the fifth firmware update; and

标志位设置模块,用于更新状态获知模块获知第五固件需要更新后,将预定标志位设置为第四值;The flag bit setting module is used to set the predetermined flag bit to the fourth value after the update state acquisition module learns that the fifth firmware needs to be updated;

第四固件用于,当通信终端再次启动时,在获知预定标志位为第四值后,形成第五固件的备份固件,确定第五固件更新需要的更新数据在第五固件的备份固件中的第一写入位置,并将第五固件更新需要的更新数据写入第一写入位置,形成第五固件的备份更新固件;然后确定第五固件中的第二写入位置,将备份更新固件中的数据,写入第二写入位置,实现第五固件的更新;当第五固件更新成功后,将预定标志位设置为第五值;The fourth firmware is used for, when the communication terminal is started again, after learning that the predetermined flag is the fourth value, the backup firmware of the fifth firmware is formed, and it is determined that the update data required for the fifth firmware update is in the backup firmware of the fifth firmware. The first write location, and the update data needed for the fifth firmware update is written into the first write location, forming the backup update firmware of the fifth firmware; then determine the second write location in the fifth firmware, and backup update firmware Write the data in the second write position to realize the update of the fifth firmware; when the fifth firmware update is successful, the predetermined flag is set to the fifth value;

其中,第四固件为固件更新模块,第五固件为第四固件,和/或通信终端启动过程中,需要先行加载才能使第四固件加载的固件。Wherein, the fourth firmware is a firmware update module, the fifth firmware is the fourth firmware, and/or the firmware that needs to be loaded before the fourth firmware can be loaded during the startup process of the communication terminal.

本发明实施例提供的固件的更新方法、芯片以及通信终端,能使通信终端依靠自身和网络端的交互即能实现自身固件的更新,摆脱通过PC机升级来终端内需要升级的固件的依赖,同时增加了更新或升级的安全性以及可靠性。The firmware update method, chip, and communication terminal provided by the embodiments of the present invention can enable the communication terminal to realize its own firmware update by relying on the interaction between itself and the network end, and get rid of the dependence of the firmware that needs to be upgraded in the terminal through the PC upgrade, and at the same time Increased security and reliability of updates or upgrades.

附图说明 Description of drawings

图1为本发明一实施例的方法流程示意图;Fig. 1 is the schematic flow chart of the method of an embodiment of the present invention;

图2为本发明一实施例的双核固件构架示意图;Fig. 2 is a schematic diagram of a dual-core firmware framework according to an embodiment of the present invention;

图3为本发明一实施例的方法流程示意图;Fig. 3 is a schematic flow chart of a method according to an embodiment of the present invention;

图4为本发明一实施例芯片结构示意图;4 is a schematic diagram of a chip structure according to an embodiment of the present invention;

图5本发明一实施例芯片结构示意图;Fig. 5 is a schematic diagram of chip structure according to an embodiment of the present invention;

图6为本发明一实施例芯片结构示意图。FIG. 6 is a schematic diagram of a chip structure according to an embodiment of the present invention.

具体实施方式 detailed description

为了使本发明实施例的目的、技术方案和优点更加清楚明白,下面结合实施例和附图,对本发明实施例做进一步详细地说明。在此,本发明的示意性实施例及说明用于解释本发明,但并不作为对本发明的限定。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below in conjunction with the embodiments and the accompanying drawings. Here, the exemplary embodiments and descriptions of the present invention are used to explain the present invention, but not to limit the present invention.

本发明主要提供一种通信终端尤其是智能终端的固件升级方法,以及采用这种方法的终端,减少对个人计算机来进行智能终端固件升级的依赖,加速终端的新功能新服务的采用,提高修理、服务以及解决故障的效率,同时能延长终端的使用寿命,提高用户的使用满意度。The present invention mainly provides a method for upgrading the firmware of a communication terminal, especially an intelligent terminal, and a terminal using this method, which reduces the dependence on a personal computer for upgrading the firmware of an intelligent terminal, accelerates the adoption of new functions and services of the terminal, and improves maintenance efficiency. , service and troubleshooting efficiency, while prolonging the service life of the terminal and improving user satisfaction.

参见图1,本发明提供了一种固件更新的方法实施方式,适用于通信终端,包括:Referring to Fig. 1, the present invention provides a method implementation of firmware update, applicable to communication terminals, including:

通信终端获知第二固件需要更新;The communication terminal learns that the second firmware needs to be updated;

通信终端下载所述第二固件更新需要的更新数据;The communication terminal downloads the update data required for the second firmware update;

通信终端将预定标志位设置为第二值;The communication terminal sets the predetermined flag bit as the second value;

通信终端再次启动时,第一固件获知预定标志位为第二值后,确定更新数据在第二固件中的写入位置,并将第二固件更新需要的更新数据写入位置,实现第二固件的更新;When the communication terminal starts up again, after the first firmware learns that the predetermined flag bit is the second value, it determines the write position of the update data in the second firmware, and writes the update data required by the second firmware update into the position to realize the second firmware update. update;

第二固件更新成功后,第一固件将预定标志位设置为第一值;After the second firmware is successfully updated, the first firmware sets the predetermined flag to the first value;

其中,第一固件为固件更新模块,第二固件包括:操作系统内核。Wherein, the first firmware is a firmware update module, and the second firmware includes: an operating system kernel.

下面以智能移动终端采用的高通双处理器芯片QSD7xxx和QSD8xxx系列芯片举例说明本发明提供的下述实施例。该芯片为双处理器(简称为双核)芯片,由基带处理器(BasebandProcessor,BP)与应用处理器(ApplicationProcessor,AP)双处理器构成。如图2所示,芯片由ARM9(BP)和ARM11(AP)两个处理器构成,这两个处理器通过共享内存(SharedMemory)来实现交互。ARM9负责处理通信协议、射频、通用输入/输出(GPIO)等。ARM11负责常见任务,运行的操作系统内核为Linux,装载在ARM11的LINUX固件上,操作系统Android由LINUX固件调用,装载在ANDROID固件上。ARM11由ARM9调用而加载,ARM9即通常意义上的主控芯片。下面对照图2,将高通QSD8系芯片的主要固件大致介绍如下:The following embodiments provided by the present invention will be described below by taking Qualcomm dual-processor chips QSD7xxx and QSD8xxx series chips adopted by smart mobile terminals as examples. The chip is a dual-processor (abbreviated as dual-core) chip, consisting of a baseband processor (Baseband Processor, BP) and an application processor (Application Processor, AP) dual processors. As shown in Figure 2, the chip is composed of two processors, ARM9 (BP) and ARM11 (AP), and the two processors interact through shared memory (SharedMemory). The ARM9 handles communication protocols, radio frequency, general-purpose input/output (GPIO), and more. ARM11 is responsible for common tasks, the running operating system kernel is Linux, which is loaded on the LINUX firmware of ARM11, and the operating system Android is called by the LINUX firmware and loaded on the ANDROID firmware. ARM11 is loaded by calling ARM9, and ARM9 is the main control chip in the usual sense. Referring to Figure 2 below, the main firmware of the Qualcomm QSD8 series chip is roughly introduced as follows:

PBL(PrimaryBootLoader)即基本启动加载器:位于ARM9,处于板载只读内存(Read-OnlyMemory,ROM)中,存有终端启动的最初代码,负责加载下述DBL,一般无需更新。PBL (Primary Boot Loader) is the basic boot loader: located in ARM9, in the onboard read-only memory (Read-Only Memory, ROM), which stores the initial code for terminal startup, responsible for loading the following DBL, and generally does not need to be updated.

DBL(DeviceBootLoader)即设备启动加载器:位于ARM9,采用通过读取闪存flash将下述OSBL、FSBL加载到随机存取存储器(randomaccessmemory,RAM)中的方式,进行终端初始化的基本设备配置,一般无需更新。DBL (DeviceBootLoader) is the device boot loader: located in ARM9, the following OSBL and FSBL are loaded into the random access memory (random access memory, RAM) by reading the flash memory flash, and the basic device configuration for terminal initialization is generally not required. renew.

FSBL(Fail-safeBootLoader)即启动出错恢复加载器:位于ARM9,用于对终端启动中的出错的恢复,并加载下述OSBL,一般无需更新。有些厂商的处理器芯片没有单独的FSBL,其功能由DBL来完成。FSBL (Fail-safeBootLoader) is the boot error recovery loader: located in ARM9, it is used to recover the error during terminal startup, and loads the following OSBL, generally no update is required. The processor chips of some manufacturers do not have a separate FSBL, and its functions are completed by the DBL.

OSBL(OperatingSystemBootLoader)即操作系统启动加载器:位于ARM9,用于加载下述ADSP,AMSS,APPSBL,以及实现ARM9处理器端SD卡升级,验证校验和以及调用开机logo的显示等。OSBL (Operating System Boot Loader) is the operating system boot loader: located in ARM9, it is used to load the following ADSP, AMSS, APPSBL, and realize the SD card upgrade of the ARM9 processor side, verify the checksum and call the display of the boot logo, etc.

APPSBL(Applicationsystembootloader)应用系统启动加载器:位于ARM11,是ARM11处理器的加载器,用来实现ARM11处理器端SD卡升级,以及加载操作系统内核(KERNEL)等。在本处理器芯片中,操作系统内核为LINUX。APPSBL (Applicationsystembootloader) application system boot loader: located in ARM11, it is the loader of the ARM11 processor, used to upgrade the SD card on the ARM11 processor side, and load the operating system kernel (KERNEL), etc. In this processor chip, the operating system kernel is LINUX.

ADSP:位于ARM9端,是ARM9端的数字信号处理器(DigitalSignalProcessing,DSP),终端启动时受上述OSBL的加载。ADSP: Located on the ARM9 side, it is a digital signal processor (Digital Signal Processing, DSP) on the ARM9 side, and is loaded by the above-mentioned OSBL when the terminal starts.

AMSS(AdvancedMobileSubscriberSoftware):位于ARM9端,是处理器ARM9的操作系统(OperatingSystem,OS),终端启动时受上述OSBL的加载。AMSS (Advanced Mobile Subscriber Software): Located on the ARM9 side, it is the operating system (Operating System, OS) of the processor ARM9, and is loaded by the above-mentioned OSBL when the terminal starts.

LINUX(linuxkernel):位于ARM11端,是处理器ARM11的操作系统内核,终端启动时受上述APPSBL的加载。LINUX (linuxkernel): Located on the ARM11 side, it is the operating system kernel of the processor ARM11. When the terminal starts, it is loaded by the above APPSBL.

ANDROID(androidsystem):ARM11核的操作系统,终端启动时受上述LINUX的加载。ANDROID (androidsystem): ARM11 core operating system, the terminal is loaded by the above-mentioned LINUX when it starts.

各固件在终端启动过程中的调用顺序如图2中的箭头线所示,基带处理器(BP)上的OSBL加载与之同核的ADSP、AMSS,以及应用处理器(AP)的APPSBL,实现跨核(处理器)加载。The call sequence of each firmware in the terminal startup process is shown by the arrow line in Figure 2. The OSBL on the baseband processor (BP) loads the ADSP and AMSS of the same core as it, and the APPSBL of the application processor (AP) to realize Cross-core (processor) loading.

图2还包含一个名为Fota_ua的固件更新模块,即固件无线更新(FirmwareOver-the-Air,FOTA)的更新代理(updateagent),位于ARM11端的LINUX上,用于对固件进行更新,在终端启动时受上述APPSBL的加载。在现有技术中,由于固件更新模块本身位于LINUX上,所以只能由LINUX实现对其加载的ANDROID的更新,而其他需要更新的固件,如AMSS、ADSP,以及LINUX本身等固件,因并非由LINUX加载(LINUX也无法实现自身更新,只能借助PC机实现其更新),所以则无法通过LINUX对其进行更新,即无法实现直接通过移动终端完成这些固件的更新。Figure 2 also includes a firmware update module named Fota_ua, which is an update agent (updateagent) of firmware over-the-air (FOTA), which is located on the LINUX of the ARM11 side and used to update the firmware. When the terminal starts Subject to loading by APPSBL above. In the prior art, since the firmware update module itself is located on LINUX, it can only be updated by LINUX for the loaded ANDROID, and other firmware that needs to be updated, such as AMSS, ADSP, and firmware such as LINUX itself, are not provided by LINUX loads (LINUX also can't realize self-update, can only realize its update by means of PC), so then can't update it by LINUX, promptly can't realize directly completing the update of these firmwares by mobile terminal.

在本发明的一个实施例中,将固件更新模块单独作为一固件来实现对其他固件的更新,第一固件即固件更新模块为Fota-ua(以下简称Fota),操作系统内核为LINUX,其加载的操作系统固件为ANDROID(对应的操作系统为Android软件系统)。In one embodiment of the present invention, the firmware update module is used as a firmware alone to realize the update of other firmware, the first firmware is the firmware update module is Fota-ua (hereinafter referred to as Fota), and the operating system kernel is LINUX, which loads The firmware of the operating system is ANDROID (the corresponding operating system is the Android software system).

通信终端获知LINUX需要更新,则下载LINUX需要更新所需要的更新数据,并将预定标志位设置为某一特定值,用于表示LINUX需要更新。在终端再次启动过程中,加载至Fota处,Fota读取该预定标志位的值,获知LINUX需要更新,于是确定上述更新数据在LINUX中的写入位置,并将上述更新数据写入该位置来实现对LINUX的更新。如果写入成功,Fota将该预定标志位设置为另一特定值,标识LINUX的更新成功。When the communication terminal learns that LINUX needs to be updated, it downloads the update data required for LINUX to be updated, and sets the predetermined flag bit to a specific value, which is used to indicate that LINUX needs to be updated. In the process of restarting the terminal, it is loaded to Fota, and Fota reads the value of the predetermined flag, and knows that LINUX needs to be updated, so it determines the writing position of the above-mentioned update data in LINUX, and writes the above-mentioned update data into this position. Implement updates to LINUX. If the writing is successful, Fota sets the predetermined flag bit to another specific value, indicating that the update of LINUX is successful.

上述通信终端获知LINUX需要更新,是当LINUX有了更新版本时,由服务器端得到最新版本并以无线广播的方式通知所有通信终端(如果是固定连接方式的通信终端,则通过固网线路进行通知)而获知。服务器端可以将LINUX的最新版本以及其之前版本分别的镜像或数据,利用预定算法制作两个版本的镜像或数据的差分包,并进行保存。The above-mentioned communication terminals know that LINUX needs to be updated. When LINUX has an updated version, the server side obtains the latest version and notifies all communication terminals in the form of wireless broadcast (if it is a communication terminal of a fixed connection mode, it is notified by a fixed network line) ) and learned. The server side can take the latest version of LINUX and the images or data of its previous versions respectively, use a predetermined algorithm to make a difference package of the images or data of the two versions, and save them.

最新版本较之前的版本相比,可能是升级版本,也可能因之前版本的某些错误而需要还原成的旧版本,所以上述更新可以是升级或是还原。而利用预定算法制作出的两个版本的差分包即增量数据,可以是直接增加的数据或者覆盖至部分原数据所在位置的数据,或者两者都包含。使用的预定算法上述不同的更新情况,可以为任何已知的增量数据算法或还原算法等,比如服务器端可使用Redband提供的算法及工具来制作镜像差分包。Compared with the previous version, the latest version may be an upgraded version, or it may be an old version that needs to be restored due to some errors in the previous version, so the above-mentioned update can be an upgrade or a restoration. The difference package of the two versions produced by a predetermined algorithm, that is, the incremental data, may be directly added data or data covering part of the original data, or both. The predetermined algorithm used for the above-mentioned different update situations can be any known incremental data algorithm or restoration algorithm, etc. For example, the server side can use the algorithm and tools provided by Redband to create a mirrored differential package.

服务器端也可以不制作差分包,而是直接保存新版本的全部内容,以供通信终端直接下载新版本的全部数据,确定LINUX上的覆盖位置,将新版本的数据直接覆盖在LINUX上。但此方式使终端下载的数据量较大,更新的速度也较慢,尤其对使用无线网络的移动终端和内存较小的终端,使用差分包的写入方式更具优势。The server side can also not make a differential packet, but directly save all the contents of the new version, so that the communication terminal can directly download all the data of the new version, determine the coverage position on the LINUX, and directly cover the data of the new version on the LINUX. However, this method causes a large amount of data downloaded by the terminal and a slow update speed. Especially for mobile terminals using wireless networks and terminals with small memory, it is more advantageous to use the differential packet writing method.

上述通信终端获知LINUX需要更新,是通过操作系统固件(即ANDROID)中的文件系统(FileSystem,FS)单元检测到服务器端有固件(此例中为LINUX)需要更新,FS单元于是下载上述镜像差分包(此例中以服务器端存有镜像差分包为例),并将其存入通信终端的预定区域中,预定区域如nand(一种闪存)的特定分区内,或者emmc卡(一种内嵌式存储器,常用于移动终端)上。或者也可以由ANDROID上运行的一软件来检测服务器端是否有固件更新的差分包,检测到有差分包之后通知FS单元进行下载,或该软件直接下载至通信终端。The above-mentioned communication terminal knows that LINUX needs to be updated, and the file system (FileSystem, FS) unit in the operating system firmware (ie ANDROID) detects that there is firmware (in this example, LINUX) that needs to be updated on the server side, and the FS unit then downloads the above-mentioned image difference package (in this example, take the mirrored differential package stored on the server side as an example), and store it in a predetermined area of the communication terminal, such as a specific partition of nand (a flash memory), or an emmc card (a type of memory Embedded memory, often used in mobile terminals). Alternatively, a software running on the ANDROID can also be used to detect whether there is a differential packet for firmware update on the server side, and after detecting a differential packet, notify the FS unit to download, or the software can be directly downloaded to the communication terminal.

FS单元下载了LINUX更新需要的镜像差分包后,在一状态信息文件中写入LINUX需要更新的标识,然后重启终端;该状态信息文件可以为固件更新状态标识,此处称为标志位FOTA_FLAG,可被DBL、FSBL(该固件存在时)以及Fota以及LINUX所读取。LINUX需要更新的标识即为上述第二值,这里假设为2(此处仅为举例,比如可用二进制数0010代表)。标志位FOTA_FLAG的初始值假设为1(二进制数0001,即上述第一值),初始值表示终端中各固件均无需进行更新。After the FS unit downloads the image differential package required for LINUX update, write the logo that LINUX needs to update in a status information file, and then restart the terminal; Readable by DBL, FSBL (when this firmware exists), Fota and LINUX. The flag that LINUX needs to update is the above-mentioned second value, which is assumed to be 2 here (here is only an example, for example, it can be represented by the binary number 0010). The initial value of the flag bit FOTA_FLAG is assumed to be 1 (binary number 0001, that is, the above-mentioned first value), and the initial value indicates that each firmware in the terminal does not need to be updated.

在终端再次启动的过程中,DBL读取标志位FOTA_FLAG的值,获知需要更新的固件为LINUX,于是无需进行特别处理,对基本设备配置进行加载,维持正常的加载顺序,使终端逐步加载至APPSBL。上述DBL读取标志位FOTA_FLAG的值也可由FSBL来进行,只是由于一些芯片产品不具有单独的FSBL,本处仅以DBL来读取标志位FOTA_FLAG的值进行描述。由于无需在终端再次启动的过程中作特别处理,所以DBL和FSBL对标志位FOTA_FLAG的读取并非实现由Fota对LINUX进行更新的必要步骤。APPSBL加载Fota后,Fota读取标志位FOTA_FLAG的值,即获知LINUX需要更新,于是首先确认上述镜像差分包中的数据在LINUX中的写入位置,然后利用RedBend算法写入该位置来实现对LINUX的更新。During the restart process of the terminal, DBL reads the value of the flag bit FOTA_FLAG, and knows that the firmware to be updated is LINUX, so no special processing is required, and the basic device configuration is loaded, and the normal loading sequence is maintained, so that the terminal is gradually loaded to APPSBL . The value of the flag bit FOTA_FLAG read by the above DBL can also be performed by the FSBL, but because some chip products do not have a separate FSBL, only the DBL is used to read the value of the flag bit FOTA_FLAG for description. Since there is no need for special processing in the process of restarting the terminal, the reading of the flag bit FOTA_FLAG by DBL and FSBL is not a necessary step to update LINUX by Fota. After APPSBL loads Fota, Fota reads the value of the flag bit FOTA_FLAG, that is, it knows that LINUX needs to be updated, so first confirms the writing position of the data in the above mirror differential package in LINUX, and then uses the RedBend algorithm to write to this position to realize the LINUX update.

完成上述写入后,即更新成功后,Fota在标志位FOTA_FLAG中写入完成标志,该完成标志可以专门标识对LINUX的更新成功(即其他固件的更新成功使用其他值),也可以直接恢复到初始值1(上述第一值),因初始值标识没有固件需要更新,而LINUX的更新已经完成,且没有其他固件同时需要更新时(一般很少出现几个固件同时需要更新的情况),亦可用初始值表示LINUX已经更新完成。Fota不只可进行固件的无线更新,在有线更新时Fota同样可使用本申请中描述的更新方式,实现对固件的更新。After the above writing is completed, that is, after the update is successful, Fota writes the completion flag in the flag bit FOTA_FLAG. The completion flag can specifically identify the success of the update to LINUX (that is, other firmware updates successfully use other values), or it can be directly restored to The initial value is 1 (the first value above), because the initial value indicates that there is no firmware to be updated, and the update of LINUX has been completed, and when no other firmware needs to be updated at the same time (generally, it is rare that several firmwares need to be updated at the same time), the Available initial values indicate that LINUX has been updated. Fota can not only update the firmware wirelessly, but Fota can also use the update method described in this application to update the firmware during wired update.

在一个具体实施例中,通信终端下载上述第二固件更新需要的更新数据包括:通信终端对第二固件更新需要的更新数据进行验证,并将通过验证的更新数据存入预定位置;In a specific embodiment, the communication terminal downloading the update data required for the second firmware update includes: the communication terminal verifies the update data required for the second firmware update, and stores the verified update data in a predetermined location;

将所述第二固件更新需要的更新数据写入所述写入位置包括:从所述预定位置获得第二固件更新需要的更新数据,并将第二固件更新需要的更新数据写入所述写入位置。Writing the update data required for the second firmware update into the write location includes: obtaining the update data required for the second firmware update from the predetermined location, and writing the update data required for the second firmware update into the write location. into position.

终端ANDROID上的FS单元下载了镜像差分包之后,可以直接存入预定区域,也可以下载后先缓存并进行验证,比如对服务器端即信息发布者进行识别,是否是伪造身份的信息发布者(比如LINUX镜像差分包并非由官方发布)。当验证通过后,再将镜像差分包写入预定区域。而后续的更新步骤中,Fota将通过验证,并保存在该预定区域中的LINUX更新需要的差分包进行读取和写入。After the FS unit on the terminal ANDROID downloads the image difference package, it can be directly stored in the predetermined area, or it can be cached and verified after downloading, such as identifying the server side, that is, the information publisher, whether it is a fake identity information publisher ( For example, the LINUX image differential package is not officially released). After the verification is passed, the mirror differential packet is written into the predetermined area. In the subsequent update steps, Fota will pass the verification and store the differential packets required for LINUX update in the predetermined area for reading and writing.

在另一个具体实施例中,FS单元将LINUX的镜像差分包写入nand的特定分区,并对FOTA_FLAG设置LINUX需要更新的标识值后,可以直接引导终端进入再次启动状态,也可先通过显示提示消息,询问是否重启终端,如果用户选择跳过更新环节,则标志位FOTA_FLAG标识LINUX需要更新的标志位的值保留为2,LINUX更新需要的镜像差分包也保留在nand的特定分区中,继续使用终端中当前版本的LINUX,直至终端下次启动时,由Fota读取该标志位时,再进行LINUX的更新。In another specific embodiment, after the FS unit writes the LINUX image difference package into the specific partition of nand, and sets the flag value that LINUX needs to update for FOTA_FLAG, it can directly guide the terminal to enter the restart state, or first display the prompt message, asking whether to restart the terminal, if the user chooses to skip the update link, the value of the flag bit FOTA_FLAG indicating that LINUX needs to be updated is kept as 2, and the image difference package required for LINUX update is also kept in the specific partition of nand, continue to use The current version of LINUX in the terminal will not be updated until Fota reads the flag when the terminal is started next time.

在另一个实施例中,Fota自己本身不直接读取标志位FOTA_FLAG的值。接上述FS下载完LINUX更新需要的差分包,并将通信终端再次启动时,第一固件获知预定标志位为第二值包括:In another embodiment, Fota itself does not directly read the value of the flag bit FOTA_FLAG. After the above-mentioned FS downloads the differential package needed for LINUX update, and restarts the communication terminal, the first firmware learns that the predetermined flag bit is the second value including:

由第三固件获知预定标志位设置为第二值后,调用所述第一固件,使所述第一固件获知所述预定标志位为第二值;After the third firmware learns that the predetermined flag is set to the second value, the first firmware is called to make the first firmware know that the predetermined flag is the second value;

其中,所述第三固件为,在所述通信终端启动过程中,直接加载所述第一固件的固件。Wherein, the third firmware is firmware that directly loads the first firmware during the startup process of the communication terminal.

上述的第三固件为APPSBL,它在终端启动过程中对Fota进行加载。APPSBL加载后,读取标志位FOTA_FLAG的值为2,即获知LINUX需要更新,于是加载Fota时通知标志位FOTA_FLAG的值为2(在Fota中存有标志位FOTA_FLAG的值与其标识内容的对照表),或直接通知LINUX需要更新,使得Fota通过确定LINUX的更新数据写入位置并在该位置进行更新数据的写入,来完成对LINUX的更新。The above-mentioned third firmware is APPSBL, which loads Fota during terminal startup. After APPSBL is loaded, read the value of the flag FOTA_FLAG to 2, that is, it knows that LINUX needs to be updated, so when loading Fota, it notifies the value of the flag FOTA_FLAG to 2 (the comparison table between the value of the flag FOTA_FLAG and its identification content is stored in Fota) , or directly notify LINUX that it needs to be updated, so that Fota completes the update of LINUX by determining the location where LINUX update data is written and writing update data at this location.

在另一个实施例中,通信终端包括含有第一核和第二核的处理器,第一固件位于第二核,操作系统内核位于第二核;而第二固件进一步包括:位于第一核的固件。In another embodiment, the communication terminal includes a processor including a first core and a second core, the first firmware is located in the second core, and the operating system kernel is located in the second core; and the second firmware further includes: a processor located in the first core firmware.

在这个实施例中,第二固件还包含ADSP和AMSS。第一固件Fota和操作系统内核LINUX位于第二核即ARM11中,而ADSP和AMSS均位于第一核即ARM9中。Fota不但能更新与其同核(即位于同一个处理器,以下简称同核)的固件LINUX,还能跨核更新ARM9中的固件ADSP和AMSS。因为两核之间通过共享内存来进行交互,所以由ANDROID的FS单元下载的ADSP或者AMSS更新需要的差分包(为方便描述,下文均以写入差分数据为例来实现固件更新)存入nand的特定分区,是可以被Fota用于向与其处在不同核的ADSP或AMSS进行写入来实现更新的。此例中nand的特定分区,与前例中nand的特定分区可以共用同一个特定分区,通过差分包上的标识信息来区别分区中的差分包属于哪一个固件,也可以使LINUX、ADSP以及AMSS更新需要的差分包分别存入不同的nand的特定分区,从分区的位置即能识别存入的差分包属于哪一固件。在Fota对ADSP或AMSS的相应位置成功写入差分包之后,反馈给OSBL,让OSBL重新调用更新后的ADSP或AMSS进入内存。In this embodiment, the second firmware also contains ADSP and AMSS. The first firmware Fota and the operating system kernel LINUX are located in the second core, namely ARM11, and both ADSP and AMSS are located in the first core, namely ARM9. Fota can not only update the firmware LINUX with the same core (that is, located in the same processor, hereinafter referred to as the same core), but also update the firmware ADSP and AMSS in ARM9 across cores. Because the two cores interact through shared memory, the differential package required for ADSP or AMSS update downloaded by the FS unit of ANDROID (for the convenience of description, the following uses writing differential data as an example to realize firmware update) is stored in nand The specific partition can be used by Fota to write to ADSP or AMSS in a different core to achieve update. The specific partition of nand in this example and the specific partition of nand in the previous example can share the same specific partition. The identification information on the differential package can be used to distinguish which firmware the differential package in the partition belongs to, and it can also update LINUX, ADSP and AMSS The required differential packets are stored in specific partitions of different nands, and it can be identified which firmware the stored differential packets belong to from the location of the partitions. After Fota successfully writes the differential packet to the corresponding position of ADSP or AMSS, it will feed back to OSBL, so that OSBL will re-call the updated ADSP or AMSS to enter the memory.

上述实施例中的标志位FOTA_FLAG的值为2仅标识LINUX需要更新(即一具体固件需要更新),ADSP和AMSS需要更新的标志位可以设置为其他值(比如二进制数0011和0100),使得Fota读取标志位FOTA_FLAG时即获知哪一具体固件需要更新。在一个可替代的实施例中,标志位FOTA_FLAG的值为2也可标识LINUX、ADSP或AMSS中的任一个或多个固件需要更新,因为这几种固件的更新方式大致相同,可归位一类固件。由于更新数据(差分包)中携带了不同固件的标识信息,Fota在读取标志位FOTA_FLAG获知是哪一类固件需要更新后,可根据更新数据中的这些标识信息,来判断是哪个具体固件需要更新,这样使标志位变得简单,比如仅需8位二进制即1个Byte来设置标志位的长即可,本文后续的实施例均以此方式来举例描述。LINUX、ADSP与AMSS中两个或三个固件同时需要更新的场景很少,即使遇到此种场景,Fota从差分包中的标识信息中获知所有需要更新的此类固件,只有在所有需要更新的此类固件都成功获得更新后,Fota才会将标志位FOTA_FLAG的值设置为第一值(如初始值1)。The value of the flag bit FOTA_FLAG in the above-described embodiment is 2 and only indicates that LINUX needs to be updated (that is, a specific firmware needs to be updated), and the flag bit that ADSP and AMSS need to update can be set to other values (such as binary numbers 0011 and 0100), so that Fota When the flag bit FOTA_FLAG is read, it is known which specific firmware needs to be updated. In an alternative embodiment, the value of the flag bit FOTA_FLAG is 2, and any one or more firmwares in LINUX, ADSP or AMSS need to be updated, because the update methods of these several firmwares are roughly the same, and can be reset to one class firmware. Since the update data (differential packet) carries identification information of different firmware, Fota can determine which specific firmware needs to be updated according to the identification information in the update data after reading the flag bit FOTA_FLAG to know which type of firmware needs to be updated. Update, this makes the flag bit easier, for example, only 8-bit binary, that is, 1 Byte, is needed to set the length of the flag bit, and the subsequent embodiments of this paper are all described in this way. There are few scenarios where two or three firmwares in LINUX, ADSP, and AMSS need to be updated at the same time. Only after such firmwares of all the firmwares are successfully updated, Fota will set the value of the flag bit FOTA_FLAG to the first value (such as the initial value 1).

在另一个实施例中,上述第二固件更新成功后,第一固件将预定标志位设置为第一值具体包括:In another embodiment, after the above-mentioned second firmware update is successful, the first firmware setting the predetermined flag bit to the first value specifically includes:

第二固件更新成功后,将预定标志位设置为第三值;After the second firmware update is successful, the predetermined flag is set to a third value;

操作系统内核判断操作系统内核对应的操作系统是否需要更新;The operating system kernel judges whether the operating system corresponding to the operating system kernel needs to be updated;

如果需要更新,操作系统内核对操作系统进行更新,在更新成功后,通知第一固件;If an update is required, the operating system kernel updates the operating system, and notifies the first firmware after the update is successful;

第一固件将预定标志位设置为第一值。The first firmware sets a predetermined flag bit to a first value.

在一个具体实施例中,FS单元从服务器端下载的固件更新数据包含LINUX、ADSP和/或AMSS更新需要的差分包,以及ANDROID更新需要的差分包。当然,ADSP和/或AMSS与ANDROID同时需要更新的场景很少,只在个别情况下,LINUX与ANDROID同时需要更新。在只有一个标志位FOTA_FLAG的情况下,标志位FOTA_FLAG的值被设置为2,用来指示LINUX、ADSP和/或AMSS需要更新,此时Fota无法获知ANDROID是否也需要更新。在这个实施例中,LINUX、ADSP和/或AMSS更新成功后,Fota先将标志位FOTA_FLAG由2改为3,然后通知LINUX,由LINUX判断ANDROID是否需要更新。如果ANDROID不需要更新,则LINUX将标志位FOTA_FLAG改为1(0001)。1为初始状态,即没有任何固件需要更新或所有固件更新成功。如果ANDROID需要更新,则LINUX确定差分包在ANDROID中的写入位置,并将差分包写入这个位置,完成对ANDROID的更新。In a specific embodiment, the firmware update data downloaded by the FS unit from the server includes differential packets required for updating LINUX, ADSP and/or AMSS, and differential packets required for updating ANDROID. Of course, there are very few scenarios where ADSP and/or AMSS and ANDROID need to be updated at the same time. Only in individual cases, LINUX and ANDROID need to be updated at the same time. In the case of only one flag FOTA_FLAG, the value of the flag FOTA_FLAG is set to 2, which is used to indicate that LINUX, ADSP and/or AMSS need to be updated. At this time, Fota cannot know whether ANDROID also needs to be updated. In this embodiment, after LINUX, ADSP and/or AMSS are successfully updated, Fota first changes the flag bit FOTA_FLAG from 2 to 3, and then notifies LINUX to determine whether ANDROID needs to be updated. If ANDROID does not need to be updated, LINUX will change the flag bit FOTA_FLAG to 1 (0001). 1 is the initial state, that is, no firmware needs to be updated or all firmware updates are successful. If the ANDROID needs to be updated, then LINUX determines the write position of the differential package in the ANDROID, and writes the differential package into this position to complete the update of the ANDROID.

在上述实施例基础上的一个较优实施例中,在将预定标志位设置为第三值后,在第一固件将预定标志位设置为第一值前,该固件更新方法进一步包括:In a preferred embodiment based on the above embodiments, after the predetermined flag bit is set to the third value, before the first firmware sets the predetermined flag bit to the first value, the firmware update method further includes:

如果通信终端再次启动时,第二固件获知预定标志位为第三值,返回对操作系统进行更新的步骤。If the communication terminal starts up again, the second firmware learns that the predetermined flag bit is the third value, and returns to the step of updating the operating system.

通过标志位FOTA_FLAG来获知终端的哪个或哪类固件需要更新,能在本次更新失败的情况下,在下次启动过程中迅速定位到需要更新的固件并再次进行该固件的更新。The flag bit FOTA_FLAG is used to know which or which type of firmware of the terminal needs to be updated. If the current update fails, the firmware that needs to be updated can be quickly located during the next startup process and the firmware can be updated again.

在上述这些实施例中,在Fota对LINUX、ADSP或AMSS进行更新时,Fota确定差分包在LINUX、ADSP或AMSS中的写入位置后,将差分包在该位置进行写入时出现故障(包括终端掉电),致使终端再次启动,由于标志位FOTA_FLAG的值仍为2,终端再次启动过程中,Fota从标志位FOTA_FLAG的值获知LINUX、ADSP或AMSS的此类固件需要更新,则将在上次更新过程中已经确定的LINUX、ADSP或AMSS更新数据的写入位置中,再次写入相应的更新数据,实现对LINUX、ADSP或AMSS的更新。更新成功后,Fota将标志位FOTA_FLAG的值设置回初始值。如果本次更新仍遇到故障,则在下一次启动过程中,继续上述对LINUX、ADSP或AMSS的更新。In the above-mentioned embodiments, when Fota updates LINUX, ADSP or AMSS, after Fota determines the write position of the differential package in LINUX, ADSP or AMSS, a failure occurs when the differential package is written in this position (including The terminal is powered off), causing the terminal to start again. Since the value of the flag bit FOTA_FLAG is still 2, during the restart process of the terminal, Fota learns from the value of the flag bit FOTA_FLAG that the firmware of LINUX, ADSP or AMSS needs to be updated, and will update the In the write position of the LINUX, ADSP or AMSS update data determined in the second update process, write the corresponding update data again to realize the update of LINUX, ADSP or AMSS. After the update is successful, Fota will set the value of the flag bit FOTA_FLAG back to the initial value. If this update still encounters failures, continue the above-mentioned update of LINUX, ADSP or AMSS during the next startup process.

在上述Fota将标志位FOTA_FLAG设置为3之后,如果LINUX判断,ANDROID需要更新,于是对ANDROID进行更新。当LINUX对ANDROID的更新过程出现故障,所以LINUX还未将标志位FOTA_FLAG的值设置为1时,终端因更新故障而再次启动,标志位FOTA_FLAG的值被保留为3。在再次启动的过程中,Fota读到标志位FOTA_FLAG的值为3,则获知ANDROID需要更新,于是直接通知LINUX对ANDROID进行更新。在LINUX对ANDROID更新成功后,标志位FOTA_FLAG的值被设置为1,如果LINUX对ANDROID的更新再次失败,仍会继续上述终端再次启动、以及Fota读到标志位FOTA_FLAG的值为3,并通知LINUX对ANDROID进行更新的步骤。After the above-mentioned Fota sets the flag bit FOTA_FLAG to 3, if LINUX judges that ANDROID needs to be updated, then update ANDROID. When the update process of LINUX to ANDROID fails, so LINUX has not set the value of the flag FOTA_FLAG to 1, and the terminal restarts due to the update failure, the value of the flag FOTA_FLAG is kept as 3. In the process of restarting, Fota reads that the value of the flag FOTA_FLAG is 3, and then knows that ANDROID needs to be updated, so it directly notifies LINUX to update ANDROID. After LINUX updates ANDROID successfully, the value of flag FOTA_FLAG is set to 1. If LINUX fails to update ANDROID again, the above terminal will continue to restart, and Fota reads the value of flag FOTA_FLAG as 3, and notifies LINUX Steps to update ANDROID.

前文描述中提到,通信终端需要更新的固件还包括OSBL、APPSBL以及Fota自身,针对于OSBL、APPSBL以及Fota自身需要更新时,如果仅采用上述实施例中的方法来实现终端自身对这些固件进行更新,在Fota对OSBL、APPSBL进行更新的过程中,如果出现故障致使OSBL、APPSBL损坏,由于OSBL、APPSBL加载成功后Fota才能加载,所以终端再次启动时无法恢复OSBL或APPSBL,则无法加载Fota来继续上次未完成的更新。另外,Fota对自身也无法进行更新。如图3所示,本发明实施例采用如下方式进行固件更新:As mentioned in the previous description, the firmware that needs to be updated by the communication terminal also includes OSBL, APPSBL, and Fota itself. When OSBL, APPSBL, and Fota need to be updated, if only the method in the above-mentioned embodiment is used to implement the terminal itself. Update, in the process of updating OSBL and APPSBL by Fota, if a fault occurs that causes damage to OSBL and APPSBL, Fota can only be loaded after OSBL and APPSBL are successfully loaded, so the OSBL or APPSBL cannot be restored when the terminal restarts, and Fota cannot be loaded to Continue the last incomplete update. In addition, Fota cannot update itself. As shown in Figure 3, the embodiment of the present invention uses the following method to update the firmware:

通信终端获知第五固件需要更新;The communication terminal learns that the fifth firmware needs to be updated;

通信终端下载第五固件更新需要的更新数据;The communication terminal downloads the update data required for the fifth firmware update;

通信终端将预定标志位设置为第四值;The communication terminal sets the predetermined flag bit as the fourth value;

通信终端再次启动时,第四固件获知预定标志位为第三值后,形成第五固件的备份固件,确定第五固件更新需要的更新数据在第五固件的备份固件中的第一写入位置,并将第五固件更新需要的更新数据写入第一写入位置,形成第五固件的备份更新固件;When the communication terminal starts up again, after the fourth firmware learns that the predetermined flag is the third value, it forms the backup firmware of the fifth firmware, and determines the first write position of the update data needed for the fifth firmware update in the backup firmware of the fifth firmware , and write the update data needed for the fifth firmware update into the first writing position, forming the backup update firmware of the fifth firmware;

第四固件确定第五固件中的第二写入位置,将备份更新固件中的数据,写入第二写入位置,实现第五固件的更新;The fourth firmware determines the second write location in the fifth firmware, and writes the data in the backup update firmware to the second write location to realize the update of the fifth firmware;

第五固件更新成功后,第四固件将预定标志位设置为第五值;After the fifth firmware is successfully updated, the fourth firmware sets the predetermined flag to the fifth value;

其中,第四固件为固件更新模块,第五固件为第四固件,和/或通信终端启动过程中,早于第四固件被调用的固件。Wherein, the fourth firmware is a firmware update module, the fifth firmware is the fourth firmware, and/or the firmware that is called earlier than the fourth firmware during the startup process of the communication terminal.

上述第五固件包括OSBL、APPSBL以及Fota自身,当然也可包含ADSP、AMSS以及LINUX,但对后三者的更新采用前文提到的多种实施例均可实现,所以下面仅描述OSBL、APPSBL以及Fota自身的更新方法。下面仍以服务器端制作镜像或数据的差分包并广播通知通信终端为例进行描述。The above-mentioned fifth firmware includes OSBL, APPSBL and Fota itself, and of course ADSP, AMSS and LINUX can also be included, but the update of the latter three can be realized by using the various embodiments mentioned above, so only OSBL, APPSBL and Fota's own update method. The following still takes the server side as an example to make a mirror image or a differential packet of data and broadcast to notify the communication terminal as an example.

在一个具体实施例中,通信终端通过FS单元或者ANDROID上运行一检测软件获知OSBL即上述第五固件需要升级(本例以固件升级为例),FS单元或检测软件(下文以FS单元为例)将OSBL更新需要的差分包下载至emmc卡上(当然也可存于nand的特定分区),将预定标志位(下以标志位FOTA_FLAG为例进行描述)的值设置为2(此处只为举例,比如2即二进制数0010,标识OSBL需要更新),即上述第四值。In a specific embodiment, the communication terminal runs a detection software on the FS unit or the ANDROID and learns that OSBL, that is, the above-mentioned fifth firmware needs to be upgraded (this example takes firmware upgrade as an example), and the FS unit or the detection software (hereinafter taking the FS unit as an example) ) Download the differential package required for OSBL update to the emmc card (of course, it can also be stored in a specific partition of nand), and set the value of the predetermined flag bit (the flag bit FOTA_FLAG is described below as an example) to 2 (here only for For example, for example, 2 is the binary number 0010, indicating that the OSBL needs to be updated), which is the fourth value above.

当终端再次启动时,上述第四固件即Fota通过读取标志位FOTA_FLAG的值为2而获知第五固件(OSBL)需要更新,遂在终端的预定区域内(比如RAM内)形成OSBL的备份固件,然后确定OSBL更新需要的差分包在OSBL的备份固件上的写入位置即第一写入位置,并将OSBL更新需要的差分包写入第一写入位置,对OSBL的备份固件进行升级。升级成功后即生成OSBL的备份更新固件。When the terminal starts up again, the above-mentioned fourth firmware, that is, Fota, knows that the fifth firmware (OSBL) needs to be updated by reading the value of the flag FOTA_FLAG to 2, and then forms a backup firmware of OSBL in a predetermined area of the terminal (such as in RAM) , and then determine the write position of the differential package required by the OSBL update on the backup firmware of the OSBL, i.e. the first write position, and write the differential package required by the OSBL update into the first write position, so as to upgrade the backup firmware of the OSBL. After the upgrade is successful, the OSBL backup will be generated to update the firmware.

此时Fota先确定OSBL的第二写入位置,将OSBL的备份更新固件写入该第二写入位置。一般来说,在该第二位置的写入,是对OSBL原始版本的覆盖,当覆盖成功时也就实现了OSBL的更新。覆盖成功后,Fota将标志位FOTA_FLAG的值恢复为1(初始值),即没有固件需要更新。因为OSBL已经成功更新,所以“没有固件需要更新”也可用来标识OSBL更新成功。At this time, Fota first determines the second writing position of the OSBL, and writes the backup update firmware of the OSBL into the second writing position. Generally speaking, writing in the second location is an overwriting of the original version of the OSBL, and when the overwriting succeeds, an update of the OSBL is realized. After overwriting is successful, Fota restores the value of the flag bit FOTA_FLAG to 1 (initial value), that is, no firmware needs to be updated. Since the OSBL has been successfully updated, "no firmware needs to be updated" can also be used to indicate that the OSBL has been successfully updated.

在另一个实施例中,通信终端获知Fota本身需要更新,在上述FS单元将Fota更新需要的差分包下载至emmc卡上,并将标志位FOTA_FLAG设置为2,此例中2标识OSBL、APPSBL以及Fota这一类固件需要更新,而具体哪一个固件需要更新,则可从差分包上的标识信息中获知。终端再次启动后,Fota从标志位FOTA_FLAG处获知自身需要更新,则在预定区域内(比如RAM内)形成Fota的备份固件,然后确定Fota更新需要的差分包在Fota的备份固件上的写入位置即第一写入位置,并将Fota更新需要的差分包写入第一写入位置,对Fota的备份固件进行升级,生成Fota的备份更新固件。然后,Fota确定自身的第二写入位置,使Fota的备份更新固件写入该第二写入位置。写入成功后,Fota将标志位FOTA_FLAG的值恢复为初始值1。In another embodiment, the communication terminal knows that Fota itself needs to be updated, and downloads the differential package needed for Fota update to the emmc card in the above-mentioned FS unit, and sets the flag bit FOTA_FLAG to 2, and 2 identifies OSBL, APPSBL and Firmware such as Fota needs to be updated, and which firmware needs to be updated can be known from the identification information on the differential package. After the terminal restarts, Fota learns that it needs to update itself from the flag bit FOTA_FLAG, then forms Fota's backup firmware in a predetermined area (such as in RAM), and then determines the writing position of the differential package required for Fota update on Fota's backup firmware That is, the first writing location, and write the differential packet needed for Fota update into the first writing location, upgrade the backup firmware of Fota, and generate the backup update firmware of Fota. Then, Fota determines its own second writing location, so that Fota's backup update firmware is written into the second writing location. After the writing is successful, Fota restores the value of the flag bit FOTA_FLAG to the initial value 1.

在一个较优实施例中,上述通信终端下载第五固件更新需要的更新数据具体为,通信终端对第五固件更新需要的更新数据进行验证,并将通过验证的第五固件更新需要的更新数据存入预定位置;In a preferred embodiment, the above-mentioned communication terminal downloading the update data required for the fifth firmware update specifically includes: the communication terminal verifies the update data required for the fifth firmware update, and updates the update data required for the fifth firmware update that has passed the verification deposit into a predetermined location;

将第五固件更新需要的更新数据写入第一写入位置包括:从预定位置获得第五固件更新需要的更新数据,并将第五固件更新需要的更新数据写入第一写入位置。Writing the update data required for the fifth firmware update into the first writing location includes: obtaining the update data required for the fifth firmware update from a predetermined location, and writing the update data required for the fifth firmware update into the first write location.

通信终端ANDROID上的FS单元下载了第五固件的镜像或数据差分包之后,可以直接存入预定区域,也可以下载后先缓存并进行验证,比如对服务器端即信息发布者进行识别,是否是伪造身份的信息发布者(比如OSBL的镜像或数据差分包并非由官方发布)。当验证通过后,再将上述镜像或数据差分包写入预定区域。而后续的更新步骤中,Fota将通过验证,并保存在该预定区域中的第五固件(比如OSBL)更新需要的差分包进行读取和写入。After the FS unit on the communication terminal ANDROID downloads the mirror image or data differential package of the fifth firmware, it can be directly stored in the predetermined area, or it can be cached and verified after downloading, such as identifying the server, that is, the information publisher, whether it is Information publishers who forge their identities (for example, OSBL's mirror image or data differential package is not officially released). After the verification is passed, the above-mentioned image or data differential package is written into the predetermined area. In the subsequent update step, Fota will pass the verification and read and write the differential package required for updating the fifth firmware (such as OSBL) stored in the predetermined area.

在一个具体实施例中,对标志位FOTA_FLAG进行设置之后,FS单元可以引导终端进入再次启动状态,也可先通过显示提示消息,询问是否重启终端,如果用户选择跳过更新环节,则标志位FOTA_FLAG的值保留为2,OSBL更新需要的镜像或数据差分包也保留在emmc卡上,直至终端下次启动时,由Fota读取到该标志位的值为2时,再行对OSBL进行升级。In a specific embodiment, after setting the flag bit FOTA_FLAG, the FS unit can guide the terminal to enter the restart state, or first ask whether to restart the terminal by displaying a prompt message. If the user chooses to skip the update link, the flag bit FOTA_FLAG The value of the flag is reserved as 2, and the image or data differential package required for OSBL update is also retained on the emmc card until the next startup of the terminal, when Fota reads the value of this flag as 2, and then upgrades the OSBL.

在另一个实施例中,上述第五固件更新需要的更新数据为第五固件更新需要的差分包;In another embodiment, the above-mentioned update data required for the fifth firmware update is a differential packet required for the fifth firmware update;

第四固件将第五固件更新需要的更新数据写入第一写入位置包括:第四固件使用预定算法将第五固件更新需要的差分包写入第一写入位置。Writing the update data required by the fifth firmware update into the first write location by the fourth firmware includes: the fourth firmware writes the differential packet required by the fifth firmware update into the first write location by using a predetermined algorithm.

在一个具体实施例中,更新数据为第五固件(比如APPSBL)新旧两个版本的镜像差分包(下述简称差分包),操作系统中的FS单元将差分包存入终端的预定区域后,Fota即第四固件先形成APPSBL的备份固件,利用预定算法确定APPSBL更新需要的固件在APPSBL的备份固件上的第一写入位置,来对差分包进行写入,形成APPSBL的备份更新固件。预定算法可以是任何已知的增量数据和对应的增量数据还原算法,如使用Redband提供的算法及工具。In a specific embodiment, the update data is the image differential package of the old and new versions of the fifth firmware (such as APPSBL) (hereinafter referred to as the differential package). After the FS unit in the operating system stores the differential package into a predetermined area of the terminal, Fota, that is, the fourth firmware, first forms the backup firmware of the APPSBL, and uses a predetermined algorithm to determine the first write position of the firmware required by the APPSBL update on the backup firmware of the APPSBL, to write the differential packet, and form the backup update firmware of the APPSBL. The predetermined algorithm can be any known incremental data and corresponding incremental data restoration algorithm, such as using the algorithm and tools provided by Redband.

与之可替代的实施例也可以是,终端直接下载APPSBL最新版本的全部内容,在对APPSBL的备份固件进行更新时,将最新版本完全覆盖在旧版本之上即可,即无需使用差分算法来确定差分包的写入位置和进行差分写入。An alternative embodiment may also be that the terminal directly downloads all the contents of the latest version of the APPSBL, and when updating the backup firmware of the APPSBL, it is enough to completely cover the latest version on the old version, that is, there is no need to use a differential algorithm to Determine the write location of the differential packet and perform differential write.

在上述更新过程中,第五固件经历了备份-更新-覆盖的环节,而其中任一环节如果出现故障,可使用标志位FOTA_FLAG来标明固件更新所处的状态,以便能在下一次启动过程中迅速定位到出现故障的环节来进行接续处理。即在更新(多数为升级)过程中出现任何失败或掉电等意外,Fota都能够根据FOTA_FLAG获知终端上次更新过程中停止在何种状态。In the above update process, the fifth firmware has gone through the links of backup-update-overwrite, and if any link fails, the flag bit FOTA_FLAG can be used to indicate the status of the firmware update, so that it can be quickly updated in the next startup process. Locate the link where the failure occurred for connection processing. That is, if there is any failure or power failure during the update (mostly upgrade), Fota can know what state the terminal stopped in the last update process according to FOTA_FLAG.

在另一具体实施例中,第四固件形成第五固件的备份固件之后,进一步包括如下步骤:第四固件将预定标志位设置为第六值;In another specific embodiment, after the fourth firmware forms the backup firmware of the fifth firmware, the following steps are further included: the fourth firmware sets the predetermined flag bit to the sixth value;

在第五固件更新成功之前,该方法进一步包括:Before the fifth firmware update is successful, the method further includes:

如果通信终端再次启动时,第四固件获知预定标志位为第六值,返回确定第五固件更新需要的更新数据在第五固件的备份固件中的第一写入位置的步骤。If the communication terminal starts up again, the fourth firmware learns that the predetermined flag is the sixth value, and returns to the step of determining the first write position of the update data needed for the fifth firmware update in the backup firmware of the fifth firmware.

仍以OSBL需要更新为例,在第四固件Fota形成第五固件OSBL的备份固件之后,Fota将预定标志位即标志位FOTA_FLAG记录为上述第六值,比如为3(此例中下载更新差分包后该标志位的值仍被设置为2),于是进行对OSBL的备份固件的升级。如果对OSBL的备份固件的升级出现故障而再次重启时,Fota从FOTA_FLAG标志位的值为3即可获知OSBL的备份固件已经形成,并且对OSBL的备份固件的升级并未完成(即OSBL的备份更新固件并未成功生成),所以Fota可直接在上次更新中确定的第一写入位置处,进行OSBL更新需要的差分包在OSBL的备份固件上的写入,也可以重新确定第一写入位置,再进行OSBL的备份固件的更新。Still taking OSBL to be updated as an example, after the fourth firmware Fota forms the backup firmware of the fifth firmware OSBL, Fota records the predetermined flag bit, the flag bit FOTA_FLAG, as the above-mentioned sixth value, such as 3 (downloading and updating the differential package in this example Afterwards, the value of the flag bit is still set to 2), so the upgrade of the backup firmware of the OSBL is carried out. If the upgrade of the backup firmware of the OSBL fails and restarts again, Fota can know that the backup firmware of the OSBL has been formed from the value of the FOTA_FLAG flag bit of 3, and the upgrade of the backup firmware of the OSBL has not been completed (that is, the backup of the OSBL The update firmware has not been successfully generated), so Fota can directly write the differential package required for OSBL update on the OSBL backup firmware at the first write position determined in the last update, and can also re-determine the first write Enter the location, and then update the backup firmware of OSBL.

在上述实施例的基础上,或者在另一单独的实施例中,第四固件形成第五固件的备份更新固件之后,该方法进一步包括:第四固件将预定标志位设置为第七值;On the basis of the above embodiments, or in another separate embodiment, after the fourth firmware forms a backup of the fifth firmware and updates the firmware, the method further includes: the fourth firmware sets the predetermined flag bit to a seventh value;

在第五固件更新成功之前,该方法进一步包括:Before the fifth firmware update is successful, the method further includes:

如果通信终端再次启动时,第四固件获知预定标志位为第七值,则返回确定所述第五固件中的第二写入位置的步骤。If the fourth firmware learns that the predetermined flag bit is the seventh value when the communication terminal starts up again, return to the step of determining the second writing position in the fifth firmware.

在一具体实施例中,如果对OSBL的备份固件的升级成功,则Fota将标志位FOTA_FLAG的值设置为第七值(比如为4),然后继续进行OSBL的备份更新固件对原OSBL的覆盖。在FOTA_FLAG的值被设置为4之前,其值可以为3,标识OSBL的备份固件已经形成而OSBL的备份更新固件还未生成,也可以为2,即仅标识OSBL需要进行更新,而未在OSBL的备份固件已经形成时调整标志位FOTA_FLAG的值。在后一种情况下,如果覆盖失败,则终端再次启动过程中,将无法获知OSBL的备份固件已经形成,Fota还需再次生成OSBL的备份固件。In a specific embodiment, if the upgrade of the backup firmware of the OSBL is successful, Fota sets the value of the flag bit FOTA_FLAG to the seventh value (such as 4), and then continues to overwrite the original OSBL with the backup firmware of the OSBL. Before the value of FOTA_FLAG is set to 4, its value can be 3, indicating that the backup firmware of OSBL has been formed but the backup update firmware of OSBL has not been generated, or it can be 2, which only indicates that OSBL needs to be updated, but not in OSBL. Adjust the value of the flag bit FOTA_FLAG when the backup firmware has been formed. In the latter case, if the overwriting fails, the terminal will not be able to know that the OSBL backup firmware has been formed during the restart process of the terminal, and Fota needs to generate the OSBL backup firmware again.

在上述两个实施例的基础上,或者在另一单独的实施例中,第四固件形成第五固件的备份更新固件之后,该方法进一步包括:第四固件将预定标志位设置为第七值;On the basis of the above two embodiments, or in another separate embodiment, after the fourth firmware forms a backup of the fifth firmware and updates the firmware, the method further includes: the fourth firmware sets the predetermined flag bit to a seventh value ;

在第五固件更新成功之前,该方法进一步包括:Before the fifth firmware update is successful, the method further includes:

如果通信终端再次启动时,第四固件获知预定标志位为第七值,则返回确定第五固件中的第二写入位置的步骤。If the fourth firmware learns that the predetermined flag bit is the seventh value when the communication terminal starts up again, return to the step of determining the second writing position in the fifth firmware.

在一个具体实施例中,如果OSBL的备份更新固件对OSBL的覆盖成功,Fota将标志位FOTA_FLAG的值(由4,接续上述实施例)再次设置为初始值1,表明OSBL更新完毕。如果覆盖过程出现故障,标志位FOTA_FLAG的值保留为4,终端再次启动至Fota时,Fota读取到FOTA_FLAG的值为4,获知OSBL的备份更新固件已经生成,而由于覆盖过程出现了故障,则Fota直接使OSBL的备份更新固件覆盖在OSBL上的第二写入位置,或者重新确定第二写入位置,再对OSBL进行覆盖。In a specific embodiment, if the backup update firmware of the OSBL successfully covers the OSBL, Fota sets the value of the flag FOTA_FLAG (from 4, following the above embodiment) to the initial value 1 again, indicating that the OSBL update is complete. If the overwriting process fails, the value of the flag FOTA_FLAG remains at 4. When the terminal restarts to Fota, Fota reads the value of FOTA_FLAG as 4, knowing that the OSBL backup update firmware has been generated, and because the overwriting process fails, then Fota directly makes the backup update firmware of the OSBL overwrite the second writing position on the OSBL, or re-determines the second writing position, and then overwrites the OSBL.

由于OSBL、APPSBL或Fota备份更新固件在原固件上的覆盖过程出现故障,可能致使终端再次启动时无法正常加载Fota,所以终端再次启动的过程中,第六固件(包括DBL或FSBL)也会读取标志位FOTA_FLAG的值。本例以DBL为例,当DBL读取到标志位FOTA_FLAG的值为4时,则会改变固件的加载顺序。本例中,标志位FOTA_FLAG的值为4仅标识OSBL、APPSBL或Fota这一类固件的更新中的覆盖环节出现问题,而不具体标明其中的哪一个固件的更新过程中,备份更新固件对原固件的覆盖出现问题,所以DBL读取到标志位FOTA_FLAG的值为4时,还需结合固件更新需要的差分包上的标识信息,对哪一个具体固件进行确认。Due to failures in the overwriting process of OSBL, APPSBL or Fota backup update firmware on the original firmware, Fota may not be loaded normally when the terminal restarts, so the sixth firmware (including DBL or FSBL) will also be read when the terminal restarts. The value of the flag bit FOTA_FLAG. This example takes DBL as an example. When DBL reads the value of the flag bit FOTA_FLAG as 4, it will change the loading sequence of the firmware. In this example, the value of the flag FOTA_FLAG is 4, which only indicates that there is a problem with the coverage link in the update of firmware such as OSBL, APPSBL, or Fota, but does not specifically indicate which firmware is being updated. There is a problem with the coverage of the firmware, so when DBL reads the value of the flag FOTA_FLAG as 4, it needs to combine the identification information on the differential packet required for firmware update to confirm which specific firmware.

比如当标志位FOTA_FLAG的值为4时,DBL判断出备份更新固件的覆盖过程出现故障的是OSBL,则DBL将固件加载顺序由FSBL-OSBL-APPSBL改为FSBL-OSBL’APPSBL,OSBL’即OSBL的备份更新固件。加载至Fota时,Fota获知标志位FOTA_FLAG的值为4,并且也通过差分包上的标识信息获知是OSBL的更新过程中出现的故障,则对OSBL的备份更新固件在OSBL上的第二写入位置进行覆盖。For example, when the value of the flag bit FOTA_FLAG is 4, DBL judges that OSBL is faulty in the overwriting process of backup and update firmware, then DBL changes the firmware loading sequence from FSBL-OSBL-APPSBL to FSBL-OSBL'APPSBL, OSBL' is OSBL backup to update the firmware. When loading to Fota, Fota knows that the value of the flag bit FOTA_FLAG is 4, and also knows from the identification information on the differential package that it is a fault that occurs during the update process of OSBL, then the second write of the OSBL backup update firmware on OSBL The location is covered.

当DBL判断出备份更新固件的覆盖过程出现故障的是APPSBL时,将加载顺序由FSBL-OSBL-APPSBL改为FSBL-OSBL-APPSBL’,APPSBL’即APPSBL的备份更新固件。当DBL判断出备份更新固件的覆盖过程出现故障的是Fota时,将加载顺序由OSBL-APPSBL-Fota改为OSBL-APPSBL-Fota’,Fota’即Fota的备份更新固件。When DBL judges that it is APPSBL that fails in the overwriting process of backup and update firmware, the loading sequence is changed from FSBL-OSBL-APPSBL to FSBL-OSBL-APPSBL', APPSBL' is the backup update firmware of APPSBL. When DBL judges that Fota is faulty in the overwriting process of backup and update firmware, it changes the loading sequence from OSBL-APPSBL-Fota to OSBL-APPSBL-Fota', Fota' is Fota's backup update firmware.

需要说明的是,DBL在终端的每次启动过程中都将读取标志位FOTA_FLAG的值,当不需要其改变固件加载顺序时,按正常顺序加载至Fota,由Fota读取标志位FOTA_FLAG的值来判断终端目前的更新状态,再继续相应的处理;而在需要其改变固件加载顺序时,对加载顺序进行调整,从而避免出现上述无法重启的情形。It should be noted that DBL will read the value of the flag bit FOTA_FLAG during each startup of the terminal. When it is not necessary to change the firmware loading sequence, it will be loaded to Fota in the normal order, and Fota will read the value of the flag bit FOTA_FLAG To determine the current update status of the terminal, and then continue the corresponding processing; and when it is necessary to change the firmware loading sequence, adjust the loading sequence, so as to avoid the above-mentioned situation that cannot be restarted.

上述不需要改变固件加载顺序的情形包括:需要先行加载,Fota才能加载的固件(如OSBL、APPSBL)或者Fota自身需要更新时,并非由于备份更新固件的覆盖出现故障使终端需要再次启动的情形;以及早于、晚于或与Fota同时加载,但其是否成功加载不会影响到Fota的加载的固件(如ADSP、AMSS、LINUX以及ANDROID)需要更新时的情形。The above-mentioned situations that do not need to change the firmware loading sequence include: the firmware (such as OSBL, APPSBL) that needs to be loaded before Fota can be loaded, or when Fota itself needs to be updated, and the terminal needs to be restarted due to a fault in the coverage of the backup update firmware; And earlier than, later than or loaded simultaneously with Fota, but whether it is successfully loaded will not affect the situation when the loaded firmware (such as ADSP, AMSS, LINUX and ANDROID) of Fota needs to be updated.

在一个具体实施例中,该固件更新方法进一步包括:In a specific embodiment, the firmware update method further includes:

通信终端获知第七固件需要更新;The communication terminal learns that the seventh firmware needs to be updated;

通信终端下载第七固件更新需要的更新数据;The communication terminal downloads the update data required for the seventh firmware update;

通信终端将预定标志位设置为第八值;The communication terminal sets the predetermined flag bit as the eighth value;

通信终端再次启动时,第四固件获知预定标志位为第八值后,确定第七固件更新需要的更新数据在第七固件中的写入位置,并将第七固件更新需要的更新数据写入该写入位置,实现第七固件的更新;When the communication terminal starts again, after the fourth firmware learns that the predetermined flag is the eighth value, it determines the write position of the update data required by the seventh firmware update in the seventh firmware, and writes the update data required by the seventh firmware update The writing location realizes the updating of the seventh firmware;

第七固件更新成功后,第四固件将预定标志位设置为第一值;After the seventh firmware update is successful, the fourth firmware sets the predetermined flag to the first value;

其中,所述第七固件包括:操作系统内核。Wherein, the seventh firmware includes: an operating system kernel.

上述第七固件包括LINUX,当通信终端通过FS单元获知LINUX需要更新后,FS单元下载差分包之后将标志位FOTA_FLAG改写为第八值(比如为5),并引导终端再次启动。在终端重启过程中,Fota读取标志位FOTA_FLAG的值为5后,无需生成LINUX的备份固件,所以直接确定LINUX的更新数据的写入位置,并在LINUX上的该写入位置,写入上述差分包。The above-mentioned seventh firmware includes LINUX. When the communication terminal learns that LINUX needs to be updated through the FS unit, the FS unit rewrites the flag bit FOTA_FLAG to the eighth value (for example, 5) after downloading the differential package, and guides the terminal to start up again. During the restart process of the terminal, after Fota reads the value of the flag FOTA_FLAG to 5, there is no need to generate LINUX backup firmware, so directly determine the write location of the LINUX update data, and write the above-mentioned differential package.

在另一个实施例中,通信终端包括处理器,处理器包括第三核和第四核,第四固件位于第四核,操作系统内核位于第四核,第七固件进一步包括:位于第三核的固件。In another embodiment, the communication terminal includes a processor, the processor includes a third core and a fourth core, the fourth firmware is located in the fourth core, the operating system kernel is located in the fourth core, and the seventh firmware further includes: located in the third core firmware.

在一个具体实施例中,终端采用的处理器为双核即基带处理器(BP)和应用处理器(AP),第三核为BP,第四核为AP。Fota以及LINUX位于AP上,而第七固件进一步包含位于BP上的ADSP或者AMSS。两核之间通过共享内存来进行交互,所以由ANDROID的FS单元下载的ADSP或者AMSS更新需要的差分包存入预定区域,是可以被Fota用于向与其处在不同核的ADSP或AMSS进行写入来实现更新的。In a specific embodiment, the processor used by the terminal is a dual-core baseband processor (BP) and an application processor (AP), the third core is the BP, and the fourth core is the AP. Fota and LINUX are located on the AP, and the seventh firmware further includes ADSP or AMSS located on the BP. The two cores interact through shared memory, so the differential packets required for ADSP or AMSS updates downloaded by the FS unit of ANDROID are stored in a predetermined area, and can be used by Fota to write to ADSP or AMSS in different cores. Into the implementation of the update.

在上述实施例的基础上,在第七固件更新成功后,所述第四固件将预定标志位设置为第五值具体包括:On the basis of the above embodiments, after the seventh firmware update is successful, the fourth firmware setting the predetermined flag bit to the fifth value specifically includes:

第七固件更新成功后,将预定标志位设置为第九值;After the seventh firmware update is successful, the predetermined flag is set to the ninth value;

操作系统内核判断操作系统内核对应的操作系统是否需要更新;The operating system kernel judges whether the operating system corresponding to the operating system kernel needs to be updated;

如果需要更新,操作系统内核对操作系统进行更新,在更新成功后,通知第四固件;If an update is required, the operating system kernel updates the operating system, and notifies the fourth firmware after the update is successful;

第四固件将所述预定标志位设置为第五值。The fourth firmware sets the predetermined flag bit to a fifth value.

在对第七固件的更新成功后,Fota将标志位FOTA_FLAG设置为第九值(比如为6),并通知LINUX判断是否需要对ANDROID进行更新,如果判断结果为ANDROID不需要更新,则LINUX将标志位FOTA_FLAG设置为第五值即1(二进制数0001),或者LINUX通知Fota,由Fota将标志位FOTA_FLAG设置为1。如果判断结果为ANDROID需要更新,则LINUX确定差分包在ANDROID中的写入位置,并将差分包写入这个位置,实现对ANDROID的更新。需要说明的是,如果整个更新过程只有ANDROID需要更新,FS开始即将标志位FOTA_FLAG设置为6,Fota获取标志位FOTA_FLAG的值后可以直接调用LINUX来对ANDROID进行更新,所以上述更新方式多为LINUX和ANDROID同时发布了新版本因而同时需要更新的场合所推荐。After successfully updating the seventh firmware, Fota sets the flag bit FOTA_FLAG to the ninth value (for example, 6), and notifies LINUX to judge whether it is necessary to update ANDROID. If the judgment result is that ANDROID does not need to be updated, then LINUX will flag The bit FOTA_FLAG is set to the fifth value, which is 1 (binary number 0001), or LINUX notifies Fota, and the flag bit FOTA_FLAG is set to 1 by Fota. If the judging result is that the ANDROID needs to be updated, then LINUX determines the writing position of the differential packet in the ANDROID, and writes the differential packet into this position, so as to realize the updating of the ANDROID. It should be noted that if only ANDROID needs to be updated during the entire update process, FS will set the flag bit FOTA_FLAG to 6 at the beginning, and Fota can directly call LINUX to update ANDROID after obtaining the value of the flag bit FOTA_FLAG, so the above update methods are mostly LINUX and It is recommended when ANDROID releases a new version at the same time and needs to be updated at the same time.

进一步的,在将预定标志位设置为第九值后,在第四固件将预定标志位设置为第五值之前,该方法进一步包括:如果通信终端再次启动时,操作系统内核获知预定标志位为第九值,则返回对操作系统进行更新的步骤。Further, after the predetermined flag is set to the ninth value, before the fourth firmware sets the predetermined flag to the fifth value, the method further includes: if the communication terminal starts up again, the operating system kernel learns that the predetermined flag is The ninth value returns to the step of updating the operating system.

具体的,如果LINUX在对ANDROID的更新过程中出现故障致使更新失败(比如更新过程中断电),则标志位FOTA_FLAG的值仍保持为6(第九值),在终端的下一次启动过程中,Fota识别出标志位FOTA_FLAG为6,则通知LINUX对ANDROID进行更新,直到ANDROID更新成功后,LINUX通知Fota,Fota将标志位FOTA_FLAG设置为第五值(即初始值1),完成整个更新过程。Specifically, if LINUX breaks down during the update process of ANDROID and causes the update to fail (such as a power failure during the update process), the value of the flag bit FOTA_FLAG remains at 6 (ninth value), and in the next startup process of the terminal , Fota recognizes that the flag FOTA_FLAG is 6, then informs LINUX to update ANDROID, until after the ANDROID update is successful, LINUX notifies Fota, and Fota sets the flag FOTA_FLAG to the fifth value (ie, the initial value 1), and completes the entire update process.

在一个实施例中,在第七固件更新成功之前,第四固件确定第七固件更新需要的更新数据在第七固件中的写入位置之后,该方法进一步包括:将第七固件更新需要的更新数据写入该写入位置,实现第七固件的更新。In one embodiment, before the seventh firmware update is successful, after the fourth firmware determines the write position of the update data required for the seventh firmware update in the seventh firmware, the method further includes: updating the update data required for the seventh firmware update Data is written into the writing location to realize updating of the seventh firmware.

如果第七固件(比如ADSP)在更新过程中出现故障,导致终端再次启动,至Fota被加载时,从标志位FOTA_FLAG的值为第八值(5)识别出第七固件需要进行更新,则将ADSP更新需要的差分包写入上次更新过程中确定的在ADSP上的写入位置,实现对ADSP的更新。If the seventh firmware (such as ADSP) breaks down during the update process, causing the terminal to start again, and when Fota is loaded, it is recognized that the seventh firmware needs to be updated from the eighth value (5) of the flag FOTA_FLAG, then the The differential packet required for ADSP update is written to the write position on the ADSP determined in the last update process, so as to realize the update of ADSP.

本发明还提供了一种芯片,如图4所示,应用于通信终端中,芯片包含第一固件和第二固件,其中,第一固件包含:The present invention also provides a chip, as shown in FIG. 4, which is applied to a communication terminal. The chip includes a first firmware and a second firmware, wherein the first firmware includes:

预定标志位读取模块,用于获知通信终端上的预定标志位为第二值后,获知第二固件需要更新;The predetermined flag reading module is used to learn that the second firmware needs to be updated after learning that the predetermined flag on the communication terminal is the second value;

写入位置确定模块,用于所述预定标志位读取模块获知所述第二固件需要更新后,确定所述第二固件更新需要的更新数据在所述第二固件中的写入位置;A writing location determination module, configured to determine the writing location of the update data required for the second firmware update in the second firmware after the predetermined flag bit reading module learns that the second firmware needs to be updated;

更新写入模块,用于所述写入位置确定模块确定所述第二固件更新需要的更新数据在所述第二固件中的写入位置后,将所述第二固件更新需要的更新数据写入所述第二固件中的写入位置;The update writing module is used for the write position determining module to write the update data required for the second firmware update after determining the write position of the update data required for the second firmware update in the second firmware into the write location in the second firmware;

预定标志位设置模块,用于在所述第二固件更新成功后,将所述预定标志位设置为第一值;A predetermined flag bit setting module, configured to set the predetermined flag bit to a first value after the second firmware update is successful;

其中,所述第一固件为固件更新模块,所述第二固件包括:操作系统内核。Wherein, the first firmware is a firmware update module, and the second firmware includes: an operating system kernel.

上述第一固件与操作系统内核,分别与上述方法实施例中的第一固件(Fota)与操作系统内核(LINUX)相对应,都包含在上述提供的芯片中。预定标志位读取模块在获知通信终端上的预定标志位即标志位FOTA_FLAG为第二值(比如2)后,获知LINUX需要更新;写入位置确定模块则在预定标志位读取模块获知LINUX需要更新后,确定LINUX更新需要的更新数据在LINUX中的写入位置;更新写入模块在写入位置确定模块确定LINUX更新需要的更新数据在LINUX中的写入位置后,将LINUX更新需要的更新数据写入该写入位置;预定标志位设置模块在LINUX更新成功后,将标志位FOTA_FLAG设置为第一值(比如初始值1,用于标识现在状态为没有固件需要更新,也就指示出本次更新成功)。The above-mentioned first firmware and the operating system kernel correspond to the first firmware (Fota) and the operating system kernel (LINUX) in the above-mentioned method embodiment respectively, and are included in the chip provided above. After the scheduled flag reading module is informed that the predetermined flag on the communication terminal is the second value (such as 2), the flag FOTA_FLAG knows that LINUX needs to be updated; After the update, determine the write position of the update data required by the LINUX update in LINUX; after the write position determination module determines the write position of the update data required by the LINUX update in LINUX, update the required update data of the LINUX update Data is written into this writing location; After the LINUX update is successful, the predetermined flag bit setting module sets the flag bit FOTA_FLAG to the first value (such as initial value 1, which is used to identify the current state as no firmware needs to be updated, which also indicates that this updated successfully).

进一步的,上述芯片包括第一核与第二核,所述第一固件以及所述操作系统内核位于所述第二核;Further, the above-mentioned chip includes a first core and a second core, and the first firmware and the operating system kernel are located in the second core;

所述第二固件进一步包括:位于所述第一核的固件。The second firmware further includes: firmware located on the first core.

见上述方法实施例中,对于双核芯片,Fota以及LINUX皆位于第二核(ARM11也即AP)上,ADSP以及AMSS都位于第一核(ARM9也即BP)上,Fota亦可通过上述各模块来实现对ADSP以及AMSS的跨核更新。See the above method embodiment, for the dual-core chip, Fota and LINUX are located on the second core (ARM11 or AP), ADSP and AMSS are located on the first core (ARM9 or BP), Fota can also pass the above modules To realize the cross-core update of ADSP and AMSS.

进一步的,上述预定标志位设置模块进一步用于,所述第二固件更新成功后,将所述预定标志位设置为第三值,并通知所述操作系统内核;并在接到所述操作系统内核的更新成功通知后,将所述预定标志位设置为第一值;Further, the above-mentioned predetermined flag bit setting module is further configured to, after the second firmware update is successful, set the predetermined flag bit to a third value, and notify the operating system kernel; After the update of the kernel is successfully notified, the predetermined flag is set to the first value;

所述操作系统内核进一步用于,判断自身对应的操作系统是否需要更新,如果需要更新,则对所述操作系统进行更新,并在更新成功后向所述第一固件发送所述更新成功通知。The operating system kernel is further used to judge whether its corresponding operating system needs to be updated, and if it needs to be updated, update the operating system, and send the update success notification to the first firmware after the update is successful.

在标志位FOTA_FLAG一次只能设置一个值的情况下,可能出现LINUX与ANDROID同时需要更新的场景(ADSP以及AMSS与ANDROID同时需要更新的场景几乎不会出现),所以如果出现LINUX与ANDROID同时需要更新的场景,标志位FOTA_FLAG会被ANDROID的FS单元设置为第二值,也即指示LINUX需要更新,当LINUX更新成功后,LINUX(或者其通知Fota,由Fota)将标志位FOTA_FLAG设置为第三值(比如3),然后由LINUX去判断ANDROID是否需要更新。如果LINUX判断出ANDROID需要更新,则LINUX对ANDROID进行更新,并在更新成功后(或者其通知Fota,由Fota)将标志位FOTA_FLAG设置回初始值(1);如果LINUX判断出ANDROID不需要更新,则(或者其通知Fota,由Fota)将标志位FOTA_FLAG设置回初始值(1)。In the case that the flag bit FOTA_FLAG can only set one value at a time, there may be scenarios where LINUX and ANDROID need to be updated at the same time (ADSP, AMSS, and ANDROID need to be updated at the same time, almost never), so if LINUX and ANDROID need to be updated at the same time In the scenario, the flag bit FOTA_FLAG will be set to the second value by the FS unit of ANDROID, which means that LINUX needs to be updated. When the LINUX update is successful, LINUX (or it notifies Fota, and Fota) will set the flag bit FOTA_FLAG to the third value. (such as 3), and then LINUX will judge whether ANDROID needs to be updated. If LINUX judges that ANDROID needs to be updated, then LINUX updates ANDROID, and after the update is successful (or it notifies Fota, by Fota) the flag bit FOTA_FLAG is set back to the initial value (1); if LINUX judges that ANDROID does not need to be updated, Then (or it notifies Fota, Fota) sets the flag bit FOTA_FLAG back to the initial value (1).

同样的,如果在更新LINUX、ADSP或者AMSS的过程中出现故障,在终端再次开始启动时,标志位FOTA_FLAG仍保留为2,则Fota读到标志位FOTA_FLAG的值时,便可获知是LINUX、ADSP或者AMSS的更新过程出现了故障,于是继续进行对LINUX、ADSP或者AMSS的更新。Similarly, if a failure occurs during the update of LINUX, ADSP or AMSS, when the terminal starts up again, the flag bit FOTA_FLAG remains at 2, and when Fota reads the value of the flag bit FOTA_FLAG, it can know that it is LINUX, ADSP Or there is a failure in the update process of AMSS, so continue to update LINUX, ADSP or AMSS.

本发明同时还提供了一种芯片,应用于通信终端中,该芯片包含第四固件和第五固件,其中第四固件包含:At the same time, the present invention also provides a chip, which is applied in a communication terminal, and the chip includes fourth firmware and fifth firmware, wherein the fourth firmware includes:

预定标志位读取模块,用于获知通信终端上的预定标志位为第四值后,获知第五固件需要更新;The predetermined flag reading module is used to learn that the fifth firmware needs to be updated after knowing that the predetermined flag on the communication terminal is the fourth value;

固件备份模块,用于获知所述预定标志位为第四值后,形成所述第五固件的备份固件;A firmware backup module, configured to form backup firmware of the fifth firmware after learning that the predetermined flag bit is a fourth value;

第一写入位置确定模块,用于形成所述第五固件的备份固件后,确定所述第五固件更新需要的更新数据在所述第五固件的备份固件中的第一写入位置;The first writing location determination module is configured to determine the first writing location of the update data required for updating the fifth firmware in the backup firmware of the fifth firmware after forming the backup firmware of the fifth firmware;

备份固件更新模块,用于将所述第五固件更新需要的更新数据写入所述第一写入位置,形成所述第五固件的备份更新固件;A backup firmware update module, configured to write the update data needed for the fifth firmware update into the first write location, to form a backup update firmware of the fifth firmware;

第二写入位置确定模块,用于备份固件更新模块形成所述第五固件的备份更新固件之后,确定所述第五固件中的第二写入位置;The second write location determination module is used to determine the second write location in the fifth firmware after the backup firmware update module forms the backup update firmware of the fifth firmware;

备份更新固件写入模块,用于所述第二写入位置确定后,将所述第五固件的备份更新固件中的数据,写入所述第二写入位置,实现所述第五固件的更新;The backup and update firmware writing module is used to write the data in the backup and update firmware of the fifth firmware into the second write position after the second write position is determined, so as to implement the fifth firmware. renew;

预定标志位设置模块,用于在所述第五固件更新成功后,将所述预定标志位设置为第五值;A predetermined flag bit setting module, configured to set the predetermined flag bit to a fifth value after the fifth firmware update is successful;

其中,所述第四固件为固件更新模块,所述第五固件为所述第四固件,和/或所述通信终端启动过程中,需要先行加载才能使第四固件加载的固件。Wherein, the fourth firmware is a firmware update module, the fifth firmware is the fourth firmware, and/or firmware that needs to be loaded before the fourth firmware can be loaded during the startup process of the communication terminal.

上述第四固件与操作系统内核,分别与上述方法实施例中的第四固件(Fota)与第五固件(可包含OSBL、APPSBL以及Fota自身)相对应,都包含在上述提供的芯片中。预定标志位读取模块在获知通信终端上的预定标志位即标志位FOTA_FLAG为第四值(比如2)后,获知第五固件(比如OSBL)需要更新;固件备份模块在获知所述预定标志位为2后,形成OSBL的备份固件;第一写入位置确定模块在固件备份模块形成OSBL的备份固件后,确定OSBL更新需要的更新数据在OSBL的备份固件中的第一写入位置;备份固件更新模块于是将OSBL更新需要的更新数据写入第一写入位置,形成OSBL的备份更新固件;第二写入位置确定模块在备份固件更新模块形成OSBL的备份更新固件之后,确定OSBL中的第二写入位置;备份更新固件写入模块在第二写入位置确定后,将OSBL的备份更新固件中的数据,写入第二写入位置,实现OSBL的更新;预定标志位设置模块在OSBL更新成功后,将预定标志位即标志位FOTA_FLAG设置为第五值(比如初始值1,用于标识现在状态为没有固件需要更新,也就指示出本次更新成功)。The above-mentioned fourth firmware and the operating system kernel correspond to the fourth firmware (Fota) and the fifth firmware (which may include OSBL, APPSBL, and Fota itself) in the above-mentioned method embodiment respectively, and are included in the chip provided above. After knowing that the predetermined flag on the communication terminal, that is, the flag FOTA_FLAG, is the fourth value (such as 2), the predetermined flag read module knows that the fifth firmware (such as OSBL) needs to be updated; the firmware backup module learns that the predetermined flag After being 2, form the backup firmware of OSBL; After the backup firmware of OSBL is formed by the first write position determination module, determine the first write position of the update data that OSBL updates needs in the backup firmware of OSBL; Backup firmware The update module then writes the update data required by the OSBL update into the first write position to form the backup update firmware of the OSBL; the second write position determination module determines the first in the OSBL after the backup firmware update module forms the backup update firmware of the OSBL Two writing positions; after the backup update firmware writing module is determined in the second writing position, the data in the backup update firmware of OSBL is written into the second writing position to realize the update of OSBL; the predetermined flag bit setting module is in the OSBL After the update is successful, the predetermined flag bit, ie, the flag bit FOTA_FLAG, is set to the fifth value (such as an initial value of 1, which is used to indicate that the current state is that there is no firmware to be updated, which indicates that the update is successful).

进一步的,预定标志位设置模块进一步用于,在所述固件备份模块形成所述第五固件的备份固件之后,将所述预定标志位设置为第六值;Further, the predetermined flag bit setting module is further configured to set the predetermined flag bit to a sixth value after the firmware backup module forms the backup firmware of the fifth firmware;

所述预定标志位读取模块进一步用于,当所述通信终端再次启动时,在获知通信终端上的预定标志位为第六值后,通知所述备份固件更新模块形成所述第五固件的备份更新固件。The predetermined flag reading module is further configured to, when the communication terminal starts up again, notify the backup firmware update module to form the fifth firmware after knowing that the predetermined flag on the communication terminal is the sixth value. Backup and update firmware.

在Fota中的固件备份模块形成OSBL的备份固件之后,Fota中的预定标志位设置模块将标志位FOTA_FLAG设置为第六值(比如3),这样,当在下一个更新环节即对OSBL的备份固件进行更新时出现故障,通信终端再次启动时,Fota中的预定标志位读取模块获知标志位FOTA_FLAG为3后,通知备份固件更新模块形成OSBL的备份更新固件。After the firmware backup module in Fota forms the backup firmware of OSBL, the predetermined flag bit setting module in Fota is set to the sixth value (such as 3) with flag bit FOTA_FLAG, like this, when the backup firmware of OSBL is carried out in the next update link When a fault occurs during updating, when the communication terminal starts again, the predetermined flag reading module in Fota learns that the flag FOTA_FLAG is 3, and then notifies the backup firmware update module to form a backup update firmware of OSBL.

进一步的,所述预定标志位设置模块进一步用于,在所述备份固件更新模块形成所述第五固件的备份更新固件之后,将所述预定标志位设置为第七值;Further, the predetermined flag bit setting module is further configured to set the predetermined flag bit to a seventh value after the backup firmware update module forms the backup update firmware of the fifth firmware;

所述预定标志位读取模块进一步用于,当所述通信终端再次启动时,在获知通信终端上的预定标志位为第七值后,通知所述备份更新固件写入模块实现所述第五固件的更新。The predetermined flag reading module is further used to notify the backup update firmware writing module to implement the fifth value after learning that the predetermined flag on the communication terminal is the seventh value when the communication terminal starts up again. Firmware update.

当预定标志位设置模块在备份固件更新模块形成OSBL的备份更新固件之后,将标志位FOTA_FLAG设置为第七值(比如4);当所述通信终端再次启动时,预定标志位读取模块在获知标志位FOTA_FLAG为4后,通知备份更新固件写入模块实现OSBL的更新。After the backup update firmware of OSBL is formed by the predetermined flag bit setting module, the flag bit FOTA_FLAG is set to the seventh value (such as 4) after the backup firmware update module forms the OSBL; After the flag bit FOTA_FLAG is 4, notify the backup update firmware write module to implement OSBL update.

进一步的,该芯片进一步包含第六固件,用于当通信终端再次启动时,在获知预定标志位为第七值后,将对所述第五固件的加载替换为对所述第五固件的备份更新固件的加载。Further, the chip further includes sixth firmware, which is used to replace the loading of the fifth firmware with the backup of the fifth firmware after knowing that the predetermined flag bit is the seventh value when the communication terminal restarts Loading of updated firmware.

更安全的模式为,第六固件(DBL或者FSBL)在每一次终端启动的过程中,会读取标志位FOTA_FLAG的值,如果上述在OSBL的第二写入位置写入OSBL的备份更新固件的内容时出现故障,标志位FOTA_FLAG的值在终端下一次启动中被保留为4即第七值,DBL或者FSBL读取标志位FOTA_FLAG的值为4时,改变芯片上固件的加载顺序。仍以OSBL更新为例,DBL或者FSBL结合差分包上的标识信息获知在第二写入位置写入相应的备份更新固件的内容时出现故障的固件为OSBL,则将固件加载顺序由FSBL-OSBL-APPSBL调整为FSBL-OSBL’APPSBL’,OSBL’即OSBL的备份更新固件。The safer mode is that the sixth firmware (DBL or FSBL) will read the value of the flag bit FOTA_FLAG every time the terminal is started. When there is a fault in the content, the value of the flag FOTA_FLAG will be retained as 4, which is the seventh value, in the next startup of the terminal. When DBL or FSBL reads the value of the flag FOTA_FLAG as 4, the loading sequence of the firmware on the chip will be changed. Still taking OSBL update as an example, DBL or FSBL combined with the identification information on the differential package knows that the firmware that fails when writing the corresponding backup update firmware content in the second write location is OSBL, then the firmware loading sequence is changed from FSBL-OSBL -APPSBL is adjusted to FSBL-OSBL'APPSBL', OSBL' is the backup update firmware of OSBL.

上述在备份固件成功形成以及备份更新固件成功形成时Fota将标志位FOTA_FLAG的值进行设置,来标识更新过程目前所处的环节,以便在终端再次启动时快速定位到出现故障的环节,该芯片的结构图如图6所示,备份固件更新模块以及备份更新固件写入模块,都分别与预定标志位读取模块以及预定标志位设置模块相连,以便状态信息的快速送达。As mentioned above, when the backup firmware is successfully formed and the backup update firmware is successfully formed, Fota will set the value of the flag FOTA_FLAG to identify the current link of the update process, so as to quickly locate the link where the fault occurs when the terminal restarts. The structure diagram is shown in Figure 6, the backup firmware update module and the backup update firmware write module are respectively connected with the predetermined flag bit reading module and the predetermined flag bit setting module, so as to quickly deliver status information.

进一步的,该芯片进一步包含第七固件;所述预定标志位读取模块进一步用于,当所述预定标志位设置为第八值时,获知所述第七固件需要更新;Further, the chip further includes seventh firmware; the predetermined flag bit reading module is further configured to, when the predetermined flag bit is set to an eighth value, learn that the seventh firmware needs to be updated;

所述第四固件进一步包含:The fourth firmware further includes:

写入位置确定模块,用于所述预定标志位读取模块获知所述第七固件需要更新后,确定所述第七固件更新需要的更新数据在所述第七固件中的写入位置;以及A writing location determination module, configured to determine the writing location of the update data required for updating the seventh firmware in the seventh firmware after the predetermined flag bit reading module learns that the seventh firmware needs to be updated; and

更新写入模块,用于所述写入位置确定模块确定所述第七固件更新需要的更新数据在所述第七固件中的写入位置后,将所述第七固件更新需要的更新数据写入所述第七固件中的写入位置,实现所述第七固件的更新;The update writing module is used for the write position determining module to write the update data required for the seventh firmware update after determining the write position of the update data required for the seventh firmware update in the seventh firmware Enter the write location in the seventh firmware to realize the update of the seventh firmware;

所述预定标志位设置模块进一步用于,在所述第七固件更新成功后,将所述预定标志位设置为第五值;The predetermined flag bit setting module is further configured to set the predetermined flag bit to a fifth value after the seventh firmware update is successful;

所述第七固件包括:操作系统内核。The seventh firmware includes: an operating system kernel.

第七固件包括LINUX,也可包含与第四固件Fota以及LINUX不在同一核的OSBL和APPSBL。在上述芯片的实施例中,Fota在实现上述OSBL、APPSBL以及Fota自身的更新的功能之上,同时可以实现对LINUX、ADSP以及AMSS的更新,其包含的模块与执行的功能,与本发明提供的前述芯片的实施例中的模块和功能相仿,在此不再赘述。同理,Fota通过LINUX来实现操作系统ANDROID的更新亦如前述。The seventh firmware includes LINUX, and may also include OSBL and APPSBL which are not in the same core as the fourth firmware Fota and LINUX. In the embodiment of above-mentioned chip, Fota can realize the update to LINUX, ADSP and AMSS on the function that realizes above-mentioned OSBL, APPSBL and Fota self renewal simultaneously, the module that it comprises and the function of execution, and the present invention provides The modules and functions in the foregoing chip embodiments are similar, and will not be repeated here. In the same way, Fota implements the update of the operating system ANDROID through LINUX as mentioned above.

本发明还提供一种通信终端,包含第一固件和第二固件,所述通信终端进一步包含:The present invention also provides a communication terminal, including first firmware and second firmware, and the communication terminal further includes:

更新状态获知模块,用于获知所述第二固件需要更新;An update status learning module, configured to learn that the second firmware needs to be updated;

下载模块,用于下载所述第二固件更新需要的更新数据;以及a download module, configured to download update data required for the second firmware update; and

标志位设置模块,用于所述更新状态获知模块获知所述第二固件需要更新后,将预定标志位设置为第二值;The flag bit setting module is used for setting the predetermined flag bit to a second value after the update state obtaining module learns that the second firmware needs to be updated;

所述第一固件用于,当所述通信终端再次启动时,在获知所述预定标志位为第二值后,确定所述更新数据在所述第二固件中的写入位置,并将所述第二固件更新需要的更新数据写入所述写入位置,实现所述第二固件的更新;并当所述第二固件更新成功后,将所述预定标志位设置为第一值;The first firmware is used to determine the write position of the update data in the second firmware after learning that the predetermined flag bit is the second value when the communication terminal starts up again, and store the updated data in the second firmware. The update data required for the second firmware update is written into the write location to realize the update of the second firmware; and when the second firmware update is successful, the predetermined flag is set to a first value;

其中,所述第一固件为固件更新模块,所述第二固件包括:操作系统内核。Wherein, the first firmware is a firmware update module, and the second firmware includes: an operating system kernel.

上述第一固件与操作系统内核,分别与上述方法实施例中的第一固件(Fota)与操作系统内核(LINUX)相对应,都包含在上述提供的芯片中。更新状态获知模块获知LINUX需要更新时,由下载模块将LINUX更新需要的更新数据下载并保存;标志位设置模块,在更新状态获知模块获知LINUX需要更新后,将预定标志位FOTA_FLAG设置为第二值(比如2);当通信终端再次启动时,第一固件Fota在获知标志位FOTA_FLAG为2后,确定LINUX更新所需要的更新数据在LINUX中的写入位置,并将LINUX更新需要的更新数据写入该写入位置,实现对LINUX的更新;LINUX更新成功后,Fota将标志位FOTA_FLAG设置为第一值(比如1)。The above-mentioned first firmware and the operating system kernel correspond to the first firmware (Fota) and the operating system kernel (LINUX) in the above-mentioned method embodiment respectively, and are included in the chip provided above. When the update status learning module learns that LINUX needs to be updated, the download module downloads and saves the update data required by the LINUX update; the flag bit setting module, after the update status learning module knows that LINUX needs to be updated, the predetermined flag bit FOTA_FLAG is set to the second value (such as 2); when the communication terminal started again, the first firmware Fota determined the write position of the update data needed for LINUX update in LINUX after learning that the flag bit FOTA_FLAG was 2, and wrote the update data needed for LINUX update Enter the write location to realize the update of LINUX; after the LINUX update is successful, Fota sets the flag bit FOTA_FLAG to the first value (such as 1).

上述方法中提到的各种优化的实施例,比如使用差分包的形式,对被更新的固件做差分写入,比如第二固件还包含ADSP和/或AMSS(都与Fota处在不同的核上),Fota可以使用上述同样的方式来实现对二者的跨核更新,再比如设置标志位FOTA_FLAG的第三值(比如3)来指示LINUX对应的操作系统ANDROID为需要更新的状态,如果在任何固件的更新过程中出现故障,Fota可以通过对标志位FOTA_FLAG的值的读取,了解目前更新所处的状态,从而快速定位到相应固件以及相应出现故障前的状态,实现对固件的更新,此处不再赘述。The various optimized embodiments mentioned in the above method, such as using the form of differential packets, do differential writing to the updated firmware, such as the second firmware also includes ADSP and/or AMSS (both in different cores from Fota above), Fota can use the same method as above to realize the cross-core update of the two, and another example is to set the third value of the flag bit FOTA_FLAG (such as 3) to indicate that the operating system ANDROID corresponding to LINUX needs to be updated. If any firmware fails during the update process, Fota can read the value of the flag bit FOTA_FLAG to understand the current status of the update, so as to quickly locate the corresponding firmware and the corresponding status before the failure, and realize the update of the firmware. I won't repeat them here.

本发明实施例同时提供另一种通信终端,包含第四固件和第五固件,所述通信终端进一步包含:The embodiment of the present invention also provides another communication terminal, including the fourth firmware and the fifth firmware, and the communication terminal further includes:

更新状态获知模块,用于获知第五固件需要更新;An update status learning module, configured to learn that the fifth firmware needs to be updated;

下载模块,用于下载第五固件更新需要的更新数据;以及A download module, configured to download update data needed for the fifth firmware update; and

标志位设置模块,用于所述更新状态获知模块获知所述第五固件需要更新后,将预定标志位设置为第四值;The flag bit setting module is used for setting the predetermined flag bit to a fourth value after the update state obtaining module learns that the fifth firmware needs to be updated;

所述第四固件用于,当所述通信终端再次启动时,在获知所述预定标志位为第四值后,形成所述第五固件的备份固件,确定所述第五固件更新需要的更新数据在所述第五固件的备份固件中的第一写入位置,并将所述第五固件更新需要的更新数据写入所述第一写入位置,形成所述第五固件的备份更新固件;然后确定所述第五固件中的第二写入位置,将所述备份更新固件中的数据,写入所述第二写入位置,实现所述第五固件的更新;当所述第五固件更新成功后,将所述预定标志位设置为第五值;The fourth firmware is used to, when the communication terminal starts up again, form the backup firmware of the fifth firmware after learning that the predetermined flag bit is the fourth value, and determine the update required for the fifth firmware update Data is in the first write location in the backup firmware of the fifth firmware, and the update data required for updating the fifth firmware is written into the first write location to form the backup update firmware of the fifth firmware Then determine the second write position in the fifth firmware, write the data in the backup update firmware to the second write position, and realize the update of the fifth firmware; when the fifth After the firmware update is successful, the predetermined flag is set to the fifth value;

其中,所述第四固件为固件更新模块,所述第五固件为所述第四固件,和/或所述通信终端启动过程中,需要先行加载才能使第四固件加载的固件。Wherein, the fourth firmware is a firmware update module, the fifth firmware is the fourth firmware, and/or firmware that needs to be loaded before the fourth firmware can be loaded during the startup process of the communication terminal.

上述第四固件与操作系统内核,分别与上述方法实施例中的第四固件(Fota)与第五固件(可包含OSBL、APPSBL以及Fota)相对应,都包含在上述提供的芯片中。更新状态获知模块获知第五固件比如OSBL需要更新时,由下载模块将OSBL更新需要的更新数据下载并保存;标志位设置模块在更新状态获知模块获知OSBL需要更新后,将预定标志位FOTA_FLAG设置为第四值(比如2);当通信终端再次启动时,第四固件Fota在获知标志位FOTA_FLAG为2后,形成OSBL的备份固件,然后确定OSBL更新需要的更新数据在OSBL的备份固件中的第一写入位置,并将OSBL更新需要的更新数据写入所述第一写入位置,形成OSBL的备份更新固件;然后,Fota确定OSBL中的第二写入位置,将OSBL的备份更新固件中的数据,写入该第二写入位置,实现OSBL的更新;当OSBL更新成功后,Fota将标志位FOTA_FLAG设置为第五值(如初始值1,标识目前没有固件需要更新)。The above-mentioned fourth firmware and the operating system kernel correspond to the fourth firmware (Fota) and the fifth firmware (which may include OSBL, APPSBL and Fota) in the above-mentioned method embodiment respectively, and are included in the chip provided above. When the update status acquisition module learns that the fifth firmware such as OSBL needs to be updated, the update data required by the OSBL update is downloaded and saved by the download module; after the update status acquisition module learns that the OSBL needs to be updated, the predetermined flag bit FOTA_FLAG is set to The fourth value (such as 2); when the communication terminal starts again, the fourth firmware Fota forms the backup firmware of OSBL after learning that the flag FOTA_FLAG is 2, and then determines that the update data needed for OSBL update is in the backup firmware of OSBL. One write position, and write the update data needed by OSBL update into described first write position, form the backup update firmware of OSBL; Then, Fota determines the second write position in OSBL, the backup update firmware of OSBL The data is written into the second writing position to realize the update of OSBL; when the OSBL is updated successfully, Fota sets the flag bit FOTA_FLAG to the fifth value (such as the initial value 1, indicating that there is no firmware to be updated at present).

上述方法中提到的各种优化的实施例,比如使用差分包的形式,对被更新的固件做差分写入,比如在得知有固件需要更新时询问是否立即重启来进行更新。再比如在获得需更新固件的备份固件时,设置标志位FOTA_FLAG的值来标识这一状态,比如在对备份固件成功更新形成备份更新固件后,设置标志位FOTA_FLAG的值来标识这一状态,再在将备份更新固件成功写入对应的需更新的原始固件时,设置标志位FOTA_FLAG的值回到初始状态来标识更新已经成功,通过在更新过程中的各环节设置标志位FOTA_FLAG的值来进行记录,使得更新过程出现故障而终端再次启动时,Fota能通过读取标志位FOTA_FLAG的值,了解目前更新所处的状态,从而快速定位到相应固件以及相应出现故障前的状态,实现对固件的更新,此处亦不再赘述。The various optimized embodiments mentioned in the above methods, for example, use the form of differential packets to perform differential writing to the updated firmware, such as asking whether to restart immediately for updating when it is known that there is firmware that needs to be updated. For another example, when obtaining the backup firmware that needs to be updated, the value of the flag FOTA_FLAG is set to identify this state, such as after the backup firmware is successfully updated to form a backup update firmware, the value of the flag FOTA_FLAG is set to identify this state, and then When the backup update firmware is successfully written into the corresponding original firmware to be updated, set the value of the flag bit FOTA_FLAG back to the initial state to indicate that the update has been successful, and record by setting the value of the flag bit FOTA_FLAG in each link during the update process , so that when the update process fails and the terminal restarts, Fota can read the value of the flag bit FOTA_FLAG to understand the current status of the update, so as to quickly locate the corresponding firmware and the corresponding state before the failure, and realize the update of the firmware , and will not be repeated here.

另需说明的是,在单核芯片中(比如三星公司出厂的单核芯片),或是在多核(比如现有的四核芯片)中,采用本发明所公开的Fota,均能实现现有技术中所无法实现的,直接通过通信终端自身,来进行除ANDROID之外的固件的更新,此处不再赘述。It should also be noted that, in a single-core chip (such as a single-core chip shipped by Samsung), or in a multi-core (such as an existing quad-core chip), the Fota disclosed by the present invention can be used to realize the existing What cannot be realized in the technology is to update the firmware other than the ANDROID directly through the communication terminal itself, which will not be repeated here.

以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above is only a preferred embodiment of the present invention, it should be pointed out that, for those of ordinary skill in the art, without departing from the principle of the present invention, some improvements and modifications can also be made, and these improvements and modifications can also be made. It should be regarded as the protection scope of the present invention.

Claims (28)

1. the method that a firmware updates, it is adaptable to communication terminal, it is characterised in that described method includes:
Described communication terminal knows that the second firmware needs to update;
Described communication terminal is downloaded described second firmware and is updated the more new data needed;
Predetermined flag position is set to the second value by described communication terminal;
When described communication terminal is again started up, first firmware knows that described predetermined flag position is after the second value, more new data writing position in described second firmware described in determining, and described second firmware is updated the more new data write said write position needed, realize the renewal of described second firmware, wherein, described first firmware is firmware more new module, it is positioned on the LINUX of ARM11 end, for firmware is updated, when communication terminal starts by the loading of APPSBL, described second firmware includes operating system nucleus, the file system elements that firmware more new module is operated by system firmware detects that server end has firmware to need to update, the more new data that described file system elements then down loading updating needs, and be deposited in the presumptive area of communication terminal;
After described second firmware is updated successfully, described predetermined flag position is set to the first value by described first firmware.
2. the method that firmware as claimed in claim 1 updates, it is characterized in that, described communication terminal download described second firmware update need more new data packets draw together: described communication terminal to described second firmware update need more new data be verified, and by pass through checking described in more new data be stored in precalculated position;
The described more new data write said write position needed that updated by described second firmware includes: obtains described second firmware from described precalculated position and updates the more new data of needs, and described second firmware updates the more new data write said write position needed.
3. the method that firmware as claimed in claim 1 updates, it is characterised in that the more new data packets that described communication terminal is downloaded described second firmware renewal and needed is drawn together: described communication terminal is downloaded described second firmware and updated the difference bag needed;
Described second firmware is updated the more new data write said write position needed and includes by described first firmware: described first firmware uses pre-defined algorithm that described difference bag is write said write position.
4. the method that firmware as claimed in claim 1 updates, it is characterised in that when described communication terminal is again started up, the first firmware knows that described predetermined flag position is that the second value includes:
When described communication terminal is again started up, the 3rd firmware after knowing that predetermined flag position is set to the second value, loading described first firmware, described predetermined flag position is the second value to make described first firmware know;
Wherein, described 3rd firmware is, in described communication terminal start-up course, is loaded directly into the firmware of described first firmware.
5. the method that the firmware as according to any one of Claims 1 to 4 updates, it is characterized in that, described communication terminal includes processor, and described processor includes the first core and the second core, described first firmware is positioned at described second core, and described operating system nucleus is positioned at described second core;
Described second firmware farther includes: be positioned at the firmware that need not load in advance before the first firmware loads of described first core.
6. the method that firmware as claimed in claim 5 updates, it is characterised in that described second value, for indicating the state of any one firmware in described second firmware to update for needs.
7. the method that firmware as claimed in claim 1 updates, it is characterised in that after described second firmware is updated successfully, described predetermined flag position is set to the first value and specifically includes by described first firmware:
After described second firmware is updated successfully, described predetermined flag position is set to the 3rd value;
Described operating system nucleus judges that operating system that operating system nucleus is corresponding is the need of renewal;
If needing to update, described operating system is updated by described operating system nucleus, after being updated successfully, notifies described first firmware;
Described predetermined flag position is set to the first value by described first firmware.
8. the method that firmware as claimed in claim 7 updates, it is characterised in that described described predetermined flag position is set to the 3rd value after, before described predetermined flag position is set to the first value by described first firmware, described method farther includes:
If described communication terminal is again started up, described second firmware knows that described predetermined flag position is the 3rd value, returns the described step that described operating system is updated.
9. the method that a firmware updates, it is adaptable to communication terminal, it is characterised in that described method includes:
Described communication terminal knows that the 5th firmware needs to update;
Described communication terminal is downloaded described 5th firmware and is updated the more new data needed;
Predetermined flag position is set to the 4th value by described communication terminal;
When described communication terminal is again started up, 4th firmware knows that described predetermined flag position is after the 4th value, form the backup firmware of described 5th firmware, determine that described 5th firmware updates the more new data needed the first writing position in the backup firmware of described 5th firmware, and described 5th firmware is updated more new data described first writing position of write needed, form the backup updating firmware of described 5th firmware;Wherein, described 4th firmware is firmware more new module, it is positioned on the LINUX of ARM11 end, for firmware is updated, when communication terminal starts by the loading of APPSBL, described 5th firmware is described 4th firmware, and/or in described communication terminal start-up course, need leading loading just can make the firmware of the 4th firmware loads, the file system elements that firmware more new module is operated by system firmware detects that server end has firmware to need to update, the more new data that file system elements then down loading updating needs, and be deposited in the presumptive area of communication terminal;
The second writing position in described 5th firmware determined by described 4th firmware, by the data in the backup updating firmware of described 5th firmware, writes described second writing position, it is achieved the renewal of described 5th firmware;
After described 5th firmware is updated successfully, described predetermined flag position is set to the 5th value by described 4th firmware.
10. the method that firmware as claimed in claim 9 updates, it is characterized in that, the more new data that described communication terminal is downloaded described 5th firmware renewal and needed is specially, described 5th firmware is updated the more new data needed and is verified by described communication terminal, and the more new data that described 5th firmware by verifying updates needs is stored in precalculated position;
More new data described first writing position of write that being updated by described 5th firmware needs includes: obtains described 5th firmware from described precalculated position and updates the more new data of needs, and the more new data that described 5th firmware renewal needs is write described first writing position.
11. the method that firmware as claimed in claim 9 updates, it is characterised in that it is that described 5th firmware updates the difference bag needed that described 5th firmware updates the more new data needed;
Described 5th firmware is updated more new data described first writing position of write needed and includes by described 4th firmware: described 4th firmware uses pre-defined algorithm that the difference bag that described 5th firmware updates needs is write described first writing position.
12. the method that firmware as claimed in claim 9 updates, it is characterised in that after described 4th firmware forms the backup firmware of described 5th firmware, described method farther includes: described predetermined flag position is set to the 6th value by described 4th firmware;
Before described 5th firmware is updated successfully, described method farther includes:
If described communication terminal is again started up, described 4th firmware knows that described predetermined flag position is the 6th value, returns the described step determining that described 5th firmware updates the more new data needed the first writing position in the backup firmware of described 5th firmware.
13. the method that firmware as claimed in claim 9 updates, it is characterised in that after described 4th firmware forms the backup updating firmware of described 5th firmware, described method farther includes: described predetermined flag position is set to the 7th value by described 4th firmware;
Before described 5th firmware is updated successfully, described method farther includes:
If described communication terminal is again started up, described 4th firmware knows that described predetermined flag position is the 7th value, then return the step of described the second writing position determined in described 5th firmware.
14. the method that firmware as claimed in claim 13 updates, it is characterised in that when described communication terminal is again started up, know that described predetermined flag position farther includes before being the 7th value at described 4th firmware:
6th firmware knows that described predetermined flag position is after the 7th value, the loading of described 5th firmware will replace with the loading of the backup updating firmware to described 5th firmware.
15. the method that firmware as claimed in claim 9 updates, it is characterised in that described method farther includes:
Described communication terminal knows that the 7th firmware needs to update;
Described communication terminal is downloaded described 7th firmware and is updated the more new data needed;
Predetermined flag position is set to the 8th value by described communication terminal;
When described communication terminal is again started up, 4th firmware knows that described predetermined flag position is after the 8th value, determine that described 7th firmware updates the more new data needed writing position in described 7th firmware, and described 7th firmware is updated the more new data write said write position needed, it is achieved the renewal of described 7th firmware;
After described 7th firmware is updated successfully, described predetermined flag position is set to the 5th value by described 4th firmware;
Wherein, described 7th firmware includes: operating system nucleus.
16. the method that firmware as claimed in claim 15 updates, it is characterized in that, described communication terminal includes processor, described processor includes the 3rd core and the 4th core, described 4th firmware is positioned at described 4th core, described operating system nucleus is positioned at described 4th core, and described 7th firmware farther includes: be positioned at the firmware that need not load in advance before the 4th firmware loads of described 3rd core.
17. the method that firmware as claimed in claim 15 updates, it is characterised in that after described 7th firmware is updated successfully, described predetermined flag position is set to the 5th value and specifically includes by described 4th firmware:
After described 7th firmware is updated successfully, described predetermined flag position is set to the 9th value;
Described operating system nucleus judges that operating system that operating system nucleus is corresponding is the need of renewal;
If needing to update, described operating system is updated by described operating system nucleus, after being updated successfully, notifies described 4th firmware;
Described predetermined flag position is set to the 5th value by described 4th firmware.
18. the method that firmware as claimed in claim 17 updates, it is characterized in that, described described predetermined flag position is set to the 9th value after, before described predetermined flag position is set to the 5th value by described 4th firmware, described method farther includes: if described communication terminal is again started up, described operating system nucleus knows that described predetermined flag position is the 9th value, returns the described step that described operating system is updated.
19. a chip, it is applied in communication terminal, it is characterised in that described chip comprises the first firmware and the second firmware, and described first firmware comprises:
Predetermined flag position read module, after knowing that the predetermined flag position on communication terminal is the second value, knows that the second firmware needs to update;
Writing position determines module, after knowing that described second firmware needs renewal for described predetermined flag position read module, it is determined that described second firmware updates the more new data needed writing position in described second firmware;
Update writing module, after determining that described second firmware updates the more new data needed writing position in described second firmware for said write position determination module, described second firmware is updated the more new data needed and writes the writing position in described second firmware;Wherein, described first firmware is firmware more new module, it is positioned on the LINUX of ARM11 end, for firmware is updated, when communication terminal starts by the loading of APPSBL, described second firmware includes operating system nucleus, and the file system elements that firmware more new module is operated by system firmware detects that server end has firmware to need to update, the more new data that file system elements then down loading updating needs, and be deposited in the presumptive area of communication terminal;
Predetermined flag position arranges module, for, after described second firmware is updated successfully, described predetermined flag position being set to the first value.
20. chip according to claim 19, it is characterised in that described chip includes the first core and the second core, and described first firmware and described operating system nucleus are positioned at described second core;
Described second firmware farther includes: be positioned at the firmware that need not load in advance before the first firmware loads of described first core.
21. the chip according to claim 19 or 20, it is characterised in that described predetermined flag position arranges module and is further used for, after described second firmware is updated successfully, described predetermined flag position is set to the 3rd value, and notifies described operating system nucleus;And receive described operating system nucleus be updated successfully notice after, described predetermined flag position is set to the first value;
Described operating system nucleus is further used for, it is judged that described operating system, the need of renewal, if needing to update, is then updated by the operating system of self correspondence, and is updated successfully notice to described in described first firmware transmission after being updated successfully.
22. a chip, it is applied in communication terminal, it is characterised in that described chip comprises the 4th firmware and the 5th firmware, and described 4th firmware comprises:
Predetermined flag position read module, after knowing that the predetermined flag position on communication terminal is the 4th value, knows that the 5th firmware needs to update;
Firmware backup module, is used for knowing that described predetermined flag position is after the 4th value, forms the backup firmware of described 5th firmware;
First writing position determines module, after forming the backup firmware of described 5th firmware, it is determined that described 5th firmware updates the more new data needed the first writing position in the backup firmware of described 5th firmware;
Backup firmware is new module more, writes described first writing position for described 5th firmware is updated the more new data needed, forms the backup updating firmware of described 5th firmware;
Second writing position determines module, form the backup updating firmware of described 5th firmware for backup firmware more new module after, it is determined that the second writing position in described 5th firmware;
Backup updating firmware writing module, after determining for described second writing position, by the data in the backup updating firmware of described 5th firmware, writes described second writing position, it is achieved the renewal of described 5th firmware;Wherein, described 4th firmware is firmware more new module, it is positioned on the LINUX of ARM11 end, for firmware is updated, when communication terminal starts by the loading of APPSBL, described 5th firmware is described 4th firmware, and/or in described communication terminal start-up course, need leading loading just can make the firmware of the 4th firmware loads, the file system elements that firmware more new module is operated by system firmware detects that server end has firmware to need to update, the more new data that file system elements then down loading updating needs, and be deposited in the presumptive area of communication terminal;
Predetermined flag position arranges module, for, after described 5th firmware is updated successfully, described predetermined flag position being set to the 5th value.
23. chip according to claim 22, it is characterised in that described predetermined flag position arranges module and is further used for, after described firmware backup module forms the backup firmware of described 5th firmware, described predetermined flag position is set to the 6th value;
Described predetermined flag position read module is further used for, and when described communication terminal is again started up, after the predetermined flag position known on communication terminal is the 6th value, notifies that described backup firmware more new module forms the backup updating firmware of described 5th firmware.
24. chip according to claim 22, it is characterised in that described predetermined flag position arranges module and is further used for, after described backup firmware more new module forms the backup updating firmware of described 5th firmware, described predetermined flag position is set to the 7th value;
Described predetermined flag position read module is further used for, and when described communication terminal is again started up, after the predetermined flag position known on communication terminal is the 7th value, notifies that described backup updating firmware writing module realizes the renewal of described 5th firmware.
25. chip according to claim 24, it is characterized in that, described chip comprises the 6th firmware further, for when described communication terminal is again started up, after knowing that described predetermined flag position is the 7th value, the loading of described 5th firmware will be replaced with the loading of the backup updating firmware to described 5th firmware.
26. chip according to claim 22, it is characterised in that described chip comprises the 7th firmware further;Described predetermined flag position read module is further used for, and when described predetermined flag position is set to eight values, knows that described 7th firmware needs to update;
Described 4th firmware comprises further:
Writing position determines module, after knowing that described 7th firmware needs renewal for described predetermined flag position read module, it is determined that described 7th firmware updates the more new data needed writing position in described 7th firmware;And
Update writing module, after determining that described 7th firmware updates the more new data needed writing position in described 7th firmware for said write position determination module, described 7th firmware is updated the more new data needed and writes the writing position in described 7th firmware, it is achieved the renewal of described 7th firmware;
Described predetermined flag position arranges module and is further used for, and after described 7th firmware is updated successfully, described predetermined flag position is set to the 5th value;
Described 7th firmware includes: operating system nucleus.
27. a communication terminal, it is characterised in that comprising the first firmware and the second firmware, described communication terminal comprises further:
More new state knows module, is used for knowing that described second firmware needs to update;
Download module, updates, for downloading described second firmware, the more new data needed;And
Flag bit arranges module, after knowing that module knows that described second firmware needs renewal for described more new state, predetermined flag position is set to the second value;
Described first firmware is used for, when described communication terminal is again started up, after knowing that described predetermined flag position is the second value, more new data writing position in described second firmware described in determining, and described second firmware is updated the more new data write said write position needed, it is achieved the renewal of described second firmware;And after described second firmware is updated successfully, described predetermined flag position is set to the first value;Wherein, described first firmware is firmware more new module, it is positioned on the LINUX of ARM11 end, for firmware is updated, when communication terminal starts by the loading of APPSBL, described second firmware includes operating system nucleus, and the file system elements that firmware more new module is operated by system firmware detects that server end has firmware to need to update, the more new data that file system elements then down loading updating needs, and be deposited in the presumptive area of communication terminal.
28. a communication terminal, it is characterised in that comprising the 4th firmware and the 5th firmware, described communication terminal comprises further:
More new state knows module, is used for knowing that described 5th firmware needs to update;
Download module, updates, for downloading described 5th firmware, the more new data needed;And
Flag bit arranges module, after knowing that module knows that described 5th firmware needs renewal for described more new state, predetermined flag position is set to the 4th value;
Described 4th firmware is used for, when described communication terminal is again started up, after knowing that described predetermined flag position is the 4th value, form the backup firmware of described 5th firmware, determine that described 5th firmware updates the more new data needed the first writing position in the backup firmware of described 5th firmware, and described 5th firmware is updated more new data described first writing position of write needed, form the backup updating firmware of described 5th firmware;It is then determined that the second writing position in described 5th firmware, by the data in described backup updating firmware, write described second writing position, it is achieved the renewal of described 5th firmware;After described 5th firmware is updated successfully, described predetermined flag position is set to the 5th value;Wherein, described 4th firmware is firmware more new module, it is positioned on the LINUX of ARM11 end, for firmware is updated, when communication terminal starts by the loading of APPSBL, described 5th firmware is described 4th firmware, and/or in described communication terminal start-up course, need leading loading just can make the firmware of the 4th firmware loads, the file system elements that firmware more new module is operated by system firmware detects that server end has firmware to need to update, the more new data that file system elements then down loading updating needs, and be deposited in the presumptive area of communication terminal.
CN201110159548.7A 2011-06-14 2011-06-14 Method, chip and the communication terminal that firmware updates Active CN102830984B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110159548.7A CN102830984B (en) 2011-06-14 2011-06-14 Method, chip and the communication terminal that firmware updates

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110159548.7A CN102830984B (en) 2011-06-14 2011-06-14 Method, chip and the communication terminal that firmware updates

Publications (2)

Publication Number Publication Date
CN102830984A CN102830984A (en) 2012-12-19
CN102830984B true CN102830984B (en) 2016-07-06

Family

ID=47334134

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110159548.7A Active CN102830984B (en) 2011-06-14 2011-06-14 Method, chip and the communication terminal that firmware updates

Country Status (1)

Country Link
CN (1) CN102830984B (en)

Families Citing this family (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104636153A (en) * 2013-11-07 2015-05-20 中兴通讯股份有限公司 Android terminal and method for upgrading Android terminal
CN104536848B (en) 2014-12-22 2018-05-08 小米科技有限责任公司 Firmware restoration method, apparatus and terminal
CN104484211B (en) * 2014-12-29 2017-07-28 广东欧珀移动通信有限公司 The method and device of shared image file
CN105808283A (en) * 2014-12-31 2016-07-27 海洋王照明科技股份有限公司 Program updating method and device applicable to intelligent illumination equipment
CN104461666B (en) * 2014-12-31 2018-05-08 小米科技有限责任公司 The firmware upgrade method and device of equipment primary processor
CN104955034A (en) * 2015-05-28 2015-09-30 盛耀无线通讯科技(北京)有限公司 Communication conversation method
CN104955033A (en) * 2015-05-28 2015-09-30 盛耀无线通讯科技(北京)有限公司 Voice encryption communication method
US9965270B2 (en) * 2015-07-01 2018-05-08 Quanta Computer Inc. Updating computer firmware
CN107341024B (en) * 2016-04-28 2020-02-14 华为技术有限公司 System upgrading method and system upgrading device
CN106648759A (en) * 2016-11-30 2017-05-10 苏州华芯微电子股份有限公司 Common programming device firmware updating method
CN107294768A (en) * 2017-05-05 2017-10-24 惠州Tcl移动通信有限公司 EMMC firmware upgrade methods, equipment and storage device
CN108710495A (en) * 2018-03-29 2018-10-26 北京聚利科技股份有限公司 Electronic tag method for updating program, electronic tag and storage medium
CN108874439B (en) * 2018-07-02 2023-04-11 京东方科技集团股份有限公司 Method and device for acquiring customized difference packet, and upgrading method and device
CN109408097A (en) * 2018-12-11 2019-03-01 深圳市英威腾电气股份有限公司 A kind of firmware upgrade method, device, system and a kind of electronic equipment
CN109766140A (en) * 2018-12-19 2019-05-17 青岛海信宽带多媒体技术有限公司 A kind of localization method and device that set-top box starting is abnormal
CN110209415A (en) * 2019-05-29 2019-09-06 惠州Tcl移动通信有限公司 Firmware method for refreshing, device and storage medium
CN110750287B (en) * 2019-10-21 2023-10-13 上海庆科信息技术有限公司 Firmware upgrading method and device of intelligent robot and intelligent robot
US11080039B2 (en) * 2019-11-25 2021-08-03 Micron Technology, Inc. Resilient software updates in secure storage devices
CN110874239A (en) * 2020-01-20 2020-03-10 翱捷科技(上海)有限公司 Air firmware differential upgrading method and device for electronic equipment
CN115037496B (en) * 2021-03-03 2024-10-18 美光科技公司 Method and computing system for providing security services and related computer storage media
CN113626059B (en) * 2021-10-13 2022-02-08 北京创米智汇物联科技有限公司 System upgrade method, camera and computer readable storage medium
CN114064086B (en) * 2021-11-29 2023-06-23 四川虹美智能科技有限公司 Multi-stage processor system and upgrading method thereof
CN114780114A (en) * 2022-04-11 2022-07-22 广州小鹏汽车科技有限公司 Firmware upgrading method, system, vehicle and storage medium
WO2025111803A1 (en) * 2023-11-28 2025-06-05 Oppo广东移动通信有限公司 Wireless communication method and apparatus
CN118733089A (en) * 2024-07-05 2024-10-01 清能德创电气技术(北京)有限公司 A dual-core DSP firmware update method, system, device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1581101A (en) * 2003-08-12 2005-02-16 联想(北京)有限公司 Embedded system upgrading method
CN101271396A (en) * 2008-04-15 2008-09-24 威盛电子股份有限公司 Electronic device and method for updating firmware on line
CN101383847A (en) * 2008-08-25 2009-03-11 中兴通讯股份有限公司 Firmware upgrading method and device for wireless data terminal

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4944686B2 (en) * 2007-06-28 2012-06-06 ソニーモバイルコミュニケーションズ株式会社 Software update method and portable terminal device
TW201102924A (en) * 2009-07-03 2011-01-16 Inventec Appliances Corp Embedded electronic device and method for updating firmware thereof
CN102065118A (en) * 2010-09-16 2011-05-18 深圳市九洲电器有限公司 Method for updating network equipment and device for implementing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1581101A (en) * 2003-08-12 2005-02-16 联想(北京)有限公司 Embedded system upgrading method
CN101271396A (en) * 2008-04-15 2008-09-24 威盛电子股份有限公司 Electronic device and method for updating firmware on line
CN101383847A (en) * 2008-08-25 2009-03-11 中兴通讯股份有限公司 Firmware upgrading method and device for wireless data terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《基于OMA标准的FPTA技术研究》;王舜 等;《电信科学》;20060831(第8期);第56-59页 *

Also Published As

Publication number Publication date
CN102830984A (en) 2012-12-19

Similar Documents

Publication Publication Date Title
CN102830984B (en) Method, chip and the communication terminal that firmware updates
CN110083374B (en) Upgrade rollback method, system and terminal equipment
CN101557583B (en) Remote-updating and version-switching method of repeater equipment embedded software
CN101931944B (en) Method, device and system for updating terminal patches on line
US7991988B2 (en) Communication device and firmware update method thereof
TWI533216B (en) Operating system updating method
US20110283274A1 (en) Firmware image update and management
CN106610840A (en) FOTA (Firmware Over-The-Air) upgrade method and system
WO2019062635A1 (en) Update method and device
CN110333891A (en) The method of enhanced OTA upgrading based on Internet of Things
CN103518191A (en) Upgrade method, intelligent terminal and upgrade system
CN102646043A (en) Method and device for upgrading mobile terminal software and mobile terminal
CN101556547A (en) Safe method and system used for remotely upgrading embedded Linux kernel
CN108829420A (en) A kind of distributed memory system method for upgrading software based on RPM packet
CN112416411B (en) Upgrading method and device, equipment end, server and computer readable medium
CN113032183A (en) System management method, device, computer equipment and storage medium
CN108322540A (en) Customized data lead-in method, terminal and computer readable storage medium
CN115061713A (en) Method and device for upgrading electronic equipment
CN110147246A (en) Version checking method and device, storage medium and the terminal of space download technology
CN117971265A (en) Radar software upgrading method, device, equipment and readable storage medium
CN114546456A (en) An upgrade method, device and electronic device
CN112004155A (en) OAD upgrading method and device, smart television and readable storage medium
CN116915603A (en) OTA upgrade method, device and electronic equipment
CN106104474B (en) Method for updating firmware on low memory devices
CN114153481A (en) Driving system updating method and device and computer equipment

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