Kernel adaptation method, apparatus, device, and storage medium

By acquiring specific information to identify and match the hardware device platform and loading driver information, the problem of time-consuming and laborious kernel adaptation for embedded systems is solved, and efficient automatic adaptation and stable loading of embedded systems on different hardware platforms are achieved.

CN120670055BActive Publication Date: 2025-12-05KYLIN CORP
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing methods for adapting embedded system kernels are time-consuming and labor-intensive, resulting in low development efficiency and poor system stability and compatibility.

Method used

By acquiring specific information identifiers, matching hardware device platforms, and searching for corresponding driver information from a 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 CN120670055B_ABST
    Figure CN120670055B_ABST
Patent Text Reader

Abstract

The application discloses a kernel adaptation method and device, equipment and a storage medium. The method can include: obtaining a specific information identifier, which is used to identify hardware device information; based on the specific information identifier, matching a hardware device platform corresponding to the specific information identifier; from a preset driver library, searching for driver information corresponding to the hardware device platform; and loading the hardware device platform based on the driver information. According to the embodiment of the application, 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] This application relates to the technical field of embedded systems, and more particularly to a kernel adaptation method, apparatus, device, and storage medium. Background Technology

[0002] Embedded systems are a crucial component of modern electronic devices, and their importance is self-evident. An embedded system typically consists of two parts: hardware and software. The hardware includes a processor, memory, and input / output devices, while the software includes the operating system, drivers, and applications. During embedded system development, kernel compatibility is a critical issue, directly affecting the stable operation of the embedded system on the platform.

[0003] Currently, the adaptation of embedded system kernels 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] This application provides a kernel adaptation method, apparatus, device, storage medium, and program product that enables the kernel of an embedded system to be automatically adapted and loaded on different hardware platforms, thereby improving development efficiency, reducing maintenance costs, and enhancing the stability and compatibility of the embedded system.

[0005] On the one hand, embodiments of this application provide a kernel adaptation method, the method including:

[0006] Obtain a specific information identifier, which is used to identify hardware device information;

[0007] Based on the specific information identifier, match the hardware device platform corresponding to the specific information identifier;

[0008] Search the preset driver library for driver information corresponding to the hardware device platform;

[0009] The hardware device platform is loaded based on the driver information.

[0010] Optionally, before obtaining the specific information identifier, the method further includes:

[0011] Obtain information on various hardware device platforms and their corresponding basic input / output system types;

[0012] Based on the basic input / output system type of the hardware device platform, determine the communication interface;

[0013] The specific information identifier is obtained based on the communication interface.

[0014] Optionally, obtaining the specific information identifier includes:

[0015] Obtain the storage format and encoding method of the specific information identifier;

[0016] If the storage format and / or encoding method do not belong to the corresponding preset identification mode, the specific information identifier will be converted into a specific information identifier under the preset identification mode.

[0017] Optionally, after obtaining the specific information identifier, the method further includes:

[0018] The specific information identifier is verified to obtain the verification result.

[0019] If the verification result indicates that the verification has failed, the specific information identifier will be repeatedly retrieved within a preset number of times, and the number of retrievals will be counted.

[0020] If the number of attempts exceeds a preset number, a notification message will be sent to the user.

[0021] Optionally, before matching the hardware device platform corresponding to the specific information identifier, the method further includes:

[0022] The system acquires update information from hardware devices within a preset period to update the preset hardware information database.

[0023] Optionally, the step of searching for driver information corresponding to the hardware device platform from a preset driver library includes:

[0024] Based on the specific information identifier, obtain the driver path corresponding to the kernel;

[0025] Within the preset driver information database, the driver information is searched according to the driver path.

[0026] Optionally, before searching for the driver information in the preset driver information database according to the driver path, the method further includes:

[0027] Obtain the release time and update content of the driver information;

[0028] Based on the release time and the updated content, version update information is generated;

[0029] Within the preset driver information database, the driver information is managed according to a preset classification management strategy and the version update information.

[0030] On the other hand, embodiments of this application provide a kernel adaptation device, the device comprising:

[0031] The acquisition module is used to acquire a specific information identifier, which is used to identify hardware device information;

[0032] The matching module is used to match the hardware device platform corresponding to the specific information identifier based on the specific information identifier;

[0033] The lookup module is used to search for driver information corresponding to the hardware device platform from a preset driver library;

[0034] A loading module is used to load the hardware device platform based on the driver information.

[0035] In another aspect, embodiments of this application provide an electronic device, the device including: a processor and a memory storing computer program instructions;

[0036] When the processor executes the computer program instructions, it implements the kernel adaptation method as described in the first aspect.

[0037] In another aspect, embodiments of this application provide a computer storage medium on which computer program instructions are stored, which, when executed by a processor, implement the kernel adaptation method as described in any of the first aspects.

[0038] The kernel adaptation method, apparatus, device, and computer storage medium of this application embodiment can match the hardware device platform corresponding to the specific information identifier by obtaining a specific information identifier, then search for the driver information corresponding to the hardware device platform from a 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. Attached Figure Description

[0039] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0040] Figure 1 This is a flowchart illustrating a kernel adaptation method provided in one embodiment of this application;

[0041] Figure 2 This is a schematic diagram of the structure of a kernel adapter device provided in another embodiment of this application;

[0042] Figure 3 This is a schematic diagram of the structure of an electronic device provided in another embodiment of this application. Detailed Implementation

[0043] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.

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

[0045] To address the problems of existing technologies, embodiments of this application provide a kernel adaptation method, apparatus, device, storage medium, and program product. In these embodiments, a specific information identifier is obtained to match the corresponding hardware device platform. Then, driver information corresponding to the hardware device platform is searched from a preset driver library. Finally, the hardware device platform is loaded using the driver information. This process enables automatic adaptation and loading of the embedded kernel on different hardware platforms, thereby improving development efficiency, reducing maintenance costs, and enhancing system stability and compatibility.

[0046] The kernel adaptation method provided in the embodiments of this application will be introduced first below.

[0047] Figure 1 A flowchart illustrating a kernel adaptation method provided in one embodiment of this application is shown. Figure 1 As shown, kernel adaptation methods may include:

[0048] S101, Obtain specific information identifier.

[0049] In some embodiments, a specific information identifier can 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.

[0050] 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: hardware manufacturer name and board model; so that the embedded system kernel can automatically read and store the value corresponding to the specific information identifier when it starts up, providing a basis for subsequent judgment and loading operations.

[0051] In this embodiment, in order to successfully read the value corresponding to the specific information identifier, the BIOS interface also needs to be initialized. Before obtaining the specific information identifier, the method further includes:

[0052] Obtain information on various hardware device platforms and their corresponding basic input / output system types;

[0053] Based on the basic input / output system type of the hardware device platform, determine the communication interface;

[0054] Obtain specific information identifiers based on communication interfaces.

[0055] Specifically, since there are many types of embedded systems, there are also many types of corresponding hardware devices and basic input / output systems. Therefore, it is necessary to select the corresponding communication interface for different hardware devices and basic input / output system types to ensure that specific information identifiers can be read successfully.

[0056] As an example, for UEFI-based systems, the UEFI Runtime Services interface might be used to read BIOS information; for traditional BIOS systems, BIOS interrupts might be used for reading.

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

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

[0059] Specifically, S101 may include:

[0060] Obtain the storage format and encoding method of specific information identifiers;

[0061] If the storage format and / or encoding method do not belong to the corresponding preset identification mode, the specific information identifier will be converted into the specific information identifier under the preset identification mode.

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

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

[0064] In some other embodiments, to ensure the accuracy and integrity of the read data, the method may further include the following after S101:

[0065] Verify specific information identifiers and obtain verification results;

[0066] If the verification result indicates that the verification has failed, the specific information identifier will be retrieved repeatedly within a preset number of times, and the number of times it is retrieved will be counted.

[0067] If the number of attempts exceeds the preset limit, a notification message will be sent to the user.

[0068] 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 be CRC verification or hash value verification, as long as it can verify the data, which will not be elaborated further here.

[0069] In some embodiments, if 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 times to obtain it is increased by one. If the verification still fails within the preset number of times, a prompt message is sent to the user. The prompt message can indicate to the user that the acquisition was incorrect or that there may be a problem with the specific information identifier.

[0070] In a specific example, the preset number of attempts can be three.

[0071] In other embodiments, after verification, the read value can be passed. The passing method can be shared memory, message queue or other inter-process communication mechanism, which will not be elaborated here.

[0072] S102, based on a specific information identifier, matches the hardware device platform corresponding to the specific information identifier.

[0073] In some embodiments, after obtaining a specific information identifier, the hardware device platform corresponding to the specific information identifier can be searched in a preset hardware database to ensure correct and accurate loading.

[0074] In some other embodiments, to improve reliability and flexibility, the method may further include the following steps before S102:

[0075] The system acquires update information from hardware devices within a preset period to update the preset hardware information database.

[0076] In this embodiment, as hardware devices are constantly being upgraded, 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 update information of the hardware device platform is obtained to update the preset hardware information database.

[0077] Specifically, web scraping technology can be used to regularly obtain the latest hardware information from the official websites of hardware manufacturers or other data sources and update it into a pre-set hardware information database.

[0078] 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.

[0079] S103 searches for driver information corresponding to the hardware device platform from the preset driver library.

[0080] 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 in the kernel, wherein the driver information may include the driver program and configuration file.

[0081] In this embodiment, S103 may specifically include:

[0082] Based on specific information identifiers, obtain the driver path corresponding to the kernel;

[0083] Within the preset driver information database, driver information is searched based on the driver path.

[0084] Specifically, when searching for driver information, the kernel can search within a preset driver information database using the previous driver paths. The driver paths can be the paths that the kernel uses to find the corresponding hardware device platform.

[0085] For the first time searching for the corresponding driver information, you can manually enter the driver path to perform the search.

[0086] In some other embodiments, in order to quickly find the driver information corresponding to the hardware device platform, the process before S103 may include:

[0087] Obtain the release date and update details of the driver information;

[0088] Generate version update information based on release time and updated content;

[0089] Within the preset driver information database, driver information is managed according to preset classification management strategies and version update information.

[0090] In this embodiment, the management of drivers and configuration information can be carried out using version control, that is, by obtaining the release time and update content of each driver information, and generating version update information based on the release time and update content. This allows users to easily roll back to previous versions when needed, or to understand the update status of the user's current version.

[0091] In addition, it can achieve precise version matching. For example, if the current kernel version is 5.4, but a certain driver only supports kernel versions 5.0 and below, then the alternative driver that is compatible with the current kernel version can be determined based on the version information.

[0092] In other embodiments, driver information can be managed in a preset driver information base according to a preset classification management strategy and version information. The preset classification management strategy may include a hardware type classification management strategy and a kernel version classification management strategy.

[0093] S104 is a hardware device platform based on driver information loading.

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

[0095] In other embodiments, before applying the method to the system, thorough system compatibility testing is required to ensure that the system can operate stably on various hardware platforms. The testing may include functional testing, performance testing, and stability testing of the hardware devices.

[0096] In addition, hardware manufacturers and users can be invited to participate in testing to collect their feedback, so as to further optimize and improve the solution.

[0097] Based on the kernel adaptation method provided in the above embodiments, this application also provides specific implementations of the kernel adaptation device. Please refer to the following embodiments.

[0098] First see Figure 2 The kernel adapter 200 provided in this application embodiment includes the following units:

[0099] The acquisition module 201 is used to acquire a specific information identifier, which is used to identify hardware device information;

[0100] Matching module 202 is used to match a hardware device platform corresponding to a specific information identifier based on that specific information identifier.

[0101] The lookup module 203 is used to search for driver information corresponding to the hardware device platform from a preset driver library;

[0102] Loading module 204 is used to load hardware device platforms based on driver information.

[0103] As an alternative implementation, the acquisition module 201 can also be used for:

[0104] Obtain information on various hardware device platforms and their corresponding basic input / output system types;

[0105] Based on the basic input / output system type of the hardware device platform, determine the communication interface;

[0106] Obtain specific information identifiers based on communication interfaces.

[0107] As an alternative implementation, the acquisition module 201 can also be used for:

[0108] Obtain the storage format and encoding method of specific information identifiers;

[0109] If the storage format and / or encoding method do not belong to the corresponding preset identification mode, the specific information identifier will be converted into the specific information identifier under the preset identification mode.

[0110] As an alternative implementation, the acquisition module 201 can also be used for:

[0111] Verify specific information identifiers and obtain verification results;

[0112] If the verification result indicates that the verification has failed, the specific information identifier will be retrieved repeatedly within a preset number of times, and the number of times it is retrieved will be counted.

[0113] If the number of attempts exceeds the preset limit, a notification message will be sent to the user.

[0114] As an alternative implementation, the matching module 202 can also be used for:

[0115] The system acquires update information from hardware devices within a preset period to update the preset hardware information database.

[0116] As an alternative implementation, the lookup module 203 can also be used for:

[0117] Based on specific information identifiers, obtain the driver path corresponding to the kernel;

[0118] Within the preset driver information database, driver information is searched based on the driver path.

[0119] As an alternative implementation, the lookup module 203 can also be used for:

[0120] Obtain the release date and update details of the driver information;

[0121] Generate version update information based on release time and updated content;

[0122] Within the preset driver information database, driver information is managed according to preset classification management strategies and version update information.

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

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

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

[0126] Memory 302 may include mass storage for data or instructions. For example, and not limitingly, memory 302 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. In one instance, memory 302 may include removable or non-removable (or fixed) media, or memory 302 may be non-volatile solid-state storage. Memory 302 may be internal or external to the integrated gateway disaster recovery device.

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

[0128] Memory 302 may include read-only memory (ROM), random access memory (RAM), disk storage media device, optical storage media device, flash memory device, electrical, optical, or other physical / tangible memory storage device. Therefore, generally, 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 this disclosure.

[0129] The processor 301 reads and executes computer program instructions stored in the memory 302 to achieve... Figure 1 A kernel adaptation method is shown in the embodiment.

[0130] In one example, the electronic device may also include a communication interface 303 and a bus 304. For example, Figure 3 As shown, the processor 301, memory 302, and communication interface 303 are connected through bus 304 and complete communication with each other.

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

[0132] Bus 304 includes hardware, software, or both, that couples components of an electronic device together. For example, and not as a 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 Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel 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, bus 304 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, this application contemplates any suitable bus or interconnect.

[0133] The electronic device can execute the kernel adaptation method in the embodiments of this application, thereby achieving integration. Figures 1-2 Describes kernel adaptation methods and devices.

[0134] Furthermore, in conjunction with the kernel adaptation methods in the above embodiments, this application embodiment can provide a computer storage medium for implementation. This computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the kernel adaptation methods in the above embodiments.

[0135] In an optional embodiment, in conjunction with the kernel adaptation methods in the above embodiments, this application embodiment can provide a computer program product to implement the method. The instructions in the computer program product are executed by the processor of an electronic device, enabling the electronic device to implement any of the kernel adaptation methods in the above embodiments.

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

[0137] The functional blocks shown in the above block diagram 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, etc. 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 on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on 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, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.

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

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

[0140] The functional blocks shown in the above-described block diagram 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, etc. 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 on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on 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, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.

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

[0142] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations 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 apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations 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 is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.

[0143] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.

Claims

1. A kernel adaptation method, characterized by, include: Obtain various hardware device platforms and their corresponding BIOS system types, determine the communication interface based on the BIOS system type, and initialize the communication interface; The communication interface is either the Runtime Services interface of a UEFI system or the BIOS interrupt of a traditional BIOS system. The specific information identifier is read through the communication interface. The specific information identifier is the hardware manufacturer name and the board model, which is stored in a dedicated field newly added in the BIOS. Based on the specific information identifier, match the hardware device platform corresponding to the specific information identifier; Search the preset driver library for driver information corresponding to the hardware device platform; The driver information includes the driver program and configuration file, wherein the configuration file records CPU frequency, memory allocation, and device parameters; The hardware device platform is loaded based on the driver information, and the parameters in the configuration file are applied to the system to complete the loading of the hardware device platform.

2. The method of claim 1, wherein, Obtain specific information identifiers, including: Obtain the storage format and encoding method of specific information identifiers; If the storage format and / or encoding method do not belong to the corresponding preset identification mode, the specific information identifier will be converted into a specific information identifier under the preset identification mode.

3. The method according to any of claims 1-2, characterized in that, After obtaining the specific information identifier, the method further includes: Verify specific information identifiers and obtain verification results; If the verification result indicates that the verification has failed, the specific information identifier will be repeatedly retrieved within a preset number of times, and the number of retrievals will be counted. If the number of attempts exceeds a preset number, a notification message will be sent to the user.

4. The method according to any one of claims 1-2, characterized in that, Before matching the hardware device platform corresponding to the specific information identifier, the method further includes: The system acquires update information from hardware devices within a preset period to update the preset hardware information database.

5. The method of claim 1, wherein, 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, obtain the driver path corresponding to the kernel; Within the preset driver information database, the driver information is searched according to the driver path.

6. The method of claim 5, wherein, Before searching for the driver information according to the driver path in the preset driver information database, the method further includes: Obtain the release time and update content of the driver information; Based on the release time and the updated content, version update information is generated; Within the preset driver information database, the driver information is managed according to a preset classification management strategy and the version update information.

7. An electronic device, comprising: The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the kernel adaptation method as described in any one of claims 1-6.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the kernel adaptation method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Method capable of quickly transplanting adaptive hardware and firewall

    CN106341391A

  • Internet of Things operating system driver intelligent loading method, device, equipment and medium

    CN115617419A