CN104407887A - Method and device for dynamically loading programs of kernel module of embedded type system - Google Patents

Method and device for dynamically loading programs of kernel module of embedded type system Download PDF

Info

Publication number
CN104407887A
CN104407887A CN201410621445.1A CN201410621445A CN104407887A CN 104407887 A CN104407887 A CN 104407887A CN 201410621445 A CN201410621445 A CN 201410621445A CN 104407887 A CN104407887 A CN 104407887A
Authority
CN
China
Prior art keywords
program
control board
veneer
control panel
master control
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
CN201410621445.1A
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.)
Aerospace Science and Industry Shenzhen Group Co Ltd
Original Assignee
Aerospace Science and Industry Shenzhen Group 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 Aerospace Science and Industry Shenzhen Group Co Ltd filed Critical Aerospace Science and Industry Shenzhen Group Co Ltd
Priority to CN201410621445.1A priority Critical patent/CN104407887A/en
Publication of CN104407887A publication Critical patent/CN104407887A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention relates to the technical field of embedded type systems, and provides a method for dynamically loading programs of a kernel module of an embedded type system. The method comprises the following steps of compiling a kernel program for a main control board and a kernel program for an auxiliary control board; detecting whether a single board of a to-be-outputted program is the main control board or the auxiliary control board; when the single board is the main control board, loading the corresponding kernel program into the main control board; when the single board is the auxiliary control board, loading the corresponding kernel program into the auxiliary control board, adopting the dynamic kernel module loading scheme, and detecting the type of the single board, so as to enable the one-time compiling program to run on different single boards of the same hardware platform or on different versions of single boards. The method has the advantages that the version maintenance cost of the kernel programs is reduced, and the development efficiency is improved.

Description

A kind of method of embedded system kernel module dynamic linker and device
Technical field
The present invention relates to embedded system technology field, particularly relate to a kind of method and device of embedded system kernel module dynamic linker.
Background technology
For embedded system, kernel module is generally the loading being realized kernel module by the method that definition precompile is grand.Such as in LINUX and VXWORKS system, by precompile macro definition, kernel module determines whether that whether a certain particular module is compiled into kernel neutralization loads during at system cloud gray model.Wherein, be static implementation method by precompile macro definition, the behavior of kernel is just determined at compiling duration, cannot modify after having compiled.Under same hardware platform, when there is multiple version, need maintenance one group of compiler toggle, compile out the kernel file of each version respectively, the kernel file of each version can only be burnt in corresponding hardware version, the mode of this static compilation loading kernel module reduces the efficiency of development and production simultaneously; For distribution power automation terminal product, distribution power automation terminal embedded device forms primarily of master control board with from control panel, the operation that master control board primary responsibility coordinates whole distribution power automation terminal controls and externally communication, and is responsible for the collection of data from control panel and data is processed rear report to mainboard.Mainboard and adopt floor module to add the hardware structure of core board module from plate, wherein core board module is general, can form a complete veneer with master control board base plate or from control panel base plate.Wherein, the equipment (as network interface, extended serial port etc.) of the main integrated and external communication of master control board base plate, and be integrated with the relevant external unit of data acquisition from control panel.If adopt the mode of static loading, then need maintenance two groups of compiler toggles, one group is used for master control board, one group is used for from control panel, thus compile out respectively for the kernel program of master control board with for the kernel program from control panel, and these two programs can not be exchanged, because core board is general, and the program after compiling needs to be distinguished, have a strong impact on the efficiency of production and added the probability of makeing mistakes.In sum, exist in prior art owing to needing the program after to compiling to be distinguished and have impact on the problem of the efficiency of production.
Summary of the invention
The object of the present invention is to provide a kind of method and device of embedded system kernel module dynamic linker, be intended to solve for existing in prior art owing to needing the program after to compiling to be distinguished and have impact on the problem of the efficiency of production.
The present invention is achieved in that a kind of method of embedded system kernel module dynamic linker, and the method for described loading procedure comprises the following steps:
Compiling is for the kernel program of master control board with for the kernel program from control panel;
The veneer detecting program to be output is master control board or from control panel;
When the described veneer of detection is master control board, load corresponding kernel program to described master control board;
When the described veneer of detection is from control panel, load corresponding kernel program to described from control panel.
The veneer of described program to be output is master control board or is specially from the step of control panel:
Obtain the identification number of the veneer of described program to be output;
Judge that the veneer of described program to be output is master control board or from control panel according to described identification number.
The veneer of described program to be output is master control board or is specially from the step of control panel:
The type model that the veneer receiving described program to be output produces;
Judge that the veneer of described program to be output is master control board or from control panel according to described type signal.
The described step loading corresponding kernel program to described master control board is specially:
Jump to master control board program and load entrance, by described entry address loading procedure.
Describedly to be specially to the described step loading corresponding kernel program from control panel:
Jump to and load entrance, by described entry address loading procedure from control panel program.
The present invention also provides a kind of device of embedded system kernel module dynamic linker, and the device of described dynamic linker comprises collector and detection module;
Described collector compiling is for the kernel program of master control board with for the kernel program from control panel;
The veneer that described detection module detects program to be output is master control board or from control panel;
When to detect described veneer be master control board to described detection module, described collector loads corresponding kernel program to described master control board, when to detect described veneer be from control panel to described detection module, loads corresponding kernel program to described from control panel.
The veneer that described detection module detects program to be output is master control board or is specially from control panel:
Obtain the identification number of the veneer of described program to be output;
Judge that the veneer of described program to be output is master control board or from control panel according to described identification number.
The veneer that described detection module detects program to be output is master control board or is specially from control panel:
The type model that the veneer receiving described program to be output produces;
Judge that the veneer of described program to be output is master control board or from control panel according to described type signal.
Described collector loads corresponding kernel program to described master control board and is specially:
Jump to master control board program and load entrance, by described entry address loading procedure.
Described collector loads corresponding kernel program from control panel be specially to described:
Jump to and load entrance, by described entry address loading procedure from control panel program.
The invention provides a kind of method and device of embedded system kernel module dynamic linker, have employed dynamic kernel module loading scheme, the type of veneer is detected, make different veneer under same hardware platform of the program that once compiles or different single board editions run, decrease the release maintenance cost of kernel program, thus improve the efficiency of exploitation, in addition, can same kernel program can be burnt on different veneers, make the burning of kernel program and upgrade simpler, decrease the probability of makeing mistakes, improve the efficiency of production and the cost of upgrade maintenance.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the process flow diagram of the method for a kind of embedded system kernel module dynamic linker that an embodiment of the present invention provides;
Fig. 2 is the process flow diagram of the method for a kind of embedded system kernel module dynamic linker that the another kind of embodiment of the present invention provides;
Fig. 3 is the process flow diagram of the device of a kind of embedded system kernel module dynamic linker that an embodiment of the present invention provides.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
In order to technical scheme of the present invention is described, be described below by specific embodiment.
An embodiment of the present invention provides a kind of method of embedded system kernel module dynamic linker, and as shown in Figure 1, the method for this dynamic linker comprises the following steps:
Step S101. compiling is for the kernel program of master control board with for the kernel program from control panel.
The veneer that step S102. detects program to be output is master control board or from control panel.
In the present embodiment, concrete, can to the veneer output detections signal of program to be output, the board type signal returned according to the veneer of this program to be output judges that the veneer of this program to be output is master control board or from control panel, this board type signal can by being set in advance in the marking signal on this veneer, also can produce circuit by the type signal on veneer and produce type signal corresponding to this veneer, the type signal generating circuit realizes by upper pull down resistor.
Step S103., when described veneer is master control board, loads corresponding kernel program to described master control board.
In the present embodiment, when detecting that veneer is master control board, by the burning program of the master control board of compiling in master control board.
Step S104., when described veneer is from control panel, loads corresponding kernel program to described from control panel.
In the present embodiment, when detecting that veneer is from control panel, by compiling from the burning program of control panel to from control panel.
The invention provides a kind of method of embedded system kernel module dynamic linker, have employed dynamic kernel module loading scheme, the type of veneer is detected, make the program that once the compiles different veneers under same hardware platform run, decrease the release maintenance cost of kernel program, thus improve the efficiency of exploitation.
The another kind of embodiment of the present invention provides a kind of method of embedded system kernel module dynamic linker, and as shown in Figure 2, the method for this dynamic linker comprises the following steps:
Step S201. compiling is for the kernel program of master control board with for the kernel program from control panel.
Step S202. obtains the identification number of veneer of described program to be output, judges that the veneer of described program to be output is master control board or from control panel according to described identification number.
In the present embodiment, the hardware single board of each type or version arranging the unique identification that can identify its board type and version, when system kernel initialization, namely can judge that this veneer is that master control board is still from control panel by reading this mark.
Step S203., when described veneer is master control board, jumps to master control board program and loads entrance to load corresponding kernel program to described master control board.
Concrete, jump to master control board program and load entrance, by described entry address loading procedure.
Step S204., when described veneer is from control panel, jumps to and loads entrance to load corresponding kernel program to described from control panel from control panel program.
Concrete, jump to and load entrance, by described entry address loading procedure from control panel program.
The another kind of embodiment of the present invention also provides a kind of device of embedded system kernel module dynamic linker, and the device of described dynamic linker comprises collector 301 and detection module 302;
Described collector 301 compiles for the kernel program of master control board with for the kernel program from control panel;
The veneer 303 that described detection module 302 detects program to be output is master control boards or from control panel;
When to detect described veneer be master control board to described detection module 302, described collector 301 loads corresponding kernel program to described master control board, when to detect described veneer be from control panel to described detection module 302, load corresponding kernel program to described from control panel.
As a kind of embodiment, the veneer that described detection module 302 detects program to be output is master control board or is specially from control panel:
Obtain the identification number of the veneer of described program to be output;
Judge that the veneer of described program to be output is master control board or from control panel according to described identification number.
As another kind of embodiment, the veneer that described detection module 302 detects program to be output is master control board or is specially from control panel:
The type model that the veneer receiving described program to be output produces;
Judge that the veneer of described program to be output is master control board or from control panel according to described type signal.
Described collector 301 loads corresponding kernel program to described master control board and is specially:
Jump to master control board program and load entrance, by described entry address loading procedure.
Described collector 301 loads corresponding kernel program from control panel be specially to described:
Jump to and load entrance, by described entry address loading procedure from control panel program.
The invention provides a kind of method and device of embedded system kernel module dynamic linker, have employed dynamic kernel module loading scheme, the type of veneer is detected, make different veneer under same hardware platform of the program that once compiles or different single board editions run, decrease the release maintenance cost of kernel program, thus improve the efficiency of exploitation, in addition, can same kernel program can be burnt on different veneers, make the burning of kernel program and upgrade simpler, decrease the probability of makeing mistakes, improve the efficiency of production and the cost of upgrade maintenance.
Above content is in conjunction with concrete preferred implementation further description made for the present invention, can not assert that specific embodiment of the invention is confined to these explanations.For general technical staff of the technical field of the invention; make some equivalent alternative or obvious modification without departing from the inventive concept of the premise; and performance or purposes identical, all should be considered as belonging to the scope of patent protection that the present invention is determined by submitted to claims.

Claims (10)

1. a method for embedded system kernel module dynamic linker, is characterized in that, the method for described loading procedure comprises the following steps:
Compiling is for the kernel program of master control board with for the kernel program from control panel;
The veneer detecting program to be output is master control board or from control panel;
When the described veneer of detection is master control board, load corresponding kernel program to described master control board;
When the described veneer of detection is from control panel, load corresponding kernel program to described from control panel.
2. the method for embedded system kernel module dynamic linker as claimed in claim 1, it is characterized in that, the veneer of described program to be output is master control board or is specially from the step of control panel:
Obtain the identification number of the veneer of described program to be output;
Judge that the veneer of described program to be output is master control board or from control panel according to described identification number.
3. the method for embedded system kernel module dynamic linker as claimed in claim 1, it is characterized in that, the veneer of described program to be output is master control board or is specially from the step of control panel:
The type model that the veneer receiving described program to be output produces;
Judge that the veneer of described program to be output is master control board or from control panel according to described type signal.
4. the method for as claimed in claim 2 or claim 3 embedded system kernel module dynamic linker, is characterized in that, the described step loading corresponding kernel program to described master control board is specially:
Jump to master control board program and load entrance, by described entry address loading procedure.
5. the method for as claimed in claim 2 or claim 3 embedded system kernel module dynamic linker, is characterized in that, is describedly specially to the described step loading corresponding kernel program from control panel:
Jump to and load entrance, by described address loading program from control panel program.
6. a device for embedded system kernel module dynamic linker, is characterized in that, the device of described dynamic linker comprises collector and detection module;
Described collector compiling is for the kernel program of master control board with for the kernel program from control panel;
The veneer that described detection module detects program to be output is master control board or from control panel;
When to detect described veneer be master control board to described detection module, described collector loads corresponding kernel program to described master control board, when to detect described veneer be from control panel to described detection module, loads corresponding kernel program to described from control panel.
7. the device of embedded system kernel module dynamic linker as claimed in claim 6, it is characterized in that, the veneer that described detection module detects program to be output is master control board or is specially from control panel:
Obtain the identification number of the veneer of described program to be output;
Judge that the veneer of described program to be output is master control board or from control panel according to described identification number.
8. the device of embedded system kernel module dynamic linker as claimed in claim 6, it is characterized in that, the veneer that described detection module detects program to be output is master control board or is specially from control panel:
The type model that the veneer receiving described program to be output produces;
Judge that the veneer of described program to be output is master control board or from control panel according to described type signal.
9. the device of embedded system kernel module dynamic linker as claimed in claim 7 or 8, it is characterized in that, described collector loads corresponding kernel program to described master control board and is specially:
Jump to master control board program and load entrance, by described entry address loading procedure.
10. the device of as claimed in claim 7 or 8 embedded system kernel module dynamic linker, is characterized in that, described collector loads corresponding kernel program from control panel be specially to described:
Jump to and load entrance, by described entry address loading procedure from control panel program.
CN201410621445.1A 2014-11-06 2014-11-06 Method and device for dynamically loading programs of kernel module of embedded type system Pending CN104407887A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410621445.1A CN104407887A (en) 2014-11-06 2014-11-06 Method and device for dynamically loading programs of kernel module of embedded type system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410621445.1A CN104407887A (en) 2014-11-06 2014-11-06 Method and device for dynamically loading programs of kernel module of embedded type system

Publications (1)

Publication Number Publication Date
CN104407887A true CN104407887A (en) 2015-03-11

Family

ID=52645520

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410621445.1A Pending CN104407887A (en) 2014-11-06 2014-11-06 Method and device for dynamically loading programs of kernel module of embedded type system

Country Status (1)

Country Link
CN (1) CN104407887A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105259806A (en) * 2015-10-16 2016-01-20 珠海格力电器股份有限公司 Controller upgrade method and system, main controller and slave controller
CN105893085A (en) * 2016-03-30 2016-08-24 百度在线网络技术(北京)有限公司 Method and device for loading kernel module
CN111209059A (en) * 2020-01-14 2020-05-29 中国北方车辆研究所 Embedded software multi-version control system and method
CN113220303A (en) * 2021-04-21 2021-08-06 北京麟卓信息科技有限公司 Compiling method and system of kernel module

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0822393A (en) * 1994-07-07 1996-01-23 Nec Corp Dynamic loading controller
CN1964525A (en) * 2005-11-09 2007-05-16 中兴通讯股份有限公司 A system for hardware drive program of intelligent loading mobile phone
CN101324850A (en) * 2007-06-12 2008-12-17 中兴通讯股份有限公司 LINUX inner core dynamic loading method
CN101894028A (en) * 2009-05-20 2010-11-24 广州盛华信息技术有限公司 Realization method and device for Linux kernel mirror image data supporting various CPUs
CN102541572A (en) * 2010-12-08 2012-07-04 中兴通讯股份有限公司 Method, system and device for realizing guide of operating system kernel
CN102830983A (en) * 2011-06-14 2012-12-19 上海未来宽带技术及应用工程研究中心有限公司 Method capable of dynamically loading different terminal exchange chip drives
CN103309684A (en) * 2012-03-07 2013-09-18 腾讯科技(深圳)有限公司 Method and device for dynamically loading application

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0822393A (en) * 1994-07-07 1996-01-23 Nec Corp Dynamic loading controller
CN1964525A (en) * 2005-11-09 2007-05-16 中兴通讯股份有限公司 A system for hardware drive program of intelligent loading mobile phone
CN101324850A (en) * 2007-06-12 2008-12-17 中兴通讯股份有限公司 LINUX inner core dynamic loading method
CN101894028A (en) * 2009-05-20 2010-11-24 广州盛华信息技术有限公司 Realization method and device for Linux kernel mirror image data supporting various CPUs
CN102541572A (en) * 2010-12-08 2012-07-04 中兴通讯股份有限公司 Method, system and device for realizing guide of operating system kernel
CN102830983A (en) * 2011-06-14 2012-12-19 上海未来宽带技术及应用工程研究中心有限公司 Method capable of dynamically loading different terminal exchange chip drives
CN103309684A (en) * 2012-03-07 2013-09-18 腾讯科技(深圳)有限公司 Method and device for dynamically loading application

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105259806A (en) * 2015-10-16 2016-01-20 珠海格力电器股份有限公司 Controller upgrade method and system, main controller and slave controller
CN105259806B (en) * 2015-10-16 2018-01-23 珠海格力电器股份有限公司 Controller upgrade method and system and master controller and from controller
CN105893085A (en) * 2016-03-30 2016-08-24 百度在线网络技术(北京)有限公司 Method and device for loading kernel module
CN111209059A (en) * 2020-01-14 2020-05-29 中国北方车辆研究所 Embedded software multi-version control system and method
CN111209059B (en) * 2020-01-14 2023-03-03 中国北方车辆研究所 Embedded software multi-version control system and method
CN113220303A (en) * 2021-04-21 2021-08-06 北京麟卓信息科技有限公司 Compiling method and system of kernel module

Similar Documents

Publication Publication Date Title
CN109558282B (en) PCIE link detection method, system, electronic equipment and storage medium
CN104407887A (en) Method and device for dynamically loading programs of kernel module of embedded type system
ATE438893T1 (en) METHOD AND SYSTEM FOR LINKING FIRMWARE MODULES IN A PRE-STORAGE EXECUTION ENVIRONMENT
US9916331B2 (en) Method and device for automatically processing static test data of rail transit vehicle
CN103150188B (en) The compatible video card fast initializing method of the x86 of non-x 86 instruction set computer
CN102520975B (en) Intelligent updating method of external equipment driver, device and system
CN103927256A (en) Method for controlling multiple Android devices
CN103513966A (en) PHP developing framework based on assemblies
CN109800119A (en) A kind of product function test method and device
CN104462983A (en) PHP source code processing method and system
CN102646048A (en) Method for upgrading firmware of touch screen of mobile terminal and device
CN103514074A (en) MVB network card development method and platform
CN102214108A (en) Device and method for mass production of flash memory equipment
CN106775847A (en) A kind of board software version updating method and device
CN103399813B (en) A kind of embedded system off-line trace analysis method based on Trace information
CN102999422B (en) A kind of high-efficiency embedded type system debug method
CN102981675A (en) Multi-point touch data processing method and multi-point touch data processing system thereof
CN104834586A (en) Automatic test method, device and system of Android interface
CN104200164A (en) Loader virus searching and killing method, device and terminal
CN102270174A (en) Automatic test method and device
US8972711B2 (en) CPU core unlocking device applied to computer system
CN105528292A (en) Kernel unit test method and system based on kernel module
CN101135975B (en) Method for detecting system utility program matching
CN102637034A (en) Composite signal detecting system and detecting method based on CAN (Controller Area Network) configuration
CN104090845A (en) Automatic game testing method and system and related device

Legal Events

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

Application publication date: 20150311

RJ01 Rejection of invention patent application after publication