WO2017059724A1 - Operating system starting method and device - Google Patents
Operating system starting method and device Download PDFInfo
- Publication number
- WO2017059724A1 WO2017059724A1 PCT/CN2016/091046 CN2016091046W WO2017059724A1 WO 2017059724 A1 WO2017059724 A1 WO 2017059724A1 CN 2016091046 W CN2016091046 W CN 2016091046W WO 2017059724 A1 WO2017059724 A1 WO 2017059724A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- operating system
- gateway platform
- lxc container
- component
- upgrade
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
Definitions
- This document relates to, but is not limited to, the field of computers, and in particular, to a method and apparatus for starting an operating system.
- the embodiment of the invention provides a method and a device for starting an operating system, which can implement the gateway platform to simultaneously start two operating systems.
- a method for starting an operating system including: compiling a first operating system gateway platform based on a first kernel, wherein the first kernel is configured by using the first operating system gateway platform
- the base supports running the code of the second operating system; porting the LXC container to And configuring, in the first operating system gateway platform, a component for running the second operating system, where the LXC container is configured to manage the first operating system gateway platform and the second operating system;
- the second operating system is triggered to be launched in the component by the LXC container.
- the booting method further includes: installing the second operating system to the first operating system by using a predetermined rule based on the LXC container In the specified system partition, wherein the specified system partition is a system partition other than the system partition on which the first operating system gateway platform is installed.
- the component includes: an interaction channel between the first operating system gateway platform and the second operating system
- the establishing, for running, starting the component of the second operating system includes: at the first Establishing a first proxy process of the second operating system in an operating system gateway platform; designing a second proxy process of the first operating system gateway platform in the second operating system; wherein the first proxy process and The second proxy process separately manages the second operating system and the first operating system gateway platform through an interaction channel, so as to implement and start the second operating system.
- the component further includes: a resource restriction policy and a management allocation policy
- the method further includes: establishing the resource restriction policy and the management allocation policy in the first operating system gateway platform, where The resource restriction policy and the management allocation policy are used to block network functions of the first operating system in the second operating system gateway platform.
- the triggering, by the LXC container, the starting of the second operating system in the component comprises: triggering a preset script of the first operating system gateway platform to start after starting the first operating system The LXC container; the LXC container that invokes the startup initiates the first operating system through the interaction channel.
- the method further includes: upgrading the first operating system and/or the specified command by receiving the specified command a device environment required by the second operating system; loading network parameter information, configuring network parameters required to upgrade the first operating system and/or the second operating system; separately receiving and executing the first Upgrading the first operating system and/or the second operating system by a first command of the operating system and/or a second command for upgrading the second operating system.
- the starting method further includes: setting up a remote upgrade of the first operating system by using a network management system And/or a device environment required by the second operating system; loading network parameter information, configuring network parameters required to upgrade the first operating system and/or the second operating system; performing After the third command of the first operating system, verifying the second operating system; when the verification fails, receiving a fourth command for indicating the second operating system in the upgraded cache area, The second operating system is upgraded.
- the verifying the second operating system includes: downloading the second operating system to be upgraded to a buffer area; and verifying the second operating system in the buffer area.
- the first operating system is a Linux system
- the second operating system is an android system
- an apparatus for booting an operating system comprising: a compiling module configured to compile a first operating system gateway platform based on a first kernel, wherein the first kernel is in the first An operating system gateway platform supports code for running a second operating system;
- a processing module configured to migrate the LXC container to the first operating system gateway platform, and establish a component for running the second operating system, where the LXC container is used to manage the first operating system a gateway platform and the second operating system;
- Activating a module configured to trigger the second operating system to be launched in the component by the LXC container.
- the first operating system gateway platform is compiled based on the first kernel, wherein the first kernel supports running the code of the second operating system based on the first operating system gateway platform, and then transplants the LXC container to the first In the operating system gateway platform, a component for running the second operating system is started, wherein the LXC container is used to manage the first operating system gateway platform and the second operating system, and finally the second operating system is triggered in the component by the LXC container.
- the startup solves the problem that the gateway platform can only start one operating system at the same time in the related technology, and realizes that two operating systems are simultaneously started on the gateway platform, and the functions and other operations of the gateway platform operating system are realized without increasing the hardware cost.
- the effect of the system's intelligent business integration is compiled based on the first kernel, wherein the first kernel supports running the code of the second operating system based on the first operating system gateway platform, and then transplants the LXC container to the first In the operating system gateway platform, a component for running the second operating system is started, wherein
- FIG. 1 is a flowchart of a method for starting an operating system according to an embodiment of the present invention
- FIG. 2 is a structural block diagram of an apparatus for starting an operating system according to an embodiment of the present invention
- FIG. 3 is a block diagram 1 of an optional structure of an operating device startup device according to an embodiment of the present invention.
- FIG. 4 is a block diagram 2 of an optional structure of an operating device startup device according to an embodiment of the present invention.
- FIG. 5 is a block diagram 3 of an optional structure of an operating device startup device according to an embodiment of the present invention.
- FIG. 6 is a block diagram 4 of an optional structure of an operating device startup device according to an embodiment of the present invention.
- FIG. 7 is a structural block diagram of an apparatus for upgrading an operating system according to an embodiment of the present invention.
- FIG. 8 is a block diagram 1 of an optional structure of an upgrading apparatus of an operating system according to an embodiment of the present invention.
- FIG. 9 is a block diagram 2 of an optional structure of an operating device upgrade apparatus according to an embodiment of the present invention.
- FIG. 10 is a system framework diagram of a Linux gateway platform and an Android platform integrated according to an optional embodiment of the present invention
- FIG. 11 is a flowchart showing a system version startup according to an alternative embodiment of the present invention.
- Figure 12 is a flow chart showing the startup of the LXC container in accordance with an alternative embodiment of the present invention.
- FIG. 13 is a flowchart of a startup of an android system according to an alternative embodiment of the present invention.
- FIG. 14 is a flowchart of a boot phase system version program upgrade according to an alternative embodiment of the present invention.
- 15 is a flow chart of system version program upgrade after version startup according to an alternative embodiment of the present invention.
- FIG. 1 is a flowchart of a method for starting an operating system according to an embodiment of the present invention. As shown in FIG. 1 , the process includes the following steps:
- Step 102 Compile a first operating system gateway platform based on the first kernel, where the first kernel supports running the code of the second operating system based on the first operating system gateway platform;
- the first operating system gateway platform includes a hardware and a software system
- the first kernel may be a kernel of a first operating system of the first operating system gateway platform
- the code supporting the second operating system is migrated to the original kernel of the first operating system gateway platform to form and support the first operating system gateway platform and the second operating system.
- the first kernel when the first kernel is compiled, the code supporting the second operating system is migrated to the original kernel of the first operating system gateway platform to form and support the first operating system gateway platform and the second operating system.
- the primary and secondary functions of the first operating system gateway platform and the second operating system may be set, or the first operating system gateway platform and the second operating system are not divided into primary and secondary; in this embodiment, the first operation The system gateway platform can be the primary operating system, and the second operating system can be the secondary operating system. The first operating system and the second operating system are simultaneously run on the first operating system gateway platform.
- the first operating system and the second operating system may be, but are not limited to, a linux system, an android system, and a windows system.
- the linux system commonly used by the home gateway is used as the first operating system
- the android system with rich application is used as the second operating system as an example.
- Step 104 The LXC container is transplanted into the first operating system gateway platform, and a component for running the second operating system is started, where the LXC container is used to manage the first operating system gateway platform and the second operating system;
- the LXC container is a linux system container, runs in the first operating system, and can also start the second operating system when the first operating system is started, and manages the first in the first operating system gateway platform.
- the second operating system, the component for running the second operating system may include a system plug-in, a software process, a virtual channel, a system space, and the like.
- Step 106 triggering the second operating system to start in the component through the LXC container.
- the first operating system gateway platform is compiled based on the first kernel, wherein the first kernel can support running the code of the second operating system based on the first operating system gateway platform, and then transplanting the LXC container to the first In the operating system gateway platform, and establishing a component for running the second operating system, wherein the LXC container is used to manage the first operating system gateway platform and the second operating system, and finally the second operating system is triggered in the component by the LXC container.
- the startup solves the problem that the gateway platform can only start one operating system at the same time in the related technology, and realizes the effect of integrating the functions of the gateway platform operating system with the intelligent services of other operating systems without increasing the hardware cost.
- the startup method further includes: installing the second operating system to the first operating system by using a predetermined rule based on the LXC container Specifies the system partition where the specified system partition is a system partition other than the one on which the first operating system gateway platform is installed.
- the system space of the first operating system gateway platform may be isolated and partitioned.
- a namespace or a cgroup may be used (cgroup is a limitation provided by the Linux kernel,
- the mechanism for recording and isolating the physical resources used by the process group) is to isolate the Linux system from the android system, and divide the first operating system gateway platform into the first operating system space and the second operating system space, and the LXC container passes the predetermined rule
- the second operating system reserves the second operating system space, that is, specifies the system partition, and then installs the second operating system in the specified system partition, and the first operating system is installed in the first operating system space.
- the component includes: an interaction channel between the first operating system gateway platform and the second operating system, and the component for running the startup second operating system includes:
- the first agent process and the second agent process respectively manage the second operating system and the first operating system gateway platform through the interaction channel, so as to implement and start the second operating system.
- the interaction between the first operating system and the second operating system in the first operating system gateway platform is completed by using the first proxy process and the second proxy process, where the interaction channel is set in the first operating system gateway platform.
- the component further includes: a resource restriction policy and a management allocation policy
- the method further includes: establishing a resource restriction policy and a management allocation policy in the first operating system gateway platform, The resource restriction policy and the management allocation policy are used to block the network function of the first operating system in the second operating system gateway platform.
- the second operating system can only use the first operating system to access the Internet after being started, for example,
- the android application running on the android system and the gateway platform business process running on the linux system use the network communication module of the gateway platform to implement the Internet access.
- triggering the second operating system to start in the component by using the LXC container includes:
- the LXC container is started by triggering the preset script, and is triggered by the startup script of the Linux gateway.
- the LXC triggers the startup of the android system. Including the startup of the kernel part of the android system through the startup of the application layer framework part has been started in the Linux system.
- the preset script here is a script generated according to the related art.
- the first operating system and the second operating system may be upgraded, and the upgrade process is performed.
- the upgrade includes:
- the network parameter information may include an IP address, a subnet mask, and a file transfer protocol (FTP) username and password. And other parameters. Loading network parameter information can be implemented by receiving an external command of an input parameter or loading a configuration file containing network parameter information.
- FTP file transfer protocol
- S33 Receive and execute a first command for upgrading the first operating system and a second command for upgrading the second operating system, respectively.
- the specified command may include a downver command under the script command line
- the first command for upgrading the first operating system may be downloading the linux platform version (for example, downver)
- the linuxVersion command, the second command for upgrading the second operating system may be downloading the Android platform version (downver android) command.
- the upgrade is successful, restart the device, and run the system version.
- the first command and the second command can exist through a configuration file that can be directly loaded.
- a first command for upgrading the first operating system and a second command for upgrading the second operating system are executed by executing the configuration file.
- the startup method of the embodiment of the present invention further includes:
- the device environment required for remotely upgrading the first operating system and/or the second operating system by using the network management device where the device environment may be configured according to the IP address and MAC address of the terminal; and registering the optical line terminal of the central office device (OLT) ), the method of connecting the server to the server and setting up the device environment can be implemented by loading the configuration file or receiving external commands.
- OLT central office device
- S42 Load network parameter information, and configure network parameters required to upgrade the first operating system and/or the second operating system.
- the buffer area involved in this embodiment includes a cache area.
- the network parameter required to upgrade and run the first operating system and/or the second operating system includes, in addition to the data parameter, preparing the optical network device, and the third command for upgrading the first operating system may be download linuxVersion.
- the verification is performed before the upgrade of the second operating system to consider the security of the system backup.
- the upgrade is successful, restart the device, and run the system version.
- the verification of the second operating system includes:
- Verify the second operating system in the buffer area can be implemented by using a verification method of a related art, for example, a Cyclic Redundancy Check (CRC) check,
- CRC checksum is calculated by comparing it with the checksum field in the version header.
- the second operating system to be upgraded may be downloaded to the cache area.
- an upgrade command may be triggered to mirror the root file system of the cache area (root. Img) The file is read out and written to the root area.
- the system version (system.img) of the cache area is read out and written to the system area; when the verification fails, the upgrade is not performed, and the network management platform is notified, and the upgrade is required.
- the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation.
- the technical solution of the present invention which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
- the optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method of the embodiments of the present invention.
- module may implement a combination of software and/or hardware of a predetermined function.
- devices described in the following embodiments may be implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
- the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the startup method of the operating system.
- FIG. 2 is a structural block diagram of a booting device of an operating system according to an embodiment of the present invention. As shown in FIG. 2, the device includes: a compiling module 20, a processing module 22, and a booting module 24, wherein
- the compiling module 20 is configured to compile the first operating system gateway platform based on the first kernel, wherein the first kernel supports the code for running the second operating system based on the first operating system gateway platform;
- the first operating system gateway platform includes a hardware and a software system
- the first kernel may be a kernel kernel of the first operating system of the first operating system gateway platform, optionally,
- the code supporting the operation of the second operating system is transplanted into the original kernel of the first operating system gateway platform to form a first kernel capable of supporting simultaneous startup and operation of the first operating system gateway platform and the second operating system.
- the primary and secondary functions of the first operating system gateway platform and the second operating system may be set, or the first operating system gateway platform and the second operating system are not divided into primary and secondary; in this embodiment, the first operation The system gateway platform can be the primary operating system, and the second operating system can be the secondary operating system. The first operating system and the second operating system are simultaneously run on the first operating system gateway platform.
- the first operating system and the second operating system may be, but are not limited to, a linux system, an android system, and a windows system.
- the linux system commonly used by the home gateway is used as the first operating system
- the android system with rich application is used as the second operating system as an example.
- the processing module 22 is coupled to the compiling module 20, configured to port the LXC container to the first operating system gateway platform, and establish a component for running the second operating system, where the LXC container is used to manage the first operating system. Gateway platform and second operating system;
- the LXC container is a linux system container, runs in the first operating system, and can also start the second operating system when the first operating system is started, and manages the first in the first operating system gateway platform.
- the second operating system, the component for running the second operating system may include a system plug-in, a software process, a virtual channel, a system space, and the like.
- the startup module 24 is coupled to the processing module 22 and configured to trigger the second operating system to boot in the component through the LXC container.
- FIG. 3 is a block diagram of an optional structure of an operating device startup device according to an embodiment of the present invention.
- the device includes, in addition to all the modules shown in FIG. 2, an installation module 30, which is configured to be After the LXC container is migrated into the first operating system gateway platform, the processing module 22 installs the second operating system into the designated system partition of the first operating system by using a predetermined rule, wherein the specified system partition is installed except Other system partitions other than the system partition of the first operating system gateway platform.
- whether or not the migration is completed may be determined by a preset system message or a notification message or the like.
- FIG. 4 is a block diagram 2 of an optional structure of an operating device startup device according to an embodiment of the present invention, as shown in FIG. 4
- the device includes, in addition to all the modules shown in FIG. 2, the components include: an interaction channel between the first operating system gateway platform and the second operating system, and the processing module 22 includes: a first establishing unit 40 and a second establishing unit 42. ,among them,
- the first establishing unit 40 is configured to establish a first proxy process of the second operating system in the first operating system gateway platform
- the second establishing unit 42 is configured to establish a second proxy process of the first operating system gateway platform in the second operating system
- the first agent process and the second agent process separately manage the second operating system and the first operating system gateway platform through the interaction channel, so as to implement and start the second operating system.
- FIG. 5 is a block diagram 3 of an optional structure of an operating device startup apparatus according to an embodiment of the present invention.
- the device includes: a resource restriction policy and a management allocation policy, in addition to all the modules shown in FIG.
- the processing module 22 includes: a third establishing unit 50 configured to establish a resource limiting policy and a management allocation policy in the first operating system gateway platform, wherein the resource limiting policy and the management allocation policy are used to shield the first operating system from being in the second Network functionality in the operating system gateway platform.
- FIG. 6 is a block diagram of an optional structure of an operating device of the embodiment of the present invention. As shown in FIG. 6 , the device includes a first starting unit 60 in addition to all the modules shown in FIG. 4 . a second starting unit 62, wherein
- the first startup unit 60 is configured to trigger a preset script of the first operating system gateway platform to start the LXC container after starting the first operating system;
- the second starting unit 62 is configured to invoke the activated LXC container to start the second operating system through the interactive channel.
- the first operating system and the second operating system may also be upgraded, and the upgrade is performed.
- the first building module 70 is configured to upgrade a device environment required by the first operating system and/or the second operating system by using the specified command received;
- the first configuration module 72 is configured to load network parameter information, and configure network parameters required for upgrading the first operating system and/or the second operating system;
- the executing module 74 is configured to separately receive and execute a first command for upgrading the first operating system and/or a second command for upgrading the second operating system, and upgrade the first operating system and/or the second operating system. .
- FIG. 8 is a block diagram of an optional structure of an operating system upgrade apparatus according to an embodiment of the present invention. As shown in FIG. 8, the method includes: a second building module 80 and a second configuration module. 82, a verification module 84, an upgrade module 86, wherein
- the second building module 80 is configured to set up a device environment required for remotely upgrading the first operating system and/or the second operating system by using the network management system;
- the second configuration module 82 is configured to load network parameter information, and configure network parameters required for upgrading the first operating system and/or the second operating system;
- the verification module 84 is configured to perform verification on the second operating system after executing the third command for upgrading the first operating system
- the upgrade module 86 is configured to receive a fourth command for indicating a second operating system in the upgrade cache to upgrade the second operating system when the verification passes.
- FIG. 9 is a block diagram 2 of an optional structure of an operating system upgrade apparatus according to an embodiment of the present invention.
- the verification module 84 further includes: a download unit 90 and a verification unit. 92, of which
- the downloading unit 90 is configured to download the second operating system to be upgraded to the buffer area
- the verification unit 92 is configured to check the second operating system in the buffer area.
- modules may be implemented by software or hardware.
- the foregoing may be implemented by, but not limited to, the foregoing modules are all located in the same processor; or, the modules are respectively located in multiple processes. In the device.
- starting the LXC container may be triggered by a startup script of the Linux gateway; in S68, the LXC triggers the startup of the android system, including starting through the application layer framework part, android The startup of the system-related kernel part is complete.
- the upgrade steps include:
- Another optional upgrade method is remotely upgraded through the NMS.
- the upgrade steps are as follows:
- the ONU device is powered on and configured with network parameters.
- the optical network device is configured.
- androidSys contains the root.img and system.img required for the android system to run.
- the cache partition is introduced to facilitate version verification and system recovery.
- FIG. 10 is a system framework diagram of a linux gateway platform and an android platform in an alternative embodiment of the present invention. As shown in FIG. 10, the technical solution of the embodiment of the present invention is described below with reference to FIG. 10 and the embodiment:
- the process includes:
- S94 Establish an LXC container, and use the namespace and cgroup technology to isolate the Linux gateway platform from the android operating system.
- S96 Establish an interactive channel between the linux gateway platform and the android system; set on the side of the gateway platform
- the agent process of the android system, the agent process of the gateway platform is designed on the android side.
- the interaction of both systems is done through a proxy.
- S97 The network function of the android system is shielded, so that the android application and the gateway platform business process both use the network communication module of the gateway platform.
- FIG. 11 is a flowchart showing a system version startup according to an optional embodiment of the present invention. As shown in FIG. 11, the process includes:
- Step 201 The system is powered on, the bootloader program starts, initializes the central processing unit (CPU) register, and initializes the peripheral hardware of the system, including memory, flash (flash), network port, serial port and other device initialization.
- CPU central processing unit
- Step 202 Start the Linux kernel.
- Step 203 The initialization (init) process of the Linux kernel starts.
- Step 204 After the basic function version of the linux gateway platform is started, the initialization (init) process starts to start the LXC container.
- Step 205 After the LXC container is started, the child process calls the start program to start the init process of the android system in the container space by executing the file (execve).
- Step 206 The init process of the android system starts to execute some service processes (services) of the android system.
- Step 207 After the services are started, start the zygote of the portal process of the Andorid application framework.
- Step 208 Start a system service process (system server).
- Step S209 Start a server manager.
- Step S210 Finally launch the related application (app);
- FIG. 12 is a flowchart showing the startup of the LXC container according to an alternative embodiment of the present invention.
- the main function (Main) calls LXC to open (lxc_start), as shown in Figure 12, including:
- initialization processing including a management structure LXC management (lxc_handler) structure of the initialization container, returning the structure, lxc_handler in addition to containing the container name, attributes, and containing char *cgroup members are used to associate a corresponding cgroup;
- LXC management lxc_handler
- the parent process responds to the child process by setting a cgroup attribute according to the configuration file;
- the notification response child process may be lxc_sync_barrier_child, and the lxc_sync_barrier_child process includes: when the child process is ready to set cgroups, the child process is notified to continue initialization.
- setup_network including an Internet Protocol (IP) address, an interface name, and the like;
- IP Internet Protocol
- the child process calls the startup process start, and starts the initialization application by executing the file (execve); and comprises initializing the init by the application after the file startup parameter -d is executed.
- FIG. 13 is a flowchart of an android system startup process according to an alternative embodiment of the present invention.
- the android system starts an init process and performs a boot task, including a ril daemon (ril-daemon) (as a very important part of Windows Mobile).
- ril-daemon a ril daemon
- RIL enables wireless voice and data applications It is possible; the location of the RIL is on the protocol stack of the wireless baseband system, under the CellCore layer of Windows Mobile.
- Android RIL is located between the application framework and the kernel, divided into two parts, one part responsible for the socket (socket) to communicate with the application framework. The other part is responsible for communicating with Radio Broadcasting (RADIO) in two ways.
- RADIO Radio Broadcasting
- the AT command channel that communicates directly with the radio and the channel used to transmit the packet data.
- the data channel is used for the Internet access function of the mobile phone.
- Multimedia Media
- Bootsound Bootsound
- boot animation boot animation
- service manager etc.
- launch the application framework's portal process zygote Zygote
- start the virtual machine such as Dalvik VM, open the system service (Systemserver), open more A variety of applications to prepare, call Window Manager, Package Manager, Power Manager, AccountManager, Content Manager , Handare Service, Sensor Service, Connectivity Service, Location Manager, Search Service, Battery Service, and finally enter the activity (Activity ) Manager, start the system component Home Activity, fully start the android system.
- boot phase system version program upgrade method includes:
- Step 501 Establish a device environment for upgrading the system version program in the boot phase; including: connecting the ONU device to the PC through the network cable and the serial cable, and opening the Tftp (Trivial File Transfer Protocol) client on the PC side. , ready to upgrade the version of the program.
- Tftp Trivial File Transfer Protocol
- Step 502 Power on the boot program, configure the network parameters, including: powering on the ONU device, pressing the enter key during the boot process, entering the boot command line, inputting the setenv command, configuring the ONU side and the TFTP server.
- the IP address of the side is on the same network segment.
- Step 503 Execute downloading the linux platform version (downver linuxVersion) command, and upgrading the gateway platform program;
- Step 504 Execute downloading the Android platform (downver android) command, and upgrading the Android (android) system program;
- Step 505 The upgrade is successful, and the device is restarted; the system version is run at this time.
- FIG. 15 is a flowchart of a system version program upgrade after version startup according to an alternative embodiment of the present invention. As shown in FIG. 15, the method for upgrading a system version after a gateway version includes the following steps:
- Step 601 The device environment for upgrading the system version program after the version is built; includes: connecting the ONU device to the PC through the network cable, opening the client for downloading the file on the PC side, and preparing the version program to be upgraded.
- the client that downloads the file can be a WFTP client, and the WFTP client is a client that includes a file download tool.
- Step 602 The ONU is powered on, and the network parameters are configured, including: the ONU device is powered on, and after the version is completely completed, the IP address and the virtual LAN (vlan) parameter of the ONU are remotely configured by using a PC to remotely connect to the gateway.
- the network parameters including: the ONU device is powered on, and after the version is completely completed, the IP address and the virtual LAN (vlan) parameter of the ONU are remotely configured by using a PC to remotely connect to the gateway.
- Step 603 Execute the download linuxVersion command to upgrade the gateway platform program.
- Step 604 The upgrade is successful, and the downloading of the Android platform system file (download androidSys) is performed, the android version is downloaded to the cache area, and the version is verified; if the upgrade is unsuccessful in step 603, the network management platform needs to be reported, and then step 603 is performed again.
- Gateway platform program
- Step 605 The android version is successfully verified, and the android version is upgraded to the root area and the system area. If the android version verification is not successful, you need to report to the network management platform and re-download the android version.
- Step 606 The upgrade is successful, and the device is restarted.
- the smart home gateway of the embodiment supports the intelligent services of the anroid operating system, such as Thunder downloading, smart home, one-click speeding, etc. These intelligent services can be implemented by installing a third-party android plug-in, and can also implement existing ones.
- the basic functions of the home gateway such as voice service, Internet service, IPTV, etc., realize the integration of the gateway basic service and the anroid intelligent service by using the LXC container technology.
- Embodiments of the present invention also provide a storage medium.
- the foregoing storage medium may be configured to store program code for performing the following steps:
- the LXC container is transplanted into the first operating system gateway platform, and a component for running the second operating system is started, where the LXC container is used to manage the first operating system gateway platform and the second operating system;
- modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network of multiple computing devices. Alternatively, they may be implemented by program code executable by a computing device such that they may be stored in a storage device by a computing device and, in some cases, may be executed in a different order than herein.
- the steps shown or described are either fabricated as integrated circuit modules, or a plurality of modules or steps are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
- each module/unit in the foregoing embodiment may be implemented in the form of hardware, for example, by implementing an integrated circuit to implement its corresponding function, or may be implemented in the form of a software function module, for example, being executed by a processor and stored in a memory. Programs/instructions to implement their respective functions.
- the invention is not limited to any specific form of combination of hardware and software.
- the above technical solution realizes that two operating systems are simultaneously started on the gateway platform, and the effect of the function of the gateway platform operating system and the intelligent service of other operating systems is realized without increasing the hardware cost.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
An operating system starting method and device, comprising: compiling a first operating system gateway platform based on a first kernel, wherein the first kernel supports a code running a second operating system on the basis of a first operating system; transplanting an LXC container into the first operating system gateway platform, and establishing a component for running the starting of the second operating system, wherein the LXC container is used for managing the first operating system gateway platform and the second operating system; and triggering the starting of the second operating system in the component via the LXC container. The embodiments of the present invention achieve the simultaneous starting of two operating systems on a gateway platform, and achieve the effect of fusing a function of a gateway platform operating system and an intelligent service of the other operating system, without adding hardware costs.
Description
本文涉及但不限于计算机领域,尤其涉及一种操作系统的启动方法及装置。This document relates to, but is not limited to, the field of computers, and in particular, to a method and apparatus for starting an operating system.
电信运营商过去在宽带经营方面主要以提高接入带宽和渗透率(带宽以包月流量和时长)为主,随着互联网的发展,特别是移动互联网及互联网应用业务(Over The Top,简称为OTT)的发展,运营商的宽带经营已经从宽带接入的竞争转向宽带内容的竞争。In the past, telecom operators mainly focused on improving access bandwidth and penetration rate (bandwidth monthly traffic and duration). With the development of the Internet, especially the mobile Internet and Internet application services (Over The Top, referred to as OTT) The development of the broadband operation of operators has shifted from the competition of broadband access to the competition of broadband content.
为应对竞争,运营商需要深刻理解这种变化,从业务、接入、终端三个层面统一考虑,建立起“云-管-端”的系统架构,其中“端”,即家庭网关,是运营商将其触角伸入每个用户家庭的天然契入点,将“云”、智能网关、无所不在的访问的三个方面结合起来,扩大家庭网络的边界,为此电信运营商提出了基于安卓(Android)操作系统的智能网关相关需求,也就是说,网关既要满足基础的网关功能,又要支持现在主流的Android操作系统平台。然而,相关技术中的网关平台仅能一次启动一个的操作系统,如Android操作系统或苹果公司的移动操作系统(IOS操作系统),难以满足上述要求。In order to cope with competition, operators need to deeply understand this change, and consider the three layers of services, access, and terminals to establish a "cloud-pipe-end" system architecture. The "end", that is, the home gateway, is operated. The merchants extend their tentacles into the natural entry point of each user's family, combining the three aspects of “cloud”, intelligent gateway, and ubiquitous access to expand the boundaries of the home network. For this reason, telecom operators have proposed Android-based ( Android) operating system's intelligent gateway related requirements, that is, the gateway must meet the basic gateway functions, but also support the current mainstream Android operating system platform. However, the gateway platform in the related art can only start one operating system at a time, such as the Android operating system or Apple's mobile operating system (IOS operating system), which is difficult to meet the above requirements.
针对相关技术中的上述问题,目前尚未存在有效的解决方案。In view of the above problems in the related art, there is currently no effective solution.
发明内容Summary of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.
本发明实施例提供了一种操作系统的启动方法及装置,能够实现网关平台同时启动两个操作系统。The embodiment of the invention provides a method and a device for starting an operating system, which can implement the gateway platform to simultaneously start two operating systems.
根据本发明实施例的一个方面,提供了一种操作系统的启动方法,包括:基于第一内核编译第一操作系统网关平台,其中,所述第一内核以所述第一操作系统网关平台为基础支持运行第二操作系统的代码;将LXC容器移植到
所述第一操作系统网关平台中,并建立用于运行启动所述第二操作系统的组件,其中,所述LXC容器用于管理所述第一操作系统网关平台和所述第二操作系统;通过所述LXC容器触发所述第二操作系统在所述组件中启动。According to an aspect of the embodiments of the present invention, a method for starting an operating system is provided, including: compiling a first operating system gateway platform based on a first kernel, wherein the first kernel is configured by using the first operating system gateway platform The base supports running the code of the second operating system; porting the LXC container to
And configuring, in the first operating system gateway platform, a component for running the second operating system, where the LXC container is configured to manage the first operating system gateway platform and the second operating system; The second operating system is triggered to be launched in the component by the LXC container.
可选地,在将LXC容器移植到所述第一操作系统网关平台中,所述启动方法还包括:基于所述LXC容器通过预定规则将所述第二操作系统安装到所述第一操作系统的指定系统分区中,其中,所述指定系统分区为除安装所述第一操作系统网关平台的系统分区以外的其他系统分区。Optionally, in the porting the LXC container to the first operating system gateway platform, the booting method further includes: installing the second operating system to the first operating system by using a predetermined rule based on the LXC container In the specified system partition, wherein the specified system partition is a system partition other than the system partition on which the first operating system gateway platform is installed.
可选地,所述组件包括:所述第一操作系统网关平台和所述第二操作系统的交互通道,所述建立用于运行启动所述第二操作系统的组件包括:在所述第一操作系统网关平台中建立所述第二操作系统的第一代理进程;在所述第二操作系统中设计所述第一操作系统网关平台的第二代理进程;其中,所述第一代理进程和所述第二代理进程通过交互通道分别管理所述第二操作系统和所述第一操作系统网关平台,以实现运行启动所述第二操作系统。Optionally, the component includes: an interaction channel between the first operating system gateway platform and the second operating system, and the establishing, for running, starting the component of the second operating system includes: at the first Establishing a first proxy process of the second operating system in an operating system gateway platform; designing a second proxy process of the first operating system gateway platform in the second operating system; wherein the first proxy process and The second proxy process separately manages the second operating system and the first operating system gateway platform through an interaction channel, so as to implement and start the second operating system.
可选地,所述组件还包括:资源限制策略和管理分配策略,所述启动方法还包括:在所述第一操作系统网关平台中建立所述资源限制策略和所述管理分配策略,其中,所述资源限制策略和所述管理分配策略用于屏蔽所述第一操作系统在所述第二操作系统网关平台中的网络功能。Optionally, the component further includes: a resource restriction policy and a management allocation policy, where the method further includes: establishing the resource restriction policy and the management allocation policy in the first operating system gateway platform, where The resource restriction policy and the management allocation policy are used to block network functions of the first operating system in the second operating system gateway platform.
可选地,所述通过所述LXC容器触发所述第二操作系统在所述组件中启动包括:在启动所述第一操作系统后触发所述第一操作系统网关平台的预设脚本以启动所述LXC容器;调用启动的所述LXC容器通过所述交互通道启动所述第一操作系统。Optionally, the triggering, by the LXC container, the starting of the second operating system in the component comprises: triggering a preset script of the first operating system gateway platform to start after starting the first operating system The LXC container; the LXC container that invokes the startup initiates the first operating system through the interaction channel.
可选地,在所述通过所述LXC容器触发所述第二操作系统在所述组件中启动之后,所述方法还包括:通过接收的指定命令升级所述第一操作系统和/或所述第二操作系统所需的设备环境;加载网络参数信息,配置升级运行所述第一操作系统和/或所述第二操作系统所需的网络参数;分别接收并执行用于升级所述第一操作系统的第一命令和/或用于升级所述第二操作系统的第二命令,对所述第一操作系统和/或第二操作系统进行升级。Optionally, after the triggering, by the LXC container, that the second operating system is started in the component, the method further includes: upgrading the first operating system and/or the specified command by receiving the specified command a device environment required by the second operating system; loading network parameter information, configuring network parameters required to upgrade the first operating system and/or the second operating system; separately receiving and executing the first Upgrading the first operating system and/or the second operating system by a first command of the operating system and/or a second command for upgrading the second operating system.
可选地,在所述通过所述LXC容器触发所述第二操作系统在所述组件中启动之后,所述启动方法还包括:搭建通过网管远程升级所述第一操作系统
和/或所述第二操作系统所需的设备环境;加载网络参数信息,配置升级运行所述第一操作系统和/或所述第二操作系统所需的网络参数;在执行用于升级所述第一操作系统的第三命令之后,对所述第二操作系统进行校验;在校验不通过时,接收用于指示升级缓存区中的所述第二操作系统的第四命令,以对所述第二操作系统进行升级。Optionally, after the triggering, by the LXC container, that the second operating system is started in the component, the starting method further includes: setting up a remote upgrade of the first operating system by using a network management system
And/or a device environment required by the second operating system; loading network parameter information, configuring network parameters required to upgrade the first operating system and/or the second operating system; performing After the third command of the first operating system, verifying the second operating system; when the verification fails, receiving a fourth command for indicating the second operating system in the upgraded cache area, The second operating system is upgraded.
可选地,对所述第二操作系统进行校验包括:将待升级的所述第二操作系统下载到缓存区;在所述缓存区对所述第二操作系统进行校验。Optionally, the verifying the second operating system includes: downloading the second operating system to be upgraded to a buffer area; and verifying the second operating system in the buffer area.
可选地,所述第一操作系统为linux系统,所述第二操作系统为android系统。Optionally, the first operating system is a Linux system, and the second operating system is an android system.
根据本发明实施例的另一方面,提供了一种操作系统的启动装置,包括:编译模块,设置为基于第一内核编译第一操作系统网关平台,其中,所述第一内核以所述第一操作系统网关平台为基础支持运行第二操作系统的代码;According to another aspect of the present invention, an apparatus for booting an operating system is provided, comprising: a compiling module configured to compile a first operating system gateway platform based on a first kernel, wherein the first kernel is in the first An operating system gateway platform supports code for running a second operating system;
处理模块,设置为将LXC容器移植到所述第一操作系统网关平台中,并建立用于运行启动所述第二操作系统的组件,其中,所述LXC容器用于管理所述第一操作系统网关平台和所述第二操作系统;a processing module, configured to migrate the LXC container to the first operating system gateway platform, and establish a component for running the second operating system, where the LXC container is used to manage the first operating system a gateway platform and the second operating system;
启动模块,设置为通过所述LXC容器触发所述第二操作系统在所述组件中启动。Activating a module, configured to trigger the second operating system to be launched in the component by the LXC container.
通过本发明实施例,采用基于第一内核编译第一操作系统网关平台,其中,第一内核以第一操作系统网关平台为基础支持运行第二操作系统的代码,然后将LXC容器移植到第一操作系统网关平台中,并建立用于运行启动第二操作系统的组件,其中,LXC容器用于管理第一操作系统网关平台和第二操作系统,最后通过LXC容器触发第二操作系统在组件中启动,解决了相关技术中网关平台只能同时启动一个操作系统的问题,实现了在网关平台同时启动两个操作系统,在不增加硬件成本的情况下实现了网关平台操作系统的功能和其他操作系统的智能业务相融合的效果。According to the embodiment of the present invention, the first operating system gateway platform is compiled based on the first kernel, wherein the first kernel supports running the code of the second operating system based on the first operating system gateway platform, and then transplants the LXC container to the first In the operating system gateway platform, a component for running the second operating system is started, wherein the LXC container is used to manage the first operating system gateway platform and the second operating system, and finally the second operating system is triggered in the component by the LXC container. The startup solves the problem that the gateway platform can only start one operating system at the same time in the related technology, and realizes that two operating systems are simultaneously started on the gateway platform, and the functions and other operations of the gateway platform operating system are realized without increasing the hardware cost. The effect of the system's intelligent business integration.
在阅读并理解了附图和详细描述后,可以明白其他方面。Other aspects will be apparent upon reading and understanding the drawings and detailed description.
附图概述
BRIEF abstract
图1是本发明实施例的一种操作系统的启动方法的流程图;1 is a flowchart of a method for starting an operating system according to an embodiment of the present invention;
图2是本发明实施例的操作系统的启动装置的结构框图;2 is a structural block diagram of an apparatus for starting an operating system according to an embodiment of the present invention;
图3是本发明实施例的操作系统的启动装置的可选结构框图一;3 is a block diagram 1 of an optional structure of an operating device startup device according to an embodiment of the present invention;
图4是本发明实施例的操作系统的启动装置的可选结构框图二;4 is a block diagram 2 of an optional structure of an operating device startup device according to an embodiment of the present invention;
图5是本发明实施例的操作系统的启动装置的可选结构框图三;5 is a block diagram 3 of an optional structure of an operating device startup device according to an embodiment of the present invention;
图6是本发明实施例的操作系统的启动装置的可选结构框图四;6 is a block diagram 4 of an optional structure of an operating device startup device according to an embodiment of the present invention;
图7是本发明实施例的操作系统的升级装置的结构框图;7 is a structural block diagram of an apparatus for upgrading an operating system according to an embodiment of the present invention;
图8是本发明实施例的操作系统的升级装置的可选结构框图一;8 is a block diagram 1 of an optional structure of an upgrading apparatus of an operating system according to an embodiment of the present invention;
图9是本发明实施例的操作系统的升级装置的可选结构框图二;9 is a block diagram 2 of an optional structure of an operating device upgrade apparatus according to an embodiment of the present invention;
图10是本发明可选实施例的linux网关平台和android平台融合的系统框架图;10 is a system framework diagram of a Linux gateway platform and an Android platform integrated according to an optional embodiment of the present invention;
图11是本发明可选实施例的系统版本启动流程图;11 is a flowchart showing a system version startup according to an alternative embodiment of the present invention;
图12是本发明可选实施例的LXC容器的启动流程图;Figure 12 is a flow chart showing the startup of the LXC container in accordance with an alternative embodiment of the present invention;
图13是本发明可选实施例的android系统启动流程图;13 is a flowchart of a startup of an android system according to an alternative embodiment of the present invention;
图14是本发明可选实施例的boot阶段系统版本程序升级的流程图;14 is a flowchart of a boot phase system version program upgrade according to an alternative embodiment of the present invention;
图15是本发明可选实施例的版本启动后系统版本程序升级的流程图。15 is a flow chart of system version program upgrade after version startup according to an alternative embodiment of the present invention.
下文中将结合附图对本申请的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。Embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be noted that, in the case of no conflict, the features in the embodiments and the embodiments in the present application may be arbitrarily combined with each other.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It is to be understood that the terms "first", "second" and the like in the specification and claims of the present invention are used to distinguish similar objects, and are not necessarily used to describe a particular order or order.
在本实施例中提供了一种操作系统的启动方法,图1是本发明实施例的一种操作系统的启动方法的流程图,如图1所示,该流程包括如下步骤:In this embodiment, a method for starting an operating system is provided. FIG. 1 is a flowchart of a method for starting an operating system according to an embodiment of the present invention. As shown in FIG. 1 , the process includes the following steps:
步骤102,基于第一内核编译第一操作系统网关平台,其中,第一内核以第一操作系统网关平台为基础支持运行第二操作系统的代码;
Step 102: Compile a first operating system gateway platform based on the first kernel, where the first kernel supports running the code of the second operating system based on the first operating system gateway platform;
在本实施例中,第一操作系统网关平台包括硬件和软件系统,第一内核可以是第一操作系统网关平台的第一操作系统的内核(kernel);In this embodiment, the first operating system gateway platform includes a hardware and a software system, and the first kernel may be a kernel of a first operating system of the first operating system gateway platform;
可选的,在编译第一内核时,将支持第二操作系统运行的代码移植到第一操作系统网关平台的原内核中形成可以支持同时启动和运行第一操作系统网关平台和第二操作系统的第一内核。Optionally, when the first kernel is compiled, the code supporting the second operating system is migrated to the original kernel of the first operating system gateway platform to form and support the first operating system gateway platform and the second operating system. The first kernel.
可选的,还可以设置第一操作系统网关平台和第二操作系统的主副功能,或者是第一操作系统网关平台和第二操作系统不分主副;在本实施例中,第一操作系统网关平台可以为主操作系统,第二操作系统可以为副操作系统。第一操作系统网关平台下同时运行第一操作系统和第二操作系统,可选的,第一操作系统、第二操作系统可以但不限于为:linux系统、android系统、windows系统。本实施例以家庭网关常用的linux系统为第一操作系统,应用丰富的android系统为第二操作系统为例进行说明。Optionally, the primary and secondary functions of the first operating system gateway platform and the second operating system may be set, or the first operating system gateway platform and the second operating system are not divided into primary and secondary; in this embodiment, the first operation The system gateway platform can be the primary operating system, and the second operating system can be the secondary operating system. The first operating system and the second operating system are simultaneously run on the first operating system gateway platform. Optionally, the first operating system and the second operating system may be, but are not limited to, a linux system, an android system, and a windows system. In this embodiment, the linux system commonly used by the home gateway is used as the first operating system, and the android system with rich application is used as the second operating system as an example.
步骤104,将LXC容器移植到第一操作系统网关平台中,并建立用于运行启动第二操作系统的组件,其中,LXC容器用于管理第一操作系统网关平台和第二操作系统;Step 104: The LXC container is transplanted into the first operating system gateway platform, and a component for running the second operating system is started, where the LXC container is used to manage the first operating system gateway platform and the second operating system;
在本实施例中,LXC容器为linux系统容器,运行在第一操作系统中,同时还可以在第一操作系统启动的情况下启动第二操作系统,并管理第一操作系统网关平台中的第二操作系统,用于运行启动第二操作系统的组件可以包括系统插件、软件进程、虚拟通道、系统空间等。In this embodiment, the LXC container is a linux system container, runs in the first operating system, and can also start the second operating system when the first operating system is started, and manages the first in the first operating system gateway platform. The second operating system, the component for running the second operating system may include a system plug-in, a software process, a virtual channel, a system space, and the like.
步骤106,通过LXC容器触发第二操作系统在组件中启动。 Step 106, triggering the second operating system to start in the component through the LXC container.
通过本实施例,采用基于第一内核编译第一操作系统网关平台,其中,第一内核可以以第一操作系统网关平台为基础支持运行第二操作系统的代码,然后将LXC容器移植到第一操作系统网关平台中,并建立用于运行启动第二操作系统的组件,其中,LXC容器用于管理第一操作系统网关平台和第二操作系统,最后通过LXC容器触发第二操作系统在组件中启动,解决了相关技术中网关平台只能同时启动一个操作系统的问题,实现了在不增加硬件成本的情况下将网关平台操作系统的功能和其他操作系统的智能业务相融合的效果。
In this embodiment, the first operating system gateway platform is compiled based on the first kernel, wherein the first kernel can support running the code of the second operating system based on the first operating system gateway platform, and then transplanting the LXC container to the first In the operating system gateway platform, and establishing a component for running the second operating system, wherein the LXC container is used to manage the first operating system gateway platform and the second operating system, and finally the second operating system is triggered in the component by the LXC container. The startup solves the problem that the gateway platform can only start one operating system at the same time in the related technology, and realizes the effect of integrating the functions of the gateway platform operating system with the intelligent services of other operating systems without increasing the hardware cost.
在本发明实施例的可选实施方式中,在将LXC容器移植到第一操作系统网关平台中之后,启动方法还包括:基于LXC容器通过预定规则将第二操作系统安装到第一操作系统的指定系统分区中,其中,指定系统分区中为除安装第一操作系统网关平台的系统分区以外的其他系统分区。In an optional implementation manner of the embodiment of the present invention, after the LXC container is migrated to the first operating system gateway platform, the startup method further includes: installing the second operating system to the first operating system by using a predetermined rule based on the LXC container Specifies the system partition where the specified system partition is a system partition other than the one on which the first operating system gateway platform is installed.
在本可选实施方式中,可以将第一操作系统网关平台的系统空间进行隔离和分区,在分区过程中,可以使用名称空间(namespace)或cgroup(cgroup是Linux内核提供的一种可以限制、记录、隔离进程组所使用的物理资源的机制)技术将linux系统和android系统隔离,将第一操作系统网关平台分为第一操作系统空间和第二操作系统空间,LXC容器通过预定规则将为第二操作系统预留第二操作系统空间,即指定系统分区,然后将第二操作系统安装在指定系统分区中,而第一操作系统则安装在第一操作系统空间内。In this optional implementation manner, the system space of the first operating system gateway platform may be isolated and partitioned. In the partitioning process, a namespace or a cgroup may be used (cgroup is a limitation provided by the Linux kernel, The mechanism for recording and isolating the physical resources used by the process group) is to isolate the Linux system from the android system, and divide the first operating system gateway platform into the first operating system space and the second operating system space, and the LXC container passes the predetermined rule The second operating system reserves the second operating system space, that is, specifies the system partition, and then installs the second operating system in the specified system partition, and the first operating system is installed in the first operating system space.
在本发明实施例的可选实施方式中,组件包括:第一操作系统网关平台和第二操作系统的交互通道,建立用于运行启动第二操作系统的组件包括:In an optional implementation manner of the embodiment of the present invention, the component includes: an interaction channel between the first operating system gateway platform and the second operating system, and the component for running the startup second operating system includes:
步骤(S,Step)11,在第一操作系统网关平台中建立第二操作系统的第一代理进程;Step (S, Step) 11, establishing a first proxy process of the second operating system in the first operating system gateway platform;
S12,在第二操作系统中建立第一操作系统网关平台的第二代理进程;S12. Establish a second proxy process of the first operating system gateway platform in the second operating system.
其中,第一代理进程和第二代理进程通过交互通道分别管理第二操作系统和第一操作系统网关平台,以实现运行启动所述第二操作系统。The first agent process and the second agent process respectively manage the second operating system and the first operating system gateway platform through the interaction channel, so as to implement and start the second operating system.
可选的,第一操作系统网关平台中的第一操作系统和第二操作系统之间的交互通过第一代理进程和第二代理进程来完成,第一操作系统网关平台中设置有交互通道,用于第一代理进程和第二代理进程在分别管理第二操作系统和第一操作系统时的数据和信号的传输。Optionally, the interaction between the first operating system and the second operating system in the first operating system gateway platform is completed by using the first proxy process and the second proxy process, where the interaction channel is set in the first operating system gateway platform. The transmission of data and signals for the first agent process and the second agent process when managing the second operating system and the first operating system, respectively.
在本发明实施例的可选实施方式中,组件还包括:资源限制策略和管理分配策略,本发明实施例启动方法还包括:在第一操作系统网关平台中建立资源限制策略和管理分配策略,其中,资源限制策略和管理分配策略用于屏蔽第一操作系统在第二操作系统网关平台中的网络功能。In an optional implementation manner of the embodiment of the present invention, the component further includes: a resource restriction policy and a management allocation policy, where the method further includes: establishing a resource restriction policy and a management allocation policy in the first operating system gateway platform, The resource restriction policy and the management allocation policy are used to block the network function of the first operating system in the second operating system gateway platform.
在本可选的实施方式,通过屏蔽第一操作系统在第二操作系统网关平台中的网络功能,使第二操作系统启动后只能只用第一操作系统来上网,例如,
android系统上运行的android应用程序和linux系统上运行的网关平台业务进程都使用网关平台的网络通讯模块来实现上网。In this optional implementation manner, by shielding the network function of the first operating system in the second operating system gateway platform, the second operating system can only use the first operating system to access the Internet after being started, for example,
The android application running on the android system and the gateway platform business process running on the linux system use the network communication module of the gateway platform to implement the Internet access.
在本发明实施例的可选实施方式中,通过LXC容器触发第二操作系统在组件中启动包括:In an optional implementation manner of the embodiment of the present invention, triggering the second operating system to start in the component by using the LXC container includes:
S21,在启动第一操作系统后触发第一操作系统网关平台的预设脚本以启动LXC容器;S21. After starting the first operating system, trigger a preset script of the first operating system gateway platform to start the LXC container.
S22,调用启动的LXC容器通过交互通道启动第一操作系统。S22. Call the activated LXC container to start the first operating system through the interactive channel.
在本可选实施方式中,在第一操作系统启动完成后,通过触发预设脚本,启动LXC容器,通过Linux网关的启动预设脚本来触发的,在S22中,LXC触发android系统的启动,包括通过应用层框架部分的启动,android系统相关的内核部分的启动已在Linux系统时候启动。In this optional implementation manner, after the first operating system is started, the LXC container is started by triggering the preset script, and is triggered by the startup script of the Linux gateway. In S22, the LXC triggers the startup of the android system. Including the startup of the kernel part of the android system through the startup of the application layer framework part has been started in the Linux system.
需要说明的是,这里的预设脚本为根据相关技术生成的脚本。It should be noted that the preset script here is a script generated according to the related art.
可选的,本发明的实施例,在第一操作系统和第二操作系统在第一操作系统网关平台中启动之后,还可以对第一操作系统和第二操作系统进行升级,而在升级过程中,可以使用本地命令升级和网管远程升级两种可选的方式来实现。Optionally, in the embodiment of the present invention, after the first operating system and the second operating system are started in the first operating system gateway platform, the first operating system and the second operating system may be upgraded, and the upgrade process is performed. In the middle, you can use the local command upgrade and the network management remote upgrade to achieve two options.
下面是对通过本地命令升级操作系统的说明,在通过LXC容器触发第二操作系统在组件中启动之后,升级包括:The following is a description of upgrading the operating system by local commands. After the second operating system is started in the component by the LXC container, the upgrade includes:
S31,通过接收的指定命令升级第一操作系统和/或第二操作系统所需的设备环境;S31. Upgrade a device environment required by the first operating system and/or the second operating system by using the specified command received;
S32,加载网络参数信息,配置升级运行第一操作系统和/或第二操作系统所需的网络参数;网络参数信息可以包括IP地址,子网掩码,文件传输协议(FTP)的用户名和密码等参数。加载网络参数信息可以通过接收输入参数的外部指令或加载包含有网络参数信息的配置文件的方式实现。S32. Load network parameter information, and configure network parameters required for upgrading the first operating system and/or the second operating system. The network parameter information may include an IP address, a subnet mask, and a file transfer protocol (FTP) username and password. And other parameters. Loading network parameter information can be implemented by receiving an external command of an input parameter or loading a configuration file containing network parameter information.
S33,分别接收并执行用于升级第一操作系统的第一命令和用于升级第二操作系统的第二命令。S33. Receive and execute a first command for upgrading the first operating system and a second command for upgrading the second operating system, respectively.
可选的,指定命令可以包括脚本(boot)命令行下的downver命令,用于升级第一操作系统的第一命令可以是下载linux平台版本(例如、downver
linuxVersion)命令,用于升级第二操作系统的第二命令可以是下载安卓平台版本(downver android)命令。升级成功,重启设备,运行系统版本。第一命令和第二命令可以通过可以直接加载的配置文件的方式存在。通过执行配置文件实现执行用于升级第一操作系统的第一命令和用于升级第二操作系统的第二命令。Optionally, the specified command may include a downver command under the script command line, and the first command for upgrading the first operating system may be downloading the linux platform version (for example, downver)
The linuxVersion command, the second command for upgrading the second operating system, may be downloading the Android platform version (downver android) command. The upgrade is successful, restart the device, and run the system version. The first command and the second command can exist through a configuration file that can be directly loaded. A first command for upgrading the first operating system and a second command for upgrading the second operating system are executed by executing the configuration file.
下面是对通过网管远程升级操作系统的说明,在通过LXC容器触发第二操作系统在组件中启动之后,本发明实施例启动方法还包括:The following is a description of the method for remotely upgrading an operating system by using a network management system. After the second operating system is started in the component by the LXC container, the startup method of the embodiment of the present invention further includes:
S41,搭建通过网管远程升级第一操作系统和/或第二操作系统所需的设备环境;这里,搭建设备环境可以包括根据终端的IP地址、MAC地址;注册上局端设备光线路终端(OLT),连接上网管服务器,搭建设备环境的方法可以采用加载配置文件或接收外部指令的方式实现,实现原理和加载网络参数信息的原理相同。S41, the device environment required for remotely upgrading the first operating system and/or the second operating system by using the network management device; where the device environment may be configured according to the IP address and MAC address of the terminal; and registering the optical line terminal of the central office device (OLT) ), the method of connecting the server to the server and setting up the device environment can be implemented by loading the configuration file or receiving external commands. The principle of the implementation is the same as the principle of loading the network parameter information.
S42,加载网络参数信息,配置升级运行第一操作系统和/或第二操作系统所需的网络参数;S42: Load network parameter information, and configure network parameters required to upgrade the first operating system and/or the second operating system.
S43,在执行用于升级第一操作系统的第三命令之后,对第二操作系统进行校验;S43. After executing the third command for upgrading the first operating system, verifying the second operating system.
S44,在校验通过时,接收用于指示升级缓存区中的第二操作系统的第四命令,以对第二操作系统进行升级。S44. When the verification passes, receiving a fourth command for instructing the second operating system in the upgrade buffer to upgrade the second operating system.
需要说明的是,本实施例中涉及到的缓存区包括高速缓存区。It should be noted that the buffer area involved in this embodiment includes a cache area.
可选的,配置升级运行第一操作系统和/或第二操作系统所需的网络参数除了数据参数外,还包括准备光网络设备,用于升级第一操作系统的第三命令可以是download linuxVersion,在对第二操作系统进行升级前进行校验是为了考虑系统备份的安全性。升级成功,重启设备,运行系统版本。Optionally, the network parameter required to upgrade and run the first operating system and/or the second operating system includes, in addition to the data parameter, preparing the optical network device, and the third command for upgrading the first operating system may be download linuxVersion. The verification is performed before the upgrade of the second operating system to consider the security of the system backup. The upgrade is successful, restart the device, and run the system version.
在上述通过网管远程升级操作系统的升级方式中,对第二操作系统进行校验包括:In the above upgrade mode of upgrading the operating system through the network management system, the verification of the second operating system includes:
S51,将待升级的第二操作系统下载到缓存区;S51. Download the second operating system to be upgraded to the buffer area.
S52,在缓存区对第二操作系统进行校验。这里,校验可以采用相关技术的校验方式实现,例如、循环冗余校验(Cyclic Redundancy Check,CRC)校验,
通过计算CRC校验和与版本头中的校验和字段进行比较。S52. Verify the second operating system in the buffer area. Here, the verification can be implemented by using a verification method of a related art, for example, a Cyclic Redundancy Check (CRC) check,
The CRC checksum is calculated by comparing it with the checksum field in the version header.
可选的,可以先将待升级的第二操作系统下载到缓存区(cache),在缓存区中校验通过后,还可以再触发一个升级命令,把cache区的根文件系统镜像(root.img)文件读出来,写到root区。然后把cache区的系统版本(system.img)读出来,写到system区;而在校验不通过时不执行升级,同时通知网管平台,需要重新升级。Optionally, the second operating system to be upgraded may be downloaded to the cache area. After the verification is passed in the buffer area, an upgrade command may be triggered to mirror the root file system of the cache area (root. Img) The file is read out and written to the root area. Then, the system version (system.img) of the cache area is read out and written to the system area; when the verification fails, the upgrade is not performed, and the network management platform is notified, and the upgrade is required.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明实施例的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, The optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method of the embodiments of the present invention.
在本实施例中还提供了一种操作系统的启动装置,该装置用于实现上述实施例及可选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置可以以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。An embodiment of the operating system is provided in the embodiment, and the device is used to implement the foregoing embodiments and optional implementations, and details are not described herein. As used below, the term "module" may implement a combination of software and/or hardware of a predetermined function. Although the devices described in the following embodiments may be implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
本发明实施例还提供一种计算机存储介质,计算机存储介质中存储有计算机可执行指令,计算机可执行指令用于执行上述操作系统的启动方法。The embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the startup method of the operating system.
图2是本发明实施例的操作系统的启动装置的结构框图,如图2所示,该装置包括:编译模块20、处理模块22、启动模块24,其中2 is a structural block diagram of a booting device of an operating system according to an embodiment of the present invention. As shown in FIG. 2, the device includes: a compiling module 20, a processing module 22, and a booting module 24, wherein
编译模块20,设置为基于第一内核编译第一操作系统网关平台,其中,第一内核以第一操作系统网关平台为基础支持运行第二操作系统的代码;The compiling module 20 is configured to compile the first operating system gateway platform based on the first kernel, wherein the first kernel supports the code for running the second operating system based on the first operating system gateway platform;
在本实施例中,第一操作系统网关平台包括硬件和软件系统,第一内核可以是第一操作系统网关平台的第一操作系统的内核kernel,可选的,在编
译第一内核时,将支持第二操作系统运行的代码移植到第一操作系统网关平台的原内核中形成可以支持同时启动和运行第一操作系统网关平台和第二操作系统的第一内核。In this embodiment, the first operating system gateway platform includes a hardware and a software system, and the first kernel may be a kernel kernel of the first operating system of the first operating system gateway platform, optionally,
When the first kernel is translated, the code supporting the operation of the second operating system is transplanted into the original kernel of the first operating system gateway platform to form a first kernel capable of supporting simultaneous startup and operation of the first operating system gateway platform and the second operating system.
可选的,还可以设置第一操作系统网关平台和第二操作系统的主副功能,或者是第一操作系统网关平台和第二操作系统不分主副;在本实施例中,第一操作系统网关平台可以为主操作系统,第二操作系统可以为副操作系统。第一操作系统网关平台下同时运行第一操作系统和第二操作系统,可选的,第一操作系统、第二操作系统可以但不限于为:linux系统、android系统、windows系统。本实施例以家庭网关常用的linux系统为第一操作系统,应用丰富的android系统为第二操作系统为例进行说明。Optionally, the primary and secondary functions of the first operating system gateway platform and the second operating system may be set, or the first operating system gateway platform and the second operating system are not divided into primary and secondary; in this embodiment, the first operation The system gateway platform can be the primary operating system, and the second operating system can be the secondary operating system. The first operating system and the second operating system are simultaneously run on the first operating system gateway platform. Optionally, the first operating system and the second operating system may be, but are not limited to, a linux system, an android system, and a windows system. In this embodiment, the linux system commonly used by the home gateway is used as the first operating system, and the android system with rich application is used as the second operating system as an example.
处理模块22,与编译模块20耦合连接,设置为将LXC容器移植到第一操作系统网关平台中,并建立用于运行启动第二操作系统的组件,其中,LXC容器用于管理第一操作系统网关平台和第二操作系统;The processing module 22 is coupled to the compiling module 20, configured to port the LXC container to the first operating system gateway platform, and establish a component for running the second operating system, where the LXC container is used to manage the first operating system. Gateway platform and second operating system;
在本实施例中,LXC容器为linux系统容器,运行在第一操作系统中,同时还可以在第一操作系统启动的情况下启动第二操作系统,并管理第一操作系统网关平台中的第二操作系统,用于运行启动第二操作系统的组件可以包括系统插件、软件进程、虚拟通道、系统空间等。In this embodiment, the LXC container is a linux system container, runs in the first operating system, and can also start the second operating system when the first operating system is started, and manages the first in the first operating system gateway platform. The second operating system, the component for running the second operating system may include a system plug-in, a software process, a virtual channel, a system space, and the like.
启动模块24,与处理模块22耦合连接,设置为通过LXC容器触发第二操作系统在组件中启动。The startup module 24 is coupled to the processing module 22 and configured to trigger the second operating system to boot in the component through the LXC container.
图3是本发明实施例的操作系统的启动装置的可选结构框图一,如图3所示,该装置除包括图2所示的所有模块外,还可以包括:安装模块30,设置为在处理模块22在将LXC容器移植到第一操作系统网关平台中之后,基于LXC容器通过预定规则将第二操作系统安装到第一操作系统的指定系统分区中,其中,该指定系统分区为除安装第一操作系统网关平台的系统分区以外的其他系统分区。FIG. 3 is a block diagram of an optional structure of an operating device startup device according to an embodiment of the present invention. As shown in FIG. 3, the device includes, in addition to all the modules shown in FIG. 2, an installation module 30, which is configured to be After the LXC container is migrated into the first operating system gateway platform, the processing module 22 installs the second operating system into the designated system partition of the first operating system by using a predetermined rule, wherein the specified system partition is installed except Other system partitions other than the system partition of the first operating system gateway platform.
需要说明的是,是否完成移植可以通过预先设定的系统消息或通知消息等确定。It should be noted that whether or not the migration is completed may be determined by a preset system message or a notification message or the like.
图4是本发明实施例的操作系统的启动装置的可选结构框图二,如图4
所示,该装置除包括图2所示的所有模块外,组件包括:第一操作系统网关平台和第二操作系统的交互通道,处理模块22包括:第一建立单元40、第二建立单元42,其中,4 is a block diagram 2 of an optional structure of an operating device startup device according to an embodiment of the present invention, as shown in FIG. 4
As shown, the device includes, in addition to all the modules shown in FIG. 2, the components include: an interaction channel between the first operating system gateway platform and the second operating system, and the processing module 22 includes: a first establishing unit 40 and a second establishing unit 42. ,among them,
第一建立单元40,设置为在第一操作系统网关平台中建立第二操作系统的第一代理进程;The first establishing unit 40 is configured to establish a first proxy process of the second operating system in the first operating system gateway platform;
第二建立单元42,设置为在第二操作系统中建立第一操作系统网关平台的第二代理进程;The second establishing unit 42 is configured to establish a second proxy process of the first operating system gateway platform in the second operating system;
第一代理进程和第二代理进程通过交互通道分别管理第二操作系统和第一操作系统网关平台,以实现运行启动第二操作系统。The first agent process and the second agent process separately manage the second operating system and the first operating system gateway platform through the interaction channel, so as to implement and start the second operating system.
图5是本发明实施例的操作系统的启动装置的可选结构框图三,如图5所示,该装置除包括图2所示的所有模块外,组件还包括:资源限制策略和管理分配策略,处理模块22包括:第三建立单元50,设置为在第一操作系统网关平台中建立资源限制策略和管理分配策略,其中,资源限制策略和管理分配策略用于屏蔽第一操作系统在第二操作系统网关平台中的网络功能。FIG. 5 is a block diagram 3 of an optional structure of an operating device startup apparatus according to an embodiment of the present invention. As shown in FIG. 5, the device includes: a resource restriction policy and a management allocation policy, in addition to all the modules shown in FIG. The processing module 22 includes: a third establishing unit 50 configured to establish a resource limiting policy and a management allocation policy in the first operating system gateway platform, wherein the resource limiting policy and the management allocation policy are used to shield the first operating system from being in the second Network functionality in the operating system gateway platform.
图6是本发明实施例的操作系统的启动装置的可选结构框图四,如图6所示,该装置除包括图4所示的所有模块外,启动模块24还包括:第一启动单元60、第二启动单元62,其中,FIG. 6 is a block diagram of an optional structure of an operating device of the embodiment of the present invention. As shown in FIG. 6 , the device includes a first starting unit 60 in addition to all the modules shown in FIG. 4 . a second starting unit 62, wherein
第一启动单元60,设置为在启动第一操作系统后触发第一操作系统网关平台的预设脚本以启动LXC容器;The first startup unit 60 is configured to trigger a preset script of the first operating system gateway platform to start the LXC container after starting the first operating system;
第二启动单元62,设置为调用启动的LXC容器通过交互通道启动第二操作系统。The second starting unit 62 is configured to invoke the activated LXC container to start the second operating system through the interactive channel.
可选的,根据本发明的实施例,在第一操作系统和第二操作系统在第一操作系统网关平台中启动之后,还可以对第一操作系统和第二操作系统进行升级,而在升级过程中,可以使用本地命令升级和网管远程升级两种可选的方式来实现。Optionally, according to the embodiment of the present invention, after the first operating system and the second operating system are started in the first operating system gateway platform, the first operating system and the second operating system may also be upgraded, and the upgrade is performed. In the process, you can use two options: local command upgrade and network management remote upgrade.
下面是对通过本地命令升级操作系统的说明,图7是本发明实施例的操作系统的升级装置的结构框图,如图7所示,包括:第一搭建模块70、第一配置模块72、执行模块74,其中,
The following is a description of the configuration of the operating system of the operating system according to the embodiment of the present invention. As shown in FIG. 7, the first building module 70, the first configuration module 72, and the execution Module 74, wherein
第一搭建模块70,设置为通过接收的指定命令升级第一操作系统和/或第二操作系统所需的设备环境;The first building module 70 is configured to upgrade a device environment required by the first operating system and/or the second operating system by using the specified command received;
第一配置模块72,设置为加载网络参数信息,配置升级运行第一操作系统和/或第二操作系统所需的网络参数;The first configuration module 72 is configured to load network parameter information, and configure network parameters required for upgrading the first operating system and/or the second operating system;
执行模块74,设置为分别接收并执行用于升级第一操作系统的第一命令和/或用于升级第二操作系统的第二命令,对第一操作系统和/或第二操作系统进行升级。The executing module 74 is configured to separately receive and execute a first command for upgrading the first operating system and/or a second command for upgrading the second operating system, and upgrade the first operating system and/or the second operating system. .
下面是对通过网管远程升级操作系统的说明,图8是本发明实施例的操作系统的升级装置的可选结构框图一,如图8所示,包括:第二搭建模块80、第二配置模块82、校验模块84、升级模块86,其中,The following is a description of an optional operating system for upgrading an operating system through a network management system. FIG. 8 is a block diagram of an optional structure of an operating system upgrade apparatus according to an embodiment of the present invention. As shown in FIG. 8, the method includes: a second building module 80 and a second configuration module. 82, a verification module 84, an upgrade module 86, wherein
第二搭建模块80,设置为搭建通过网管远程升级第一操作系统和/或第二操作系统所需的设备环境;The second building module 80 is configured to set up a device environment required for remotely upgrading the first operating system and/or the second operating system by using the network management system;
第二配置模块82,设置为加载网络参数信息,配置升级运行第一操作系统和/或第二操作系统所需的网络参数;The second configuration module 82 is configured to load network parameter information, and configure network parameters required for upgrading the first operating system and/or the second operating system;
校验模块84,设置为在执行用于升级第一操作系统的第三命令之后,对第二操作系统进行校验;The verification module 84 is configured to perform verification on the second operating system after executing the third command for upgrading the first operating system;
升级模块86,设置为在校验通过时,接收用于指示升级缓存区中的第二操作系统的第四命令,以对第二操作系统进行升级。The upgrade module 86 is configured to receive a fourth command for indicating a second operating system in the upgrade cache to upgrade the second operating system when the verification passes.
图9是本发明实施例的操作系统的升级装置的可选结构框图二,如图9所示,除了图8所示的所有模块外,校验模块84还包括:下载单元90、校验单元92,其中,FIG. 9 is a block diagram 2 of an optional structure of an operating system upgrade apparatus according to an embodiment of the present invention. As shown in FIG. 9, in addition to all the modules shown in FIG. 8, the verification module 84 further includes: a download unit 90 and a verification unit. 92, of which
下载单元90,设置为将待升级的第二操作系统下载到缓存区;The downloading unit 90 is configured to download the second operating system to be upgraded to the buffer area;
校验单元92,设置为在缓存区对第二操作系统进行校验。The verification unit 92 is configured to check the second operating system in the buffer area.
需要说明的是,上述模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述模块分别位于多个处理器中。It should be noted that the above modules may be implemented by software or hardware. For the latter, the foregoing may be implemented by, but not limited to, the foregoing modules are all located in the same processor; or, the modules are respectively located in multiple processes. In the device.
下面对本发明的可选实施方式进行说明,提供一种使用LXC容器启动android系统的方案,包括:
The following describes an alternative embodiment of the present invention, and provides a solution for starting an Android system using an LXC container, including:
S61、设计linux网关的内核(kernel),以通用的Linux网关平台的kernel为基础,移植支持android系统运行的代码到kernel中;S61, designing the kernel (kernel) of the linux gateway, based on the kernel of the universal Linux gateway platform, porting the code supporting the running of the android system to the kernel;
S62、基于新的kernel编译linux网关平台版本,测试基础网关功能,保证基础网关功能正常;新的kernel为移植支持android系统运行的代码的kernel。S62. Compile the linux gateway platform version based on the new kernel, test the basic gateway function, and ensure that the basic gateway function is normal; the new kernel is a kernel for porting the code supporting the android system.
S63、把LXC容器移植到linux网关平台版本中;S63. Porting the LXC container to the linux gateway platform version;
S64、建立资源限制和管理模块;即建立包含资源限制策略和管理分配策略的组件;S64. Establish a resource restriction and management module; that is, establish a component that includes a resource restriction policy and a management allocation policy;
S64、建立网关平台和android系统的交互通道。S64. Establish an interactive channel between the gateway platform and the android system.
S65、编译android系统版本,并安装到网关平台的指定的系统分区中;S65, compiling the android system version, and installing to the specified system partition of the gateway platform;
S66、启动Linux网关系统版本S66. Start the Linux gateway system version.
S67、启动LXC容器;S67, starting the LXC container;
S68、由LXC容器触发android系统的启动;S68, triggering the startup of the android system by the LXC container;
可选的,在上述实施例中,在S67中,启动LXC容器,可以由Linux网关的启动脚本来触发的;在S68中,LXC触发android系统的启动,包括通过应用层框架部分的启动,android系统相关的内核部分的启动已完成。Optionally, in the foregoing embodiment, in S67, starting the LXC container may be triggered by a startup script of the Linux gateway; in S68, the LXC triggers the startup of the android system, including starting through the application layer framework part, android The startup of the system-related kernel part is complete.
下面介绍系统版本的升级方法,系统版本的升级方法有两种:The following describes the upgrade method of the system version. There are two ways to upgrade the system version:
一种是在boot命令行下面通过downver命令升级,升级步骤包括:One is to upgrade through the downver command under the boot command line. The upgrade steps include:
S71、搭建boot阶段升级系统版本程序的设备环境。S71. Set up a device environment for upgrading the system version program in the boot phase.
S72、上电启动光网络单元(ONU,Optical Network Unit,也称光网络设备)设备,配置网络参数。S72. Power on the optical network unit (ONU, optical network device) to configure network parameters.
S73、执行downver linuxVersion命令,升级网关平台程序;S73. Execute the downver linuxVersion command to upgrade the gateway platform program.
S74、执行downver android命令,升级android系统程序;S74, executing the downver android command, upgrading the android system program;
S75、升级成功时,重启设备,运行系统版本;S75. When the upgrade is successful, restart the device and run the system version.
另外一种可选的升级方式通过网管远程升级,升级步骤如下:Another optional upgrade method is remotely upgraded through the NMS. The upgrade steps are as follows:
S81、搭建版本下升级系统版本程序的设备环境;
S81. The device environment for upgrading the system version program under the build version;
S82、ONU设备上电启动,配置网络参数;光网络设备S82. The ONU device is powered on and configured with network parameters. The optical network device is configured.
S83、执行download linuxVersion,升级网关平台程序;S83, executing download linuxVersion, upgrading the gateway platform program;
S84、执行download androidSys,先把android版本下载到cache区;S84, execute download androidSys, first download the android version to the cache area;
S85、对android版本进行校验;S85, verifying the android version;
S86、校验通过,再触发一个升级命令,把cache区的root.img读出来,写到root区。然后把cache区的system.img读出来,写到system区;S86, check pass, and then trigger an upgrade command, read the root.img of the cache area, write to the root area. Then read out the system.img of the cache area and write it to the system area;
S87、校验不通过不执行升级,同时通知网管平台,需要重新升级;S87. If the verification fails, the upgrade is not performed, and the network management platform is notified, and the upgrade is required.
S88、升级成功时重启设备,运行系统版本;S88. Restart the device when the upgrade is successful, and run the system version.
可选的,androidSys包含android系统运行需要的root.img和system.img。Optionally, androidSys contains the root.img and system.img required for the android system to run.
由于android系统版本较大,同时考虑到系统备份安全性,引入cache分区,便于版本的校验和系统恢复。Due to the large version of the android system and the security of the system backup, the cache partition is introduced to facilitate version verification and system recovery.
图10是本发明可选实施例的linux网关平台和android平台融合的系统框架图,如图10所示,下面结合附图10和实施例对本发明实施例的技术方案作说明:10 is a system framework diagram of a linux gateway platform and an android platform in an alternative embodiment of the present invention. As shown in FIG. 10, the technical solution of the embodiment of the present invention is described below with reference to FIG. 10 and the embodiment:
本发明实施例的一种使用LXC容器启动android系统的技术及系统升级方法包括:A technology and system upgrade method for starting an android system using an LXC container according to an embodiment of the present invention includes:
按照图10的linux网关平台和android平台融合的系统框架图,According to the system framework diagram of the Linux gateway platform and the android platform integrated in FIG. 10,
该流程包括:The process includes:
S91:准备linux内核,移植支持android系统的内核代码到网关内核代码中,使网关平台和android系统共用一份linux内核;S91: Prepare the Linux kernel, transplant the kernel code of the android system to the gateway kernel code, and make the gateway platform and the android system share a Linux kernel;
S92:编译linux网关平台基础版本;S92: Compile the basic version of the Linux gateway platform;
S93:编译android系统版本;S93: Compile the android system version;
S94:建立LXC容器,使用namespace和cgroup技术将linux网关平台和android两套运行系统隔离。S94: Establish an LXC container, and use the namespace and cgroup technology to isolate the Linux gateway platform from the android operating system.
S95:建立资源限制和管理分配策略。S95: Establish resource restriction and management allocation strategy.
S96:建立linux网关平台和android系统的交互通道;在网关平台侧设
计android系统的代理进程,在android侧设计网关平台的代理进程。两个系统的交互都通过代理完成。S96: Establish an interactive channel between the linux gateway platform and the android system; set on the side of the gateway platform
The agent process of the android system, the agent process of the gateway platform is designed on the android side. The interaction of both systems is done through a proxy.
S97:屏蔽android系统的网络功能,使android应用程序和网关平台业务进程都使用网关平台的网络通讯模块。S97: The network function of the android system is shielded, so that the android application and the gateway platform business process both use the network communication module of the gateway platform.
S98:下载linux网关平台版本和android系统版本到单板中,启动版本。S98: Download the linux gateway platform version and the android system version to the board, and start the version.
图11是本发明可选实施例的系统版本启动流程图,如图11所示,该流程包括:FIG. 11 is a flowchart showing a system version startup according to an optional embodiment of the present invention. As shown in FIG. 11, the process includes:
步骤201:系统上电,启动加载(bootloader)程序开始启动,初始化中央处理器(CPU)寄存器,初始化系统外围硬件,包括内存、闪存(flash)、网口、串口等设备初始化。Step 201: The system is powered on, the bootloader program starts, initializes the central processing unit (CPU) register, and initializes the peripheral hardware of the system, including memory, flash (flash), network port, serial port and other device initialization.
步骤202:linux内核的启动。Step 202: Start the Linux kernel.
步骤203:linux内核的初始化(init)进程开始启动。Step 203: The initialization (init) process of the Linux kernel starts.
步骤204:linux网关平台的基础功能版本启动完毕后,初始化(init)进程开始启动LXC容器。Step 204: After the basic function version of the linux gateway platform is started, the initialization (init) process starts to start the LXC container.
步骤205:LXC容器启动完成之后,子进程调用开始(start)程序,通过执行文件(execve)在容器空间启动android系统的init进程。Step 205: After the LXC container is started, the child process calls the start program to start the init process of the android system in the container space by executing the file (execve).
步骤206:android系统的init进程开始执行android系统的一些服务进程(services)。Step 206: The init process of the android system starts to execute some service processes (services) of the android system.
步骤207:services启动完成后,开始启动Andorid应用框架的入口进程合子(zygote)。Step 207: After the services are started, start the zygote of the portal process of the Andorid application framework.
步骤208:启动系统服务进程(system server)。Step 208: Start a system service process (system server).
步骤S209:启动服务管理器(server manager)。Step S209: Start a server manager.
步骤S210:最后启动相关的应用程序(app);Step S210: Finally launch the related application (app);
图12是本发明可选实施例的LXC容器的启动流程图,主函数(Main)调用LXC开启(lxc_start),如图12所示,包括:Figure 12 is a flowchart showing the startup of the LXC container according to an alternative embodiment of the present invention. The main function (Main) calls LXC to open (lxc_start), as shown in Figure 12, including:
S301,初始化处理;包括初始化容器的管理结构LXC管理(lxc_handler)结构,返回该结构体,lxc_handler中除了包含容器的名字、属性,和包含char
*cgroup成员用来关联对应一个cgroup;S301, initialization processing; including a management structure LXC management (lxc_handler) structure of the initialization container, returning the structure, lxc_handler in addition to containing the container name, attributes, and containing char
*cgroup members are used to associate a corresponding cgroup;
S302,传参赋值或解析配置文件;S302, passing the parameter assignment or parsing the configuration file;
S303,设置LXC容器状态为开启(STARTING);S303, setting the LXC container status to ON (STARTING);
S304,命名空间属性设置;S304, namespace attribute setting;
S305,创建容器的网络设备或虚拟控制台(tty)或控制台终端(console)设备;S305. Create a network device of the container or a virtual console (tty) or a console device (console);
S306,设定指定根文件系统路径;S306. Set a path of the specified root file system.
S307,根据命名空间克隆标识(clone_flags),使用新名称空间(namespace)创建进程;因此容器的进程是彼此隔离的;S307. Create a process by using a new namespace (namespace) according to the namespace clone identifier (clone_flags); therefore, the processes of the container are isolated from each other;
S308,创建cgroup容器,将任务任务号(pid)添加至cgroup;S308, create a cgroup container, and add a task task number (pid) to the cgroup;
S309,父进程通过通知响应子进程根据配置文件设置cgroup属性;通知响应子进程可以是lxc_sync_barrier_child,lxc_sync_barrier_child进程包含的内容有:当子进程准备好设置cgroups,告知子进程继续初始化。S309, the parent process responds to the child process by setting a cgroup attribute according to the configuration file; the notification response child process may be lxc_sync_barrier_child, and the lxc_sync_barrier_child process includes: when the child process is ready to set cgroups, the child process is notified to continue initialization.
S310,设置子进程网络接口属性建立网络(setup_network),包含互联网协议(ip)地址、接口名等;S310, setting a sub-process network interface attribute establishment network (setup_network), including an Internet Protocol (IP) address, an interface name, and the like;
S311,根文件系统建立(Setup_rootfs)、和挂载(mount)加载;S311, root file system establishment (Setup_rootfs), and mount (mount) loading;
S312,设置子进程tty/console;S312, setting a child process tty/console;
S313,改变程序执行时所参考的根目录位置(Changroot)设置根文件系统(Setup_rootfs_pivot_root);S313, changing the root directory location (Changroot) referenced by the execution of the program to set the root file system (Setup_rootfs_pivot_root);
S314,询问父进程同步设置cgroups;例如、调用lxc_sync_barrier_parent询问父进程同步设置cgroups;S314, querying the parent process synchronization setting cgroups; for example, calling lxc_sync_barrier_parent to query the parent process synchronization setting cgroups;
S315,Lxc-poll(处理容器命令等);S315, Lxc-poll (processing container command, etc.);
S316,子进程调用启动进程start,通过执行文件(execve)启动初始化应用程序;包括通过执行文件启动参数-d后的应用程序初始化init。S316, the child process calls the startup process start, and starts the initialization application by executing the file (execve); and comprises initializing the init by the application after the file startup parameter -d is executed.
图13是本发明可选实施例的android系统启动流程图,如图13所示,android系统启动init进程,执行开机任务,包括ril的守护进程(ril-daemon)(作为Windows Mobile的一个非常重要的组件,RIL使无线语音和数据应用
成为可能;RIL的位置处于无线基带系统的协议栈之上,Windows Mobile的CellCore层之下。Android的RIL位于应用程序框架与内核之间,分成了两个部分,一个部分负责套接字(socket)与应用程序框架进行通信。另外一个部分负责向下是通过两种方式与无线电广播(RADIO)进行通信,它们是直接与radio通信的AT指令通道和用于传输包数据的通道,数据通道用于手机的上网功能)进程、多媒体(Media)、开机音乐(Bootsound)、开机动画、服务管理器等,然后启动应用框架的入口进程服务合子(Zygote),启动虚拟机,如Dalvik VM,开启系统服务(Systemserver),为开启多种多样的应用程序做准备,根据选择调用窗口管理器(Window Manager)、程序包管理器(Package Manager)、电源管理器(Power Manager)、账户管理器(AccountManager)、目录管理器(Content Manager)、手持服务(Handare Service)、传感服务(Sensor Service)、连接服务(Connectivity Service)、位置管理器(Location Manager)、搜索服务(Search Service)、电池服务(Battery Service),最后进入活动(Activity)管理器,启动系统组件Home Activity,完全启动android系统。13 is a flowchart of an android system startup process according to an alternative embodiment of the present invention. As shown in FIG. 13, the android system starts an init process and performs a boot task, including a ril daemon (ril-daemon) (as a very important part of Windows Mobile). Components, RIL enables wireless voice and data applications
It is possible; the location of the RIL is on the protocol stack of the wireless baseband system, under the CellCore layer of Windows Mobile. Android RIL is located between the application framework and the kernel, divided into two parts, one part responsible for the socket (socket) to communicate with the application framework. The other part is responsible for communicating with Radio Broadcasting (RADIO) in two ways. They are the AT command channel that communicates directly with the radio and the channel used to transmit the packet data. The data channel is used for the Internet access function of the mobile phone. Multimedia (Media), Bootsound, boot animation, service manager, etc., then launch the application framework's portal process zygote (Zygote), start the virtual machine, such as Dalvik VM, open the system service (Systemserver), open more A variety of applications to prepare, call Window Manager, Package Manager, Power Manager, AccountManager, Content Manager , Handare Service, Sensor Service, Connectivity Service, Location Manager, Search Service, Battery Service, and finally enter the activity (Activity ) Manager, start the system component Home Activity, fully start the android system.
图14是本发明可选实施例的boot阶段系统版本程序升级的流程图,如图14所示,boot阶段系统版本程序升级的方法包括:14 is a flowchart of a boot phase system version program upgrade according to an alternative embodiment of the present invention. As shown in FIG. 14, the boot phase system version program upgrade method includes:
步骤501:搭建根(boot)阶段升级系统版本程序的设备环境;包括:把ONU设备通过网线和串口线连接PC机,在PC机侧打开简单文件传输协议(tftp,Trivial File Transfer Protocol)客户端,准备好需要升级的版本程序。Step 501: Establish a device environment for upgrading the system version program in the boot phase; including: connecting the ONU device to the PC through the network cable and the serial cable, and opening the Tftp (Trivial File Transfer Protocol) client on the PC side. , ready to upgrade the version of the program.
步骤502:上电启动根(boot)程序,配置网络参数;包括:上电启动ONU设备,在boot启动的过程中按回车键,进入boot命令行,输入setenv命令,配置ONU侧和TFTP服务器侧的IP地址在同一网段。Step 502: Power on the boot program, configure the network parameters, including: powering on the ONU device, pressing the enter key during the boot process, entering the boot command line, inputting the setenv command, configuring the ONU side and the TFTP server. The IP address of the side is on the same network segment.
步骤503:执行下载linux平台版本(downver linuxVersion)命令,升级网关平台程序;Step 503: Execute downloading the linux platform version (downver linuxVersion) command, and upgrading the gateway platform program;
步骤504:执行下载安卓平台(downver android)命令,升级安卓(android)系统程序;Step 504: Execute downloading the Android platform (downver android) command, and upgrading the Android (android) system program;
步骤505:升级成功,重启设备;此时运行系统版本。
Step 505: The upgrade is successful, and the device is restarted; the system version is run at this time.
图15是本发明可选实施例的版本启动后系统版本程序升级的流程图,如图15所示,网关版本起来后升级系统版本方法包括以下步骤:15 is a flowchart of a system version program upgrade after version startup according to an alternative embodiment of the present invention. As shown in FIG. 15, the method for upgrading a system version after a gateway version includes the following steps:
步骤601:搭建版本起来后升级系统版本程序的设备环境;包括:把ONU设备通过网线连接PC机,在PC机侧打开下载文件的客户端,准备好需要升级的版本程序。下载文件的客户端可以是WFTP客户端,WFTP客户端是包含文件下载工具的客户端。Step 601: The device environment for upgrading the system version program after the version is built; includes: connecting the ONU device to the PC through the network cable, opening the client for downloading the file on the PC side, and preparing the version program to be upgraded. The client that downloads the file can be a WFTP client, and the WFTP client is a client that includes a file download tool.
步骤602:上电启动ONU,配置网络参数,包括:ONU设备上电启动,版本完全起来后,通过PC机远程连接(telnet)到网关,远程配置ONU的IP地址和虚拟局域网(vlan)参数;Step 602: The ONU is powered on, and the network parameters are configured, including: the ONU device is powered on, and after the version is completely completed, the IP address and the virtual LAN (vlan) parameter of the ONU are remotely configured by using a PC to remotely connect to the gateway.
步骤603:执行download linuxVersion命令,升级网关平台程序;Step 603: Execute the download linuxVersion command to upgrade the gateway platform program.
步骤604:升级成功,执行下载安卓平台系统文件(download androidSys),下载android版本到cache区,并对版本进行校验;如步骤603升级不成功,需上报网管平台,再重新执行步骤603,升级网关平台程序;Step 604: The upgrade is successful, and the downloading of the Android platform system file (download androidSys) is performed, the android version is downloaded to the cache area, and the version is verified; if the upgrade is unsuccessful in step 603, the network management platform needs to be reported, and then step 603 is performed again. Gateway platform program;
步骤605:android版本校验成功,升级android版本到root区和system区。如android版本校验不成功,需上报网管平台,重新下载android版本;Step 605: The android version is successfully verified, and the android version is upgraded to the root area and the system area. If the android version verification is not successful, you need to report to the network management platform and re-download the android version.
步骤606:升级成功,重启设备。Step 606: The upgrade is successful, and the device is restarted.
本实施例的智能家庭网关一方面要支持anroid操作系统的智能业务,比如迅雷下载,智能家居,一键提速等,这些智能业务都可以通过安装第三方android插件来实现,同时还可以实现现有家庭网关基础功能的要求,比如,语音业务,上网业务,IPTV等,通过使用LXC容器技术实现了网关基本业务和anroid智能业务的融合。On the one hand, the smart home gateway of the embodiment supports the intelligent services of the anroid operating system, such as Thunder downloading, smart home, one-click speeding, etc. These intelligent services can be implemented by installing a third-party android plug-in, and can also implement existing ones. The basic functions of the home gateway, such as voice service, Internet service, IPTV, etc., realize the integration of the gateway basic service and the anroid intelligent service by using the LXC container technology.
本发明的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的程序代码:Embodiments of the present invention also provide a storage medium. Optionally, in the embodiment, the foregoing storage medium may be configured to store program code for performing the following steps:
S1,基于第一内核编译第一操作系统网关平台,其中,第一内核以第一操作系统网关平台为基础支持运行第二操作系统的代码;S1. Compiling a first operating system gateway platform based on the first kernel, where the first kernel supports running the code of the second operating system based on the first operating system gateway platform;
S2,将LXC容器移植到第一操作系统网关平台中,并建立用于运行启动第二操作系统的组件,其中,LXC容器用于管理第一操作系统网关平台和第二操作系统;
S2, the LXC container is transplanted into the first operating system gateway platform, and a component for running the second operating system is started, where the LXC container is used to manage the first operating system gateway platform and the second operating system;
S3,通过LXC容器触发第二操作系统在组件中启动。S3, triggering the second operating system to start in the component through the LXC container.
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。For example, the specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the optional embodiments, and details are not described herein again.
显然,本领域的技术人员应该明白,上述的本发明的模块或步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that the above-described modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network of multiple computing devices. Alternatively, they may be implemented by program code executable by a computing device such that they may be stored in a storage device by a computing device and, in some cases, may be executed in a different order than herein. The steps shown or described are either fabricated as integrated circuit modules, or a plurality of modules or steps are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and the present invention may be modified and changed by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件(例如处理器)完成,所述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现。相应地,上述实施例中的每个模块/单元可以采用硬件的形式实现,例如通过集成电路来实现其相应功能,也可以采用软件功能模块的形式实现,例如通过处理器执行存储于存储器中的程序/指令来实现其相应功能。本发明不限制于任何特定形式的硬件和软件的结合。One of ordinary skill in the art will appreciate that all or a portion of the above steps may be performed by a program to instruct related hardware, such as a processor, which may be stored in a computer readable storage medium, such as a read only memory, disk or optical disk. Wait. Alternatively, all or part of the steps of the above embodiments may also be implemented using one or more integrated circuits. Correspondingly, each module/unit in the foregoing embodiment may be implemented in the form of hardware, for example, by implementing an integrated circuit to implement its corresponding function, or may be implemented in the form of a software function module, for example, being executed by a processor and stored in a memory. Programs/instructions to implement their respective functions. The invention is not limited to any specific form of combination of hardware and software.
虽然本申请所揭露的实施方式如上,但所述的内容仅为便于理解本申请而采用的实施方式,并非用以限定本申请,如本发明实施方式中的具体的实现方法。任何本申请所属领域内的技术人员,在不脱离本申请所揭露的精神和范围的前提下,可以在实施的形式及细节上进行任何的修改与变化,但本申请的专利保护范围,仍须以所附的权利要求书所界定的范围为准。The embodiments disclosed in the present application are as described above, but the descriptions are only for the purpose of understanding the present application, and are not intended to limit the present application, such as the specific implementation method in the embodiments of the present invention. Any modifications and changes in the form and details of the embodiments may be made by those skilled in the art without departing from the spirit and scope of the disclosure. The scope defined by the appended claims shall prevail.
上述技术方案实现了在网关平台同时启动两个操作系统,在不增加硬件成本的情况下实现了网关平台操作系统的功能和其他操作系统的智能业务相融合的效果。
The above technical solution realizes that two operating systems are simultaneously started on the gateway platform, and the effect of the function of the gateway platform operating system and the intelligent service of other operating systems is realized without increasing the hardware cost.
Claims (10)
- 一种操作系统的启动方法,包括:An operating system startup method includes:基于第一内核编译第一操作系统网关平台,其中,所述第一内核以所述第一操作系统为基础支持运行第二操作系统的代码;Compiling a first operating system gateway platform based on the first kernel, wherein the first kernel supports code for running the second operating system based on the first operating system;将LXC容器移植到所述第一操作系统网关平台中,并建立用于运行启动所述第二操作系统的组件,其中,所述LXC容器用于管理所述第一操作系统网关平台和所述第二操作系统;Porting an LXC container into the first operating system gateway platform and establishing a component for running the second operating system, wherein the LXC container is configured to manage the first operating system gateway platform and the Second operating system;通过所述LXC容器触发所述第二操作系统在所述组件中启动。The second operating system is triggered to be launched in the component by the LXC container.
- 根据权利要求1所述的启动方法,在将LXC容器移植到所述第一操作系统网关平台中之后,所述启动方法还包括:The booting method according to claim 1, after the migrating the LXC container to the first operating system gateway platform, the booting method further includes:基于所述LXC容器通过预定规则将所述第二操作系统安装到所述第一操作系统的指定系统分区中,其中,所述指定系统分区为除安装所述第一操作系统网关平台的系统分区以外的其他系统分区。Installing the second operating system into a specified system partition of the first operating system by a predetermined rule based on the LXC container, wherein the specified system partition is a system partition other than the first operating system gateway platform installed Other system partitions than others.
- 根据权利要求1所述的启动方法,其中,所述组件包括:所述第一操作系统网关平台和所述第二操作系统的交互通道,所述建立用于运行启动所述第二操作系统的组件包括:The booting method according to claim 1, wherein the component comprises: an interaction channel between the first operating system gateway platform and the second operating system, and the establishing is used to run the second operating system Components include:在所述第一操作系统网关平台中建立所述第二操作系统的第一代理进程;Establishing a first proxy process of the second operating system in the first operating system gateway platform;在所述第二操作系统中建立所述第一操作系统网关平台的第二代理进程;Establishing a second proxy process of the first operating system gateway platform in the second operating system;其中,所述第一代理进程和所述第二代理进程通过交互通道分别管理所述第二操作系统和所述第一操作系统网关平台,以实现运行启动所述第二操作系统。The first agent process and the second agent process respectively manage the second operating system and the first operating system gateway platform through an interaction channel, so as to implement and start the second operating system.
- 根据权利要求1~3任一项所述的启动方法,所述组件还包括:资源限制策略和管理分配策略,所述启动方法还包括:The startup method according to any one of claims 1 to 3, the component further comprising: a resource restriction policy and a management allocation policy, the startup method further comprising:在所述第一操作系统网关平台中建立所述资源限制策略和所述管理分配策略,其中,所述资源限制策略和所述管理分配策略用于屏蔽所述第一操作 系统在所述第二操作系统网关平台中的网络功能。Establishing the resource restriction policy and the management allocation policy in the first operating system gateway platform, wherein the resource restriction policy and the management allocation policy are used to block the first operation The network function of the system in the second operating system gateway platform.
- 根据权利要求3所述的启动方法,其中,所述通过所述LXC容器触发所述第二操作系统在所述组件中启动包括:The booting method according to claim 3, wherein the triggering the booting of the second operating system in the component by the LXC container comprises:在启动所述第一操作系统后触发所述第一操作系统网关平台的预设脚本以启动所述LXC容器;Triggering a preset script of the first operating system gateway platform to start the LXC container after starting the first operating system;调用启动的所述LXC容器通过所述交互通道启动所述第二操作系统。The LXC container that invokes the launch initiates the second operating system through the interactive channel.
- 根据权利要求1所述的启动方法,所述通过所述LXC容器触发所述第二操作系统在所述组件中启动之后,所述启动方法还包括:The booting method of claim 1, after the triggering, by the LXC container, that the second operating system is started in the component, the booting method further comprises:通过接收的指定命令升级所述第一操作系统和/或所述第二操作系统所需的设备环境;Upgrading a device environment required by the first operating system and/or the second operating system by receiving the specified command;加载网络参数信息,配置升级运行所述第一操作系统和/或所述第二操作系统所需的网络参数;Loading network parameter information, and configuring network parameters required to upgrade the first operating system and/or the second operating system;分别接收并执行用于升级所述第一操作系统的第一命令和/或用于升级所述第二操作系统的第二命令,对所述第一操作系统和/或第二操作系统进行升级。Receiving and executing a first command for upgrading the first operating system and/or a second command for upgrading the second operating system, respectively, upgrading the first operating system and/or the second operating system .
- 根据权利要求1所述的启动方法,在所述通过所述LXC容器触发所述第二操作系统在所述组件中启动之后,所述启动方法还包括:The booting method according to claim 1, after the triggering the second operating system to be started in the component by the LXC container, the booting method further includes:搭建通过网管远程升级所述第一操作系统和/或所述第二操作系统所需的设备环境;Establishing a device environment required for remotely upgrading the first operating system and/or the second operating system by using a network management system;加载网络参数信息,配置升级运行所述第一操作系统和/或所述第二操作系统所需的网络参数;Loading network parameter information, and configuring network parameters required to upgrade the first operating system and/or the second operating system;在执行用于升级所述第一操作系统的第三命令之后,对所述第二操作系统进行校验;After performing the third command for upgrading the first operating system, verifying the second operating system;在校验通过时,接收用于指示升级缓存区中的所述第二操作系统的第四命令,以对所述第二操作系统进行升级。When the verification passes, a fourth command for indicating the second operating system in the upgrade buffer is received to upgrade the second operating system.
- 根据权利要求7所述的方法,其中,所述对所述第二操作系统进行校验包括: The method of claim 7, wherein the verifying the second operating system comprises:将待升级的所述第二操作系统下载到缓存区;Downloading the second operating system to be upgraded to a cache area;在所述缓存区对所述第二操作系统进行校验。The second operating system is verified in the buffer area.
- 根据权利要求1至8任一项所述的方法,其中,所述第一操作系统为linux系统,所述第二操作系统为安卓android系统。The method according to any one of claims 1 to 8, wherein the first operating system is a Linux system and the second operating system is an Android Android system.
- 一种操作系统的启动装置,包括:An operating device startup device includes:编译模块,设置为基于第一内核编译第一操作系统网关平台,其中,所述第一内核以所述第一操作系统网关平台为基础支持运行第二操作系统的代码;Compiling a module, configured to compile a first operating system gateway platform based on the first kernel, wherein the first kernel supports running the code of the second operating system based on the first operating system gateway platform;处理模块,设置为将LXC容器移植到所述第一操作系统网关平台中,并建立用于运行启动所述第二操作系统的组件,其中,所述LXC容器用于管理所述第一操作系统网关平台和所述第二操作系统;a processing module, configured to migrate the LXC container to the first operating system gateway platform, and establish a component for running the second operating system, where the LXC container is used to manage the first operating system a gateway platform and the second operating system;启动模块,设置为通过所述LXC容器触发所述第二操作系统在所述组件中启动。 Activating a module, configured to trigger the second operating system to be launched in the component by the LXC container.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510648586.7A CN106569842A (en) | 2015-10-09 | 2015-10-09 | Startup method and device for operating system |
CN201510648586.7 | 2015-10-09 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2017059724A1 true WO2017059724A1 (en) | 2017-04-13 |
Family
ID=58487225
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2016/091046 WO2017059724A1 (en) | 2015-10-09 | 2016-07-22 | Operating system starting method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106569842A (en) |
WO (1) | WO2017059724A1 (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110554934A (en) * | 2019-09-06 | 2019-12-10 | 山东超越数控电子股份有限公司 | embedded equipment and system partitioning and upgrading method thereof |
CN113626060A (en) * | 2021-08-06 | 2021-11-09 | 天津津航计算技术研究所 | Online upgrade method based on separated storage under vxworks system |
CN115988129A (en) * | 2022-12-28 | 2023-04-18 | 天翼电信终端有限公司 | Dual-system cloud security mobile phone wifi safe use method |
CN116541085A (en) * | 2023-07-05 | 2023-08-04 | 成都阿加犀智能科技有限公司 | Android/Linux fusion method, device, equipment and storage medium |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107621956B (en) * | 2017-10-09 | 2021-11-30 | 江苏航天龙梦信息技术有限公司 | Method for starting operating system based on network |
US11385923B2 (en) * | 2019-07-16 | 2022-07-12 | International Business Machines Corporation | Container-based virtualization system extending kernel functionality using kernel modules compiled by a compiling container and loaded by an application container |
CN111338701A (en) * | 2020-02-25 | 2020-06-26 | 邦彦技术股份有限公司 | Network equipment starting method and network equipment |
CN114090096B (en) * | 2022-01-21 | 2022-04-15 | 成都云祺科技有限公司 | Method, system and storage medium for implementing network virtual file system |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6567977B1 (en) * | 1999-11-15 | 2003-05-20 | Intel Corporation | Method and apparatus for software program installation preview directed to system software |
CN103645957A (en) * | 2013-12-25 | 2014-03-19 | 北京搜狐新媒体信息技术有限公司 | Resource management and control method for virtual machines, and resource management and control device for virtual machines |
CN104516782A (en) * | 2014-12-26 | 2015-04-15 | 上海迈微软件科技有限公司 | Method for switching operating environments of intelligent system and equipment |
-
2015
- 2015-10-09 CN CN201510648586.7A patent/CN106569842A/en active Pending
-
2016
- 2016-07-22 WO PCT/CN2016/091046 patent/WO2017059724A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6567977B1 (en) * | 1999-11-15 | 2003-05-20 | Intel Corporation | Method and apparatus for software program installation preview directed to system software |
CN103645957A (en) * | 2013-12-25 | 2014-03-19 | 北京搜狐新媒体信息技术有限公司 | Resource management and control method for virtual machines, and resource management and control device for virtual machines |
CN104516782A (en) * | 2014-12-26 | 2015-04-15 | 上海迈微软件科技有限公司 | Method for switching operating environments of intelligent system and equipment |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110554934A (en) * | 2019-09-06 | 2019-12-10 | 山东超越数控电子股份有限公司 | embedded equipment and system partitioning and upgrading method thereof |
CN110554934B (en) * | 2019-09-06 | 2022-08-19 | 超越科技股份有限公司 | Embedded equipment and system partitioning and upgrading method thereof |
CN113626060A (en) * | 2021-08-06 | 2021-11-09 | 天津津航计算技术研究所 | Online upgrade method based on separated storage under vxworks system |
CN113626060B (en) * | 2021-08-06 | 2023-08-01 | 天津津航计算技术研究所 | Online upgrade method based on separate storage under vxworks system |
CN115988129A (en) * | 2022-12-28 | 2023-04-18 | 天翼电信终端有限公司 | Dual-system cloud security mobile phone wifi safe use method |
CN116541085A (en) * | 2023-07-05 | 2023-08-04 | 成都阿加犀智能科技有限公司 | Android/Linux fusion method, device, equipment and storage medium |
CN116541085B (en) * | 2023-07-05 | 2023-09-12 | 成都阿加犀智能科技有限公司 | Android/Linux fusion method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN106569842A (en) | 2017-04-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2017059724A1 (en) | Operating system starting method and device | |
US9910765B2 (en) | Providing testing environments for software applications using virtualization and a native hardware layer | |
EP2697714B1 (en) | Deployment system for multi-node applications | |
CN102232304B (en) | Method, system and terminal for system update between mobile communication terminals | |
US9329894B2 (en) | Method and apparatus for extending local area networks between clouds and permanently migrating virtual machines using static network addresses | |
CN113452830B (en) | Batch control method of android cloud mobile phone, computer readable medium and electronic device | |
US20140075438A1 (en) | Method, server, and system for starting an application | |
CN103458002A (en) | One-key deployment method and device for cloud system | |
CN113419815B (en) | Method, system, equipment and medium for pre-starting operation environment installation | |
CN104166586A (en) | Transparent computing method and transparent computing system based on virtualization technology | |
EP3734910B1 (en) | Method and device for upgrading driver | |
US20170329739A1 (en) | Methods and systems for loading a boot agent on a router network device | |
CN104866338A (en) | Method and device for remotely deploying software | |
US20170068585A1 (en) | Method and Apparatus for Recovering System Software of Intelligent Terminal | |
WO2020063607A1 (en) | Application client launch method, service server, and client device | |
US9928082B1 (en) | Methods and systems for remote device configuration | |
CN111427594A (en) | Application program running method and device | |
CN110928554A (en) | Deployment method, device, equipment and storage medium | |
CN117170803A (en) | Method for generating signal-creation operating system pipeline, electronic equipment and storage medium | |
CN114637549A (en) | Data processing method, system and storage medium for service grid-based application | |
CN104570967B (en) | Long-range control method and system based on android system | |
CN110489134A (en) | A kind of dispositions method and system of PXE server and High-Performance Computing Cluster environment | |
WO2021051936A1 (en) | Method and device for constructing software-defined networking (sdn) network | |
WO2020001142A1 (en) | Method and device for communication device station deployment and storage medium | |
CN113422702B (en) | Android equipment supporting wireless routing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16853030 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 16853030 Country of ref document: EP Kind code of ref document: A1 |