CN110134456B - Method, apparatus, device and storage medium for managing operating system - Google Patents

Method, apparatus, device and storage medium for managing operating system Download PDF

Info

Publication number
CN110134456B
CN110134456B CN201910307764.8A CN201910307764A CN110134456B CN 110134456 B CN110134456 B CN 110134456B CN 201910307764 A CN201910307764 A CN 201910307764A CN 110134456 B CN110134456 B CN 110134456B
Authority
CN
China
Prior art keywords
operating system
component
module configured
initialization
update
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910307764.8A
Other languages
Chinese (zh)
Other versions
CN110134456A (en
Inventor
殷切
方胜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Apollo Zhilian Beijing Technology Co Ltd
Original Assignee
Apollo Zhilian Beijing Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Apollo Zhilian Beijing Technology Co Ltd filed Critical Apollo Zhilian Beijing Technology Co Ltd
Priority to CN201910307764.8A priority Critical patent/CN110134456B/en
Publication of CN110134456A publication Critical patent/CN110134456A/en
Application granted granted Critical
Publication of CN110134456B publication Critical patent/CN110134456B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

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

Abstract

According to example embodiments of the present disclosure, methods, apparatuses, devices, and computer-readable storage media for managing an operating system are provided. A method for updating model parameters includes initializing a hardware device associated with an operating system via an initialization component that is set independent of the operating system in response to the operating system being about to boot. The method also includes determining whether the operating system needs to be upgraded. The method further includes performing an operation on system components of the operating system based on a result of the determining, the system components including at least a boot load component for booting and loading the operating system to launch the operating system. In this way, redundant backups of the operating system can be avoided, thereby reducing the occupation of hardware resources.

Description

Method, apparatus, device and storage medium for managing operating system
Technical Field
Embodiments of the present disclosure relate generally to the field of computers, and more particularly, to a method, apparatus, device, and computer-readable storage medium for managing an operating system.
Background
The over-the-air technology OTA is increasingly used in the field of internet of things, for example in car networking scenarios in car-mounted systems. The on-board system can be conveniently upgraded on line through the OTA, so that more updated functions and improved performance are achieved. However, native operating systems such as android systems deployed by in-vehicle systems may face the problem of being unable to boot after an upgrade fails.
Disclosure of Invention
According to an example embodiment of the present disclosure, a scheme for managing an operating system is provided.
In a first aspect of the disclosure, a method of managing an operating system is provided. The method includes initializing a hardware device associated with an operating system via an initialization component that is provided independent of the operating system in response to the operating system being about to boot. The method also includes determining whether the operating system needs to be upgraded. The method further includes performing an operation on system components of the operating system based on a result of the determining, the system components including at least a boot load component for booting and loading the operating system to launch the operating system.
In a second aspect of the present disclosure, an apparatus for managing an operating system is provided. The apparatus includes an initialization module configured to initialize a hardware device associated with an operating system via an initialization component that is provided independent of the operating system in response to the operating system being about to boot. The apparatus also includes an upgrade determination module configured to determine whether the operating system needs to be upgraded. The apparatus further includes an operation execution module configured to execute an operation on system components of the operating system based on a result of the determination, the system components including at least a boot loading component for booting and loading the operating system to launch the operating system.
In a third aspect of the disclosure, an electronic device is provided that includes one or more processors; and storage means for storing the one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out the method according to the first aspect of the disclosure.
In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, implements a method according to the first aspect of the present disclosure.
It should be understood that the statements herein reciting aspects are not intended to limit the critical or essential features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. In the drawings, like or similar reference characters designate like or similar elements, and wherein:
FIG. 1 illustrates a schematic diagram of an example environment in which embodiments of the present disclosure can be implemented;
FIG. 2 shows a flowchart of a process for managing an operating system, according to an embodiment of the present disclosure;
FIG. 3 illustrates a flow diagram of a process of performing operations on system components, according to some embodiments of the present disclosure;
FIG. 4 shows a schematic block diagram of an apparatus for managing an operating system in accordance with an embodiment of the present disclosure; and
FIG. 5 illustrates a block diagram of a computing device capable of implementing various embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and the embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
In describing embodiments of the present disclosure, the terms "include" and its derivatives should be interpreted as being inclusive, i.e., "including but not limited to. The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first," "second," and the like may refer to different or the same object. Other explicit and implicit definitions are also possible below.
As mentioned previously, operating systems may face the problem of being unable to reboot if an upgrade fails. For example, for an android customized system carried by a current vehicle-mounted system, in an OTA upgrade process, if a Boot Loader (Boot Loader) of the android system fails to be upgraded, the system may not be restarted. Conventionally, in order to solve this problem, a boot load area, a Kernel area (Kernel), a System service area (System server), and the like of the android System are all backed up, and when the System upgrade fails, the android System is restarted through the backup.
This conventional scheme has the following disadvantages. Firstly, the backup of the whole operating system greatly occupies the storage resources. Taking a vehicle-mounted scene as an example, the hardware resource configuration of the current car machine of the car is far different from the hardware resource configuration of the mobile phone, and the whole operating system (such as an android system) is backed up, so that the resources of the car machine system with tense original hardware resources are greatly occupied, the hardware cost of a car enterprise sensitive to price is increased, and the overall cost of a user for purchasing the car is increased. Secondly, after the first upgrade fails, because the original operating system is damaged, the subsequent second upgrade faces a great safety risk, so that the upgrade can not be carried out for many times.
According to an embodiment of the present disclosure, a solution for managing an operating system is provided. In this scheme, an initialization component is provided that is independent of the native operating system. After the hardware environment in which the operating system is located is initialized by the initialization component, operations on system components of the operating system are determined and performed by the initialization component. In this way, the operating system will be upgraded or started under the boot of the initialization component. The scheme disclosed by the invention avoids redundant backup of the operating system, reduces the occupation of hardware resources, and can be used for upgrading for many times after the initial upgrading fails.
Embodiments of the present disclosure will be described below in detail with reference to the accompanying drawings.
Fig. 1 illustrates a schematic diagram of an example environment 100 in which various embodiments of the present disclosure can be implemented. In the example environment 100, an operating system 101 is deployed or implemented in a computing device 102. Computing device 102 is located within vehicle 103, for example computing device 102 may be an in-vehicle device for use in a vehicle networking. Although the computing device 102 is shown as being located within the vehicle 103, this is merely exemplary. Embodiments of the present disclosure may be applied to any suitable computing device, either a stationary computing device such as a desktop computer, or a portable computing device such as a mobile phone, tablet computer, and the like.
Operating system 101 may be any operating system suitable for enabling computing device 102 to perform various functions, such as an android system, a Linux system, or the like. Operating system 101 may include multiple system components or multiple zones, such as boot load component 111, kernel component 112, system services component 113, and application components 114 shown in FIG. 1.
The boot load component 111 shown in FIG. 1 is used to boot and load the operating system 101 to start the operating system 101. The Boot Loader component 111 may be considered a native Boot Loader (Boot Loader) of the operating system 101, such as a U-Boot. Operating system 101 may also include other system components. As shown in FIG. 1, operating system 101 also includes kernel components 112, such as a kernel region; a system service component 113, such as a system area (system server); and an application component 114, such as an application area. It should be understood that the system components and the number of system components shown in FIG. 1 are exemplary only and are not intended to limit the scope of the present disclosure. Operating system 101 may include different system components or partitions depending on its particular type.
Although not shown in fig. 1, computing device 102 also includes various hardware components, such as a processing unit, memory, and so forth. The initialization component 110 may be implemented, for example, as a micro boot area that is set independently of the operating system 101. In some embodiments, the micro boot area as the initialization component 110 may be considered an overwriting and reduction of native boot load area functionality of the operating system 101. The initialization component 110 can also be implemented in any other suitable manner. For example, the initialization component 110 can be incorporated as an external component in the computing device 102 or coupled in an appropriate manner with the operating system 101 in the computing device 102 to perform corresponding functions.
For a typical operating system, after power up, the first action is a native boot loader component or program (e.g., U-boot of android system) that initializes the hardware device, creates a map of the memory space, and brings the operating system's software and hardware environment to an appropriate state to prepare the correct environment for the kernel that will eventually invoke the operating system. For the computing device 102 shown in FIG. 1, after power up, the first action is to initialize the component 110 (e.g., the micro boot region), rather than boot load the component 111 or the boot loader.
In order to more clearly understand the scheme of managing an operating system provided by embodiments of the present disclosure, embodiments of the present disclosure will be further described with reference to fig. 2. FIG. 2 shows a flowchart of a process 200 for managing an operating system, according to an embodiment of the present disclosure. Process 200 may be implemented at computing device 102 of fig. 1 by initializing component 110. For ease of discussion, process 200 will be described in conjunction with FIG. 1.
At block 210, it is determined whether the operating system 101 is to be booted. For example, it is determined whether the operating system 101 is powered up. If a power button on the computing device 102 is pressed, or in the case of an in-vehicle, the vehicle 103 is started such that the power of the computing device 102 is turned on, it may be determined that the operating system 101 is about to be started. If, at block 210, it is determined that operating system 101 is to be launched, process 200 proceeds to block 220.
At block 220, a hardware device associated with operating system 101 is initialized by an initialization component 110 that is provided independently of operating system 101. The hardware device associated with operating system 101 may be at least a portion of computing device 102 in which operating system 101 is deployed or a hardware component of a computing system that is required to run operating system 101. The initialization component 110 may perform the same or similar operations as the initialization operations of the native boot load region to enable at least a portion of the hardware, firmware, and software of the computing device 102 to be used by the initialization component 110 to manage the booting or upgrading of the operating system 101.
The initialization operations performed by the initialization component 110 at block 220 may vary depending on the specific hardware, software environment of the computing device 102. In some embodiments, the initialization component 110 may perform all initialization operations of the native boot loader such that the operating system 101 reaches a boot state.
In some embodiments, the initialization component 110 can perform the same or similar partial initialization operations as the native boot load region. For example, the initialization operations performed at block 220 may include: setting registers of a processing unit, for example, registers of a central processing unit CPU; setting the mode of the processing unit, for example, setting the CPU in a normal mode, an abnormal mode, a management mode, an interrupt mode, and the like; setting a memory controller, such as a memory; setting an interrupt; closing the watchdog; setting a clock frequency, such as a moderate frequency of the operating system 101; and setting up the stack. Which initialization operations are performed at block 220 may depend on the hardware environment required for the actions at blocks 230 and 240.
In block 230, the initialization component 110 determines whether the operating system 101 needs to be upgraded. Whether operating system 101 needs to be upgraded may be determined in different ways.
In some embodiments, initialization component 110 may obtain a flag indicating whether operating system 101 needs to be upgraded. Such indicia can be stored, for example, in a memory or other storage device of the computing device 102, which can be read by the initialization component 110. For example, when the flag is a certain predetermined value, the initialization component 110 may determine that the operating system 101 needs to be upgraded; when the flag is cleared or otherwise set, it may be determined that operation 101 need not be upgraded. The flag may be configured by, for example, the application component 114 when an upgrade is required, and may also be modified by the initialization component 110 itself, as will be described below.
In some embodiments, there may be a specific storage area in computing device 102 for storing upgrade files for operating system 101. The initialization component 110 can detect whether the particular storage area stores an upgrade file. If the initialization component 110 detects that the particular storage area is empty, it can be determined that the operating system 101 need not be upgraded; if the initialization component 110 detects that the particular memory region is not empty, it can be determined that the operating system 101 needs to be upgraded.
In other embodiments, the initialization component 110 may obtain version information (e.g., version number) of the current version of the operating system 101 and version information of the upgraded version and then determine whether the operating system 101 needs to be upgraded by comparing the version information. In this case, version information of the current version may be stored in the computing device 102, while version information of the upgraded version may be obtained from a cloud or a server, for example, over a network. In such an embodiment, in order to be able to obtain the version information, a corresponding hardware initialization is required at block 220.
At block 240, the initialization component 110 performs operations on system components of the operating system 110 based on the results determined at block 230. The system components include at least a boot load component 111 for booting and loading the operating system 101 to start the operating system 101. In some embodiments, the initialization component 110 may cause the operating system 101 to enter an upgrade mode, i.e., upgrade at least a portion of the system components, while the initialization component 110 itself is not upgraded. In some embodiments, the initialization component 110 may cause the operating system 101 to enter a normal boot mode. This process will be described in detail below with reference to fig. 3.
FIG. 3 illustrates a flow diagram of a process 300 for performing operations on system components, according to some embodiments of the present disclosure. Process 300 may be implemented at computing device 102 of FIG. 1 by initializing component 110 and may be considered a specific implementation of block 240 in FIG. 2.
At block 310, the initialization component 110 determines whether the operating system 101 needs to be upgraded. The actions performed at block 310 are the same as described above with reference to block 230. If the initialization component 110 determines that the operating system 101 does not need to be upgraded, e.g., the flag mentioned above is cleared, the process 300 proceeds to block 320.
In block 320, the initialization component 110 activates the boot loading component 111 to cause the boot loading component 111 to launch the operating system 101. In this case, the initialization component 110 determines that the operating system 101 should normally boot. The initialization component 110 may activate the boot load component 111 by jumping to an entry address of the boot load component 111. For example, the initialization component 110 can cause execution of an instruction to jump to a boot load area or a start address of a boot loader (such as 0x 00000000).
In this way, the boot loader component 111 will start initializing hardware devices, creating a map of memory space to bring the hardware and software environment of the operating system 101 to a state suitable for running, and thereby start the operating system 101. It should be appreciated that hardware initialization and the like performed by the boot loader component 111 will cause the operating system 101 to reach a state that is fully suitable for operation; while the hardware device initialization performed at block 220 need only enable the initialization component 110 to perform the operations of blocks 230 and 240. It should also be understood, however, that the hardware device initialization performed at block 220 may alternatively bring operating system 101 to a state that is fully suitable for operation.
If the initialization component 110 determines at block 310 that the operating system 101 needs to be upgraded, e.g., the flag mentioned above has a predetermined value, the initialization component 110 will boot and complete the upgrade of the operating system 101. In some embodiments, process 300 proceeds to block 330.
At block 330, the initialization component 110 obtains an upgrade file for the upgraded version of the system component and an image file for the current version of the system component. The system components herein may include one or more of the boot load component 111, the kernel component 112, the system services component 113, and the application components 114 shown in FIG. 1.
In the event that the upgrade file has been previously stored in the computing device 102, the initialization component 110 may read the upgrade file, for example, from a particular storage area of the computing device 102. Upgrade files may also be downloaded using, for example, OTA techniques. The current version of the image file may be read from a memory or storage device of the computing device 102. While obtaining the upgrade file and the image file, version information of the upgrade version and version information of the current version may also be obtained, where the version information is, for example, a version number, a version identifier, and the like.
In block 340, the initialization component 110 determines whether the current version is different from the upgraded version. The initialization component 110 can perform a version check. For example, two version numbers or version identifiers may be compared. If it is determined that the current version is different than the upgraded version, process 300 proceeds to block 350.
At block 350, the initialization component 110 updates system components, such as one or more of the boot load component 111, the kernel component 112, the system services component 113, and the application components 114 shown in FIG. 1, based on the upgrade and image files. For example, the initialization component 110 may generate an update file of the corresponding system component using the upgrade file and the image file, and then write the update file into the partition in which the corresponding system component is located as the updated system component. Such an upgrade process may be a differential upgrade process.
It should be appreciated that during a system component upgrade of operating system 101, initialization component 110 is not upgraded, and thus does not affect the activation or operation of initialization component 110 regardless of whether the upgrade of operating system 101 was successful. It should also be appreciated that the upgrade process described above in connection with FIG. 3 is exemplary and that embodiments of the present disclosure may be applied to a variety of upgrade processes.
In some embodiments, the initialization component 110 can also determine whether the system component was successfully updated. If the system component is successfully updated, the updated boot loading component 111 can be activated such that the updated boot loading component 111 launches the operating system 101. For example, execution can jump to the start address of the boot load component 111. In the embodiments described above that utilize a flag to determine whether operating system 101 needs to be upgraded, initialization component 110 may also set the flag to indicate that operating system 101 does not need to be upgraded, e.g., clear the flag. In the embodiments described above where a particular storage area for storing upgrade files is detected, the initialization component 110 may delete the upgrade files stored in the storage area to indicate that the operating system 101 need not be upgraded.
If the system component is not successfully updated, the system component may be updated again based on the upgrade file and the image file. In the embodiments described above that utilize a flag to determine whether operating system 101 needs to be upgraded, initialization component 110 will not reset the flag. In the embodiment described above where a particular storage area for storing upgrade files is detected, the initialization component 110 will not delete the upgrade files stored in that storage area.
Since the initialization component 110, which is provided independently of the operating system 101, is not upgraded during the system component upgrade process, the failure of the upgrade will not affect the function of the initialization component 110. In this case, the initialization component 110 can direct and perform a re-update of the system component, such as repeating the actions of block 330 and 350, or repeating the actions of block 350. Additionally, if computing device 102 is powered down during an upgrade, resulting in an upgrade interruption, process 200 shown in FIG. 2 may be performed when powered up again.
The above describes a scheme for managing an operating system according to an embodiment of the present disclosure. The scheme avoids redundant backup of the operating system and reduces resource occupation. In addition, the embodiment of the disclosure can perform multiple times of upgrading after upgrading fails, and avoids the risk of damage to the backup system in the secondary upgrading of the traditional scheme. The embodiment of the disclosure can be applied to an on-board system of the internet of vehicles to reduce the maintenance cost of the vehicles and meet the safety requirements of the automobile industry. In addition, the embodiments of the present disclosure may also be applied to other systems or devices that are upgraded using the OTA technology or by communicating with the cloud, for example, various terminal devices in the application of the internet of things.
Fig. 4 illustrates a schematic block diagram of an apparatus 400 for managing an operating system in accordance with some embodiments of the present disclosure. The apparatus 400 may be included in the computing device 102 of fig. 1 or implemented as the computing device 102.
As shown in fig. 4, the apparatus 400 includes: an initialization module 410 configured to initialize a hardware device associated with an operating system through an initialization component provided independently of the operating system in response to the operating system being about to be started; an upgrade determination module 420 configured to determine whether the operating system needs to be upgraded; and an operation execution module 430 configured to execute an operation on system components of the operating system based on a result of the determination, the system components including at least a boot loading component for booting and loading the operating system to start the operating system.
In some embodiments, the operation execution module 430 includes: a file acquisition module configured to acquire an upgrade file for an upgraded version of the system component and an image file for a current version of the system component in response to determining that the operating system needs to be upgraded; and a component update module configured to update the system component based on the upgrade file and the image file in response to the current version being different from the upgrade version.
In some embodiments, the component update module comprises a first update module configured to update the bootloaded component and at least one of: a second update module configured to update a kernel component of an operating system; a third update module configured to update a system service component of the operating system; and a fourth update module configured to update an application component of the operating system.
In some embodiments, the apparatus 400 further comprises: an update determination module configured to determine whether the system component is successfully updated; a first activation module configured to activate the updated boot load component in response to the system component being successfully updated, such that the updated boot load component launches the operating system; and a re-update module configured to re-update the system component based on the upgrade file and the image file in response to the system component not being successfully updated.
In some embodiments, the operation execution module 430 includes: a second activation module configured to activate the boot loading component to cause the boot loading component to launch the operating system in response to determining that the operating system does not need to be upgraded.
In some embodiments, the initialization module 410 includes at least one of: a first initialization module configured to set a register of a processing unit; a second initialization module configured to set a mode of the processing unit; a third initialization module configured to set up a memory controller; a fourth initialization module configured to set an interrupt; a fifth initialization module configured to close the watchdog; a sixth initialization module configured to set a clock frequency; and a seventh initialization module configured to set the stack.
It should be appreciated that the processes performed by the initialization component 110 described above in connection with fig. 2-3 may be implemented by the apparatus 400. The initialization component 110 may be implemented by the apparatus 400 or may be implemented as part of the apparatus 400. It should also be understood that when the initialization component 110 is implemented as part of the apparatus 400, the apparatus 400 can also include modules other than those shown in FIG. 4.
Fig. 5 illustrates a schematic block diagram of an example device 500 that may be used to implement embodiments of the present disclosure. Device 500 may be used to implement computing device 102 of fig. 1. As shown, device 500 includes a Central Processing Unit (CPU)501 that may perform various appropriate actions and processes in accordance with computer program instructions stored in a Read Only Memory (ROM)502 or loaded from a storage unit 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
A number of components in the device 500 are connected to the I/O interface 505, including: an input unit 506 such as a keyboard, a mouse, or the like; an output unit 507 such as various types of displays, speakers, and the like; a storage unit 508, such as a magnetic disk, optical disk, or the like; and a communication unit 509 such as a network card, modem, wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processing unit 501 performs the various methods and processes described above, such as any of the processes 200 and 300. For example, in some embodiments, either of processes 200 and 300 may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 500 via the ROM 502 and/or the communication unit 509. When the computer program is loaded into RAM 503 and executed by CPU 501, one or more steps of any of processes 200 and 300 described above may be performed. Alternatively, in other embodiments, CPU 501 may be configured to perform any of processes 200 and 300 by any other suitable means (e.g., by way of firmware).
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a load programmable logic device (CPLD), and the like.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Further, while operations are depicted in a particular order, this should be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (14)

1. A method of managing an operating system, comprising:
initializing a hardware device associated with the operating system by an initialization component provided independently of the operating system in response to the operating system being about to be started;
determining whether the operating system needs to be upgraded; and
based on a result of the determination, performing an operation on system components of the operating system, the system components including at least a boot load component for booting and loading the operating system to launch the operating system.
2. The method of claim 1, wherein performing the operation on the system component comprises:
in response to determining that the operating system needs to be upgraded, obtaining an upgrade file for an upgraded version of the system component and an image file for a current version of the system component; and
updating the system component based on the upgrade file and the image file in response to the current version being different from the upgraded version.
3. The method of claim 2, wherein updating the system component comprises updating the boot load component and at least one of:
a kernel component of the operating system;
a system services component of the operating system; and
an application component of the operating system.
4. The method of claim 2, further comprising:
determining whether the system component was successfully updated;
in response to the system component being successfully updated, activating the updated boot load component to cause the updated boot load component to launch the operating system; and
in response to the system component not being successfully updated, updating the system component again based on the upgrade file and the image file.
5. The method of claim 1, wherein performing the operation on the system component comprises:
in response to determining that the operating system does not need to be upgraded, activating the boot loading component to cause the boot loading component to launch the operating system.
6. The method of claim 1, wherein initializing the hardware device comprises performing at least one of:
setting a register of a processing unit;
setting a mode of the processing unit;
setting a memory controller;
setting an interrupt;
closing the watchdog;
setting a clock frequency; and
the stack is set up.
7. An apparatus for managing an operating system, comprising:
an initialization module configured to initialize a hardware device associated with the operating system through an initialization component provided independently of the operating system in response to the operating system being about to be started;
an upgrade determination module configured to determine whether the operating system needs to be upgraded; and
an operation execution module configured to execute an operation on system components of the operating system based on a result of the determination, the system components including at least a boot loading component for booting and loading the operating system to boot the operating system.
8. The apparatus of claim 7, wherein the operation execution module comprises:
a file acquisition module configured to acquire an upgrade file for an upgraded version of the system component and an image file for a current version of the system component in response to determining that the operating system needs to be upgraded; and
a component update module configured to update the system component based on the upgrade file and the image file in response to the current version being different from the upgrade version.
9. The apparatus of claim 8, wherein the component update module comprises a first update module configured to update the boot load component and at least one of:
a second update module configured to update a kernel component of the operating system;
a third update module configured to update a system service component of the operating system; and
a fourth update module configured to update application components of the operating system.
10. The apparatus of claim 8, further comprising:
an update determination module configured to determine whether the system component is successfully updated;
a first activation module configured to activate the updated boot load component in response to the system component being successfully updated, such that the updated boot load component launches the operating system; and
a re-update module configured to re-update the system component based on the upgrade file and the image file in response to the system component not being successfully updated.
11. The apparatus of claim 7, wherein the operation execution module comprises:
a second activation module configured to activate the boot load component to cause the boot load component to launch the operating system in response to determining that the operating system does not need to be upgraded.
12. The apparatus of claim 7, wherein the initialization module comprises at least one of:
a first initialization module configured to set a register of a processing unit;
a second initialization module configured to set a mode of the processing unit;
a third initialization module configured to set up a memory controller;
a fourth initialization module configured to set an interrupt;
a fifth initialization module configured to close the watchdog;
a sixth initialization module configured to set a clock frequency; and
a seventh initialization module configured to set up a stack.
13. An electronic device, the electronic device comprising:
one or more processors; and
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out the method of any one of claims 1-6.
14. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN201910307764.8A 2019-04-17 2019-04-17 Method, apparatus, device and storage medium for managing operating system Active CN110134456B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910307764.8A CN110134456B (en) 2019-04-17 2019-04-17 Method, apparatus, device and storage medium for managing operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910307764.8A CN110134456B (en) 2019-04-17 2019-04-17 Method, apparatus, device and storage medium for managing operating system

Publications (2)

Publication Number Publication Date
CN110134456A CN110134456A (en) 2019-08-16
CN110134456B true CN110134456B (en) 2022-08-16

Family

ID=67570191

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910307764.8A Active CN110134456B (en) 2019-04-17 2019-04-17 Method, apparatus, device and storage medium for managing operating system

Country Status (1)

Country Link
CN (1) CN110134456B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050172112A1 (en) * 1993-02-19 2005-08-04 Yu Dean T. Method and apparatus for enabling a computer system
CN103106091A (en) * 2013-01-31 2013-05-15 深圳市开立科技有限公司 Start-up system and method of operating system based on removable storage media
CN103136015A (en) * 2011-12-05 2013-06-05 深圳长城开发科技股份有限公司 Method and system for controlling U boot to enter download operation mode
CN104834547A (en) * 2015-05-14 2015-08-12 烽火通信科技股份有限公司 Remote upgrade method and system of Squashfs read-only root file system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050172112A1 (en) * 1993-02-19 2005-08-04 Yu Dean T. Method and apparatus for enabling a computer system
CN103136015A (en) * 2011-12-05 2013-06-05 深圳长城开发科技股份有限公司 Method and system for controlling U boot to enter download operation mode
CN103106091A (en) * 2013-01-31 2013-05-15 深圳市开立科技有限公司 Start-up system and method of operating system based on removable storage media
CN104834547A (en) * 2015-05-14 2015-08-12 烽火通信科技股份有限公司 Remote upgrade method and system of Squashfs read-only root file system

Also Published As

Publication number Publication date
CN110134456A (en) 2019-08-16

Similar Documents

Publication Publication Date Title
US9507604B2 (en) Boot method and boot system
US20170322796A1 (en) Device and method for updating firmware and firmware update system
US10437580B2 (en) Software updating methods and systems
US10747526B2 (en) Apparatus and method to execute prerequisite code before delivering UEFI firmware capsule
US11182148B2 (en) System and method for automated BIOS recovery after BIOS corruption
US10599419B2 (en) Secure firmware updates using virtual machines to validate firmware packages
US10810017B2 (en) Systems and methods for handling firmware driver dependencies in host operating systems while applying updates from bootable image file
EP2195741A1 (en) Firmware image update and management
CN109408122B (en) Equipment starting method, electronic equipment and computer storage medium
CN107766084B (en) Boot loading and installation method and computing system thereof
CN107567629A (en) Dynamic firmware module loader in credible performing environment container
CN110515671B (en) Initialization method, initialization device, terminal device and readable storage medium
US11221842B2 (en) Systems and methods for executing and verifying system firmware update before committing firmware update to motherboard
CN110134456B (en) Method, apparatus, device and storage medium for managing operating system
CN110333882B (en) System upgrading method, device, equipment and computer readable medium
US10331433B2 (en) Hybrid operating system for an in-vehicle apparatus
CN116450046A (en) Cloud disk implementation method and device, intelligent network card, server and storage medium
CN111090443A (en) Method, equipment and storage medium for guaranteeing safe upgrade of linux system
US11500995B1 (en) Secure boot runtime universal filesystem
CN110286953B (en) Method and device for starting embedded system, embedded device and storage medium
CN115658152A (en) Firmware upgrading method, firmware, electronic device and computer readable storage medium
CN116107673A (en) Screen adaptation method, vehicle-mounted terminal and computer storage medium
CN112667444A (en) System upgrading method, storage medium and terminal equipment
CN106547589A (en) A kind of upgrade-system and upgrade method
US11295019B2 (en) Systems and methods for disaggregated updates to secondary operating system using network-retrieved secure file system layout

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20211018

Address after: 100176 101, floor 1, building 1, yard 7, Ruihe West 2nd Road, Beijing Economic and Technological Development Zone, Daxing District, Beijing

Applicant after: Apollo Zhilian (Beijing) Technology Co.,Ltd.

Address before: 100080 No.10, Shangdi 10th Street, Haidian District, Beijing

Applicant before: BAIDU ONLINE NETWORK TECHNOLOGY (BEIJING) Co.,Ltd.

GR01 Patent grant
GR01 Patent grant