A kernel testing method and system supporting multiple domestic platforms

Through customized PXE startup NBP boot files and grub file directories, the flexibility and efficiency of kernel testing on domestic platforms are solved, efficient kernel testing and result feedback are achieved, and the adaptability and testing efficiency of domestic operating systems are improved.

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

Patent Information

Application Number
CN202211019850.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-24
Publication Date
2025-07-25
Estimated Expiration
2042-08-24

AI Technical Summary

Technical Problem

The existing technology cannot flexibly and conveniently upgrade and test cores and systems on a variety of domestic platforms, especially on devices with different architectures, which have problems such as insufficient flexibility, cumbersome operation and firmware limitations.

Method used

By creating a customized PXE startup NBP boot file, customize the grub file directory, modify the DHCP service configuration, specify the startup parameters and file path, automatically load the kernel test program, and perform preliminary analysis and feedback of the test results.

Benefits of technology

It improves the adaptability and testing efficiency of domestic operating systems on a variety of domestic platforms, realizes the flexibility of kernel testing and efficient feedback of results, and improves the testing efficiency by more than 80%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115328717B_ABST
    Figure CN115328717B_ABST
Patent Text Reader

Abstract

The present invention relates to a kernel testing method and system supporting multiple domestic platforms. The method includes a preprocessing process, a startup process, and a testing process; the system includes a preprocessing module, a startup module, and a testing module. The preprocessing module includes a makeEFI service module, a makeGrub service module, and a Schedule service module; the startup module includes a Control service module and a test device module; the testing module includes an Analysis service module and a Report service module. Through the method and system of the present invention, a test environment can be constructed as needed, including the kernel to be started, loaded modules, startup parameters, the operating system outside the kernel, etc.; the system can perform tests on the started kernel, and conduct a preliminary analysis of the test results and provide timely feedback on the test results, thereby realizing the deployment and testing of domestic operating systems on domestic platforms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This patent application belongs to the technical field of kernel testing. More specifically, it relates to a kernel testing method and system supporting multiple domestic platforms. Background Art

[0002] With the orderly advancement of domestic operating systems and domestic devices, for the installation, testing, and debugging of domestic operating systems on domestic devices, the application scenarios will be more complex. How to deal with more complex scenarios is an urgent problem to be solved. When the PXE technology was initially invented, the main application scenarios were large-scale and mass operating system installations and startups, as Figure 1 shown.

[0003] With the wider layout of domestic technologies and the increasingly perfect domestic ecosystem, in this process, the usage scenarios of devices with Feiteng ARM, Loongson, Zhaoxin, and Haiguang's X86, Shenwei architectures, etc. have been further expanded; in the processes of mass production, testing, etc. of devices with each architecture and their usage scenarios, higher requirements are put forward for the flexibility and stability of the installation process of domestic Linux operating systems.

[0004] The existing patented technologies have the following disadvantages:

[0005] 1. Chinese invention patent "A Booting Method and System for a Physical Host" (Patent No. CN 107861761A). This patent is a booting method and system for a physical host. The main steps are as follows: A management node communicatively connected to the physical host boots the physical host through PXE; a block device server exports a virtual host image file pre-stored in a memory as a first block device; the management node remotely accesses the physical host and controls the establishment of a communication connection between the physical host and the first block device; the management node copies the data of the first block device containing the virtual host image file to the hard disk of the physical host and adaptively modifies it to boot the physical host.

[0006] 2. Chinese Invention Patent "A Method for Automatically Deploying Operating Systems" (Patent No. CN106855819A). This patent is a method for remotely, automatically, and batch-installing operating systems. The main steps are as follows: 1) Scan IP addresses at the master control end according to a specific IPMI service port, and then assign addresses to the scanned clients through the DHCP service; 2) Set the upload image at the server end; 3) Set the target node that takes effect once through the IPMI protocol to start with PXE, and restart the target node; 4) After the target node restarts, start executing the client program, and remotely download the system image from the master control end through the TFTP protocol; 5) After the image download is completed, start automatically installing the operating system; 6) The master control end checks whether all nodes are installed, and confirms whether the installation is successful by remotely obtaining the IPMI address output on the operating system; 7) If the installation fails, return to step 3; if the installation is successful, end the installation. This invention mainly targets servers and requires support for the IPMI protocol.

[0007] 3. Chinese Invention Patent "An Automated Deployment Method and System for Supporting Multiple Domestic Operating Systems" (Patent No. CN 112230942 A). This patent can support the automated deployment method for multiple domestic operating systems. The main steps are as follows: 1) Use one machine as the deployment machine. In addition to installing the basic services relied on by the PXE server, it also adds the Distro service, Profile service, Image service, and System service; 2) This service model identifies domestic hardware servers of different CPU types and sends the NBP startup file of the specified operating system; 3) The client downloads the corresponding GRUB boot file of the operating system according to this NBP boot file; 4) Load the virtual kernel and the corresponding kickstart automated configuration template file according to the GRUB boot file, and download the software installation package from the corresponding software source list to install the specified operating system. This invention mainly targets the ISO installation process and solves the problem of operating system installation.

[0008] At the same time, it can be found that the existing domestic operating system automatic deployment technologies mainly target a batch of devices and use the same ISO image file version for upgrading. This method has the following problems:

[0009] 1) For the upgrade of ISO image files with personalized requirements, the flexibility is insufficient; for example, during the production, debugging, and testing stages, it is necessary to automatically deploy the operating system for different architectures and different devices at the same time, and the existing technologies cannot meet the usage requirements.

[0010] 2) For the upgrade of ISO image files that only change the kernel, batch upgrade is cumbersome; if only the kernel or modules in the ISO are updated, the existing technologies require manual updating of the corresponding kernel, modules, etc., and the operation is cumbersome.

[0011] 3) For the upgrade and startup of modifying GRUB parameters, it is limited by the firmware; if the startup parameters in GRUB need to be adjusted, and the serial port and logs are configured during the upgrade process, it will be limited by whether the firmware version supports this function, which has great limitations.

[0012] 4) When using a domestic operating system on a domestic platform and loading initrd.img or modules, it will be limited by the firmware. Some firmware has limitations on the size of initrd.img. Here, initrd.img is the kernel file of the Linux system. The Linux system first starts the kernel, then the kernel mounts initrd.img and executes the scripts inside to further mount various modules, and then discovers the real root partition. Without initrd.img, the kernel attempts to directly mount the root partition.

[0013] Therefore, to solve the problems of kernel and system testing on domestic platforms, a more convenient and maintenance-friendly kernel and system upgrade solution and system are needed. Summary of the Invention

[0014] The technical problem to be solved by the present invention is to provide a kernel testing method and system that support multiple domestic platforms. Through this method and system, a test environment can be constructed as needed, including the kernel to be started, the loaded modules, startup parameters, the operating system outside the core, etc.; the system can perform tests on the started kernel, conduct preliminary analysis on the test results, and provide timely feedback on the test results, so as to realize the deployment and testing of domestic operating systems on domestic platforms.

[0015] To solve the above problems, the technical solution adopted by the present invention is:

[0016] A kernel testing method supporting multiple domestic platforms, which uses the system service to produce the NBP boot file for PXE boot, such as mips64-lennovo-10.EFI. This NBP boot file can customize the directory of the grub file during the boot process, that is, customize the directory according to user needs, automatically create the grub file at the directory, and at the same time modify the configuration file of the DHCP service to specify the download path of the system NBP boot file; customize and modify the content of the grub file by the system service to specify and configure the parameters required when the device boots; the image, initrd.img, and ISO required when booting can be placed by the system service, and the device completes the boot process according to the required kernel, boot parameters, ISO, etc.; after the device boots, automatically load the kernel test execution program, execute the test and submit the test results to the server; the system service makes a preliminary analysis of the test results and displays them; finally, the system service pushes the test results to relevant personnel.

[0017] Specifically, a kernel testing method supporting multiple domestic platforms disclosed in the present invention includes a preprocessing process, a boot process, and a testing process;

[0018] Preprocessing process: First, confirm that the PXE function is enabled in the BIOS, and then produce the NBP boot file for PXE boot. The system automatically creates the grub file according to the test requirements, so as to specify and configure the parameters required when the device boots;

[0019] Boot process: The device loads the grub file according to the download path of the NBP boot file and boots the predetermined device;

[0020] Testing process: After the device boots, automatically load the kernel test execution program, generate test results, and store, analyze, and report the test results.

[0021] Furthermore, the preprocessing process includes the makeEFI service, the makeGrub service, and the Schedule service, and the steps are as follows:

[0022] S1: The makeEFI service generates the NBP boot file corresponding to the architecture of the device and specifies the directory required by the grub file in the NBP boot file; at the same time, place the generated NBP boot file in the directory corresponding to the DHCP service, and modify the configuration file in the DHCP service to specify the download path of the NBP boot file;

[0023] S2: The makeGrub service creates the corresponding grub file according to the directory required by the grub file when the makeEFI service is generated, and modifies the content of the grub file according to the test requirements, such as specifying the loading directories of the kernel image file image and the initialization file initrd.img and related kernel startup parameters;

[0024] S3: The Schedule service places the initialization file initrd.img, the kernel image file image, and the corresponding system image file ISO in the corresponding directory of the grub file according to the parameter requirements written in the grub file.

[0025] Furthermore, in order to control each device to accurately obtain the NBP boot file and startup parameters and assign IP addresses after the device starts up, if it is an upgrade or verification of a batch of devices, corresponding parameters are set in the DHCP service; if it is an upgrade or verification of a single device, operations are performed by setting the mac address.

[0026] Furthermore, in step S3, the initrd.img file is also trimmed and its size is adjusted to adapt to the hardware device.

[0027] Furthermore, the startup process includes the following steps:

[0028] S4: The Control service starts the device after the Schedule service in step S3 is executed and reads the NBP boot file from the DHCP service;

[0029] S5: The device loads the grub file according to the download path of the NBP boot file and starts up.

[0030] Furthermore, the test process specifically includes the following steps:

[0031] S6: After the device starts up and the kernel and / or the out-of-core system are loaded, the established test tasks can be executed;

[0032] S7: After the test tasks are executed, the test results are sent to the background database;

[0033] S8: The Analysis service is responsible for cleaning and preliminary analysis of the test results in the background database and presenting the test results;

[0034] S9: The Report service, corresponding to the Analysis service, is responsible for sending the test results in step S8 to the corresponding personnel for processing.

[0035] Further, in step S9, the test results are sent to the corresponding personnel for processing through an external platform, and the external platform includes one or more of, but is not limited to, email, QQ, WeChat, and text messages.

[0036] Further, the domestic platforms include one or more of Zhaoxin, Haiguang, Loongson, Phytium, and Shenwei.

[0037] In addition, a kernel test system supporting multiple domestic platforms is also disclosed for implementing the above method, including corresponding various modules, including a preprocessing module, a startup module, and a test module, where:

[0038] The preprocessing module is used to build the required test environment according to the test requirements, including a makeEFI service module, a makeGrub service module, and a Schedule service module that are connected in sequence by information. The makeEFI service module is also connected to the DHCP service module by information, and the makeGrub service module is also connected to the TFTP service module by information;

[0039] The startup module includes a Control service module and a test device module. The Control service module is connected to the Schedule service module and the device to be tested by information;

[0040] The test module includes an Analysis service module and a Report service module. The Report service module is connected to the Analysis service module by information, and the Analysis service module is also connected to the background database and the device to be tested by information.

[0041] Due to the adoption of the above technical solutions, the beneficial effects obtained by the present invention are:

[0042] (1) Using the makeEFI service to produce the system NBP boot file can solve the different characteristics of different architectures of domestic platforms, can customize the loaded modules and the startup directory, and improve the adaptability of each domestic platform.

[0043] (2) Using the makeGrub service to modify the grub.cfg file according to the requirements can solve the parameters such as initrd.img, image, startup commands, and ISO loaded at startup, and improve the flexibility of domestic operating system kernel testing.

[0044] (3) The Schedule service places initrd.img, image, and the corresponding ISO, etc. in the corresponding directory according to the parameters written in grub, providing support and scheduling for system startup.

[0045] (4) Applicability. This part shows obvious effects in the cases of serial port input and network input, can be used normally under various domestic architectures, can obtain startup logs and test logs in real time, and perform continuous integration every day. The test efficiency is increased by more than 80%, effectively improving the kernel test efficiency of domestic operating systems on domestic platforms.

[0046] (5) Analysis service. It can preliminarily analyze the kernel test results and submit the results to the Report service to timely feedback relevant personnel. Brief Description of the Drawings

[0047] Figure 1 It is the PXE startup logic diagram related to the present invention;

[0048] Figure 2 It is the kernel preprocessing and startup flowchart of the method of the present invention;

[0049] Figure 3 It is the kernel test system flowchart of the method of the present invention;

[0050] Figure 4 It is the logic diagram of the system of the present invention. Detailed Embodiment

[0051] The present invention will be further described in detail below with reference to the embodiments.

[0052] First, introduce the abbreviations and key terms:

[0053] PXE (Preboot eXecution Environment): Pre-boot Execution Environment, a mechanism for starting a computer using the network. The startup of the computer does not depend on the local data hard disk or operating system, but downloads the operating system from a remote server through the network and then starts / installs the operating system.

[0054] DHCP (Dynamic Host Configuration Protocol): Dynamic Host Configuration Protocol. A server controls a range of IP addresses, and when a client logs in to the server, it can automatically obtain the IP address and subnet mask assigned by the server.

[0055] TFTP: (Trivial File Transfer Protocol) is a protocol in the TCP / IP protocol family used for simple file transfer between a client and a server, providing a simple and low-overhead file transfer service.

[0056] NBP (Network Bootstrap Program): Network boot program. The main function of the NBP boot file is to find and load the specified operating system.

[0057] Block device: refers to storing information in data blocks of 512 bytes or 4Kb. Each block has its own address and a certain length of data can be read at any location in the device.

[0058] ISO: It is a disc image file. The burning software can directly burn the operating system file ISO into an installable system disc, usually with the extension .iso.

[0059] BIOS (Basic Input Output System): Basic Input Output System is a set of programs fixed on a ROM chip on the computer motherboard, which stores the most important basic input and output programs of the computer, system setting information, self-test program after power-on and system self-starting program. Its main function is to provide the most basic and direct hardware settings and control for the computer.

[0060] The present invention is applicable to the domestic Zhaoxin, Haiguang, Loongson, Feiteng and Shenwei platforms. The general design idea is: the system service is used to prepare the NBP boot file of PXE startup, such as mips64-lennovo-10.EFI. The NBP boot file can customize the directory of the grub file in the startup process, that is, customize the directory according to user needs, and automatically create a grub file in the directory, and modify the configuration file of the DHCP service at the same time to specify the download path of the system NBP boot file; the system service customizes and modifies the content of the grub file, and configures the parameters required for startup; the image and initrd.img required for startup, as well as ISO, can be placed by the system service, and the device completes the startup process according to the required kernel, startup parameters, ISO, etc.; after the device is started, the kernel test execution program is automatically loaded, the test is executed and the test result is submitted to the server; the system service performs a preliminary analysis on the test result and displays it; finally, the system service pushes the test result to relevant personnel.

[0061] Figure 4 This is the logic diagram of this solution, describing the overall composition of this system. The main processes include preprocessing, startup, and testing. In this process, each system module and related system services, such as makeEFI service, makeGrub service, etc., are service names defined to realize system functions. In the preprocessing stage, the required test environment will be built according to user needs. After the environment is prepared, it will go to the startup process, start the predetermined equipment, enter the test process, and store, analyze, and report the test results.

[0062] The overall system framework is as Figure 4 shown. Based on the installation and testing requirements of domestic equipment and operating systems, the entire system is divided into three main parts, which are used to correspond to the preprocessing process (S1 - S3), the startup process (S4 - S5), and the testing process (S6 - S9) respectively, achieving the installation and startup of the kernel and the operating system. During this process, due to the customization of startup parameters by multiple services, such as the customization of kernel startup parameters and startup files, etc., the usage scenarios of this solution are greatly enriched. At the same time, due to the external hardware control of power on and off and the production of initrd.img, the dependence on firmware is reduced, further enhancing the universality of this solution. When the kernel starts, the test logs of the kernel are recorded and submitted to the background, and are initially analyzed by the data analysis module, and the analyzed test results are submitted to relevant personnel.

[0063] The following is an elaboration.

[0064] Preprocessing process: It is used to build the required test environment according to the test requirements. First, confirm that the PXE function is enabled in the BIOS, then create the NBP boot file for PXE startup, and then customize the directory required by the grub file according to the test requirements. Automatically create the grub file at the directory required by the grub file, and specify and configure the parameters required for device startup, such as modifying the configuration file of the DHCP service, specifying the download path of the NBP boot file, and customizing and modifying the content of the grub file to configure the parameters required for device startup, etc.

[0065] It should be noted here that before starting the steps, it is necessary to confirm in the BIOS whether the PXE function has been set to the enabled state, and only in the enabled state can it be implemented.

[0066] Startup process: The device loads the grub file according to the download path of the NBP boot file and starts the predetermined device;

[0067] Testing process: After the device starts, it automatically loads the kernel test execution program, generates test results, and stores, analyzes, and reports the test results.

[0068] Figure 2 It is the flowchart of kernel preprocessing + startup in a kernel testing method for supporting multiple domestic platforms described in the present invention.

[0069] As Figure 2 shown, the preprocessing process includes the makeEFI service, the makeGrub service, and the Schedule service, and the steps are as follows:

[0070] S1: makeEFI service, generate an NBP boot file corresponding to the architecture of the device, and specify the directory required by the grub file in the NBP boot file; at the same time, place the generated NBP boot file in the directory corresponding to the DHCP service, and modify the configuration file in the DHCP service to specify the download path of the NBP boot file;

[0071] In this step S1, in order to control each device to accurately obtain the NBP boot file and startup parameters, and assign an IP address after the device starts up, if it is an upgrade or verification of a batch of devices, set the corresponding parameters in the DHCP service to improve efficiency; if it is an upgrade or verification of a single device, operate by setting the mac address. The makeEFI service generates the corresponding NBP boot file, and places the NBP boot files of different architectures in different directories according to the established rules, and writes the download path of the NBP boot file into the DHCP service, so as to be compatible with devices of domestic Zhaoxin, Haiguang, Loongson, Feiteng, and Shenwei platform architectures.

[0072] S2: makeGrub service, create a corresponding grub file according to the directory required by the grub file when the makeEFI service is generated, that is, the makeGrub service automatically creates a grub file according to the test requirements, and modifies the grub file according to the test requirements or user requirements, such as specifying the loading directories of the image and initrd.img files and related kernel startup parameters;

[0073] S3: Schedule service, place the initialization file initrd.img, kernel image file image, and corresponding system image file ISO, etc. in the corresponding directory according to the parameter requirements written in the grub file by the makeGrub service.

[0074] The makeEFI service, makeGrub service, and Schedule service involve many directories, and are hereby specifically stated:

[0075] 1. The directory of the NBP boot file is the directory set in the DHCP service.

[0076] 2. The directory of the grub file is the file directory pointed to when making the NBP boot file.

[0077] 3. In the grub file, files such as initrd.img and image that need to be used need to be processed by the Schedule service and placed in the corresponding directory described by the grub file. That is, each file should be placed in the corresponding directory and connected to each other.

[0078] Or, it can be understood as:

[0079] First, generate the NBP boot file. When creating this NBP boot file, the directory of the grub file should be specified. After the system boots up, it can pull the NBP boot file, then parse the NBP boot file, read the directory of the grub file, and then read the initrd, image, and ISO (placed by the Schedule service) according to the requirements in the grub file directory.

[0080] At the same time, where to read the NBP boot file is determined by the DHCP service, which specifies a certain machine device to read from a certain directory.

[0081] In step S3, the Schedule service also trims the initialization file initrd.img and adjusts its size to adapt to the hardware device. Since various startup parameters can be set when writing to the grub file, but different firmware manufacturers have requirements for the size of initrd.img. Therefore, for such abnormal situations, an initrd.img file adapted to the firmware needs to be made. Without affecting system startup and testing, the initrd.img file is trimmed according to existing or conventional technologies, such as trimming the loaded modules, which can be directly commented during production, so as to adjust the size of the initrd.img file to adapt to the hardware device.

[0082] The startup parameters specified by the grub file are listed as follows:

[0083] linux(tftp,192.168.1.2) / JobID / tftp / kernel / vmlinuz console=ttyS0,115200loglevel=8audit=0netboot=nfs root= / dev / nfs nfsroot=192.168.1.2: / data / nfs / mips64-lennovo-10rw security=

[0084] 1. Specify the directory of the vmlinuz file to be started;

[0085] 2. Specify the serial port parameters;

[0086] 3. Specify the log level;

[0087] 4. Specify the NFS directory to be started;

[0088] 5. Specify the security-related parameters;

[0089] initrd(tftp,192.168.1.2) / JobID / tftp / ramdisk / ramdisk.cpio.gz

[0090] 1. Specify the directory of the initrd file, where 192.168.1.2 is the IP address of the TFTP service.

[0091] DHCP service

[0092] #mips-lenovopc-10

[0093] host kylin-lenovo-pc-10{ #---- Host declaration

[0094] hardware ethernet aa:bb:cc:dd:ee:ff; #---- Specify its MAC address

[0095] fixed-address 192.168.1.10; #---- Specify the IP address

[0096] filename "grub-efi / mips / mips-lenovoPC-10.EFI"; #---- Specify the directory of the NBP boot file.

[0097] }

[0098] The startup process includes the following steps:

[0099] S4: Control service. After the Schedule service in step S3 is executed, start the device and read the NBP boot file from the DHCP service; for existing domestic devices, they start after power-on, and this function requires support from the firmware manufacturer. Therefore, it is necessary to use peripheral hardware to control the device startup process.

[0100] S5: The device loads the grub file according to the download path of the NBP boot file and starts.

[0101] As Figure 3 shown, after the device starts and loads the operating system, the following test process is achieved:

[0102] S6: After the device starts and the kernel and / or the out-of-core system are loaded, the established test tasks can be executed; in this step, it is also possible to only start the kernel and only test the kernel for easy problem analysis and location;

[0103] S7: After the test is executed, send the test results to the background repository; for the storage of test results, it is necessary to process them in advance in the analysis script to unify the test results into one format for subsequent unified processing;

[0104] S8: The Analysis service is responsible for data cleaning and preliminary analysis of the data in the background database and presenting the results.

[0105] S9: The Report service is responsible for sending the test results to the corresponding personnel for processing; the push of the test report can be connected to various external platforms, such as email, QQ, WeChat, SMS, etc.

[0106] In addition, the present invention also discloses a kernel test system supporting multiple domestic platforms for implementing the above method. The system includes a preprocessing module, a startup module, and a test module, wherein:

[0107] The preprocessing module is used to build the required test environment according to the test requirements, including a makeEFI service module, a makeGrub service module, and a Schedule service module that are connected in sequence by information. The makeEFI service module is also connected to a DHCP service module by information, and the makeGrub service module is also connected to a TFTP service module by information.

[0108] The startup module includes a Control service module and a test device module. The Control service module is connected to the Schedule service module and the device to be tested by information.

[0109] The test module includes an Analysis service module and a Report service module. The Report service module is connected to the Analysis service module by information. The Analysis service module is also connected to the background database and the device to be tested by information.

[0110] Through the method and system of the present invention, it is possible to build a test environment as needed, including the kernel to be started, the modules to be loaded, the startup parameters, the operating system outside the kernel, etc.; the system can execute tests on the started kernel, perform preliminary analysis on the test results, and provide timely feedback on the test results, so as to realize the deployment and testing of domestic operating systems on domestic platforms.

Claims

1. A kernel test method supporting multiple domestic platforms, characterized in that It includes a preprocessing process, a startup process, and a testing process; Preprocessing process: First, confirm that the PXE function is enabled in the BIOS. Then, create the NBP boot file for PXE startup and automatically create the grub file according to the test requirements, so as to specify and configure the parameters required for device startup; Use peripheral hardware to control the device startup process: The device loads the grub file according to the download path of the NBP boot file and starts the predetermined device; Testing process: After the device starts up, automatically load the kernel test execution program, generate test results, and store, analyze, and report the test results; The preprocessing process includes the makeEFI service, the makeGrub service, and the Schedule service. The steps are as follows: S1: The makeEFI service generates the NBP boot file corresponding to the architecture of the device and specifies the directory required by the grub file in the NBP boot file. At the same time, place the generated NBP boot file in the directory corresponding to the DHCP service and modify the configuration file in the DHCP service to specify the download path of the NBP boot file; S2: The makeGrub service creates the corresponding grub file according to the directory required by the grub file when the makeEFI service is generated and modifies the content of the grub file according to the test requirements; S3: The Schedule service places the initialization file initrd.img, the kernel image file image, and the corresponding system image file ISO in the corresponding directory of the grub file according to the parameter requirements written in the grub file; In order to control each device to accurately obtain the NBP boot file and startup data and assign an IP address after the device starts up, if it is an upgrade or verification of a batch of devices, set the corresponding parameters in the DHCP service; if it is an upgrade or verification of a single device, operate by setting the mac address; In step S3, the initialization file initrd.img is also trimmed and its size is adjusted to adapt to the hardware device.

2. The kernel test method for supporting multiple domestic platforms according to claim 1, characterized in that, The startup process includes the following steps: S4: The Control service starts the device after the Schedule service in step S3 is executed and reads the NBP boot file from the DHCP service; S5: The device loads the grub file according to the download path of the NBP boot file and starts up.

3. A kernel testing method for supporting multiple domestic platforms according to claim 1, characterized in that, The testing process specifically includes the following steps: S6: After the device starts up and the kernel and / or the out-of-core system are loaded, the established test tasks can be executed; S7: After the test tasks are executed, send the test results to the background database; S8: The Analysis service is responsible for data cleaning and preliminary analysis of the test results in the background database and displaying the test results; S9: The Report service, corresponding to the Analysis service, is responsible for sending the test results in step S8 to the corresponding personnel for processing.

4. A kernel testing method for supporting multiple domestic platforms according to claim 3, characterized in that, In step S9, the test results are sent to the corresponding personnel for processing through an external platform, and the external platform includes one or more of, but is not limited to, email, QQ, WeChat, and text messages.

5. A kernel test method for supporting multiple domestic platforms according to claim 1, characterized in that, The domestic platforms include one or more of Zhaoxin, Haiguang, Loongson, Phytium, and Sunway.

6. A kernel test system supporting multiple domestic platforms, used to implement the method described in any one of claims 1-5, characterized in that, It includes a preprocessing module, a startup module, and a testing module, where: The preprocessing module is used to build the required test environment according to the test requirements, including a makeEFI service module, a makeGrub service module, and a Schedule service module that are sequentially connected by information. The makeEFI service module is also connected to the DHCP service module by information, and the makeGrub service module is also connected to the TFTP service module by information; The startup module includes a Control service module and a test device module. The Control service module is connected to the Schedule service module and the device to be tested by information; The testing module includes an Analysis service module and a Report service module. The Report service module is connected to the Analysis service module by information. The Analysis service module is also connected to the background database and the device to be tested by information.

Citation Information

Patent Citations

  • Method for automatically deploying operating system

    CN106855819A

  • Booting methods and systems of physical host

    CN107861761A

  • Automatic deployment method and system supporting multiple domestic operating systems

    CN112230942A

  • Automatic deployment method, system and device for customized domestic operating system PXE

    CN114443068A