CN115576616A - Drive operation method, computing device and storage medium - Google Patents
Drive operation method, computing device and storage medium Download PDFInfo
- Publication number
- CN115576616A CN115576616A CN202211253609.0A CN202211253609A CN115576616A CN 115576616 A CN115576616 A CN 115576616A CN 202211253609 A CN202211253609 A CN 202211253609A CN 115576616 A CN115576616 A CN 115576616A
- Authority
- CN
- China
- Prior art keywords
- file
- operating system
- driver
- drive
- computing device
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 73
- 238000012360 testing method Methods 0.000 claims description 41
- 238000009434 installation Methods 0.000 claims description 27
- 230000015654 memory Effects 0.000 claims description 21
- 239000005022 packaging material Substances 0.000 claims description 9
- 238000012545 processing Methods 0.000 claims description 8
- 230000000903 blocking effect Effects 0.000 claims description 4
- 238000004891 communication Methods 0.000 description 12
- 238000004806 packaging method and process Methods 0.000 description 11
- 230000008569 process Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 238000013515 script Methods 0.000 description 4
- 230000006978 adaptation Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000007639 printing Methods 0.000 description 2
- 238000005096 rolling process Methods 0.000 description 2
- 230000007723 transport mechanism Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000013508 migration Methods 0.000 description 1
- 230000005012 migration Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 239000000758 substrate Substances 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/176—Support for shared access to files; File sharing support
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Stored Programmes (AREA)
Abstract
The invention relates to the field of operating systems, in particular to a drive running method, a computing device and a storage medium, which are suitable for being executed in the computing device, wherein the method comprises the following steps: analyzing the first drive file through a first operating system to obtain an analysis file, wherein the first drive file is suitable for running in the first operating system; generating a second driver file in a second operating system based on the analysis file; and running a second driver in the second operating system according to the second driver file. According to the method and the device, the first drive file is analyzed to obtain the analysis file required by the operation of the drive file, the drive suitable for operation in the second operation system is further constructed according to the analysis file, the original drive which is not adapted is operated in the second operation system, the adaptability of the drive and the convenience of the operation system are improved, and the use experience of a user is improved.
Description
Technical Field
The present invention relates to the field of operating systems, and in particular, to a method for operating a driver, a computing device, and a storage medium.
Background
With the development of computer technology, people more and more call various hardware devices through computing devices to complete work. When the hardware equipment is called, a driver needs to be installed in an operating system, otherwise, the hardware equipment cannot be normally used. At present, manufacturers of hardware devices may provide drivers suitable for running in one or more operating systems, and sometimes users cannot use corresponding hardware devices without drivers suitable for running in their own operating systems when using the hardware devices; or the user replaces the operating system, and the original hardware equipment cannot be used.
For this reason, a new driving operation method is required.
Disclosure of Invention
To this end, the present invention provides a method of driving operation in an attempt to solve or at least alleviate the above-identified problems.
According to an aspect of the invention, there is provided a method of driver execution, adapted to be performed in a computing device, the method comprising: analyzing the first drive file through a first operating system to obtain an analysis file, wherein the first drive file is suitable for running in the first operating system; generating a second driver file in a second operating system based on the analysis file; and running a second driver in the second operating system according to the second driver file.
Optionally, in the method according to the present invention, parsing the first driver file by the first operating system to obtain a parsed file includes: decompressing the first drive file to obtain an original information file; determining the hardware model according to the original information file; determining installation parameters of the first drive file according to the hardware model; and generating an analysis file according to the first drive file and the installation parameters.
Optionally, in the method according to the present invention, the installation parameters include an installation path, registry information, and configuration parameter information.
Optionally, in a method according to the present invention, the computing device runs a second operating system and runs a virtual machine, and the virtual machine runs a first operating system, the method further includes: and setting a shared folder, wherein the shared folder is suitable for shared access by the first operating system and the second operating system.
Optionally, in the method according to the present invention, further comprising: the first operating system stores the analysis file in the shared folder, so that the second operating system can obtain the analysis file from the shared folder.
Optionally, in a method according to the present invention, generating a second driver file in a second operating system based on the parsed file includes: generating a packaging material file according to a preset template file and an analysis file; and generating a second drive file according to the packaging material file.
Optionally, in the method according to the present invention, running the second driver according to the second driver file in the second operating system includes: building a running environment of the first operating system in the second operating system; and installing and running the second driver in the running environment according to the second driver file.
Optionally, in the method according to the present invention, further comprising: installing a first driver in a first operating system according to a first driver file; calling a first driver to generate first test data in a first operating system; calling a second driver to generate second test data in a second operating system; and judging whether the second drive normally operates according to the first test data and the second test data.
Optionally, in the method according to the present invention, determining whether the second driver normally operates according to the first test data and the second test data includes: the first test data and the second test data are subjected to blocking processing to obtain a first data block and a second data block; comparing the first data block and the second data block; and if the second data block is the same as the first data block, judging that the second driver normally operates.
According to another aspect of the present invention, there is provided a computing device comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for performing the method of driver operation according to the present invention.
According to yet another aspect of the present invention, there is provided a computer readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a computing device, cause the computing device to perform a driver execution method according to the present invention.
The invention discloses a drive running method which is suitable for being executed in computing equipment, and the method comprises the following steps: analyzing the first drive file through a first operating system to obtain an analysis file, wherein the first drive file is suitable for running in the first operating system; generating a second drive file according to the analysis file through a second operating system, wherein the second drive file is suitable for running in the second operating system; and running a second driver in the second operating system according to the second driver file. According to the method and the device, the first drive file is analyzed to obtain the analysis file required by the operation of the drive file, the drive suitable for operation in the second operating system is further constructed according to the analysis file, the original drive which is not adapted is operated in the second operating system, the adaptability of the drive and the convenience of the operating system are improved, and the use experience of a user is improved.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which are indicative of various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to be within the scope of the claimed subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description when read in conjunction with the accompanying drawings. Throughout this disclosure, like reference numerals generally refer to like parts or elements.
FIG. 1 shows a flow diagram of a method 100 of driving operation according to an exemplary embodiment of the invention;
FIG. 2 illustrates a block diagram of a computing device 200, according to an exemplary embodiment of the invention;
fig. 3 shows a schematic diagram of mounting a second drive according to an exemplary embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art. Like reference numerals generally refer to like parts or elements.
Fig. 1 shows a flow diagram of a method 100 for operating a drive according to an exemplary embodiment of the invention.
A driver execution method in the present invention is adapted to be executed in a computing device. FIG. 2 illustrates a block diagram of a computing device, according to an exemplary embodiment of the invention.
In a basic configuration, computing device 200 includes at least one processing unit 220 and system memory 210. According to one aspect, depending on the configuration and type of computing device, system memory 210 includes, but is not limited to, volatile storage (e.g., random access memory), non-volatile storage (e.g., read-only memory), flash memory, or any combination of such memories. According to one aspect, system memory 210 includes an operating system 211.
According to one aspect, the operating system 211, for example, is adapted to control the operation of the computing device 200. Moreover, examples are practiced in conjunction with a graphics library, other operating systems, or any other application program and are not limited to any particular application or system. This basic configuration is illustrated in fig. 2 by those components within dashed line 215. According to one aspect, computing device 200 has additional features or functionality. For example, according to one aspect, computing device 200 includes additional data storage devices (removable and/or non-removable) such as, for example, magnetic disks, optical disks, or tape.
As stated hereinabove, according to one aspect, program modules 212 are stored in system memory 210. According to one aspect, the program modules 212 may include one or more application programs, the invention is not limited to the type of application program, for example, the application may also include: email and contacts applications, word processing applications, spreadsheet applications, database applications, slide show applications, drawing or computer-aided applications, web browser applications, and the like.
According to one aspect, examples may be practiced in a circuit comprising discrete electronic elements, a packaged or integrated electronic chip containing logic gates, a circuit utilizing a microprocessor, or on a single chip containing electronic elements or microprocessors. For example, an example may be practiced via a system on a chip (SOC) in which each or many of the components shown in fig. 2 may be integrated on a single integrated circuit. According to one aspect, such SOC devices may include one or more processing units, graphics units, communication units, system virtualization units, and various application functions, all integrated (or "burned") onto a chip substrate as a single integrated circuit. When operating via an SOC, the functions described herein may be operated via application-specific logic integrated with other components of the computing device 200 on a single integrated circuit (chip). Embodiments of the invention may also be practiced using other technologies capable of performing logical operations (e.g., AND, OR, AND NOT), including but NOT limited to mechanical, optical, fluidic, AND quantum technologies. In addition, embodiments of the invention may be practiced within a general purpose computer or in any other circuit or system.
According to one aspect, computing device 200 may also have one or more input devices 231, such as a keyboard, mouse, pen, voice input device, touch input device, or the like. Output device(s) 232 such as a display, speakers, printer, etc. may also be included. The foregoing devices are examples and other devices may also be used. Computing device 200 may include one or more communication connections 233 that allow communication with other computing devices 240. Examples of suitable communication connections 233 include, but are not limited to: RF transmitter, receiver and/or transceiver circuitry; universal Serial Bus (USB), parallel, and/or serial ports. Computing device 200 may be communicatively connected to other computing devices 240 via communication connection 233.
Embodiments of the present invention also provide a non-transitory readable storage medium storing instructions for causing the computing device to perform a method according to embodiments of the present invention. The readable media of the present embodiments include permanent and non-permanent, removable and non-removable media, and the storage of information may be accomplished by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of readable storage media include, but are not limited to: phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transitory readable storage medium.
According to one aspect, communication media is embodied by computer readable instructions, data structures, program modules, or other data in a modulated data signal (e.g., a carrier wave or other transport mechanism) and includes any information delivery media. According to one aspect, the term "modulated data signal" describes a signal that has one or more feature sets or that has been altered in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, radio Frequency (RF), infrared, and other wireless media.
It should be noted that although the computing device described above shows only processing unit 220, system memory 210, input device 231, output device 232, and communication connection 233, in particular implementations, the device may include other components necessary for proper operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
Referring to fig. 1, step 110 is first executed to parse a first driver file through a first operating system to obtain a parsed file, where the first driver file is suitable for running in the first operating system.
According to one embodiment of the invention, a first operating system and a second operating system are run in a computing device. The present invention is not limited to a specific type of the first operating system and the second operating system. The first operating system may be embodied as a windows system, and the second operating system may be embodied as a linux system.
The present invention does not limit the specific way in which the first operating system and the second operating system run in the computing device. According to one embodiment of the invention, the computing device runs a second operating system and runs a virtual machine, and the first operating system runs in the virtual machine; the second operating system can be used as a server, and the first operating system can be used as a client.
According to an embodiment of the present invention, when the computing device runs the first operating system and the second operating system, the computing device may further run the virtual machine based on the first operating system by directly running the first operating system in the computing device, and then run the second operating system according to the virtual machine.
According to one embodiment of the invention, the first operating system and the second operating system may also run in different computing devices; if the first operating system is running in the first computing device, the second operating system is running in the second computing device; the first computing device is connected with the second computing device in a communication mode, and the first computing device and the second computing device are matched to jointly implement the driving operation method.
According to one embodiment of the invention, in the computing device, a shared folder is further provided, the shared folder being adapted to share access by the first operating system and the second operating system. The first operating system and the second operating system both have access rights to the shared folder in order to share and transfer files.
According to one embodiment of the invention, when the first driving file is analyzed by the first operating system to obtain an analysis file, the first driving file is decompressed to obtain an original information file; determining a hardware model according to the first drive file; then, determining installation parameters of the first drive file according to the hardware model; and then generating an analysis file according to the first drive file and the installation parameters.
According to one embodiment of the present invention, the first driver file is a file suitable for installing and running the first driver in the first operating system, and the second driver file is a file suitable for installing and running the second driver in the second operating system. The parse file is a file that provides information necessary for the operation of the drive. The present invention does not limit the specific file types of the first driver file, the second driver file, and the parsed file.
According to an embodiment of the present invention, the first operating system parses the first driver file according to the configuration of the first driver file. The first driver file is a driver file of the first driver, and may be embodied in a compressed file format such as a rar format, a zip format, and an exe format. The first operating system can firstly decompress the compressed file to obtain an original information file and then execute subsequent operations. Specifically, the method comprises the following steps: analyzing the first drive file through the first operating system to obtain an analysis file, wherein the analysis file comprises: decompressing the first drive file to obtain an original information file; determining a hardware model according to the original information file; determining installation parameters of the first drive file according to the hardware model; and generating an analysis file according to the first drive file and the installation parameters.
According to one embodiment of the invention, the original information file may be embodied as an INF file. INF is an english abbreviation of Device INFormation File, and an INF File is a File format that is introduced by hardware Device manufacturers to release drivers thereof and is used for describing data INFormation such as devices or files. The INF file contains information or scripts of the hardware device to control the hardware operation. How the hardware driver is installed in the system is indicated in the INF file, the location of the source file, the target installation location, configuration parameter information added in the registry, and the like.
According to an embodiment of the invention, when the analysis file is obtained, the compressed file is firstly decompressed to obtain an original information file, a hardware name (which may include a brand name of hardware) is determined according to a Manufacturer section of the original information file, and a hardware Model is determined according to a hardware brand name analysis Model. And analyzing an Installsection according to the hardware model, and determining a source file path and an installation path to be installed of the first driver file.
The first driver file can be obtained according to the source file path, and the analysis file can be generated according to the first driver file and the installation parameters. The installation parameters include installation path, registry information, and configuration parameter information. The configuration parameter information is used for being added into the registry to generate modified registry information so as to operate according to the modified registry information when the second drive operates.
According to one embodiment of the invention, after the parsing file is generated, the first operating system stores the parsing file in the shared folder, so that the second operating system obtains the parsing file from the shared folder.
According to one embodiment of the invention, the first operating system may store the parsed file to the shared folder according to the hardware model. The shared folder is a special storage directory, and the first operating system and the second operating system can access the shared folder. And after storing the analysis file in the shared folder, the first operating system sends a notification message to the second operating system. And after receiving the notification message, the second operating system acquires the analysis file from the shared folder and executes the subsequent process according to the analysis file.
Subsequently, step 120 is executed to generate a second driver file in the second operating system based on the parsed file. When a second drive file is generated, generating a packaging material file according to a preset template file and a preset analysis file; and packaging the packaging material file according to the installation package type suitable for the second operating system to obtain a second drive file.
According to one embodiment of the invention, when the first operating system sends the notification message to the second operating system, the notification message comprises hardware information of a driver corresponding to the analysis file. The second operating system may obtain the parsed file from the shared folder according to the hardware information.
According to an embodiment of the present invention, the preset template file is a file for packaging, and the template file is generated according to an installation package type supported by the second operating system.
According to an embodiment of the present invention, the second operating system may be embodied as a linux system, or a Debian system, an Ubuntu system, or the like developed according to the linux system. The type of the installation package supported by the second operating system may be specifically a deb installation package.
According to an embodiment of the invention, when the packaging material file is generated, the packaging rule can be determined according to the installation package type suitable for the second operating system, then the template file and the packaging script are generated according to the packaging rule, and then the related field of the template file is modified according to the hardware name, so that the modified template file is obtained. And determining a first drive file and an installation path according to the analysis file, and storing the first drive file in the installation path. The packaging material file includes the first driver file stored in the installation path, the modified template file, and the packaging script. The template file and the packaging file generated according to the packaging rule can be continuously used for packaging the drivers of other hardware to generate a driver file.
And then, executing a packaging script in the packaging material file, and packaging the first drive file according to the template file to obtain a second drive file suitable for running in a second operating system.
Finally, step 130 is executed to run a second driver in the second operating system according to the second driver file; specifically, the method comprises the following steps: constructing a running environment of the first operating system in the second operating system; and installing and running the second driver in the running environment according to the second driver file.
According to an embodiment of the present invention, when the runtime environment of the first operating system is constructed, the runtime environment can be implemented by setting a compatible layer.
According to an embodiment of the invention, when the first operating system is implemented as a windows system, the running environment of the first operating system can be constructed by setting a wire compatible layer.
When the second driver is installed, a command for executing the installation package can be given to the wire compatible layer, and the second driver can be installed and operated.
According to an embodiment of the invention, the inventive method further comprises: installing a first driver in a first operating system according to a first driver file; calling a first driver to generate first test data in a first operating system; calling a second driver to generate second test data in a second operating system; and judging the normal operation of the second driver according to the first test data and the second test data.
According to an embodiment of the present invention, the hardware may be implemented as a printer, the hardware model may be embodied as a printer model, and the hardware driver may be embodied as a printer driver.
According to one embodiment of the present invention, installing the first driver may install a printer in the first operating system, and then, print the test contents to generate first test data; the first test data is sent to the second operating system.
And the second operating system generates second test data by printing in the same test, compares the second test data with the first test data and judges whether the second driver normally operates or not.
According to one embodiment of the invention, whether the second driver normally operates is judged according to the first test data and the second test data, and the first test data and the second test data are subjected to blocking processing to obtain a first data block and a second data block; comparing the first data block and the second data block; and if the second data block is the same as the first data block, judging that the second drive normally operates.
Since the second driver is installed in the second operating system, there is a certain possibility that the second driver cannot normally operate. The second drive therefore needs to be tested. And judging whether the second drive can normally run in the second operating system or not according to the output of the first drive and the second drive. And if the output of the second driver in the second operating system is the same as the output of the first driver in the first operating system, judging that the second driver can normally run.
According to an embodiment of the present invention, the first test data and the second test data may be embodied as 16-ary data byte streams without regularity, some drivers may have byte misalignment, and the two test data may have only a few or more than ten bytes different, and the actual printing result is the same, but the comparison with a common comparison tool such as diff or beyond comparison results in a large block of inconsistent contents. There is a need for an automated comparison process using comparison algorithms to achieve results.
According to one embodiment of the invention, the first test data and the second test data are firstly subjected to blocking processing to obtain a first data block and a second data block; the first data block is compared with the second data block.
Format one embodiment of the invention may employ the rsync algorithm when comparing the first block of data to the second block of data. The first data block and the second data block can both comprise one or more data blocks, the length of each data block is S, and the length of the last data block can be smaller than S; in making the comparison, a weak rolling 32-bit checksum and a strong rolling 128-bit MD4 checksum are calculated for each of the second data blocks.
Specifically, the method comprises the following steps: searching all data blocks with the length of S bytes in the data blocks included in the first data block; in a lookup, the lookup may be performed at any offset, not just a multiple of S, with the data included in the first data block having the same checksum as one of the data block blocks of the second data block.
According to one embodiment of the invention, data related to the test results may be backed up and written to the database. The follow-up maintenance of the drive package and the query of related developers and testers are facilitated. The data to be written into the database includes a driver name of the hardware device, a hardware device name, a print result of the first driver, a driver package name of the second driver, a driver package installation result, a print result, a migration result, a failure cause, and the like.
Fig. 3 shows a schematic diagram of mounting a second drive according to an exemplary embodiment of the present invention. As shown in fig. 3: the process of installing the second driver in the second operating system may be performed simultaneously on a plurality of pieces of hardware. Each hardware may be assigned a sub-process to perform driver adaptation. The first operating system may be implemented as a Windows system and the second operating system as a UOS system. The Windows system can be used as a client, and the UOS system can be used as a server.
For each driver, the process of the automated testing on the Windows side and the UOS side is performed in series, because all subsequent steps are dependent on the previous steps, and the subsequent steps are executed only after the previous steps are executed successfully. For example, if a driver fails to be installed on the Windows side, this means that the driver itself has a problem, and the deb package is not continuously made on the UOS side. Or if one driver fails to decompress, the analysis file is not generated continuously.
For different drivers, parallel execution placement is adopted, the efficiency of automatic test of driver adaptation is improved, automatic test among different drivers is realized in a process pool mode, parallelization is realized, a certain driver executes error quitting in a subprocess, and the processes of adaptation and test of other drivers are not influenced.
The invention discloses a drive running method which is suitable for being executed in computing equipment, and the method comprises the following steps: analyzing the first drive file through a first operating system to obtain an analysis file, wherein the first drive file is suitable for running in the first operating system; generating a second drive file according to the analysis file through a second operating system, wherein the second drive file is suitable for running in the second operating system; and running a second driver in the second operating system according to the second driver file. According to the method and the device, the first drive file is analyzed to obtain the analysis file required by the operation of the drive file, the drive suitable for operation in the second operating system is further constructed according to the analysis file, the original drive which is not adapted is operated in the second operating system, the adaptability of the drive and the convenience of the operating system are improved, and the use experience of a user is improved.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects.
Those skilled in the art will appreciate that the modules or units or groups of devices in the examples disclosed herein may be arranged in a device as described in this embodiment, or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the devices in an embodiment may be adaptively changed and arranged in one or more devices different from the embodiment. Modules or units or groups in embodiments may be combined into one module or unit or group and may furthermore be divided into sub-modules or sub-units or sub-groups. All of the features disclosed in this specification, and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except that at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments.
Additionally, some of the embodiments are described herein as a method or combination of method elements that can be implemented by a processor of a computer system or by other means of performing the described functions. A processor having the necessary instructions for carrying out the method or method elements thus forms a means for carrying out the method or method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is used to implement the functions performed by the elements for the purpose of carrying out the invention.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as floppy diskettes, CD-ROMs, hard drives, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to execute the driver operation method of the present invention according to instructions in the program code stored in the memory.
By way of example, and not limitation, computer readable media may comprise computer storage media and communication media. Computer readable media includes both computer storage media and communication media. Computer storage media store information such as computer readable instructions, data structures, program modules or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of computer readable media.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to practitioners skilled in this art. The disclosure of the present invention is intended to be illustrative, but not limiting, of the scope of the invention.
Claims (11)
1. A driver execution method, adapted to be executed in a computing device, the method comprising:
analyzing a first drive file through a first operating system to obtain an analysis file, wherein the first drive file is suitable for running in the first operating system;
generating a second drive file in a second operating system based on the analysis file;
and running a second driver in the second operating system according to the second driver file.
2. The method of claim 1, wherein parsing the first driver file by the first operating system to obtain a parsed file comprises:
decompressing the first drive file to obtain an original information file;
determining the hardware model according to the original information file;
determining installation parameters of the first drive file according to the hardware model;
and generating an analysis file according to the first drive file and the installation parameters.
3. The method of claim 2, wherein the installation parameters include installation path, registry information, and configuration parameter information.
4. The method of claims 1-3, wherein the computing device is running a second operating system and is running a virtual machine, the virtual machine having a first operating system running therein, the method further comprising:
setting a shared folder, wherein the shared folder is suitable for sharing access by the first operating system and the second operating system.
5. The method of claim 4, wherein the method further comprises:
and the first operating system stores the analysis file into the shared folder, so that the second operating system can acquire the analysis file from the shared folder.
6. The method of claim 5, wherein the generating a second driver file in a second operating system based on the parsed file comprises:
generating a packaging material file according to a preset template file and the analysis file;
and generating a second drive file according to the packaging material file.
7. The method of any of claims 1-5, wherein said running a second driver in the second operating system according to the second driver file comprises:
building a running environment of a first operating system in the second operating system;
and installing and operating a second driver in the operating environment according to the second driver file.
8. The method of claim 1, wherein the method further comprises:
installing a first driver in the first operating system according to the first driver file;
calling the first driver to generate first test data in the first operating system;
calling the second driver to generate second test data in the second operating system;
and judging whether the second drive normally runs or not according to the first test data and the second test data.
9. The method of claim 8, wherein the determining whether the second driver is operating normally according to the first test data and the second test data comprises:
the first test data and the second test data are subjected to blocking processing to obtain a first data block and a second data block;
comparing the first data block and the second data block;
and if the second data block is the same as the first data block, judging that the second drive normally operates.
10. A computing device, comprising:
one or more processors;
a memory; and
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for performing the method of any of claims 1-9.
11. A computer readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a computing device, cause the computing device to perform the method of any of claims 1-9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211253609.0A CN115576616A (en) | 2022-10-13 | 2022-10-13 | Drive operation method, computing device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211253609.0A CN115576616A (en) | 2022-10-13 | 2022-10-13 | Drive operation method, computing device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115576616A true CN115576616A (en) | 2023-01-06 |
Family
ID=84584782
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211253609.0A Pending CN115576616A (en) | 2022-10-13 | 2022-10-13 | Drive operation method, computing device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115576616A (en) |
-
2022
- 2022-10-13 CN CN202211253609.0A patent/CN115576616A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102521081B (en) | Repair destroyed software | |
US7536599B2 (en) | Methods and systems for validating a system environment | |
US20020059561A1 (en) | Software package verification | |
US5590347A (en) | Method and system for specifying alternate behavior of a software system using alternate behavior indicia | |
CN114661423A (en) | Cluster configuration detection method and device, computer equipment and storage medium | |
CN115599618B (en) | Register dynamic change-allocation verification method and device, storage medium and processor | |
CN115576616A (en) | Drive operation method, computing device and storage medium | |
CN114816772B (en) | Debugging method, debugging system and computing device for application running based on compatible layer | |
CN115048082A (en) | Micro front-end system construction method and device, server and readable storage medium | |
CN114816816A (en) | Collapse stack information processing method, device, equipment and storage medium | |
CN115202830B (en) | Root file system preparation method, system, computing device and readable storage medium | |
CN115185634A (en) | Subsystem implementation method and computing device | |
CN115617489B (en) | Operating system migration method, migration application and migration application deployment method | |
CN116661876B (en) | System starting method, file generating method, electronic equipment and server | |
CN110032542B (en) | Cramfs file system management method and device and electronic equipment | |
CN112256554B (en) | Method and equipment for testing based on scene test cases | |
CN115729564A (en) | Method for judging compatibility of native application to Linux Arm64 | |
CN117891723A (en) | Code checking method, computing device and storage medium | |
CN115185820A (en) | Test method and test device for system installer and computing equipment | |
CN117193791A (en) | Method for checking compatibility between driving module and kernel, computing device and storage medium | |
CN113986742A (en) | Automatic testing method, device, equipment and storage medium | |
CN117785245A (en) | Source code source closing method and function updating method for angular project | |
CN114880235A (en) | Test case execution method, computing device and storage medium | |
CN118170428A (en) | Method and device for automatically performing RPM packaging and verification in batches based on Ansible | |
CN115952097A (en) | Test method, test device, electronic equipment and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |