CN108388451B - Mobile terminal starting method and device and mobile terminal - Google Patents

Mobile terminal starting method and device and mobile terminal Download PDF

Info

Publication number
CN108388451B
CN108388451B CN201810177446.XA CN201810177446A CN108388451B CN 108388451 B CN108388451 B CN 108388451B CN 201810177446 A CN201810177446 A CN 201810177446A CN 108388451 B CN108388451 B CN 108388451B
Authority
CN
China
Prior art keywords
mobile terminal
starting mode
mode
starting
equipment
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
CN201810177446.XA
Other languages
Chinese (zh)
Other versions
CN108388451A (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.)
SHENZHEN ZHIYING TECHNOLOGY Co.,Ltd.
Original Assignee
Shenzhen Zhiying 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 Shenzhen Zhiying Technology Co ltd filed Critical Shenzhen Zhiying Technology Co ltd
Priority to CN201810177446.XA priority Critical patent/CN108388451B/en
Publication of CN108388451A publication Critical patent/CN108388451A/en
Application granted granted Critical
Publication of CN108388451B publication Critical patent/CN108388451B/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/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken

Landscapes

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

Abstract

The invention provides a mobile terminal starting method and device and a mobile terminal, and relates to the technical field of mobile communication. The mobile terminal starting method comprises the following steps: when the mobile terminal is started to the bootstrap program, acquiring a starting mode of the mobile terminal; determining the hardware equipment needing to be loaded according to the acquired starting mode; and loading the determined driver of the hardware equipment to complete the starting process of the mobile terminal. According to the mobile terminal starting method, the mobile terminal starting device and the mobile terminal, the hardware equipment needing to be loaded is determined according to the starting mode of the mobile terminal, only the driver of the determined hardware equipment is loaded, and all hardware equipment corresponding to the normal starting mode of the mobile terminal does not need to be loaded during each starting, so that starting items are effectively reduced, the starting speed is accelerated, and meanwhile, the power consumption of the mobile terminal can be reduced.

Description

Mobile terminal starting method and device and mobile terminal
Technical Field
The present invention relates to the field of mobile communications technologies, and in particular, to a mobile terminal starting method, an apparatus, and a mobile terminal.
Background
In different scenarios, the operating system provides different boot modes to turn on the mobile terminal. Taking an Android system as an example, the startup modes mainly include a normal startup mode, a shutdown charging startup mode, a reset (recovery) startup mode, and the like. For example, pressing a power key to enter a normal start mode; when the mobile terminal is in a shutdown state, a charger is inserted, and a shutdown charging starting mode is entered; and simultaneously pressing a volume up-down key and a power key to enter a recovery starting mode. And under the recovery starting mode, the mobile terminal restores the factory settings.
For different starting modes, when a boot program loads kernel equipment, an existing operating system needs to load drivers of all hardware corresponding to the mobile terminal. After the driver is loaded, different software programs are started in the system layer according to different starting modes, and functions of different starting modes are realized. Because the existing scheme loads the drivers of all corresponding hardware normally started by the mobile terminal in different starting modes, the starting speed is low, and the power consumption is high.
Disclosure of Invention
In view of this, an object of the embodiments of the present invention is to provide a method and an apparatus for starting a mobile terminal, and a mobile terminal, so as to reduce starting items, accelerate a starting speed, and save electric energy.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical solutions:
in a first aspect, an embodiment of the present invention provides a method for starting a mobile terminal, including:
when a mobile terminal is started to a bootstrap program, acquiring a starting mode of the mobile terminal;
determining the hardware equipment needing to be loaded according to the acquired starting mode;
and loading the determined driver of the hardware equipment to finish the starting process of the mobile terminal.
In a preferred embodiment of the present invention, the mobile terminal is pre-configured with a device tree corresponding to the start mode; hardware equipment corresponding to the starting mode is defined in the equipment tree;
the step of determining the hardware device to be loaded according to the acquired start mode includes:
selecting an equipment tree corresponding to the acquired starting mode;
and determining the hardware equipment included in the selected equipment tree as the hardware equipment needing to be loaded at this time.
In a preferred embodiment of the present invention, the step of selecting the device tree corresponding to the obtained start mode includes:
sequentially searching whether the starting mode attribute value of each equipment tree is matched with the obtained starting mode;
if the attribute value of the starting mode of the current equipment tree is matched with the obtained starting mode;
and determining the current equipment tree as the equipment tree corresponding to the starting mode.
In a preferred embodiment of the present invention, the start mode includes: a normal start mode, a shutdown charge start mode or a reset start mode; the step of determining the hardware equipment needing to be loaded according to the acquired starting mode comprises the following steps:
if the acquired starting mode is a normal starting mode, determining that the hardware equipment needing to be loaded is the hardware equipment in a preset first appointed equipment group; if the acquired starting mode is a shutdown charging starting mode, determining that the hardware equipment needing to be loaded is the hardware equipment in a preset second specified equipment group; if the obtained starting mode is a reset starting mode, determining that the hardware equipment needing to be loaded is the hardware equipment in a preset third appointed equipment group;
wherein the second designated device group and the third designated device group are each a subset of the first designated device group.
In a preferred embodiment of the present invention, the step of obtaining the start mode of the mobile terminal includes:
when a restarting component of the mobile terminal is triggered or a power key is pressed down when the mobile terminal is in a shutdown state, determining that the starting mode of the mobile terminal is a normal starting mode;
when the mobile terminal is in a shutdown state and a voltage signal of a charging interface is monitored, determining that the starting mode of the mobile terminal is a shutdown charging starting mode;
and when the appointed key of the mobile terminal is pressed down or a reset mark exists in the appointed subarea of the mobile terminal, determining that the starting mode of the mobile terminal is a reset starting mode.
In a preferred embodiment of the present invention, the mobile terminal includes a plurality of CPUs, and at least one CPU is corresponding to each of the start modes in advance; after the step of obtaining the starting mode of the mobile terminal, the method further includes:
searching the CPU corresponding to the obtained starting mode;
and starting the searched CPU.
In a preferred embodiment of the present invention, after the step of obtaining the start-up mode of the mobile terminal, the method further includes:
and setting the working frequency of the CPU according to the acquired starting mode.
In a second aspect, an embodiment of the present invention provides a mobile terminal activation apparatus, including:
the starting mode acquisition module is used for acquiring the starting mode of the mobile terminal when the mobile terminal is started to a bootstrap program;
the driver loading module is used for determining the hardware equipment needing to be loaded according to the acquired starting mode; and loading the determined driver of the hardware equipment to finish the starting process of the mobile terminal.
In a third aspect, an embodiment of the present invention provides a mobile terminal. In one possible design, the mobile terminal may be configured to include a processor and a memory, the memory being configured to store a program that enables the processor to perform the above-described method, the processor being configured to execute the program stored in the memory.
In a fourth aspect, an embodiment of the present invention provides a machine-readable storage medium, which is used for storing computer software instructions for the mobile terminal starting apparatus.
Compared with the prior art, the mobile terminal starting method, the mobile terminal starting device and the mobile terminal provided by the embodiment of the invention determine the hardware equipment needing to be loaded according to the starting mode of the mobile terminal, only load the driver of the determined hardware equipment, and do not need to load all hardware equipment corresponding to the normal starting mode of the mobile terminal when the mobile terminal is started every time, so that the starting items are effectively reduced, the starting speed is accelerated, and meanwhile, the power consumption of the mobile terminal can be reduced.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a flowchart of a first method for starting a mobile terminal according to an embodiment of the present invention;
fig. 2 is a flowchart of a second method for starting a mobile terminal according to an embodiment of the present invention;
fig. 3 is a flowchart of a third method for starting a mobile terminal according to an embodiment of the present invention;
fig. 4 is a flowchart of a fourth method for starting a mobile terminal according to an embodiment of the present invention;
fig. 5 is a flowchart of a fifth method for starting a mobile terminal according to an embodiment of the present invention;
fig. 6 is a block diagram of a first mobile terminal activation apparatus according to an embodiment of the present invention;
fig. 7 is a block diagram of a second mobile terminal activation apparatus according to an embodiment of the present invention;
fig. 8 is a block diagram of a mobile terminal according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
Aiming at the problems that the conventional mobile terminal is slow in starting speed and high in power consumption because the driver programs of all corresponding hardware of the mobile terminal are loaded normally under different starting modes, the embodiment of the invention provides a mobile terminal starting method, a device and a mobile terminal.
The mobile terminal includes, but is not limited to, a mobile phone, a tablet computer, a sales terminal, a vehicle-mounted computer, an intelligent wearable device, and the like.
The embodiment of the invention is described in detail below by taking an Android system as an example. In the Android system, the start mode of the mobile terminal includes a normal start mode, a shutdown charging start mode, a reset (recovery) start mode, and the like. It is understood that the techniques provided by the embodiments of the present invention may also be applied to other operating systems, such as a Linux system. In other operating systems, the number of mobile terminal boot modes may be greater or lesser, or different names may be used, and are within the scope of the present invention.
Fig. 1 shows a flowchart of a first method for starting a mobile terminal according to an embodiment of the present invention. As shown in fig. 1, the method is applied to a mobile terminal, and includes the following steps:
step S102, when the mobile terminal is started to the bootstrap program, the starting mode of the mobile terminal is obtained.
Generally, the mobile terminal is in different scenes, and the starting mode may be different. For example, in a power-off charging scenario, the start mode is a power-off charging start mode, and at this time, only the charging progress is usually displayed. Or, in a power-on scene, the mobile terminal belongs to a normal start mode, and each function of the mobile terminal is usually started in the normal start mode. In addition, there may be a reset start mode in a maintenance scenario, in which various parameters and systems of the mobile terminal are usually returned to a factory setting state.
And step S104, determining the hardware equipment needing to be loaded according to the acquired starting mode.
Because different starting modes have different requirements on hardware devices, for example, in a normal starting mode, all related hardware devices of the mobile terminal need to be started, so as to ensure that the mobile terminal works normally after being started. In the shutdown charging start mode, only the key device, the display device and the charging device may be started without starting all related hardware devices of the mobile terminal. In the reset activation mode, only the key device and the display device may be activated. Therefore, the hardware device to be loaded can be determined according to the acquired boot mode.
And step S106, loading the determined driver of the hardware equipment to complete the starting process of the mobile terminal.
Each hardware device of the mobile terminal corresponds to a driver, and after the drivers of the hardware devices are loaded, the corresponding hardware devices work normally. The drivers for the hardware devices may be stored in a memory of the mobile terminal, such as by creating a driver pool in the memory for storing drivers for each hardware device.
And according to the determined hardware equipment needing to be loaded, searching a driving program corresponding to the determined hardware equipment from a plurality of driving programs stored in the mobile terminal, and loading the searched driving program to finish the starting process of the mobile terminal.
According to the starting method of the mobile terminal, the hardware equipment needing to be loaded is determined according to the starting mode of the mobile terminal, only the driver of the determined hardware equipment is loaded, and all hardware equipment corresponding to the normal starting mode of the mobile terminal does not need to be loaded during each starting, so that starting items are effectively reduced, the starting speed is accelerated, and meanwhile, electric energy can be saved.
Fig. 2 is a flowchart illustrating a second method for starting a mobile terminal according to an embodiment of the present invention, where as shown in fig. 2, the method includes the following steps:
step S202, when the mobile terminal is started to the bootstrap program, the starting mode of the mobile terminal is obtained.
The starting mode may be any one of a normal starting mode, a shutdown charging starting mode and a reset starting mode, or may be other starting modes. For example, pressing a power key of the mobile terminal or touching a restart component to enter a normal start mode; when the mobile terminal is in a shutdown state, a charger is inserted, and a shutdown charging starting mode is entered; and simultaneously pressing a volume up key, a volume down key and a power key of the mobile terminal to enter a reset starting mode. And under the reset starting mode, the mobile terminal restores the factory settings.
In the starting process of the mobile terminal, when a bootstrap program (Bootloader) is started, the starting mode of the mobile terminal is obtained. When it is monitored that a restart component of the mobile terminal is touched or a power key is pressed when the mobile terminal is in a power-off state, the starting mode of the mobile terminal is determined to be a normal starting mode. When the mobile terminal is in a shutdown state and a voltage signal of a charging interface (USB interface) is monitored, determining that the starting mode of the mobile terminal is a shutdown charging starting mode. And when it is monitored that the appointed key of the mobile terminal is pressed down or a reset mark exists in the appointed subarea of the mobile terminal, determining that the starting mode of the mobile terminal is a reset starting mode. The designated keys may include a volume up key, a volume down key and a power key, that is, when the volume up key, the volume down key and the power key are pressed simultaneously, the start mode of the mobile terminal is determined to be a reset start mode. The designated partition can be a misc partition, the misc partition is a partition in an Android system and is mainly used for storing reset guide information, and a boot-recovery field in the misc partition is used for storing a reset identifier. The above description is only illustrative of the designated key and the designated partition, and should not be construed as limiting the scope of the present invention.
Step S204, selecting the equipment tree corresponding to the acquired starting mode.
The device tree is a tree data structure stored in the mobile terminal, and is used for describing hardware device information of the mobile terminal, or named nodes and attributes of the hardware devices, including information such as names and models of the hardware devices. In the starting process of the mobile terminal, the corresponding driver can be loaded according to the hardware device included in the device tree. For example, the Android system uses a device tree to support various hardware devices used by the mobile terminal. The vendor of the hardware Device will provide the driver and DT (Device Tree) source files for the hardware Device, which the operating system compiles into the Device Tree used by the boot program.
The device tree in the embodiment of the present invention may correspond to the start mode one to one, for example: the normal start mode corresponds to the first device tree, the shutdown charge start mode corresponds to the second device tree, and the reset start mode corresponds to the third device tree. The main difference of the first device tree, the second device tree and the third device tree is that the hardware needing to be loaded is different, that is, the hardware identifiers contained in the first device tree, the second device tree and the third device tree are not completely consistent, some hardware identifiers are more, and some hardware identifiers are less.
In this embodiment, the first device tree may set a hardware identifier as a first combined identifier of all hardware included in the current mobile terminal, where the first combined identifier may be a set of all hardware identifiers, or may be a first specific identifier, and the first specific identifier indicates all hardware loaded on the mobile terminal. The second device tree may set a hardware identifier as a second combined identifier of the key device, the display device, and the charging device included in the current mobile terminal, where the second combined identifier may be a set of the identifier of the key device, the identifier of the display device, and the identifier of the charging device, or may be a second specific identifier, where the second specific identifier indicates the key device, the display device, and the charging device loaded on the mobile terminal. The third device tree may set a hardware identifier as a third combined identifier of the key device and the display device included in the current mobile terminal, where the third combined identifier may be a set of the identifier of the key device and the identifier of the display device, or may be a third specific identifier, where the third specific identifier indicates the key device and the display device loaded on the mobile terminal.
The device tree may be stored in advance in an eMMC (Embedded multimedia memory Card) of the mobile terminal, and after the boot mode of the mobile terminal is acquired, a device tree corresponding to the acquired boot mode may be selected from the eMMC partition.
Step S206, determining the hardware devices included in the selected device tree as the hardware devices that need to be loaded this time.
In this scheme, a device tree corresponding to the start mode may be configured in advance in the mobile terminal, where the device tree includes hardware devices corresponding to the start mode. Illustratively, the original device tree in the mobile terminal may be used as the first device tree xxx.dts corresponding to the normal start mode. And for the shutdown charging starting mode, deleting the hardware identifier irrelevant to shutdown charging in the first equipment tree to obtain a second equipment tree XXX-charge.dts corresponding to the shutdown charging starting mode. And for the reset starting mode, deleting the hardware identifier which is irrelevant to the reset starting mode in the first equipment tree to obtain a third equipment tree XXX-recovery.dts corresponding to the reset starting mode.
Wherein the first device tree XXX.dts comprises:
sound{
… …// describing audio equipment information and the like
status="ok";
}
touch{
… …// describing touch screen device information and the like
status="ok";
}
lcd{
… …// describing display device information and the like
status="ok";
}
gpio_keys{
… …// describing key device information and the like
status="ok";
}
power{
… …// describing charging device information and the like
status="ok";
}
… …// other device information.
The second device tree XXX-charge.dts comprises:
lcd{
… …// describing display device information and the like
status="ok";
}
gpio_keys{
… …// describing key device information and the like
status="ok";
}
power{
… …// describing charging device information and the like
status="ok";
}
… …// other device information.
The third device tree XXX-recovery.dts comprises:
lcd{
… …// describing display device information and the like
status="ok";
}
gpio_keys{
… …// describing key device information and the like
status="ok";
}
… …// other device information.
When the device tree is configured and generated, a start mode attribute field can be added to the device tree as a device tree mark. Still taking the first device tree, the second device tree, and the third device tree as an example for explanation, a boot-mode attribute field is added to each device tree as follows:
first device tree xxx.dts:
/{
……
reboot-mode=“default”
……
};
second device tree XXX-charge.dts:
/{
……
reboot-mode=“charge”
……
};
third device tree XXX-recovery.dts:
/{
……
reboot-mode=“recovery”
……
};
that is, the start mode attribute value of the first device tree xxx.dts is default, the start mode attribute value of the second device tree XXX-charge.dts is charge, and the start mode attribute value of the third device tree XXX-recovery.dts is recovery.
When the equipment tree corresponding to the obtained starting mode is selected, sequentially searching whether the starting mode attribute value of each equipment tree is matched with the obtained starting mode; and if the starting mode attribute value of the current equipment tree is matched with the obtained starting mode, determining the current equipment tree as the equipment tree corresponding to the starting mode, and determining the hardware equipment included in the current equipment tree as the hardware equipment needing to be loaded at this time.
And step S208, loading the determined driver of the hardware equipment to complete the starting process of the mobile terminal.
According to the mobile terminal starting method, the device tree corresponding to the starting mode is configured in the mobile terminal in advance, and the device tree comprises the hardware device corresponding to the starting mode. In the moving process of the mobile terminal, the corresponding equipment tree is selected according to the starting mode of the mobile terminal, the hardware equipment in the selected equipment tree is determined as the hardware equipment needing to be loaded, only the driver of the determined hardware equipment is loaded, and all the hardware equipment corresponding to the normal starting mode of the mobile terminal is not required to be loaded during each starting, so that the starting items are effectively reduced, the starting speed is accelerated, and meanwhile, the electric energy can be saved. Moreover, after the equipment tree is configured for one mobile terminal, the operation such as deletion or modification is not needed in the starting process of the mobile terminal, and the maintenance is easy.
On the basis of the second mobile terminal starting method, fig. 3 shows a flowchart of a third mobile terminal starting method provided by the embodiment of the present invention, and as shown in fig. 3, the method includes the following steps:
step S302, when the mobile terminal is started to the bootstrap program, determining the starting mode of the mobile terminal; if the starting mode of the mobile terminal is the normal starting mode, executing step S304; if the starting mode of the mobile terminal is the shutdown charging starting mode, executing step S308; if the booting mode of the mobile terminal is the reset booting mode, step S312 is performed.
In step S304, a first device tree corresponding to the normal boot mode is selected.
Step S306, determine the camera, the communication device, the WiFi device, the audio device, the display device, the touch screen, the key device, the charging device, and the like included in the first device tree as the hardware device that needs to be loaded this time.
Step S308, selecting a second device tree corresponding to the shutdown charging start mode.
Step S310, determining the display device, the key device, the charging device, and the like included in the second device tree as the hardware device that needs to be loaded this time.
In step S312, the third device tree corresponding to the reset start mode is selected.
Step S314, determining the display device, the key device, and the like included in the third device tree as the hardware device that needs to be loaded this time.
When the mobile terminal boots to BootLoader (bootstrap), the boot mode of the mobile terminal is determined. Before a Kernel program is started, a bootstrap program analyzes a device tree, confirms the device tree matched with a current starting mode according to the value of a starting mode attribute field reboot-mode in the device tree, loads the device tree to a memory and transmits the device tree to the Kernel program for use.
And when the kernel program is started, determining the hardware equipment needing to be loaded according to the selected equipment tree, and if the obtained starting mode of the mobile terminal is a normal starting mode, determining the hardware equipment in the first equipment tree corresponding to the normal starting mode as the hardware equipment needing to be loaded. And if the acquired starting mode of the mobile terminal is a shutdown charging starting mode, determining the hardware equipment included in the second equipment tree corresponding to the shutdown charging starting mode as the hardware equipment needing to be loaded at this time. And if the acquired starting mode of the mobile terminal is a reset starting mode, determining the hardware equipment in the third equipment tree corresponding to the reset starting mode as the hardware equipment needing to be loaded at this time.
For the same mobile terminal, because the hardware of the mobile terminal is fixed, when the kernel program is started, all hardware information does not need to be searched in a large range, and whether the hardware state limited in the equipment tree is normal or not is determined only according to the selected equipment tree, so that redundant programs during starting can be effectively reduced, and the starting speed is accelerated.
And step S316, loading the determined driver of the hardware equipment to complete the starting process of the mobile terminal.
The kernel program generates a corresponding platform _ device (device information list) according to the hardware device information in the device tree, wherein the device information list includes information such as the name and the model of the hardware device in the device tree. And the kernel program searches a driver corresponding to the hardware equipment in the driver pool according to the information of the hardware equipment in the equipment information list and loads the searched driver. Initializing corresponding hardware equipment through a probe function in a driver, turning on a power supply used by the hardware equipment, and sending a control instruction through an external interface according to a power-on time sequence described in an equipment data table of the driver. The Peripheral Interface may include, but is not limited to, I2C (Inter-Integrated Circuit), SPI (Serial Peripheral Interface), UART (Universal Asynchronous Receiver Transmitter), and the like.
When the hardware device is powered on, the control instruction sent by the peripheral interface usually has a strict timing sequence, so that the initialization code of the driver usually includes a large amount of time-consuming codes, such as useep (), udelay (), and the like. In this embodiment, different device trees are loaded for different boot modes, hardware devices to be loaded defined in the device trees corresponding to the shutdown charging boot mode and the reset boot mode are fewer than hardware devices to be loaded in the normal boot mode, when the kernel program is started, a driver corresponding to the hardware device not defined in the device tree is not loaded and called to be executed, and related time-consuming operations (such as sending a control instruction by a peripheral interface, and time-consuming operations such as useep and udelay in a code) are not executed, so that the boot speed is greatly increased, and meanwhile, a power supply of the hardware device not loaded is not turned on, thereby reducing the power consumption of the mobile terminal.
Fig. 4 is a flowchart illustrating a fourth method for starting a mobile terminal according to an embodiment of the present invention. As shown in fig. 4, the method includes the steps of:
step S402, when the mobile terminal starts to the bootstrap program, the starting mode of the mobile terminal is determined. If the starting mode of the mobile terminal is the normal starting mode, executing step S404; if the starting mode of the mobile terminal is the shutdown charging starting mode, executing step S406; if the booting mode of the mobile terminal is the reset booting mode, step S408 is performed.
Step S404, determining that the hardware device to be loaded is a hardware device in a preset first designated device group.
Step S406, determining that the hardware device to be loaded is a hardware device in a preset second specified device group.
Step S408, determining that the hardware device to be loaded is a hardware device in a preset third designated device group.
And step S410, loading the determined driver of the hardware equipment to complete the starting process of the mobile terminal.
The first designated equipment group, the second designated equipment group and the third designated equipment group are preset, the first designated equipment group corresponds to a normal starting mode, the second designated equipment group corresponds to a shutdown charging starting mode, and the third designated equipment group corresponds to a reset starting mode.
For the same mobile terminal, because the hardware is fixed and unchangeable, the following two ways can be adopted to realize the steps:
one implementation is: the first specified device group, the second specified device group and the third specified device group contain hardware identifiers to be loaded. The first designated device group, the second designated device group and the third designated device group contain hardware identifiers, the number of the hardware identifiers is not completely consistent, some hardware identifiers are more, and some hardware identifiers are less. For example, in the normal start mode, in order to ensure that the mobile terminal can normally operate after being turned on, drivers of all related hardware devices of the mobile terminal need to be loaded, so that all hardware identifiers of a camera, communication devices, WiFi devices, audio devices, display devices, a touch screen, key devices, charging devices, and the like can be placed in the first designated device group. Under the shutdown charge start-up mode, only need button equipment, display device and battery charging outfit normal work can, only need load button equipment, display device and battery charging outfit's driver, consequently, can put into second specified equipment group with button equipment, display device and battery charging outfit's hardware identification. I.e. the second designated device group is a subset of the first designated device group. In the reset starting mode, only the key device and the display device need to work normally, and only the driver programs of the key device and the display device need to be loaded, so that the hardware identifiers of the key device and the display device are placed into a third appointed device group. I.e., the third designated device group is also a subset of the first designated device group.
When the kernel program is started, selecting a designated device group corresponding to the acquired starting mode, detecting whether the state of the hardware device included in the designated device group is normal or not according to the hardware identifier included in the selected designated device group, and loading a driver of the hardware device included in the designated device group. The process of loading the driver of the hardware device may refer to the previous embodiment, and is not described herein again.
The other realization mode is as follows: the first specific device group comprises a first specific identifier which indicates all hardware devices loaded on the mobile terminal. The second specific device group comprises a second specific identifier, and the second specific identifier indicates the key device, the display device and the charging device loaded on the mobile terminal. The third specific device group comprises a third specific identifier, and the third specific identifier indicates the key device and the display device loaded on the mobile terminal.
And when the kernel program is started, selecting the specified equipment group corresponding to the acquired starting mode, and loading the driver of the corresponding hardware equipment according to the specific identifier contained in the selected specified equipment group. For example, if the mobile terminal is in the normal starting mode, a first designated device group is selected, and a device information list is generated according to the first specific identifier, wherein the device information list comprises all hardware devices on the mobile terminal. And searching a driver corresponding to the hardware equipment in the driver pool according to the information of the hardware equipment in the equipment information list, and loading the searched driver. And if the mobile terminal is in a shutdown charging starting mode, selecting a second specified equipment group, and generating an equipment information list according to the second specific identifier, wherein the list only comprises key equipment, display equipment and charging equipment on the mobile terminal. And searching a driver corresponding to the hardware equipment in the driver pool according to the information of the hardware equipment in the equipment information list, and loading the searched driver. And if the mobile terminal is in the reset starting mode, selecting a third appointed equipment group, and generating an equipment information list according to a third specific identifier, wherein the list only comprises key equipment and display equipment on the mobile terminal. And searching a driver corresponding to the hardware equipment in the driver pool according to the information of the hardware equipment in the equipment information list, and loading the searched driver.
For the same mobile terminal, because the hardware of the mobile terminal is fixed, when the kernel program is started, all hardware information does not need to be searched in a large range, and only the driver of the hardware state contained in the designated equipment group is loaded according to the selected designated equipment group. Therefore, redundant programs during starting are effectively reduced, and the starting speed is accelerated.
In an alternative embodiment, different models of mobile terminals may use different hardware devices, considering that in actual production, manufacturers of the same brand often design a plurality of different models of mobile terminals. In order to facilitate production and maintenance, a generator may burn the same set of driver software into different models of mobile terminals, where the driver software includes drivers for hardware devices used by multiple models of mobile terminals. Therefore, the mobile terminal may include a plurality of device trees respectively corresponding to different models of mobile terminals. When the mobile terminal is started, the equipment tree matched with the model of the mobile terminal is searched, and a driving program of the hardware equipment is loaded according to the found hardware equipment information in the equipment tree. Specifically, when the mobile terminal is started to the boot program, the model and the start mode of the mobile terminal may be acquired. And determining the hardware equipment needing to be loaded according to the model and the starting mode of the mobile terminal. For example, a plurality of device trees are configured in advance in the mobile terminal, each device tree corresponding to a pre-stored combination of a mobile terminal model and a start mode, that is, a hardware device corresponding to the combination of the mobile terminal model and the start mode is defined in the device tree. And a model attribute field and a starting mode attribute field are arranged in each equipment tree. The value of the model attribute field identifies the model of the mobile terminal corresponding to the equipment tree, and the value of the start mode attribute field identifies the start mode of the mobile terminal corresponding to the equipment tree. The corresponding equipment tree can be selected according to the combination of the model and the starting mode of the mobile terminal, and the hardware equipment in the selected equipment tree is determined as the hardware equipment needing to be loaded. And when the kernel program is started, loading the determined driver of the hardware equipment, and electrifying and initializing the corresponding hardware equipment to finish the starting process of the mobile terminal.
With the continuous development and evolution of mobile terminals, some mobile terminals may include multiple CPUs, such as a multi-core CPU including a large-core CPU and a small-core CPU, and differences between the large-core CPU and the small-core CPU include: the CPU has different structures, or the highest main frequency, the size of cache (high-speed buffer memory), power consumption and other parameters. The core sizes of the CPUs in the multi-core CPU mobile terminal may be the same or different, and different CPUs correspondingly control different hardware devices. For a mobile terminal comprising a plurality of CPUs, different hardware equipment is loaded under different starting modes, different CPUs can be correspondingly started or different working frequencies of the CPUs are adjusted, and all the CPUs do not need to be started every time or run according to the same working frequency. For example: if the current starting mode is the normal starting mode and the current mobile terminal is configured with the dual-core CPU, the hardware equipment needing to be loaded during the starting comprises the dual-core CPU, and the dual-core CPU works at the highest dominant frequency. If the current starting mode is a shutdown charging starting mode and the current mobile terminal is configured with a dual-core CPU, the hardware device to be loaded during the starting may only include the CPU for controlling the display screen, and the operating frequency may be set to a low frequency. Based on this, fig. 5 shows a flowchart of a fifth method for starting a mobile terminal according to an embodiment of the present invention, where the mobile terminal applying the method includes multiple CPUs, and at least one CPU corresponds to each starting mode in advance. As shown in fig. 5, the method comprises the steps of:
step S502, when the mobile terminal is started to the bootstrap program, the starting mode of the mobile terminal is obtained.
Step S504, the hardware equipment needing to be loaded is determined according to the acquired starting mode.
In step S506, the driver of the determined hardware device is loaded.
Step S508, finding the CPU corresponding to the acquired start mode.
The first realization mode is as follows: in the mobile terminal, a correspondence between the activation mode of the mobile terminal and the CPU that needs to be activated may be stored in advance. For example, a correspondence table is created in the mobile terminal, and the CPU corresponding to each activation mode is stored in the correspondence table. There may be one or more CPUs for each boot mode. And searching the corresponding relation table to determine the CPU corresponding to the current starting mode.
The second implementation mode is as follows: and searching the CPU corresponding to the current starting mode according to the determined hardware equipment needing to be loaded. Because different hardware devices correspond to different CPUs, the CPU to be started can be determined by the determined hardware device to be loaded.
Step S510, the found CPU is started.
When step S508 employs the first implementation, step S508 and step S510 may be executed before step S504.
Optionally, whether the mobile terminal includes multiple CPUs or not, after the start-up mode of the mobile terminal is acquired, the operating frequency of the CPUs may be set according to the acquired start-up mode. For example, the operating frequency of the CPU is set to a low frequency at the time of shutdown charge start mode or reset start mode. When the working frequency of the CPU is low frequency, the power consumption of the CPU can be far lower than that of the CPU working at the highest main frequency, so that the energy consumption can be further saved, and the standby time of the mobile terminal can be prolonged. If the mobile terminal includes a multi-core CPU, only the operating frequency of the CPU corresponding to the acquired boot mode may be set.
According to the mobile terminal starting method, different hardware devices are loaded according to different starting modes, different CPUs are started or the working frequency of the CPUs is adjusted, all the hardware devices and all the CPUs corresponding to the normal starting mode of the mobile terminal do not need to be loaded during each starting, or the CPUs all work at the highest main frequency, so that starting items are further reduced, the starting speed is accelerated, and meanwhile, the power consumption of the mobile terminal is further reduced.
It should be noted that the above embodiments of the method are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are not described repeatedly and can be referred to each other.
Corresponding to the method embodiment, the embodiment of the invention also provides a mobile terminal starting device. As shown in fig. 6, the apparatus includes:
a starting mode obtaining module 61, configured to obtain a starting mode of the mobile terminal when the mobile terminal starts to the bootstrap; the start-up mode includes: a normal start mode, a shutdown charge start mode or a reset start mode;
the driver loading module 62 is configured to determine a hardware device to be loaded according to the acquired start mode; and loading the determined driver of the hardware equipment to complete the starting process of the mobile terminal.
Optionally, the mobile terminal may be preconfigured with a device tree corresponding to the start mode; the device tree includes hardware devices corresponding to the start mode. The start mode obtaining module 61 may be further configured to: selecting an equipment tree corresponding to the obtained starting mode; and determining the hardware equipment included in the selected equipment tree as the hardware equipment needing to be loaded at this time.
The start mode obtaining module 61 may be further configured to: sequentially searching whether the starting mode attribute value of each equipment tree is matched with the obtained starting mode; if the starting mode attribute value of the current equipment tree is matched with the obtained starting mode; and determining the current equipment tree as the equipment tree corresponding to the starting mode.
The driver loading module 62 may further be configured to: if the acquired starting mode is a normal starting mode, determining that the hardware equipment needing to be loaded is the hardware equipment in a preset first appointed equipment group; if the acquired starting mode is a shutdown charging starting mode, determining that the hardware equipment needing to be loaded is the hardware equipment in a preset second specified equipment group; and if the acquired starting mode is the reset starting mode, determining that the hardware equipment needing to be loaded is the hardware equipment in the preset third appointed equipment group. Wherein the second designated device group and the third designated device group are each a subset of the first designated device group.
The driver loading module 62 may further be configured to: obtaining the model of the mobile terminal; and determining the hardware equipment to be loaded according to the model of the mobile terminal and the acquired starting mode.
Optionally, the mobile terminal is preconfigured with a plurality of device trees, each device tree corresponding to a combination of a prestored mobile terminal model and a prestored starting mode; the device tree includes hardware devices corresponding to the combinations. The driver loading module 62 may further be configured to: selecting a corresponding equipment tree according to the combination of the model and the starting mode of the mobile terminal; and determining the hardware devices included in the selected device tree as the hardware devices needing to be loaded.
The start mode obtaining module 61 may be further configured to: when a restarting component of the mobile terminal is touched or a power key is pressed down when the mobile terminal is in a shutdown state, determining that the starting mode of the mobile terminal is a normal starting mode; when the mobile terminal is in a shutdown state and a voltage signal of a charging interface is monitored, determining that the starting mode of the mobile terminal is a shutdown charging starting mode; and when an appointed key of the mobile terminal is pressed down or a reset mark exists in an appointed subarea of the mobile terminal, determining that the starting mode of the mobile terminal is a reset starting mode.
In another alternative embodiment, as shown in fig. 7, the mobile terminal includes a plurality of CPUs, and at least one CPU is previously corresponding to each boot mode. The above apparatus may further include:
a CPU starting module 71, configured to search for a CPU corresponding to the obtained starting mode; starting the searched CPU;
and the working frequency setting module 72 is configured to adjust the working frequency of the CPU according to the obtained starting mode.
According to the mobile terminal starting device provided by the embodiment of the invention, the hardware equipment needing to be loaded is determined according to the starting mode of the mobile terminal, only the driver of the determined hardware equipment is loaded, and all hardware equipment corresponding to the normal starting mode of the mobile terminal does not need to be loaded during each starting, so that the starting items are effectively reduced, the starting speed is accelerated, and meanwhile, the power consumption of the mobile terminal can be reduced.
The mobile terminal activation apparatus provided in this embodiment has the same implementation principle and technical effect as those of the foregoing method embodiments, and for the sake of brief description, reference may be made to corresponding contents in the foregoing method embodiments for parts of the apparatus embodiments that are not mentioned. The mobile terminal starting device has the function of realizing the starting behavior of the mobile terminal. The functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above-described functions.
Corresponding to the embodiment, the embodiment of the invention also provides a mobile terminal. The mobile terminal can be a mobile phone, a tablet computer, a Point of sale (POS), a vehicle-mounted computer, an intelligent wearable device and other terminal devices.
Fig. 8 is a block diagram illustrating a mobile terminal according to an embodiment of the present invention. As shown in fig. 8, for convenience of illustration, only the portion related to the embodiment of the present invention is shown, and details of the technique are not disclosed, please refer to the method portion of the embodiment of the present invention. The mobile terminal 100 includes: the communication device 110, the memory 120, the input unit 130, the display device 140, the sensor 150, the audio device 160, a wireless fidelity (WiFi) module 170, the processor 180, the charging device 190, and the battery 191. Those skilled in the art will appreciate that the mobile terminal 100 configuration shown in fig. 8 does not constitute a limitation of the mobile terminal 100 and may include more or less components than those shown, or some components in combination, or a different arrangement of components.
The following describes each component of the mobile terminal 100 in detail with reference to fig. 8:
the processor 180 is a control center of the mobile terminal 100, connects various parts of the entire mobile terminal 100 using various interfaces and lines, and performs various functions of the mobile terminal 100 and processes data by running or executing software programs and/or modules stored in the memory 120 and calling data stored in the memory 120, thereby monitoring the mobile terminal 100 as a whole. Optionally, the processor 180 may include one or more CPUs. When the processor 180 includes a plurality of CPUs, each CPU controls a different hardware device, and each start mode of the mobile terminal corresponds to at least one CPU. When the mobile terminal is started, different CPUs can be started for different starting modes. Optionally, the processor 180 may integrate an application processor and a modem processor, wherein the application processor mainly handles operating systems, user interfaces, application programs, and the like, and the modem processor mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 180.
The communication device 110 may be a Radio Frequency (RF) circuit, and may be configured to receive and transmit signals during information transmission and reception or during a call, and in particular, receive downlink information of a base station and then process the received downlink information to the processor 180; in addition, the data for designing uplink is transmitted to the base station. Typically, the RF circuitry includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuitry may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), and the like. Although fig. 8 shows an RF circuit, it is understood that it does not belong to the essential constitution of the mobile terminal 100 and may be omitted entirely as needed within the scope not changing the essence of the invention.
The memory 120 may be used to store software programs and modules, such as program instructions/modules corresponding to the mobile terminal booting method and apparatus in the embodiment of the present invention, and the processor 180 executes various functional applications and data processing of the mobile terminal 100, such as the mobile terminal booting method provided in the embodiment of the present invention, by executing the software programs and modules stored in the memory 120. The memory 120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the mobile terminal 100, and the like. The memory 120 further stores a plurality of device trees, each device tree corresponding to a start mode of the mobile terminal; alternatively, each device tree corresponds to a combination of a pre-stored mobile terminal model and a start-up mode. Further, the memory 120 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 130 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal 100. Specifically, the input unit 130 may include a touch screen 131 and a key device 132. The touch screen 131, also referred to as a touch screen, may collect touch operations of a user (e.g., operations of the user on the touch screen 131 or near the touch screen 131 using any suitable object or accessory such as a finger, a stylus, etc.) on or near the touch screen 131, and drive the corresponding connection device according to a preset program. Alternatively, the touch screen 131 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 180, and can receive and execute commands sent by the processor 180. In addition, the touch screen 131 may be implemented in various types, such as resistive, capacitive, infrared, and surface acoustic wave. The input unit 130 may include a key device 132 in addition to the touch screen 131. In particular, the key devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display device 140 may be used to display information input by or provided to the user and various menus of the mobile terminal 100. The Display device 140 may include a Display panel, and optionally, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch screen 131 may cover the display panel, and when the touch screen 131 detects a touch operation on or near the touch screen 131, the touch screen is transmitted to the processor 180 to determine the type of the touch event, and then the processor 180 performs a process according to the type of the touch event. Although in fig. 8 the touch screen 131 and the display panel are two separate components to implement the input and output functions of the mobile terminal 100, in some embodiments the touch screen 131 and the display panel may be integrated to implement the input and output functions of the mobile terminal 100.
The mobile terminal 100 may also include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel according to the brightness of ambient light, and a proximity sensor that may turn off the display panel and/or the backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor may detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when stationary, and be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration) for recognizing the attitude of the mobile terminal 100, and related functions (such as pedometer and tapping) for vibration recognition; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which may be further configured in the mobile terminal 100, detailed descriptions thereof are omitted.
An audio device 160, such as a speaker, microphone, etc., may provide an audio interface between a user and the mobile terminal 100. The audio device 160 may transmit the electrical signal converted from the received audio data to a speaker, and convert the electrical signal into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio device 160 and converted into audio data, which is then processed by the audio data output processor 180 and transmitted to, for example, another mobile terminal 100 via the communication device 110, or the audio data is output to the memory 120 for further processing.
WiFi belongs to a short-range wireless transmission technology, and the mobile terminal 100 can help a user send and receive e-mails, browse web pages, access streaming media, and the like through the WiFi device 170, which provides the user with wireless broadband internet access.
The mobile terminal 100 may also include a removable battery for powering the various components. The mobile terminal 100 further includes a charging device 190 for charging the battery, and the charging device 190 includes a charging interface. The charging device 190 is connected to the processor 180, and when the processor 180 detects that a voltage signal is present at the charging interface, the mobile terminal is started in a shutdown charging start mode. Optionally, the mobile terminal may further include a power management system, and the battery is logically connected to the processor 180 through the power management system, so that the functions of managing charging, discharging, power consumption management, and the like are implemented through the power management system.
It is to be understood that the structure shown in fig. 8 is merely exemplary, and that the mobile terminal 100 may include more or fewer components than shown in fig. 8, or have a different configuration than shown in fig. 8. The components shown in fig. 8 may be implemented in hardware, software, or a combination thereof.
Further, the embodiment of the present invention also provides a machine-readable storage medium, which stores machine-executable instructions, and when the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the mobile terminal starting method.
The mobile terminal starting method, the mobile terminal starting device and the mobile terminal provided by the embodiment of the invention have the same technical characteristics, can solve the same technical problems and achieve the same technical effect.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, each functional module or unit in each embodiment of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions or without necessarily implying any relative importance. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
The embodiment of the invention also discloses:
A1. a mobile terminal starting method comprises the following steps:
when a mobile terminal is started to a bootstrap program, acquiring a starting mode of the mobile terminal;
determining the hardware equipment needing to be loaded according to the acquired starting mode;
and loading the determined driver of the hardware equipment to finish the starting process of the mobile terminal.
A2. According to the method A1, the mobile terminal is configured with a device tree corresponding to the starting mode in advance; hardware equipment corresponding to the starting mode is defined in the equipment tree;
the step of determining the hardware device to be loaded according to the acquired start mode includes:
selecting an equipment tree corresponding to the acquired starting mode;
and determining the hardware equipment included in the selected equipment tree as the hardware equipment needing to be loaded at this time.
A3. The method according to a2, wherein the step of selecting the device tree corresponding to the obtained start-up mode includes:
sequentially searching whether the starting mode attribute value of each equipment tree is matched with the obtained starting mode;
if the attribute value of the starting mode of the current equipment tree is matched with the obtained starting mode;
and determining the current equipment tree as the equipment tree corresponding to the starting mode.
A4. The method of a1, the startup mode comprising: a normal start mode, a shutdown charge start mode or a reset start mode; the step of determining the hardware equipment needing to be loaded according to the acquired starting mode comprises the following steps:
if the acquired starting mode is a normal starting mode, determining that the hardware equipment needing to be loaded is the hardware equipment in a preset first appointed equipment group; if the acquired starting mode is a shutdown charging starting mode, determining that the hardware equipment needing to be loaded is the hardware equipment in a preset second specified equipment group; if the obtained starting mode is a reset starting mode, determining that the hardware equipment needing to be loaded is the hardware equipment in a preset third appointed equipment group;
wherein the second designated device group and the third designated device group are each a subset of the first designated device group.
A5. The method of a1, wherein the step of obtaining the start-up mode of the mobile terminal comprises:
when it is monitored that a restarting component of the mobile terminal is touched or a power key is pressed when the mobile terminal is in a shutdown state, determining that a starting mode of the mobile terminal is a normal starting mode;
when the mobile terminal is in a shutdown state and a voltage signal of a charging interface is monitored, determining that the starting mode of the mobile terminal is a shutdown charging starting mode;
and when it is monitored that the appointed key of the mobile terminal is pressed down or a reset identifier exists in the appointed subarea of the mobile terminal, determining that the starting mode of the mobile terminal is a reset starting mode.
A6. According to the method of a1, the mobile terminal includes a plurality of CPUs, and at least one CPU is corresponding to each starting mode in advance; after the step of obtaining the starting mode of the mobile terminal, the method further includes:
searching the CPU corresponding to the obtained starting mode;
and starting the searched CPU.
A7. According to the method of A1 or A6, after the step of obtaining the start-up mode of the mobile terminal, the method further comprises:
and setting the working frequency of the CPU according to the acquired starting mode.
B8. A mobile terminal activation device, comprising:
the starting mode acquisition module is used for acquiring the starting mode of the mobile terminal when the mobile terminal is started to a bootstrap program;
the driver loading module is used for determining the hardware equipment needing to be loaded according to the acquired starting mode; and loading the determined driver of the hardware equipment to finish the starting process of the mobile terminal.
B9. According to the device of B8, the mobile terminal is configured with a device tree corresponding to the starting mode in advance; hardware equipment corresponding to the starting mode is defined in the equipment tree;
the starting mode obtaining module is further configured to: selecting an equipment tree corresponding to the acquired starting mode; and determining the hardware equipment included in the selected equipment tree as the hardware equipment needing to be loaded at this time.
B10. The apparatus of B9, the startup mode acquisition module further configured to:
sequentially searching whether the starting mode attribute value of each equipment tree is matched with the obtained starting mode;
if the attribute value of the starting mode of the current equipment tree is matched with the obtained starting mode;
and determining the current equipment tree as the equipment tree corresponding to the starting mode.
B11. The apparatus of B8, the startup mode comprising: a normal start mode, a shutdown charge start mode or a reset start mode; the driver loading module is further configured to:
if the acquired starting mode is a normal starting mode, determining that the hardware equipment needing to be loaded is the hardware equipment in a preset first appointed equipment group; if the acquired starting mode is a shutdown charging starting mode, determining that the hardware equipment needing to be loaded is the hardware equipment in a preset second specified equipment group; if the obtained starting mode is a reset starting mode, determining that the hardware equipment needing to be loaded is the hardware equipment in a preset third appointed equipment group;
wherein the second designated device group and the third designated device group are each a subset of the first designated device group.
B12. The apparatus of B8, the startup mode acquisition module further configured to:
when a restarting component of the mobile terminal is triggered or a power key is pressed down when the mobile terminal is in a shutdown state, determining that the starting mode of the mobile terminal is a normal starting mode;
when the mobile terminal is in a shutdown state and a voltage signal of a charging interface is monitored, determining that the starting mode of the mobile terminal is a shutdown charging starting mode;
and when the appointed key of the mobile terminal is pressed down or a reset mark exists in the appointed subarea of the mobile terminal, determining that the starting mode of the mobile terminal is a reset starting mode.
B13. According to the device of B8, the mobile terminal comprises a plurality of CPUs, and at least one CPU is corresponding to each starting mode in advance; the device further comprises:
the CPU starting module is used for searching the CPU corresponding to the obtained starting mode; and starting the searched CPU.
B14. The apparatus of B8 or B13, the apparatus further comprising:
and the working frequency setting module is used for adjusting the working frequency of the CPU according to the acquired starting mode.
C15. A mobile terminal comprising a memory for storing a program enabling a processor to perform the method of any one of a 1-a 7 and a processor configured to execute the program stored in the memory.
C16. The mobile terminal of C15, the memory having stored therein a plurality of device trees; each equipment tree corresponds to a starting mode of the mobile terminal; or, each of the device trees corresponds to a combination of a pre-stored mobile terminal model and a pre-stored start-up mode.
C17. The mobile terminal of C15, wherein the processor comprises multiple CPUs, and at least one CPU corresponds to each boot mode of the mobile terminal.
D18. A machine readable storage medium storing computer software instructions for use with an apparatus according to any one of B8-B14.

Claims (8)

1. A mobile terminal starting method is characterized by comprising the following steps:
when a mobile terminal is started to a bootstrap program, acquiring a starting mode of the mobile terminal;
determining the hardware equipment needing to be loaded according to the acquired starting mode;
loading the determined driver of the hardware equipment to complete the starting process of the mobile terminal;
the mobile terminal comprises a plurality of CPUs, and at least one CPU is corresponding to each starting mode in advance; after the step of obtaining the starting mode of the mobile terminal, the method further includes:
searching the CPU corresponding to the obtained starting mode;
starting the searched CPU;
after the step of obtaining the starting mode of the mobile terminal, the method further includes:
setting the working frequency of the CPU according to the acquired starting mode;
the start-up mode includes: the method comprises the following steps of setting the working frequency of a CPU according to the acquired starting mode, namely a normal starting mode, a shutdown charging starting mode or a reset starting mode:
setting the working frequency of the CPU to be low frequency when the shutdown charging starting mode or the reset starting mode is adopted;
and setting the working frequency of the CPU to be high frequency in the normal starting mode.
2. The method according to claim 1, wherein the mobile terminal is pre-configured with a device tree corresponding to the start-up mode; hardware equipment corresponding to the starting mode is defined in the equipment tree;
the step of determining the hardware device to be loaded according to the acquired start mode includes:
selecting an equipment tree corresponding to the acquired starting mode;
and determining the hardware equipment included in the selected equipment tree as the hardware equipment needing to be loaded at this time.
3. The method of claim 2, wherein the step of selecting the device tree corresponding to the obtained boot mode comprises:
sequentially searching whether the starting mode attribute value of each equipment tree is matched with the obtained starting mode;
if the attribute value of the starting mode of the current equipment tree is matched with the obtained starting mode;
and determining the current equipment tree as the equipment tree corresponding to the starting mode.
4. The method according to claim 1, wherein the step of determining the hardware device to be loaded according to the acquired boot mode comprises:
if the acquired starting mode is a normal starting mode, determining that the hardware equipment needing to be loaded is the hardware equipment in a preset first appointed equipment group; if the acquired starting mode is a shutdown charging starting mode, determining that the hardware equipment needing to be loaded is the hardware equipment in a preset second specified equipment group; if the obtained starting mode is a reset starting mode, determining that the hardware equipment needing to be loaded is the hardware equipment in a preset third appointed equipment group;
wherein the second designated device group and the third designated device group are each a subset of the first designated device group.
5. The method according to claim 1, wherein the step of obtaining the start-up mode of the mobile terminal comprises:
when it is monitored that a restarting component of the mobile terminal is touched or a power key is pressed when the mobile terminal is in a shutdown state, determining that a starting mode of the mobile terminal is a normal starting mode;
when the mobile terminal is in a shutdown state and a voltage signal of a charging interface is monitored, determining that the starting mode of the mobile terminal is a shutdown charging starting mode;
and when it is monitored that the appointed key of the mobile terminal is pressed down or a reset identifier exists in the appointed subarea of the mobile terminal, determining that the starting mode of the mobile terminal is a reset starting mode.
6. A mobile terminal activation device, comprising:
the starting mode acquisition module is used for acquiring the starting mode of the mobile terminal when the mobile terminal is started to a bootstrap program;
the driver loading module is used for determining the hardware equipment needing to be loaded according to the acquired starting mode; loading the determined driver of the hardware equipment to complete the starting process of the mobile terminal;
the mobile terminal comprises a plurality of CPUs, and at least one CPU is corresponding to each starting mode in advance; the device further comprises:
the CPU starting module is used for searching the CPU corresponding to the obtained starting mode; starting the searched CPU;
the start-up mode includes: a normal start mode, a shutdown charge start mode or a reset start mode; the device further comprises:
the working frequency setting module is used for setting the working frequency of the CPU according to the acquired starting mode; the adjusting the working frequency of the CPU according to the obtained starting mode comprises setting the working frequency of the CPU to be a low frequency when the shutdown charging starting mode or the reset starting mode; and setting the working frequency of the CPU to be high frequency in the normal starting mode.
7. A mobile terminal comprising a memory for storing a program that enables the processor to perform the method of any of claims 1 to 5 and a processor configured to execute the program stored in the memory.
8. A machine-readable storage medium storing computer software instructions for use by the apparatus of claim 6.
CN201810177446.XA 2018-03-02 2018-03-02 Mobile terminal starting method and device and mobile terminal Active CN108388451B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810177446.XA CN108388451B (en) 2018-03-02 2018-03-02 Mobile terminal starting method and device and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810177446.XA CN108388451B (en) 2018-03-02 2018-03-02 Mobile terminal starting method and device and mobile terminal

Publications (2)

Publication Number Publication Date
CN108388451A CN108388451A (en) 2018-08-10
CN108388451B true CN108388451B (en) 2021-08-31

Family

ID=63069786

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810177446.XA Active CN108388451B (en) 2018-03-02 2018-03-02 Mobile terminal starting method and device and mobile terminal

Country Status (1)

Country Link
CN (1) CN108388451B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112148100B (en) * 2019-06-26 2022-08-16 西安诺瓦星云科技股份有限公司 Embedded equipment control method, device and system
CN111124517B (en) * 2019-12-23 2023-01-20 湖南国科微电子股份有限公司 Embedded chip boot starting method and device, computer equipment and storage medium
CN113835761A (en) * 2020-06-24 2021-12-24 合肥杰发科技有限公司 Operating system starting method and electronic equipment
CN111858182B (en) * 2020-07-31 2023-12-19 捷开通讯(深圳)有限公司 Data reading method and device, storage medium and mobile terminal
CN113064652B (en) * 2021-04-01 2023-03-14 海光信息技术股份有限公司 Apparatus, method, device and medium for boot code of central processing unit
CN113692003A (en) * 2021-08-30 2021-11-23 北京紫光展锐通信技术有限公司 Mode switching method and device of Wi-Fi module
CN116541084B (en) * 2023-06-29 2023-12-15 深圳艾为电气技术有限公司 Method, device, equipment and medium for controlling drive loading of compressor driver

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101042653A (en) * 2006-03-21 2007-09-26 讯连科技股份有限公司 Computer system for providing various starting up program and starting up method thereof
CN101101556A (en) * 2006-07-07 2008-01-09 乐金电子(昆山)电脑有限公司 Portable information terminal guiding method
CN103096167A (en) * 2012-12-24 2013-05-08 康佳集团股份有限公司 Starting method and starting system of intelligent television
CN103942059A (en) * 2013-01-21 2014-07-23 华硕电脑股份有限公司 Electronic device with multiple starting modes
CN104408016A (en) * 2014-10-14 2015-03-11 张世寅 Computer smart apparatus controlled by inducer, and controlling method for the apparatus
CN105988850A (en) * 2015-05-12 2016-10-05 乐视移动智能信息技术(北京)有限公司 Startup control method and device of mobile terminal
CN107220110A (en) * 2017-04-27 2017-09-29 深圳市科力锐科技有限公司 The automatic adaptive method of hardware and system
CN107528962A (en) * 2016-06-22 2017-12-29 中兴通讯股份有限公司 Mobile terminal quick start method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1955874A (en) * 2005-10-25 2007-05-02 鸿富锦精密工业(深圳)有限公司 Superfrequency system and method of central processor
JP5178282B2 (en) * 2008-04-02 2013-04-10 キヤノン株式会社 Information processing apparatus, control method, and program
CN101963946B (en) * 2010-10-11 2015-12-16 中兴通讯股份有限公司 A computer supported multi-section mobile terminal downloads method and the device of software version
KR102301639B1 (en) * 2015-01-23 2021-09-14 삼성전자주식회사 SoC, METHOD FOR MANAGING POWER OF THEREOF AND ELECTRONIC DEVICE
CN106339064A (en) * 2016-08-29 2017-01-18 宇龙计算机通信科技(深圳)有限公司 Method and device for rebooting

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101042653A (en) * 2006-03-21 2007-09-26 讯连科技股份有限公司 Computer system for providing various starting up program and starting up method thereof
CN101101556A (en) * 2006-07-07 2008-01-09 乐金电子(昆山)电脑有限公司 Portable information terminal guiding method
CN103096167A (en) * 2012-12-24 2013-05-08 康佳集团股份有限公司 Starting method and starting system of intelligent television
CN103942059A (en) * 2013-01-21 2014-07-23 华硕电脑股份有限公司 Electronic device with multiple starting modes
CN104408016A (en) * 2014-10-14 2015-03-11 张世寅 Computer smart apparatus controlled by inducer, and controlling method for the apparatus
CN105988850A (en) * 2015-05-12 2016-10-05 乐视移动智能信息技术(北京)有限公司 Startup control method and device of mobile terminal
CN107528962A (en) * 2016-06-22 2017-12-29 中兴通讯股份有限公司 Mobile terminal quick start method and device
CN107220110A (en) * 2017-04-27 2017-09-29 深圳市科力锐科技有限公司 The automatic adaptive method of hardware and system

Also Published As

Publication number Publication date
CN108388451A (en) 2018-08-10

Similar Documents

Publication Publication Date Title
CN108388451B (en) Mobile terminal starting method and device and mobile terminal
CN106502703B (en) Function calling method and device
CN109062467B (en) Split screen application switching method and device, storage medium and electronic equipment
CN106210755B (en) A kind of methods, devices and systems playing live video
CN106775833B (en) Device driver loading method, terminal and system
CN104967896A (en) Method for displaying bulletscreen comment information, and apparatus thereof
CN103544033A (en) Method, device and associated equipment for rolling back application program
TWI522917B (en) Method and device for controlling start-up of applicantion and computer-readable storage medium
CN106713608B (en) Application function state modification method and device and terminal
CN111512278B (en) Method for processing application of terminal equipment and terminal equipment
CN106919458B (en) Method and device for Hook target kernel function
CN109032491B (en) Data processing method and device and mobile terminal
CN103455751B (en) Password hint generation method, device and terminal equipment
CN106682189B (en) File name display method and device
CN111273955A (en) Thermal restoration plug-in optimization method and device, storage medium and electronic equipment
CN106528231B (en) A kind of method and apparatus starting application program
CN105278942B (en) Component management method and device
WO2015135457A1 (en) Method, apparatus, and system for sending and playing multimedia information
CN106303616B (en) Play control method, device and terminal
CN107741895B (en) Server management method, device and equipment
CN111027406A (en) Picture identification method and device, storage medium and electronic equipment
CN106933626B (en) Application association method and device
CN115951807A (en) Terminal control method, terminal control device, terminal equipment and storage medium
CN106294528B (en) Method and device for realizing information transmission
CN105302846B (en) Method and device for restoring webpage

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210121

Address after: 518000 Building 405A, 01B, Zone E, Zhiheng Industrial Park, Nantou Street, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: SHENZHEN ZHIYING TECHNOLOGY Co.,Ltd.

Address before: 518000 1-10 Floor, Building A2, Nanshan Zhiyuan, 1001 Xueyuan Avenue, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: QIKU INTERNET TECHNOLOGY (SHENZHEN) Co.,Ltd.

GR01 Patent grant
GR01 Patent grant