CN115794187A - QSDK device-based OTA upgrade implementation method - Google Patents

QSDK device-based OTA upgrade implementation method Download PDF

Info

Publication number
CN115794187A
CN115794187A CN202211215017.XA CN202211215017A CN115794187A CN 115794187 A CN115794187 A CN 115794187A CN 202211215017 A CN202211215017 A CN 202211215017A CN 115794187 A CN115794187 A CN 115794187A
Authority
CN
China
Prior art keywords
qsdk
ota
application program
burning
upgrade
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211215017.XA
Other languages
Chinese (zh)
Inventor
周杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Infotm Microelectronics Co ltd
Original Assignee
Shanghai Infotm Microelectronics Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Infotm Microelectronics Co ltd filed Critical Shanghai Infotm Microelectronics Co ltd
Priority to CN202211215017.XA priority Critical patent/CN115794187A/en
Publication of CN115794187A publication Critical patent/CN115794187A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses an OTA upgrading realization method based on QSDK equipment, which comprises the following steps: presetting a function interface on QSDK equipment for calling an application program; the application program detects that the update exists and sets an OTA mark; downloading an upgrade image from a server; calling a restarting interface by the application program, and restarting the target equipment; after the target equipment is restarted, entering a bootstrap program, and if an OTA mark set before restarting is detected; starting the kernel to prepare for burning and starting the RAM disk to prepare for burning; the application program burns the upgrade mirror image to the target equipment, clears the OTA mark after burning is finished, and calls the restart interface again to restart the target equipment; through the OTA mode, can carry out software upgrading to the equipment that distributes in all places, and needn't let the fortune maintenance personnel rush across the places.

Description

QSDK device-based OTA upgrade implementation method
Technical Field
The invention relates to the technical field of QSDK equipment upgrading, in particular to an OTA upgrading realization method based on QSDK equipment.
Background
OTA, over-the-Air Technology, generally refers to techniques for remotely managing local data Over a network interface. The QSDK firmware is not supported by OTA function by default and can not be upgraded through OTA. A method for implementing OTA upgrade of QSDK devices is needed.
Disclosure of Invention
In view of the existing defects, the invention provides the QSDK equipment-based OTA upgrading method, and software upgrading can be carried out on QSDK equipment distributed in various places in an OTA mode without running waves of operation and maintenance personnel in various places.
In order to achieve the above purpose, the embodiment of the invention adopts the following technical scheme:
a QSDK device-based OTA upgrade implementation method comprises the following steps:
presetting a function interface on QSDK equipment for calling an application program;
the application program detects that the update exists and sets an OTA mark;
downloading an upgrade image from a server;
calling a restarting interface by the application program, and restarting the target equipment;
after the target equipment is restarted, entering a bootstrap program, and if an OTA mark set before restarting is detected;
starting the kernel to prepare necessary burning and starting the RAM disk to prepare burning;
and the application program burns the upgrade mirror image to the target equipment, clears the OTA mark after burning is finished, and calls the restart interface again to restart the target equipment.
In accordance with one aspect of the invention, the method comprises: and after the application program detects that the update exists, downloading the target mirror image, and after the mirror image is downloaded, setting the OTA mark by the application program.
In accordance with one aspect of the invention, the method comprises: firstly, starting the kernel0 to prepare for burning; if the starting is successful, starting the RAM disk to prepare for burning; if the kernel0 fails to be started, the kernel1 is started to prepare for burning.
In accordance with one aspect of the invention, the method comprises: starting the RAM di sk0 to prepare for burning; if the RAM disk0 is successfully started, burning the upgrade mirror image to the target equipment by the application program; and if the RAM disk0 fails to be started, starting the RAM disk1 to prepare for burning.
In accordance with one aspect of the invention, the method comprises: the step is that the upgrade image is downloaded from the server and executed after the RAM disk is started, and the upgrade image is directly downloaded to the memory.
In accordance with an aspect of the invention, there is network support in the RAM disk.
In accordance with one aspect of the invention, the method comprises: the application program detects that the mirror image is updated, and downloads the mirror image from the server; cleaning the system application process and switching the root file system to the memory; the application program burns the upgrade mirror image to the target equipment; and after the mirror image burning is finished, the application program calls a restarting interface to restart the target equipment.
In accordance with one aspect of the invention, the functional interfaces are provided by libuprade and libsys.
In accordance with an aspect of the invention, the libuppgorde is set as an optional component of the QSDK that can be disabled in configuration options when the user has no OTA upgrade requirements.
According to one aspect of the invention, the target device enters the boot process after being restarted, and directly enters the system if no OTA marker is detected.
The implementation of the invention has the advantages that: and the OTA application program finally realizes the data access to the storage equipment by calling the functional interfaces provided by the libuprade and the libsys. Through the OTA mode, can carry out software upgrading to the equipment that distributes in all places, and needn't let the fortune maintenance personnel rush across the places. The Internet of things platform supports equipment firmware upgrading in an OTA mode, and is a means for repairing system bugs and realizing system upgrading of intelligent equipment. In the rapidly changing and developing market of the internet of things, new product requirements are constantly emerging, so that the updating requirements for intelligent hardware devices become unprecedented and high, and the devices are no longer changed as soon as being sold like traditional devices. The user is provided with better service through firmware upgrade. Further, libuppgorde is an optional component of the QSDK that can be disabled in configuration options when the user does not have OTA upgrade requirements.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flow chart of a mode 1 of an OTA upgrade implementation method based on QSDK equipment according to the present invention;
fig. 2 is a schematic flow chart of a mode 2 of the OTA upgrade implementation method based on QSDK equipment according to the present invention;
fig. 3 is a schematic flow diagram of an implementation manner 3 of an OTA upgrading method based on QSDK equipment according to the present invention;
fig. 4 is a schematic flow diagram of an implementation manner 4 of an OTA upgrading method based on QSDK devices according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Four OTA implementation modes are provided for a user to select according to the product condition of the user. The 4 modes are different in storage medium occupation, memory occupation and safety, and a user can select the modes according to specific product conditions.
Example one
Mode 1, as shown in fig. 1, wherein steps (1), (2) and (3) are implemented in an application program, which is called Downloader; steps (7), (8) and (9) are implemented in another application program, which is called update. Downloader and Updater require the user to develop themselves. An OTA upgrading implementation method based on QSDK equipment is realized by the following steps:
1. the application program detects that the mirror image is updated, and downloads the upgrade mirror image from the server;
2. after the mirror image downloading is finished, the application program sets OTA Flag;
3. calling a restarting interface by the application program to restart the target equipment;
4. restarting the target equipment, entering a Bootloader, and detecting the OTA Flag set before restarting;
5. starting Kernel0 to prepare necessary preparation for burning;
6. starting the RAMdisk and preparing for burning;
7. the application program burns the upgrade mirror image to the target equipment;
8. and after the mirror image burning is finished, the OTA Flag is cleared by the application program, then the restarting interface is called again, and the target equipment is restarted.
Example two
In the mode 2, as shown in fig. 2, after the Bootloader checks OTA Flag, kernel0 is loaded and started first. If Kernel0 fails to boot, then the backup image Kernel1 of Kernel0 will be booted. Since Kernel1 and RAMdisk are stored in the storage medium, the method 2 has a certain requirement on the capacity of the storage medium. The security of the method is high, and the scheme is recommended to be used on products taking 32M SPI Flash or eMMC as storage media. The specific process is as follows:
1. the application program detects that the mirror image is updated, and downloads the upgrade mirror image from the server;
2. after the mirror image downloading is finished, the application program sets OTA Flag;
3. calling a restarting interface by the application program to restart the target equipment;
4. restarting the target equipment, entering a Bootloader, and detecting the OTA Flag set before restarting;
5. starting Kernel0 to prepare necessary preparation for burning, and jumping to the step 7 if the starting is successful;
6. if the Kernel0 is failed to be started, the Kernel1 is started to prepare for burning;
7. starting the RAMdisk0, preparing for burning, and jumping to the 9 th step if the starting is successful;
8. if the starting of the RAMdisk0 fails, starting the RAMdisk1 to prepare for burning;
9. the application program burns the upgrade mirror image to the target equipment;
10. and after the mirror image burning is finished, the OTA Flag is cleared by the application program, then the restarting interface is called again, and the target equipment is restarted.
EXAMPLE III
Mode 3, as shown in fig. 3, the step of downloading the upgrade image from the server is started after Ramdisk is started. Therefore, the mode 3 does not need to download the upgrade package to the storage medium, but directly downloads the upgrade package to the memory, and if the download is unsuccessful, the upgrade package is downloaded again next time. This approach is contemplated on products where local storage media space is tight (e.g., products that use SPI Flash and do not have TF cards). It should be noted that, in the usage mode 3, ramdisk, network support is required. The specific process is as follows:
1. the application program detects that the mirror image is updated, and then sets OTA Flag;
2. calling a restarting interface by the application program to restart the target equipment;
3. restarting the target equipment, entering a Bootloader, and detecting the OTA Flag set before restarting;
4. starting Kernel0 to prepare necessary preparation for burning;
5. starting Ramdisk to prepare for burning;
6. the application program downloads the upgrading mirror image from the server;
7. the application program burns the upgrade mirror image to the target equipment;
8. and after the mirror image burning is finished, the OTA Flag is cleared by the application program, then the restarting interface is called again, and the target equipment is restarted.
Example four
Mode 4, as shown in fig. 4, since it is not necessary to burn ramdisk. Mode 4 is not employed unless the user is sufficiently aware of and can assume the risks therein. The specific process is as follows:
1. in the file system, an application program detects that the mirror image is updated, and downloads the mirror image from a server;
2. cleaning the system application process and switching the root file system to the memory;
3. the application program burns the upgrade mirror image to the target equipment;
4. and after the mirror image burning is finished, the application program calls a restarting interface to restart the target equipment.
The above description is only an embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention disclosed herein are intended to be covered by the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. A QSDK device-based OTA upgrade implementation method is characterized by comprising the following steps:
presetting a function interface on QSDK equipment for calling an application program;
the application program detects that the update exists and sets an OTA mark;
downloading an upgrade image from a server;
calling a restarting interface by the application program, and restarting the target equipment;
after the target equipment is restarted, entering a bootstrap program, and if an OTA mark set before restarting is detected;
starting the kernel to prepare for burning and starting the RAM disk to prepare for burning;
and the application program burns the upgrade mirror image to the target equipment, clears the OTA mark after burning is finished, and calls the restart interface again to restart the target equipment.
2. The QSDK device-based OTA upgrade implementation method according to claim 1, comprising: and after the application program detects that the update exists, downloading the target mirror image, and after the mirror image is downloaded, setting the OTA mark by the application program.
3. The QSDK device-based OTA upgrade implementation method according to claim 2, comprising: firstly, starting a kernel0 to prepare for burning; if the starting is successful, starting the RAM disk to prepare for burning; if the kernel0 fails to be started, the kernel1 is started to prepare for burning.
4. The QSDK device-based OTA upgrade implementation method according to claim 3, comprising: starting the RAM disk0 to prepare for burning; if the RAM disk0 is successfully started, burning the upgrade mirror image to the target equipment by the application program; and if the RAM disk0 fails to be started, starting the RAM disk1 to prepare for burning.
5. The QSDK device-based OTA upgrade implementation method of claim 1, comprising: the step is that the upgrade image is downloaded from the server and executed after the RAM disk is started, and the upgrade image is directly downloaded to the memory.
6. The QSDK device-based OTA upgrade implementation method of claim 5, in which there is network support in the RAM disk.
7. The QSDK device-based OTA upgrade implementation method of claim 1, comprising: the application program detects that the mirror image is updated, and downloads the mirror image from the server; cleaning the system application process and switching the root file system to the memory; the application program burns the upgrade mirror image to the target equipment; and after the mirror image burning is finished, the application program calls a restarting interface to restart the target equipment.
8. The QSDK device-based OTA upgrade implementation method according to any one of claims 1 to 7, wherein the functional interface is provided by libupprad and libsys.
9. The QSDK device based OTA upgrade implementation method of claim 8, wherein the libopprad is configured as an optional component of the QSDK, which can be disabled in configuration options when the user does not have OTA upgrade requirements.
10. The QSDK device-based OTA upgrade implementation method of claim 8, wherein the target device enters a bootstrap after being restarted, and directly enters the system if no OTA flag is detected.
CN202211215017.XA 2022-09-30 2022-09-30 QSDK device-based OTA upgrade implementation method Pending CN115794187A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211215017.XA CN115794187A (en) 2022-09-30 2022-09-30 QSDK device-based OTA upgrade implementation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211215017.XA CN115794187A (en) 2022-09-30 2022-09-30 QSDK device-based OTA upgrade implementation method

Publications (1)

Publication Number Publication Date
CN115794187A true CN115794187A (en) 2023-03-14

Family

ID=85432528

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211215017.XA Pending CN115794187A (en) 2022-09-30 2022-09-30 QSDK device-based OTA upgrade implementation method

Country Status (1)

Country Link
CN (1) CN115794187A (en)

Similar Documents

Publication Publication Date Title
WO2017067448A1 (en) Firmware-over-the-air upgrade method, system and computer storage medium
US7275153B2 (en) Booting and boot code update system using boot strapper code to select between a loader and a duplicate backup loader
US8539471B2 (en) Updating firmware of an electronic device
US20030005037A1 (en) Crash recovery system
EP2482187A1 (en) Software upgrading method, software upgrading system and client
TWI533216B (en) Operating system updating method
CN101950254B (en) Software updating method and system thereof
CN105260209A (en) Hot-update solution of program
KR101201276B1 (en) Method, software and apparatus for performing actions on a wireless device using action lists and versioning
CN104918114A (en) Method and device for upgrading operation system
WO2018024198A1 (en) Application upgrade method and system for set-top box, and set-top box
CN106775674B (en) Equipment based on universal boot loader and starting method thereof
CN111901142A (en) Firmware silent upgrading method and device for embedded equipment cluster
CN114840242A (en) System upgrading method and device of electronic equipment and readable storage medium
CN113626059B (en) System upgrade method, camera and computer readable storage medium
US9058231B2 (en) Deployment of operating systems with detection of loop conditions
CN110580167A (en) system upgrading method, intelligent device and server
CN112860291B (en) Firmware upgrading method and device
CN106293790B (en) application program upgrading method and device based on Firefox operating system
EP3260981B1 (en) Information processing apparatus, information processing system, and information processing method for updating firmware
CN115794187A (en) QSDK device-based OTA upgrade implementation method
CN111949290B (en) Hot patch management method and device, electronic equipment and storage medium
CN115827046A (en) Method and device for realizing OTA (over the air) upgrade of SPL (shortest Path first) partition, terminal equipment and chip
CN110659052B (en) Method and system for updating system software in network equipment and readable storage medium
CN110309018B (en) Charging equipment system switching method, charging equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination