CN111190623A - Remote updating method of embedded operating system - Google Patents

Remote updating method of embedded operating system Download PDF

Info

Publication number
CN111190623A
CN111190623A CN201911364112.4A CN201911364112A CN111190623A CN 111190623 A CN111190623 A CN 111190623A CN 201911364112 A CN201911364112 A CN 201911364112A CN 111190623 A CN111190623 A CN 111190623A
Authority
CN
China
Prior art keywords
kernel module
operating system
kernel
module
application program
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
CN201911364112.4A
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.)
Beijing Zhongke Jingshang Supermedia Information Technology Co ltd
Original Assignee
Beijing Zhongke Jingshang Supermedia Information Technology 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 Beijing Zhongke Jingshang Supermedia Information Technology Co ltd filed Critical Beijing Zhongke Jingshang Supermedia Information Technology Co ltd
Priority to CN201911364112.4A priority Critical patent/CN111190623A/en
Publication of CN111190623A publication Critical patent/CN111190623A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a remote updating method of an embedded operating system, which solves the problem of limitation of the embedded operating system of a wireless sensor network in remote code updating by a method of loading an external function library and an operating system kernel on line. The method comprises the following steps: compiling an application program to generate a binary file, and loading the binary file into a memory space of an embedded system; providing only an interface to the symbol for the operating system kernel at the time of said compiling; searching the inner deviation of the kernel module or the inner deviation of the external function library corresponding to the symbol according to a preset index table; requesting a server to download codes and data corresponding to the symbols according to the internal offset of the kernel module or the internal offset of an external function library; and loading the codes and the data into a memory space of the embedded system.

Description

Remote updating method of embedded operating system
Technical Field
The invention belongs to the technical field of embedded operating systems, and particularly relates to a remote updating method of an embedded operating system.
Background
The number of network devices in a Wireless Sensor Network (WSN) is large, and the operating system needs to dynamically load the operating system and application programs for these devices. The existing embedded operating system can dynamically load and link the operating system and the application program during running so as to realize remote updating of system software. When updating and replacing code in a WSN node, the existing embedded operating system generally adopts three methods:
(1) the code of the whole system is replaced, and the method is easy to implement, but consumes huge energy and storage space for the WSN;
(2) the differential algorithm replaces codes, the original codes and the codes to be updated are compared, and only different parts are transmitted to realize replacement, so that the method can save transmission flow and transmission time, but the differential algorithm is more complex, and the sensor nodes cannot well support the differential algorithm;
(3) modular replacement code: the method is applied to a modularized operating system, codes with more uniform functions are divided into functional modules, and only the corresponding modules are transmitted when updating and replacing are carried out. The method can also effectively reduce the transmission flow and the transmission time.
Although the method can realize the modularized remote updating of software, the modularized dynamic updating replacement of the kernel of the operating system can not be realized generally, because the kernel can not be modified once burned into the FLASH, and when one kernel functional module needs to be updated, the whole kernel code must be replaced completely, which causes the waste of transmission resources and the extension of transmission time. In addition, when the existing embedded operating system remotely updates the application program, if the application program uses an external library function, the external link library needs to be loaded in advance, so that the application program can dynamically link and use the external library function.
Disclosure of Invention
The invention discloses a remote updating method of an embedded operating system, which solves the problem of limitation of the embedded operating system of a wireless sensor network in remote code updating by a method of loading an external function library and an operating system kernel on line.
The invention is realized by the following technical scheme.
A method for remote updating of an application, comprising:
compiling an application program to generate a binary file, and loading the binary file into a memory space of an embedded system; providing only an interface to the symbol for the operating system kernel at the time of said compiling;
searching the inner deviation of the kernel module or the inner deviation of the external function library corresponding to the symbol according to a preset index table;
requesting a server to download codes and data corresponding to the symbols according to the internal offset of the kernel module or the internal offset of an external function library; and loading the codes and the data into a memory space of the embedded system.
A method for updating kernel module of operating system includes adding, cutting and replacing kernel module; the method specifically comprises the following steps:
when the number of application programs is increased, adding an operating system kernel module;
after the application program is run, judging which kernel modules are used by the finished application program and other application programs are not used, and then clearing the kernel modules out of a memory space;
and when the kernel module of the operating system has a new version, replacing the kernel module, deleting the old kernel module and loading the new kernel module.
The invention has the beneficial effects that:
the invention provides the active updating function of the kernel of the operating system and the external function library when in operation on the basis of realizing the online updating of the application program, enhances the flexibility and the application scene adaptability of the embedded operating system, and achieves the effect of customizing the operating system according to the application scene requirements.
1. The invention designs a set of mechanism for loading the kernel module and the external function library on line, so that if an external symbol appears in an application program code, the kernel module or the function library of the operating system corresponding to the symbol is not loaded into the system, and the system can actively request a server end to load the corresponding kernel module or the external function library of the operating system;
in the process of an application program from a high-level language code to an assembly code in a compiling stage, if an external library function is encountered or only an interface of a corresponding function is provided in the assembly code, and specific code and data are not provided. Specific application code and data are remotely linked and loaded during the linking phase. The advantage of this is that when the application program is updated, only the function to be updated needs to be transmitted and updated, and the program of the whole system does not need to be updated.
2. The invention designs a kernel module updating mechanism of an operating system, and by using the kernel module updating mechanism, the active updating and loading of kernel modules can be realized in the running process of the system, and the modular addition, cutting and replacement of kernel functions of the operating system are realized.
Drawings
FIG. 1 is a flowchart illustrating a method for remotely updating an application according to an embodiment of the present invention;
fig. 2 is a flowchart of an updating method of an operating system kernel module according to an embodiment of the present invention.
Detailed Description
The invention is described in detail below with reference to the drawings and specific examples, but the invention is not limited thereto.
The invention has the realization idea that: in the application program compiling stage, the application program is compiled together with a plurality of functional modules of the operating system kernel in an integrated development environment. In the compiling process of the application program, if an operating system kernel or an external function library symbol is encountered, only an interface of the symbol is provided, and code or data corresponding to the symbol does not need to be compiled into the application program. The binary file generated after compiling does not contain specific codes in the kernel module and the external function library, and only contains corresponding interfaces, and the subsequent process of dynamically linking the symbols and the codes is realized by an operating system.
Based on the thought, the remote updating method of the embedded operating system comprises the remote updating of the application program and the updating of the kernel module of the operating system.
As shown in fig. 1, a remote update method for an application program in this embodiment specifically includes:
compiling an application program to generate a binary file, and loading the binary file to a memory space of an embedded system; providing only an interface to the symbol for the operating system kernel at the time of said compiling;
step two, searching the inner deviation of the kernel module or the inner deviation of the external function library corresponding to the symbol according to a preset index table;
the preset index table adopts the following mode:
Figure BDA0002336633740000041
thirdly, requesting a server to download codes and data corresponding to the symbols according to the internal offset of the kernel module or the offset in an external function library; and loading the codes and the data into a memory space of the embedded system.
As shown in fig. 2, corresponding to the method of the foregoing embodiment, the present embodiment further includes an updating method of a kernel module of an operating system, including adding, cutting, and replacing the kernel module; the method specifically comprises the following steps:
step one, when the number of application programs is increased, adding an operating system kernel module;
step two, after the application program is run, judging which kernel modules are used by the finished application program and are not used by other application programs, and then clearing the kernel modules out of the memory space;
and step three, when the kernel module of the operating system has a new version, replacing the kernel module, deleting the old kernel module and loading the new kernel module. Specifically, the method comprises the following steps: the method comprises the steps of firstly transmitting kernel module codes needing to be replaced to embedded equipment, receiving the kernel module codes by a system, judging which module needs to be updated, then unloading an old module, and loading a new module into a corresponding memory space.
In this embodiment, before replacing the kernel module, it is first determined whether an application program is in use in the kernel module that needs to be replaced, and if the application program is in use, the kernel module is replaced after waiting for the application program to be executed.

Claims (5)

1. A method for remotely updating an application program, comprising:
compiling an application program to generate a binary file, and loading the binary file into a memory space of an embedded system; providing only an interface to the symbol for the operating system kernel at the time of said compiling;
searching the inner deviation of the kernel module or the inner deviation of the external function library corresponding to the symbol according to a preset index table;
requesting a server to download codes and data corresponding to the symbols according to the internal offset of the kernel module or the internal offset of an external function library; and loading the codes and the data into a memory space of the embedded system.
2. A method for remotely updating an application program according to claim 1, wherein the predetermined index table is obtained by:
Figure FDA0002336633730000011
3. a method for updating kernel module of operating system includes adding, cutting and replacing kernel module; the method is characterized by comprising the following steps:
when the number of application programs is increased, adding an operating system kernel module;
after the application program is run, judging which kernel modules are used by the finished application program and other application programs are not used, and then clearing the kernel modules out of a memory space;
and when the kernel module of the operating system has a new version, replacing the kernel module, deleting the old kernel module and loading the new kernel module.
4. The method for updating a kernel module of an operating system according to claim 3, wherein the loading of the new kernel module specifically comprises:
the method comprises the steps of firstly transmitting kernel module codes needing to be replaced to embedded equipment, receiving the kernel module codes by a system, judging which module needs to be updated, then unloading an old module, and loading a new module into a corresponding memory space.
5. The method for updating kernel module of operating system according to claim 3 or 4, wherein before replacing the kernel module, it is first determined whether the kernel module in the kernel module to be replaced has an application program in use, and if so, the kernel module is replaced after waiting for the application program to finish executing.
CN201911364112.4A 2019-12-25 2019-12-25 Remote updating method of embedded operating system Pending CN111190623A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911364112.4A CN111190623A (en) 2019-12-25 2019-12-25 Remote updating method of embedded operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911364112.4A CN111190623A (en) 2019-12-25 2019-12-25 Remote updating method of embedded operating system

Publications (1)

Publication Number Publication Date
CN111190623A true CN111190623A (en) 2020-05-22

Family

ID=70709547

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911364112.4A Pending CN111190623A (en) 2019-12-25 2019-12-25 Remote updating method of embedded operating system

Country Status (1)

Country Link
CN (1) CN111190623A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220147636A1 (en) * 2020-11-12 2022-05-12 Crowdstrike, Inc. Zero-touch security sensor updates

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030074487A1 (en) * 2001-10-17 2003-04-17 Tankut Akgul Dynamic operating system
CN101441566A (en) * 2008-11-18 2009-05-27 腾讯科技(深圳)有限公司 Embedded type platform and method for dynamically linking program on the same
CN101470619A (en) * 2007-12-29 2009-07-01 安凯(广州)软件技术有限公司 Application program dynamic loading method based on microkernel operating system
CN101814020A (en) * 2010-04-15 2010-08-25 长沙理工大学 Rapid implementation method based on embedded program and system thereof
CN104199713A (en) * 2014-08-25 2014-12-10 山东超越数控电子有限公司 Embedded Linux operation system trimming customization method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030074487A1 (en) * 2001-10-17 2003-04-17 Tankut Akgul Dynamic operating system
CN101470619A (en) * 2007-12-29 2009-07-01 安凯(广州)软件技术有限公司 Application program dynamic loading method based on microkernel operating system
CN101441566A (en) * 2008-11-18 2009-05-27 腾讯科技(深圳)有限公司 Embedded type platform and method for dynamically linking program on the same
CN101814020A (en) * 2010-04-15 2010-08-25 长沙理工大学 Rapid implementation method based on embedded program and system thereof
CN104199713A (en) * 2014-08-25 2014-12-10 山东超越数控电子有限公司 Embedded Linux operation system trimming customization method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220147636A1 (en) * 2020-11-12 2022-05-12 Crowdstrike, Inc. Zero-touch security sensor updates

Similar Documents

Publication Publication Date Title
CN105100191A (en) Method, device and system for realizing Java application installation via cloud compilation
EP1872215B1 (en) Implementing data-compatibility-based version scheme
US9489189B2 (en) Dynamically generate and execute a context-specific patch installation procedure on a computing system
CN103984582A (en) Method and device for hot updating
CN105045631A (en) Method and device for upgrading client-side applications
CN102187313A (en) Caching runtime generated code
CN102880494B (en) A kind of local code update method for microsatellite system and system thereof
CN103353845A (en) Method and device for uploading and pushing script
CN107391104A (en) A kind of client and the renewal of react native codes rely on management method, apparatus and system
CN104679572A (en) Plug-in support method based on preloading mechanism
CN104077161A (en) Client application updating method and device
CN101739458B (en) Method and system for updating multilingual resource
CN104657164A (en) Method and device for updating and processing software
CN114327477A (en) Intelligent contract execution method and device, electronic device and storage medium
CN109067562A (en) Dynamic configuration update method and system, server and medium based on intelligent pointer
CN111190623A (en) Remote updating method of embedded operating system
CN104111843A (en) Sandbox based script updating method and system
CN116954685B (en) Gray scale rolling upgrading method, system, equipment and medium for low-code application system
CN109558121A (en) Development approach, device, equipment and the storage medium of interface drive program
CN105554135A (en) Method and device for synchronizing meta information among digital nodes
CN111831323A (en) Containerized incremental continuous delivery method
CN113986312B (en) Software upgrading method and device, electronic equipment and computer readable storage medium
CN103488503B (en) Oftware updating method and device
CN111586081B (en) Internet of things implementation method based on object model
CN109857380B (en) Workflow file compiling method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200522