CN107748680A - A kind of kernel setup method, terminal and computer-readable recording medium - Google Patents

A kind of kernel setup method, terminal and computer-readable recording medium Download PDF

Info

Publication number
CN107748680A
CN107748680A CN201710900820.XA CN201710900820A CN107748680A CN 107748680 A CN107748680 A CN 107748680A CN 201710900820 A CN201710900820 A CN 201710900820A CN 107748680 A CN107748680 A CN 107748680A
Authority
CN
China
Prior art keywords
configuration file
configuration
operating system
setup method
kernel setup
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
CN201710900820.XA
Other languages
Chinese (zh)
Other versions
CN107748680B (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.)
Nubia Technology Co Ltd
Original Assignee
Nubia 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201710900820.XA priority Critical patent/CN107748680B/en
Publication of CN107748680A publication Critical patent/CN107748680A/en
Application granted granted Critical
Publication of CN107748680B publication Critical patent/CN107748680B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping

Landscapes

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

Abstract

The present invention provides a kind of kernel setup method, terminal and computer-readable recording medium, pointed to for the configuration item in existing operating system nucleus code in the prior art not clear, the problem of inconvenient is managed, confirms at least two class configuration files created, it is each corresponding with OEM and chip manufacturer;Each configuration file is merged, is formed and merges configuration file, compiling merges configuration file, operating system nucleus code is configured.By the implementation of the present invention, configuration file is based on manufacturer, that is, the mode that initiator is split, the source of the configuration to operating system nucleus code is specify that, reduces the management cost to configuration file.

Description

A kind of kernel setup method, terminal and computer-readable recording medium
Technical field
, can more specifically to a kind of kernel setup method, terminal and computer the present invention relates to field of terminal technology Read storage medium.
Background technology
Terminal manufactured by major OEM (Original Equipment Manufacturer, original equipment manufacturer), Chip in its terminal is not often autonomous production, many OEM all be chip that other chip manufacturers are provided. And OEM manufacture produce terminal when, the configuration file of its operating system nucleus code is often adjusted and changed, but core Piece manufacturer can also be adjusted to the configuration file of operating system nucleus code, therefore, for operating system nucleus code (kernel) configuration file in is on earth OEM vendor or what chip manufacturer was changed not can determine that, for follow-up pipe Reason is inconvenient.
The content of the invention
The technical problem to be solved in the present invention is the modification of the configuration file of operating system nucleus code in the prior art Item object is failed to understand, the problem of inconvenient is managed, for the technical problem, there is provided a kind of kernel setup method, terminal and computer can Read storage medium.
In order to solve the above technical problems, the present invention provides a kind of kernel setup method, including:
Confirm each configuration file created;Wherein, the configuration file comprises at least two classes, the respectively first configuration text Part and the second configuration file, and first configuration file is corresponding with chip manufacturer, second configuration file and original device Manufacturer is corresponding;
Each configuration file is merged, is formed and merges configuration file;
The merging configuration file is compiled, operating system nucleus code is configured.
Optionally, in addition to:
Modification information based on corresponding manufacturer to the configuration file, the configuration file corresponding to renewal.
Optionally, the modification information based on corresponding manufacturer to the configuration file, the configuration corresponding to renewal File includes:The merging configuration file is modified in the configuration menu that the operating system nucleus code provides, and from Dynamic renewal second configuration file.
Optionally, the configuration menu provided in the operating system nucleus code is carried out to the merging configuration file Change, and automatically update second configuration file to include:
Based on the amended merging configuration file, and first configuration file, isolate described amended Merge the part that first configuration file is not belonging in configuration file, and based on the part for being not belonging to the first configuration file Update second configuration file.
Optionally, the modification information based on corresponding manufacturer to the configuration file, the configuration corresponding to renewal File also includes:
According to default modification specification, directly modified in second configuration file created.
Optionally, it is described according to default modification specification, directly repaiied in second configuration file created Change including:
According to the format write of specification, modification item corresponding to the modification information is preserved to second configuration file In.
Optionally, the modification information based on corresponding manufacturer to the configuration file, the configuration corresponding to renewal File includes:
The modification information include it is newly-increased, delete and adjustment at least one of.
Optionally, described to merge each configuration file, forming merging configuration file includes:
Each configuration file is merged by shell script.
The present invention also provides a kind of terminal, including processor, memory and communication bus;
The communication bus is used to realize the connection communication between the processor and memory;
The processor is used to perform the kernel setup program stored in memory, to realize foregoing kernel setup method The step of.
The present invention also provides a kind of computer-readable recording medium, the computer-readable recording medium storage have one or The multiple programs of person, one or more of programs can be by one or more computing devices, to realize foregoing interior caryogamy The step of putting method.
Beneficial effect
The present invention provides a kind of kernel setup method, terminal and computer-readable recording medium, for existing prior art Configuration item in middle operating system nucleus code, which points to, to be failed to understand, manages the problem of inconvenient, confirms at least two classes configuration created File, it is each corresponding with OEM and chip manufacturer;Each configuration file is merged, is formed and merges configuration file, compiling merges Configuration file, operating system nucleus code is configured.By the implementation of the present invention, configuration file is based on manufacturer, It is exactly the mode that initiator is split, specify that the source of the configuration to operating system nucleus code, reduces to configuration text The management cost of part.
Brief description of the drawings
Below in conjunction with drawings and Examples, the invention will be further described, in accompanying drawing:
Fig. 1 is the hardware architecture diagram for realizing each optional mobile terminal of embodiment one of the present invention.
Fig. 2 is the wireless communication system schematic diagram of mobile terminal as shown in Figure 1;
Fig. 3 is the kernel setup method basic flow sheet that first embodiment of the invention provides;
Fig. 4 is the kernel setup method refined flow chart that second embodiment of the invention provides;
Fig. 5 is the kernel setup method refined flow chart that second embodiment of the invention provides;
Fig. 6 is the structural representation for the terminal that third embodiment of the invention provides.
Embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
In follow-up description, the suffix using such as " module ", " part " or " unit " for representing element is only Be advantageous to the explanation of the present invention, itself there is no a specific meaning.Therefore, " module ", " part " or " unit " can mix Ground uses.
Terminal can be implemented in a variety of manners.For example, the terminal described in the present invention can include such as mobile phone, flat board Computer, notebook computer, palm PC, personal digital assistant (Personal Digital Assistant, PDA), portable Media player (Portable Media Player, PMP), guider, wearable device, Intelligent bracelet, pedometer etc. move Dynamic terminal, and the fixed terminal such as digital TV, desktop computer.
It will be illustrated in subsequent descriptions by taking mobile terminal as an example, it will be appreciated by those skilled in the art that except special Outside element for moving purpose, construction according to the embodiment of the present invention can also apply to the terminal of fixed type.
Referring to Fig. 1, its hardware architecture diagram for a kind of mobile terminal of each embodiment of the realization present invention, the shifting Dynamic terminal 100 can include:RF (Radio Frequency, radio frequency) unit 101, WiFi module 102, audio output unit 103rd, A/V (audio/video) input block 104, sensor 105, display unit 106, user input unit 107, interface unit 108th, the part such as memory 109, processor 110 and power supply 111.It will be understood by those skilled in the art that shown in Fig. 1 Mobile terminal structure does not form the restriction to mobile terminal, and mobile terminal can be included than illustrating more or less parts, Either combine some parts or different parts arrangement.
The all parts of mobile terminal are specifically introduced with reference to Fig. 1:
Radio frequency unit 101 can be used for receiving and sending messages or communication process in, the reception and transmission of signal, specifically, by base station Downlink information receive after, handled to processor 110;In addition, up data are sent to base station.Generally, radio frequency unit 101 Including but not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier, duplexer etc..In addition, penetrate Frequency unit 101 can also be communicated by radio communication with network and other equipment.Above-mentioned radio communication can use any communication Standard or agreement, including but not limited to GSM (Global System of Mobile communication, global system for mobile telecommunications System), GPRS (General Packet Radio Service, general packet radio service), CDMA2000 (Code Division Multiple Access 2000, CDMA 2000), WCDMA (Wideband Code Division Multiple Access, WCDMA), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, TD SDMA), FDD-LTE (Frequency Division Duplexing-Long Term Evolution, FDD Long Term Evolution) and TDD-LTE (Time Division Duplexing-Long Term Evolution, time division duplex Long Term Evolution) etc..
WiFi belongs to short range wireless transmission technology, and mobile terminal can help user to receive and dispatch electricity by WiFi module 102 Sub- mail, browse webpage and access streaming video etc., it has provided the user wireless broadband internet and accessed.Although Fig. 1 shows Go out WiFi module 102, but it is understood that, it is simultaneously not belonging to must be configured into for mobile terminal, completely can be according to need To be omitted in the essential scope for do not change invention.
Audio output unit 103 can be in call signal reception pattern, call mode, record mould in mobile terminal 100 When under the isotypes such as formula, speech recognition mode, broadcast reception mode, by radio frequency unit 101 or WiFi module 102 it is receiving or It is sound that the voice data stored in memory 109, which is converted into audio signal and exported,.Moreover, audio output unit 103 The audio output related to the specific function that mobile terminal 100 performs can also be provided (for example, call signal receives sound, disappeared Breath receives sound etc.).Audio output unit 103 can include loudspeaker, buzzer etc..
A/V input blocks 104 are used to receive audio or video signal.A/V input blocks 104 can include graphics processor (Graphics Processing Unit, GPU) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode Or the static images or the view data of video obtained in image capture mode by image capture apparatus (such as camera) are carried out Reason.Picture frame after processing may be displayed on display unit 106.Picture frame after the processing of graphics processor 1041 can be deposited Storage is transmitted in memory 109 (or other storage mediums) or via radio frequency unit 101 or WiFi module 102.Mike Wind 1042 can connect in telephone calling model, logging mode, speech recognition mode etc. operational mode via microphone 1042 Quiet down sound (voice data), and can be voice data by such acoustic processing.Audio (voice) data after processing can To be converted to the form output that mobile communication base station can be sent to via radio frequency unit 101 in the case of telephone calling model. Microphone 1042 can implement various types of noises and eliminate (or suppression) algorithm to eliminate (or suppression) in reception and send sound Caused noise or interference during frequency signal.
Mobile terminal 100 also includes at least one sensor 105, such as optical sensor, motion sensor and other biographies Sensor.Specifically, optical sensor includes ambient light sensor and proximity transducer, wherein, ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 1061, and proximity transducer can close when mobile terminal 100 is moved in one's ear Display panel 1061 and/or backlight.As one kind of motion sensor, accelerometer sensor can detect in all directions (general For three axles) size of acceleration, size and the direction of gravity are can detect that when static, the application available for identification mobile phone posture (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) etc.; The fingerprint sensor that can also configure as mobile phone, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer, The other sensors such as hygrometer, thermometer, infrared ray sensor, will not be repeated here.
Display unit 106 is used for the information for showing the information inputted by user or being supplied to user.Display unit 106 can wrap Display panel 1061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode can be used Forms such as (Organic Light-Emitting Diode, OLED) configures display panel 1061.
User input unit 107 can be used for the numeral or character information for receiving input, and produce the use with mobile terminal The key signals input that family is set and function control is relevant.Specifically, user input unit 107 may include contact panel 1071 with And other input equipments 1072.Contact panel 1071, also referred to as touch-screen, collect touch operation of the user on or near it (for example user uses any suitable objects or annex such as finger, stylus on contact panel 1071 or in contact panel 1071 Neighbouring operation), and corresponding attachment means are driven according to formula set in advance.Contact panel 1071 may include touch detection Two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation band The signal come, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and by it Contact coordinate is converted into, then gives processor 110, and the order sent of reception processing device 110 and can be performed.In addition, can To realize contact panel 1071 using polytypes such as resistance-type, condenser type, infrared ray and surface acoustic waves.Except contact panel 1071, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 can wrap Include but be not limited to physical keyboard, in function key (such as volume control button, switch key etc.), trace ball, mouse, action bars etc. One or more, do not limit herein specifically.
Further, contact panel 1071 can cover display panel 1061, detect thereon when contact panel 1071 or After neighbouring touch operation, processor 110 is sent to determine the type of touch event, is followed by subsequent processing device 110 according to touch thing The type of part provides corresponding visual output on display panel 1061.Although in Fig. 1, contact panel 1071 and display panel 1061 be the part independent as two to realize the input of mobile terminal and output function, but in certain embodiments, can Input and the output function of mobile terminal are realized so that contact panel 1071 and display panel 1061 is integrated, is not done herein specifically Limit.
Interface unit 108 is connected the interface that can pass through as at least one external device (ED) with mobile terminal 100.For example, External device (ED) can include wired or wireless head-band earphone port, external power source (or battery charger) port, wired or nothing Line FPDP, memory card port, the port for connecting the device with identification module, audio input/output (I/O) end Mouth, video i/o port, ear port etc..Interface unit 108 can be used for receiving the input from external device (ED) (for example, number It is believed that breath, electric power etc.) and the input received is transferred to one or more elements in mobile terminal 100 or can be with For transmitting data between mobile terminal 100 and external device (ED).
Memory 109 can be used for storage software program and various data.Memory 109 can mainly include storing program area And storage data field, wherein, storing program area can storage program area, application program (such as the sound needed at least one function Sound playing function, image player function etc.) etc.;Storage data field can store according to mobile phone use created data (such as Voice data, phone directory etc.) etc..In addition, memory 109 can include high-speed random access memory, can also include non-easy The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 110 is the control centre of mobile terminal, utilizes each of various interfaces and the whole mobile terminal of connection Individual part, by running or performing the software program and/or module that are stored in memory 109, and call and be stored in storage Data in device 109, the various functions and processing data of mobile terminal are performed, so as to carry out integral monitoring to mobile terminal.Place Reason device 110 may include one or more processing units;Preferably, processor 110 can integrate application processor and modulatedemodulate is mediated Device is managed, wherein, application processor mainly handles operating system, user interface and application program etc., and modem processor is main Handle radio communication.It is understood that above-mentioned modem processor can not also be integrated into processor 110.
Mobile terminal 100 can also include the power supply 111 (such as battery) to all parts power supply, it is preferred that power supply 111 Can be logically contiguous by power-supply management system and processor 110, so as to realize management charging by power-supply management system, put The function such as electricity and power managed.
Although Fig. 1 is not shown, mobile terminal 100 can also will not be repeated here including bluetooth module etc..
For the ease of understanding the embodiment of the present invention, the communications network system being based on below to the mobile terminal of the present invention enters Row description.
Referring to Fig. 2, Fig. 2 is a kind of communications network system Organization Chart provided in an embodiment of the present invention, the communication network system Unite as the LTE system of universal mobile communications technology, the UE that the LTE system includes communicating connection successively (User Equipment, is used Family equipment) 201, E-UTRAN (Evolved UMTS Terrestrial Radio Access Network, evolved UMTS lands Ground wireless access network) 202, EPC (Evolved Packet Core, evolved packet-based core networks) 203 and operator IP operation 204。
Specifically, UE201 can be above-mentioned terminal 100, and here is omitted.
E-UTRAN202 includes eNodeB2021 and other eNodeB2022 etc..Wherein, eNodeB2021 can be by returning Journey (backhaul) (such as X2 interface) is connected with other eNodeB2022, and eNodeB2021 is connected to EPC203, ENodeB2021 can provide UE201 to EPC203 access.
EPC203 can include MME (Mobility Management Entity, mobility management entity) 2031, HSS (Home Subscriber Server, home subscriber server) 2032, other MME2033, SGW (Serving GateWay, Gateway) 2034, PGW (PDN GateWay, grouped data network gateway) 2035 and PCRF (Policy and Charging Rules Function, policy and rate functional entity) 2036 etc..Wherein, MME2031 be processing UE201 and EPC203 between The control node of signaling, there is provided carrying and connection management.HSS2032 is used to provide some registers to manage such as homing position The function of register (not shown) etc, and some are preserved about the special letter of the users such as service features, data rate Breath.All customer data can be transmitted by SGW2034, PGW2035 can provide UE 201 IP address distribute with And other functions, PCRF2036 are the strategy and charging control policy decision point of business data flow and IP bearing resources, it is plan Available strategy and charging control decision-making are slightly selected and provided with charge execution function unit (not shown).
IP operation 204 can include internet, Intranet, IMS (IP Multimedia Subsystem, IP multimedia System) or other IP operations etc..
Although above-mentioned be described by taking LTE system as an example, those skilled in the art it is to be understood that the present invention not only Suitable for LTE system, be readily applicable to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA with And following new network system etc., do not limit herein.
Based on above-mentioned mobile terminal hardware configuration and communications network system, each embodiment of the inventive method is proposed.
First embodiment
Fig. 3 is the kernel setup method basic flow sheet that the present embodiment provides, and this method can be applied to any kind of Need the electronic equipment of installing terminal software to possess the terminal device of operating system, be not limited in mobile terminal, can also answer For DTV, desktop computer, navigator etc., other, which are equipped with safeguard protection, has the fixed terminal of operating system.This is interior Core collocation method includes:
Each configuration file that S301, confirmation have created;Wherein, configuration file comprises at least two classes, the respectively first configuration File and the second configuration file, and the first configuration file is corresponding with chip manufacturer, the second configuration file and original equipment manufacturer It is corresponding;
S302, each configuration file merged, formed and merge configuration file;
S303, compiling merge configuration file, and operating system nucleus code is configured.
The production of terminal be unable to do without the support of hardware, and the source of the hardware of terminal is often diversified, many hard Part is not what OEM vendor oneself produced, and the hardware class of terminal is various after all, and an end can be manufactured if wanting a manufacturer The all hardware at end, it may not realize at present.Therefore many OEM vendors are inevitably in the hard of other production correlations The production firm of part obtains corresponding hardware there.Wherein, processor chips are the cores of whole terminal, and the performance of processor is closed Arrive the running situation and Consumer's Experience of whole terminal.OEM vendor produces terminal based on the chip that other chip companies provide, For the operating system nucleus code of terminal, either chip manufacturer or OEM vendor may all produce corresponding configuration item to it, To get a desired effect.
Code essential to operating system nucleus code fires operating system nucleus when being production terminal, is in operating system The predecessor of core;Operating system nucleus code is configured, is exactly the configuration file according to caused by all big enterprises, to each configuration file It is compiled, so as to which operating system nucleus code is fired in the processor of terminal, forms operating system nucleus.
In S301, each configuration file created is confirmed.Each configuration file is the core in the present embodiment, based on this A little configuration files could configure to operating system nucleus code, to form operating system nucleus.Wherein, configuration file is at least It is the first configuration file and the second configuration file respectively, the first configuration file is corresponding with chip manufacturer, i.e., including two classes defconfig;Second configuration file is corresponding with OEM vendor, i.e. diffconfig or oem-config.Wherein, two classes configure File, the modification source of configuration file is identified, so as to improve the convenience of management.It is noted that this reality Apply the configuration file described in example and merely related to two class configuration files, in fact can also include other kinds of configuration file, Such as the configuration file corresponding to other-end equipment manufacturers, this be probably due to the manufacturing of terminal have passed through it is multiple not With manufacturer, or different flows in same manufacturer, configuration file can also according to these different executive agents come It is correspondingly arranged multiple.
In S302, each configuration file is merged, is formed and merges configuration file.Configuration for kernel should be from Overall configuration file is carried out, therefore, it is necessary to separated each configuration file is merged, with the configuration after merging File configures operating system nucleus code, to complete modification and renewal to operating system nucleus code.Wherein, it is merged Before, the first configuration file is defconfig, and the second configuration file is diffconfig or oem-config, after consolidation, still So handled as defconfig.
In S303, compiling merges configuration file, and operating system nucleus code is configured.It is just complete after the completion of compiling Into the modification and renewal to operating system nucleus code, each configuration file is also only needing what is be compiled in the present embodiment When just merge, then, after consolidation, still will therewith by merge configuration file be split, in other words, from merging First configuration file and the second configuration file corresponding to being isolated once again in configuration file.
In the present embodiment, optionally, corresponding manufacturer is also based on, to the modification information of configuration file, renewal pair The configuration file answered.Because each configuration file is corresponding with each manufacturer, then corresponding to the modification information of the manufacturer, or It is configuration item that person, which says, should just be modified for corresponding configuration file.Such as if confidence is matched somebody with somebody by chip manufacturer Breath, what that should just correspond to modification is the first configuration file;If the configuration information of OEM vendor, that should just correspond to and change Second configuration file, to reach the purpose managed respectively, the management cost of the configuration to operating system nucleus code is reduced, lifted Definition, be easy to go wrong traces to source operation etc..
Specifically, manufacturer is to the modification information of configuration file corresponding to occuping, configuration file can include corresponding to renewal: Modified in the configuration menu that operating system nucleus code provides to merging configuration file, and automatically update the second configuration text Part.Wherein, operating system nucleus code provides the configuration menu of specification, and this configuration menu is often with the shape of graphical interfaces Formula is presented to user, and user can intuitively be operated very much.It is that can directly configure operating system nucleus generation to merge configuration file The configuration file of code, the amended merging configuration file of gained after merging the operation of configuration file obviously can also be carried out The upgrading of operating system nucleus code.In this case, the second configuration file is just updated after merging, so as to realize that first matches somebody with somebody Put the management respectively of file and the second configuration file.
Wherein, specifically, being modified in the configuration menu that operating system nucleus code provides to merging configuration file, and Automatically updating the second configuration file can include:Based on amended merging configuration file, and the first configuration file, isolate The part of the first configuration file is not belonging in amended merging configuration file, and based on the part for being not belonging to the first configuration file Update the second configuration file.Due to the fact that during changing the configuration file of operating system nucleus code, the overwhelming majority Modification be all OEM vendor to carry out, the configuration of chip manufacturer just secures substantially after dispatching from the factory, that is to say, that first Configuration file substantially just secures, and what is modified is exactly often the second configuration file.And merge configuration file, it is by One configuration file and the second configuration file merge, then can amended merges configuration file and the by comparing One configuration file, compares both differences, and different places just corresponds to the part of the second configuration file.Due to the second configuration File is incorporated into the first configuration file merges configuration file, then the second configuration file now can direct basis First configuration file and amended merging configuration file generate, and it is substantially the renewal to the second configuration file.
In addition, based on corresponding manufacturer to the modification information of configuration file, configuration file can also include corresponding to renewal: According to default modification specification, directly modified in the second configuration file created.Here modification process with it is foregoing Modification process it is different, foregoing modification process is modified after the first configuration file and the second configuration file merge, And modification here is modified before the first configuration file and the second configuration file merge, advised according to default modification Model, refer to preserving modification item corresponding to modification information into the second configuration file according to the format write of specification.Changing Afterwards, the renewal to the second configuration file is also just completed, then, when being configured to operating system nucleus code, then may be used So that the first configuration file and the second configuration file to be merged, so as to obtain merging configuration file, then compiling merges configuration File configures to operating system nucleus code, so as to complete the modification and renewal to operating system nucleus code.
Specifically, being merged in the present embodiment to each configuration file, forming merging configuration file can include:Pass through Script merges each configuration file.Wherein, a kind of optional script is shell (shell) script, passes through shell scripts Creat_defconfig.sh is merged, so as to by the first configuration file defconfig and the second configuration file Diffconfig merges into defconfig, for compilation operations system kernel code.After the process of merging, it is by operating The configuration menu that system kernel code provides is modified to merging configuration file defconfig, i.e. make menuconfig, After completion, after the new merging configuration file defconfig that menuconfig was changed is generated by saveconfig, lead to Cross shell scripts and update the second configuration file, i.e. update_diff.sh, by content new in amended merging configuration file Configuration file is given birth to source, be i.e. the first configuration file separation, forms the second new configuration file diffconfig.
In the present embodiment, corresponding manufacturer is to the modification information of configuration file, can mainly include it is newly-increased, delete and At least one of adjustment.It is newly-increased, represent to have increased corresponding configuration item newly in configuration file;Delete, then eliminate configuration text Corresponding configuration item in part;Adjustment, then be on the basis of the configuration item in retaining configuration file, configuration item repaiied Change, it may be possible to modification of parameter values etc..
The present embodiment provides a kind of kernel setup method, for matching somebody with somebody in existing operating system nucleus code in the prior art Put item and point to not clear, manage the problem of inconvenient, confirm at least two class configuration files created, each with OEM and chip manufacturer It is corresponding;Each configuration file is merged, is formed and merges configuration file, compiling merges configuration file, to operating system nucleus Code is configured.By the implementation of the present embodiment, configuration file is based on manufacturer, that is, the side that initiator is split Formula, the source of the configuration to operating system nucleus code is specify that, reduce the management cost to configuration file.
Second embodiment
Fig. 4 is refer to, Fig. 4 is a kind of refined flow chart for kernel setup method that second embodiment of the invention provides, and is wrapped Include:
The first configuration file and the second configuration file that S401, confirmation have created, wherein the first configuration file and and chip Manufacturer is corresponding, and the second configuration file is corresponding with OEM;
First configuration file is corresponding with chip manufacturer, i.e. defconfig;Second configuration file is corresponding with OEM vendor, i.e., Diffconfig or oem-config.
S402, confirm modification informations of the OEM to the second configuration file;
During changing the configuration file of operating system nucleus code, most modifications is all that OEM vendor comes Carry out, the configuration of chip manufacturer just secures substantially after dispatching from the factory, that is to say, that the first configuration file is substantially just fixed , and what is modified is exactly often the second configuration file.
S403, according to default modification specification, modification information is added in the second configuration file;
According to default modification specification, refer to preserving modification item corresponding to modification information according to the format write of specification Into the second configuration file.After modification, the renewal to the second configuration file is also just completed.
S404, the first configuration file and the second configuration file merged, formed and merge configuration file;
Configuration for kernel should be carried out from the configuration file of entirety, therefore, it is necessary to each match somebody with somebody separated Put file to merge, operating system nucleus code is configured with the configuration file after merging, to complete in operating system The modification and renewal of core code.
S405, compiling merge configuration file, and operating system nucleus code is configured.
Fig. 5 is refer to, Fig. 5 is the refined flow chart for another kernel setup method that the present embodiment provides, including:
The first configuration file and the second configuration file that S501, confirmation have created, wherein the first configuration file and and chip Manufacturer is corresponding, and the second configuration file is corresponding with OEM;
First configuration file is corresponding with chip manufacturer, i.e. defconfig;Second configuration file is corresponding with OEM vendor, i.e., Diffconfig or oem-config.
S502, the first configuration file and the second configuration file merged, formed and merge configuration file;
Configuration for kernel should be carried out from the configuration file of entirety, therefore, it is necessary to each match somebody with somebody separated Put file to merge, operating system nucleus code is configured with the configuration file after merging, to complete in operating system The modification and renewal of core code.
S503, confirm modification informations of the OEM to the second configuration file;
During changing the configuration file of operating system nucleus code, most modifications is all that OEM vendor comes Carry out, the configuration of chip manufacturer just secures substantially after dispatching from the factory, that is to say, that the first configuration file is substantially just fixed , and what is modified is exactly often the second configuration file.
S504, the configuration menu provided by operating system nucleus code, enter in graphical interfaces to merging configuration file Row modification;
Operating system nucleus code provides the configuration menu of specification, and this configuration menu is often with the shape of graphical interfaces Formula is presented to user, and user can intuitively be operated very much.It is that can directly configure operating system nucleus generation to merge configuration file The configuration file of code, the amended merging configuration file of gained after merging the operation of configuration file obviously can also be carried out The upgrading of operating system nucleus code.
S505, based on amended merging configuration file, operating system nucleus code is configured;
S506, based on amended merging configuration file and the first configuration file, update the second configuration file.
Based on amended merging configuration file, and the first configuration file, amended merging configuration file is isolated In be not belonging to the part of the first configuration file, and the second configuration file is updated based on the part for being not belonging to the first configuration file.
Two kinds of kernel setup methods are present embodiments provided, in existing operating system nucleus code in the prior art Configuration item points to not clear, manages the problem of inconvenient, confirms at least two class configuration files created, each with OEM and chip factory Business is corresponding;Each configuration file is merged, is formed and merges configuration file, compiling merges configuration file, in operating system Core code is configured.By the implementation of the present embodiment, configuration file is based on manufacturer, that is, initiator is split Mode, the source of the configuration to operating system nucleus code is specify that, reduce the management cost to configuration file.
3rd embodiment
A kind of terminal is present embodiments provided, it is shown in Figure 6, including processor 61, memory 62 and communication bus 63;
Communication bus 63 is used to realize the connection communication between processor 61 and memory 62;
Memory 62 is used to store kernel setup program;
Processor 61 is used to perform the kernel setup program stored in memory 62, to realize the various embodiments described above offer The step of kernel setup method, repeat no more here.
The present embodiment additionally provides a kind of computer-readable recording medium, and one is stored with the computer-readable recording medium Individual or multiple programs, one or more program can be implemented as described above by one or more computing device with realizing Example exemplified by kernel setup method the step of, repeat no more here.
The invention provides a kind of kernel setup method, terminal and computer-readable recording medium, by file system Continuous memory space is reserved in system, the program file of terminal software and associated profile are write wherein, work as file system When reading file, using cache and pre-reading function, it would be desirable to file content read cache, can also will following text The storage content in Coutinuous store space is read in cache together in part system, avoid it is discontinuous due to kernel setup, Need most memory space in traversal file system and caused by the problem of reading relatively slow file, terminal software low-response, The target for improving file reading speed is realized, reduces the time-consuming of terminal software startup, improves Consumer's Experience.
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row His property includes, so that process, method, article or device including a series of elements not only include those key elements, and And also include the other element being not expressly set out, or also include for this process, method, article or device institute inherently Key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including this Other identical element also be present in the process of key element, method, article or device.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on such understanding, technical scheme is substantially done to prior art in other words Going out the part of contribution can be embodied in the form of software product, and the computer software product is stored in a storage medium In (such as ROM/RAM, magnetic disc, CD), including some instructions to cause a station terminal (can be mobile phone, computer, service Device, air conditioner, or network equipment etc.) perform method described in each embodiment of the present invention.
Embodiments of the invention are described above in conjunction with accompanying drawing, but the invention is not limited in above-mentioned specific Embodiment, above-mentioned embodiment is only schematical, rather than restricted, one of ordinary skill in the art Under the enlightenment of the present invention, in the case of present inventive concept and scope of the claimed protection is not departed from, it can also make a lot Form, these are belonged within the protection of the present invention.

Claims (10)

  1. A kind of 1. kernel setup method, it is characterised in that including:
    Confirm each configuration file created;Wherein, the configuration file comprises at least two classes, respectively the first configuration file and Second configuration file, and first configuration file is corresponding with chip manufacturer, second configuration file manufactures with original device Business is corresponding;
    Each configuration file is merged, is formed and merges configuration file;
    The merging configuration file is compiled, operating system nucleus code is configured.
  2. 2. kernel setup method as claimed in claim 1, it is characterised in that also include:
    Modification information based on corresponding manufacturer to the configuration file, the configuration file corresponding to renewal.
  3. 3. kernel setup method as claimed in claim 2, it is characterised in that described literary to the configuration based on corresponding manufacturer The modification information of part, the configuration file corresponding to renewal include:In the configuration menu that the operating system nucleus code provides The merging configuration file is modified, and automatically updates second configuration file.
  4. 4. kernel setup method as claimed in claim 3, it is characterised in that described to be provided in the operating system nucleus code Configuration menu the merging configuration file is modified, and automatically update second configuration file and include:
    Based on the amended merging configuration file, and first configuration file, the amended merging is isolated The part of first configuration file is not belonging in configuration file, and based on the part renewal for being not belonging to the first configuration file Second configuration file.
  5. 5. kernel setup method as claimed in claim 2, it is characterised in that described literary to the configuration based on corresponding manufacturer The modification information of part, the configuration file corresponding to renewal also include:
    According to default modification specification, directly modified in second configuration file created.
  6. 6. kernel setup method as claimed in claim 5, it is characterised in that it is described according to default modification specification, directly exist Modified in second configuration file created including:
    According to the format write of specification, modification item corresponding to the modification information is preserved into second configuration file.
  7. 7. kernel setup method as claimed in claim 2, it is characterised in that described literary to the configuration based on corresponding manufacturer The modification information of part, the configuration file corresponding to renewal include:
    The modification information include it is newly-increased, delete and adjustment at least one of.
  8. 8. the kernel setup method as described in claim any one of 1-7, it is characterised in that described to carry out each configuration file Merge, forming merging configuration file includes:
    Each configuration file is merged by shell script.
  9. 9. a kind of terminal, it is characterised in that including processor, memory and communication bus;
    The communication bus is used to realize the connection communication between the processor and memory;
    The processor is used to perform the kernel setup program stored in memory, to realize such as any one of claim 1-8 institutes The step of kernel setup method stated.
  10. A kind of 10. computer-readable recording medium, it is characterised in that the computer-readable recording medium storage have one or Multiple programs, one or more of programs can be by one or more computing devices, to realize as in claim 1-8 The step of kernel setup method described in any one.
CN201710900820.XA 2017-09-28 2017-09-28 Kernel configuration method, terminal and computer readable storage medium Active CN107748680B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710900820.XA CN107748680B (en) 2017-09-28 2017-09-28 Kernel configuration method, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710900820.XA CN107748680B (en) 2017-09-28 2017-09-28 Kernel configuration method, terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN107748680A true CN107748680A (en) 2018-03-02
CN107748680B CN107748680B (en) 2021-03-16

Family

ID=61254591

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710900820.XA Active CN107748680B (en) 2017-09-28 2017-09-28 Kernel configuration method, terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN107748680B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111338636A (en) * 2020-02-21 2020-06-26 北京松果电子有限公司 Kernel preprocessing method, kernel preprocessing device and electronic equipment
CN112231010A (en) * 2020-09-28 2021-01-15 四川新网银行股份有限公司 Application configuration information management and dynamic updating method based on OSGI (open service gateway initiative) specification
CN112526932A (en) * 2020-12-16 2021-03-19 上海维宏电子科技股份有限公司 Method, system, device, processor, storage medium and application for realizing three-level configuration setting management by numerical control processing software

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1790257A (en) * 2004-12-13 2006-06-21 华为技术有限公司 Method for uniformly configuring configuration files
US20130145353A1 (en) * 2009-01-13 2013-06-06 Mediatek Inc. Firmware extension method and firmware builder
CN104094225A (en) * 2011-11-28 2014-10-08 韦斯技术有限公司 Creation or installation of disk image for target device having one of a plurality of hardware platforms
CN105573796A (en) * 2015-12-21 2016-05-11 曙光信息产业(北京)有限公司 Function switching method and function switching device for FPGA
CN106605209A (en) * 2014-09-02 2017-04-26 起元科技有限公司 Controlling data processing tasks

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1790257A (en) * 2004-12-13 2006-06-21 华为技术有限公司 Method for uniformly configuring configuration files
US20130145353A1 (en) * 2009-01-13 2013-06-06 Mediatek Inc. Firmware extension method and firmware builder
CN104094225A (en) * 2011-11-28 2014-10-08 韦斯技术有限公司 Creation or installation of disk image for target device having one of a plurality of hardware platforms
CN106605209A (en) * 2014-09-02 2017-04-26 起元科技有限公司 Controlling data processing tasks
CN105573796A (en) * 2015-12-21 2016-05-11 曙光信息产业(北京)有限公司 Function switching method and function switching device for FPGA

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
J_J_G_A: "内核中修改和保存defconfig的方法", 《HTTPS://BLOG.CSDN.NET/JJG1986/ARTICLE/DETAILS/46861667》 *
TIANTAO012: "使用merge_config合并两个或多个kernel config", 《HTTPS://BLOG.CSDN.NET/TIANTAO2012/ARTICLE/DETAILS/64121502》 *
六角雅阁: ""linux deconfig config kconfig与makefile"", 《HTTPS://BLOG.CSDN.NET/LIUJIAOYAGE/ARTICLE/DETAILS/34430353》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111338636A (en) * 2020-02-21 2020-06-26 北京松果电子有限公司 Kernel preprocessing method, kernel preprocessing device and electronic equipment
CN111338636B (en) * 2020-02-21 2023-09-26 北京小米松果电子有限公司 Kernel preprocessing method, kernel preprocessing device and electronic equipment
CN112231010A (en) * 2020-09-28 2021-01-15 四川新网银行股份有限公司 Application configuration information management and dynamic updating method based on OSGI (open service gateway initiative) specification
CN112231010B (en) * 2020-09-28 2023-06-06 四川新网银行股份有限公司 Method for managing and dynamically updating application configuration information based on OSGI (open service gateway initiative) specification
CN112526932A (en) * 2020-12-16 2021-03-19 上海维宏电子科技股份有限公司 Method, system, device, processor, storage medium and application for realizing three-level configuration setting management by numerical control processing software

Also Published As

Publication number Publication date
CN107748680B (en) 2021-03-16

Similar Documents

Publication Publication Date Title
CN107508892A (en) A kind of page access method, server and computer-readable recording medium
CN107314774A (en) A kind of digital map navigation method, equipment and computer-readable recording medium
CN107329682A (en) Edge exchange method and mobile terminal
CN107729103A (en) A kind of method for switching theme, mobile terminal and computer-readable storage medium
CN107592416A (en) Method for sending voice message, terminal and computer-readable recording medium
CN107463324A (en) A kind of image display method, mobile terminal and computer-readable recording medium
CN107506039A (en) Mobile terminal, data transmission method and computer-readable storage medium
CN107786749A (en) A kind of information processing method, terminal and computer-readable recording medium
CN107888768A (en) One kind solution lock control method, terminal and computer-readable recording medium
CN107181865A (en) Processing method, terminal and the computer-readable recording medium of unread short messages
CN107656743A (en) A kind of discharging method of application, terminal and readable storage medium storing program for executing
CN107526493A (en) A kind of small tool display methods, equipment and computer-readable recording medium
CN107229410A (en) Interactive operation method, mobile terminal and computer-readable recording medium
CN107566608A (en) A kind of system air navigation aid, equipment and computer-readable recording medium
CN107748680A (en) A kind of kernel setup method, terminal and computer-readable recording medium
CN107818022A (en) Application programming interfaces merging method, mobile terminal and computer-readable recording medium
CN107239218A (en) Control method, mobile terminal and the computer-readable recording medium of mobile terminal
CN107423065A (en) Method, mobile terminal and the computer-readable recording medium that a kind of application is attended to anything else
CN107105058A (en) Folder transmission method and mobile terminal
CN109656649A (en) A kind of desktop application control method, terminal and computer readable storage medium
CN107809527A (en) A kind of method and apparatus that prompt operation is presented
CN107643870A (en) Multi-screen display method, mobile terminal and computer-readable recording medium
CN107566631A (en) A kind of method for controlling volume, mobile terminal and computer-readable recording medium
CN107391593A (en) A kind of document handling method, mobile terminal and computer-readable recording medium
CN107526954A (en) A kind of right management method, mobile terminal and computer-readable recording medium

Legal Events

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