CN106648594B - Terminal starting method and device - Google Patents
Terminal starting method and device Download PDFInfo
- Publication number
- CN106648594B CN106648594B CN201610867963.0A CN201610867963A CN106648594B CN 106648594 B CN106648594 B CN 106648594B CN 201610867963 A CN201610867963 A CN 201610867963A CN 106648594 B CN106648594 B CN 106648594B
- Authority
- CN
- China
- Prior art keywords
- offset
- main program
- environment variable
- program
- memory space
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The disclosure discloses a terminal starting method and a terminal starting device. The method comprises the following steps: triggering a Boot program in the started terminal to run; determining a triggered offset mark in the operation of the Boot program, wherein the triggered offset mark dynamically changes relative to the offset mark triggered in the last starting; determining a pointed memory space according to the triggered offset mark, wherein the offset mark is used for indicating the memory space in which the system main program runs in the starting; guiding a system main program to run in the pointed memory space; and after the system main program runs, calling an application layer program to enter other memory spaces. The memory space used by the system main program is dynamically changed through the dynamically changed offset mark, and the memory space is not solidified for the system main program, so that the memory space can be prevented from being accumulated and damaged, and the product life of the terminal is prolonged.
Description
Technical Field
The present disclosure relates to the field of computer application technologies, and in particular, to a terminal starting method and apparatus.
Background
In the terminal, in order to ensure that enough memory space runs the system main program, the memory space is mostly preset, and the used memory space is solidified. The system main program runs in a solidified memory space, and a space is reserved for the application layer program, so that the application layer program runs in another solidified memory space.
That is, during terminal boot, the system main program runs in a fixed memory space. The main program of the system always uses the fixed memory space.
Therefore, for the memory space used by the system main program all the time, the memory space will be damaged cumulatively, which affects the life of the memory space.
The service life of the memory space used by the main program of the system all the time determines the product service life of the terminal, so that the product service life of the terminal is limited, namely the terminal cannot be started after being damaged.
Disclosure of Invention
In order to solve the technical problems that accumulated damage exists in a memory space solidified for a system main program and the service life of a product of a terminal is limited in the related art, the disclosure provides a terminal starting method and a terminal starting device.
A terminal starting method, the method comprising:
triggering a Boot program in the started terminal to run;
determining a triggered offset mark in the running of the Boot program;
determining a pointed memory space according to the triggered offset mark, wherein the offset mark is used for indicating the memory space in which the system main program runs in the starting;
guiding a system main program to run in the pointed memory space;
and after the system main program runs, calling an application layer program to enter other memory spaces.
A terminal activation device, the device comprising:
the Boot guiding module is used for triggering the started terminal to guide a Boot program to run;
the mark transformation module is used for determining a triggered offset mark in the running process of the Boot program;
the space determining module is used for determining a pointed memory space according to the triggered offset mark, and the offset mark is used for indicating the memory space in which the system main program runs in the starting;
the main program guiding module is used for guiding the system main program to operate in the pointed memory space;
and the application layer calling module is used for calling the application layer program to enter other memory spaces after the system main program runs.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
in the terminal triggered to be started, firstly, a Boot program is guided to run, a triggered offset mark is determined in the running of the Boot program, the offset mark points to a memory space, therefore, the pointed memory space is determined according to the triggered offset mark, a system main program is guided to run in the memory space, and a subsequently called application layer program enters other memory spaces.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a block diagram illustrating an apparatus according to an example embodiment
FIG. 2 is a flow chart illustrating a method of terminal activation in accordance with an exemplary embodiment;
FIG. 3 is a flowchart illustrating details of the step of transforming the stored offset tag to an offset tag associated with the environment variable based on the environment variable returned from the main program of the system at the last boot in accordance with an exemplary embodiment;
FIG. 4 is a flowchart illustrating details of a step of booting a main program of a system to run in a pointed memory space in accordance with an illustrative embodiment;
FIG. 5 is a block diagram illustrating an implementation of a processor in a terminal according to an example embodiment;
FIG. 6 is a flow diagram illustrating a prior art implementation of terminal activation according to an illustrative example;
FIG. 7 is a diagram illustrating a terminal-initiated application implemented by the present disclosure in accordance with an exemplary embodiment;
FIG. 8 is a block diagram illustrating a terminal activation device in accordance with an exemplary embodiment;
FIG. 9 is a block diagram illustrating details of a tag transformation module in accordance with an illustrative embodiment;
FIG. 10 is a block diagram illustrating a description of the details of a main program boot module in accordance with one illustrative embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
Fig. 1 is a block diagram of an apparatus 100 shown in an exemplary embodiment. For example, the apparatus 100 may be an intelligent terminal, e.g. a smart television terminal.
Referring to fig. 1, the apparatus 100 may include one or more of the following components: a processing component 102, a memory 104, a power component 106, a multimedia component 108, an audio component 110, a sensor component 114, and a communication component 116.
The processing component 102 generally controls overall operation of the device 100, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations, among others. The processing components 102 may include one or more processors 118 to execute instructions to perform all or a portion of the steps of the methods described below. Further, the process component 102 can include one or more modules that facilitate interaction between the process component 102 and other components. For example, the processing component 102 can include a multimedia module to facilitate interaction between the multimedia component 108 and the processing component 102.
The memory 104 is configured to store various types of data to support operations at the apparatus 100. Examples of such data include instructions for any application or method operating on the device 100. The memory 104 may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks. Also stored in memory 104 are one or more modules configured to be executed by the one or more processors 118 to perform all or a portion of the steps of any of the methods of fig. 2, 3, and 4, described below.
The power supply component 106 provides power to the various components of the device 100. The power components 106 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 100.
The multimedia component 108 includes a screen that provides an output interface between the device 100 and a user, in some embodiments, the screen may include a liquid crystal display (L CD) and a Touch Panel (TP). if the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user.
The audio component 110 is configured to output and/or input audio signals. For example, audio component 110 includes a Microphone (MIC) configured to receive external audio signals when apparatus 100 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 104 or transmitted via the communication component 116. In some embodiments, the audio component 110 further comprises a speaker for outputting audio signals.
The sensor assembly 114 includes one or more sensors for providing various aspects of status assessment for the device 100. For example, the sensor assembly 114 may detect the open/closed status of the device 100, the relative positioning of the components, the sensor assembly 114 may also detect a change in position of the device 100 or a component of the device 100, and a change in temperature of the device 100. In some embodiments, the sensor assembly 114 may also include a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 116 is configured to facilitate wired or wireless communication between the apparatus 100 and other devices. The device 100 may access a wireless network based on a communication standard, such as WiFi. In an exemplary embodiment, the communication component 116 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 116 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 100 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), programmable logic devices (P L D), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the methods described below.
Fig. 2 is a flow chart illustrating a method of terminal activation in accordance with an exemplary embodiment. The terminal start-up method is applicable to a smart terminal, which in one exemplary embodiment may be the apparatus shown in fig. 1. As shown in fig. 2, the method for starting the terminal may include the following steps.
In step 210, Boot program running in the terminal triggered to start is guided.
Wherein, the terminal is started, and then the starting process in the terminal is entered. And the starting process in the terminal comprises a Boot program running stage, a system main program running stage, a system layer running stage and an application layer program running stage.
Therefore, in the terminal triggered to start, the Boot program is firstly guided to run, and the Boot program is a guide loader in the terminal start.
At this time, the terminal enters the Boot operation stage.
In step 230, an offset flag for triggering is determined during the running of the Boot program, and the offset flag for triggering is dynamically changed relative to the offset flag triggered during the last Boot.
In each Boot of the terminal, an offset mark is triggered, so that the triggered offset mark is determined in the running of the Boot program. The triggered offset flag may be triggered by hardware of a hardware system in the terminal, or may be triggered by a preconfigured flag program.
When the terminal is started, the corresponding offset mark can be triggered by electrifying hardware in the hardware system, so that the offset mark triggered in the terminal starting is different from the offset mark triggered in the last starting under the control of the hardware in the hardware system.
In addition to this, an offset flag will be stored in the Boot program. When the terminal is started, a pre-configured marker program is operated in the operation stage of Boot, and the offset marker returned in the last starting is triggered, so that the offset marker stored in the Boot program is converted by using the triggered offset marker.
The offset flag is a flag bit stored in the Boot program, and is stored in a natural position by the Boot program. It should be noted that, for the offset flag, there are two types of offset flags, and the stored offset flag is one of the types.
During the operation of the Boot program, namely after the Boot program is started, the stored offset mark is modified, and the offset mark is modified into another offset mark, so that the dynamic transformation of the mark in the Boot program is realized.
In one exemplary embodiment, the offset flag may be a zero value or a non-zero value, so as to distinguish the two types of offset flags.
It can be understood that, due to the existence of the system main program and the application layer program, two types of offset flags need to be configured correspondingly, so as to control the exchange of the memory spaces used by the system main program and the application program respectively.
In step 250, the pointed memory space is determined according to the transformed offset flag, where the offset flag is used to indicate the memory space in which the main program of the system is running in the current boot.
The offset tag is substantially an address index or address pointer. The offset tag corresponds to an offset address, and thus points to the corresponding memory space. In the operation of the Boot program, the offset mark, namely the transformed offset mark, is obtained, so that the memory space used by the subsequent program operation can be determined.
Because the offset mark is dynamically changed, the memory space used by the subsequent program operation is also dynamically changed, instead of realizing the subsequent program operation by solidifying the memory space, the debugging and the use of resources can be rationalized.
And in the operation of the Boot program, determining a pointed memory space according to the converted offset mark, wherein the memory space can be used for the operation of a subsequent system main program, namely the operation of the system main program in the current starting of the terminal.
That is, the memory space, which may be 32 bits, is switched by the offset address, and in an exemplary embodiment, the defined memory space is 0-2 to the power of 32-1.
The two memory spaces used for switching are distinguished in the form of high order bits + low order bits. Specifically, for one memory space, it corresponds to a memory space with 0(32 bits) plus the lower address, and for another memory space, it corresponds to a memory space with 0(32 bits) plus the lower address.
In step 270, the main program of the system is guided to run in the pointed memory space.
The system main program is a system Kernel, and the system main program runs, in an exemplary embodiment, the Kernel layer runs.
The Boot program guides the system main program to run in the memory space pointed by the offset mark, so that the memory space used by the system main program in the starting is different from the memory space used in the last starting.
Therefore, for two memory spaces for the system main program and the application layer program to run, the system main program can use the two memory spaces in a balanced manner, namely, the system main program runs in one memory space in one starting, and then runs in the other memory space in the next starting, so that the use frequency and the use time of each memory space are balanced through the balanced use of the memory spaces, the phenomenon that one memory space is solidified and used by the system main program and has great difference in the use frequency and the use time relative to the other memory space can be avoided, and the service life of the terminal is prolonged by balancing the use of the two memory spaces.
In step 290, after the system main program is running, the application layer program is called to enter other memory spaces.
The system main program and the application layer program are respectively operated in different memory spaces so as to ensure the smooth operation of the system main program and the application layer program.
And after the system main program runs in the memory space pointed by the offset mark, the system layer moves, the system layer runs in the same memory space as the system main program, and the application layer can be started after the system layer runs.
For the operation of the application layer program, the operation is realized in another memory space.
Therefore, compared with the starting process of the terminal at the last time, the memory space used by the system main program and the application layer program is exchanged once, and the memory space is effectively and uniformly used.
Through the terminal starting process, under the action of the offset mark, dynamic adjustment of memory spaces used by a system main program and an application layer program is realized, and for the system main program which runs continuously, namely the memory space where the system main program is located is used continuously, so that the dynamic adjustment of the used memory space avoids excessive use of a memory space and accumulated damage of the process, and the product life of the terminal is not restricted due to the limitation of the memory space.
In an exemplary embodiment, step 230 may include the following steps.
And in the operation of the Boot program, converting the stored offset mark into an offset mark which is consistent with a mark for powering on hardware in a hardware system, and determining the offset mark obtained by conversion as a triggered offset mark.
As mentioned above, the two types of offset flags are set relatively, that is, one type of offset flag is triggered when the terminal is started this time, and the other type of offset flag is triggered when the terminal is started next time, that is, under the control of hardware in the hardware system, offset is realized relative to the last terminal start in each terminal start.
Specifically, the method is described. The hardware system of the terminal has an STRAP circuit or a config circuit, and the function of the STRAP circuit or the config circuit is to determine the operation entry address of system start, so that the triggered offset mark can be determined by controlling the mark of hardware power-on, and further the memory space of the system main program operation in the start is indicated.
Specifically, a hardware circuit matched with the STRAP circuit or the config circuit may be provided in the hardware system, and the conversion of the power-on flag may be realized by the hardware circuit. In a specific implementation of an exemplary embodiment, the hardware circuit may be a switch circuit, and when the switch is closed, the powered-on flag is 0, and then the corresponding triggered offset flag is correspondingly 0; when the switch is turned off, the power-on flag is 1, and the offset flag corresponding to the trigger is 1 accordingly.
Through the specific implementation of the offset mark transformation, the thoroughness of the prior operation process in the terminal starting process is ensured, and the rational scheduling of the memory space in the terminal starting process is realized through hardware triggering, so that the method has very high reliability and stability, and the complexity of the realization is also reduced.
In another exemplary embodiment, step 230, may include the following steps.
And converting the stored offset mark into an offset mark associated with the environment variable according to the environment variable returned by the main program of the system in the last starting, and determining the offset mark obtained by conversion as a triggered offset mark.
The environment variable is an offset address, and the environment variable corresponds to an offset mark, so that the offset mark is determined according to the environment variable returned by the main program of the system in the last starting, and the stored offset mark is converted into the offset mark. The environment variables specify the range of the memory space, i.e. the starting logical address and the ending address, the address length, etc.
Specifically, the Boot program in the last Boot will receive the environment variable returned from the main program of the system, and in this Boot, the Boot program will modify the stored offset flag according to the returned environment variable.
In the process, specific implementation on software dimension is provided for determining the triggered offset marker, so that the interactive memory space can be started relatively last time under the trigger of the offset marker during the starting.
FIG. 3 is a flowchart illustrating details of the step of transforming the stored offset tag to the offset tag associated with the environment variable based on the environment variable returned from the main program of the system at the last boot in accordance with an exemplary embodiment. The step of converting the stored offset flag into the offset flag associated with the environment variable according to the environment variable returned from the main program of the system during the last startup, as shown in fig. 3, may include the following steps.
In step 231, the environment variables returned from the main program of the system and the environment variables backed up in the last startup are determined.
After the Boot program is started, an environment variable returned from the last started system main program to the Boot program is determined, and the environment variable indicates a memory space used by the last started system main program.
The backup environment variable is stored in a proper position, and the Boot program after being started determines the backup environment variable from the proper position. The backed-up environment variable indicates the memory space used by the main program of the system in the last start corresponding to the last start of the current start.
In step 233, the environment variables returned from the main program of the system during the last startup are compared with the backup environment, and the backup environment variables are activated when the two are not consistent.
When the environment variable returned by the system main program in the last starting is not consistent with the backup environment variable, it can be confirmed that the memory space exchange is realized in the last two starting, and the backup environment variable should be started to indicate the memory space used by the system main program to run in the current starting, so as to realize the memory space exchange in the current starting.
In step 235, the stored offset flag is transformed to the offset flag associated with the launched environment variable.
Through the process described above, a specific implementation is provided for the conversion of the offset mark in the software dimension, namely, the conversion of the offset mark is realized through the environment variable maintained in the main program of the system.
After the conversion of the offset mark is completed, the backup environment variable is removed, and the environment variable returned by the system main program in the last startup is backed up, so that the conversion of the offset mark can be conveniently realized in the next startup.
FIG. 4 is a flowchart illustrating a description of details of step 270 according to an example embodiment. This step 270, as shown in FIG. 4, may include the following steps.
In step 271, the main program of the system is decompressed.
In step 273, the decompressed system main program is run in the pointed memory space.
After the pointed memory space is determined through step 250 in the embodiment corresponding to fig. 2, the system main program may be decompressed and loaded into the pointed memory space for operation.
In the implementation process, the memory spaces used by the system main program and the Boot program may be the same or different.
When the Boot program runs, the exchange of the memory space is not executed, so the memory space where the Boot program runs is specified initially. The system main program exchanges the memory space, so the system main program is not limited to the memory space used by the Boot program.
In an exemplary embodiment, the environment variables are stored by the main program of the system itself, then step 273 may include the following steps.
And comparing the environment variable associated with the offset mark with the environment variable stored in the system main program, and running the decompressed system main program in the pointed memory space when the environment variable associated with the offset mark is inconsistent with the environment variable stored in the system main program.
Before the main program of the system runs, the comparison and confirmation of the environment variables are carried out to prevent transmission errors and further avoid abnormity caused by the transmission errors.
The environment variable stored in the main program of the system is stored on one hand, and on the other hand, the environment variable is also transmitted back to the Boot program when the system is started last time.
And the environment variable associated with the offset mark is the environment variable backed up in the Boot program, and when a transmission error occurs, the environment variable returned by the system main program is consistent with the environment variable backed up in the Boot program, so that the normal startup of the terminal is ensured through the comparison and confirmation of the environment variables.
In step 275, an offset address is determined based on the memory space pointed to, and the environment variable is determined from the offset address.
The memory space uniquely corresponds to a logical address, and the logical address is in a form of a base address + an offset address, so that a change in the offset address corresponds to a change in the memory space.
And the running system main program determines an offset address according to the currently used memory space, and the offset address is used as an environment variable, so that the maintenance of the environment variable in the system main program is realized.
In step 277, the environment variables are passed back to the Boot program.
After determining the current corresponding environment variable, the system main program returns the environment variable to the Boot program, so that the Boot program can realize the conversion of the offset mark based on the environment variable in the next Boot.
Through the process, the maintenance of the environment variable is realized in the running system main program, and a basis is further provided for the memory space exchange of the subsequent starting.
The terminal starting method is described in combination with a specific application scenario. It should be noted that, first, the PHY layer controller of the processor in the terminal is used for processing the logic related to the memory space. Fig. 5 is a block diagram illustrating an implementation of a processor in a terminal according to an example embodiment.
As shown in fig. 5, DDR1 and DDR2 are controlled by PHY0 in the PHY layer controller, labeled as memory space DDRX0, and PHY1 controls DDR3 and DDR4, labeled as memory space DDRX 1.
In the implementation of the prior art, each time a terminal is started, after a Boot program is completely run, the terminal enters a first main program to run, the terminal is controlled to run in DDRX0 through PHY0, and the main program of the system belongs to a normal working state.
And the application layer program is controlled by the PHY1 to run in the DDRX1, and the application layer program is run when the user runs the application.
Fig. 6 is a flow chart illustrating a prior art implementation of terminal activation according to an illustrative example. As described above, the starting process in the terminal includes the operation phase of the Boot program, the operation phase of the system main program, the operation phase of the system layer, and the operation phase of the application layer program, that is, the Boot program operation 310, the Kernel layer operation 330, the system layer operation 350, and the application layer operation 370 shown in fig. 6 correspond to each other.
Boot program operation 310, Kernel layer operation 330 and system layer operation 350 are implemented in DDRX0, and application layer operation 370 is implemented in DDRX 1.
Specifically, a System On Chip (SOC) in the terminal runs a Boot program, i.e., performs a stage of executing the Boot program 310.
The Boot program runs at a low speed in an EMMC (Embedded Multi Media Card) and then runs at a high speed in the DDRX0, so as to guide the Kernel layer to run.
When the operation of the Kernel layer is finished, the system layer operates, and then the application layer is started to operate the DDRX1 at a high speed.
As can be seen from this process, in the existing terminal start-up implementation, the entire system operation system is operated in the DDRX0, only the application layer operated by the user is operated in the DDRX1, and the DDRX1 operation is based on the DDRX 0.
DDRX0 is therefore in normal operation, while DDRX1 is idle most of the time, resulting in unbalanced use of DDRX0 and DDRX 1.
The defect of unbalanced use of the DDRX0 and the DDRX1 is solved by the terminal starting method realized by the disclosure.
Fig. 7 is a diagram illustrating a terminal-initiated application implemented by the present disclosure according to an exemplary embodiment. It should be noted that, in the terminal Boot implemented in fig. 7, the Boot process is still performed, that is, Boot program operation 310, Kernel layer operation 330, system layer operation 350, and application layer operation 370.
However, in the Boot process, the Boot program has an offset flag, and the offset flag triggers the switching of the memory space. As indicated by the Boot program execution 310 stage, the offset flag will be triggered by an environment variable or hardware implementation. Thereafter, as shown in step 410, it is determined whether the next system main program moves to DDRX0 or DDRX1 according to the offset flag, and the maintenance and determination of the environment variable are performed at the time of Kernel layer startup, so as to be used as the decision for the subsequent system main program to import space.
In a specific implementation, as indicated on the right side of the Boot process in fig. 7, the Boot program records a first offset address and a second offset address, so as to determine which DDRX the system main program is guided to run.
Therefore, the DDRX0 is operated at high speed after the main program of the system is decompressed for the first time, and the DDRX1 is operated after the second pass judgment.
Correspondingly, after the first system layer is operated, the application layer is started to operate at the high speed of the DDRX1, and after the second system layer is operated, the application layer is started to operate in the DDRX 1.
For the record of the offset mark in the Boot program, only one maintenance is needed in the Boot program, and the following example is given:
if offset flag is 0
Entry 00000001;
Else
Entry 10000001
Where 00000001 corresponds to DDRX0 and 10000001 corresponds to DDRX 1.
By the implementation process described above, the product life can be improved by 50%, and the balanced use of DDRX0 and DDRX1 also improves the reliability and the use performance of the system.
The following is an embodiment of the apparatus of the present disclosure, which may be used to execute an embodiment of a terminal starting method executed by the terminal of the present disclosure. For details not disclosed in the embodiments of the device of the present disclosure, please refer to the embodiments of the terminal starting method of the present disclosure.
Fig. 8 is a block diagram illustrating a terminal activation device according to an exemplary embodiment. The terminal starting device, as shown in fig. 8, may include but is not limited to: boot guiding module 510, mark transformation module 530, space determination module 550, main program guiding module 570 and application layer calling module 590.
And a Boot guiding module 510, configured to trigger a started terminal to guide a Boot program to run.
And the mark transformation module 530 is used for determining a triggered offset mark in the running of the Boot program, wherein the triggered offset mark is dynamically changed relative to the offset mark triggered in the last starting.
The space determining module 550 is configured to determine the pointed memory space according to the triggered offset flag, where the offset flag is used to indicate the memory space in which the system main program runs in the current startup.
The main program guiding module 570 is configured to guide the system main program to run in the pointed memory space.
And the application layer calling module 590 is used for calling the application layer program to enter other memory spaces after the system main program runs.
In an exemplary embodiment, the flag transformation module 530 is further configured to trigger the offset flag according to power-on of hardware in the hardware system during the execution of the Boot program.
In another exemplary embodiment, the flag transformation module 530 is further configured to transform the stored offset flag into an offset flag associated with the environment variable according to the environment variable returned from the main program of the system in the last startup, and determine that the offset flag obtained by the transformation is the triggered offset flag.
FIG. 9 is a block diagram illustrating a description of details of a tag transformation module in accordance with an exemplary embodiment. The tag transformation module 530, as shown in fig. 9, may include, but is not limited to: an environment variable determining unit 531, a comparing unit 533, and a transformation performing unit 535.
The environment variable determining unit 531 is configured to determine an environment variable returned by the system main program in the last startup and a backup environment variable.
The comparing unit 533 is configured to compare the environment variable returned by the system main program during the last startup with the backup environment variable, and start the backup environment variable when the two are determined to be inconsistent.
A transformation performing unit 535 for transforming the stored offset flag to an offset flag associated with the enabled environment variable.
FIG. 10 is a block diagram illustrating a description of the details of a main program boot module in accordance with one illustrative embodiment. The main program guide module 570 may include, but is not limited to: a main program decompression unit 571, a main program running unit 573, an offset determination unit 575, and a variable pass back unit 577.
And a main program decompression unit 571, configured to decompress the system main program.
And a main program running unit 573, configured to run the decompressed system main program in the pointed memory space.
And an offset determining unit 575, configured to determine an offset address according to the pointed memory space, and determine an environment variable according to the offset address.
And a variable returning unit 577, configured to return the environment variable to the Boot program.
In an exemplary embodiment, the environment variable is stored by the system main program itself, and the main program running unit 573 is further configured to compare the environment variable associated with the offset tag with the environment variable stored by the system main program itself, and if the two are not consistent, run the decompressed system main program in the pointed memory space.
Optionally, the present disclosure further provides an intelligent terminal, which may be used in the implementation environment shown in fig. 1 to execute all or part of the steps of the terminal starting method shown in any one of fig. 2, fig. 3 and fig. 4.
The device comprises:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform:
triggering a Boot program in the started terminal to run;
transforming the stored offset marks in the operation of the Boot program;
determining a pointed memory space according to the converted offset mark, wherein the offset mark is used for indicating the memory space in which the system main program runs in the starting;
guiding a system main program to run in the pointed memory space;
and after the system main program runs, calling an application layer program to enter other memory spaces.
The specific manner in which the processor of the apparatus in this embodiment performs operations has been described in detail in the embodiment related to the terminal start-up method, and will not be elaborated upon here.
In an exemplary embodiment, a storage medium is also provided that is a computer-readable storage medium, such as may be transitory and non-transitory computer-readable storage media, including instructions. The storage medium refers, for example, to the memory 104 including instructions executable by the processor 118 of the device 100 to perform the terminal activation method described above.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.
Claims (12)
1. A terminal starting method is characterized by comprising the following steps:
triggering a Boot program in the started terminal to run;
determining an offset mark triggered in the Boot program in the operation process, wherein the offset mark triggered in the Boot program is dynamically changed relative to the offset mark triggered in the last Boot program;
determining a pointed memory space according to the offset mark triggered in the starting, wherein the offset mark triggered in the starting is used for indicating the memory space of the system main program running in the starting;
guiding a system main program to run in the pointed memory space;
and after the system main program runs, calling an application layer program to enter other memory spaces.
2. The method according to claim 1, wherein the determining a triggered offset flag in the execution of the Boot program comprises:
and triggering an offset mark according to the electrification of hardware in a hardware system in the running process of the Boot program.
3. The method according to claim 1, wherein the determining a triggered offset flag in the execution of the Boot program comprises:
converting the stored offset mark into an offset mark associated with an enabled environment variable according to the environment variable returned by the main program of the system in the last starting, wherein the enabled environment variable is inconsistent with the returned environment variable;
determining that the transformed offset flag is a triggered offset flag.
4. The method according to claim 3, wherein the transforming the stored offset tag into the offset tag associated with the environment variable according to the environment variable returned from the main program of the system during the last boot comprises:
determining an environment variable returned by the system main program in the last starting and a backup environment variable, wherein the backup environment variable indicates a memory space used by the system main program in the last starting corresponding to the last starting before the current starting;
comparing the environmental variable returned by the system main program in the last startup with the backup environmental variable, and starting the backup environmental variable when judging that the environmental variable and the backup environmental variable are not consistent;
transforming the stored offset indicia to an offset indicia associated with the enabled environment variable of the backup.
5. The method of claim 1, wherein the booting a system main program to run in the memory space pointed to comprises:
decompressing the main program of the system;
running the decompressed system main program in the pointed memory space;
determining an offset address according to the pointed memory space, and determining an environment variable according to the offset address;
and transmitting the environment variable back to the Boot program.
6. The method of claim 5, wherein the environment variable is stored by the system main program itself, and the running the decompressed system main program in the pointed memory space comprises:
and comparing the environment variable associated with the offset mark triggered in the starting with the environment variable stored in the system main program, and running the decompressed system main program in the pointed memory space when the environment variable associated with the offset mark and the environment variable stored in the system main program are not consistent.
7. A terminal activation apparatus, comprising:
the Boot guiding module is used for triggering the started terminal to guide a Boot program to run;
the mark conversion module is used for determining an offset mark triggered in the Boot program in the operation process of the Boot program, wherein the offset mark triggered in the Boot program is dynamically changed relative to the offset mark triggered in the last Boot program;
the space determining module is used for determining a pointed memory space according to the offset mark triggered in the starting, and the offset mark triggered in the starting is used for indicating the memory space of the system main program running in the starting;
the main program guiding module is used for guiding the system main program to operate in the pointed memory space;
and the application layer calling module is used for calling the application layer program to enter other memory spaces after the system main program runs.
8. The apparatus according to claim 7, wherein the flag transformation module is further configured to trigger an offset flag according to power-on of hardware in a hardware system during running of the Boot program.
9. The apparatus according to claim 7, wherein the flag transformation module is further configured to transform the stored offset flag into an offset flag associated with an enabled environment variable according to an environment variable returned from a main program of the system during a last boot, the enabled environment variable being inconsistent with the returned environment variable; and determining that the offset mark obtained by the transformation is the triggered offset mark.
10. The apparatus of claim 9, wherein the tag transformation module comprises:
the system comprises an environment variable determining unit, a storage unit and a processing unit, wherein the environment variable determining unit is used for determining an environment variable returned by a system main program in the last starting and a backup environment variable, and the backup environment variable indicates a memory space used by the system main program in the last starting corresponding to the last starting before the current starting;
the comparison unit is used for comparing the environmental variable returned by the system main program in the last startup with the backup environmental variable, and starting the backup environmental variable when the environmental variable and the backup environmental variable are judged to be inconsistent;
a transformation execution unit for transforming the stored offset flag into an offset flag associated with the enabled environment variable of the backup.
11. The apparatus of claim 7, wherein the main program boot module comprises:
the main program decompression unit is used for decompressing the main program of the system;
the main program running unit is used for running the decompressed system main program in the pointed memory space;
the offset determining unit is used for determining an offset address according to the pointed memory space and determining an environment variable according to the offset address;
and the variable returning unit is used for returning the environment variable to the Boot program.
12. The apparatus according to claim 11, wherein the environment variable is stored by the system main program itself, the main program running unit is further configured to compare the environment variable associated with the offset flag triggered in the current boot with the environment variable stored in the system main program itself, and when the environment variable associated with the offset flag triggered in the current boot does not coincide with the environment variable stored in the system main program itself, run the decompressed system main program in the pointed memory space.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610867963.0A CN106648594B (en) | 2016-09-30 | 2016-09-30 | Terminal starting method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610867963.0A CN106648594B (en) | 2016-09-30 | 2016-09-30 | Terminal starting method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106648594A CN106648594A (en) | 2017-05-10 |
CN106648594B true CN106648594B (en) | 2020-07-10 |
Family
ID=58853562
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610867963.0A Active CN106648594B (en) | 2016-09-30 | 2016-09-30 | Terminal starting method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106648594B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1435759A (en) * | 2002-01-31 | 2003-08-13 | 记忆科技(深圳)有限公司 | Storage method based on non-volatile memory device file system |
CN103246610A (en) * | 2012-02-14 | 2013-08-14 | 中国科学院上海微系统与信息技术研究所 | Dynamic storage management method of embedded system based on single-type memory |
CN103744736A (en) * | 2014-01-09 | 2014-04-23 | 深圳Tcl新技术有限公司 | Method for memory management and Linux terminal |
CN104778060A (en) * | 2015-04-07 | 2015-07-15 | 珠海全志科技股份有限公司 | Rapid and safe starting method for embedded Linux system |
CN105786554A (en) * | 2014-12-23 | 2016-07-20 | 希姆通信息技术(上海)有限公司 | Dynamic memory utilization method and device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9009441B2 (en) * | 2012-06-04 | 2015-04-14 | Qualcomm Incorporated | Memory channel selection in a multi-channel memory |
-
2016
- 2016-09-30 CN CN201610867963.0A patent/CN106648594B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1435759A (en) * | 2002-01-31 | 2003-08-13 | 记忆科技(深圳)有限公司 | Storage method based on non-volatile memory device file system |
CN103246610A (en) * | 2012-02-14 | 2013-08-14 | 中国科学院上海微系统与信息技术研究所 | Dynamic storage management method of embedded system based on single-type memory |
CN103744736A (en) * | 2014-01-09 | 2014-04-23 | 深圳Tcl新技术有限公司 | Method for memory management and Linux terminal |
CN105786554A (en) * | 2014-12-23 | 2016-07-20 | 希姆通信息技术(上海)有限公司 | Dynamic memory utilization method and device |
CN104778060A (en) * | 2015-04-07 | 2015-07-15 | 珠海全志科技股份有限公司 | Rapid and safe starting method for embedded Linux system |
Also Published As
Publication number | Publication date |
---|---|
CN106648594A (en) | 2017-05-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2945058A1 (en) | Processing method and device for application program | |
CN105094903A (en) | Method and device for upgrading firmware | |
CN107885683B (en) | Terminal and current testing method thereof | |
EP3040856B1 (en) | Firmware refreshing method and device | |
CN105553963A (en) | Control method and device of positioning services | |
US8964610B2 (en) | System and method of reducing factory program time for wireless devices | |
US20140189338A1 (en) | Electronic device and method for detecting booting time period for electronic device | |
CN104281478A (en) | Method and device for updating application programs | |
CN109284142A (en) | File preloading method and device, electronic equipment and computer readable storage medium | |
CN105468410A (en) | System upgrading method and device | |
CN106649098A (en) | Method and device for achieving version-release-software debugging on terminal device | |
CN108182085B (en) | Terminal screen awakening method and device, terminal and storage medium | |
CN111381892B (en) | Data processing method, device, equipment and machine-readable medium | |
CN107786729A (en) | A kind of operating system update method and terminal | |
US20210303132A1 (en) | Electronic device and method for controlling the electronic device | |
CN106648594B (en) | Terminal starting method and device | |
CN105446835A (en) | Method and device for repairing system file | |
US8249668B2 (en) | Communication device and power saving method thereof | |
CN104618606B (en) | Method and system for starting up mobile terminal | |
CN110069394A (en) | Method for testing software, system, electronic equipment and computer readable storage medium | |
CN116737213A (en) | Hot patch upgrade method, multi-core processor, related equipment and storage medium | |
CN106453844B (en) | Equipment control method and device | |
CN104391742A (en) | Application optimization method and device | |
CN107506199B (en) | HOOK method, HOOK device and computer readable storage medium | |
CN105094891A (en) | Method and device for effect display |
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 | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 266000, No. 218, Bay Road, Qingdao economic and Technological Development Zone, Shandong Applicant after: Hisense Visual Technology Co., Ltd. Address before: 266555 Qingdao economic and Technological Development Zone, Shandong, Hong Kong Road, No. 218 Applicant before: QINGDAO HISENSE ELECTRONICS Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |