CN105005491A - Linux kernel and application program upgrading method and system - Google Patents

Linux kernel and application program upgrading method and system Download PDF

Info

Publication number
CN105005491A
CN105005491A CN201510489419.2A CN201510489419A CN105005491A CN 105005491 A CN105005491 A CN 105005491A CN 201510489419 A CN201510489419 A CN 201510489419A CN 105005491 A CN105005491 A CN 105005491A
Authority
CN
China
Prior art keywords
file
application program
kernel
app
linux
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510489419.2A
Other languages
Chinese (zh)
Other versions
CN105005491B (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.)
Beijing Boyu Future Technology Co ltd
Original Assignee
Shanghai Feixun Data Communication 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 Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201510489419.2A priority Critical patent/CN105005491B/en
Publication of CN105005491A publication Critical patent/CN105005491A/en
Application granted granted Critical
Publication of CN105005491B publication Critical patent/CN105005491B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention provides a Linux kernel and application program upgrading method and system. The Linux kernel and application program upgrading method comprises the following steps: receiving a package.gz document into the /tmp catalog of a Linux system, wherein the package.gz document comprises a kernel upgrading document and an app.gz document which comprises all application program upgrading documents; unzipping the app.gz document in the package.gz document to the /tmp catalog, and then unzipping all the documents in the app.gz document to an appointed catalog; deleting the app.gz document; unzipping the kernel upgrading document in the package.gz document to the /tmp catalog, and then writing the kernel upgrading document into an appointed flash subzone; deleting the kernel upgrading document and the paclage.gz document. The grading method can not only upgrade the kernel and application programs but also prevent the document system from damages, and meanwhile, greatly reduces the memory space occupied by the grading process.

Description

The upgrade method of a kind of linux kernel and application program and system
Technical field
The invention belongs to field of computer technology, relate to a kind of system and application program updating method, particularly relate to upgrade method and the system of a kind of linux kernel and application program.
Background technology
In Computer Applied Technology field, owing to adopting the application of embedded device of embedded Linux system increasingly extensive, how adopting easy easy-to-use method to carry out the upgrading of system, is very the key link in embedded product research and development.Because this is related to all many-sides such as life cycle, the maintenance cost of product, the perfect of product function of product.
In embedded project, common upgrading is the upgrading to kernel, application program, configuration file, file system etc.Wherein, file system comprises root file system and non-root file system.
Simultaneously a kind of existing upgrading scheme linux kernel and root file system is bundled to upgrade, and this upgrade method exists following defect:
1) software is well arranged but by linux kernel and root file system standalone upgrade, cannot cause escalation process underaction.
2) upgrade file of packing only has linux system and root file system two parts composition, cannot add more file system.
3) must restarting systems all functional modules just can be made to come into force after upgrading, new system or function cannot be made to devote oneself to work immediately when some can not restart system at any time.
Although upgrade method that the online upgrading method of the another kind of existing embedded Linux system based on MTD subregion is easy, can be widely used in the various embedded devices based on linux system, but it is only effective to the MTD district of non-root file system.
Program after also having the upgrade method of a kind of linux kernel and file system can make upgrading is devoted oneself to work immediately, but the method upgrading data packet is large, needs to take very large memory headroom in escalation process.
Summary of the invention
The shortcoming of prior art in view of the above, the object of the present invention is to provide upgrade method and the system of a kind of linux kernel and application program, dumb for the upgrade method solving existing kernel and non-root system file, to take very large memory headroom problem.
For achieving the above object and other relevant objects, the invention provides the upgrade method of a kind of linux kernel and application program, the upgrade method of described linux kernel and application program comprises: receive described package.gz file to linux system /tmp catalogue under; Wherein, described package.gz file includes kernel upgrading file and described app.gz file; Described app.gz file includes all application program updating files; Under app.gz file solution in described package.gz file being depressed into described/tmp catalogue, then under the All Files solution in described app.gz file is depressed into assigned catalogue; Delete described app.gz file; Under kernel upgrading file solution in described package.gz file being depressed into described/tmp catalogue, then flash subarea is specified in described kernel upgrading file write; Delete described kernel upgrading file and described package.gz file.
Alternatively, the upgrade method of described linux kernel and application program also comprises: utilize order flashcp and flash_erase that flash subarea is specified in described kernel upgrading file write; Or utilize order flashcp and flash_eraseall that flash subarea is specified in described kernel upgrading file write.
Alternatively, the upgrade method of described linux kernel and application program also comprises: by all application program updating file packing generations app.gz file; Kernel upgrading file and the packing of described app.gz file are generated package.gz file.
Alternatively, described application program updating file comprises app executable file and ko module file.
Alternatively, described assigned catalogue is the catalogue that linux system deposits described app executable file and ko module file.
Alternatively, the upgrade method of described linux kernel and application program also comprises: by package.gz file described in network reception to linux system /tmp catalogue under.
The present invention also provides the upgrade-system of a kind of linux kernel and application program, and the upgrade-system of described linux kernel and application program comprises: receive storage module, receive described package.gz file to linux system /tmp catalogue under; Wherein, described package.gz file includes kernel upgrading file and described app.gz file; Described app.gz file includes all application program updating files; First decompress(ion) storage module, is connected with described reception storage module, under the app.gz file solution in described package.gz file being depressed into described/tmp catalogue, then under the All Files solution in described app.gz file is depressed into assigned catalogue; First removing module, is connected with the first decompress(ion) storage module respectively with described reception storage module, deletes described app.gz file; Second decompress(ion) storage module, is connected with described first decompress(ion) storage module, under the kernel upgrading file solution in described package.gz file being depressed into described/tmp catalogue, then flash subarea is specified in described kernel upgrading file write; Second removing module, is connected with the second decompress(ion) storage module respectively with described first decompress(ion) storage module, deletes described kernel upgrading file and described package.gz file.
Alternatively, the upgrade-system of described linux kernel and application program also comprises: the first writing module, is connected with described second decompress(ion) storage module, utilizes order flashcp and flash_erase that flash subarea is specified in described kernel upgrading file write; Or second writing module, be connected with described second decompress(ion) storage module, utilize order flashcp and flash_eraseall that flash subarea is specified in described kernel upgrading file write.
Alternatively, described application program updating file comprises app executable file and ko module file.
Alternatively, described assigned catalogue is the catalogue that linux system deposits described app executable file and ko module file.
As mentioned above, the upgrade method of linux kernel of the present invention and application program and system, have following beneficial effect:
Upgrading way of the present invention both can have been upgraded kernel and application program, can also avoid destroying file system, can also greatly reduce the memory headroom shared by escalation process simultaneously.
Accompanying drawing explanation
Fig. 1 is shown as a kind of realization flow schematic diagram of the upgrade method of linux kernel described in the embodiment of the present invention and application program.
The one that Fig. 2 is shown as the upgrade-system of linux kernel described in the embodiment of the present invention and application program realizes structural representation.
The another kind that Fig. 3 is shown as the upgrade-system of linux kernel described in the embodiment of the present invention and application program realizes structural representation.
Element numbers explanation
The upgrade-system of 100 linux kernels and application program
110 receive storage module
120 first decompress(ion) storage module
130 first removing modules
140 second decompress(ion) storage module
150 second removing modules
160 first writing modules
170 second writing modules
S11 ~ S17 step
Embodiment
Below by way of specific instantiation, embodiments of the present invention are described, those skilled in the art the content disclosed by this instructions can understand other advantages of the present invention and effect easily.The present invention can also be implemented or be applied by embodiments different in addition, and the every details in this instructions also can based on different viewpoints and application, carries out various modification or change not deviating under spirit of the present invention.It should be noted that, when not conflicting, the feature in following examples and embodiment can combine mutually.
It should be noted that, the diagram provided in following examples only illustrates basic conception of the present invention in a schematic way, then only the assembly relevant with the present invention is shown in graphic but not component count, shape and size when implementing according to reality is drawn, it is actual when implementing, and the kenel of each assembly, quantity and ratio can be a kind of change arbitrarily, and its assembly layout kenel also may be more complicated.
Refer to Fig. 1, the invention provides the upgrade method of a kind of linux kernel and application program, the upgrade method of described linux kernel and application program comprises:
S11, by all application program updating file packing generations app.gz file.Described application program updating file comprises app executable file and ko module file.
S12, generates package.gz file by kernel upgrading file and the packing of described app.gz file.Namely described package.gz file is a upgrading AKU.
What step S11 to S12 described is the generative process of upgrading data packet.
S13, receive described package.gz file to linux system /tmp catalogue under.Wherein, described package.gz file includes kernel upgrading file and described app.gz file; Described app.gz file includes all application program updating files.This step can by package.gz file described in local reception to linux system /tmp catalogue under, also can by package.gz file described in network reception to linux system /tmp catalogue under.Linux system /tmp catalogue uses memory headroom, therefore can not take flash space.
S14, under being depressed into described/tmp catalogue, then under the All Files solution in described app.gz file is depressed into assigned catalogue by the app.gz file solution in described package.gz file.Described assigned catalogue is the catalogue that linux system deposits described app executable file and ko module file, and this catalogue must be file system path.
S15, deletes described app.gz file.
S16, under the kernel upgrading file solution in described package.gz file being depressed into described/tmp catalogue, then specifies flash subarea by described kernel upgrading file write.The specific implementation process of this step comprises: utilize order flashcp and flash_erase that flash subarea is specified in described kernel upgrading file write; Or utilize order flashcp and flash_eraseall that flash subarea is specified in described kernel upgrading file write.Namely described appointment flash subarea refers to the subregion depositing kernel file in flash.
S17, deletes described kernel upgrading file and described package.gz file.
What step S13 to S17 described is after receiving upgrading data packet, to the process that kernel and application program are upgraded.
Upgrading way of the present invention both can have been upgraded kernel and application program, can also avoid destroying file system, can also greatly reduce the memory headroom shared by escalation process simultaneously.
The protection domain of the upgrade method of linux kernel of the present invention and application program is not limited to the step execution sequence that the present embodiment is enumerated, and the step increase and decrease of the prior art that every principle according to the present invention is done, step are replaced the scheme realized and be all included in protection scope of the present invention.
The present invention also provides the upgrade-system of a kind of linux kernel and application program; the upgrade-system of described linux kernel and application program can realize the upgrade method of linux kernel of the present invention and application program; but the implement device of the upgrade method of linux kernel of the present invention and application program includes but not limited to the structure of the upgrade-system of the linux kernel that the present embodiment is enumerated and application program; the malformation of the prior art that every principle according to the present invention is done and replacement, be all included in protection scope of the present invention.
Shown in Figure 2, the upgrade-system 100 of described linux kernel and application program comprises: receive storage module 110, first decompress(ion) storage module 120, first removing module 130, second decompress(ion) storage module 140, second removing module 150.
Described reception storage module 110 receive described package.gz file to linux system /tmp catalogue under; Wherein, described package.gz file includes kernel upgrading file and described app.gz file; Described app.gz file includes all application program updating files.Described application program updating file comprises app executable file and ko module file.
Described first decompress(ion) storage module 120 is connected with described reception storage module 110, under the app.gz file solution in described package.gz file being depressed into described/tmp catalogue, then under the All Files solution in described app.gz file is depressed into assigned catalogue.Described assigned catalogue is the catalogue that linux system deposits described app executable file and ko module file.
Described first removing module 130 is connected with the first decompress(ion) storage module 120 respectively with described reception storage module 110, deletes described app.gz file.
Described second decompress(ion) storage module 140 is connected with described first decompress(ion) storage module 120, under the kernel upgrading file solution in described package.gz file being depressed into described/tmp catalogue, then flash subarea is specified in described kernel upgrading file write.
Described second removing module 150 is connected with the second decompress(ion) storage module 140 respectively with described first decompress(ion) storage module 120, deletes described kernel upgrading file and described package.gz file.
Further, shown in Figure 3, the upgrade-system 100 of described linux kernel and application program also comprises: the first writing module 160, second writing module 170.
Described first writing module 160 is connected with described second decompress(ion) storage module 140, utilizes order flashcp and flash_erase that flash subarea is specified in described kernel upgrading file write.
Described second writing module 170 is connected with described second decompress(ion) storage module 140, utilizes order flashcp and flash_eraseall that flash subarea is specified in described kernel upgrading file write.
The present invention mainly solves in linux operating system, the problem of simultaneously upgrade kernel and application program.The present invention passes to Linux system by network after kernel and application program being packed, then kernel and application program are upgraded to respective assigned address respectively.
Tool of the present invention has the following advantages:
1) both can to have upgraded kernel subregion, also scalable application program.
2) upgrading data packet is little, and escalation process committed memory space is little.
3) escalation process is when proceeding to the application program updating stage, also can not destroy the integrality of file system even if make a mistake.
In sum, the present invention effectively overcomes various shortcoming of the prior art and tool high industrial utilization.
Above-described embodiment is illustrative principle of the present invention and effect thereof only, but not for limiting the present invention.Any person skilled in the art scholar all without prejudice under spirit of the present invention and category, can modify above-described embodiment or changes.Therefore, such as have in art usually know the knowledgeable do not depart from complete under disclosed spirit and technological thought all equivalence modify or change, must be contained by claim of the present invention.

Claims (10)

1. a upgrade method for linux kernel and application program, is characterized in that, the upgrade method of described linux kernel and application program comprises:
Receive described package.gz file to linux system /tmp catalogue under; Wherein, described package.gz file includes kernel upgrading file and described app.gz file; Described app.gz file includes all application program updating files;
Under app.gz file solution in described package.gz file being depressed into described/tmp catalogue, then under the All Files solution in described app.gz file is depressed into assigned catalogue;
Delete described app.gz file;
Under kernel upgrading file solution in described package.gz file being depressed into described/tmp catalogue, then flash subarea is specified in described kernel upgrading file write;
Delete described kernel upgrading file and described package.gz file.
2. the upgrade method of linux kernel according to claim 1 and application program, is characterized in that, the upgrade method of described linux kernel and application program also comprises:
Utilize order flashcp and flash_erase that flash subarea is specified in described kernel upgrading file write; Or
Utilize order flashcp and flash_eraseall that flash subarea is specified in described kernel upgrading file write.
3. the upgrade method of linux kernel according to claim 1 and application program, is characterized in that, the upgrade method of described linux kernel and application program also comprises:
By all application program updating file packing generations app.gz file;
Kernel upgrading file and the packing of described app.gz file are generated package.gz file.
4. the upgrade method of linux kernel according to claim 1 and application program, is characterized in that: described application program updating file comprises app executable file and ko module file.
5. the upgrade method of linux kernel according to claim 4 and application program, is characterized in that: described assigned catalogue is the catalogue that linux system deposits described app executable file and ko module file.
6. the upgrade method of linux kernel according to claim 1 and application program, is characterized in that, the upgrade method of described linux kernel and application program also comprises: by package.gz file described in network reception to linux system /tmp catalogue under.
7. a upgrade-system for linux kernel and application program, is characterized in that, the upgrade-system of described linux kernel and application program comprises:
Receive storage module, receive described package.gz file to linux system /tmp catalogue under; Wherein, described package.gz file includes kernel upgrading file and described app.gz file; Described app.gz file includes all application program updating files;
First decompress(ion) storage module, is connected with described reception storage module, under the app.gz file solution in described package.gz file being depressed into described/tmp catalogue, then under the All Files solution in described app.gz file is depressed into assigned catalogue;
First removing module, is connected with the first decompress(ion) storage module respectively with described reception storage module, deletes described app.gz file;
Second decompress(ion) storage module, is connected with described first decompress(ion) storage module, under the kernel upgrading file solution in described package.gz file being depressed into described/tmp catalogue, then flash subarea is specified in described kernel upgrading file write;
Second removing module, is connected with the second decompress(ion) storage module respectively with described first decompress(ion) storage module, deletes described kernel upgrading file and described package.gz file.
8. the upgrade-system of linux kernel according to claim 7 and application program, is characterized in that, the upgrade-system of described linux kernel and application program also comprises:
First writing module, is connected with described second decompress(ion) storage module, utilizes order flashcp and flash_erase that flash subarea is specified in described kernel upgrading file write; Or
Second writing module, is connected with described second decompress(ion) storage module, utilizes order flashcp and flash_eraseall that flash subarea is specified in described kernel upgrading file write.
9. the upgrade-system of linux kernel according to claim 7 and application program, is characterized in that: described application program updating file comprises app executable file and ko module file.
10. the upgrade-system of linux kernel according to claim 7 and application program, is characterized in that: described assigned catalogue is the catalogue that linux system deposits described app executable file and ko module file.
CN201510489419.2A 2015-08-11 2015-08-11 The upgrade method and system of a kind of linux kernel and application program Active CN105005491B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510489419.2A CN105005491B (en) 2015-08-11 2015-08-11 The upgrade method and system of a kind of linux kernel and application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510489419.2A CN105005491B (en) 2015-08-11 2015-08-11 The upgrade method and system of a kind of linux kernel and application program

Publications (2)

Publication Number Publication Date
CN105005491A true CN105005491A (en) 2015-10-28
CN105005491B CN105005491B (en) 2018-06-29

Family

ID=54378171

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510489419.2A Active CN105005491B (en) 2015-08-11 2015-08-11 The upgrade method and system of a kind of linux kernel and application program

Country Status (1)

Country Link
CN (1) CN105005491B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108572836A (en) * 2018-06-01 2018-09-25 珠海格力电器股份有限公司 Based on Embedded update method and device
CN110554934A (en) * 2019-09-06 2019-12-10 山东超越数控电子股份有限公司 embedded equipment and system partitioning and upgrading method thereof
WO2021139727A1 (en) * 2020-01-09 2021-07-15 炬星科技(深圳)有限公司 Software upgrade method for robot, and upgrade server, robot and storage medium
CN113821273A (en) * 2021-09-23 2021-12-21 武汉深之度科技有限公司 Application program running method, computing device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101169726A (en) * 2007-11-28 2008-04-30 浪潮电子信息产业股份有限公司 Embedded type Linux system on-line upgrading method based on MTD partition
CN103645918A (en) * 2013-12-10 2014-03-19 深圳市道通科技有限公司 Software upgrading method and device for industrial endoscope
CN103777987A (en) * 2014-01-26 2014-05-07 宝龙计算机***(湖南)有限公司 Method and device for upgrading unix-like operating system
CN104750527A (en) * 2015-03-27 2015-07-01 广州快飞计算机科技有限公司 Embedded system upgrading method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101169726A (en) * 2007-11-28 2008-04-30 浪潮电子信息产业股份有限公司 Embedded type Linux system on-line upgrading method based on MTD partition
CN103645918A (en) * 2013-12-10 2014-03-19 深圳市道通科技有限公司 Software upgrading method and device for industrial endoscope
CN103777987A (en) * 2014-01-26 2014-05-07 宝龙计算机***(湖南)有限公司 Method and device for upgrading unix-like operating system
CN104750527A (en) * 2015-03-27 2015-07-01 广州快飞计算机科技有限公司 Embedded system upgrading method and system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108572836A (en) * 2018-06-01 2018-09-25 珠海格力电器股份有限公司 Based on Embedded update method and device
CN110554934A (en) * 2019-09-06 2019-12-10 山东超越数控电子股份有限公司 embedded equipment and system partitioning and upgrading method thereof
WO2021139727A1 (en) * 2020-01-09 2021-07-15 炬星科技(深圳)有限公司 Software upgrade method for robot, and upgrade server, robot and storage medium
CN113821273A (en) * 2021-09-23 2021-12-21 武汉深之度科技有限公司 Application program running method, computing device and storage medium
CN113821273B (en) * 2021-09-23 2023-10-13 武汉深之度科技有限公司 Application program running method, computing device and storage medium

Also Published As

Publication number Publication date
CN105005491B (en) 2018-06-29

Similar Documents

Publication Publication Date Title
US10824442B2 (en) Method and apparatus for loading multiple differing versions of a native library into a native environment
US11016761B2 (en) Container based application reification
CN107733985B (en) Method and device for deploying functional components of cloud computing system
EP3279812B1 (en) Techniques for data extraction
US11010401B2 (en) Efficient snapshot generation of data tables
US10496601B1 (en) Efficient file system parsing using snap based replication
CN105005491A (en) Linux kernel and application program upgrading method and system
US11681507B2 (en) Composable context menus
JP2019510315A (en) Application updating method and apparatus for mobile terminal
CN103246578A (en) Method and browser for processing collapse of application software
US9824000B1 (en) Testing calling code dynamically with random error injection based on user-specified configuration
US11093113B2 (en) User interface development
CN103761107A (en) Software package customizing device and method
US20160253376A1 (en) Updating Object Attributes in a Lock-Coupled Namespace Traversal
CN104468419A (en) Method and system for recovering configuration of interchanger and interchanger
US10496433B2 (en) Modification of context saving functions
WO2017017836A1 (en) Operation automation device and method, and storage medium
US10338891B2 (en) Migration between model elements of different types in a modeling environment
US9400663B2 (en) Managing middleware using an application manager
US9471244B2 (en) Data sharing using difference-on-write
CN104951244A (en) Data access method and data access equipment
US9766940B2 (en) Enabling dynamic job configuration in mapreduce
CN102063334A (en) Method and device for quickly copying file
CN105204883A (en) Plug-in loading processing method and device
CN104751026A (en) Software protection method and software application method of android system, and related devices

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20201124

Address after: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

Address before: 201616 Shanghai city Songjiang District Sixian Road No. 3666

Patentee before: Phicomm (Shanghai) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20201216

Address after: 8319 Yanshan Road, Bengbu City, Anhui Province

Patentee after: Bengbu Lichao Information Technology Co.,Ltd.

Address before: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210310

Address after: 313000 room 1019, Xintiandi commercial office, Yishan street, Wuxing District, Huzhou, Zhejiang, China

Patentee after: Huzhou YingLie Intellectual Property Operation Co.,Ltd.

Address before: 8319 Yanshan Road, Bengbu City, Anhui Province

Patentee before: Bengbu Lichao Information Technology Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221208

Address after: No. 430-1, Floor 4, Building 1, No. 39, Yuanda Road, Haidian District, Beijing 100089

Patentee after: Beijing Boyu Future Technology Co.,Ltd.

Address before: 313000 room 1019, Xintiandi commercial office, Yishan street, Wuxing District, Huzhou, Zhejiang, China

Patentee before: Huzhou YingLie Intellectual Property Operation Co.,Ltd.