CN114879987A - Kernel upgrading and using method, computing device and storage medium - Google Patents

Kernel upgrading and using method, computing device and storage medium Download PDF

Info

Publication number
CN114879987A
CN114879987A CN202210398048.7A CN202210398048A CN114879987A CN 114879987 A CN114879987 A CN 114879987A CN 202210398048 A CN202210398048 A CN 202210398048A CN 114879987 A CN114879987 A CN 114879987A
Authority
CN
China
Prior art keywords
configuration information
kernel
storage
memory
configuration file
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
Application number
CN202210398048.7A
Other languages
Chinese (zh)
Inventor
赵国安
周鹏
陈毅翀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Uniontech Software Technology Co Ltd
Original Assignee
Uniontech Software Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Uniontech Software Technology Co Ltd filed Critical Uniontech Software Technology Co Ltd
Priority to CN202210398048.7A priority Critical patent/CN114879987A/en
Publication of CN114879987A publication Critical patent/CN114879987A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to the field of operating systems, and discloses a kernel upgrading and using method, a computing device and a storage medium. The computing device comprises an internal memory and runs an operating system, the operating system comprises a first kernel and a driver, and the method comprises the following steps: determining a configuration file according to the first kernel, and creating configuration information according to the configuration file to obtain a second kernel; setting a storage position of the configuration information in an internal memory; loading the second kernel into the internal memory according to the storage location; and calling the driver according to the second kernel, and realizing the target function according to the configuration information. The configuration information is newly established outside the original configuration file of the first kernel, so that the data structure of the original configuration file is not changed. And further, the configuration information and the configuration file are simultaneously loaded into an internal memory, so that the target function is realized, and the driver can still be adapted and available.

Description

Kernel upgrading and using method, computing device and storage medium
Technical Field
The present invention relates to the field of operating systems, and in particular, to a kernel upgrade method, a kernel use method, a computing device, and a storage medium.
Background
With the development of computer technology, people use computers through operating systems and call various drivers to complete various kinds of work. Sometimes, to add functionality or optimize performance to an operating system, the operating system needs to be upgraded; specifically, the method comprises the following steps: and performing customized upgrade on the kernel.
However, in the prior art, when an operating system is used to call various drivers, in order to avoid incompatibility between the operating system and a driver, a kernel interface called by the driver is verified: and judging whether the driver is available according to the check value of the kernel interface. However, when the operating system is often upgraded, the check value of the kernel interface provided to the driver may be changed by directly adding the corresponding function to the kernel. Once the check value of the kernel interface that the driver needs to call is different from the check value of the kernel interface provided by the current operating system, the original driver cannot be used continuously unless the driver is recompiled.
To this end, a new kernel upgrade and usage approach is needed.
Disclosure of Invention
To this end, the present invention provides a kernel upgrade and usage method in an attempt to solve or at least alleviate the above-presented problems.
According to an aspect of the present invention, there is provided a kernel upgrade and use method, adapted to be executed in a computing device, the computing device including an internal memory and running an operating system, the operating system including a first kernel and a driver, the method including the steps of: determining a configuration file according to the first kernel, and creating configuration information according to the configuration file to obtain a second kernel; setting a storage position of the configuration information in an internal memory; loading the second kernel into the internal memory according to the storage location; and calling the driver according to the second kernel, and realizing the target function according to the configuration information.
Optionally, in the method according to the present invention, allocating a storage location of the configuration information in the internal memory comprises the steps of: determining the relative position of the configuration information and the configuration file in the internal memory; the storage location is set in the internal memory according to the relative position.
Optionally, in the method according to the present invention, the relative position comprises the configuration information before the configuration file and the configuration information after the relative position.
Optionally, in the method according to the present invention, loading the configuration information into the internal memory according to the storage location includes the steps of: determining a distribution mode for distributing the memory in the internal storage; the configuration information is loaded into the internal memory according to the allocation and storage location.
Optionally, in the method according to the present invention, the allocation manner includes a general memory allocation, and loading the second kernel into the internal memory according to the storage location includes: and when the allocation mode is general memory allocation, calling a first allocation function, and allocating memory for the configuration file and the configuration information according to the storage position so as to load the second kernel.
Optionally, in the method according to the present invention, the allocation manner further includes dedicated memory allocation, and the method further includes the steps of: and when the allocation mode is the special memory allocation, calling a second allocation function, and allocating the memory according to the storage position as the configuration file and the configuration information so as to load the second kernel.
Optionally, in the method according to the present invention, calling the driver according to the second kernel includes: calculating a second check value according to the configuration file and the configuration information stored in the internal memory; comparing the second check value with the first check value when the first kernel is loaded; and if the second check value is the same as the first check value, loading the driving program.
Optionally, in the method according to the present invention, implementing the target function according to the configuration information includes: when the relative position is that the configuration information is in front of the configuration file, subtracting the storage size of the configuration file from the storage address of the configuration information in the internal memory to obtain a first storage address; and calling the configuration information according to the first storage address to realize the target function.
Optionally, in the method according to the present invention, further comprising the steps of: when the relative position is that the configuration information is behind the configuration file, adding the storage address of the configuration file and the storage size of the configuration file in the internal memory to obtain a second storage address;
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 kernel upgrade and use method according to the present invention.
According to a further 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 kernel upgrade and usage method according to the present invention.
The invention discloses a kernel upgrading and using method which is suitable for being executed in a computing device. The computing device comprises an internal memory and runs an operating system, the operating system comprises a first kernel and a driver, and the method comprises the following steps: determining a configuration file according to the first kernel, and creating configuration information according to the configuration file to obtain a second kernel; setting a storage position of the configuration information in an internal memory; loading the second kernel into the internal memory according to the storage location; and calling the driver according to the second kernel, and realizing the target function according to the configuration information. The configuration information is newly established outside the original configuration file of the first kernel, so that the data structure of the original configuration file is not changed. And further, the configuration information and the configuration file are simultaneously loaded into an internal memory, so that the target function is realized, and the driver can still be adapted and available.
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 illustrates a block diagram of a computing device 100, according to an exemplary embodiment of the invention;
FIG. 2 illustrates a flow diagram of a method 200 for kernel upgrade and use according to an exemplary embodiment of the present invention;
FIG. 3 shows a schematic diagram of upgrading a kernel in the prior art;
FIG. 4a illustrates a schematic diagram of setting configuration information before a configuration file according to an exemplary embodiment of the present invention;
FIG. 4b shows a schematic diagram of setting configuration information after a configuration file according to an exemplary embodiment of the invention;
FIG. 5 is a diagram illustrating memory allocation using a general memory allocation in accordance with an illustrative embodiment of the present invention;
FIG. 6 illustrates a diagram of memory allocated using a universal memory allocation in accordance with an exemplary embodiment of the present invention;
FIG. 7 is a diagram illustrating memory allocation using dedicated memory allocation in accordance with an illustrative embodiment of the present invention; and
FIG. 8 illustrates a diagram of memory allocated using dedicated memory allocation in accordance with 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 illustrates a block diagram of the physical components (i.e., hardware) of a computing device 100. In a basic configuration, computing device 100 includes at least one processing unit 102 and system memory 104. According to one aspect, depending on the configuration and type of computing device, system memory 104 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 104 includes an operating system 105. Operating system 105 includes second kernel 103. The second kernel 103 is upgraded by the first kernel according to the method 200.
According to one aspect, the operating system 105, for example, is adapted to control the operation of the computing device 100. Further, the 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. 1 by those components within dashed line 108. According to one aspect, the computing device 100 has additional features or functionality. For example, according to one aspect, computing device 100 includes additional data storage devices (removable and/or non-removable) such as, for example, magnetic disks, optical disks, or tape. Such additional storage is illustrated in FIG. 1 by removable storage device 109 and non-removable storage device 110.
As stated hereinabove, according to one aspect, program module 101 is stored in system memory 104. According to one aspect, the program modules may include one or more applications, the invention not being limited to the type of application, e.g., the application further includes: 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. 1 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 100 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 circuits or systems.
According to one aspect, computing device 100 may also have one or more input devices 112, such as a keyboard, mouse, pen, voice input device, touch input device, or the like. Output device(s) 114 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 100 may include one or more communication connections 116 that allow communication with other computing devices 118. Examples of suitable communication connections 116 include, but are not limited to: RF transmitter, receiver and/or transceiver circuitry; universal Serial Bus (USB), parallel, and/or serial ports.
According to another aspect, a driver 106 is loaded in the operating system 105. Operating system 105 may call input device 112 or output device 114 through driver 106.
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.
The kernel upgrade and usage methods of the present invention are suitable for execution in a computing device, such as computing device 100. Included in computing device 100 is internal memory, which may be embodied as system memory 104 in fig. 1. An operating system 105 runs in the computing device 100, and the operating system 105 includes a first kernel and a driver 106 before being upgraded. The operating system running in the computing device may be implemented as any operating system, and the invention is not limited to the specific type of operating system.
It should be noted that although the computing device described above shows only processing unit 102, system memory 104, input device 112, output device 114, and communication connection 116, in particular implementations, the device may include other components necessary to achieve 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. FIG. 2 illustrates a flow diagram of a kernel upgrade and use method 200 according to an exemplary embodiment of the invention. As shown in fig. 2, step S210 is first executed to determine a configuration file according to a first kernel, and create new configuration information according to the configuration file to obtain a second kernel.
The original kernel to be upgraded in the operating system is the first kernel. According to one embodiment of the invention, when the operating system is a linux system, the first kernel is a linux kernel.
FIG. 3 shows a schematic diagram of upgrading a kernel in the prior art. As shown in fig. 3, in the prior art, a new attribute is directly added to an original kernel data structure to implement a corresponding function, which may cause a structural body of a new kernel to change, and a check value of a kernel interface provided for a driver to change, which is different from a check value of a kernel interface to be called by the driver; the driver cannot adapt to the new kernel and cannot be called according to the new kernel.
In the invention, the configuration information is newly established besides the configuration file with new functions, so that the original data structure of the configuration file is not damaged. The configuration file is a kernel file to be modified when the target function is added. The configuration information is the attribute information of the load target function, and the target function is the function to be expanded according to the original configuration file. And the second kernel obtained after the configuration information is newly built according to the configuration file comprises the configuration file and the configuration information. The second kernel can realize the functions realized by the original first kernel according to the original configuration file and can realize new target functions according to the configuration information.
According to the embodiment of the invention, the configuration file can be realized as the kernel header file, and the expansion attribute based on the configuration information can be realized by constructing the additional configuration information of the kernel header file, so that the expansion function or the optimized performance can be realized. After the kernel header file is modified, the expanded target function can be realized based on the action of the kernel header file.
Subsequently, step S220 is executed to set a storage location of the configuration information in the internal memory; specifically, the method comprises the following steps: and determining the relative position of the configuration information and the configuration file in the internal memory, and setting a storage position in the internal memory according to the relative position.
In order to change the kernel data structure of the second kernel, the size of the configuration file is therefore preserved, as well as the relative location of storage in the internal memory. According to one embodiment of the invention, to facilitate access to the added configuration information, the relative location includes the configuration information before the configuration file and the configuration information after the relative location.
When a storage position is set in the internal memory according to the relative position, if the relative position is determined to be before the configuration file, the storage position of the configuration information is set before the configuration file; if the relative position is determined to be behind the configuration file, the storage position of the configuration information is set behind the configuration file.
Fig. 4a illustrates a schematic diagram of setting configuration information before a configuration file according to an exemplary embodiment of the present invention. Fig. 4b shows a schematic diagram of setting configuration information after a configuration file according to an exemplary embodiment of the present invention. As shown in fig. 4a, if the relative position of the configuration information is before the configuration file, the storage location of the configuration information is set before the storage location of the configuration file; as shown in fig. 4b, the relative position of the configuration information is after the configuration file, and then the storage location of the configuration information is set after the storage location of the configuration file.
Subsequently, step S230 is executed to load the second kernel into the internal memory according to the storage location. Specifically, the method comprises the following steps: firstly, determining a distribution mode for distributing memory in internal storage; and loading the configuration information into the internal memory according to the distribution mode and the storage position.
According to one embodiment of the present invention, the allocation modes include a general memory allocation and a dedicated memory allocation, and the two allocation modes include different allocation functions.
According to one embodiment of the invention, a slab memory allocator is used in the internal memory for memory allocation. In order to further reduce memory waste, the slab memory allocator divides the memory into a general cache and a memory cache. When the memory is allocated by using the universal cache, the universal allocation is carried out; when the memory is allocated by using the special cache, the special allocation is carried out.
The object can be distributed from the general cache by calling the first distribution function to transfer the byte number of the needed memory. The first allocation function comprises a kmmalloc function.
Using the private cache may then call a second allocation function to allocate the object from the private cache in the number of bytes of memory needed. The second allocation function includes an incoming object size function and an allocated object memory function. The incoming object size function comprises a kmem _ cache _ create function and a kmem _ cache _ create _ usercopy function, is used for the size of an incoming created object, and is used for creating a dedicated memory (kmem _ cache). The allocated object memory function comprises functions of kmem _ cache _ zalloc, kmem _ cache _ alloc _ node, kmem _ cache _ alloc and the like, and is used for calling when the object is needed to be used, and allocating memory in an internal memory.
When the second kernel is loaded into the internal memory according to the storage position, calling a first distribution function when the distribution mode is general memory distribution, and distributing the memory for the configuration file and the configuration information according to the storage position to load the second kernel; and when the allocation mode is the special memory allocation, calling a second allocation function, and allocating the memory for the configuration file and the configuration information according to the storage position so as to load the second kernel.
According to an embodiment of the present invention, the configuration file is an iomap _ page, including:
atomic_t read_count
atomic_t write_count
DECLARE_BITMAP(uptodate,PAGE_SIZE/512);
the configuration information is pre _ iomap _ page. Where pre indicates that the configuration information is stored before the configuration file. FIG. 5 is a diagram illustrating memory allocation using a general memory allocation, according to an exemplary embodiment of the invention. As shown in fig. 5, the iomap _ page _ create function is called first. The iomap _ page _ create function is a memory allocation function of the iomap _ page general cache, and calls a kmalleloc function allocation object. And adding a memory (sizeof (struct uos _ pre _ iomap _ page)) of a data structure of the newly added configuration information when the object is allocated.
FIG. 6 is a diagram illustrating memory allocated using a general memory allocation, according to an example embodiment of the present invention. As shown in fig. 6, in the internal memory, the storage space of the configuration file iomap _ page and the configuration information pre _ iomap _ page is an object allocated by the kmalleloc function, where the configuration information pre _ iomap _ page is stored before the configuration file iomap _ page.
According to another embodiment of the present invention, the configuration file is a buffer _ head, including:
unsigned long b_state
struct buffer_head*b_this_page structpage*b_page
sector_t b_blocknr
size_t b_size
char*b_data
struct block_device*b_bdev bh_end_io_t*b_end_io
void*b_private
struct list_head b_assoc_buffers struct address_space
*b_assoc_map
atomic_t b_count
the configuration information is post _ buffer _ head. Wherein post indicates that the configuration information is stored after the configuration file. FIG. 7 is a diagram illustrating memory allocation using dedicated memory allocation according to an exemplary embodiment of the invention. As shown in FIG. 7, the kernel calls the buffer _ init function upon initialization. When the buffer _ init function is called, the incoming object size function kmem _ cache _ create is called to create a dedicated memory kmem _ cache of the buffer _ head data structure. When the incoming object size function kmem _ cache _ create is called, the memory size of the newly-built configuration information post _ buffer _ head is added when the memory size of the configuration file buffer _ head is large. The total size (bh _ cachep- > size) returned at this time is equal to the sum of the configuration file buffer _ head and the memory size of the configuration information post _ buffer _ head.
And then calling an allocation object memory function kmem _ cache _ zalloc to allocate the memory object in the internal memory.
FIG. 8 illustrates a diagram of memory allocated using dedicated memory allocation in accordance with an exemplary embodiment of the present invention. As shown in fig. 8, in the internal memory, the storage spaces of the configuration file buffer _ head and the configuration information post _ buffer _ head are objects allocated by the second allocation function, where the configuration file buffer _ head is stored before the configuration information post _ buffer _ head.
Subsequently, step S340 is executed, the driver is called according to the second kernel, and the target function is realized according to the configuration information. According to an embodiment of the present invention, when the driver is called according to the second kernel, a second check value is calculated according to the configuration file and the configuration information stored in the internal memory, the second check value is compared with the first check value when the first kernel is loaded, and the driver is loaded if the second check value is the same as the first check value.
According to one embodiment of the invention, the second check value is calculated by calculating a CRC value of a derived symbol of the kernel interface provided by the second kernel to the driver. The second check value is compared with a CRC value (i.e., the first check value) of the derived symbol of the core interface provided to the driver when the first core is loaded. When the configuration information is constructed by adopting the method and the device, when the second kernel is upgraded, the data structure of the configuration file in the first kernel is not changed, so that the second check value is the same as the first check value, and the driver can be normally loaded.
Then, the implementation of the target function according to the configuration information includes the steps of: and when the relative position is that the configuration information is in front of the configuration file, subtracting the storage size of the configuration file from the storage size of the configuration information in the internal memory to obtain a first storage address, and calling the configuration information according to the first storage address to realize the target function.
According to an embodiment of the present invention, when the configuration information shown in fig. 6 is called, the first storage address of the configuration information pre _ iomap _ page is obtained by subtracting the storage size of the configuration information pre _ iomap _ page from the storage address of the configuration file iomap _ page, that is, the configuration information pre _ iomap _ page can be called.
And when the relative position is that the configuration information is behind the configuration file, adding the storage address of the configuration file and the storage size of the configuration file in the internal memory to obtain a second storage address, and calling the configuration information according to the second storage address to realize the target function.
The invention discloses a kernel upgrading and using method which is suitable for being executed in a computing device. The computing device comprises an internal memory and runs an operating system, the operating system comprises a first kernel and a driver, and the method comprises the following steps: determining a configuration file according to the first kernel, and creating configuration information according to the configuration file to obtain a second kernel; setting a storage position of the configuration information in an internal memory; loading the second kernel into the internal memory according to the storage location; and calling the driver according to the second kernel, and realizing the target function according to the configuration information. The configuration information is newly established outside the original configuration file of the first kernel, so that the data structure of the original configuration file is not changed. And further, the configuration information and the configuration file are simultaneously loaded into an internal memory, so that the target function is realized, and the driver can still be adapted and available.
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 device in an embodiment may be adaptively changed and disposed 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 an alternative feature 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 perform the kernel upgrade and utilization 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 kernel upgrade and use method, adapted to be executed in a computing device including an internal memory and running an operating system, the operating system including a first kernel and a driver, the method comprising the steps of:
determining a configuration file according to the first kernel, and creating configuration information according to the configuration file to obtain a second kernel;
setting a storage location of the configuration information in an internal memory;
loading a second kernel into an internal memory according to the storage location;
and calling the driver according to the second kernel, and realizing a target function according to the configuration information.
2. The method of claim 1, wherein the allocating storage locations of the configuration information in the internal memory comprises:
determining a relative location of the configuration information and the configuration file in the internal memory;
setting the storage location in the internal memory according to the relative position.
3. The method of claim 2, wherein the relative location comprises the configuration information preceding the configuration file and the configuration information following the relative location.
4. The method according to any of claims 1-3, wherein said loading configuration information into internal memory according to said storage location comprises the steps of:
determining a distribution mode of memory distribution in the internal storage;
and loading the configuration information into an internal memory according to the distribution mode and the storage position.
5. The method of claim 4, wherein the allocation comprises a general memory allocation, and the loading the second kernel into the internal memory according to the storage location comprises:
and when the allocation mode is general memory allocation, calling a first allocation function, and allocating memory for the configuration file and the configuration information according to the storage position so as to load the second kernel.
6. The method of claim 5, wherein the allocation further comprises a dedicated memory allocation, the method further comprising:
and when the allocation mode is the special memory allocation, calling a second allocation function, and allocating the memory for the configuration file and the configuration information according to the storage position so as to load the second kernel.
7. The method of any of claims 1-6, wherein said calling said driver according to said second kernel comprises the steps of:
calculating a second check value according to the configuration file and the configuration information stored in the internal memory;
comparing the second check value with the first check value when the first kernel is loaded;
and if the second check value is the same as the first check value, loading the driving program.
8. The method according to any of claims 3-7, wherein said implementing a target function according to said configuration information comprises the steps of:
when the relative position is that the configuration information is in front of the configuration file, subtracting the storage size of the configuration file from the storage size of the configuration information in the internal memory to obtain a first storage address;
and calling the configuration information according to the first storage address to realize a target function.
9. The method of claim 8, wherein the method further comprises the steps of:
when the relative position is that the configuration information is behind the configuration file, adding the storage address of the configuration file and the storage size of the configuration file in the internal memory to obtain a second storage address;
and calling the configuration information according to the second storage address to realize a target function.
10. A computing device, comprising:
one or more processors;
a memory; and
one or more apparatuses comprising 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.
CN202210398048.7A 2022-04-12 2022-04-12 Kernel upgrading and using method, computing device and storage medium Pending CN114879987A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210398048.7A CN114879987A (en) 2022-04-12 2022-04-12 Kernel upgrading and using method, computing device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210398048.7A CN114879987A (en) 2022-04-12 2022-04-12 Kernel upgrading and using method, computing device and storage medium

Publications (1)

Publication Number Publication Date
CN114879987A true CN114879987A (en) 2022-08-09

Family

ID=82670452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210398048.7A Pending CN114879987A (en) 2022-04-12 2022-04-12 Kernel upgrading and using method, computing device and storage medium

Country Status (1)

Country Link
CN (1) CN114879987A (en)

Similar Documents

Publication Publication Date Title
US10114740B2 (en) Memory management techniques
US7246195B2 (en) Data storage management for flash memory devices
CN113157290B (en) Multi-system installation method, computing equipment and storage medium
CN114880289A (en) File grouping display method and computing device
CN111797390B (en) Program running method, program running device, electronic equipment and computer readable storage medium
CN111857600B (en) Data reading and writing method and device
CN115421927B (en) Load balancing method, computing device and storage medium
CN114879987A (en) Kernel upgrading and using method, computing device and storage medium
CN113805971B (en) Application program running method, computing device and storage medium
CN107656702B (en) Method and system for accelerating hard disk read-write and electronic equipment
CN115712394A (en) Data reading and writing method and device, computer equipment and readable storage medium
CN115269199A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN115061954B (en) Missing page interrupt processing method, computing device and storage medium
TWI400665B (en) Method and apparatus for dynamic linking and loading of post-processing kernels and machine readable medium therefor
CN112148486A (en) Memory page management method, device and equipment and readable storage medium
CN114896179B (en) Memory page copying method and device, computing equipment and readable storage medium
CN115658324B (en) Process scheduling method, computing device and storage medium
US20170249093A1 (en) Storage method and distributed storage system
CN115657962A (en) Storage space management method, device, electronic equipment and medium
US20230350593A1 (en) Method, system, and circuit for deploying file system on embedded memory in programmable computing device
CN116225328A (en) Data storage method, device, computing equipment and readable storage medium
CN117891723A (en) Code checking method, computing device and storage medium
CN114706828A (en) File loading method, computing device and storage medium
CN115292060A (en) Page data communication method, computing equipment and storage medium
CN114780095A (en) Off-screen rendering method and device, printing method, computing device and 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