Peripheral drive network upgrading method and system under Linux kernel system

Through the system manufacturer's server parsing and returning local peripheral drivers, the cross-platform, cross-kernel version and cross-OS compatibility issues of peripheral drivers under the Linux kernel system are solved, and the efficient availability and proprietary technical protection of peripheral drivers are achieved.

CN120371341APending Publication Date: 2025-07-25KYLIN CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510427553.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The peripheral driver method under the existing Linux kernel system cannot be universal on multiple CPU platforms, multiple core versions, and multiple OSes, and cannot protect the proprietary design of peripheral manufacturers, resulting in high maintenance difficulties and increased costs.

Method used

Provides a peripheral driver network upgrade method, which receives driver packages submitted by peripheral manufacturers through the system manufacturer server, parses and returns drivers suitable for local CPU architecture and kernel versions, uses static library files to protect private source code, and supports driver installation across CPU platforms, kernel versions and OS.

Benefits of technology

It realizes compatibility between peripheral-driven cross-platform, cross-core version and cross-OS, reducing maintenance difficulties and costs for peripheral manufacturers, while protecting peripheral manufacturers' proprietary technology and meeting international common standards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120371341A_ABST
    Figure CN120371341A_ABST
Patent Text Reader

Abstract

The invention discloses a peripheral drive network upgrading method and system under a Linux kernel system, and the method comprises the steps that a system manufacturer server analyzes a peripheral drive package submitted by a peripheral manufacturer, a peripheral drive program in the peripheral drive package comprises a code source file and a static library file, and peripherals corresponding to the peripheral drive package are added into a support list; and receiving and analyzing a peripheral drive request of the terminal equipment, and returning a corresponding peripheral drive package to the terminal equipment, so that the terminal equipment executes local compiling on the peripheral drive package to obtain a drive program suitable for the local CPU architecture and the kernel version, and automatically completes installation of the drive program. The invention aims at providing a Linux kernel system peripheral drive network upgrading technology supported by a cross-CPU platform, a cross-kernel version and a cross-OS manufacturer, protecting special and private technologies of peripheral manufacturers, enabling peripheral drive network upgrading to be efficient and available, and meeting a solution of an existing international general standard.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of peripheral device drivers for operating systems, and specifically relates to a method and system for network upgrading of peripheral device drivers under a Linux kernel system. Background Art

[0002] The diversity of CPU platforms supported by the Linux kernel, such as X86, ARM64, SW64, LoongArch, etc. The diversity of Linux kernel versions. Even for the long-term maintained LTS versions, there are multiple versions such as 5.4, 5.10, 5.15, 6.1, 6.6, etc. There are many commercial Linux operating systems, such as KOS, Ubuntu, UOS, etc. There are also many Linux peripheral device manufacturers. Many manufacturers are willing and need to protect their proprietary designs, such as data conversion, data processing, data encryption, unique underlying control, etc. OS manufacturers need to provide a general solution to peripheral device manufacturers, a friendly and OS-unrestricted development and installation, and ensure the confidentiality of the proprietary or self-owned designs of peripheral device manufacturers. Currently, the following problems exist in the peripheral device driver method under the Linux kernel system: 1. After the peripheral device manufacturer's driver is compiled, it is bound to the CPU platform, Linux kernel version, and OS version, and cannot be used on multiple CPU platforms, multiple Linux kernel versions, and multiple operating systems with a single driver package. 2. The peripheral device manufacturer's driver needs to switch the compilation environment and compile the kernel according to the target machine, increasing the maintenance difficulty and maintenance cost of the manufacturer. 3. The peripheral device manufacturer's driver needs to open the driver code to the operating system, and cannot protect the confidentiality of the manufacturer's proprietary or self-owned design. 4. The solution provided by the OS manufacturer to the peripheral device manufacturer's driver should be efficient and available, and will not increase the development and maintenance costs of the peripheral device manufacturer, and has high versatility and ease of use. 5. The solution standard provided by the OS manufacturer should be based on the current existing international general standards to improve the enthusiasm of peripheral device manufacturers to participate in the cross-platform and cross-kernel version integration support of the driver. Summary of the Invention

[0003] The technical problem to be solved by the present invention: In view of the above problems of the prior art, a method and system for network upgrading of peripheral device drivers under a Linux kernel system are provided. The present invention aims to provide a Linux kernel system peripheral device driver network upgrading technology that supports cross-CPU platforms, cross-kernel versions, and cross-OS manufacturers, protects the proprietary and private technologies of peripheral device manufacturers, and enables the network upgrading of peripheral device drivers to be efficient and available and meet the solutions of current international general standards.

[0004] To solve the above technical problems, the technical solution adopted by the present invention is as follows: A method for network upgrading of peripheral device drivers under a Linux kernel system, comprising the following steps: S101, a system manufacturer server receives a peripheral driver package submitted by a peripheral manufacturer, wherein the driver program of the peripheral in the peripheral driver package includes a code source file and a static library file, wherein the static library file is a file obtained by pre-compiling private source code that the peripheral manufacturer does not want to disclose and providing an access interface, and the interface file includes an access interface of the static library file; S102, the system manufacturer server parses the peripheral driver package and adds the peripheral corresponding to the peripheral driver package to the support list; S103, the system manufacturer server receives a peripheral driver request from the terminal device; S104, the system manufacturer server parses the peripheral driver request of the terminal device. If the peripheral requested by the peripheral driver is in the support list, the corresponding peripheral driver package is returned to the terminal device so that the terminal device performs local compilation on the peripheral driver package to obtain a driver suitable for the local CPU architecture and kernel version and automatically completes the installation of the driver.

[0005] Optionally, before the system manufacturer server receives the peripheral driver package submitted by the peripheral manufacturer, the peripheral manufacturer prepares the peripheral driver package and submits it to the system manufacturer server: S201, obtaining a specification file of a preset peripheral driver specification issued by a system manufacturer; S202, generating a peripheral driver package according to a preset peripheral driver specification; S203, submitting the generated peripheral driver package to the system manufacturer server.

[0006] Optionally, when the system manufacturer server receives a peripheral driver request from a terminal device, the processing steps of the terminal device include: S301, the terminal device uses the system image to install the operating system; S302, the terminal device performs a networking operation after booting into the operating system; S303, the terminal device first performs a software update, and then checks whether the compilation environment has been installed. If the compilation environment has not been installed, the installation operation of the compilation environment is performed to complete the installation of the compilation environment; S304, the terminal device collects the manufacturer ID and device ID of the peripheral device for which the driver is not installed; S305: The terminal device initiates a peripheral device driver request to the system manufacturer server according to the manufacturer ID and device ID of the peripheral device.

[0007] Optionally, the peripheral driver package consists of a configuration file config, an installation file install, a Makefile, and a driver program for the peripheral. The configuration file config is used to configure the supported kernel version range of the peripheral driver package and the configuration information of whether kernel parameters are required during driver installation. The installation file install is used to execute the installation of the driver program. The Makefile is used to execute the compilation of the driver program, and the source code files and static library files required for driver compilation are specified therein. The Makefile contains kernel version judgment code and CPU architecture judgment code. The kernel version judgment code is used to execute different functions or codes according to different Linux versions and kernel versions to achieve cross-kernel version support. The CPU architecture judgment code is used to import different header files or execute different functions or codes according to different CPU architectures to achieve cross-CPU architecture support.

[0008] Optionally, the terminal device performs local compilation on the peripheral driver package to obtain a driver program suitable for the local CPU architecture and kernel version and automatically completes the installation of the driver program, including: S401, obtaining the kernel version of the operating system; S402, determining whether the kernel version of the operating system conforms to the supported kernel version range in the configuration file config. If not, end and exit. Otherwise, jump to the next step; S403, obtaining the CPU platform and CPU platform architecture of the current system; S404, finding the corresponding source code files and static library files in the peripheral driver package according to the CPU platform and CPU platform architecture of the current system; S405, performing local compilation on the Makefile through the compilation environment to obtain a driver program suitable for the local CPU architecture and kernel version; S406, reading the configuration information in the configuration file config on whether kernel parameters are required during driver installation. If kernel parameter configuration information is required, append the kernel parameters and execute the installation file install to complete the installation of the driver program; otherwise, directly execute the installation file install to complete the installation of the driver program.

[0009] Optionally, the private source code includes some or all of data conversion, data processing, data encryption, and peripheral underlying control files.

[0010] Optionally, the peripheral is an FPGA video capture card. The driver program of the peripheral in the peripheral driver package includes a PCI general bus part, a GPIO general bus part, and an I2C general bus part. Among them, the PCI general bus part is used to register a PCI driver based on the Linux system PCI subsystem, enable the PCI device, apply for PCI resources, read PCI information, apply for DMA resources, and register interrupts. The GPIO general bus part is used to reset the FPGA chip of the FPGA video capture card. The I2C general bus part is used to configure the registers of the underlying receiver or transmitter of the FPGA video capture card. The I2C general bus part is a static library file.

[0011] In addition, the present invention also provides a peripheral driver network upgrade system under a Linux kernel system, including a microprocessor and a memory connected to each other. The microprocessor is programmed or configured to execute the peripheral driver network upgrade method under the Linux kernel system.

[0012] In addition, the present invention also provides a computer-readable storage medium. A computer program or instruction is stored in the computer-readable storage medium. The computer program or instruction is programmed or configured to execute the peripheral driver network upgrade method under the Linux kernel system through a processor.

[0013] In addition, the present invention also provides a computer program product, including a computer program or instruction. The computer program or instruction is programmed or configured to execute the peripheral driver network upgrade method under the Linux kernel system through a processor.

[0014] Compared with the prior art, the present invention can mainly achieve the following beneficial effects: 1. The system manufacturer provides a peripheral driver specification document to the peripheral manufacturer. The system kernel does not need to integrate too many peripheral drivers. The maintenance and adaptation of the peripheral drivers are handed back to the peripheral manufacturer. The system manufacturer collects the error messages of the peripheral driver compilation and installation through the network and feedbacks them to the peripheral manufacturer. 2. Strong confidentiality. The peripheral driver protects the proprietary or exclusive design through a static library. 3. Strong versatility. The peripheral manufacturer's driver supports cross-CPU architecture, cross-kernel version, and cross-system manufacturer compilation according to different compilation environments. 4. Strong practicability. The system manufacturer and the peripheral manufacturer do not need to be strongly bound, and the peripheral manufacturer is easy to accept this solution. Brief Description of the Drawings

[0015] Figure 1 It is a schematic diagram of the basic process of the method of the embodiment of the present invention. Detailed Embodiments

[0016] In order to enable those skilled in the art of the present technology to better understand the technical solutions of the present invention, the technical solutions of the present invention will be further described in detail below with reference to the accompanying drawings in the embodiments of the present invention.

[0017] As Figure 1 shown, the method for peripherals driver network upgrade under the Linux kernel system in this embodiment includes the following steps: S101. The system manufacturer's server receives the peripherals driver package submitted by the peripherals manufacturer. The driver program of the peripherals in the peripherals driver package includes a code source file and a static library file. The static library file is a file obtained by the peripherals manufacturer through pre-compilation and providing an access interface for the private source code that it does not want to disclose. The access interface of the static library file is included in the interface file; S102. The system manufacturer's server parses the peripherals driver package and adds the peripherals corresponding to the peripherals driver package to the support list; S103. The system manufacturer's server receives the peripherals driver request of the terminal device; S104. The system manufacturer's server parses the peripherals driver request of the terminal device. If the peripherals in the peripherals driver request are in the support list, the corresponding peripherals driver package is returned to the terminal device so that the terminal device performs local compilation on the peripherals driver package to obtain a driver program suitable for the local CPU architecture and kernel version and automatically completes the installation of the driver program.

[0018] In this embodiment, before the system manufacturer's server receives the peripherals driver package submitted by the peripherals manufacturer, it includes the peripherals manufacturer making the peripherals driver package and submitting it to the system manufacturer's server: S201. Obtain the specification file of the preset peripherals driver specification released by the system manufacturer; S202. Package and generate the peripherals driver package according to the preset peripherals driver specification; When packaging to generate a peripheral driver package, the private source code to be protected, including data conversion, data processing, data encryption, peripheral low-level control files, etc., can be compiled into a static library file. For example, execute the command: gcc -c -fPIC lib.c -o lib.o to compile the lib.c source file into the object file lib.o, where gcc is the GNU C compiler; -c means only compile without linking, generating an object file (.o); -fPIC means generating position-independent code (Position Independent Code), lib.c is the input source file, and -o lib.o means specifying the output file name as lib.o; for example, execute the command: ar rcslibstatic.a lib.o to package lib.o into a static library named libstatic.a, where ar is the GNU archiving tool for creating static libraries; rcs is a combination of three options, including: r: replace / add files to the archive; c: create if the archive does not exist; s: create an index (equivalent to running ranlib); libstatic.a is the file name of the static library to be created; lib.o is the object file to be included in the static library. S203. Submit the generated peripheral driver package to the system manufacturer's server.

[0019] The specification file of the preset peripheral driver specification released by the system manufacturer indicates the files that must be included and optional files in the manufacturer's peripheral driver package. After the system manufacturer's server parses the peripheral driver package in step S102, it also includes verifying the peripheral driver package. If a file that must be included is missing, it is determined that the peripheral driver package does not conform to the preset peripheral driver specification, and the peripheral corresponding to the peripheral driver package is refused to be added to the support list, and the process ends and exits.

[0020] In this embodiment, when the system manufacturer's server receives a peripheral driver request from a terminal device, the processing steps of the terminal device include: S301. The terminal device installs the operating system using the system image. S302. After the terminal device boots into the operating system, it performs a network connection operation; the boot here can be the first boot or subsequent boots, and the network connection operation can be executed automatically or interactively. For example, the user is reminded to run after the user selects a network and configures the password. S303, the terminal device first executes software update, for example, for a Linux kernel system using apt as a package management tool, the command to execute software update is: sudo apt update. Then check whether the compilation environment has been installed, for example, use the command gcc -v to check the gcc version, if gcc is not installed, an error will be prompted; if the compilation environment has not been installed, execute the installation operation of the compilation environment to complete the installation of the compilation environment, for example, for a Linux kernel system using apt as a package management tool, the command to execute the installation operation of the compilation environment is: sudo apt install build-essential, The above command can install the compilation package build-essential; The terminal device first executes the software update, which can be directly executed as needed or interactively executed, such as prompting the user to run after the user confirms; S304, the terminal device collects the manufacturer ID and device ID of the peripheral device for which the driver is not installed. For example, for PCI peripherals, the manufacturer ID and device ID of the peripheral device for which the PCI driver is not installed can be obtained by using the command: lspci -k. Other similar peripherals can also use related methods. Since the specific methods for collecting the manufacturer ID and device ID of the peripheral device for which the driver is not installed are all existing methods, their commands or implementations are not listed one by one here. S305, the terminal device initiates a peripheral driver request to the system manufacturer server according to the manufacturer ID and device ID of the peripheral. In the system manufacturer server, the system built-in module compares the peripheral support list, and then transmits the peripheral manufacturer ID and device ID of the current system that has not loaded the driver back to the system manufacturer server, obtains the corresponding peripheral driver package, and prompts the user: the driver update is being downloaded.

[0021] In this embodiment, the peripheral driver package is composed of a configuration file config, an installation file install, a Makefile file, and a peripheral driver, wherein the configuration file config is used to configure the supported kernel version range of the peripheral driver package and whether kernel parameter configuration information is required during driver installation. The example configuration is as follows: KERNEL_VERSION>2.6.30; / / Supported kernel version range KERNEL_VERSION<6.12.0; disable_mis = 0; / / Whether kernel parameters are required when installing the driver KERNEL_VERSION indicates the kernel version, and disable_mis indicates whether kernel parameters are required when installing the driver. The install file is used to execute the installation of the driver. The Makefile file is used to execute the compilation of the driver, and the source code files and static library files required for the compilation of the driver are specified therein. The Makefile file contains kernel version judgment code and CPU architecture judgment code. The kernel version judgment code is used to execute different functions or codes according to different Linux versions and kernel versions to achieve cross-kernel version support. The CPU architecture judgment code is used to import different header files or execute different functions or codes according to different CPU architectures to achieve cross-CPU architecture support.

[0022] Regarding the changes in some subsystem functions during the kernel iteration process, cross-kernel version support can be achieved by adding kernel version judgment code. For example, an example of kernel version judgment code is as follows: if (LINUX_VERSION_CODE<KERNEL_VERSION(x,x,x)) fun(a); else fun(a, b); endif In the above example, fun(a) and fun(a, b) are functions applicable to different kernel versions respectively. If the kernel version is less than the LINUX_VERSION_CODE setting value KERNEL_VERSION(x,x,x), the function fun(a) is executed, otherwise the function fun(a, b) is executed, thus achieving cross-kernel version support.

[0023] For example, an example of CPU architecture judgment code is as follows: ifdef CONFIG_X86 used_in_x86(); endif In the above example, if the CPU architecture is the X86 architecture (CONFIG_X86), the function used_in_x86() is called, and the function used_in_x86() is the dedicated function code for the X86 architecture; For example, an example of CPU architecture judgment code is as follows: if defined(CONFIG_X86) include “x86.h” elif defined(CONFIG_ARM64) include “arm64.h” else include “def.h” endif In the above example, defined is used to determine the definition of the CPU architecture. If the CPU architecture is the X86 architecture (CONFIG_X86), the header file "x86.h" is called, and this header file "x86.h" is a dedicated header file for the X86 architecture; if the CPU architecture is the ARM64 architecture (CONFIG_ARM64), the header file "arm64.h" is called, and this header file "arm64.h" is a dedicated header file for the ARM64 architecture; otherwise, the header file "def.h" is called, and this header file "def.h" is a non-dedicated header file for other architectures.

[0024] It should be noted that in order to reduce network transmission traffic and improve network transmission efficiency, the required compression technology can be used to compress the peripheral driver package as needed. Before the terminal device performs local compilation on the peripheral driver package, if necessary, the peripheral driver package needs to be decompressed first to restore the original file. Then, local compilation can be performed on the peripheral driver package to obtain a driver program suitable for the local CPU architecture and kernel version, and the installation of the driver program can be automatically completed and the user can be prompted that the driver is being installed or the driver installation is completed. In this embodiment, the terminal device performing local compilation on the peripheral driver package to obtain a driver program suitable for the local CPU architecture and kernel version and automatically completing the installation of the driver program includes: S401, obtain the kernel version (KERNEL_VERSION) of the operating system; S402, determine whether the kernel version of the operating system conforms to the supported kernel version range in the configuration file config. If not, end and exit. Otherwise, jump to the next step; S403, obtain the CPU platform and CPU platform architecture of the current system (such as 32-bit architecture or 64-bit architecture); The command to obtain the CPU platform of the current system is: ARCH = ‘uname -i’, The command to obtain the CPU platform architecture of the current system is: ARCH_BITS = ‘uname -m’; S404, find the corresponding code source file and static library file in the peripheral driver package according to the CPU platform and CPU platform architecture of the current system; for example, taking the static library file as an example, the static library file can be stored independently in two library files for 64-bit and 32-bit. It should be noted that the private source code in the static library file can select the private source code to be protected as needed. For example, the private source code includes some or all of the data conversion, data processing, data encryption, and peripheral low-level control files; S405, perform local compilation on the Makefile file through the compilation environment to obtain a driver suitable for the local CPU architecture and kernel version; for example pl330-objs := dma / dma-audio.o dma / dma-video.o avstream / v4l2-driver.o obj-m = fpga.o EXTRA_CFLAGS += -I$(src) KERNELDIR / lib / modules / $(shell uname -r) / build PWD := $(shell pwd) all: $(MAKE) -C $(KERNELDIR) M=$(PWD) modules install: $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install This Makefile is used to: build a kernel module named fpga.ko, which is compiled from multiple source files (audio DMA, video DMA, and V4L2 driver), support direct compilation (make all) and installation (make install) functions, and will automatically detect and use the build environment of the currently running kernel. Among them, the pl330-objs module includes the audio DMA-related code dma / dma-audio.o, the adapter DMA-related code dma / dma-video.o, and the video 4L2 driver-related code avstream / v4l2-driver.o. The final kernel module to be compiled is named fpga.ko, and adding the additional compilation flag -I$(src) means adding the current directory to the header file search path.

[0025] KERNELDIR / lib / modules / $(shell uname -r) / build, Define for the kernel directory. If KERNELDIR is not set, the build directory of the currently running kernel is used by default. The command $(shell uname -r) will obtain the current kernel version number. PWD := $(shell pwd) is used to obtain the current working directory path and assign it to the PWD variable. all: $(MAKE) -C $(KERNELDIR) M=$(PWD) modules is the default build target, where -C $(KERNELDIR): switch to the kernel directory to execute make, M=$(PWD) tells the kernel build system that the module source code is located in the PWD directory, and modules is the build module target; install:$(MAKE) -C $(KERNELDIR)M=$(PWD) modules_install is the installation target, where modules_install: install the compiled module to the system's module directory (usually / lib / modules / $(uname -r) / extra / ); S406, read the configuration information in the configuration file config according to whether kernel parameters are required during driver installation. If kernel parameter configuration information is required, append the kernel parameters and execute the installation file install to complete the installation of the driver; otherwise, directly execute the installation file install to complete the installation of the driver.

[0026] The peripheral driver network upgrade method under the Linux kernel system in this embodiment can achieve cross-kernel version and cross-platform compatible network upgrade installation of drivers for various peripherals including FPGA video capture cards. For example, as a specific peripheral example, the peripheral in this embodiment is an FPGA video capture card. The driver program of the peripheral in the peripheral driver package includes a PCI general bus part, a GPIO general bus part, and an I2C general bus part. Among them, the PCI general bus part is used to register the PCI driver based on the Linux system PCI subsystem, enable the PCI device, apply for PCI resources, read PCI information, apply for DMA resources, and register interrupts. In this embodiment, the file name is FPGA-PCI.c, and its architecture can be expressed as: pci_enable_device(); / / Enable the PCI device pci_read_config_byte(); / / Read pci information pci_resource_start(); / / Apply for resources request_irq(); / / Register interrupts The GPIO general bus part is used to reset the FPGA chip of the FPGA video capture card. In this embodiment, the file name is FPGA-GPIO.c; The I2C general bus part is used to configure the registers of the underlying receiver or transmitter of the FPGA video capture card. The I2C general bus part is a static library file, and its file name is FPGA-I2C.c. Its architecture can be expressed as: i2c_register(); / / Register I2C i2c_read(i2c_adapter, msg, len); / / Read i2c_write(i2c_adapter, msg, len); / / Write Among them, i2c_adapter is the I2C general bus adapter, msg is the message to be read or written, and len is the length of the message to be read or written.

[0027] In summary, the peripheral driver network upgrade method under the Linux kernel system in this embodiment can realize the cross-kernel version and cross-platform compatible network upgrade and installation of drivers for various peripherals including FPGA video capture cards. Its implementation method is original. It protects the proprietary or exclusive designs of peripheral manufacturers through static library files, has good compatibility, is not bound to the CPU architecture, kernel version, or system manufacturer, and is based on network transmission, making the update and installation of peripheral drivers fast and convenient.

[0028] In addition, this embodiment also provides a peripheral driver network upgrade system under the Linux kernel system, including a microprocessor and a memory connected to each other. The microprocessor is programmed or configured to execute the peripheral driver network upgrade method under the Linux kernel system.

[0029] In addition, this embodiment also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program or instruction, and the computer program or instruction is programmed or configured to execute the peripheral driver network upgrade method under the Linux kernel system through a processor.

[0030] In addition, this embodiment also provides a computer program product, including a computer program or instruction, and the computer program or instruction is programmed or configured to execute the peripheral driver network upgrade method under the Linux kernel system through a processor.

[0031] Those skilled in the art should understand that the technical solutions provided by the present invention can be in the form of methods, systems, or computer program products. Therefore, the present invention can be implemented in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can be in the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The present invention is described with reference to the flowcharts and / or block diagrams of methods, peripherals (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing peripherals to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing peripherals generate a device for implementing the functions specified in the process Figure 1 one process or multiple processes and / or blocks Figure 1 or multiple blocks. These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing peripherals to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device that implements the functions specified in the process Figure 1 one process or multiple processes and / or blocks Figure 1 or multiple blocks. These computer program instructions can also be loaded onto a computer or other programmable data processing peripherals, so that a series of operation steps are executed on the computer or other programmable peripherals to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable peripherals provide steps for implementing the functions specified in the process Figure 1 one process or multiple processes and / or blocks Figure 1 or multiple blocks.

[0032] The above is only the preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions within the idea of the present invention belong to the protection scope of the present invention. It should be noted that for those of ordinary skill in the art in this technical field, several improvements and refinements made without departing from the principle of the present invention should also be regarded as within the protection scope of the present invention.

Claims

1. A method for peripherals driver network upgrade under a Linux kernel system, characterized in that The steps include: S101, a system manufacturer server receives a peripheral driver package submitted by a peripheral manufacturer, wherein the driver program of the peripheral in the peripheral driver package includes a code source file and a static library file, wherein the static library file is a file obtained by pre-compiling private source code that the peripheral manufacturer does not want to disclose and providing an access interface, and the interface file includes an access interface of the static library file; S102, the system manufacturer server parses the peripheral driver package and adds the peripheral corresponding to the peripheral driver package to the support list; S103, the system manufacturer server receives a peripheral driver request from the terminal device; S104, the system manufacturer server parses the peripheral driver request of the terminal device. If the peripheral requested by the peripheral driver is in the support list, the corresponding peripheral driver package is returned to the terminal device so that the terminal device performs local compilation on the peripheral driver package to obtain a driver suitable for the local CPU architecture and kernel version and automatically completes the installation of the driver.

2. The method for peripherals driver network upgrade under the Linux kernel system according to claim 1, characterized in that Before the system manufacturer server receives the peripheral driver package submitted by the peripheral manufacturer, the peripheral manufacturer prepares the peripheral driver package and submits it to the system manufacturer server: S201, obtaining a specification file of a preset peripheral driver specification issued by a system manufacturer; S202, generating a peripheral driver package according to a preset peripheral driver specification; S203, submitting the generated peripheral driver package to the system manufacturer server.

3. The method for peripherals driver network upgrade under the Linux kernel system according to claim 2, characterized in that, When the system manufacturer server receives a peripheral driver request from a terminal device, the processing steps of the terminal device include: S301, the terminal device uses the system image to install the operating system; S302, the terminal device performs a networking operation after booting into the operating system; S303, the terminal device first performs a software update, and then checks whether the compilation environment has been installed. If the compilation environment has not been installed, the installation operation of the compilation environment is performed to complete the installation of the compilation environment; S304, the terminal device collects the manufacturer ID and device ID of the peripheral device for which the driver is not installed; S305: The terminal device initiates a peripheral device driver request to the system manufacturer server according to the manufacturer ID and device ID of the peripheral device.

4. The method for peripherals driver network upgrade under the Linux kernel system according to claim 1, wherein, The peripheral driver package consists of a configuration file config, an installation file install, a Makefile file and a peripheral driver, wherein the configuration file config is used to configure the supported kernel version range of the peripheral driver package and whether the configuration information of the kernel parameters is required when the driver is installed, the installation file install is used to execute the installation of the driver, the Makefile file is used to execute the compilation of the driver, wherein the code source files and static library files required for the driver compilation are specified, and the Makefile file contains a kernel version judgment code and a CPU architecture judgment code, wherein the kernel version judgment code is used to execute different functions or codes according to different Linux versions and kernel versions to achieve cross-kernel version support, and the CPU architecture judgment code is used to import different header files or execute different functions or codes according to different CPU architectures to achieve cross-CPU architecture support.

5. The method for peripherals driver network upgrade under the Linux kernel system according to claim 4, characterized in that, The terminal device performs local compilation on the peripheral driver package to obtain a driver program suitable for the local CPU architecture and kernel version and automatically completes the installation of the driver program, including: S401, obtaining the kernel version of the operating system; S402, determining whether the kernel version of the operating system conforms to the supported kernel version range in the configuration file config. If not, end and exit. Otherwise, jump to the next step; S403, obtaining the CPU platform and CPU platform architecture of the current system; S404, finding the corresponding source code files and static library files in the peripheral driver package according to the CPU platform and CPU platform architecture of the current system; S405, performing local compilation on the Makefile file through the compilation environment to obtain a driver program suitable for the local CPU architecture and kernel version; S406, reading the configuration information in the configuration file config according to whether kernel parameters are required during driver installation. If kernel parameter configuration information is required, append the kernel parameters and execute the installation file install to complete the installation of the driver program; otherwise, directly execute the installation file install to complete the installation of the driver program.

6. The method for peripheral driver network upgrade under the Linux kernel system according to claim 5, characterized in that, The private source code includes some or all of the data conversion, data processing, data encryption, and peripheral low-level control files.

7. The method for peripherals driver network upgrade under the Linux kernel system according to claim 1, characterized in that The peripheral is an FPGA video capture card. The driver program of the peripheral in the peripheral driver package includes a PCI general bus part, a GPIO general bus part, and an I2C general bus part. Among them, the PCI general bus part is used to register a PCI driver based on the Linux system PCI subsystem, enable the PCI device, apply for PCI resources, read PCI information, apply for DMA resources, and register interrupts. The GPIO general bus part is used to reset the FPGA chip of the FPGA video capture card. The I2C general bus part is used to configure the registers of the FPGA video capture card's underlying receiving or transmitting end. The I2C general bus part is a static library file.

8. A peripheral driver network upgrade system under a Linux kernel system, comprising a microprocessor and a memory connected to each other, characterized in that, The microprocessor is programmed or configured to execute the peripheral driver network upgrade method under the Linux kernel system according to any one of claims 1 to 7.

9. A computer-readable storage medium storing a computer program or instructions, characterized in that, The computer program or instruction is programmed or configured to execute the peripheral driver network upgrade method under the Linux kernel system according to any one of claims 1 to 7 through a processor.

10. A computer program product, comprising a computer program or instructions, characterized in that, The computer program or instruction is programmed or configured to execute the peripheral driver network upgrade method under the Linux kernel system according to any one of claims 1 to 7 through a processor.