Mainboard startup method and device

By directly running the linux kernel to detect external storage devices when the motherboard of the mobile terminal is started, avoiding bootloader detection, solving the startup delay problem caused by external storage device detection and improving startup efficiency.

CN112114882BActive Publication Date: 2024-08-27SHENZHEN CULTRAVIEW DIGITAL TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010883887.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-28
Publication Date
2024-08-27
Estimated Expiration
2040-08-28

AI Technical Summary

Technical Problem

When the external storage device of the mobile terminal is connected to the motherboard, the motherboard startup process takes a long time, mainly due to the delay caused by the bootloader detecting the external storage device.

Method used

By directly running the linux kernel when the motherboard is started, it detects whether the external storage device meets the setting conditions of the bootloader. If it is not met, it will directly load the operating system, eliminating the bootloader detection process.

Benefits of technology

It significantly reduces the startup time and factory test time of the motherboard, and improves the startup efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112114882B
    Figure CN112114882B
Patent Text Reader

Abstract

The present application is applicable to the field of computer technology, and provides a motherboard startup method and device, wherein the method comprises: obtaining a motherboard startup instruction, and running a Linux kernel based on the motherboard startup instruction; based on the Linux kernel, detecting whether the external storage device meets the set conditions that need to be supported by the boot loader; if the external storage device meets the set conditions, performing a restart operation and running the boot loader; if the external storage device does not meet the set conditions, loading an operating system based on the Linux kernel. Thus, when there is an external storage device on the motherboard, the boot time of the motherboard can be reduced to a large extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of computer technology, and in particular, relates to a mainboard startup method and device. Background Art

[0002] Embedded devices have two notable characteristics: on the one hand, they need to reduce costs as much as possible and eliminate unnecessary software and hardware functions; on the other hand, they need to be customized to meet diverse needs, and a unified standard approach is difficult to meet all needs.

[0003] A bootloader is a program located on a mobile terminal (e.g., a computer, a mobile phone, or other computing device) for booting an operating system. However, as computer operating systems become more and more complex, the functions of bootloaders are also becoming more and more abundant.

[0004] At present, when a mobile terminal is connected to other storage devices (e.g., a USB flash drive), the mobile terminal's mainboard needs to be mounted and detected by the bootloader when it is powered on (e.g., when it is powered on during the factory production test phase). In addition, after completing the detection operation of the external storage device, the mainboard calls the Linux kernel to reload the external storage device and start the operating system.

[0005] However, the process of the bootloader detecting the external storage device takes a long time, resulting in an increase in the motherboard startup time or factory test time. Summary of the invention

[0006] In view of this, an embodiment of the present application provides a mainboard startup method and device to at least solve the problem in the prior art that the mainboard startup process takes a long time when the mainboard is connected to an external storage device.

[0007] A first aspect of an embodiment of the present application provides a mainboard startup method, wherein the mainboard is connected to an external storage device, and the mainboard startup method is executed by the mainboard, the method comprising: obtaining a mainboard startup instruction, and running a Linux kernel based on the mainboard startup instruction; based on the Linux kernel, detecting whether the external storage device meets a set condition that needs to be supported by a boot loader; if the external storage device meets the set condition, performing a restart operation and running the boot loader; if the external storage device does not meet the set condition, loading an operating system based on the Linux system.

[0008] A second aspect of an embodiment of the present application provides a motherboard startup device, wherein the motherboard is connected to an external storage device, and the device includes: a power-on operation trigger unit, configured to obtain a motherboard startup instruction and run a Linux kernel based on the motherboard startup instruction; a set condition detection unit, configured to detect, based on the Linux kernel, whether the external storage device meets the set conditions that need to be supported by a boot loader; a boot loader calling unit, configured to perform a restart operation and run the boot loader if the external storage device meets the set conditions; and an operating system loading unit, which loads an operating system based on the Linux system if the external storage device does not meet the set conditions.

[0009] A third aspect of an embodiment of the present application provides a mobile terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0010] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0011] A fifth aspect of the embodiments of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal implements the steps of the above method.

[0012] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0013] When the motherboard receives the motherboard startup instruction, the motherboard directly runs the Linux kernel to mount and detect whether the corresponding external storage device must be supported by the boot loader, and if it is not an external storage device that must be supported by the boot loader, the operating system can be directly loaded by the Linux system. In addition, the external storage device that must be supported by the boot loader is rare, and generally the external storage device does not have to run under the boot loader, so the time spent by the bootloader to detect the external storage device can be saved, and the boot time of the motherboard can be reduced to a large extent. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0015] Figure 1 A flowchart of an example of a mainboard startup method according to an embodiment of the present application is shown;

[0016] Figure 2 A flowchart of an example of a mainboard startup method according to an embodiment of the present application is shown;

[0017] Figure 3 A flowchart showing an example of a mainboard startup method in the current related art;

[0018] Figure 4 A flowchart of an example of a mainboard startup method according to an embodiment of the present application is shown;

[0019] Figure 5 A structural block diagram of an example of a mainboard startup device according to an embodiment of the present application is shown;

[0020] Figure 6 It is a schematic diagram of an example of a mobile terminal according to an embodiment of the present application. DETAILED DESCRIPTION

[0021] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0022] In order to illustrate the technical solution described in this application, a specific embodiment is provided below for illustration.

[0023] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0024] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0025] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0026] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0027] In a specific implementation, the mobile terminal described in the embodiments of the present application includes but is not limited to other portable devices such as mobile phones, laptop computers or tablet computers with touch-sensitive surfaces (e.g., touch screen displays and / or touch pads). It should also be understood that in some embodiments, the above-mentioned devices are not portable communication devices, but desktop computers with touch-sensitive surfaces (e.g., touch screen displays and / or touch pads).

[0028] In the following discussion, a mobile terminal including a display and a touch-sensitive surface is described. However, it should be understood that the mobile terminal may include one or more other physical user interface devices such as a physical keyboard, mouse and / or joystick.

[0029] Various applications that can be executed on a mobile terminal can use at least one common physical user interface device such as a touch-sensitive surface. One or more functions of the touch-sensitive surface and corresponding information displayed on the terminal can be adjusted and / or changed between applications and / or within a corresponding application. In this way, the common physical architecture of the terminal (e.g., a touch-sensitive surface) can support a variety of applications with user interfaces that are intuitive and transparent to the user.

[0030] In addition, in the description of the present application, the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0031] Figure 1 A flowchart of an example of a mainboard startup method according to an embodiment of the present application is shown. Here, the mainboard is connected to an external storage device, and the execution subject of the method can be the mainboard, and can also be the mainboard in various mobile terminals (e.g., mobile phones, computers, televisions, etc.).

[0032] In some examples of the embodiments of the present application, the mainboard of the mobile terminal and the external storage device can be connected through a USB interface, for example, through various connection protocols including USB2.0 or USB3.0, and the external storage device can be a USB flash drive.

[0033] like Figure 1As shown, in step 110, a motherboard startup instruction is obtained, and the Linux kernel is run based on the motherboard startup instruction. Exemplarily, the terminal user or tester can start the motherboard switch to send the motherboard startup instruction to the motherboard.

[0034] Different from the current related art, after receiving the motherboard startup instruction, the motherboard provided in the embodiment of the present application can directly start the Linux kernel, instead of starting the boot loader to detect the external storage device and then starting the Linux kernel.

[0035] In step 120, based on the Linux kernel, it is detected whether the external storage device meets the setting conditions that need to be supported by the boot loader.

[0036] It should be noted that the rate of detecting external storage devices based on the Linux kernel is higher than the rate of detecting external storage devices based on the bootloader, and the detection operation for the external storage device can be completed relatively quickly. In addition, the set conditions can be conditions that cannot be met in the environment where the Linux kernel is running, or conditions that can only be run in the environment where the bootloader is running, such as motherboard firmware upgrades.

[0037] If the detection result in step 120 indicates that the external storage device meets the set condition, then jump to step 130. If the detection result in step 120 indicates that the external storage device does not meet the set condition, then jump to step 140.

[0038] In step 130, a reboot operation is performed and a boot loader is run.

[0039] In step 140, an operating system is loaded based on the Linux kernel.

[0040] Through the embodiments of the present application, a restart operation can be performed to run the boot loader only when the external storage device meets the set conditions, for example, when the mainboard is upgraded using the external storage device. In addition, for external storage devices with general functions, the Linux kernel can be used to load the operating system directly, and the process of the bootloader detecting the external storage device can be omitted, thereby reducing the startup time of the mainboard.

[0041] In the current related art, when the mainboard is started, the bootloader is started, and the bootloader can be used to detect whether there is a specific file in the external storage device, such as the file name or content. Furthermore, the bootloader can perform corresponding working methods according to the specific files. In one example of an embodiment of the present application, if a first specific file is detected, the bootloader upgrades the mainboard firmware. In another example of an embodiment of the present application, if a second specific file (for example, a mode file) is detected, the factory mode, aging mode, factory test mode, etc. are entered.

[0042] It should be understood that it takes time for the bootloader to detect the external storage device, and the detection time varies from 2 to 16 seconds depending on the platform and the external storage device, which greatly increases the motherboard startup time or factory test time.

[0043] Figure 2 A flowchart of an example of a mainboard startup method according to an embodiment of the present application is shown.

[0044] like Figure 2 As shown, in step 210, a mainboard startup instruction is obtained, and the Linux kernel is run based on the mainboard startup instruction.

[0045] In step 220, based on the Linux kernel, it is detected whether there is a target format file that needs to be run by the boot loader in the external storage device.

[0046] If the detection result in step 220 indicates that the target format file exists in the external storage device, then jump to step 230. In addition, if the detection result in step 220 indicates that the target format file does not exist in the external storage device, then jump to step 240.

[0047] In step 230, a reboot operation is performed and the boot loader is run, so that the target format file is run by the boot loader.

[0048] In step 240, an operating system is loaded based on the Linux kernel, so that the target format file is run by the operating system.

[0049] Through the embodiments of the present application, the mainboard can determine whether to use the boot loader or the operating system to run the target format file by identifying the specific format file in the external storage device, which can effectively ensure the normal operation of the external storage device.

[0050] It should be noted that it takes time for the mainboard of the mobile terminal to detect the storage device and the files on the storage device, but the work done by the bootloader to detect the storage device does not contribute to the operation of the Linux kernel. For example, after calling the Linux kernel, the external storage device needs to be re-enumerated and mounted to the Linux kernel.

[0051] In some application scenarios, the target format file includes a motherboard firmware upgrade file. Specifically, a file named "FacBurn.ctv" specified in the factory protocol can be placed in a USB flash drive and connected to the motherboard. Thus, the motherboard firmware upgrade file can be found by using file identification, and the motherboard firmware can be upgraded effectively.

[0052] Figure 3 A flowchart showing an example of a mainboard startup method in the current related art is shown.

[0053] In step 310, the bootloader detects files in the external storage device. Generally speaking, the execution process of step 310 will last for 3-16 seconds.

[0054] In step 320, it is determined whether the file in the external storage device is a file that works under the bootloader.

[0055] If the judgment result in step 320 indicates that the file in the storage device is a file that works under the bootloader, then jump to step 330. If the judgment result in step 320 indicates that the file in the storage device is not a file that works under the bootloader, then jump to step 340.

[0056] In step 330, the bootloader burns the firmware.

[0057] In step 340, the Linux kernel starts and automatically mounts the external storage device. Generally speaking, the execution process of step 340 takes 5-8 seconds.

[0058] In step 350, the Android system is started. Here, depending on the application scenario, other operating systems other than the Android system may be used, such as Windws, IOS operating system, etc.

[0059] In step 360, the file in the external storage device is executed to implement the corresponding function.

[0060] In the current related technology, during the motherboard factory testing stage, after the bootloader completes the detection, it enters the Linux kernel, and the Linux kernel will remount the USB flash drive, and finally enter the Android system for aging testing.

[0061] In contrast, in some examples of the embodiments of the present application, the bootloader detection stage can be skipped. As long as the file is detected in the USB flash drive after Linux mounts the USB flash drive (and Linux detects files very quickly, at the millisecond level, and almost no time is required), the Android system can be entered to perform the aging test.

[0062] Figure 4 A flowchart of an example of a mainboard startup method according to an embodiment of the present application is shown.

[0063] like Figure 4 As shown, in step 410, the bootloader is started, which generally takes 1-3 seconds.

[0064] In step 420, the Linux kernel starts and automatically mounts the external storage device, which generally takes 5-8 seconds.

[0065] In step 430, the files in the external storage device are detected under the Linux kernel. It should be noted that the file detection process under Linux is very fast, for example, within 0.1 seconds.

[0066] In step 440, it is detected whether it is a file working under the bootloader.

[0067] If the detection result in step 440 indicates that the file in the external storage device is a file that works under the bootloader, then jump to step 450. If the detection result in step 440 indicates that the file in the external storage device is not a file that works under the bootloader, then jump to step 460.

[0068] In step 450, the mainboard is restarted and the firmware is burned under the bootloader.

[0069] In step 460, the Android system is started.

[0070] In step 470, the file in the external storage device is executed to implement the corresponding function.

[0071] In an embodiment of the present application, the Linux system is used instead of the bootloader to detect factory-specific files (but the bootloader detection mechanism can be retained, it is just not enabled by default), and the bootloader detection mechanism can be skipped by default, and the detection can be performed after the Linux kernel mounts the storage device, so that in most cases the startup time can be saved, the boot speed can be accelerated to a certain extent, the test time can be reduced, and the test efficiency can be improved.

[0072] The file detection process of the external storage device of the mobile terminal's motherboard is not detected by the bootloader by default, but it is still an option in the bootloader detection. Each time the power is turned on, it directly enters Linux and performs file detection when the Linux system is started. Because some uncommon tasks need to be performed in the bootloader, such as upgrading the firmware in the bootloader. In this case, the file is also detected in Linux first. If there is a file that needs to work under the bootloader, it will be restarted to the bootloader. In this way, when there is a file in the external storage device that needs to work under the bootloader, it will take longer to work under the bootloader, and the startup time will be increased by a few seconds.

[0073] However, in combination with actual application situations, when working on mobile terminals, firmware upgrade operations are generally rarely performed on the bootloader, and the firmware of the smart terminal motherboard is generally burned in batches before the EMMC is attached to the motherboard, and firmware upgrade operations are rarely involved, so it can save time in most cases. In particular, during factory testing, firmware is rarely burned under the bootloader, and other methods (such as factory testing, aging factory testing, etc.) are used in most cases, which can effectively shorten the test time, improve efficiency, and optimize production capacity.

[0074] Figure 5 A structural block diagram of an example of a mainboard startup device according to an embodiment of the present application is shown.

[0075] like Figure 5 As shown, the mainboard startup device 500 includes a startup operation trigger unit 510 , a setting condition detection unit 520 , a boot loader calling unit 530 and an operating system loading unit 540 .

[0076] The power-on operation trigger unit 510 is configured to obtain a mainboard startup instruction and run the Linux kernel based on the mainboard startup instruction.

[0077] The setting condition detection unit 520 is configured to detect, based on the Linux kernel, whether the external storage device meets the setting condition that needs to be supported by the boot loader.

[0078] The boot loader calling unit 530 is configured to perform a reboot operation and run the boot loader if the external storage device meets the set condition.

[0079] The operating system loading unit 540 is configured to load an operating system based on the Linux kernel if the external storage device does not meet the set condition.

[0080] In some examples of the embodiments of the present application, the setting condition detection unit 520 is also configured to detect whether there is a target format file that needs to be run by the boot loader in the external storage device; accordingly, the boot loader calling unit 530 is configured to perform a restart operation and run the boot loader if the target format file exists in the external storage device, so that the boot loader runs the target format file.

[0081] In some examples of the embodiments of the present application, the target format file includes a mainboard firmware upgrade file.

[0082] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0083] Figure 6 is a schematic diagram of an example of a mobile terminal according to an embodiment of the present application. Figure 6 As shown, the mobile terminal 600 of this embodiment includes: a processor 610, a memory 620, and a computer program 630 stored in the memory 620 and executable on the processor 610. When the processor 610 executes the computer program 630, the steps in the above-mentioned motherboard startup method embodiment are implemented, for example Figure 1 Alternatively, when the processor 610 executes the computer program 630, the functions of each module / unit in the above-mentioned device embodiments are implemented, for example Figure 5 The functions of units 510 to 530 are shown.

[0084] Exemplarily, the computer program 630 may be divided into one or more modules / units, which are stored in the memory 620 and executed by the processor 610 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 630 in the mobile terminal 600. For example, the computer program 630 may be divided into a power-on operation trigger module, a setting condition detection module, a boot loader calling module, and an operating system loading module, and the specific functions of each module are as follows:

[0085] The power-on operation trigger module is configured to obtain a mainboard startup instruction and run the Linux kernel based on the mainboard startup instruction.

[0086] The setting condition detection module is configured to detect whether the external storage device meets the setting condition that needs to be supported by the boot loader based on the Linux kernel.

[0087] The boot loader calling module is configured to execute a restart operation and run the boot loader if the external storage device meets the set condition.

[0088] The operating system loading module is configured to load the operating system based on the Linux kernel if the external storage device does not meet the set condition.

[0089] The mobile terminal 600 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The mobile terminal may include, but is not limited to, a processor 610 and a memory 620. Those skilled in the art will appreciate that Figure 6 It is only an example of the mobile terminal 600 and does not constitute a limitation of the mobile terminal 600. It may include more or less components than shown in the figure, or a combination of certain components, or different components. For example, the mobile terminal may also include input and output devices, network access devices, buses, etc.

[0090] The processor 610 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0091] The memory 620 may be an internal storage unit of the mobile terminal 600, such as a hard disk or memory of the mobile terminal 600. The memory 620 may also be an external storage device of the mobile terminal 600, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the mobile terminal 600. Further, the memory 620 may also include both an internal storage unit and an external storage device of the mobile terminal 600. The memory 620 is used to store the computer program and other programs and data required by the mobile terminal. The memory 620 may also be used to temporarily store data that has been output or is to be output.

[0092] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment.

[0093] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0094] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0095] In the embodiments provided in the present application, it should be understood that the disclosed device / mobile terminal and method can be implemented in other ways. For example, the device / mobile terminal embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0096] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0097] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above units may be implemented in the form of hardware or software.

[0098] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0099] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for starting a mainboard of a mobile terminal, characterized in that: The mainboard is connected to the external storage device via a USB interface, and the mainboard startup method is executed by the mainboard, and the method includes: Obtaining a motherboard startup instruction, and running the Linux kernel based on the motherboard startup instruction; Based on the Linux kernel, detecting whether the external storage device meets the set conditions that need to be supported by the boot loader; If the external storage device meets the set condition, a restart operation is performed and the boot loader is run; If the external storage device does not meet the set condition, loading the operating system based on the Linux kernel; The detecting whether the external storage device meets the setting conditions that need to be supported by the boot loader includes: Detecting whether there is a target format file that needs to be run by the boot loader in the external storage device, the target format file including a mainboard firmware upgrade file; Correspondingly, if the external storage device meets the set condition, a restart operation is performed and the boot loader is run, including: If the target format file exists in the external storage device, a restart operation is performed and the boot loader is run, so that the boot loader runs the target format file to upgrade the mainboard firmware.

2. A mainboard starting device for a mobile terminal, characterized in that: The mainboard is connected to the external storage device via a USB interface, and the device comprises: A power-on operation trigger unit is configured to obtain a motherboard startup instruction and run a Linux kernel based on the motherboard startup instruction; A setting condition detection unit is configured to detect whether the external storage device meets the setting condition that needs to be supported by the boot loader based on the Linux kernel; a boot loader calling unit, configured to perform a restart operation and run the boot loader if the external storage device meets the set condition; An operating system loading unit, which loads an operating system based on the Linux kernel if the external storage device does not meet the set condition; The setting condition detection unit is further configured to detect whether there is a target format file that needs to be run by the boot loader in the external storage device, the target format file including a mainboard firmware upgrade file; Correspondingly, the boot loader calling unit is configured to perform a restart operation and run the boot loader if the target format file exists in the external storage device, so that the boot loader runs the target format file to upgrade the mainboard firmware.

3. A mobile terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to claim 1 when executing the computer program.

4. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to claim 1 are implemented.