CN115357310A - System starting method and device, electronic equipment and storage medium - Google Patents

System starting method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115357310A
CN115357310A CN202211304624.3A CN202211304624A CN115357310A CN 115357310 A CN115357310 A CN 115357310A CN 202211304624 A CN202211304624 A CN 202211304624A CN 115357310 A CN115357310 A CN 115357310A
Authority
CN
China
Prior art keywords
processor
operating system
starting
executed
rtos
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.)
Pending
Application number
CN202211304624.3A
Other languages
Chinese (zh)
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.)
Beijing Smartchip Microelectronics Technology Co Ltd
Original Assignee
Beijing Smartchip Microelectronics 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 Beijing Smartchip Microelectronics Technology Co Ltd filed Critical Beijing Smartchip Microelectronics Technology Co Ltd
Priority to CN202211304624.3A priority Critical patent/CN115357310A/en
Publication of CN115357310A publication Critical patent/CN115357310A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory

Abstract

The present disclosure relates to the field of computer technologies, and in particular, to a system booting method, an apparatus, an electronic device, and a storage medium, where the system booting method includes: after a multi-core processor is powered on, starting a first processor through a boot loader uboot in an embedded multimedia controller emmc connected with the multi-core processor; the multi-core processor receives an operating system starting instruction; when determining that a lightweight real-time task exists in the current tasks to be executed, starting and running an Rtos operating system in a second processor of the multi-core processor through the boot loader uboot; after the Rtos operating system is started, the Linux operating system is started in the first processor, and the technical problem that when the Linux system is just started and the Rtos system is not started yet, the efficiency is not high in the application scene where a high-real-time lightweight task needs to be executed is solved.

Description

System starting method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a system booting method and apparatus, an electronic device, and a storage medium.
Background
With the wide application of the multi-core processor, the multi-core processor can simultaneously run a plurality of operating systems by running different operating systems in different processor cores at present. For example, a Linux Operating System and a Real Time Operating System (Rtos) may be simultaneously run in the multi-core processor, where the former may be used to process general-purpose transactions, and the latter may be used to process lightweight tasks with high requirements for Real-Time performance.
Currently, when a Linux system and an Rtos system are simultaneously operated in a multi-core processor, when the system is started, the Linux operating system is usually started first, and then the Rtos system is started under the environment of the Linux operating system. By adopting the starting mode, when the Linux operating system of the system is just started and the Rtos system is not started yet, if a lightweight task with higher real-time requirement needs to be executed, for example, in some application scenes, a current voltage signal of equipment needs to be acquired immediately (within 5s of power-on) when the system is powered on, at the moment, the task is directly executed through the Linux system, so that the task execution cost is higher and the efficiency is lower, or the task is executed after the Rtos system is started, so that the task execution efficiency is lower as the efficiency is poorer.
Disclosure of Invention
In order to solve the problems in the related art, embodiments of the present disclosure provide a system booting method, apparatus, electronic device, and storage medium.
In a first aspect, an embodiment of the present disclosure provides a system boot method, applied to a multi-core processor including a Linux and Rtos dual operating system, including:
after a multi-core processor is powered on, starting a first processor through a boot loader uboot in an embedded multimedia controller emmc connected with the multi-core processor;
the multi-core processor receives an operating system starting instruction;
when determining that a lightweight real-time task exists in the current tasks to be executed, starting and running an Rtos operating system in a second processor of the multi-core processor through the boot loader uboot;
after the Rtos operating system is started, starting a Linux operating system in the first processor.
According to an embodiment of the present disclosure, the determining that a lightweight real-time task exists in the current task to be executed includes:
and the boot loader uboot reads a task list to be executed of a fixed partition in the embedded multimedia controller emmc to determine that a lightweight real-time task exists in the current task to be executed.
According to an embodiment of the disclosure, the step of reading a to-be-executed task list of a fixed partition in the embedded multimedia controller emmc by the bootloader uboot to determine that a lightweight real-time task exists in a current to-be-executed task includes:
and reading a task list to be executed of a fixed partition in the embedded multimedia controller emmc through a judgment module in the boot loader uboot to determine that a lightweight real-time task exists in the current task to be executed.
According to an embodiment of the present disclosure, the starting and running Rtos operating system in a first processor in the multi-core processor further includes:
the starting and running Rtos operating system in a second processor in the multi-core processor comprises:
loading the Rtos mirror image from the emmc fixed position of the embedded multimedia controller to a memory fixed position through the boot loader uboot;
configuring the second processor to start and run the Rtos operating system after configuration is complete.
According to an embodiment of the present disclosure, the configuring the second processor comprises:
setting the running address of the second processor as the mirror address of the Rtos operating system, initializing the second processor and/or powering on the second processor.
According to an embodiment of the present disclosure, after the Rtos operating system is started, starting a Linux operating system in the first processor, including:
initializing an embedded multimedia controller emmc in the second processor;
loading Linux operating system resources in a fixed partition of the embedded multimedia controller emmc, wherein the Linux operating system resources comprise a Linux kernel mirror image zmmage and Linux usable external equipment resources dtb;
updating the external equipment resource dtb according to the current hardware resource allocation of the multi-core processor to obtain a starting parameter;
and the multi-core processor sends a starting command and the starting parameter to the first processor, so that the first processor starts a Linux operating system after receiving the starting command and the starting parameter.
According to the embodiment of the disclosure, the starting parameters comprise the memory storage address of the Linux operating system and the memory storage address of the external device resource dtb.
According to an embodiment of the present disclosure, further comprising:
and after receiving the starting command and the starting parameters, the first processor is switched to a nonsecure environment, and a Linux operating system is started in the nonsecure environment.
In a second aspect, an embodiment of the present disclosure provides a system boot apparatus, which is applied to a multi-core processor including Linux and Rtos dual operating systems, where the apparatus includes:
the system comprises a processor starting unit, a first processor and a second processor, wherein the processor starting unit is configured to start the first processor through a boot loader uboot in an embedded multimedia controller emmc connected with a multi-core processor after the multi-core processor is powered on;
the multi-core processor receives an operating system starting instruction receiving unit which is configured to receive an operating system starting instruction through the multi-core processor;
the first system starting unit is configured to start and run an Rtos operating system in a second processor of the multi-core processor through the boot loader uboot when determining that a lightweight real-time task exists in a current task to be executed;
a second system starting unit configured to start a Linux operating system in the first processor after the Rtos operating system is started.
According to an embodiment of the present disclosure, the determining that a lightweight real-time task exists in the current tasks to be executed includes:
and the boot loader uboot reads a task list to be executed of a fixed partition in the embedded multimedia controller emmc to determine that a lightweight real-time task exists in the current task to be executed.
According to the embodiment of the disclosure, the step of reading a to-be-executed task list of a fixed partition in the embedded multimedia controller emmc by the bootloader uboot to determine that a lightweight real-time task exists in the current to-be-executed task includes:
and reading a task list to be executed of a fixed partition in the embedded multimedia controller emmc through a judgment module in the boot loader uboot to determine that a lightweight real-time task exists in the current task to be executed.
According to an embodiment of the present disclosure, the starting and running of the Rtos operating system in the second processor in the multi-core processor includes:
loading the Rtos mirror image from the embedded multimedia controller emmc fixed position to a memory fixed position through the boot loader uboot;
configuring the second processor to start and run the Rtos operating system after configuration is complete.
According to an embodiment of the present disclosure, the configuring the second processor comprises:
setting the running address of the second processor as the mirror address of the Rtos operating system, initializing the second processor and/or powering on the second processor.
According to an embodiment of the present disclosure, after the Rtos operating system is started, starting a Linux operating system in the first processor, including:
initializing an embedded multimedia controller emmc in the second processor;
loading Linux operating system resources in a fixed partition of the embedded multimedia controller emmc, wherein the Linux operating system resources comprise a Linux kernel image zlmage and Linux usable external device resources dtb;
updating the external equipment resource dtb according to the current hardware resource allocation of the multi-core processor to obtain a starting parameter;
and the multi-core processor sends a starting command and the starting parameter to the first processor, so that the first processor starts a Linux operating system after receiving the starting command and the starting parameter.
According to the embodiment of the disclosure, the starting parameters include the memory storage address of the Linux operating system and the memory storage address of the external device resource dtb.
According to an embodiment of the present disclosure, further comprising:
and after receiving the starting command and the starting parameters, the first processor is switched to a nonsecure environment, and a Linux operating system is started in the nonsecure environment.
In a third aspect, an embodiment of the present disclosure provides an electronic device, which includes a memory and a processor; wherein the memory is configured to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method steps as defined in any one of the embodiments of the first aspect.
In a fourth aspect, the present disclosure provides a chip including the electronic device of the third aspect.
In a fifth aspect, the embodiments of the present disclosure provide a computer-readable storage medium, on which computer instructions are stored, and the computer instructions, when executed by a processor, implement the method steps according to any one of the embodiments of the first aspect.
According to the technical scheme provided by the embodiment of the disclosure, before the multi-core processor starts the operating system, whether the current task to be executed has a lightweight real-time task or not is judged, and when the lightweight real-time task is determined to exist, the Rtos operating system is started firstly, and then the Linux operating system is started, so that the lightweight real-time task can be executed in advance through the Rtos which is started firstly, and the task execution efficiency is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
Other features, objects, and advantages of the present disclosure will become more apparent from the following detailed description of non-limiting embodiments when taken in conjunction with the accompanying drawings. In the drawings.
Fig. 1 shows a flow chart of a system startup method according to an embodiment of the present disclosure.
Fig. 2 is a schematic diagram illustrating a specific application of the system starting method according to an embodiment of the present disclosure.
Fig. 3 shows a block diagram of a system startup device according to an embodiment of the present disclosure.
Fig. 4 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
FIG. 5 shows a schematic block diagram of a computer system suitable for use in implementing a method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. Furthermore, parts that are not relevant to the description of the exemplary embodiments have been omitted from the drawings for the sake of clarity.
In the present disclosure, it is to be understood that terms such as "including" or "having," etc., are intended to indicate the presence of the disclosed features, numbers, steps, behaviors, components, parts, or combinations thereof, and are not intended to preclude the possibility that one or more other features, numbers, steps, behaviors, components, parts, or combinations thereof may be present or added.
It should be further noted that the embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
As mentioned above, when the Linux and Rtos systems are currently running in a multi-core processor at the same time, at the time of system startup, the Linux operating system is usually started first, and then an Rtos system is started again in the environment of the Linux operating system. By adopting the starting mode, when the Linux operating system of the system is just started and the Rtos system is not started yet, if a lightweight task with higher real-time requirement needs to be executed, for example, in some application scenes, a current voltage signal of equipment needs to be acquired immediately (within 5s of power-on) when the system is powered on, at the moment, the task is directly executed through the Linux system, so that the task execution cost is higher and the efficiency is lower, or the task is executed after the Rtos system is started, so that the task execution efficiency is lower as the efficiency is poorer.
In view of this, the embodiment of the present disclosure provides a system boot method, applied to a multi-core processor including a Linux and Rtos dual operating system, including: after a multi-core processor is powered on, starting a first processor through a boot loader uboot in an embedded multimedia controller emmc connected with the multi-core processor; the multi-core processor receives an operating system starting instruction; when determining that a lightweight real-time task exists in the current tasks to be executed, starting and running an Rtos operating system in a second processor of the multi-core processor through the boot loader uboot; after the Rtos operating system is started, starting a Linux operating system in the first processor. By adopting the mode, before the multi-core processor starts the operating system, whether the current task to be executed has a lightweight real-time task or not is judged, and the Rtos operating system is started firstly when the lightweight real-time task is determined to exist, and then the Linux operating system is started, so that the lightweight real-time task can be executed in advance through the Rtos which is started firstly, and the task execution efficiency is improved.
Fig. 1 shows a flow chart of a system startup method according to an embodiment of the present disclosure.
As shown in fig. 1, the system starting method includes steps S101 to S104:
in step S101, after a multi-core processor is powered on, a first processor is started by a boot loader uboot in an embedded multimedia controller emmc connected to the multi-core processor;
in step S102, the multicore processor receives a start operating system instruction;
in step S103, when it is determined that a lightweight real-time task exists in the current tasks to be executed, starting and running an Rtos operating system in a second processor of the multicore processor through the bootloader uboot;
in step S104, after the Rtos operating system is started, a Linux operating system is started in the first processor.
In the embodiment of the disclosure, the system starting method can be applied to a multi-core processor which comprises at least two processors and can run a plurality of operating systems including Linux and Rtos.
In this embodiment of the disclosure, the multi-core processor may first start a first processor after being powered on, at this time, an operating system is not loaded in the first processor, but a boot loader uboot is loaded from an embedded multimedia controller emmc connected to the multi-core processor, the boot loader uboot may include a boot loader unit bootloader, the boot loader unit bootloader may include a determination module therein, and after receiving an instruction to start the operating system, the multi-core processor determines, through the determination module in the boot loader unit bootloader, whether a lightweight real-time task exists in a current task to be executed. The instruction for starting the operating system may be an instruction sent by a user, or an instruction automatically sent by the system, for example, a timing start instruction. The judging module reads a task list to be executed of a fixed partition in an Embedded multimedia controller (emmc), and judges whether a lightweight real-time task exists in the task list to be executed.
In the embodiment of the disclosure, when it is determined that a lightweight real-time task exists in the current tasks to be executed, the Rtos operating system is started and run in a second processor of the multi-core processor. Specifically, when the determining module determines that a lightweight real-time task exists in the task list to be executed, the Rtos operating system may be started in the second processor through the bootloader uboot in the first processor. The boot loader uboot loads an Rtos mirror image from a fixed position of the embedded multimedia controller emmc to a memory fixed position, and then configures the second processor, including setting a running address of the second processor as a mirror image address of the Rtos operating system, initializing the second processor, and/or powering on the second processor, so as to run the Rtos operating system in the second processor.
In an embodiment of the present disclosure, after the Rtos operating system is started, starting a Linux operating system in the first processor may be implemented as follows: initializing an embedded multimedia controller emmc in the second processor; loading Linux operating system resources in a fixed partition of the embedded multimedia controller emmc, wherein the Linux operating system resources comprise a Linux kernel mirror image zmmage and Linux usable external equipment resources dtb; updating the external equipment resource dtb according to the current hardware resource allocation of the multi-core processor to obtain a starting parameter; and the multi-core processor sends a starting command and the starting parameter to the first processor, so that the first processor starts a Linux operating system after receiving the starting command and the starting parameter.
Specifically, after the external device resource dtb is updated according to the current hardware resource allocation of the multi-core processor, the command line kernel cmd _ line of the second processor may be updated to obtain the memory storage address of the external device resource dtb. The hardware resources may include various peripherals, for example, 4 sets of Serial Peripheral Interfaces (SPIs) are provided in the multi-core processor system, so that the Linux operating system may be configured to use the 0 th set and the 1 st set of SPIs, and the Rtos operating system may use the 2 nd set and the 3 rd set of SPIs. The peripheral device allocated to Rtos use, linux cannot be used, and at this time, a method of removing a device node that cannot be used by Linux from the external device resource dtb may be adopted.
And obtaining the starting parameters of the Linux operating system according to the memory storage address of the external device resource dtb and the memory storage address of the Linux operating system. And sending the starting command and the starting parameter to a first processor, so that the first processor is switched to a nonsecure environment after receiving the starting command and the starting parameter, and starting a Linux operating system. In a specific embodiment of the present disclosure, the first processor may be cpu0, the second processor may be cpu x, x is any number from 1 to N, and N is the number of processors in the multi-core processor.
According to the technical scheme of the embodiment of the disclosure, before the multi-core processor starts the operating system, whether the current task to be executed has a light-weight real-time task or not is judged, and the Rtos operating system is started firstly when the light-weight real-time task is determined to exist, and then the Linux operating system is started, so that the light-weight real-time task can be executed in advance through the Rtos which is started firstly, and the task execution efficiency is improved.
In this embodiment of the present disclosure, if the multi-core processor determines, through the determination module in the bootloader, that there is no lightweight real-time task in the current task to be executed, according to a conventional procedure, first, a Linux operating system is started in the first processor, and then, an Rtos operating system is started in the second processor, which is not described herein again.
Fig. 2 is a schematic diagram illustrating a specific application of the system starting method according to an embodiment of the present disclosure.
As shown in fig. 2, the multi-core processor includes at least a first processor cpu0, and a second processor cpu, wherein the second processor cpu is a processor that has started the Rtos operating system. When the Linux operating system needs to be started continuously, the second processor cpu firstly initializes the embedded multimedia controller emmc, then loads Linux resources including Linux kernel images zmmage and Linux usable external device resources dtb in a fixed partition of the embedded multimedia controller emmc, updates the external device resources dtb according to the current hardware resource distribution of the multi-core processor, and updates a kernel command line kernel cmd _ line based on an updating result to obtain a starting parameter; the second processor cpu sends a starting command and the starting parameter to the first processor cpu0 to inform the first processor cpu0 of running; and the first processor cpu0 switches to a nonsecure environment after receiving the starting command, and starts the Linux operating system according to the starting parameters. And after the second processor cpu sends the starting command and the starting parameter, continuing to run the real-time task under the Rtos operating system.
Fig. 3 shows a block diagram of a system startup device according to an embodiment of the present disclosure.
As shown in fig. 3, the system starting apparatus 300 includes:
the processor starting unit 310 is configured to start a first processor through a boot loader uboot in an embedded multimedia controller emmc connected with a multi-core processor after the multi-core processor is powered on;
a receiving unit 320 configured to receive a start operating system instruction through the multicore processor;
the first system starting unit 330 is configured to start and run an Rtos operating system in a second processor of the multi-core processor through the bootloader uboot when determining that a lightweight real-time task exists in the current tasks to be executed;
a second system booting unit 340 configured to boot a Linux operating system in the first processor after the Rtos operating system is booted.
In the embodiment of the disclosure, the system starting device can be applied to a multi-core processor which comprises at least two processors and can run a plurality of operating systems including Linux and Rtos.
In the embodiment of the disclosure, the multi-core processor may start the first processor after being powered on, at this time, the operating system is not loaded in the first processor, but a boot loader uboot is loaded from an embedded multimedia controller emmc connected to the multi-core processor, the boot loader uboot may include a boot loader, the boot loader may include a judgment module in the boot loader, and after receiving an instruction to start the operating system, the multi-core processor judges whether a lightweight real-time task exists in a task to be executed currently through the judgment module in the boot loader. The instruction for starting the operating system may be an instruction sent by a user, or an instruction automatically sent by the system, for example, a timing start instruction. The judging module reads a task list to be executed of a fixed partition in an Embedded multimedia controller (emmc), and judges whether a lightweight real-time task exists in the task list to be executed.
In the embodiment of the disclosure, when it is determined that the lightweight real-time task exists in the tasks to be executed currently, the Rtos operating system is started and run in the second processor of the multi-core processor. Specifically, when the determining module determines that a lightweight real-time task exists in the to-be-executed task list, the Rtos operating system may be started in the second processor through the boot loader uboot in the first processor. The boot loader uboot loads an Rtos mirror image from a fixed position of the embedded multimedia controller emmc to a memory fixed position, and then configures the second processor, including setting a running address of the second processor as a mirror image address of the Rtos operating system, initializing the second processor, and/or powering on the second processor, so as to run the Rtos operating system in the second processor.
In an embodiment of the present disclosure, after the Rtos operating system is started, starting a Linux operating system in the first processor may be implemented as follows: initializing an embedded multimedia controller emmc in the second processor; loading Linux operating system resources in a fixed partition of the embedded multimedia controller emmc, wherein the Linux operating system resources comprise a Linux kernel mirror image zmmage and Linux usable external equipment resources dtb; updating the external equipment resource dtb according to the current hardware resource allocation of the multi-core processor to obtain a starting parameter; and the multi-core processor sends a starting command and the starting parameters to the first processor, so that the first processor starts a Linux operating system after receiving the starting command and the starting parameters.
Specifically, after the external device resource dtb is updated according to the current hardware resource allocation of the multi-core processor, the command line kernel cmd _ line of the second processor may be updated to obtain the memory storage address of the external device resource dtb. The hardware resources may include various peripherals, for example, 4 sets of Serial Peripheral Interfaces (SPIs) are provided in the multi-core processor system, so that the Linux operating system may be configured to use the 0 th set and the 1 st set of SPIs, and the Rtos operating system may use the 2 nd set and the 3 rd set of SPIs. The peripheral device allocated to Rtos use, linux cannot be used, and at this time, a method of removing a device node that cannot be used by Linux from the external device resource dtb may be adopted.
And obtaining the starting parameters of the Linux operating system according to the memory storage address of the external device resource dtb and the memory storage address of the Linux operating system. And sending the starting command and the starting parameter to a first processor, so that the first processor is switched to a nonsecure environment after receiving the starting command and the starting parameter, and starting a Linux operating system. In a specific embodiment of the present disclosure, the first processor may be cpu0, the second processor may be cpu x, x is any number from 1 to N, and N is the number of processors in the multicore processor.
According to the technical scheme of the embodiment of the disclosure, before the multi-core processor starts the operating system, whether the current task to be executed has a light-weight real-time task or not is judged, and the Rtos operating system is started firstly when the light-weight real-time task is determined to exist, and then the Linux operating system is started, so that the light-weight real-time task can be executed in advance through the Rtos which is started firstly, and the task execution efficiency is improved.
In this embodiment of the present disclosure, if the multi-core processor determines, through the determination module in the bootloader, that there is no lightweight real-time task in the current task to be executed, according to a conventional procedure, first, a Linux operating system is started in the first processor, and then, an Rtos operating system is started in the second processor, which is not described herein again.
Fig. 4 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
As shown in fig. 4, the electronic device includes a memory and a processor, where the memory is used to store one or more computer instructions, where the one or more computer instructions are executed by the processor to implement a system boot method according to an embodiment of the disclosure.
In the embodiment of the present disclosure, the system starting method includes:
the method comprises the steps that a multi-core processor starts a first processor after being powered on, wherein the first processor comprises a boot loader uboot;
the boot loader uboot receives an operating system starting instruction;
when determining that a lightweight real-time task exists in the current tasks to be executed, starting and running an Rtos operating system in a second processor of the multi-core processor through the boot loader uboot;
after the Rtos operating system is started, starting a Linux operating system in the first processor.
In the embodiment of the present disclosure, the determining that a lightweight real-time task exists in the current task to be executed includes:
and the boot loader uboot reads a task list to be executed of a fixed partition in the embedded multimedia controller emmc to determine that a lightweight real-time task exists in the current task to be executed.
In an embodiment of the present disclosure, the reading, by the bootloader uboot, of the task list to be executed in the fixed partition in the embedded multimedia controller emmc to determine that a lightweight real-time task exists in the current task to be executed includes:
and reading a task list to be executed of a fixed partition in the embedded multimedia controller emmc through a judgment module in the boot loader uboot to determine that a lightweight real-time task exists in the current task to be executed.
In an embodiment of the present disclosure, the starting and running of the Rtos operating system in the second processor in the multi-core processor includes:
loading the Rtos mirror image from the embedded multimedia controller emmc fixed position to a memory fixed position through the boot loader uboot;
configuring the second processor to start and run the Rtos operating system after configuration is complete.
In an embodiment of the present disclosure, the configuring the second processor comprises:
setting the running address of the second processor as the mirror address of the Rtos operating system, initializing the second processor and/or powering on the second processor.
In an embodiment of the present disclosure, after the Rtos operating system is started completely, starting a Linux operating system in the first processor includes:
initializing an embedded multimedia controller emmc in the second processor;
loading Linux operating system resources in a fixed partition of the embedded multimedia controller emmc, wherein the Linux operating system resources comprise a Linux kernel mirror image zmmage and Linux usable external equipment resources dtb;
updating the external equipment resource dtb according to the current hardware resource allocation of the multi-core processor to obtain a starting parameter;
and the multi-core processor sends a starting command and the starting parameter to the first processor, so that the first processor starts a Linux operating system after receiving the starting command and the starting parameter.
In the embodiment of the present disclosure, the boot parameters include a memory storage address of the Linux operating system and a memory storage address of the external device resource dtb.
In the embodiment of the present disclosure, the method further includes:
and after receiving the starting command and the starting parameters, the first processor is switched to a nonsecure environment, and a Linux operating system is started in the nonsecure environment.
According to the technical scheme of the embodiment of the disclosure, before the multi-core processor starts the operating system, whether the current task to be executed has a light-weight real-time task or not is judged, and the Rtos operating system is started firstly when the light-weight real-time task is determined to exist, and then the Linux operating system is started, so that the light-weight real-time task can be executed in advance through the Rtos which is started firstly, and the task execution efficiency is improved.
The embodiment of the disclosure also provides a chip, and the chip comprises the electronic equipment provided by the embodiment of the disclosure.
FIG. 5 is a schematic block diagram of a computer system suitable for use in implementing methods according to embodiments of the present disclosure.
As shown in fig. 5, the computer system includes a processing unit that can execute the various methods in the above-described embodiments according to a program stored in a Read Only Memory (ROM) or a program loaded from a storage section into a Random Access Memory (RAM). In the RAM, various programs and data necessary for the operation of the computer system are also stored. The processing unit, the ROM, and the RAM are connected to each other by a bus. An input/output (I/O) interface is also connected to the bus.
The following components are connected to the I/O interface: an input section including a keyboard, a mouse, and the like; an output section including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section including a hard disk and the like; and a communication section including a network interface card such as a LAN card, a modem, or the like. The communication section performs a communication process via a network such as the internet. The drive is also connected to the I/O interface as needed. A removable medium such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive as necessary, so that a computer program read out therefrom is mounted into the storage section as necessary. The processing unit can be realized as a CPU, a GPU, a TPU, an FPGA, an NPU and other processing units.
In particular, the above described methods may be implemented as computer software programs according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing the above-described method. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section, and/or installed from a removable medium.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present disclosure may be implemented by software or by programmable hardware. The units or modules described may also be provided in a processor, and the names of the units or modules do not in some cases constitute a limitation on the units or modules themselves.
As another aspect, the present disclosure also provides a computer-readable storage medium, which may be a computer-readable storage medium included in the electronic device or the computer system in the above embodiments; or it may be a separate computer readable storage medium not incorporated into the device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present disclosure.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is possible without departing from the inventive concept. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
As another aspect, the present disclosure also provides a computer-readable storage medium, which may be a computer-readable storage medium included in the electronic device or the computer system in the above embodiments; or it may be a separate computer readable storage medium not incorporated into the device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present disclosure.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is possible without departing from the inventive concept. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

Claims (19)

1. A system starting method is applied to a multi-core processor comprising a Linux and Rtos dual operating system, and is characterized by comprising the following steps:
after a multi-core processor is powered on, starting a first processor through a boot loader uboot in an embedded multimedia controller emmc connected with the multi-core processor;
the multi-core processor receives an operating system starting instruction;
when determining that a lightweight real-time task exists in the current tasks to be executed, starting and running an Rtos operating system in a second processor of the multi-core processor through the boot loader uboot;
after the Rtos operating system is started, starting a Linux operating system in the first processor.
2. The method of claim 1, wherein the determining that there is a lightweight real-time task in the tasks currently to be executed comprises:
and the boot loader uboot reads a task list to be executed of a fixed partition in the embedded multimedia controller emmc to determine that a lightweight real-time task exists in the current task to be executed.
3. The method according to claim 2, wherein the step of reading, by the bootloader uboot, a to-be-executed task list of a fixed partition in the embedded multimedia controller emmc to determine that a lightweight real-time task exists in the current to-be-executed tasks comprises:
and reading a task list to be executed of a fixed partition in the embedded multimedia controller emmc through a judgment module in the boot loader uboot to determine that a lightweight real-time task exists in the current task to be executed.
4. The method of claim 1, wherein starting and running the Rtos operating system in a second processor in the multicore processor comprises:
loading the Rtos mirror image from the embedded multimedia controller emmc fixed position to a memory fixed position through the boot loader uboot;
configuring the second processor to start and run the Rtos operating system after configuration is complete.
5. The method of claim 4, wherein the configuring the second processor comprises:
setting the running address of the second processor as the mirror address of the Rtos operating system, initializing the second processor and/or powering on the second processor.
6. The method according to claim 1, wherein said booting a Linux operating system in said first processor after said Rtos operating system booting is completed comprises:
initializing an embedded multimedia controller emmc in the second processor;
loading Linux operating system resources in a fixed partition of the embedded multimedia controller emmc, wherein the Linux operating system resources comprise a Linux kernel image zlmage and Linux usable external device resources dtb;
updating the external equipment resource dtb according to the current hardware resource allocation of the multi-core processor to obtain a starting parameter;
and the multi-core processor sends a starting command and the starting parameter to the first processor, so that the first processor starts a Linux operating system after receiving the starting command and the starting parameter.
7. The method of claim 6, wherein the boot parameters include a memory storage address of the Linux operating system and a memory storage address of the external device resource dtb.
8. The method of claim 6 or 7, further comprising:
and after receiving the starting command and the starting parameters, the first processor is switched to a nonsecure environment, and a Linux operating system is started in the nonsecure environment.
9. A system starting device is applied to a multi-core processor comprising Linux and Rtos dual operating systems, and is characterized by comprising:
the system comprises a processor starting unit, a first processor and a second processor, wherein the processor starting unit is configured to start the first processor through a boot loader uboot in an embedded multimedia controller emmc connected with a multi-core processor after the multi-core processor is powered on;
a receiving unit configured to receive, by the multicore processor, a start operating system instruction;
the first system starting unit is configured to start and run an Rtos operating system in a second processor of the multi-core processor through the boot loader uboot when determining that a lightweight real-time task exists in a current task to be executed;
a second system starting unit configured to start a Linux operating system in the first processor after the Rtos operating system is started.
10. The apparatus of claim 9, wherein the determining that there is a lightweight real-time task in the tasks currently to be executed comprises:
and the boot loader uboot reads a task list to be executed of a fixed partition in the embedded multimedia controller emmc to determine that a lightweight real-time task exists in the current task to be executed.
11. The apparatus of claim 10, wherein the boot loader uboot reads a list of tasks to be executed of a fixed partition in the embedded multimedia controller emmc to determine that there are light-weight real-time tasks in the current tasks to be executed, comprising:
and reading a task list to be executed of a fixed partition in the embedded multimedia controller emmc through a judgment module in the boot loader uboot to determine that a lightweight real-time task exists in the current task to be executed.
12. The apparatus of claim 9, wherein the initiating and running Rtos operating system in a second processor in the multicore processor comprises:
loading the Rtos mirror image from the embedded multimedia controller emmc fixed position to a memory fixed position through the boot loader uboot;
configuring the second processor to start and run the Rtos operating system after configuration is complete.
13. The apparatus of claim 12, wherein the configuring the second processor comprises:
setting the running address of the second processor as the mirror address of the Rtos operating system, initializing the second processor and/or powering on the second processor.
14. The apparatus of claim 9, wherein said booting a Linux operating system in said first processor after said Rtos operating system booting is completed comprises:
initializing an embedded multimedia controller emmc in the second processor;
loading Linux operating system resources in a fixed partition of the embedded multimedia controller emmc, wherein the Linux operating system resources comprise a Linux kernel image zlmage and Linux usable external device resources dtb;
updating the external equipment resource dtb according to the current hardware resource allocation of the multi-core processor to obtain a starting parameter;
and the multi-core processor sends a starting command and the starting parameter to the first processor, so that the first processor starts a Linux operating system after receiving the starting command and the starting parameter.
15. The apparatus of claim 14, wherein the boot parameters include a memory storage address of a Linux operating system and dtb.
16. The apparatus of claim 14, further comprising:
and after receiving the starting command and the starting parameters, the first processor is switched to a nonsecure environment, and a Linux operating system is started in the nonsecure environment.
17. An electronic device comprising a memory and a processor; wherein the memory is configured to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method steps of any of claims 1-8.
18. A chip, characterized in that,
the chip comprising the electronic device of claim 17.
19. A computer-readable storage medium, having stored thereon computer instructions which, when executed by a processor, carry out the method steps of any one of claims 1-8.
CN202211304624.3A 2022-10-24 2022-10-24 System starting method and device, electronic equipment and storage medium Pending CN115357310A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211304624.3A CN115357310A (en) 2022-10-24 2022-10-24 System starting method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211304624.3A CN115357310A (en) 2022-10-24 2022-10-24 System starting method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115357310A true CN115357310A (en) 2022-11-18

Family

ID=84008449

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211304624.3A Pending CN115357310A (en) 2022-10-24 2022-10-24 System starting method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115357310A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115587071A (en) * 2022-12-12 2023-01-10 南京芯驰半导体科技有限公司 Multi-core heterogeneous SoC-based vehicle-mounted system data storage system and method
CN116243996A (en) * 2023-05-12 2023-06-09 苏州浪潮智能科技有限公司 Service operation switching method and device, storage medium and electronic device
CN116521209A (en) * 2023-07-04 2023-08-01 苏州浪潮智能科技有限公司 Upgrading method and device of operating system, storage medium and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040212585A1 (en) * 2003-04-23 2004-10-28 Say-Ling Wen Method of starting a one-touch system through a hot key
CN109426523A (en) * 2017-08-18 2019-03-05 厦门雅迅网络股份有限公司 Dual system starts method and computer readable storage medium
CN114637546A (en) * 2020-12-16 2022-06-17 晶晨半导体(深圳)有限公司 Method for responding to trigger event, multi-core processor and electronic device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040212585A1 (en) * 2003-04-23 2004-10-28 Say-Ling Wen Method of starting a one-touch system through a hot key
CN109426523A (en) * 2017-08-18 2019-03-05 厦门雅迅网络股份有限公司 Dual system starts method and computer readable storage medium
CN114637546A (en) * 2020-12-16 2022-06-17 晶晨半导体(深圳)有限公司 Method for responding to trigger event, multi-core processor and electronic device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115587071A (en) * 2022-12-12 2023-01-10 南京芯驰半导体科技有限公司 Multi-core heterogeneous SoC-based vehicle-mounted system data storage system and method
CN116243996A (en) * 2023-05-12 2023-06-09 苏州浪潮智能科技有限公司 Service operation switching method and device, storage medium and electronic device
CN116243996B (en) * 2023-05-12 2023-08-08 苏州浪潮智能科技有限公司 Service operation switching method and device, storage medium and electronic device
CN116521209A (en) * 2023-07-04 2023-08-01 苏州浪潮智能科技有限公司 Upgrading method and device of operating system, storage medium and electronic equipment
CN116521209B (en) * 2023-07-04 2023-09-15 苏州浪潮智能科技有限公司 Upgrading method and device of operating system, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN109478135B (en) Computer system and method for rebooting a computer system
CN115357310A (en) System starting method and device, electronic equipment and storage medium
US6816963B1 (en) Platform level initialization using an image generated automatically by a remote server based upon description automatically generated and transmitted thereto by a processor-based system
WO2019084853A1 (en) Method and system for discovering hardware attribute of bare metal server
US7673131B2 (en) Booting an operating system in discrete stages
US9223596B1 (en) Virtual machine fast provisioning based on dynamic criterion
CN105814541B (en) The method of computer equipment and computer equipment internal storage starting
CN111314799A (en) Terminal system architecture, communication system, communication method, and storage medium
CN110737479A (en) method for starting operating system without disk, server and readable storage medium
US10303487B2 (en) System and method for booting an information handling system
EP2551768A1 (en) Multi-core system and start-up method
CN114461287A (en) Operating system starting method and device, electronic equipment and storage medium
US9600295B2 (en) Systems and methods of providing multiple video outputs during a pre-boot environment
JP2011060225A (en) Operating system booting method
CN112328297B (en) Method and device for upgrading Android system running compatibly on Linux
US10572151B2 (en) System and method to allocate available high bandwidth memory to UEFI pool services
CN116521209B (en) Upgrading method and device of operating system, storage medium and electronic equipment
CN114064128B (en) Kernel restarting method
JP5619999B2 (en) Method for executing utility program, computer system and computer program product
JP2000276359A (en) Information processor, method for initializing program and program providing medium
CN117311890B (en) Picture display method and device in starting process of server
CN116243994B (en) Driving loading method of storage device, operating system starting method and system
CN116954729A (en) Starting method, device, medium and equipment of operating system
CN117369891B (en) Method and device for starting and running server, server and storage medium
WO2017113330A1 (en) Multi-core embedded processor-based display method and device, and embedded apparatus

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20221118

RJ01 Rejection of invention patent application after publication