CN112148100A - Embedded equipment control method, device and system - Google Patents

Embedded equipment control method, device and system Download PDF

Info

Publication number
CN112148100A
CN112148100A CN201910559425.9A CN201910559425A CN112148100A CN 112148100 A CN112148100 A CN 112148100A CN 201910559425 A CN201910559425 A CN 201910559425A CN 112148100 A CN112148100 A CN 112148100A
Authority
CN
China
Prior art keywords
value
starting
program
environment variable
target
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.)
Granted
Application number
CN201910559425.9A
Other languages
Chinese (zh)
Other versions
CN112148100B (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.)
Xian Novastar Electronic Technology Co Ltd
Original Assignee
Xian Novastar Electronic 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 Xian Novastar Electronic Technology Co Ltd filed Critical Xian Novastar Electronic Technology Co Ltd
Priority to CN201910559425.9A priority Critical patent/CN112148100B/en
Publication of CN112148100A publication Critical patent/CN112148100A/en
Application granted granted Critical
Publication of CN112148100B publication Critical patent/CN112148100B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/263Arrangements for using multiple switchable power supplies, e.g. battery and AC
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Power Engineering (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to a method, a device and a system for controlling embedded equipment. The embedded device control method comprises the following steps: starting a bootstrap program; reading and judging whether the target environment variable value is a first value or a second value; after the target environment variable value is judged to be the first value, the state of the power key is read to judge whether the power key is pressed down, and when the power key is judged to be pressed down, a target service function program in the bootstrap program, an operating system kernel and a root file system are sequentially operated; or after the target environment variable value is judged to be the second value, the target service function program in the bootstrap program, the kernel of the starting operation system and the root file system are sequentially operated. After the boot program is started, the method can make the shutdown state of the embedded device stay in the boot program starting state with extremely low power consumption by reading and judging the value of the target environment variable, thereby avoiding the surge generated during the restart or shutdown operation.

Description

Embedded equipment control method, device and system
Technical Field
The invention belongs to the technical field of embedded systems, and particularly relates to an embedded device control method, an embedded device control device and an embedded device control system.
Background
Shutdown, standby and restart are common functions of electronic and electrical devices, shutdown generally refers to cutting off power supply to the device to completely shut down the device, standby generally refers to a state where the device is turned on but does not perform any substantial work, and restart refers to restarting the device. These functions are also required in embedded devices, which are composed mainly of an embedded processor, associated support hardware, and an embedded software system, which is an "element" that integrates software and hardware into one and can work independently. The embedded system is different from a general processing system, and does not have a large-capacity storage medium like a hard disk, but a flash memory is mostly used as the storage medium, and due to the particularity and diversity of the embedded system, the embedded system is also greatly different from the shutdown, the standby and the restart of a computer.
The current shutdown or restart processing scheme of the equipment comprises a cold processing method and a heat processing method, wherein the cold processing method is to realize the on and off of a power supply through a physical key when the equipment has an independent power supply module, so as to realize the startup, shutdown and restart of the equipment. The cold processing method can generate extremely high instantaneous induction voltage in a loop of a power supply during shutdown and restart, namely, the phenomenon of surge, and damages both the power supply and a mainboard.
The heat treatment method is to control the power management chip by software to realize the shutdown and restart of the system, the system is restarted and shut down by software in the kernel, at the moment, the power is always stably connected and is not disconnected, so the power management chip is only reset during restart, and the voltage output by the power management chip is lower, so the surge phenomenon can be avoided. However, since software cannot be shut down, the shutdown still requires hardware to operate to disconnect the power supply, and a surge phenomenon is also generated in a power supply circuit when the software is started next time after the shutdown, so that the device is easily damaged.
Disclosure of Invention
The embodiment of the invention provides an embedded equipment control method, an embedded equipment control device and an embedded equipment control system, which can avoid surge generated when the embedded equipment is restarted or shut down.
In one aspect, an embodiment of the present invention provides an embedded device control method, including:
starting a bootstrap program;
reading and judging whether the target environment variable value is a first value or a second value; and
after the target environment variable value is judged to be the first value,
reading the state of a power key to judge whether the power key is pressed down, and sequentially running a target service function program in the bootstrap program, starting an operating system kernel and starting a root file system when the power key is judged to be pressed down; or the like, or, alternatively,
and after the target environment variable value is judged to be the second value, sequentially running the target service function program in the bootstrap program, starting the kernel of the operating system and starting the root file system.
The embedded device control method reads and judges a target environment variable value after a boot program is started, reads a voltage key state after the target environment variable value is judged to be a first value, finishes the starting work of the embedded device in sequence if a power key is pressed, does not execute any operation if the power key is not pressed, namely does not press the power key, at the moment, the embedded device is actually kept in the boot program starting state, the power consumption in the state is extremely low, the embedded device reaches the state similar to shutdown, and the embedded device is not powered off when in the shutdown state, so that the phenomenon that the embedded device generates surge due to extremely high instantaneous induction voltage when the embedded device is restarted or started next time after shutdown is avoided.
In an embodiment of the present invention, after the root file system is started, the method further includes:
judging whether the user input operation is a shutdown operation or a restart operation; and
when it is judged that the user input operation is a restart operation,
setting the target environment variable value to the second value,
starting the boot program, an
After reading and judging that the target environment variable value is the second value, sequentially running the second part of the target service function program in the bootstrap program, starting the kernel of the operating system and starting the root file system; or
When it is judged that the user input operation is a shutdown operation,
setting the target environment variable value to the first value,
starting the boot program, an
And after reading and judging that the target environment variable value is the first value, reading the state of a power key to judge whether the power key is pressed down, and sequentially running the target service function program in the bootstrap program, starting the kernel of the operating system and starting the root file system when judging that the power key is pressed down.
In an embodiment of the present invention, before the reading and determining whether the target environment variable value is the first value or the second value, the method includes: a first part step of running the target business function program in the bootstrap program.
In one embodiment of the present invention, after determining that the target environment variable value is the first value,
reading the state of a power key to judge whether the power key is pressed down, and when judging that the power key is pressed down, sequentially operating a second part of the target business function program in the bootstrap program, starting an operating system kernel and starting a root file system; or
And after the target environment variable value is judged to be the second value, sequentially running a second part of steps of the target service function program in the bootstrap program, starting the kernel of the operating system and starting the root file system.
In an embodiment of the present invention, a time consumption of the step of running the first part of the target business function program in the boot program is greater than a time consumption of the step of running the second part of the target business function program in the boot program.
In one embodiment of the present invention, the first partial step includes a Logo picture loading step, and the second partial step includes a Logo picture displaying step.
In an embodiment of the present invention, after the root file system is started, the method further includes:
judging whether the user input operation is a shutdown operation or a restart operation; and
when it is judged that the user input operation is a restart operation,
setting the target environment variable value to the second value,
the boot-up procedure is started up and,
running the first part of the target business function program in the bootstrap program, an
And after reading and judging that the target environment variable value is the second value, sequentially running the second part of the target service function program in the bootstrap program, starting the kernel of the operating system and starting the root file system.
In an embodiment of the present invention, after the root file system is started, the method further includes:
judging whether the user input operation is a shutdown operation or a restart operation; and
when it is judged that the user input operation is a shutdown operation,
setting the target environment variable value to the first value,
the boot-up procedure is started up and,
running the first part of the target business function program in the bootstrap program, an
And after reading and judging that the target environment variable value is the first value, reading the state of a power key to judge whether the power key is pressed, and sequentially operating the second part of the target service function program in the bootstrap program, starting the kernel of the operating system and starting the root file system when judging that the power key is pressed.
In another aspect, an embodiment of the present invention provides an embedded device control apparatus, including:
the starting module is used for starting a bootstrap program;
the running module is used for running a first part of steps of a target business function program in the bootstrap program;
the reading judgment module is used for reading and judging whether the target environment variable value is a first value or a second value;
a first conditional execution module to:
after the target environment variable value is judged to be the first value, the state of a power key is read to judge whether the power key is pressed down, and when the power key is judged to be pressed down, the target service function program in the bootstrap program, the kernel of the start-up operating system and the start-up root file system are sequentially operated; or
After the target environment variable value is judged to be the second value, the target service function program in the bootstrap program is sequentially operated, the kernel of the operating system is started, and the root file system is started; and
a second conditional execution module to:
after the target environment variable value is judged to be the first value, reading the state of a power key to judge whether the power key is pressed down, and when the power key is judged to be pressed down, sequentially running a second part of the target service function program in the bootstrap program, starting an operating system kernel and starting a root file system; or
And after the target environment variable value is judged to be a second value, sequentially running a second part of steps of the target service function program in the bootstrap program, starting the kernel of the operating system and starting the root file system.
The embedded equipment control device is provided with a reading judgment module which is used for reading and judging whether a target environment variable value is a first value or a second value, and executing shutdown or restart operation according to a judgment result, so that the shutdown state of the embedded equipment can be stopped in a boot program starting state with extremely low power consumption, and the surge generated when the embedded equipment is restarted or shutdown operation is avoided.
In another aspect, an embodiment of the present invention provides an embedded device control system, including: a processor and a memory; the memory stores instructions executed by the processor, and the processor is used for executing the instructions to realize any one of the embedded device control methods.
Compared with the prior art, the embodiment of the invention has the beneficial effects that:
1. according to the embedded device control method provided by the embodiment of the invention, the shutdown state of the embedded device can be stopped in the boot program starting state with extremely low power consumption by reading and judging the target environment variable value and then executing the shutdown or restart operation, so that the surge generated when the embedded device is restarted or shutdown is avoided.
2. The embedded device control method of the embodiment of the invention pre-processes the first part of the time consumption in the target service function program during the shutdown, so that the startup time is shortened during the next startup.
The foregoing description is only an overview of the technical solutions in the embodiments of the present invention, and in order to make the technical means of the present invention more clearly understood, the present invention may be implemented according to the content of the description, and in order to make the above and other objects, features, and advantages of the present invention more clearly understood, the following preferred embodiments are described in detail with reference to the accompanying drawings.
Drawings
Fig. 1 is a flowchart of an embedded device control method according to a first embodiment of the present invention.
Fig. 2 is a flowchart of an embedded device control method according to a second embodiment of the present invention.
Fig. 3 is a flowchart of an embedded device control method according to a third embodiment of the present invention.
Fig. 4 is a flowchart of an embedded device control method according to a fourth embodiment of the present invention.
Fig. 5 is a flowchart of an embedded device control method according to a fifth embodiment of the present invention.
Fig. 6 is a block diagram of an embedded device control apparatus according to a sixth embodiment of the present invention.
Fig. 7 is a block diagram of an embedded device control apparatus according to a seventh embodiment of the present invention.
Fig. 8 is a schematic structural diagram of an embedded device control system according to an eighth embodiment of the present invention.
Fig. 9 is a schematic diagram of a storage medium according to a ninth 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. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
[ first embodiment ] A method for manufacturing a semiconductor device
Referring to fig. 1, fig. 1 is a flowchart of an embedded device control method according to a first embodiment of the present invention. As shown in fig. 1, the method of the present embodiment includes the following steps:
s1: starting a bootstrap program;
in an operating system of an embedded device, the Boot program is uboot, the uboot is one of bootloaders, which is called a Universal Boot Loader, and the bootloader is a small program that runs before a kernel of the operating system runs.
S2: reading and judging whether the target environment variable value is a first value or a second value;
in this embodiment, the target environment variable is a dev-reboot restart environment variable, where the first value is, for example, a dev-reboot value of 0, and the second value is, for example, a dev-reboot value of 1.
S3: after the target environment variable value is judged to be a first value, the state of a power key is read to judge whether the power key is pressed down, and when the power key is judged to be pressed down, a target service function program in the bootstrap program, an operating system kernel and a root file system are sequentially operated, otherwise, the step S4 is executed;
after the value of dev-rebot is judged to be 0, reading and judging the state of a power key of the embedded equipment, and if the power key is not pressed, the embedded equipment is in a shutdown state; and if the power key is pressed, sequentially running a target service function program in the bootstrap program, starting an operating system kernel and starting a root file system.
S4: and after the target environment variable value is judged to be the second value, the target service function program in the bootstrap program, the kernel of the operating system and the root file system are sequentially operated.
Namely, after the value of the dev-rebot is judged to be 1, the target service function program in the bootstrap program is sequentially run, the kernel of the operating system is started, and the root file system is started.
In this embodiment, the target business function program in the bootstrap program includes, for example, a Logo image loading step and a Logo image displaying step. The operating system kernel is the most basic part of an operating system, which is used to provide the most basic functions of the operating system and is the basis on which the operating system works. The root file system is the first file system mounted when the kernel is started, and is a precondition for loading other file systems, the file system is a mechanism for organizing data and metadata on a storage device, the mechanism is favorable for interaction between a user and an operating system, and the root file system is a main tool adopted for interaction between the user and the operating system. And after the root file system and the file system are started, finishing the starting operation of the embedded equipment.
The embedded device control method of the embodiment reads and judges the target environment variable value after the boot program is started, reads the voltage key state after the target environment variable value is judged to be the first value, and completes the startup work of the embedded device in sequence if the power key is pressed, and does not execute any operation if the power key is not pressed, that is, when the power key is not pressed, at the moment, the embedded device is actually kept in the boot program startup state, the power consumption in the state is extremely low, and the state similar to shutdown is achieved, and because the embedded device is not powered off when being in the shutdown state, the surge generated during the next startup operation after the boot or shutdown is avoided.
[ second embodiment ]
Referring to fig. 2, fig. 2 is a flowchart of an embedded device control method according to a second embodiment of the present invention. As shown in fig. 2, in the first embodiment, after the root file system is started, the method further includes the following steps:
s5: judging whether the user input operation is a shutdown operation or a restart operation;
after the embedded device finishes the starting operation, namely the embedded device is in the running process, if a user inputs an operation command to the embedded device at the moment, the operation command comprises shutdown operation and restart operation, and the embedded device carries out the following steps according to the judgment result of the operation command.
S6: and setting the target environment variable value as the first value or the second value according to the judgment result of the user input operation.
Specifically, if the user input operation is the shutdown operation, setting the value of the dev-reboot to the first value, that is, to 0; and if the user input operation is the restarting operation, setting the value of the dev-rebot to be the second value, namely 1. In the present embodiment, the dev-reboot restart environment variable is modified by adopting an fw-setenv command, which is a command in an fw-env series tool and has the function of modifying the environment variable in the uboot
S7: steps S1 through S4 are repeated.
[ third embodiment ]
Referring to fig. 3, fig. 3 is a flowchart of an embedded device control method according to a third embodiment of the present invention. As shown in fig. 3, the method of the present embodiment includes the following steps:
s1, starting the bootstrap program
In this embodiment, the bootstrap program is uboot.
S2, running the first part of the target business function program in the bootstrap program;
in this embodiment, the first part of the target business function program includes a Logo picture loading step.
S3, reading and judging whether the target environment variable value is a first value or a second value;
in this embodiment, the target environment variable is a dev-reboot restart environment variable, where the first value is, for example, a dev-reboot value of 0, and the second value is, for example, a dev-reboot value of 1.
S4, after the target environment variable value is judged to be the first value, the state of a power key is read to judge whether the power key is pressed down, and when the power key is judged to be pressed down, the second part of the target service function program in the bootstrap program is sequentially operated, the kernel of the operating system is started, and the root file system is started, otherwise, the step S5 is executed;
after the dev-rebot value is judged to be 0, reading and judging the power key state of the embedded equipment, and if the power key is not pressed, the embedded equipment is in a shutdown state; and if the power key is pressed, sequentially running a second part of the target business function program in the bootstrap program, starting an operating system kernel and starting a root file system, thereby completing the starting operation of the embedded equipment.
And S5, after the target environment variable value is judged to be the second value, sequentially running the second part of the target business function program in the bootstrap program, starting the operating system kernel and starting the root file system.
After the value of dev-reboot is judged to be 1, the second part of the target business function program in the bootstrap program is sequentially run, the kernel of the operating system is started, and the root file system is started, so that the starting operation of the embedded device is completed.
In this embodiment, the second part of the target business function program includes a Logo image display step, and the time consumption of the first part of the target business function program in the bootstrap program is greater than the time consumption of the second part of the target business function program in the bootstrap program.
In the embedded device control method of this embodiment, after the steps of starting a boot program and running a first part of a target service function program in the boot program, by reading and judging a value of a target environment variable, a shutdown state of the embedded device can be stopped in the boot program startup state with extremely low power consumption, which can avoid surge generated when the embedded device is restarted.
[ fourth example ] A
Referring to fig. 4, fig. 4 is a flowchart of an embedded device control method according to a fourth embodiment of the present invention. As shown in fig. 4, on the basis of the third embodiment, after the root file system is started, the method further includes the following steps:
s6: judging whether the user input operation is a shutdown operation or a restart operation;
after the embedded device finishes the starting operation, namely the embedded device is in the running process, if a user inputs an operation command to the embedded device at the moment, the operation command comprises shutdown operation and restart operation, and the embedded device carries out the following steps according to the judgment result of the operation command.
S71: when the user input operation is judged to be the restarting operation, the following steps are executed:
s711: setting the target environment variable value as the second value;
specifically, the value of dev-rebot is set to 1 by modifying the dev-rebot restart environment variable using the fw-setnv command, which is a command in the fw-env series of tools that acts to modify the environment variable in the uboot.
S712: starting the bootstrap program;
in this embodiment, the bootstrap program is uboot.
S713: executing the first part of the target business function program in the bootstrap program;
in this embodiment, the first part of the target business function program includes a Logo picture loading step.
S714: and after reading and judging that the target environment variable value is the second value, sequentially running the second part of the target service function program in the bootstrap program, starting the kernel of the operating system and starting the root file system.
After the value of dev-reboot is judged to be 1, the second part of the target business function program in the bootstrap program is sequentially run, the kernel of the operating system is started, and the root file system is started, so that the starting operation of the embedded device is completed. In this embodiment, the second part of the target business function program includes a Logo image display step, and the time consumption of the first part of the target business function program in the bootstrap program is greater than the time consumption of the second part of the target business function program in the bootstrap program.
[ fifth embodiment ]
Referring to fig. 5, fig. 5 is a flowchart of an embedded device control method according to a fifth embodiment of the present invention. As shown in fig. 5, on the basis of the third embodiment, after the root file system is started, the method further includes the following steps:
s6: judging whether the user input operation is a shutdown operation or a restart operation;
after the embedded device finishes the starting operation, namely the embedded device is in the running process, if a user inputs an operation command to the embedded device at the moment, the operation command comprises shutdown operation and restart operation, and the embedded device carries out the following steps according to the judgment result of the operation command.
S72: when the user input operation is judged to be a shutdown operation, executing the following steps:
s721: setting the target environment variable value as the first value;
specifically, the value of dev-rebot is set to 0 by modifying the dev-rebot restart environment variable using the fw-setnv command, which is a command in the fw-env series of tools that acts to modify the environment variable in the uboot.
S722: starting the bootstrap program;
in this embodiment, the bootstrap program is uboot.
S723: executing the first part of the target business function program in the bootstrap program;
in this embodiment, the first part of the target business function program includes a Logo picture loading step.
S724: and after reading and judging that the target environment variable value is the first value, reading the state of a power key to judge whether the power key is pressed, and sequentially operating the second part of the target service function program in the bootstrap program, starting the kernel of the operating system and starting the root file system when judging that the power key is pressed.
After the dev-rebot value is judged to be 0, reading and judging the power key state of the embedded equipment, and if the power key is not pressed, the embedded equipment is in a shutdown state; and if the power key is pressed, sequentially running a second part of the target business function program in the bootstrap program, starting an operating system kernel and starting a root file system, thereby completing the starting operation of the embedded equipment. In this embodiment, the second part of the target business function program includes a Logo image display step, and the time consumption of the first part of the target business function program in the bootstrap program is greater than the time consumption of the second part of the target business function program in the bootstrap program.
In the embedded device control method of this embodiment, if the embedded device is in the running process, the user inputs a shutdown command operation to set the target environment variable value, then continues to execute the first step of starting the boot program and running the target service function program in the boot program, and then executes the shutdown operation by reading and judging the target environment variable value, so that the shutdown state of the embedded device can be stopped in the boot program starting state with extremely low power consumption, which does not cause complete power failure of the embedded device, thereby avoiding the generation of surge when the embedded device is started next time, and the shutdown method pre-processes the log picture loading step which consumes long time, so that the startup time is shortened when the embedded device is started next time.
[ sixth embodiment ]
Referring to fig. 6, fig. 6 is a block diagram of an embedded device control apparatus according to a sixth embodiment of the present invention, which is suitable for executing the embedded device control methods of the first embodiment and the second embodiment. As shown in fig. 6, the apparatus of the present embodiment includes: the device comprises a starting module 1, a reading judgment module 2, a first conditional execution module 3 and an input operation judgment module 4, wherein the input operation judgment module 4 further comprises a target environment variable value setting unit 41. The starting module 1 is used for starting a bootstrap program, and the reading judgment module 2 is used for reading and judging whether the target environment variable value is a first value or a second value. For the detailed functional details of the first conditional execution module 3, reference may be made to the related descriptions of the steps S3 and S4 in the first embodiment, which are not repeated herein. An input operation judgment module 4, configured to judge whether the user input operation is a shutdown operation or a restart operation, and a target environment variable value setting unit 41, configured to set the target environment variable value to the first value or the second value according to a judgment result of the input operation judgment module 4.
Please refer to fig. 7, fig. 7 is a block diagram of an embedded device control apparatus according to a seventh embodiment of the present invention, which is suitable for executing the embedded device control methods according to the third to fifth embodiments. As shown in fig. 7, the apparatus of the present embodiment includes: the device comprises a starting module 1, an operation module 5, a reading judgment module 2, a second conditional execution module 6 and an input operation judgment module 4. The running module 5 is configured to run a first part of steps of a target service function program in the bootstrap program. For specific functional details of the second conditional execution module 6, reference may be made to the related descriptions of the steps S4, S5, S714 and S724 in the third to fifth embodiments, which are not repeated herein.
[ eighth embodiment ]
Referring to fig. 8, fig. 8 is a schematic structural diagram of an embedded device control system according to an eighth embodiment of the present invention. As shown in fig. 8, an embedded device control system 7 of the present embodiment includes: a processor 71 and a memory 72. The memory 72 stores instructions executed by the processor 71, and the instructions cause the processor 71 to perform operations to perform the embedded device control method described in any one of the first to fifth embodiments.
[ ninth example ] A
Referring to fig. 9, fig. 9 is a schematic diagram of a storage medium according to a ninth embodiment of the invention. As shown in fig. 9, a ninth embodiment of the present invention provides a storage medium 8, which is a non-volatile memory and stores program codes, and the program codes, when executed by one or more processors, implement the embedded device control method according to any one of the first to fifth embodiments.
In addition, it should be understood that the foregoing embodiments are merely exemplary illustrations of the present invention, and the technical solutions of the embodiments can be arbitrarily combined and collocated without conflict between technical features and structural contradictions, which do not violate the purpose of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and/or method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units/modules is only one logical division, and there may be other divisions in actual implementation, for example, multiple units or modules may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units/modules described as separate parts may or may not be physically separate, and parts displayed as units/modules may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the units/modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, each functional unit/module in the embodiments of the present invention may be integrated into one processing unit/module, or each unit/module may exist alone physically, or two or more units/modules may be integrated into one unit/module. The integrated units/modules may be implemented in the form of hardware, or may be implemented in the form of hardware plus software functional units/modules.
The integrated units/modules, which are implemented in the form of software functional units/modules, may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for causing one or more processors of a computer device (which may be a personal computer, a server, or a network device) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that the above embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. An embedded device control method, comprising:
starting a bootstrap program;
reading and judging whether the target environment variable value is a first value or a second value; and
after the target environment variable value is judged to be the first value,
reading the state of a power key to judge whether the power key is pressed down, and sequentially running a target service function program in the bootstrap program, starting an operating system kernel and starting a root file system when the power key is judged to be pressed down; or
And after the target environment variable value is judged to be the second value, sequentially running the target service function program in the bootstrap program, starting the kernel of the operating system and starting the root file system.
2. The embedded device control method according to claim 1, further comprising, after starting the root file system:
judging whether the user input operation is a shutdown operation or a restart operation; and
when it is judged that the user input operation is a restart operation,
setting the target environment variable value to the second value,
starting the boot program, an
After reading and judging that the target environment variable value is the second value, sequentially running the target service function program in the bootstrap program, starting the kernel of the operating system and starting the root file system; or
When it is judged that the user input operation is a shutdown operation,
setting the target environment variable value to the first value,
starting the boot program, an
And after reading and judging that the target environment variable value is the first value, reading the state of a power key to judge whether the power key is pressed down, and sequentially running the target service function program in the bootstrap program, starting the kernel of the operating system and starting the root file system when judging that the power key is pressed down.
3. The embedded device control method according to claim 1, wherein before the reading and determining whether the target environment variable value is the first value or the second value, the method comprises: a first part step of running the target business function program in the bootstrap program.
4. The embedded device control method of claim 3, wherein after determining that the target environment variable value is the first value,
reading the state of a power key to judge whether the power key is pressed down, and when judging that the power key is pressed down, sequentially operating a second part of the target business function program in the bootstrap program, starting an operating system kernel and starting a root file system; or
And after the target environment variable value is judged to be the second value, sequentially running a second part of steps of the target service function program in the bootstrap program, starting the kernel of the operating system and starting the root file system.
5. The embedded device control method according to claim 4, wherein a time consumed for running the first part of the target business function program in the boot program is longer than a time consumed for running the second part of the target business function program in the boot program.
6. The embedded device control method according to claim 5, wherein the first partial step includes a Logo picture loading step, and the second partial step includes a Logo picture displaying step.
7. The embedded device control method according to claim 4, further comprising, after starting the root file system:
judging whether the user input operation is a shutdown operation or a restart operation; and
when it is judged that the user input operation is a restart operation,
setting the target environment variable value to the second value,
the boot-up procedure is started up and,
running the first part of the target business function program in the bootstrap program, an
And after reading and judging that the target environment variable value is the second value, sequentially running the second part of the target service function program in the bootstrap program, starting the kernel of the operating system and starting the root file system.
8. The embedded device control method according to claim 4, further comprising, after starting the root file system:
judging whether the user input operation is a shutdown operation or a restart operation; and
when it is judged that the user input operation is a shutdown operation,
setting the target environment variable value to the first value,
the boot-up procedure is started up and,
running the first part of the target business function program in the bootstrap program, an
And after reading and judging that the target environment variable value is the first value, reading the state of a power key to judge whether the power key is pressed, and sequentially operating the second part of the target service function program in the bootstrap program, starting the kernel of the operating system and starting the root file system when judging that the power key is pressed.
9. An embedded device control apparatus for performing the embedded device control method according to any one of claims 1 to 8, comprising:
the starting module is used for starting a bootstrap program;
the running module is used for running a first part of steps of a target business function program in the bootstrap program;
the reading judgment module is used for reading and judging whether the target environment variable value is a first value or a second value;
a first conditional execution module to:
after the target environment variable value is judged to be the first value, the state of a power key is read to judge whether the power key is pressed down, and when the power key is judged to be pressed down, the target service function program in the bootstrap program, the kernel of the start-up operating system and the start-up root file system are sequentially operated; or
After the target environment variable value is judged to be the second value, the target service function program in the bootstrap program is sequentially operated, the kernel of the operating system is started, and the root file system is started; and
a second conditional execution module to:
after the target environment variable value is judged to be a first value, reading the state of a power key to judge whether the power key is pressed down, and when the power key is judged to be pressed down, sequentially running a second part of steps of a target service function program in the bootstrap program, starting an operating system kernel and starting a root file system; or
And after the target environment variable value is judged to be a second value, sequentially running a second part of steps of the target service function program in the bootstrap program, starting the kernel of the operating system and starting the root file system.
10. An embedded device control system comprising: a processor and a memory; wherein the memory stores instructions for execution by the processor and the instructions cause the processor to perform operations to perform the embedded device control method of any one of claims 1 to 8.
CN201910559425.9A 2019-06-26 2019-06-26 Embedded equipment control method, device and system Active CN112148100B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910559425.9A CN112148100B (en) 2019-06-26 2019-06-26 Embedded equipment control method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910559425.9A CN112148100B (en) 2019-06-26 2019-06-26 Embedded equipment control method, device and system

Publications (2)

Publication Number Publication Date
CN112148100A true CN112148100A (en) 2020-12-29
CN112148100B CN112148100B (en) 2022-08-16

Family

ID=73869663

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910559425.9A Active CN112148100B (en) 2019-06-26 2019-06-26 Embedded equipment control method, device and system

Country Status (1)

Country Link
CN (1) CN112148100B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113505349A (en) * 2021-07-24 2021-10-15 山东三未信安信息科技有限公司 Mini PCI-E password card operation method under embedded uboot

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020156932A1 (en) * 2001-04-20 2002-10-24 Marc Schneiderman Method and apparatus for providing parallel execution of computing tasks in heterogeneous computing environments using autonomous mobile agents
US20030065960A1 (en) * 2001-09-28 2003-04-03 Stefan Rusu Method and apparatus for adjusting the voltage and frequency to minimize power dissipation in a multiprocessor system
CN101751273A (en) * 2008-12-15 2010-06-23 中国科学院声学研究所 Safety guide device and method for embedded system
CN102759975A (en) * 2011-04-26 2012-10-31 深圳富泰宏精密工业有限公司 Start-up and shut-down management system and method of electronic device
CN106992662A (en) * 2017-04-21 2017-07-28 西安诺瓦电子科技有限公司 Power control method and circuit and electronic equipment
CN107209671A (en) * 2015-01-21 2017-09-26 思科技术公司 The dynamic auto monitoring and control of start-up operation in computer
CN107357556A (en) * 2016-05-09 2017-11-17 天津三星通信技术研究有限公司 The method that Function Extension is realized under terminal power-off state
CN108388451A (en) * 2018-03-02 2018-08-10 奇酷互联网络科技(深圳)有限公司 Method for starting up mobile terminal, device and mobile terminal

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020156932A1 (en) * 2001-04-20 2002-10-24 Marc Schneiderman Method and apparatus for providing parallel execution of computing tasks in heterogeneous computing environments using autonomous mobile agents
US20030065960A1 (en) * 2001-09-28 2003-04-03 Stefan Rusu Method and apparatus for adjusting the voltage and frequency to minimize power dissipation in a multiprocessor system
CN101751273A (en) * 2008-12-15 2010-06-23 中国科学院声学研究所 Safety guide device and method for embedded system
CN102759975A (en) * 2011-04-26 2012-10-31 深圳富泰宏精密工业有限公司 Start-up and shut-down management system and method of electronic device
CN107209671A (en) * 2015-01-21 2017-09-26 思科技术公司 The dynamic auto monitoring and control of start-up operation in computer
CN107357556A (en) * 2016-05-09 2017-11-17 天津三星通信技术研究有限公司 The method that Function Extension is realized under terminal power-off state
CN106992662A (en) * 2017-04-21 2017-07-28 西安诺瓦电子科技有限公司 Power control method and circuit and electronic equipment
CN108388451A (en) * 2018-03-02 2018-08-10 奇酷互联网络科技(深圳)有限公司 Method for starting up mobile terminal, device and mobile terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李璧名: ""基于ARM的室内运动目标视频监控技术研究"", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113505349A (en) * 2021-07-24 2021-10-15 山东三未信安信息科技有限公司 Mini PCI-E password card operation method under embedded uboot

Also Published As

Publication number Publication date
CN112148100B (en) 2022-08-16

Similar Documents

Publication Publication Date Title
CN107122321B (en) Hardware repair method, hardware repair system, and computer-readable storage device
US9367446B2 (en) Computer system and data recovery method for a computer system having an embedded controller
CN102722394B (en) Start upgrading method of embedded equipment
CN104683133A (en) Maintenance method for basic input and output system
CN107797642B (en) power backup method and device
CN101634960A (en) Method for revising BIOS parameter and regenerating checksum
CN102880477A (en) Method for realizing computer start and computer
CN113867814A (en) Method and device for realizing multi-type restarting of server based on UEFI (unified extensible firmware interface)
US10387306B2 (en) Systems and methods for prognosticating likelihood of successful save operation in persistent memory
CN215769715U (en) Recovery device for abnormal starting
CN112148100B (en) Embedded equipment control method, device and system
US9652259B2 (en) Apparatus and method for managing register information in a processing system
CN103197933A (en) Computer and rapid starting method thereof
KR20130068630A (en) Method for initializing embedded device and apparatus thereof
CN104657232A (en) BIOS automatic recovery system and BIOS automatic recovery method
CN112035171B (en) Factory setting restoration method and system based on UEFI firmware
CN117290267A (en) Method and device for closing and starting system, electronic equipment and storage medium
CN114924637B (en) Control method and electronic equipment
CN108052353B (en) Method and equipment for improving synchronous speed of BIOS control module
CN111399921A (en) Switching method, device and equipment for server boot logo
CN107590087B (en) Electronic equipment and hard disk access method of electronic equipment
CN114816023B (en) Method, system, terminal and storage medium for optimizing standby power function of server
WO2016018349A1 (en) Computing device with first and second operating systems
CN117708886B (en) File system protection method and device for Internet of things equipment
TW202321928A (en) Control system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant