Kernel adaptation method and device, equipment and storage medium

By automatically matching specific information identifiers and driver information, the time-consuming and labor-intensive problem of embedded system kernel adaptation is solved, efficient adaptation and loading on different hardware platforms is achieved, and the stability and compatibility of the system are improved.

CN120670055AActive Publication Date: 2025-09-19KYLIN CORP
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202511174741.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-21
Publication Date
2025-09-19
Estimated Expiration
2045-08-21

AI Technical Summary

Technical Problem

In the prior art, the adaptation method of the embedded system kernel relies on manual cutting and configuration, which is time-consuming and labor-intensive, resulting in low development efficiency and poor system stability and compatibility.

Method used

By obtaining specific information identifiers, matching the corresponding hardware device platform, and searching and loading the corresponding driver information from the preset driver library, the embedded kernel can be automatically adapted and loaded on different hardware platforms.

Benefits of technology

It improves the development efficiency of embedded systems, reduces maintenance costs, and enhances system stability and compatibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120670055A_ABST
    Figure CN120670055A_ABST
Patent Text Reader

Abstract

The invention discloses a kernel adaptation method and device, equipment and a storage medium. The method comprises the following steps: acquiring a specific information identifier, wherein the specific information identifier is used for identifying hardware equipment information; based on the specific information identifier, matching a hardware equipment platform corresponding to the specific information identifier; searching driving information corresponding to the hardware equipment platform from a preset driving program library; and loading the hardware equipment platform based on the driving information. According to the embodiment of the invention, the kernel of the embedded system can be automatically adapted and loaded on different hardware platforms, the development efficiency is improved, the maintenance cost is reduced, and the stability and compatibility of the embedded system are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of embedded systems, and in particular to a kernel adaptation method, apparatus, device and storage medium. Background Art

[0002] As a key component of modern electronic devices, embedded systems are of undeniable importance. Embedded systems typically consist of two parts: hardware, which includes the processor, memory, and input / output devices, and software, which includes the operating system, drivers, and applications. During embedded system development, kernel compatibility is a key issue, directly impacting the system's ability to run stably on the platform.

[0003] Currently, the adaptation method of embedded system kernel mainly relies on manual tailoring and configuration for specific hardware platforms. This approach is not only time-consuming and labor-intensive, but also greatly reduces development efficiency. Summary of the Invention

[0004] The embodiments of the present application provide a kernel adaptation method, apparatus, device, storage medium and program product, which can automatically adapt and load the kernel of an embedded system on different hardware platforms, improve development efficiency, reduce maintenance costs, and enhance the stability and compatibility of the embedded system.

[0005] In one aspect, an embodiment of the present application provides a kernel adaptation method, the method comprising: Obtaining a specific information identifier, wherein the specific information identifier is used to identify hardware device information; Based on the specific information identifier, matching the hardware device platform corresponding to the specific information identifier; Searching for driver information corresponding to the hardware device platform from a preset driver library; The hardware device platform is loaded based on the driver information.

[0006] Optionally, before obtaining the specific information identifier, the method further includes: Obtain various hardware device platforms and corresponding basic input and output system types; determining a communication interface based on the basic input and output system type of the hardware device platform; The specific information identifier is obtained based on the communication interface.

[0007] Optionally, obtaining the specific information identifier includes: Obtaining the storage format and encoding method of the specific information identifier; In the case that the storage format and / or encoding method does not belong to the corresponding preset recognition mode, the specific information identifier is converted into a specific information identifier in the preset recognition mode.

[0008] Optionally, after obtaining the specific information identifier, the method further includes: Verifying the specific information identifier to obtain a verification result; If the verification result is determined to be a verification failure, repeatedly obtaining the specific information identifier within a preset number of times, and counting the number of acquisitions; When the acquisition times are greater than the preset times, a prompt message is sent to the user.

[0009] Optionally, before matching the hardware device platform corresponding to the specific information identifier based on the specific information identifier, the method further includes: The update information of the hardware device platform is obtained within a preset period to update the preset hardware information database.

[0010] Optionally, searching for driver information corresponding to the hardware device platform from a preset driver library includes: Based on the specific information identifier, obtaining a driver program path corresponding to the kernel; The driver information is searched in a preset driver information library according to the driver program path.

[0011] Optionally, before searching the driver information according to the driver program path in the preset driver information database, the method further includes: Obtain the release time and update content of the driver information; Generate version update information based on the release time and the update content; In the preset driver information library, the driver information is managed according to a preset classification management strategy and the version update information.

[0012] On the other hand, an embodiment of the present application provides a kernel adaptation device, the device comprising: An acquisition module, configured to acquire a specific information identifier, wherein the specific information identifier is used to identify hardware device information; A matching module, configured to match a hardware device platform corresponding to the specific information identifier based on the specific information identifier; A search module, configured to search for driver information corresponding to the hardware device platform from a preset driver library; A loading module is used to load the hardware device platform based on the driver information.

[0013] In another aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the kernel adaptation method as described in the first aspect is implemented.

[0014] On the other hand, an embodiment of the present application provides a computer storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the kernel adaptation method as described in any of the first aspects is implemented.

[0015] The kernel adaptation method, apparatus, device and computer storage medium of the embodiments of the present application can match the hardware device platform corresponding to the specific information identifier by obtaining the specific information identifier, and then search the driver information corresponding to the hardware device platform from the preset driver library, and then load the hardware device platform through the driver information. In this process, the embedded kernel can be automatically adapted and loaded on different hardware platforms, thereby improving development efficiency, reducing maintenance costs, and enhancing system stability and compatibility. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0017] Figure 1 This is a flowchart of a kernel adaptation method provided by an embodiment of the present application; Figure 2 is a structural diagram of a kernel adaptation device provided by another embodiment of the present application; Figure 3 This is a structural diagram of an electronic device provided in yet another embodiment of the present application. DETAILED DESCRIPTION

[0018] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is merely to provide a better understanding of the present application by illustrating the examples of the present application.

[0019] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.

[0020] To address the problems of the prior art, embodiments of the present application provide a kernel adaptation method, apparatus, device, storage medium, and program product. In the embodiments of the present application, a specific information identifier is obtained to match the hardware device platform corresponding to the specific information identifier, and then the driver information corresponding to the hardware device platform is searched from a preset driver library. The hardware device platform is then loaded using the driver information. In this process, the embedded kernel can be automatically adapted and loaded on different hardware platforms, thereby improving development efficiency, reducing maintenance costs, and enhancing system stability and compatibility.

[0021] The following first introduces the kernel adaptation method provided in the embodiment of the present application.

[0022] Figure 1 FIG. 1 shows a flow chart of a kernel adaptation method provided by an embodiment of the present application. Figure 1 As shown, the kernel adaptation method may include: S101, obtaining a specific information identifier.

[0023] In some embodiments, a specific information identifier may be used to identify hardware device information; wherein the specific information identifier may include the hardware manufacturer name and board model, so that the Basic Input / Output System (BIOS) can adaptively load basic data.

[0024] In this embodiment, since the hardware manufacturer information and board model need to be written into the embedded system kernel, it is also necessary to reach an agreement with the manufacturer to add two specific fields in the BIOS: the hardware manufacturer name and the board model; so that when the embedded system kernel starts, it can automatically read and store the value corresponding to the specific information identifier, providing a basis for subsequent judgment and loading operations.

[0025] In this embodiment, in order to successfully read the value corresponding to the specific information identifier, the BIOS interface needs to be initialized. Before obtaining the specific information identifier, the method further includes: Obtain various hardware device platforms and corresponding basic input and output system types; Determine the communication interface based on the basic input and output system type of the hardware device platform; Obtain specific information identifier based on the communication interface.

[0026] Specifically, since there are many types of embedded systems at present, there are also many types of corresponding hardware device platforms and basic input and output system types. Therefore, it is necessary to select the corresponding communication interface for different hardware device platforms and basic input and output system types to ensure that specific information identification can be read smoothly.

[0027] As an example, for a UEFI-based system, the UEFI Runtime Services interface may be used to read BIOS information; for a traditional BIOS system, BIOS interrupts may be used to read.

[0028] In addition, after determining the communication interface, it is necessary to initialize the communication interface. During the initialization of the communication interface, some parameters need to be set, such as the communication port, data transmission rate, etc., to ensure that it can communicate with the BIOS correctly.

[0029] In some embodiments, after the communication interface is initialized, a read request may be sent to the BIOS to obtain a specific information identifier.

[0030] Specifically, S101 may include: Obtain the storage format and encoding method of specific information identification; In the case that the storage format and / or encoding method does not belong to the corresponding preset recognition mode, the specific information identifier is converted into a specific information identifier in the preset recognition mode.

[0031] In this embodiment, during the reading process, attention needs to be paid to the format and encoding of the data to ensure that the read data can be correctly parsed.

[0032] For example, the hardware manufacturer name and board model in the BIOS may be stored in ASCII code. In order to enable the kernel to recognize the value, the value can be converted into a string format that the kernel can recognize to ensure that the read data can be correctly parsed.

[0033] In some other embodiments, to ensure the accuracy and completeness of the read data, after S101, the method may further include: Verify the specific information identifier and obtain a verification result; If the verification result is determined to be a verification failure, repeatedly obtaining the specific information identifier within a preset number of times and counting the number of acquisitions; When the number of acquisitions is greater than the preset number, a prompt message is sent to the user.

[0034] In this embodiment, in order to ensure the accuracy and integrity of the read data, it is also necessary to verify the value corresponding to the specific information identifier. The verification method can use CRC verification or hash value verification, as long as it can realize the verification of the data. No further details will be given here.

[0035] In some embodiments, when the verification result is determined to be a verification failure, the specific information identifier can be repeatedly obtained for verification within a preset number of times. Each time it is obtained, the number of acquisitions is increased. If the verification still fails within the preset number of times, a prompt message is sent to the user. The prompt message can prompt the user that there is an acquisition error or that there may be a problem with the specific information identifier.

[0036] In a specific example, the preset number of times may be three times.

[0037] In other embodiments, after verification, the read value may be transferred, and the transfer method may be shared memory, message queue or other inter-process communication mechanism, which will not be elaborated here.

[0038] S102: Based on the specific information identifier, match the hardware device platform corresponding to the specific information identifier.

[0039] In some embodiments, after obtaining the specific information identifier, the hardware device platform corresponding to the specific information identifier can be searched in a preset hardware database according to the specific information identifier so as to be loaded correctly and accurately.

[0040] In some other embodiments, to improve reliability and flexibility, before S102, the method may further include: The update information of the hardware device platform is obtained within a preset period to update the preset hardware information database.

[0041] In this embodiment, as hardware devices are constantly updated, the preset hardware information database needs to be updated in a timely manner to ensure that it can support new hardware device platforms. That is, within a preset period, the updated information of the hardware device platform is obtained to update the preset hardware information database.

[0042] Specifically, crawler technology can be used to regularly obtain the latest hardware information from the official website of the hardware manufacturer or other data sources, and update it into the preset hardware information database.

[0043] In addition, a human-computer interaction interface can be set up to allow users to manually add or modify records in the hardware information database to meet special needs and increase flexibility.

[0044] S103: Searching for driver information corresponding to the hardware device platform from a preset driver library.

[0045] In some embodiments, after finding the hardware device platform corresponding to the specific information identifier, in order to load the hardware device platform safely and stably, it is also necessary to find the corresponding driver information from the kernel, where the driver information may include a driver and a configuration file.

[0046] In this embodiment, S103 may specifically include: Based on the specific information identifier, obtain the driver path corresponding to the kernel; In the preset driver information library, driver information is searched according to the driver path.

[0047] Specifically, when searching for driver information, the driver information may be searched in a preset driver information library through a previous driver path, wherein the driver path may be a path for the kernel to search for the corresponding hardware device platform.

[0048] For the first search for corresponding drive information, the drive path can be manually entered for search.

[0049] In some other embodiments, in order to quickly find the driver information corresponding to the hardware device platform, before S103, the following steps may also be included: Get the release time and update content of driver information; Generate version update information based on release time and update content; In the preset driver information library, driver information is managed according to the preset classification management strategy and version update information.

[0050] In this embodiment, a version control method can be used to manage driver programs and configuration information, that is, the release time and update content of each driver information are obtained, and version update information is generated based on the release time and update content. This makes it convenient for users to roll back to the previous version when needed, or to understand the update status of the user's current version.

[0051] In addition, accurate version matching can be achieved. For example, the current kernel version is 5.4, and a certain driver only supports kernel versions 5.0 and below. Therefore, an alternative driver that is compatible with the current kernel version can be determined based on the version information.

[0052] In some other embodiments, the driver information may also be managed in a preset driver information library according to a preset classification management policy and version information. The preset classification management policy may include a hardware type classification management policy and a kernel version classification management policy.

[0053] S104: Loading a hardware device platform based on the driver information.

[0054] In some embodiments, the configuration file may include various system parameters and settings, such as CPU frequency, memory allocation, and device parameters, so that the system can be applied to the system based on these configuration files to ensure that the system can run normally on the current hardware platform.

[0055] In other embodiments, before applying the method to a system, sufficient system compatibility testing is required to ensure that the system can run stably on various hardware platforms. The testing content may include functional testing, performance testing, stability testing, etc. of the hardware devices.

[0056] In addition, some hardware manufacturers and users can be invited to participate in the test and their feedback can be collected to further optimize and improve the solution.

[0057] Based on the kernel adaptation method provided in the above embodiment, the present application also provides a specific implementation of a kernel adaptation device. Please refer to the following embodiment.

[0058] See first Figure 2 The kernel adaptation device 200 provided in the embodiment of the present application includes the following units: An acquisition module 201 is used to acquire a specific information identifier, which is used to identify hardware device information; Matching module 202, for matching a hardware device platform corresponding to a specific information identifier based on the specific information identifier; Search module 203, used to search for driver information corresponding to the hardware device platform from a preset driver library; The loading module 204 is configured to load the hardware device platform based on the driver information.

[0059] As an optional implementation, the acquisition module 201 may also be used to: Obtain various hardware device platforms and corresponding basic input and output system types; Determine the communication interface based on the basic input and output system type of the hardware device platform; Obtain specific information identifier based on the communication interface.

[0060] As an optional implementation, the acquisition module 201 may also be used to: Obtain the storage format and encoding method of specific information identification; In the case that the storage format and / or encoding method does not belong to the corresponding preset recognition mode, the specific information identifier is converted into a specific information identifier in the preset recognition mode.

[0061] As an optional implementation, the acquisition module 201 may also be used to: Verify the specific information identifier and obtain a verification result; If the verification result is determined to be a verification failure, repeatedly obtaining the specific information identifier within a preset number of times and counting the number of acquisitions; When the number of acquisitions is greater than the preset number, a prompt message is sent to the user.

[0062] As an optional implementation, the matching module 202 may also be used to: The update information of the hardware device platform is obtained within a preset period to update the preset hardware information database.

[0063] As an optional implementation, the search module 203 may also be used to: Based on the specific information identifier, obtain the driver path corresponding to the kernel; In the preset driver information library, driver information is searched according to the driver path.

[0064] As an optional implementation, the search module 203 may also be used to: Get the release time and update content of driver information; Generate version update information based on release time and update content; In the preset driver information library, driver information is managed according to the preset classification management strategy and version update information.

[0065] Figure 3 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.

[0066] The electronic device may include a processor 301 and a memory 302 storing computer program instructions.

[0067] Specifically, the processor 301 may include a central processing unit (CPU) or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0068] Memory 302 may include a large-capacity memory for data or instructions. By way of example and not limitation, memory 302 may include a hard disk drive (HDD), a floppy disk drive, flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. In one example, memory 302 may include removable or non-removable (or fixed) media, or memory 302 may be a non-volatile solid-state memory. Memory 302 may be located inside or outside the integrated gateway disaster recovery device.

[0069] In one example, the memory 502 may be a read-only memory (ROM). In one example, the ROM may be a mask-programmable ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or a flash memory, or a combination of two or more of these.

[0070] The memory 302 may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical / tangible memory storage devices. Thus, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the kernel adaptation method according to the first aspect of the present disclosure.

[0071] The processor 301 reads and executes the computer program instructions stored in the memory 302 to implement Figure 1 A kernel adaptation method in the illustrated embodiment.

[0072] In one example, the electronic device may further include a communication interface 303 and a bus 304. Figure 3 As shown, the processor 301 , the memory 302 , and the communication interface 303 are connected via a bus 304 and communicate with each other.

[0073] The communication interface 303 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0074] The bus 304 includes hardware, software, or both, and couples the components of the electronic device to each other. By way of example, and not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, the bus 304 may include one or more buses. Although the embodiments of the present application describe and illustrate specific buses, the present application contemplates any suitable bus or interconnect.

[0075] The electronic device can execute the kernel adaptation method in the embodiment of the present application, thereby realizing the combination Figure 1-Figure 2 The kernel adaptation method and apparatus described.

[0076] In addition, in conjunction with the kernel adaptation method in the above embodiments, embodiments of the present application may provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any kernel adaptation method in the above embodiments is implemented.

[0077] In an optional embodiment, in combination with the kernel adaptation method in the above embodiment, the embodiment of the present application can provide a computer program product for implementation, and the instructions in the computer program product are executed by the processor of the electronic device, so that the electronic device can implement any one of the kernel adaptation methods in the above embodiment.

[0078] It should be understood that the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present application is not limited to the specific steps described and illustrated. Those skilled in the art can make various changes, modifications, and additions, or change the order of the steps after understanding the spirit of the present application.

[0079] The functional blocks shown in the above block diagrams can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, and the like. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored in a machine-readable medium or transmitted over a transmission medium or communication link via a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memory, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, and the like. Code segments can be downloaded via a computer network such as the Internet or an intranet.

[0080] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps. In other words, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0081] It should be understood that the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present application is not limited to the specific steps described and illustrated. Those skilled in the art can make various changes, modifications, and additions, or change the order of the steps after understanding the spirit of the present application.

[0082] The functional blocks shown in the block diagrams described above can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they may be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, and the like. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments may be stored in a machine-readable medium or transmitted via a data signal carried in a carrier wave over a transmission medium or communication link. "Machine-readable medium" may include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memory, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, and the like. Code segments may be downloaded via a computer network such as the Internet or an intranet.

[0083] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps. In other words, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0084] Aspects of the present disclosure have been described above with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block in the flowcharts and / or block diagrams, as well as combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine such that execution of these instructions by the processor of the computer or other programmable data processing device enables the implementation of the functions / actions specified in one or more blocks in the flowcharts and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It should also be understood that each block in the block diagrams and / or flowcharts, as well as combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by dedicated hardware that performs the specified functions or actions, or by a combination of dedicated hardware and computer instructions.

[0085] The above description is only a specific embodiment of the present application. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the scope of protection of the present application.

Claims

1. A kernel adaptation method, characterized in that: include: Obtaining a specific information identifier, wherein the specific information identifier is used to identify hardware device information; Based on the specific information identifier, matching the hardware device platform corresponding to the specific information identifier; Searching for driver information corresponding to the hardware device platform from a preset driver library; The hardware device platform is loaded based on the driver information.

2. The method according to claim 1, characterized in that Before obtaining the specific information identifier, the method further includes: Obtain various hardware device platforms and corresponding basic input and output system types; determining a communication interface based on the basic input and output system type of the hardware device platform; The specific information identifier is obtained based on the communication interface.

3. The method according to claim 1, characterized in that The obtaining of the specific information identifier includes: Obtaining the storage format and encoding method of the specific information identifier; In the case that the storage format and / or encoding method does not belong to the corresponding preset recognition mode, the specific information identifier is converted into a specific information identifier in the preset recognition mode.

4. The method according to any one of claims 1 to 3, characterized in that After obtaining the specific information identifier, the method further includes: Verifying the specific information identifier to obtain a verification result; If the verification result is determined to be a verification failure, repeatedly obtaining the specific information identifier within a preset number of times, and counting the number of acquisitions; When the acquisition times are greater than the preset times, a prompt message is sent to the user.

5. The method according to any one of claims 1 to 3, characterized in that Before matching the hardware device platform corresponding to the specific information identifier based on the specific information identifier, the method further includes: The update information of the hardware device platform is obtained within a preset period to update the preset hardware information database.

6. The method according to claim 1, characterized in that The step of searching for driver information corresponding to the hardware device platform from a preset driver library includes: Based on the specific information identifier, obtaining a driver program path corresponding to the kernel; The driver information is searched in a preset driver information library according to the driver program path.

7. The method according to claim 6, characterized in that Before searching the driver information in the preset driver information database according to the driver program path, the method further includes: Obtain the release time and update content of the driver information; Generate version update information based on the release time and the update content; In the preset driver information library, the driver information is managed according to a preset classification management strategy and the version update information.

8. A kernel adapter device, characterized in that: The device comprises: An acquisition module, configured to acquire a specific information identifier, wherein the specific information identifier is used to identify hardware device information; A matching module, configured to match a hardware device platform corresponding to the specific information identifier based on the specific information identifier; A search module, configured to search for driver information corresponding to the hardware device platform from a preset driver library; A loading module is used to load the hardware device platform based on the driver information.

9. An electronic device, characterized in that: The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the kernel adaptation method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the kernel adaptation method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method capable of quickly transplanting adaptive hardware and firewall

    CN106341391A

  • Hardware driving method and device based on hardware abstraction layer

    CN110413327A

  • Hardware platform, starting method and device thereof and electronic equipment

    CN112114908A

  • Self-adaptive hardware driving method and gateway equipment

    CN112363769A

  • Substation data communication gateway device based on domestic chip

    CN114389918A