CN110018859B - Equipment starting method and device, computer equipment and storage medium - Google Patents

Equipment starting method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN110018859B
CN110018859B CN201910299071.9A CN201910299071A CN110018859B CN 110018859 B CN110018859 B CN 110018859B CN 201910299071 A CN201910299071 A CN 201910299071A CN 110018859 B CN110018859 B CN 110018859B
Authority
CN
China
Prior art keywords
file
kernel
virtual memory
memory
service logic
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.)
Active
Application number
CN201910299071.9A
Other languages
Chinese (zh)
Other versions
CN110018859A (en
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.)
Allwinner Technology Co Ltd
Original Assignee
Allwinner 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 Allwinner Technology Co Ltd filed Critical Allwinner Technology Co Ltd
Priority to CN201910299071.9A priority Critical patent/CN110018859B/en
Publication of CN110018859A publication Critical patent/CN110018859A/en
Application granted granted Critical
Publication of CN110018859B publication Critical patent/CN110018859B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

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

Abstract

The application provides a device starting method, a device, computer equipment and a storage medium, wherein the method comprises the following steps: calling a driving program to read the virtual memory file from the flash memory partition into a memory; the virtual memory file comprises a file irrelevant to service logic, the kernel is called to obtain the address of the virtual memory file in the memory, the kernel is called to obtain the virtual memory file from the memory according to the address, and then the kernel is called to load resources according to the virtual memory file, the service logic file and the configuration file so as to start the device.

Description

Equipment starting method and device, computer equipment and storage medium
Technical Field
The present application relates to the technical field of computer operating systems, and in particular, to a device booting method, apparatus, computer device, and storage medium.
Background
With the increasingly wide application of the Linux operating system in motion DV, automobile data recorder, smart phone and other terminal devices, the requirement on the execution speed of the Linux operating system is also higher, and how to reduce the cold start time of the device becomes a problem that people pay more and more attention to.
The traditional quick cold start scheme is realized by adopting a dual-core and dual-system mode, specifically, one core is used for running a real-time operating system and loading a module related to minimum business logic, and the other core runs a Linux operating system to realize services such as WIFI, UI, USB and network related App.
However, the above fast cold start scheme of dual core plus dual system has a problem of high development complexity due to more required resources.
Disclosure of Invention
In view of the above, it is necessary to provide a device booting method, apparatus, computer device and storage medium with less resource requirements and simple development.
In a first aspect, an embodiment of the present application provides an apparatus starting method, where the method includes:
calling a driving program to read the virtual memory file from the flash memory partition into a memory; the virtual memory file comprises a file irrelevant to business logic;
calling a kernel to obtain the address of the virtual memory file in the memory;
calling the kernel to acquire the virtual memory file from the memory according to the address;
and calling the kernel to load resources according to the virtual memory file, the service logic file and the configuration file so as to start the equipment.
In one embodiment, the invoking the kernel to load resources according to the virtual memory file, the service logic file, and the configuration file to start the device includes: controlling the kernel to merge the virtual memory file, the service logic file and the configuration file to obtain an integral root file; and controlling the kernel to load resources according to the whole root file so as to start the equipment.
In one embodiment, the controlling the kernel to merge the virtual memory file, the service logic file, and the configuration file to obtain an integral root file includes: controlling the kernel to start the virtual memory file so as to schedule a stack file system; and controlling the kernel to merge the virtual memory file, the service logic file and the configuration file according to the stacked file system to obtain an integral root file.
In one embodiment, before controlling the kernel to load resources according to the whole root file to start the device, the method further includes: and controlling the kernel to load a first template resource required by the service logic according to the virtual memory file.
In one embodiment, the controlling the kernel to load resources according to the whole root file to start the device includes: controlling the kernel to load a second template resource required by the business logic according to the integral root file; and controlling the kernel to start the equipment according to the first template resource and the second template resource.
In one embodiment, the first template resource required for controlling the kernel to load the service logic and the kernel are controlled to merge the virtual memory file, the service logic file and the configuration file according to the stacked file system and run in parallel.
In one embodiment, before the invoking the kernel to load resources according to the virtual memory file, the service logic file, and the configuration file to start the device, the method further includes: calling the kernel to read the service logic file and the configuration file from a flash memory partition into a memory; and calling the kernel to acquire the service logic file and the configuration file from the memory.
In a second aspect, an embodiment of the present application provides an apparatus for starting a device, where the apparatus includes:
the first calling module is used for calling the driver to read the virtual memory file from the flash memory partition into the memory; the virtual memory file comprises a file irrelevant to business logic;
the second calling module is used for calling a kernel to acquire the address of the virtual memory file in the memory;
the third calling module is used for calling the kernel to acquire the virtual memory file from the memory according to the address;
and the fourth calling module is used for calling the kernel to load resources according to the virtual memory file, the service logic file and the configuration file so as to start the equipment.
In a third aspect, an embodiment of the present application provides a computer device, including a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the method in any embodiment of the first aspect when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method described in any one of the embodiments in the first aspect.
According to the device starting method, the device, the computer device and the storage medium, the virtual memory file is read from the flash memory partition into the memory by calling the driver, the kernel is called to obtain the address of the virtual memory file in the memory, the kernel is called to obtain the virtual memory file from the memory according to the address, and then the kernel is called to load resources according to the virtual memory file, the service logic file and the configuration file so as to start the device.
Drawings
FIG. 1 is a diagram illustrating an internal structure of a computer device according to an embodiment;
FIG. 2 is a schematic flow chart diagram illustrating a method for device booting provided in one embodiment;
FIG. 3 is a schematic flow chart illustrating an implementation manner of S204 in the embodiment of FIG. 2;
FIG. 4 is a schematic flow chart illustrating another implementation manner of S301 in the embodiment of FIG. 3;
FIG. 5 is a flowchart illustrating an implementation manner of S302 in the embodiment of FIG. 3;
FIG. 6 is a schematic flow chart diagram illustrating a method for device booting provided in another embodiment;
FIG. 7 is a schematic flow chart diagram illustrating a method for device booting provided in another embodiment;
FIG. 8 is a block diagram showing the construction of an apparatus startup device according to an embodiment;
FIG. 9 is a block diagram showing the construction of an apparatus starting apparatus according to another embodiment;
fig. 10 is a block diagram showing the construction of a device activating apparatus according to another embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The device starting method provided by the embodiment of the application can be applied to terminal devices, which can be motion DVs, automobile data recorders and the like, in the embodiment, the motion DVs are taken as an example, and the internal structure diagram of the motion DVs can be shown in fig. 1. The motion DV comprises an embedded processor, a display screen, a lens module and a communication module which are connected through a system bus. Wherein, the lens module of the motion DV comprises a lens combination for shooting, a photosensitive component, a transmission interface and the like; the embedded processor is used for providing calculation and control capability, and the memory can be integrated in the embedded processor and comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The computer program when executed by a processor to implement a device booting method; the communication module is a communication interface which can transmit signals in a wireless or wired mode, the transmission mode of wireless communication can be WI-FI, Bluetooth, infrared rays and the like, and the transmission mode of wired communication can be USB, HDMI and the like; the display screen of the motion DV may be a liquid crystal display screen or a touch screen.
Those skilled in the art will appreciate that the architecture shown in fig. 1 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
The technical solution of the present invention will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 2 is a flowchart of a device startup method in an embodiment, where an execution subject of the method is the motion DV shown in fig. 1, and the method relates to a specific process of device startup, and as shown in fig. 2, the method specifically includes the following steps:
s201, calling a driving program to read the virtual memory file from the flash memory partition into a memory; the virtual memory file comprises a file unrelated to business logic.
The Ramdisk file can be in a compressed file package form and comprises all configuration, executable files and dependent libraries related to the Busybox, wherein the BusyBox is software integrating a plurality of most common Linux commands and tools, and the Ramdisk file is a file which cannot be written in the whole process because the Ramdisk exists in a memory and cannot be stored after power failure, if necessary service logic is stored in the memory, information power failure loss can be caused, and the file system format of the Ramdisk file is squarsfs and is read-only; the Flash memory partition refers to a Flash storage medium, and the driver can be a bootloader.
Specifically, as the kernel runs on the memory, when the device is started, the driver is called to read the virtual memory file from the flash memory partition into the memory so as to call the subsequent running work of the kernel. It should be noted that, in a general case, the Ramdisk is released after the root file system is completely started, and in the present application, the Ramdisk is used as an indispensable part of the final whole root file system, and must exist and be used in the life cycle of the whole service logic until the device is shut down, that is, the service logic is destroyed.
S202, calling a kernel to acquire the address of the virtual memory file in the memory.
The kernel is used as a management center of the equipment and is used for overall management, allocation and coordination of resources. Specifically, after reading the virtual memory file from the flash partition into the memory, the driver generates instruction information, where the instruction information includes an address of the virtual memory file in the memory, and then obtains an address of Ramdisk by using an initrd ═ Addr _ start, a Size init ═ dev/ram0 in the cmdline of the kernel; the initrd address can also be transmitted by using the device tree, and then the kernel acquires the address of the virtual memory file in the memory.
S203, calling the kernel to acquire the virtual memory file from the memory according to the address.
Illustratively, the kernel takes over the Ramdisk according to the address of the Ramdisk in the memory, and because the Ramdisk is in the form of a compressed file packet, a process of acquiring the Ramdisk, that is, a process of decompressing the Ramdisk.
And S204, calling the kernel to load resources according to the virtual memory file, the service logic file and the configuration file so as to start the equipment.
The service logic file refers to an executable file, a dependent library, a configuration file and the like related to the service logic main application; the configuration file refers to a file which can be read and written; the virtual memory file, the service logic file and the configuration file are pre-configured and stored in the device flash. Specifically, the kernel can be controlled to correspondingly read the service logic file and the configuration file from the flash partition to the memory, and then the kernel is called to load resources according to the virtual memory file, the service logic file and the configuration file, so that the equipment is started.
In the above embodiment, the driver is called to read the virtual memory file from the flash partition into the memory, the kernel is called to obtain the address of the virtual memory file in the memory, the kernel is called to obtain the virtual memory file from the memory according to the address, and then the kernel is called to load resources according to the virtual memory file, the service logic file and the configuration file so as to start the device.
As an optional implementation manner, as shown in fig. 3, the invoking the kernel to load resources according to the virtual memory file, the service logic file, and the configuration file to start the device in S204 ″, includes:
s301, controlling the kernel to merge the virtual memory file, the service logic file and the configuration file to obtain an integral root file.
The virtual memory file, the service logic file and the configuration file can be merged through a specific merging file system. Optionally, the S301 "controlling the kernel to merge the virtual memory file, the service logic file, and the configuration file to obtain an integral root file" includes:
s401, controlling the kernel to start the virtual memory file so as to schedule a stack file system.
The stacked file system refers to an Overlay file system, and means that one file system is overlaid on another file system to realize the merging of multiple file systems. The process of decompressing the virtual memory file compression packet can be understood as the process of controlling the kernel to start the virtual memory file, specifically, the kernel is controlled to decompress the virtual memory file to obtain an operation command of the Busybox, and then the kernel is controlled to schedule the Overlay file system according to the Busybox operation command.
S402, controlling the kernel to merge the virtual memory file, the service logic file and the configuration file according to the stacked file system to obtain an integral root file.
The purpose of the Overlay file system merging files is to enable the virtual memory file, the service logic file and the configuration file to have a uniform operation interface, and in the starting process, a user can switch to the whole root file environment without perception. In the above embodiment, the aim of quickly starting the device is achieved by combining the Ramdisk and the service logic file which really stores the related function of the service logic by using the Overlay file system, and finally combining the Ramdisk and the service logic file into an integral root file system.
S302, controlling the kernel to load resources according to the whole root file so as to start the equipment.
One part of the resources required by the loading service logic is related to the whole root file, the other part of the resources is unrelated to the whole root file, and the equipment can be started only after the resources required by the service logic are completely loaded. Specifically, the control kernel loads resources related to the whole root file according to the whole root file to start the device.
In the above embodiment, the control kernel merges the virtual memory file, the service logic file and the configuration file to obtain the whole root file, and loads resources according to the whole root file to start the device.
In one embodiment, before controlling the kernel to load resources according to the whole root file to start the device, the method further includes: and controlling the kernel to load a first template resource required by the service logic according to the virtual memory file.
And storing the resources irrelevant to the whole root file in the virtual memory file, wherein the resources irrelevant to the whole root file can be loaded after the virtual memory file is started, namely Ramdisk is decompressed. Optionally, the control kernel loads a first template resource required by the service logic and operates in parallel with the control kernel according to the stacked file system merged virtual memory file, the service logic file and the configuration file.
Specifically, the control kernel loads a first template resource required by the service logic, merges the virtual memory file, the service logic file and the configuration file according to the stacked file system, and obtains the service logic file and the configuration file, which can be processed in parallel.
In the above embodiment, the virtual memory file, the service logic file and the configuration file are merged and run in parallel by controlling the kernel to load the first template resource required by the service logic and controlling the kernel according to the stacked file system, so that the device start time is reduced in the multi-core environment application.
In one embodiment, the S302 "controlling the kernel to load resources according to the whole root file to start the device" includes:
s501, controlling the kernel to load a second template resource required by the business logic according to the whole root file.
Specifically, since a portion of the resources required to load the business logic are associated with the entire root file, the control kernel loads a second template resource associated with the root file system.
S502, controlling the kernel to start the equipment according to the first template resource and the second template resource.
The resources required by the loaded business logic are related to the whole root file and are second template resources, the resources not related to the whole root file are first template resources, and when the resources required by the business logic are completely loaded, the equipment can be started.
In one embodiment, before the invoking the kernel to load resources according to the virtual memory file, the service logic file, and the configuration file to start the device, the method further includes:
s601, calling the kernel to read the service logic file and the configuration file from a flash memory partition into a memory.
The virtual memory file, the service logic file and the configuration file are located in different partitions of Flash, for example, the virtual memory file is located in a first partition of Flash, the service logic file is located in a second partition of Flash, and the configuration file is located in a third partition of Flash.
S602, calling the kernel to obtain the service logic file and the configuration file from the memory.
The service logic file and the configuration file can also be in the form of a compressed file packet, and the process of acquiring the service logic file and the configuration file from the memory by calling the kernel is the process of decompressing the service logic file and the configuration file.
In one embodiment, an overall implementation flow of device startup is provided, as shown in fig. 7, when a device is started, S701: calling a driver to read the virtual memory file from the Flash to the memory, and simultaneously reading the kernel file from the Flash to the memory; s702: calling a kernel to acquire the address of the virtual memory file in the memory and starting a takeover; s703: invoking the kernel to start the first template resource, and can invoke the kernel to analyze the service logic and the configuration file in parallel, and invoke the kernel to execute the combination of the multi-file system in parallel; s704: analyzing the service logic file and the configuration file and combining a multi-file system; s705: calling the kernel to load a second template resource; s706: and after all the template resources (the first template resource and the second template resource) required by the service logic are loaded, starting the service logic, namely realizing the starting of the equipment.
It should be understood that although the various steps in the flow charts of fig. 2-7 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-7 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 8, there is provided an apparatus starting apparatus including: a first calling module 11, a second calling module 12, a third calling module 13 and a fourth calling module 14, wherein:
the first calling module 11 is configured to call a driver to read the virtual memory file from the flash partition into the memory; the virtual memory file comprises a file irrelevant to business logic;
a second calling module 12, configured to call a kernel to obtain an address of the virtual memory file in the memory;
a third calling module 13, configured to call the kernel to obtain the virtual memory file from the memory according to the address;
and a fourth calling module 14, configured to call the kernel to load resources according to the virtual memory file, the service logic file, and the configuration file, so as to start the device.
In one embodiment, as shown in fig. 9, on the basis of fig. 8, the fourth calling module 14 includes:
a first control unit 140, configured to control the kernel to merge the virtual memory file, the service logic file, and the configuration file to obtain an integral root file;
and a second control unit 141, configured to control the kernel to load resources according to the whole root file, so as to start a device.
In one embodiment, the first control unit 140 is specifically configured to control the kernel to start the virtual memory file, so as to schedule a stack file system; and controlling the kernel to merge the virtual memory file, the service logic file and the configuration file according to the stacked file system to obtain an integral root file.
In one embodiment, the fourth calling module further includes: and the third control unit is used for controlling the kernel to load the first template resource required by the service logic according to the virtual memory file.
In one embodiment, the second control unit 141 is specifically configured to control the kernel to load a second template resource required by the service logic according to the integral root file; and controlling the kernel to start the equipment according to the first template resource and the second template resource.
In one embodiment, the first template resource required for controlling the kernel to load the service logic and the kernel are controlled to merge the virtual memory file, the service logic file and the configuration file according to the stacked file system and run in parallel.
In one embodiment, as shown in fig. 10, on the basis of fig. 9, the apparatus further includes a fifth calling module 15 and a sixth calling module 16, where:
a fifth calling module 15, configured to call the kernel to read the service logic file and the configuration file from the flash partition into the memory;
a sixth calling module 16, configured to call the kernel to obtain the service logic file and the configuration file from the memory.
For the specific definition of the device activation apparatus, reference may be made to the above definition of the device activation method, which is not described herein again. The modules in the device starting apparatus can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
calling a driving program to read the virtual memory file from the flash memory partition into a memory; the virtual memory file comprises a file irrelevant to business logic;
calling a kernel to obtain the address of the virtual memory file in the memory;
calling the kernel to acquire the virtual memory file from the memory according to the address;
and calling the kernel to load resources according to the virtual memory file, the service logic file and the configuration file so as to start the equipment.
In one embodiment, the processor, when executing the computer program, further performs the steps of: controlling the kernel to merge the virtual memory file, the service logic file and the configuration file to obtain an integral root file; and controlling the kernel to load resources according to the whole root file so as to start the equipment.
In one embodiment, the processor, when executing the computer program, further performs the steps of: controlling the kernel to start the virtual memory file so as to schedule a stack file system; and controlling the kernel to merge the virtual memory file, the service logic file and the configuration file according to the stacked file system to obtain an integral root file.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and controlling the kernel to load a first template resource required by the service logic according to the virtual memory file.
In one embodiment, the processor, when executing the computer program, further performs the steps of: controlling the kernel to load a second template resource required by the business logic according to the integral root file; and controlling the kernel to start the equipment according to the first template resource and the second template resource.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and the first template resource for controlling the kernel to load the service logic and the kernel to merge the virtual memory file, the service logic file and the configuration file according to the stacked file system to run in parallel.
In one embodiment, the processor, when executing the computer program, further performs the steps of: calling the kernel to read the service logic file and the configuration file from a flash memory partition into a memory; and calling the kernel to acquire the service logic file and the configuration file from the memory.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
calling a driving program to read the virtual memory file from the flash memory partition into a memory; the virtual memory file comprises a file irrelevant to business logic;
calling a kernel to obtain the address of the virtual memory file in the memory;
calling the kernel to acquire the virtual memory file from the memory according to the address;
and calling the kernel to load resources according to the virtual memory file, the service logic file and the configuration file so as to start the equipment.
In one embodiment, the computer program when executed by the processor further performs the steps of: controlling the kernel to merge the virtual memory file, the service logic file and the configuration file to obtain an integral root file; and controlling the kernel to load resources according to the whole root file so as to start the equipment.
In one embodiment, the computer program when executed by the processor further performs the steps of: controlling the kernel to start the virtual memory file so as to schedule a stack file system; and controlling the kernel to merge the virtual memory file, the service logic file and the configuration file according to the stacked file system to obtain an integral root file.
In one embodiment, the computer program when executed by the processor further performs the steps of: and controlling the kernel to load a first template resource required by the service logic according to the virtual memory file.
In one embodiment, the computer program when executed by the processor further performs the steps of: controlling the kernel to load a second template resource required by the business logic according to the integral root file; and controlling the kernel to start the equipment according to the first template resource and the second template resource.
In one embodiment, the computer program when executed by the processor further performs the steps of: and the first template resource for controlling the kernel to load the service logic and the kernel to merge the virtual memory file, the service logic file and the configuration file according to the stacked file system to run in parallel.
In one embodiment, the computer program when executed by the processor further performs the steps of: calling the kernel to read the service logic file and the configuration file from a flash memory partition into a memory; and calling the kernel to acquire the service logic file and the configuration file from the memory.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (9)

1. A device boot method, the method comprising:
calling a driving program to read the virtual memory file from the flash memory partition into a memory; the virtual memory file comprises a file irrelevant to business logic;
calling a kernel to obtain the address of the virtual memory file in the memory;
calling the kernel to acquire the virtual memory file from the memory according to the address;
calling the kernel to load resources according to the virtual memory file, the service logic file and the configuration file so as to start the equipment, wherein the service logic file comprises an executable file, a dependent library and a configuration file which are related to a service logic main application;
the invoking the kernel loads resources according to the virtual memory file, the service logic file and the configuration file to start the device includes:
controlling the kernel to merge the virtual memory file, the service logic file and the configuration file to obtain an integral root file;
and controlling the kernel to load resources according to the whole root file so as to start the equipment.
2. The method of claim 1, wherein the controlling the kernel to merge the virtual memory file, the service logic file, and the configuration file to obtain an integral root file comprises:
controlling the kernel to start the virtual memory file so as to schedule a stack file system;
and controlling the kernel to merge the virtual memory file, the service logic file and the configuration file according to the stacked file system to obtain an integral root file.
3. The method of claim 2, wherein before controlling the kernel to load resources according to the whole root file to boot the device, the method further comprises:
and controlling the kernel to load a first template resource required by the service logic according to the virtual memory file.
4. The method of claim 3, wherein the controlling the kernel to load resources according to the global root file to boot the device comprises:
controlling the kernel to load a second template resource required by the business logic according to the integral root file;
and controlling the kernel to start the equipment according to the first template resource and the second template resource.
5. The method according to claim 3, wherein the controlling the kernel to load the first template resource required by the service logic and the controlling the kernel to merge the virtual memory file, the service logic file, and the configuration file according to the stacked file system run in parallel.
6. The method according to any one of claims 1-2, wherein before invoking the kernel to load resources according to the virtual memory file, the service logic file, and the configuration file to start the device, the method further comprises:
calling the kernel to read the service logic file and the configuration file from a flash memory partition into a memory;
and calling the kernel to acquire the service logic file and the configuration file from the memory.
7. An apparatus for starting up a device, said apparatus comprising:
the first calling module is used for calling the driver to read the virtual memory file from the flash memory partition into the memory; the virtual memory file comprises a file irrelevant to business logic;
the second calling module is used for calling a kernel to acquire the address of the virtual memory file in the memory;
the third calling module is used for calling the kernel to acquire the virtual memory file from the memory according to the address;
a fourth calling module, configured to call the kernel to load resources according to the virtual memory file, the service logic file, and the configuration file, so as to start a device, where the service logic file includes an executable file, a dependent library, and a configuration file related to a service logic master application;
wherein the fourth calling module comprises:
the first control unit is used for controlling the kernel to merge the virtual memory file, the service logic file and the configuration file to obtain an integral root file;
and the second control unit is used for controlling the kernel to load resources according to the whole root file so as to start the equipment.
8. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN201910299071.9A 2019-04-15 2019-04-15 Equipment starting method and device, computer equipment and storage medium Active CN110018859B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910299071.9A CN110018859B (en) 2019-04-15 2019-04-15 Equipment starting method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910299071.9A CN110018859B (en) 2019-04-15 2019-04-15 Equipment starting method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110018859A CN110018859A (en) 2019-07-16
CN110018859B true CN110018859B (en) 2022-04-22

Family

ID=67191347

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910299071.9A Active CN110018859B (en) 2019-04-15 2019-04-15 Equipment starting method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110018859B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110221940A (en) * 2019-06-12 2019-09-10 湖南麒麟信安科技有限公司 Power loss recovery method, system and medium based on stacked documents system
CN110471734B (en) * 2019-08-19 2023-01-13 东软集团股份有限公司 Display control method and device
CN111125007B (en) * 2019-12-18 2023-06-20 鹏城实验室 Application packaging method, device and readable storage medium
CN113918228B (en) * 2021-09-15 2023-10-13 成都安恒信息技术有限公司 Memory file system starting method based on multi-CPU architecture
CN115878204B (en) * 2023-01-20 2023-07-04 北京国科环宇科技股份有限公司 Processing method and device of operating system, computer equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101625647A (en) * 2009-08-06 2010-01-13 青岛海信电器股份有限公司 Method for accelerating starting speed of embedded software system
CN102141923A (en) * 2010-09-28 2011-08-03 华为终端有限公司 Memory file system loading method and device
CN102591681A (en) * 2011-12-20 2012-07-18 华为技术有限公司 Computer equipment and starting method thereof
CN108287733A (en) * 2017-12-19 2018-07-17 广东睿江云计算股份有限公司 A kind of virtual machine load startup method
CN108614718A (en) * 2018-04-25 2018-10-02 紫光华山信息技术有限公司 The method, apparatus and realization device of start-up operation system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101625647A (en) * 2009-08-06 2010-01-13 青岛海信电器股份有限公司 Method for accelerating starting speed of embedded software system
CN102141923A (en) * 2010-09-28 2011-08-03 华为终端有限公司 Memory file system loading method and device
CN102591681A (en) * 2011-12-20 2012-07-18 华为技术有限公司 Computer equipment and starting method thereof
CN108287733A (en) * 2017-12-19 2018-07-17 广东睿江云计算股份有限公司 A kind of virtual machine load startup method
CN108614718A (en) * 2018-04-25 2018-10-02 紫光华山信息技术有限公司 The method, apparatus and realization device of start-up operation system

Also Published As

Publication number Publication date
CN110018859A (en) 2019-07-16

Similar Documents

Publication Publication Date Title
CN110018859B (en) Equipment starting method and device, computer equipment and storage medium
AU2014375830B2 (en) Data processing method for realizing multiple operating systems and terminal device
EP2998861B1 (en) Implementing and deleting method and device for intelligent terminal multi-operation system
CN110704177B (en) Computing task processing method and device, computer equipment and storage medium
CN108064377B (en) Management method and device for multi-system shared memory
KR101673299B1 (en) Operating system recovery method and apparatus, and terminal device
KR20120055352A (en) Apparatus and method for booting based on a snapshot image
CN105487869A (en) Vehicular double-system device and starting method thereof
CN111338779B (en) Resource allocation method, device, computer equipment and storage medium
CN114327137A (en) Touch method and device based on multiple vehicle-mounted operating systems and computer equipment
US20110066836A1 (en) Operating system booting method, computer, and computer program product
CN112162851A (en) dex pre-compiling method, device, computer equipment and storage medium
CN109298891B (en) System starting method and device, system compiling method and device
JP2002288104A (en) Computer system, and method and program for its resource assigning
WO2017202128A1 (en) Boot parameter delivery method and system for non-linux system software
CN112698987A (en) On-line backup method, device, equipment and storage medium for snapshot-free operating system
CN112328297A (en) Method and device for upgrading Android system running compatibly on Linux
CN103678214A (en) Method for redirecting system console and display equipment
EP4414836A1 (en) Container engine, container engine implementation methods, electronic device and storage medium
CN115828231A (en) Application program running method and device, vehicle and storage medium
CN116048600A (en) Applet function development method, device, computer equipment and storage medium
CN115617725A (en) Data transmission method, first terminal, second terminal and storage medium
CN109656720B (en) Address space allocation method and device
CN113986451A (en) Virtual machine migration method and device, electronic equipment and storage medium
CN112214213A (en) Linux kernel development and management method and device, computer equipment 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
GR01 Patent grant
GR01 Patent grant