CN106775833B - Device driver loading method, terminal and system - Google Patents

Device driver loading method, terminal and system Download PDF

Info

Publication number
CN106775833B
CN106775833B CN201611064770.8A CN201611064770A CN106775833B CN 106775833 B CN106775833 B CN 106775833B CN 201611064770 A CN201611064770 A CN 201611064770A CN 106775833 B CN106775833 B CN 106775833B
Authority
CN
China
Prior art keywords
embedded
equipment
driver
device driver
user space
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.)
Active
Application number
CN201611064770.8A
Other languages
Chinese (zh)
Other versions
CN106775833A (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.)
Hisense Mobile Communications Technology Co Ltd
Original Assignee
Hisense Mobile Communications 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 Hisense Mobile Communications Technology Co Ltd filed Critical Hisense Mobile Communications Technology Co Ltd
Priority to CN201611064770.8A priority Critical patent/CN106775833B/en
Publication of CN106775833A publication Critical patent/CN106775833A/en
Application granted granted Critical
Publication of CN106775833B publication Critical patent/CN106775833B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers

Landscapes

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

Abstract

The invention discloses a device driver loading method, a terminal and a system, and belongs to the technical field of computers. The method is applied to a terminal, the terminal comprises a kernel space, a user space and a file manager, and the method comprises the following steps: when the embedded device is connected to the terminal, the kernel space initiates a device connection event; the user space monitors the equipment connection event and sends an acquisition message to the file manager when determining that the equipment driver of the embedded equipment is not loaded, wherein the acquisition message is used for indicating to acquire the equipment driver of the embedded equipment; when the file manager receives the acquisition message, acquiring the device driver from the storage device, and returning the device driver to the user space, wherein the storage device is used for storing at least one device driver; the user space and the kernel space load the device driver from the file manager. The method and the device get rid of the limitation that the terminal can only load the acquired device driver, and improve the flexibility.

Description

Device driver loading method, terminal and system
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, a terminal, and a system for loading a device driver.
Background
The device driver is a program that allows computer software to interact with hardware, and can be provided to the terminal as an interface of the hardware device to realize the control of the hardware device by the terminal. Then, for any embedded device connected to the terminal, data interaction with the embedded device can be performed only after the terminal loads the device driver of the embedded device.
When the device driver is loaded, the terminal usually adopts a static loading mode, that is, after the device driver is obtained, the device driver is directly compiled into the kernel, and after the kernel is started, the device driver can be directly loaded. And then, when the embedded equipment matched with the equipment driving program is connected to the terminal, the terminal can perform data interaction with the embedded equipment through the equipment driving program.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
the terminal can only load the acquired device driver, once the terminal does not acquire the device driver of a certain embedded device, the terminal cannot realize loading and cannot perform data interaction with the embedded device, and the limitation is strong.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide a method, a terminal, and a system for loading a device driver. The technical scheme is as follows:
in one aspect, a device driver loading method is provided, and is applied to a terminal, where the terminal includes a kernel space, a user space, and a file manager, and the method includes:
when the embedded equipment is connected to the terminal, the kernel space initiates an equipment connection event;
the user space monitors the equipment connection event and sends an acquisition message to the file manager when determining that the equipment driver of the embedded equipment is not loaded, wherein the acquisition message is used for indicating to acquire the equipment driver of the embedded equipment;
when the file manager receives the acquisition message, acquiring the device driver from a storage device, and returning the device driver to the user space, wherein the storage device is used for storing at least one device driver;
the user space and the kernel space load the device driver from the file manager.
Optionally, when the embedded device is connected to the terminal, the kernel space initiates a device connection event, including:
when the embedded equipment is connected to the terminal, the kernel space starts an equipment service process;
initiating, by the device service process, the device connection event.
Optionally, the running, by the user space, of the device manager and the udevd process, and the sending, by the user space, an acquisition message to the file manager when the device connection event is monitored and it is determined that the device driver of the embedded device is not loaded, includes:
the user space monitors the equipment connection event, traverses the loaded equipment driver through the equipment manager, and judges whether the traversed equipment driver is matched with the embedded equipment;
when all the traversed device drivers are determined not to be matched with the embedded device, the device manager returns a notification message of the device drivers of the embedded device to the kernel space, wherein the device drivers of the embedded device are not loaded;
when the kernel space receives the notification message, sending an event for acquiring a device driver to the user space;
and the user space sends the acquisition message to the file manager through the udevd process.
Optionally, when receiving the obtaining message, the file manager obtains the device driver from a storage device, where the obtaining message includes:
the file manager downloads the device driver from the storage device through the established network connection; alternatively, the first and second electrodes may be,
the file manager copies the device driver from a storage device connected to the terminal.
Optionally, the loading, by the user space and the kernel space, the device driver from the file manager includes:
displaying an active window in the user space, and acquiring relevant parameters of the embedded equipment input in the active window by a user;
the user space calls the active window to obtain the relevant parameters, and the device driver is loaded from the file manager based on the relevant parameters;
the kernel space registers the device driver, and registers the embedded device under the condition that the device driver is determined to be matched with the embedded device;
and the kernel space sends a loading success event to the user space, and when the user space receives the loading success event, the user space creates a device node matched with the embedded device.
In another aspect, a terminal is provided, the terminal comprising a kernel space, a user space, and a file manager;
the kernel space is used for initiating a device connection event when the embedded device is connected to the terminal;
the user space is used for monitoring the equipment connection event and sending an acquisition message to the file manager when determining that the equipment driver of the embedded equipment is not loaded, wherein the acquisition message is used for indicating to acquire the equipment driver of the embedded equipment;
the file manager is configured to, when receiving the acquisition message, acquire the device driver from a storage device and return the device driver to the user space, where the storage device is configured to store at least one device driver;
the user space and the kernel space are further used for loading the device driver from the storage device.
Optionally, the kernel space is further configured to start a device service process when the embedded device is connected to the terminal; initiating, by the device service process, the device connection event.
Optionally, the user space runs a device manager and a udevd process, and is further configured to monitor the device connection event, traverse the loaded device driver through the device manager, and determine whether the traversed device driver matches the embedded device; when all the traversed device drivers are determined not to be matched with the embedded device, the device manager returns a notification message of the device drivers of the embedded device to the kernel space, wherein the device drivers of the embedded device are not loaded;
the kernel space is further configured to send an event for acquiring a device driver to the user space when receiving the notification message;
the user space is further configured to send the acquisition message to the file manager through the udevd process.
Optionally, the file manager is further configured to download the device driver from the storage device through the established network connection; or, copying the device driver from a storage device already connected to the terminal.
Optionally, the user space is further configured to display an active window, and obtain a parameter related to the embedded device, which is input by a user in the active window; calling the active window to obtain the relevant parameters, and loading the device driver from the file manager based on the relevant parameters;
the kernel space is further used for registering the device driver and registering the embedded device under the condition that the device driver is determined to be matched with the embedded device; sending a loading success event to the user space;
and the user space is also used for creating a device node matched with the embedded device when the loading success event is received.
In another aspect, a system is provided, where the system includes an embedded device, a terminal, and a storage device, and the terminal includes a kernel space, a user space, and a file manager;
the kernel space is used for initiating a device connection event when the embedded device is connected to the terminal;
the user space is used for monitoring the equipment connection event and sending an acquisition message to the file manager when determining that the equipment driver of the embedded equipment is not loaded, wherein the acquisition message is used for indicating to acquire the equipment driver of the embedded equipment;
the file manager is configured to, when receiving the acquisition message, acquire the device driver from the storage device and return the device driver to the user space, where the storage device is configured to store at least one device driver;
the user space and the kernel space are further used for loading the device driver from the storage device.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
by storing at least one device driver in the storage device, when the terminal is connected with the embedded device but the device driver of the embedded device is not loaded, the file manager can acquire the device driver from the storage device, so that the loading process is completed, the limitation that the terminal can only load the acquired device driver is eliminated, and the flexibility is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a device driver loading method according to an embodiment of the present invention;
fig. 2 is a flowchart of a device driver loading method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a device driver loading apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of a device driver loading method according to an embodiment of the present invention. The execution subject of the embodiment of the invention is a terminal, the terminal comprises a kernel space, a user space and a file manager, and referring to fig. 1, the method comprises the following steps:
101. when the embedded device is connected to the terminal, the kernel space initiates a device connection event.
102. And when the user space monitors the equipment connection event and determines that the equipment driver of the embedded equipment is not loaded, sending an acquisition message to the file manager, wherein the acquisition message is used for indicating to acquire the equipment driver of the embedded equipment.
103. And when receiving the acquisition message, the file manager acquires the device driver from the storage device and returns the device driver to the user space, wherein the storage device is used for storing at least one device driver.
104. The user space and the kernel space load the device driver from the file manager.
According to the method provided by the embodiment of the invention, at least one device driver is stored in the storage device, when the terminal is connected with the embedded device but the device driver of the embedded device is not loaded, the file manager can acquire the device driver from the storage device, so that the loading process is completed, the limitation that the terminal can only load the acquired device driver is eliminated, and the flexibility is improved.
Fig. 2 is a flowchart of a device driver loading method according to an embodiment of the present invention. An execution subject of the embodiment of the present invention is a terminal, the terminal includes a kernel space, a user space and a file manager, the kernel space runs a device service process, the user space runs a device manager and a udevd process, see fig. 2, and the method includes:
201. when the embedded device is connected to the terminal, the kernel space starts a device service process, and a device connection event is initiated through the device service process.
The terminal may be a fixed terminal such as a computer, or a mobile terminal such as a mobile phone or a tablet computer, and the embedded device may be a game pad, a bluetooth headset, a USB (Universal Serial Bus) mouse, a flash disk, or the like. The terminal is provided with an interface, and the embedded device can be connected with the terminal through the interface. The interface may be a USB interface or other types of interfaces, and the like, which is not limited in this embodiment of the present invention.
When the embedded device is connected to the terminal, the terminal needs to load a device driver of the embedded device to perform data interaction with the embedded device. Firstly, when the embedded device is connected to the terminal, an interrupt is generated, the kernel space of the terminal loads the platform device, and starts the device service process, and the device service process initiates a device connection event, wherein the device connection event is used for indicating that the terminal is connected with an embedded device.
The platform device is a device type in the kernel space, the device driver is a platform device, and the device driver can be loaded after the platform device is loaded in the kernel space.
202. The user space monitors the device connection event, determines that the device driver of the embedded device is not loaded through the device manager, and returns a notification message of the device driver of the embedded device to the kernel space.
Specifically, when the user space monitors the device connection event, it is determined that the terminal is connected to the embedded device, the loaded device driver is traversed through the device manager, whether the traversed device driver matches the embedded device is determined, when it is determined that all the traversed device drivers do not match the embedded device, it may be determined that the device driver of the embedded device is not loaded, and at this time, the device manager returns a notification message to the kernel space that the device driver of the embedded device is not loaded.
In another embodiment, when it is determined that the traversed one of the device drivers matches the embedded device, it may be determined that the device driver of the embedded device has been loaded, at which point the device manager may return a notification message to the kernel space that the device driver of the embedded device has been loaded.
The device manager (Udev) runs in the user space, and can dynamically manage device files according to the status of hardware devices in the system, including creation, deletion and the like of the device files, and the device files are usually stored in/dev directory. In fact, the device manager operates in the form of a daemon process, creates a device file only for the device connected to the terminal operating system, and when creating, creates a device file matching with the attributes of the device according to a certain rule, where the attributes may include a vendor name, a model number, a serial number, and the like, and manages the device file under the/dev directory by listening to an event issued by the kernel space, so as to add or delete the device file under the/dev directory.
203. And when receiving the notification message, the kernel space sends an event for acquiring the device driver to the user space.
In another embodiment, when the kernel space receives a notification message that the device driver of the embedded device is not loaded, it is determined that the device driver of the embedded device is currently recorded, and the following step 206 is directly performed without acquiring the device driver.
204. And when the user space receives the event of acquiring the device driver, transmitting an acquisition message to the file manager through the udevd process.
The udevd process is a background service process that runs in user space in the form of a daemon process.
The event of acquiring the device driver is used for indicating the user space to acquire the device driver of the embedded device, after the user space receives the event, the udevd process analyzes the event, and when the event is determined to be the event of acquiring the device driver, an acquisition message is sent to the file manager, so that the file manager is indicated to acquire the device driver.
205. And when receiving the acquisition message, the file manager acquires the device driver from the storage device in a downloading or copying mode and returns the device driver to the user space.
The storage device is used for storing at least one device driver, and when the device driver is not loaded in the terminal, the device driver can be acquired from the storage device.
Specifically, the storage device may be a storage server or any cloud server, the terminal establishes a network connection with the storage device, and the file manager downloads the device driver from the storage device through the established network connection. Alternatively, the storage device may be a storage device such as a flash disk, the storage device being connected to the terminal, the file manager copying the device driver from the storage device already connected to the terminal. Then, the file manager returns the acquired device driver to the user space.
206. The user space displays an active window, acquires relevant parameters of the embedded device input by a user in the active window, calls the active window, acquires the relevant parameters, and loads the device driver from the file manager based on the relevant parameters.
The user space may create an active window and display the active window, the device driver is provided in the active window, and when the user clicks on the device driver, relevant parameters of the embedded device, such as VendorID (vendor identification), subvondorid (sub-vendor identification), DeviceID (device identification), etc., may be entered. The user space may invoke the active window, obtain the relevant parameter, and load a corresponding device driver from the file manager based on the relevant parameter.
207. The kernel space registers the device driver, registers the embedded device and sends a loading success event to the user space under the condition that the device driver is determined to be matched with the embedded device.
When the kernel space registers the embedded device, a device file is created for the embedded device, such as a device class demo _ class and a device demo _ dev.
It should be noted that the terminal may include a file system, where the file system may be configured to manage devices of the system, organize devices connected to the system into files, where each device has a unique corresponding directory in the file system, and the user space may read and write device files under a target, so as to implement interaction with the kernel space by using the device files. The device manager operates in dependence on the functionality of the file system and may dynamically create or delete device files based on device information exported from the file system.
Wherein, when the operating system of the terminal is a Linux operating system, the file system may be a sysfs file system.
208. And when the user space receives the loading success event, creating a device node matched with the embedded device, finishing the loading process, and performing data interaction between the terminal and the embedded device.
The loading success event carries the relevant parameters of the embedded device, the user space can create a corresponding device node according to the relevant parameters, and the creation of the device node indicates that the device driver is completely loaded.
According to the method provided by the embodiment of the invention, at least one device driver is stored in the storage device, when the terminal is connected with the embedded device but the device driver of the embedded device is not loaded, the file manager can acquire the device driver from the storage device, so that the loading process is completed, the limitation that the terminal can only load the acquired device driver is eliminated, and the flexibility is improved.
In addition, the embodiment of the invention adopts a dynamic loading mode, the device driver of the embedded device is loaded only when the embedded device is connected to the terminal, and the device driver is not compiled into the kernel space, thereby avoiding occupying the capacity of the kernel space and saving the storage space.
Fig. 3 is a schematic structural diagram of a terminal according to an embodiment of the present invention, and referring to fig. 3, the terminal includes: kernel space 301, user space 302, and file manager 303;
the kernel space 301 is used for initiating a device connection event when the embedded device is connected to the terminal;
the user space 302 is configured to monitor the device connection event, and send an acquisition message to the file manager when determining that the device driver of the embedded device is not loaded, where the acquisition message is used to instruct to acquire the device driver of the embedded device;
the file manager 303, configured to, when receiving the obtaining message, obtain the device driver from a storage device, and return the device driver to the user space, where the storage device is used to store at least one device driver;
the user space 302 and the kernel space 301 are also used to load the device driver from the storage device.
Optionally, the kernel space 301 is further configured to start a device service process when the embedded device is connected to the terminal; initiating, by the device service process, the device connection event.
Optionally, the user space 302 runs a device manager and a udevd process, and the user space 302 is further configured to monitor the device connection event, traverse the loaded device driver through the device manager, and determine whether the traversed device driver matches the embedded device; when determining that all the traversed device drivers do not match the embedded device, the device manager returns a notification message to the kernel space 301 that the device drivers of the embedded device are not loaded;
the kernel space 301 is further configured to send an event for acquiring a device driver to the user space 302 when receiving the notification message;
the user space 302 is further configured to send the obtaining message to the file manager 303 through the udevd procedure.
Optionally, the file manager 303 is further configured to download the device driver from the storage device through the established network connection; alternatively, the device driver is copied from a storage device already connected to the terminal.
Optionally, the user space 302 is further configured to display an active window, and obtain the relevant parameters of the embedded device input by the user in the active window; calling the active window to obtain the relevant parameters, and loading the device driver from the file manager 303 based on the relevant parameters;
the kernel space 301 is further configured to register the device driver, and register the embedded device when it is determined that the device driver matches the embedded device; sending a load success event to the user space 302;
the user space 302 is further configured to create a device node matching the embedded device upon receiving the loading success event.
It should be noted that: in the terminal provided in the foregoing embodiment, when the device driver is loaded, only the division of the functional modules is described as an example, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the terminal is divided into different functional modules to complete all or part of the functions described above. In addition, the terminal and the device driver loading method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
The present embodiment provides a terminal, which may be used to execute the device driver loading method provided in the foregoing embodiments. Referring to fig. 4, the terminal 400 includes:
the terminal 400 may include RF (Radio Frequency) circuitry 110, memory 120 including one or more computer-readable storage media, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a WiFi (Wireless Fidelity) module 170, a processor 180 including one or more processing cores, and a power supply 190. Those skilled in the art will appreciate that the terminal configuration shown in fig. 4 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the RF circuit 110 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, receives downlink information from a base station and then sends the received downlink information to the one or more processors 180 for processing; in addition, data relating to uplink is transmitted to the base station. In general, the RF circuitry 110 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier), a duplexer, and the like. In addition, the RF circuitry 110 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), email, SMS (Short Messaging Service), and the like.
The memory 120 may be used to store software programs and modules, and the processor 180 executes various functional applications and data processing by operating the software programs and modules stored in the memory 120. The memory 120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the terminal 400, and the like. Further, the memory 120 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 120 may further include a memory controller to provide the processor 180 and the input unit 130 with access to the memory 120.
The input unit 130 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, the input unit 130 may include a touch-sensitive surface 131 as well as other input devices 132. The touch-sensitive surface 131, also referred to as a touch display screen or a touch pad, may collect touch operations by a user on or near the touch-sensitive surface 131 (e.g., operations by a user on or near the touch-sensitive surface 131 using a finger, a stylus, or any other suitable object or attachment), and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface 131 may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 180, and can receive and execute commands sent by the processor 180. Additionally, the touch-sensitive surface 131 may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch-sensitive surface 131, the input unit 130 may also include other input devices 132. In particular, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 140 may be used to display information input by or provided to a user and various graphical user interfaces of the terminal 400, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 140 may include a Display panel 141, and optionally, the Display panel 141 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface 131 may cover the display panel 141, and when a touch operation is detected on or near the touch-sensitive surface 131, the touch operation is transmitted to the processor 180 to determine the type of the touch event, and then the processor 180 provides a corresponding visual output on the display panel 141 according to the type of the touch event. Although in FIG. 4, touch-sensitive surface 131 and display panel 141 are shown as two separate components to implement input and output functions, in some embodiments, touch-sensitive surface 131 may be integrated with display panel 141 to implement input and output functions.
The terminal 400 can also include at least one sensor 150, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 141 according to the brightness of ambient light, and a proximity sensor that may turn off the display panel 141 and/or a backlight when the terminal 400 is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured in the terminal 400, detailed descriptions thereof are omitted.
Audio circuitry 160, speaker 161, and microphone 162 may provide an audio interface between a user and terminal 400. The audio circuit 160 may transmit the electrical signal converted from the received audio data to the speaker 161, and convert the electrical signal into a sound signal for output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electric signal, converts the electric signal into audio data after being received by the audio circuit 160, and then outputs the audio data to the processor 180 for processing, and then to the RF circuit 110 to be transmitted to, for example, another terminal, or outputs the audio data to the memory 120 for further processing. The audio circuit 160 may also include an earbud jack to provide communication of a peripheral headset with the terminal 400.
WiFi belongs to a short-distance wireless transmission technology, and the terminal 400 can help a user send and receive e-mails, browse web pages, access streaming media, and the like through the WiFi module 170, and provides wireless broadband internet access for the user. Although fig. 4 shows the WiFi module 170, it is understood that it does not belong to the essential constitution of the terminal 400, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 180 is a control center of the terminal 400, connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the terminal 400 and processes data by operating or executing software programs and/or modules stored in the memory 120 and calling data stored in the memory 120, thereby performing overall monitoring of the mobile phone. Optionally, processor 180 may include one or more processing cores; preferably, the processor 180 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 180.
The terminal 400 further includes a power supply 190 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 180 via a power management system to manage charging, discharging, and power consumption management functions via the power management system. The power supply 190 may also include any component including one or more of a dc or ac power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown, the terminal 400 may further include a camera, a bluetooth module, etc., which will not be described herein. In this embodiment, the display unit of the terminal is a touch screen display, and the terminal further includes a memory and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the one or more processors. The one or more programs include instructions for performing the above-described device driver loading method.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (5)

1. A device driver loading method is applied to a terminal, the terminal comprises a kernel space, a user space and a file manager, the user space runs a device manager and a udevd process, the device manager is used for dynamically managing device files according to the condition of hardware devices in a system, and the method comprises the following steps:
when the embedded equipment is connected to the terminal, the kernel space loads platform equipment, starts an equipment service process, and initiates an equipment connection event through the equipment service process, wherein the equipment connection event is used for indicating that the terminal is connected with the embedded equipment;
the user space monitors the equipment connection event, traverses the loaded equipment driver through the equipment manager, and judges whether the traversed equipment driver is matched with the embedded equipment; when all the traversed device drivers are determined not to be matched with the embedded device, the device manager returns a notification message of the device drivers of the embedded device to the kernel space, wherein the device drivers of the embedded device are not loaded; when the kernel space receives the notification message, sending an event for acquiring a device driver to the user space; when the user space determines that the event of acquiring the device driver is received through the udevd process, sending an acquisition message to the file manager, wherein the acquisition message is used for indicating to acquire the device driver of the embedded device;
when the file manager receives the acquisition message, acquiring the device driver from a storage device, and returning the device driver to the user space, wherein the storage device is used for storing at least one device driver;
the user space creates and displays an active window, and acquires the relevant parameters of the embedded equipment input by a user in the active window; the user space calls the active window to obtain the relevant parameters, and the device driver is loaded from the file manager based on the relevant parameters; the kernel space registers the device driver, and registers the embedded device under the condition that the device driver is determined to be matched with the embedded device; and the kernel space sends a loading success event to the user space, and when the user space receives the loading success event, the user space creates a device node matched with the embedded device according to the related parameters so as to indicate that the device driver is loaded completely.
2. The method of claim 1, wherein retrieving the device driver from a storage device when the file manager receives the retrieve message comprises:
the file manager downloads the device driver from the storage device through the established network connection; alternatively, the first and second electrodes may be,
the file manager copies the device driver from a storage device connected to the terminal.
3. A terminal is characterized in that the terminal comprises a kernel space, a user space and a file manager, wherein the user space runs a device manager and a udevd process, and the device manager is used for dynamically managing device files according to the condition of hardware devices in a system;
the kernel space is used for loading platform equipment and starting an equipment service process when the embedded equipment is connected to the terminal, and initiating an equipment connection event through the equipment service process, wherein the equipment connection event is used for indicating that the terminal is connected with the embedded equipment;
the user space is used for monitoring the equipment connection event, traversing the loaded equipment driver through the equipment manager and judging whether the traversed equipment driver is matched with the embedded equipment; when all the traversed device drivers are determined not to be matched with the embedded device, the device manager returns a notification message of the device drivers of the embedded device to the kernel space, wherein the device drivers of the embedded device are not loaded;
the kernel space is further configured to send an event for acquiring a device driver to the user space when receiving the notification message;
the user space is further configured to send an acquisition message to the file manager when it is determined, by the udevd process, that the event of acquiring the device driver is received, where the acquisition message is used to instruct to acquire the device driver of the embedded device;
the file manager is configured to, when receiving the acquisition message, acquire the device driver from a storage device and return the device driver to the user space, where the storage device is configured to store at least one device driver;
the user space is also used for creating and displaying an active window and acquiring relevant parameters of the embedded equipment input by a user in the active window; calling the active window to obtain the relevant parameters, and loading the device driver from the file manager based on the relevant parameters;
the kernel space is further used for registering the device driver and registering the embedded device under the condition that the device driver is determined to be matched with the embedded device; sending a loading success event to the user space;
and the user space is also used for creating a device node matched with the embedded device according to the related parameters when the loading success event is received so as to indicate that the device driver is loaded completely.
4. The terminal of claim 3, wherein the file manager is further configured to download the device driver from the storage device over the established network connection; or, copying the device driver from a storage device already connected to the terminal.
5. A device driver loading system is characterized in that the system comprises an embedded device, a terminal and a storage device, wherein the terminal comprises a kernel space, a user space and a file manager, the user space runs the device manager and a udevd process, and the device manager is used for dynamically managing device files according to the condition of hardware devices in the system;
the kernel space is used for loading platform equipment and starting an equipment service process when the embedded equipment is connected to the terminal, and initiating an equipment connection event through the equipment service process, wherein the equipment connection event is used for indicating that the terminal is connected with the embedded equipment;
the user space is used for monitoring the equipment connection event, traversing the loaded equipment driver through the equipment manager and judging whether the traversed equipment driver is matched with the embedded equipment; when all the traversed device drivers are determined not to be matched with the embedded device, the device manager returns a notification message of the device drivers of the embedded device to the kernel space, wherein the device drivers of the embedded device are not loaded;
the kernel space is further configured to send an event for acquiring a device driver to the user space when receiving the notification message;
the user space is further configured to send an acquisition message to the file manager when it is determined, by the udevd process, that the event of acquiring the device driver is received, where the acquisition message is used to instruct to acquire the device driver of the embedded device;
the file manager is configured to, when receiving the acquisition message, acquire the device driver from the storage device and return the device driver to the user space, where the storage device is configured to store at least one device driver;
the user space is also used for creating and displaying an active window and acquiring relevant parameters of the embedded equipment input by a user in the active window; calling the active window to obtain the relevant parameters, and loading the device driver from the file manager based on the relevant parameters;
the kernel space is further used for registering the device driver and registering the embedded device under the condition that the device driver is determined to be matched with the embedded device; sending a loading success event to the user space;
and the user space is also used for creating a device node matched with the embedded device according to the related parameters when the loading success event is received so as to indicate that the device driver is loaded completely.
CN201611064770.8A 2016-11-28 2016-11-28 Device driver loading method, terminal and system Active CN106775833B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611064770.8A CN106775833B (en) 2016-11-28 2016-11-28 Device driver loading method, terminal and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611064770.8A CN106775833B (en) 2016-11-28 2016-11-28 Device driver loading method, terminal and system

Publications (2)

Publication Number Publication Date
CN106775833A CN106775833A (en) 2017-05-31
CN106775833B true CN106775833B (en) 2021-03-16

Family

ID=58902136

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611064770.8A Active CN106775833B (en) 2016-11-28 2016-11-28 Device driver loading method, terminal and system

Country Status (1)

Country Link
CN (1) CN106775833B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107577421A (en) * 2017-07-31 2018-01-12 深圳市牛鼎丰科技有限公司 Smart machine expansion method, device, storage medium and computer equipment
CN109753347B (en) * 2017-11-06 2023-03-21 阿里巴巴集团控股有限公司 System and method for realizing driving
CN109947482B (en) * 2017-12-21 2022-07-29 深圳Tcl新技术有限公司 Loading method of USB (universal serial bus) equipment, storage medium and smart television
CN109491983B (en) * 2018-11-01 2021-08-31 郑州云海信息技术有限公司 Data information management method and device and computer readable storage medium
CN111459554A (en) * 2020-03-05 2020-07-28 北京安码科技有限公司 Windows driver loading method, system, electronic device and storage medium
CN112256335B (en) * 2020-09-25 2023-06-27 宇龙计算机通信科技(深圳)有限公司 Method and device for loading drive file, storage medium and electronic equipment
CN112684914B (en) * 2020-12-31 2021-11-19 深圳雷柏科技股份有限公司 Kernel-driven-based method for realizing keyboard and mouse function modification and related equipment
CN113791824B (en) * 2021-08-10 2023-09-15 浪潮金融信息技术有限公司 Peripheral driver loading method, system and medium of terminal equipment

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1964526A (en) * 2005-11-09 2007-05-16 中兴通讯股份有限公司 A method for hardware drive program of intelligent loading mobile phone
CN101917350A (en) * 2010-09-13 2010-12-15 南京中兴特种软件有限责任公司 Network card drive-based zero copy Ethernet message capturing and transmitting implementation method under Linux
CN102081679A (en) * 2011-01-24 2011-06-01 深圳市共济科技有限公司 Computer performance data acquisition method and device
CN102316442A (en) * 2011-09-14 2012-01-11 京信通信系统(中国)有限公司 Remote radio unit (RRU) equipment intelligent starting method, and device and RRU system thereof
CN102436387A (en) * 2010-12-06 2012-05-02 微软公司 Fast computer startup
CN103279370A (en) * 2013-05-15 2013-09-04 腾讯科技(深圳)有限公司 Data processing method, terminal, server and system
CN103309704A (en) * 2013-05-09 2013-09-18 苏州泽佑科技有限公司 Android driving program loading method
CN103823771A (en) * 2014-03-04 2014-05-28 飞天诚信科技股份有限公司 Remote communication method and remote communication system
CN103902338A (en) * 2014-03-21 2014-07-02 珠海市君天电子科技有限公司 Drive loading method, drive processing method, client side, server and system
CN103942078A (en) * 2014-04-30 2014-07-23 华为技术有限公司 Method for loading driver and embedded device
CN105487933A (en) * 2015-11-24 2016-04-13 无锡江南计算技术研究所 Inter-kernel asynchronous message queue and shared memory based inter-domain communication method
CN105786805A (en) * 2014-12-15 2016-07-20 乐视移动智能信息技术(北京)有限公司 Intelligent mobile terminal, document manager and file display method of same

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101561855B (en) * 2009-05-27 2011-05-18 北京飞天诚信科技有限公司 Method and system for controlling computer to access USB device
CN103019751A (en) * 2011-09-20 2013-04-03 奇智软件(北京)有限公司 Plug-in equipment matching and maintaining method
CN102662685B (en) * 2012-03-06 2015-08-12 中兴通讯股份有限公司 The drive installation method of terminal device and device
CN104516749B (en) * 2013-09-27 2018-02-27 联想(北京)有限公司 A kind of information processing method and electronic equipment

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1964526A (en) * 2005-11-09 2007-05-16 中兴通讯股份有限公司 A method for hardware drive program of intelligent loading mobile phone
CN101917350A (en) * 2010-09-13 2010-12-15 南京中兴特种软件有限责任公司 Network card drive-based zero copy Ethernet message capturing and transmitting implementation method under Linux
CN102436387A (en) * 2010-12-06 2012-05-02 微软公司 Fast computer startup
CN102081679A (en) * 2011-01-24 2011-06-01 深圳市共济科技有限公司 Computer performance data acquisition method and device
CN102316442A (en) * 2011-09-14 2012-01-11 京信通信系统(中国)有限公司 Remote radio unit (RRU) equipment intelligent starting method, and device and RRU system thereof
CN103309704A (en) * 2013-05-09 2013-09-18 苏州泽佑科技有限公司 Android driving program loading method
CN103279370A (en) * 2013-05-15 2013-09-04 腾讯科技(深圳)有限公司 Data processing method, terminal, server and system
CN103823771A (en) * 2014-03-04 2014-05-28 飞天诚信科技股份有限公司 Remote communication method and remote communication system
CN103902338A (en) * 2014-03-21 2014-07-02 珠海市君天电子科技有限公司 Drive loading method, drive processing method, client side, server and system
CN103942078A (en) * 2014-04-30 2014-07-23 华为技术有限公司 Method for loading driver and embedded device
CN105786805A (en) * 2014-12-15 2016-07-20 乐视移动智能信息技术(北京)有限公司 Intelligent mobile terminal, document manager and file display method of same
CN105487933A (en) * 2015-11-24 2016-04-13 无锡江南计算技术研究所 Inter-kernel asynchronous message queue and shared memory based inter-domain communication method

Also Published As

Publication number Publication date
CN106775833A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
CN106775833B (en) Device driver loading method, terminal and system
US10635449B2 (en) Method and apparatus for running game client
CN107094294B (en) Network connection method and device
CN104518953B (en) Method for deleting message, instant communication terminal and system
CN106502703B (en) Function calling method and device
CN106371964B (en) Method and device for prompting message
US20190109767A1 (en) Network bandwidth management method, terminal and computer storage medium
CN107786424B (en) Audio and video communication method, terminal and server
CN108804915B (en) Virus program cleaning method, storage device and electronic terminal
CN110780940A (en) Application program loading method, electronic device and storage medium
CN106682189B (en) File name display method and device
CN106095423B (en) Method, terminal and server for providing browsing service
CN109688611B (en) Frequency band parameter configuration method, device, terminal and storage medium
CN106919458B (en) Method and device for Hook target kernel function
CN105278942B (en) Component management method and device
WO2015154700A1 (en) Method and apparatus for repairing dynamic link library file
CN107766351B (en) File directory identification method and device
CN107463395B (en) Component calling method and device
CN110891262A (en) Bluetooth pairing method, system and terminal equipment
CN107122204B (en) Application unloading state detection method and device
CN105159655B (en) Behavior event playing method and device
CN106933626B (en) Application association method and device
CN115065609A (en) B-end SaaS system hybrid deployment method and system
CN108280798B (en) Method and device for rendering and displaying browser kernel
CN109308164B (en) System migration method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee after: Qingdao Hisense Mobile Communication Technology Co.,Ltd.

Address before: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee before: HISENSE MOBILE COMMUNICATIONS TECHNOLOGY Co.,Ltd.