Offline interface board card driver integrated management method based on kylin system

Through the combination of graphical user interface and depmod functions, the problem of complexity of interface board driver management in Kirin system is solved, and the automatic loading, unloading, backup and rollback of board drivers is realized, improving production debugging efficiency.

CN118916085APending Publication Date: 2024-11-08CHINA STATE SHIPBUILDING CORP NO 707 RES INST
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411034120.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

In offline industrial control equipment, the interface board driver management of Kirin system relies on complex script writing and command line operations, which leads to unintuitive and inconvenient, affecting production work efficiency, especially for first-line production and debugging of Linux systems that are not familiar with Linux systems. For personnel.

Method used

Using a graphical user interface combined with the depmod function of the Linux system, an interface board driver library is established to realize automatic loading, unloading, backup and rollback of board drivers, and reduce the requirements for software professional knowledge.

Benefits of technology

It improves production debugging work efficiency, enables front-line personnel to manage interface board drivers more intuitively and conveniently, reduces the requirements for professional knowledge, and realizes automated management of board drivers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916085A_ABST
    Figure CN118916085A_ABST
Patent Text Reader

Abstract

The invention relates to an off-line interface board card driver integrated management method based on a kylin system, and aims at an interface board card driver management scene of off-line industrial control equipment based on the kylin system, a graphical user interface application program is adopted, and interface board card driver integrated management software and a method thereof are developed. An interface board card drive program library is established locally, and a depmod function of a Linux system is combined, so that the system is helped to automatically update a dependency relationship between modules when a kernel module is loaded or unloaded, and the functions of automatic loading, unloading, backup, rollback and the like of a board card drive are realized. According to the method, front-line production and debugging personnel can more intuitively, conveniently and flexibly manage the interface board card drive program, the requirement for the software professional knowledge level of the production and debugging personnel is greatly reduced, and the production and debugging work efficiency is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of software control, and in particular to an offline interface board driver integrated management method based on a Kylin system. Background Art

[0002] In recent years, the Kylin system has gradually received widespread attention and has been widely used in aerospace, industrial control, navigation and other fields. The driver software control of various interface boards (such as network cards, serial port boards, CAN boards, etc.) also plays an important role in the application of the Kylin system.

[0003] Kylin system is developed based on Linux kernel. Driver loading methods of Linux operating system are mainly divided into two categories: static loading and dynamic loading. Static loading is to compile the driver program directly into the kernel, which can be directly called after the system starts. In this way, the driver is compiled into the kernel when the kernel is compiled, and the driver is automatically loaded after the system starts. However, it is more troublesome to debug the statically loaded driver. Every time a place is modified, the kernel must be recompiled and downloaded, which is very inefficient. Dynamic loading is to load the driver module into the kernel instead of compiling it directly into the kernel. In Linux 2.4 kernel, the command to load the driver is insmod, and the command to delete the module is rmmod. In Linux 2.6 and above kernels, in addition to insmod and rmmod, the modprobe command is also introduced to load modules. Dynamic loading provides greater flexibility, and the driver can be loaded or unloaded as needed when the system is running. For Kylin system, its kernel is generally compiled and packaged in advance by the operating system vendor, and it is difficult to cover all device drivers. Therefore, the interface board drivers of hardware manufacturers are generally installed and managed through dynamic loading.

[0004] When using a computer device with the Kylin system connected to the Internet, the board driver can be loaded or updated online through the Internet. In offline industrial control equipment, since the Kylin system is developed based on the Linux kernel, the installation and application of its interface board driver software relies heavily on the script writing and command line operations of software developers. For front-line production and debugging personnel who are not familiar with the Linux system, during the operation of offline industrial control equipment, the installation and uninstallation of the Kylin system interface board driver by running scripts or command lines is not intuitive and convenient, which greatly affects the efficiency of production work. Summary of the invention

[0005] The purpose of the present invention is to overcome the shortcomings of the prior art and propose an offline interface board driver integrated management method based on the Kylin system, which realizes the automatic loading, unloading, backup, rollback and other functions of the board driver, and at the same time enables front-line production and debugging personnel to manage the interface board driver program more intuitively, conveniently and flexibly, greatly reducing the software expertise level requirements for production debugging personnel and greatly improving the efficiency of production debugging work.

[0006] The present invention solves the technical problem by adopting the following technical solutions:

[0007] An offline interface board driver integrated management method based on the Kylin system comprises the following steps:

[0008] Step 1: Create a directory in the specified path of the operating system's file system.

[0009] Step 2: After the network card, serial port board and CAN board driver files, related dependency files, driver description files and driver loading / unloading related operation scripts are written in the required format, they are stored in the folders corresponding to the network card, serial port board and CAN board respectively, and then stored in the specified path, and the interface board driver library is established;

[0010] Step 3: Display the current processor and operating system version information in the front-end graphical user interface; and display various driver information in the interface card driver library in the graphical interface according to the configuration in the driver description file, so that users can view it easily;

[0011] Step 4: Users can load, uninstall, back up, and roll back drivers as needed.

[0012] Furthermore, the directory created in step 1 is used to store the background driver management program script and the interface board driver.

[0013] Moreover, the specific implementation method of the driver loading in step 4 is: the user selects the row where the required board driver is located, and clicks the "Load" button on the graphical interface to execute the corresponding background loader, copy the corresponding board driver file to the specified directory under / lib / modules / $(uname-r) / kernel, and generate and update the kernel module dependency through the depmod function, so that the system can correctly parse and satisfy the dependency when loading the module, thereby realizing the automatic loading of the interface board driver.

[0014] Moreover, the specific implementation method of the driver uninstallation in step 4 is: the user selects the row where the required board driver is located, and clicks the "Uninstall" button on the graphical interface to execute the corresponding background uninstallation program, delete the specified directory under / lib / modules / $(uname-r) / kernel, and update the kernel module dependency file through the depmod function to realize the uninstallation of the interface board driver.

[0015] Moreover, the specific implementation method of the driver backup in step 4 is: the user selects the row where the required board driver is located, and clicks the "Backup" button on the graphical interface to execute the corresponding background loader, copy the selected driver to the specified backup directory, and uninstall the driver at the same time, thereby realizing the backup function of the interface board driver.

[0016] Moreover, the specific implementation method of the driver rollback in step 4 is: in the rollback function, the user selects the old version of the driver to be restored and clicks the "Restore" button on the graphical interface to reload the old version of the driver.

[0017] The advantages and positive effects of the present invention are:

[0018] The present invention is aimed at the interface card driver management scenario of offline industrial control equipment based on the Kylin system, adopts a graphical user interface application, develops interface card driver integrated management software and method, and helps the system to automatically update the dependency between modules when loading or unloading kernel modules by establishing an interface card driver library locally, combined with the depmod function of the Linux system, to realize the functions of automatic loading, unloading, backup, rollback, etc. of the card driver. The present invention enables front-line production and debugging personnel to manage the interface card driver more intuitively, conveniently and flexibly, greatly reduces the software expertise level requirements for production debugging personnel, and greatly improves the efficiency of production debugging work. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 This is a flowchart of initializing the driver integrated management software program of the present invention;

[0020] Figure 2 Driver loading flow chart for the present invention;

[0021] Figure 3 This is a flow chart of driver uninstallation of the present invention. DETAILED DESCRIPTION

[0022] The present invention is further described in detail below with reference to the accompanying drawings.

[0023] An offline interface card driver integrated management method based on the Kylin system is provided, and an offline interface card driver integrated management software running on the Kylin system is developed based on Qt and shell scripts. Figure 1 As shown, the following steps are included:

[0024] Step 1. Create the / opt / driveraid directory in the specified path of the operating system's file system to store background driver management program scripts, interface board drivers, etc.; create the / lib / modules / $(uname-r) / kernel / driveraid kernel module directory to store drivers that need to be dynamically loaded at startup so that the system can find these drivers.

[0025] Step 2: After the network card, serial port board and CAN board driver files, related dependency files, driver description files and driver loading / unloading related operation scripts are written in the required format, they are stored in the corresponding folders of the network card, serial port board and CAN board respectively, and then stored in the specified path, and the interface board driver library is established.

[0026] Step 3: Scan all drivers in the interface board driver library, load the driver description file aid.json, and read out the fields of the interface board name, driver name, detailed description, path, etc. corresponding to the driver.

[0027] Step 4: Display the driver information in a table on the graphical interface of the interface board driver integrated management software in the form of one row for each board driver.

[0028] Taking the network card driver as an example, its driver description file aid.json contains the following content:

[0029] {

[0030] "UniqueName":"Board name",

[0031] "DriverName":"Driver name and version number",

[0032] "Explanation":"Applicable to a certain model of network card. This text is a detailed description."

[0033] }

[0034] Step 5: Users can load, uninstall, back up, and roll back drivers as needed.

[0035] The specific implementation method of driver loading in step 4 is: the user selects the row where the required board driver is located and clicks the "Load" button on the graphical interface to execute the corresponding background loader, copy the corresponding board driver file to the specified directory under / lib / modules / $(uname-r) / kernel, and use the depmod function to generate and update the kernel module dependency so that the system can correctly parse and satisfy the dependency when loading the module, thereby realizing automatic loading of the interface board driver.

[0036] like Figure 2 As shown, driver loading includes the following steps:

[0037] Step 4.1.1: When the user presses the "Load" button, check whether the selected driver has been loaded. If the selected driver has not been loaded, change the "Loading Status" corresponding to the driver in the graphical interface to "√";

[0038] Step 4.1.2, copy the driver and its dependent files corresponding to the driver selected by the user in the interface card driver library to the kernel module directory / lib / modules / $(uname-r) / kernel / driveraid / xxx;

[0039] Step 4.1.3: According to the command in the loading script load.sh, execute insmodxxx.ko or related driver loading script to load the driver in real time;

[0040] Step 4.1.4, execute the depmod -a command to update the kernel module dependency file to enable the interface card driver to be automatically loaded at startup;

[0041] Step 4.1.5. Restart the system for the settings to take effect.

[0042] The specific implementation method of driver uninstallation in step 4 is: the user selects the row where the required board driver is located and clicks the "Uninstall" button in the graphical interface to execute the corresponding background uninstallation program, delete the specified directory under / lib / modules / $(uname-r) / kernel, and use the depmod function to update the kernel module dependency file to uninstall the interface board driver.

[0043] like Figure 3 As shown, driver uninstallation includes the following steps:

[0044] Step 4.2.1: When the user presses the "Uninstall" button, check whether the selected driver has been loaded. If the selected driver has been loaded, delete the "√" in the "Loading Status" corresponding to the driver in the graphical interface;

[0045] Step 4.2.2, delete the driver file storage location xxx directory corresponding to the driver selected by the user under the kernel module directory / lib / modules / $(uname-r) / kernel / driveraid;

[0046] Step 4.2.3: According to the command in the uninstallation script unload.sh, execute rmmodxxx.ko or related driver uninstallation script to uninstall the driver in real time;

[0047] Step 4.2.4, execute the depmod -a command to update the kernel module dependency file to avoid loading the driver when the system restarts;

[0048] Step 4.2.5. Restart the system for the settings to take effect.

[0049] The specific implementation method of the driver backup in step 4 is: the user selects the row where the required board driver is located, and clicks the "Backup" button on the graphical interface to execute the corresponding background loader, copy the selected driver to the specified backup directory, and uninstall the driver at the same time, thereby realizing the backup function of the interface board driver.

[0050] The specific implementation method of the driver rollback in step 4 is: in the rollback function, the user selects the old version of the driver to be restored and clicks the "Restore" button on the graphical interface to reload the old version of the driver.

[0051] Among them, in the driver integration management method, the user can enter the root user password through the permission management function to grant the driver integration management software corresponding user permissions.

[0052] The driver integration management software and method constructed by the present invention is a graphical user interface application program, which mainly includes a front-end graphical user interface, a back-end interface board driver management program and other parts, and realizes functions such as loading, unloading, backup, rollback, and permission management of driver software. Through an intuitive and easy-to-use graphical interface, users can easily install, manage and update interface board drivers even without professional knowledge.

[0053] It should be emphasized that the embodiments described in the present invention are illustrative rather than restrictive. Therefore, the present invention includes but is not limited to the embodiments described in the specific implementation manner. Any other implementation manners derived by those skilled in the art based on the technical solution of the present invention also fall within the scope of protection of the present invention.

Claims

1. An offline interface card driver integrated management method based on Kylin system, Features: The following steps are involved: Step 1: Create a directory in the specified path of the operating system's file system. Step 2: After the network card, serial port board and CAN board driver files, related dependency files, driver description files and driver loading / unloading related operation scripts are written in the required format, they are stored in the folders corresponding to the network card, serial port board and CAN board respectively, and then stored in the specified path, and the interface board driver library is established; Step 3: Display the current processor and operating system version information in the front-end graphical user interface; and display various driver information in the interface card driver library in the graphical interface according to the configuration in the driver description file, so that users can view it easily; Step 4: Users can load, uninstall, back up, and roll back drivers as needed.

2. According to claim 1, an offline interface board driver integrated management method based on the Kylin system, Features: The directory created in step 1 is used to store the background driver management program script and the interface board driver.

3. According to claim 1, an offline interface board driver integrated management method based on the Kylin system, Features: The specific implementation method of the driver loading in step 4 is: the user selects the row where the required board driver is located and clicks the "Load" button on the graphical interface to execute the corresponding background loader, copy the corresponding board driver file to the specified directory under / lib / modules / $(uname-r) / kernel, and generate and update the kernel module dependency through the depmod function, so that the system can correctly parse and satisfy the dependency when loading the module, thereby realizing the automatic loading of the interface board driver.

4. According to claim 1, an offline interface board driver integrated management method based on Kylin system, Features: The specific implementation method of driver uninstallation in step 4 is: the user selects the row where the required board driver is located and clicks the "Uninstall" button in the graphical interface to execute the corresponding background uninstallation program, delete the specified directory under / lib / modules / $(uname-r) / kernel, and update the kernel module dependency file through the depmod function to realize the uninstallation of the interface board driver.

5. According to claim 1, an offline interface board driver integrated management method based on Kylin system, Features: The specific implementation method of the driver backup in step 4 is: the user selects the row where the required board driver is located, and clicks the "Backup" button in the graphical interface to execute the corresponding background loader, copy the selected driver to the specified backup directory, and uninstall the driver at the same time, thereby realizing the backup function of the interface board driver.

6. According to claim 1, an offline interface card driver integrated management method based on Kylin system, Features: The specific implementation method of the driver rollback in step 4 is: in the rollback function, the user selects the old version of the driver to be restored and clicks the "Restore" button on the graphical interface to reload the old version of the driver.

Citation Information

Cited By

  • Password equipment management method and device, electronic equipment and readable storage medium

    CN119670063A