CN104484207A - Mirror image upgrading method for switch, linux operation system and switch - Google Patents
Mirror image upgrading method for switch, linux operation system and switch Download PDFInfo
- Publication number
- CN104484207A CN104484207A CN201410806770.5A CN201410806770A CN104484207A CN 104484207 A CN104484207 A CN 104484207A CN 201410806770 A CN201410806770 A CN 201410806770A CN 104484207 A CN104484207 A CN 104484207A
- Authority
- CN
- China
- Prior art keywords
- file
- switch
- mirror image
- image
- kernel
- 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
Links
Abstract
The invention discloses a mirror image upgrading method for a switch. The method comprises the following steps: generating a kernel mirror image file and a file system mirror image file; forming the kernel mirror image file and the file system mirror image file into a mirror image file capable of being used directly updating the mirror image of the switch; updating the mirror image file capable of being used for directly updating the mirror image of the switch to a flash partition of the switch. According to the method provided by the invention, the target files compiled by sdk, hsl and FOS are automatically packaged generate the file system mirror image file through a script, then the file system mirror image file and the kernel mirror image file generate an upgradable mirror image through the script, and the upgradable mirror image is directly updated to the flash partition, so the mirror image upgrading of the switch is finished; the time is saved; the operation is easy and convenient; the working efficiency is increased.
Description
Technical field
The present invention relates to a kind of image upgrade technology of switch of linux system, be specifically related to a kind of image upgrade method of switch and applicable linux operating system and switch.
Background technology
Along with the requirement of the present various performances to enterprise scale switches is more and more stricter, switch research and development slip-stick artist can solve increasing problem, solve validation problem, just mean the image file of switch of will upgrading frequently.
At present, the image upgrade method adopted first compiles linux kernel, this linux kernel refers to that provides a hardware abstraction layer, disk and file system control, the system software of the functions such as multitask, and compression generates kernel mirror image file vmlinuxz, first being upgraded by kernel mirror image file is loaded in flash subarea, again by SDK (Software Development Kit) (Software Development Kit, and hsl(Hardware System Layer sdk), hardware system layer), the file destination of the application protocol module of each application layer that Zebos compiles out.Then artificially manually input packing compress order by tool of compression, one by one to file destination carry out packing compression, spanned file system image keystone.jffs2, finally by burned for file system mirror flash subarea, whole escalation process just completes.Such escalation process is complicated, and slip-stick artist debugs time and effort consuming, inefficiency.
Summary of the invention
The invention provides a kind of image upgrade method of switch and applicable linux operating system and switch, save time, convenient and easy, also improve work efficiency.
For achieving the above object, the present invention's public affairs provide a kind of image upgrade method of switch, and be characterized in, the method comprises:
Generate kernel mirror image file and file system mirror file;
Kernel mirror image file and file system mirror file are packed and compresses, generate the image file that can be used for the direct image upgrade of switch;
The image file that can be used for the direct image upgrade of switch is upgraded to the flash subarea of switch.
Above-mentioned generation kernel mirror image file comprises:
Compiling linux kernel;
Linux kernel after compiling is carried out being compressed into kernel mirror image file.
Above-mentioned spanned file system image file comprises:
Sdk and hsl compiling generates first object file;
First operating system compiling generation second file destination;
First object file and the second file destination carry out packing compression, spanned file system image file.
Above-mentioned first object file and the second file destination carry out packing compression automatically by the script comprising packing compress order.
Above-mentioned first operating system is embedded OS.
Above-mentioned kernel mirror image file and file system mirror file carry out packing by the script that comprises compress order of packing and compress, and automatically generate the image file that can be used for the direct image upgrade of switch.
A switch for linux operating system, is characterized in, the switch of this linux operating system is suitable for the image upgrade method of above-mentioned switch.
A kind of linux operating system, be characterized in, this linux operating system comprises switch, and switch is suitable for the image upgrade method of above-mentioned switch.
Image upgrade method and the applicable linux operating system of switch of the present invention are compared with the image upgrade technology of the switch of prior art with switch, its advantage is, the present invention to be packed spanned file system image file automatically by the file destination that sdk, hsl and FOS compile out by script, again by script by file system mirror file and the upgradeable mirror image of kernel mirror image file generated, directly upgradeable image upgrade can be completed the image upgrade of switch to flash subarea, save time, convenient and easy, increase work efficiency.
Accompanying drawing explanation
Fig. 1 is the method flow diagram of the image upgrade method of a kind of switch of the present invention.
Embodiment
Below in conjunction with accompanying drawing, further illustrate specific embodiments of the invention.
As shown in Figure 1, be a kind of embodiment being applicable to the image upgrade method of the switch of linux operating system, the method comprises:
Step 1, generation linux kernel mirror image file vmlinuxz.
The kernel of step 1.1, compiling linux operating system.First specify compiling path, select the parameter that some will compile, use the kernel of make order to linux operating system to compile.
Step 1.2, by compiling after kernel carry out being compressed into kernel mirror image file vmlinuxz.
Step 1.3, first being upgraded by kernel mirror image file vmlinuxz is loaded into flash subarea.
Step 2, sdk(Software Development Kit, Software tool kit) and hsl(Hardware System Layer, hardware system layer) compiling generate suffix be .ko(kernel object, kernel objects) first object file, i.e. .ko file.
Those .ko files are Dynamic link library files that linux2.6 kernel uses, and this .ko file is some drivers of exchange chip, for the normal work of driving chip, load kernel module when linux system starts.
Current ko file has: hsl_bcm.ko(compiles the ko that hsl generates), the ko of linux-bcm-diag.ko (ko of debugging module), linux-kernel-bde.ko(kernel), the ko of linux-bcm-core.ko (ko of driver), linux-uk-proxy.ko(agency) etc.
Step 3, the first operating system compile out the second file destination, and this second file destination is the module of some application layers.
In the present embodiment, the first operating system adopts FOS(feixun operating system) striking news operating system, this FOS function class is like Zebos operating system.
A lot of executable files can be generated after compiling FOS, these executable files are exactly the module of some concrete application layers of hereinafter mentioned generation, be respectively: the application protocol module of the application layers such as authd, imi, lacpd, mstpd, nldpd, nsm, ospfd, pdmd, pimd, ripd, webserver, these modules are that switch normally works the agreement of required operation, the loading success only having these modules normally complete, switch could realize corresponding function.
Wherein, the driver of sdk mainly exchange chip.
Hsl connects the middle layer of FOS and sdk, when that is the application program module on upper strata needs the relative program calling bottom sdk, all can carry out transfer by hsl layer, but it is also belong to kernel module.
The difference that the first object file that sdk and hsl compiling generates and FOS compile the second file destination generated is, is in the different levels of switch, but is all that switch normally runs necessary file destination.What Sdk and hsl compiling generated is. ko file, is in bottom, and FOS compiling generation is some executable application program modules, is in upper strata, namely application layer.
The first object file that step 4, sdk, hsl and FOS compiling generate and the second file destination generate the file system mirror file of keystone.jffs2 by name by the compression of automatically packing of the script of a compression of carrying out packing.
Here, first object file and the second file destination are carried out the script compressed of packing, specifically use tar-cjvf tfile sfile order, carry out packing compression.Wherein cjvf indicates to want pack compression and the file type after compressing, and Tfile is exactly the filename generated after packing compression, and sfile is exactly source file destination, i.e. those file destinations that are packaged and compression.
Step 5, kernel mirror image file vmlinuxz and file system mirror file keystone.jffs2 are automatically packed by the script that compresses of carrying out packing and compress, and generate the image file that can be used for the direct image upgrade of switch that a suffix is .gz.
Here, script in the script that kernel mirror image file vmlinuxz and file system mirror file keystone.jffs2 being carried out packs compresses and step 4 is the same, be all adopt tar order to compress, just source file destination sfile is different with the filename Tfile generated after packing compression.
The feature that can be used for the image file of the direct image upgrade of switch is exactly, it is the new Jffs2 file system kernel mirror image file of above-mentioned a lot of module and .KO file composition and file system mirror file packing compression generated, can save us so progressively to the application module on upper strata and the flash of write one by one of those ko file hands, save time cost.
Step 6, by tftp file transfer conveyance, by can be used for the flash subarea of the burned switch of image file that switch mirror image is directly upgraded, complete the upgrading of switch.
The present invention also discloses a kind of switch of linux operating system, and the switch of this linux operating system is applicable to the image upgrade method of above-mentioned switch.
The present invention also discloses a kind of linux operating system, and this linux operating system includes switch, and this switch is applicable to the image upgrade method of above-mentioned switch.
Although content of the present invention has done detailed introduction by above preferred embodiment, will be appreciated that above-mentioned description should not be considered to limitation of the present invention.After those skilled in the art have read foregoing, for multiple amendment of the present invention and substitute will be all apparent.Therefore, protection scope of the present invention should be limited to the appended claims.
Claims (8)
1. an image upgrade method for switch, it is characterized in that, the method comprises:
Generate kernel mirror image file and file system mirror file;
Kernel mirror image file and file system mirror file are packed and compresses, generate the image file that can be used for the direct image upgrade of switch;
The image file that can be used for the direct image upgrade of switch is upgraded to the flash subarea of switch.
2. the image upgrade method of switch as claimed in claim 1, it is characterized in that, described generation kernel mirror image file comprises:
Compiling linux kernel;
Linux kernel after compiling is carried out being compressed into kernel mirror image file.
3. the image upgrade method of switch as claimed in claim 1, it is characterized in that, described spanned file system image file comprises:
Sdk and hsl compiling generates first object file;
First operating system compiling generation second file destination;
First object file and the second file destination carry out packing compression, spanned file system image file.
4. the image upgrade method of switch as claimed in claim 3, is characterized in that, described first object file and the second file destination carry out packing compression automatically by the script comprising packing compress order.
5. the image upgrade method of switch as claimed in claim 3, it is characterized in that, described first operating system is embedded OS.
6. as the image upgrade method of the switch in claim 1 to 5 as described in any one claim, it is characterized in that, described kernel mirror image file and file system mirror file carry out packing by the script that comprises compress order of packing and compress, and automatically generate the image file that can be used for the direct image upgrade of switch.
7. a switch for linux operating system, is characterized in that, the switch of this linux operating system is suitable for the image upgrade method as switch as described in any one claim in claim 1 to 6.
8. a linux operating system, is characterized in that, this linux operating system comprises switch, and described switch is suitable for the image upgrade method as switch as described in any one claim in claim 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410806770.5A CN104484207A (en) | 2014-12-23 | 2014-12-23 | Mirror image upgrading method for switch, linux operation system and switch |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410806770.5A CN104484207A (en) | 2014-12-23 | 2014-12-23 | Mirror image upgrading method for switch, linux operation system and switch |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104484207A true CN104484207A (en) | 2015-04-01 |
Family
ID=52758751
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410806770.5A Pending CN104484207A (en) | 2014-12-23 | 2014-12-23 | Mirror image upgrading method for switch, linux operation system and switch |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104484207A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105224378A (en) * | 2015-10-27 | 2016-01-06 | 上海斐讯数据通信技术有限公司 | The Compilation Method of software development kit, system and the switch device that is suitable for |
CN105242875A (en) * | 2015-09-17 | 2016-01-13 | 浪潮集团有限公司 | Server raid batch configuration method |
CN105243321A (en) * | 2015-10-27 | 2016-01-13 | 成都卫士通信息产业股份有限公司 | Container virtualization technology based cipher machine, implementation method and working method therefor |
CN109165048A (en) * | 2018-10-11 | 2019-01-08 | 四川长虹电器股份有限公司 | Quick start method after upgrading based on Android system |
CN113286090A (en) * | 2021-06-07 | 2021-08-20 | 经纬恒润(天津)研究开发有限公司 | Camera multi-drive dynamic configuration method, loading method and related device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101789980A (en) * | 2010-03-05 | 2010-07-28 | 武汉烽火网络有限责任公司 | Batch upgrading method based on cluster network |
CN102780578A (en) * | 2012-05-29 | 2012-11-14 | 上海斐讯数据通信技术有限公司 | Updating system and updating method for operating system for network equipment |
CN103593216A (en) * | 2013-11-12 | 2014-02-19 | 上海斐讯数据通信技术有限公司 | Method for making system files of ubi format into factory burn image files |
CN103777953A (en) * | 2014-01-26 | 2014-05-07 | 宝龙计算机系统(湖南)有限公司 | Method and device for manufacturing Unix-like operating system upgrade patch |
-
2014
- 2014-12-23 CN CN201410806770.5A patent/CN104484207A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101789980A (en) * | 2010-03-05 | 2010-07-28 | 武汉烽火网络有限责任公司 | Batch upgrading method based on cluster network |
CN102780578A (en) * | 2012-05-29 | 2012-11-14 | 上海斐讯数据通信技术有限公司 | Updating system and updating method for operating system for network equipment |
CN103593216A (en) * | 2013-11-12 | 2014-02-19 | 上海斐讯数据通信技术有限公司 | Method for making system files of ubi format into factory burn image files |
CN103777953A (en) * | 2014-01-26 | 2014-05-07 | 宝龙计算机系统(湖南)有限公司 | Method and device for manufacturing Unix-like operating system upgrade patch |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105242875A (en) * | 2015-09-17 | 2016-01-13 | 浪潮集团有限公司 | Server raid batch configuration method |
CN105224378A (en) * | 2015-10-27 | 2016-01-06 | 上海斐讯数据通信技术有限公司 | The Compilation Method of software development kit, system and the switch device that is suitable for |
CN105243321A (en) * | 2015-10-27 | 2016-01-13 | 成都卫士通信息产业股份有限公司 | Container virtualization technology based cipher machine, implementation method and working method therefor |
CN105224378B (en) * | 2015-10-27 | 2018-06-19 | 上海斐讯数据通信技术有限公司 | Compilation Method, system and the switch device being applicable in of software development kit |
CN105243321B (en) * | 2015-10-27 | 2018-08-14 | 成都卫士通信息产业股份有限公司 | A kind of cipher machine, realization and working method based on container virtualization technology |
CN109165048A (en) * | 2018-10-11 | 2019-01-08 | 四川长虹电器股份有限公司 | Quick start method after upgrading based on Android system |
CN113286090A (en) * | 2021-06-07 | 2021-08-20 | 经纬恒润(天津)研究开发有限公司 | Camera multi-drive dynamic configuration method, loading method and related device |
CN113286090B (en) * | 2021-06-07 | 2023-07-18 | 经纬恒润(天津)研究开发有限公司 | Multi-drive dynamic configuration method, loading method and related device for camera |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11467854B2 (en) | Method and apparatus for loading multiple differing versions of a native library into a native environment | |
CN108897562B (en) | Installation package updating method, device, medium and equipment | |
CN104484207A (en) | Mirror image upgrading method for switch, linux operation system and switch | |
CN106775723B (en) | Android platform-based system firmware customization method and Android device | |
CN110377290B (en) | Method, device and equipment for compiling target engineering | |
US7904484B2 (en) | Incremental packaging | |
CN104714788A (en) | Method and device for automatically generating software installation package | |
CN106648724B (en) | Application program hot repair method and terminal | |
CN104375849A (en) | Core loading method and device | |
CN108897547B (en) | Software automation deployment method and device | |
CN103577211A (en) | Novel packaging and burning as well as updating methods for Android ROM (read only memory) system | |
CN103309706A (en) | Memory file system preparation method and unit based on Linux operation system | |
CN104267978A (en) | Method and device for generating differential packet | |
CN103761107A (en) | Software package customizing device and method | |
CN115185531A (en) | Application compiling method and device, computing equipment and storage medium | |
CN110659031A (en) | Compiling method and device of application program, electronic equipment and storage medium | |
CN104866293A (en) | Method and device for extending Android application program function | |
CN101030241A (en) | Method and system based on Keil C51 software protecting development | |
CN105468428A (en) | Android source code compiling method and system | |
CN115629971A (en) | Application development system and method | |
CN111985055A (en) | Model packaging method and device and electronic equipment | |
CN103645888A (en) | System and method for automatically building operation system | |
CN101169726A (en) | Embedded type Linux system on-line upgrading method based on MTD partition | |
CN105045595A (en) | Plug-in integrating method and plug-in integrating device | |
CN108536444B (en) | Plug-in compiling method and device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20150401 |