System upgrade method, apparatus and terminal for multi-system mobile terminals
By creating a partition information table and identifying the partitions of the embedded memory, the problem of inconsistent upgrades in fastboot flashing mode in multi-system mobile terminals is solved, achieving efficient multi-eMMC flashing upgrades and meeting the running requirements of new operating systems.
Patent Information
- Application Number
- CN202110084815.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-21
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2041-01-21
AI Technical Summary
In existing technologies, Hypervisor systems running in pass-through mode cannot perform unified flashing and upgrading of multiple eMMCs through fastboot flashing mode, resulting in low efficiency of system upgrades for multiple operating systems.
By creating a partition information table, multiple embedded storage partitions can be identified and manipulated, enabling unified partition table creation, unified batch flashing and upgrading, independent partition flashing and upgrading, and unified partition erasure operations in fastboot flashing mode.
It enables efficient system upgrades for mobile terminals with multiple systems, supports unified flashing upgrades for individual or multiple eMMCs, and meets the operational requirements of new operating systems.
Smart Images

Figure CN114816491B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, primarily based on a solution for flashing multiple eMMCs on a single machine with multiple operating systems on a hypervisor in passthrough mode, where each system has its own dedicated eMMC (embedded memory), and the flashing process is completed on the host machine (PC) using fastboot flashing mode. More specifically, it relates to a system upgrade method, apparatus, and terminal for multi-system mobile terminals. Background Technology
[0002] With the rapid development of technology and application demands, the need for multi-system operation on a single embedded system is increasing and will undoubtedly be widely adopted in the future. For example, current intelligent cockpits require solutions with multiple screens and systems on a single machine (for safety and automotive compliance, the instrument cluster runs the QNX system, while the central control unit runs the Android system). This system will place significant demands on the efficiency of the CPU and eMMC. While the CPU can continuously improve its computing power according to Moore's Law, the eMMC will operate under high load to meet the read and write requirements of both systems. Therefore, solutions with multiple eMMC Flash chips on the same SoC, each supporting multiple operating systems with their own dedicated eMMC chip, are widely used in the market.
[0003] Currently, in products running Hypervisor systems in passthrough mode, multiple operating systems run on the same SOC (this invention mainly addresses dual-system mode), and to improve efficiency, each system uses a dedicated eMMC Flash. This prevents the use of fastboot flashing mode to upgrade multiple operating systems. In other words, existing solutions for upgrading systems using fastboot flashing mode only support flashing and upgrading images from a single eMMC Flash, and do not support flashing multiple eMMCs simultaneously. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a simple system upgrade method, device and terminal for multi-system mobile terminals, which realizes unified partition table creation, unified batch flashing upgrade, independent partition flashing upgrade, unified partition erasure and independent partition erasure through fastboot flashing mode.
[0005] The technical solution of this invention to solve the above-mentioned technical problems is to provide a system upgrade method for a multi-system mobile terminal. In this system upgrade method for a multi-system mobile terminal, the mobile terminal includes at least two embedded memories, and the system is stored in the embedded memories. The system upgrade method for a multi-system mobile terminal includes:
[0006] Create a partition information table corresponding to each of the embedded memories, and store the partition information in the partition table in a structured manner. The partition information table includes the partition table name and the full name of the partition that uniquely corresponds to the partition.
[0007] Read the partition information table, identify the corresponding embedded memory according to the partition table name, and partition one or more embedded memories uniformly according to the partition information table;
[0008] The system receives a partition operation command, queries the partition information table according to the partition operation command to identify the embedded memory that needs to be operated on, and performs unified operation on one or more partitions of the embedded memory.
[0009] In the system upgrade method for multi-system mobile terminals of the present invention, the partition information table includes, in chronological order, the struct oem_part_info structure information of all partitions of the embedded memory:
[0010] Partition name, partition name, partition system format, and partition length; the full partition name includes the partition name and partition name.
[0011] In the system upgrade method for multi-system mobile terminals of the present invention, the step of reading the partition information table, identifying the embedded memory corresponding to the partition information table according to the partition table name, and partitioning the embedded memory includes:
[0012] The command of the mobile terminal is identified, the embedded memory to be operated is determined based on the command of the mobile terminal, and the determination result is saved;
[0013] Based on the judgment result, the embedded memory is directly partitioned.
[0014] In the system upgrade method for multi-system mobile terminals of the present invention, the step of reading the partition information table, identifying the embedded memory corresponding to the partition information table according to the partition table name, and partitioning the embedded memory includes:
[0015] Connect to the USB host and initialize the fastboot communication protocol of the mobile terminal according to the commands of the mobile terminal;
[0016] The peripheral device that has entered the data listening state acquires the partition operation command issued by the PC.
[0017] The process receives and parses the partition operation command. If the partition name is obtained, the embedded memory is identified according to the partition name, the embedded memory is partitioned, and the partition is operated on. If the partition name is not obtained, the process exits.
[0018] In the system upgrade method for multi-system mobile terminals of the present invention, the step of receiving a partition operation command, querying the partition information table according to the partition operation command to identify the embedded memory corresponding to the partition information table that needs to be operated, and uniformly operating on the partitions of one or more embedded memories includes:
[0019] Receive the partition name transmitted by the PC bound to the mobile terminal, traverse the partition information table according to the partition name, and identify the partition information table corresponding to the partition name;
[0020] The embedded memory that needs to be operated is determined based on the partition information table;
[0021] Read the partition table corresponding to the embedded memory and perform operations on the partition table.
[0022] The present invention also provides a system upgrade apparatus for a multi-system mobile terminal, the mobile terminal including at least two embedded memories, the system being stored in the embedded memories, characterized in that the system upgrade apparatus for the multi-system mobile terminal includes:
[0023] A partition information table creation unit is used to create a partition information table corresponding to each of the embedded memories, and to store the partition information in the partition table in a structured manner. The partition information table includes the partition table name and the full name of the partition that uniquely corresponds to the partition.
[0024] A partition unit is established to read the partition information table, identify the corresponding embedded memory according to the partition table name, and partition one or more embedded memories uniformly according to the partition information table.
[0025] The partition operation unit is used to receive partition operation commands, query the partition information table according to the partition operation commands, identify the embedded memory that needs to be operated corresponding to the partition information table, and uniformly operate on the partitions of one or more embedded memories.
[0026] In the system upgrade device for multi-system mobile terminals of the present invention, the partition information table includes, in chronological order, the struct oem_part_info structure information of all partitions of the embedded memory:
[0027] Partition name, partition name, partition system format, and partition length; the full partition name includes the partition name and partition name.
[0028] In the system upgrade device for a multi-system mobile terminal of the present invention, the partitioning unit is further configured to: identify the command of the mobile terminal; determine the embedded memory to be operated according to the command of the mobile terminal and save the determination result; directly partition the embedded memory according to the determination result; connect to a USB host and initialize the fastboot communication protocol of the mobile terminal according to the command of the mobile terminal; the peripheral device entering the data listening state obtains the partitioning operation command issued by the PC; receive and parse the partitioning operation command; if the partition name is obtained, identify the embedded memory according to the partition name, partition the embedded memory and operate on the partition; if the partition name is not obtained, exit the process.
[0029] The operation partitioning unit is further configured to: receive the partition name transmitted by the PC bound to the mobile terminal; traverse the partition information table according to the partition name; identify the partition information table corresponding to the partition name; determine the embedded memory to be operated according to the partition information table; read the partition table corresponding to the embedded memory; and perform operations on the partition table.
[0030] The present invention also provides another system upgrade terminal for a multi-system mobile terminal, including a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the computer program to implement the steps of the system upgrade method for a multi-system mobile terminal described above.
[0031] The present invention also provides a computer-readable storage medium storing a computer program, characterized in that, when the computer program is executed by a processor, it implements the steps of the system upgrade method for a multi-system mobile terminal described above.
[0032] The present invention provides a system upgrade method, apparatus, and terminal for multi-system mobile terminals. In the embedded system's bootloader (u-boot), a partition information table is established. Embedded memory is partitioned based on its full partition name, and partition operation commands input from external devices are received to uniformly operate on one or more embedded memory partitions. This enables flashing and upgrading of multiple systems via fastboot flashing mode, with a simple and efficient operation process. Furthermore, by parsing fastboot command parameters, individual operations can be performed on embedded memory partitions, supporting individual flashing and upgrade modes for a single eMMC device. This meets the single eMMC flashing and upgrade requirements for new operating systems and multi-eMMC flashing and upgrades. Attached Figure Description
[0033] Figure 1 This is a flowchart illustrating the first embodiment of the present invention for system upgrade of multi-system mobile terminals;
[0034] Figure 2 This is a schematic diagram of the embedded memory partitioning process;
[0035] Figure 3 This is a schematic diagram of the partition information table data format;
[0036] Figure 4 This is a schematic diagram of the communication model between the u-boot end and the PC end of this invention;
[0037] Figure 5 This is a flowchart illustrating the second embodiment of the system upgrade method for multi-system mobile terminals of the present invention;
[0038] Figure 6 This is a flowchart illustrating the third embodiment of the system upgrade method for multi-system mobile terminals of the present invention;
[0039] Figure 7 This is a schematic diagram of an embodiment of the system upgrade device for multi-system mobile terminals of the present invention;
[0040] Figure 8 This is a schematic diagram of an embodiment of the system upgrade terminal for multi-system mobile terminals according to the present invention. Detailed Implementation
[0041] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0042] like Figure 1The diagram shown is a flowchart of a first embodiment of a system upgrade method for a multi-system mobile terminal. This system upgrade method for a multi-system mobile terminal can be applied to a smart cockpit. The mobile terminal includes at least two embedded memories, and the system is stored in the embedded memories. The system upgrade method for a multi-system mobile terminal includes:
[0043] Step S11: Create a partition information table corresponding to each of the embedded memories, and store the partition information in the partition table in the form of structured information. The partition information table includes the partition table name and the full name of the partition that uniquely corresponds to the partition.
[0044] Furthermore, the partition information table includes, in chronological order, the struct oem_part_info structure information of all partitions of the embedded memory: partition name, partition name, partition system format, and partition length; the full partition name includes the partition name and partition name, and the partition information table above completely includes all partitions of the two eMMCs.
[0045] In the above steps, taking a mobile terminal that can successfully drive two eMMC chips using u-boot as an example, the two eMMC chips are numbered 0 (QNX system) and 1 (Android) respectively. For example, entering the command "mmc dev 0" or "mmc dev 1" will allow the eMMC to be detected normally. Based on the usage requirements of eMMC in QNX and Android systems, partition tables are created for eMMC 0 and eMMC 1 respectively, and stored in the oem_partition_table_0 and oem_partition_table_1 tables as struct oem_part_info structures. For example, the specific information of the oem_partition_table_0 and oem_partition_table_1 partition information tables is as follows:
[0046] Table 1: Partition Information Table
[0047]
[0048] It is important to note that when partitioning eMMC uniformly, all partition full names must be unique. The partition full name is a string consisting of the partition name and the partition name. For example, in the partition table, the partition name of the system_a partition is "system" and the partition name is "_a", so the partition full name is "system_a".
[0049] Step S12: Read the partition information table, identify the corresponding embedded memory according to the partition table name, and partition one or more embedded memories uniformly according to the partition information table.
[0050] Accordingly, such as Figure 2 The diagram shows the embedded memory partitioning flowchart. The mobile terminal includes two eMMCs, eMMC0 and eMMC1. It reads the partition information tables oem_partition_table_0 and oem_partition_table_1, automatically identifies which eMMC the partition resides on based on its full partition name, writes the partition information table to the corresponding eMMC, and partitions the eMMC. After successful partitioning, the partition table structures of eMMC0 and eMMC1 are as follows. Figure 3 As shown.
[0051] The above steps also include identifying the command of the mobile terminal, determining the embedded memory to be operated based on the command of the mobile terminal, and saving the determination result; and directly partitioning the embedded memory based on the determination result.
[0052] The above steps also include connecting to a USB host and initializing the fastboot communication protocol of the mobile terminal according to the command of the mobile terminal; the peripheral device entering the data listening state obtains the partition operation command issued by the PC; receiving and parsing the partition operation command; if the partition name is obtained, the embedded memory is identified according to the partition name, the embedded memory is partitioned and the partition is operated; if the partition name is not obtained, the process exits.
[0053] Step S13: Receive a partition operation command, query the partition information table according to the partition operation command to identify the embedded memory that needs to be operated corresponding to the partition information table, and uniformly operate on the partitions of one or more embedded memories.
[0054] The above steps also include receiving the partition name transmitted by the PC bound to the mobile terminal, traversing the partition information table according to the partition name, identifying the partition information table corresponding to the partition name, determining the embedded memory to be operated on according to the partition information table, reading the partition table corresponding to the embedded memory, and operating on the partition table.
[0055] like Figure 4The diagram illustrates the communication model between the u-boot end and the PC end. The software program of this invention can run in various suitable BootLoaders, but the implementation of this invention is primarily within u-boot. Therefore, in this example, `muti_fastboot` exists as application software on u-boot. This invention follows the fastboot protocol and can manage multiple eMMC chips in multiple dimensions to meet the needs of new operating systems. Furthermore, the fastboot service on the PC end is fully compatible with conventional fastboot. The program designed in this invention communicates with the PC's fastboot service via USB and acts as the USB device itself. The `muti_fastboot` communication implemented on the mobile terminal's u-boot end fully complies with the standard fastboot protocol. When communicating with the PC's fastboot, the PC's fastboot acts as the server, and the u-boot's `muti_fastboot` acts as the client.
[0056] During the flashing and upgrade process, `muti_fastboot` can support individual eMMC drives (e.g., operating only on eMMC 0, command: `muti_fastboot mmc 0`) or two eMMC drives simultaneously. During the flashing process, it automatically finds the corresponding eMMC number based on the partition name and then operates on that eMMC. Taking the u-boot flashing mode including eMMC 0 and eMMC 01 as an example, the command example is as follows:
[0057] 1. Flashing eMMC separately 0
[0058] (1) u-boot commands:
[0059] muti_fastboot mmc 0
[0060] (2) PC commands:
[0061] Flashing by partition:
[0062] fastboot flash{partition}{image_file}
[0063] Command examples are as follows:
[0064] fastboot flash dos dos.img
[0065] fastboot flash qnxdisk qnxdata.img
[0066] Erase partition:
[0067] fastboot erase{partition}
[0068] Command examples are as follows:
[0069] fastboot erase dos
[0070] fastboot erase qnxdisk
[0071] format:
[0072] Format a partition:
[0073] fastboot format{partition}
[0074] Command examples are as follows:
[0075] fastboot format DOS
[0076] Global formatting, rebuilding the partition table:
[0077] fastboot oem format
[0078] 2. Flashing eMMC separately 1
[0079] (1) u-boot commands:
[0080] muti_fastboot mmc 1
[0081] (2) PC commands:
[0082] Flashing by partition:
[0083] fastboot flash{partition}{image_file}
[0084] Command examples are as follows:
[0085] fastboot flash dtb dtb.img
[0086] fastboot flash dtbo dtbo.img
[0087] fastboot flash boot boot.img
[0088] fastboot flash metadata metadata.img
[0089] fastboot flash system system.img
[0090] fastboot flash vendor vendor.img
[0091] fastboot flash product product.img
[0092] Erase partition:
[0093] fastboot erase{partition}
[0094] Command examples are as follows:
[0095] fastboot erase misc
[0096] fastboot erase pst
[0097] fastboot erase vbmeta
[0098] fastboot erase dtb
[0099] fastboot erase dtbo
[0100] fastboot erase boot
[0101] fastboot erase metadata
[0102] fastboot erase system
[0103] fastboot erase vendor
[0104] fastboot erase qnxdisk
[0105] fastboot erase product
[0106] fastboot erase userdata
[0107] format:
[0108] Format a partition:
[0109] fastboot format{partition}
[0110] fastboot format userdata
[0111] Global formatting and rebuilding of the partition table:
[0112] fastboot oem format
[0113] It's important to note that for systems using A / B partitions, since these partitions are primarily for OTA upgrades, multi_fastboot only flashes one partition (A or B). This choice can be configured within the multi_fastboot implementation. This means that if the system is already configured to boot from partition A, when the command "fastboot flash system system.img" is executed on the PC, only the system_a partition will be flashed, ignoring the system_b partition.
[0114] 3. Automatic flashing by partition
[0115] 1) u-boot commands:
[0116] muti_fastboot mmc
[0117] (2) PC commands:
[0118] The commands on the PC are exactly the same as those in 1 and 2. After executing the command, the main task is for the u-boot side to automatically install the partition name transferred over to find the eMMC number, and then operate on the corresponding eMMC partition.
[0119] 4. Common Fastboot Commands on PC
[0120] Load and run the kernel according to the u-boot parameters:
[0121] fastboot boot
[0122] Restart:
[0123] fastboot reboot
[0124] fastboot reboot bootloader
[0125] Read version information:
[0126] fastboot getver:version
[0127] As can be seen from the above regarding the communication and flashing upgrade between PC-side fastboot and u-boot-side multi_fastboot, this embodiment fully complies with the fastboot protocol standard. It mainly focuses on the unified management of simultaneous synchronization of eMMC 0 and eMMC 1, minimizing the differences in usage and making it easier for users to use.
[0128] like Figure 5 The diagram shows a second embodiment of the system upgrade method for multi-system mobile terminals according to the present invention. It should be noted that the prerequisites for the second embodiment include:
[0129] (1) The system used by the mobile terminal in this embodiment is capable of running multiple systems normally, and each system exclusively uses one eMMC.
[0130] (2) The u-boot used in this embodiment has successfully driven two eMMC (embedded memory) chips; the two eMMC chips are numbered 0 (QNX system) and 1 (Android) respectively. For example, entering commands such as "mmc dev 0" or "mmc dev 1" can detect the eMMC normally.
[0131] (3) The u-boot used in this embodiment already supports USB OTG function.
[0132] (4) The u-boot used in this invention already supports flashing and upgrading the Android system on eMMC 1.
[0133] The steps for continuing operations after partitioning the eMMC are as follows:
[0134] (1) Obtain the partition name Temp-name from the peripheral device;
[0135] (2) Traverse the partition information tables oem_partition_table_0 and oem_partition_table_1, and determine the partition information table corresponding to the partition name. If the partition information table corresponding to the partition name is not found, the traversal ends.
[0136] (3) Identify the partition information table and automatically identify which eMMC the partition is on based on the partition table name;
[0137] (4) Read the partition information table in the corresponding eMMC, and then manage / operate the corresponding eMMC partition.
[0138] like Figure 6 The diagram shows a third embodiment of the system upgrade method for multi-system mobile terminals according to the present invention. It should be noted that the prerequisites for this third embodiment include:
[0139] (1) The system used by the mobile terminal is capable of running multiple systems normally, and each system exclusively uses one eMMC.
[0140] (2) The u-boot used has successfully driven two eMMC (embedded memory) chips; the two eMMC chips are numbered 0 (QNX system) and 1 (Android) respectively. For example, entering commands such as "mmc dev 0" or "mmc dev 1" can detect the eMMC normally.
[0141] (3) The u-boot used already supports USB OTG function.
[0142] (4) The u-boot used already supports flashing and upgrading the Android system on eMMC 1.
[0143] The steps for flashing and upgrading eMMC based on multi_fastboot are as follows:
[0144] (1) Identify the parameters of the multi_fastboot command input at the u-boot end, determine the eMMC number to be operated on or automatically find the eMMC by partition name during operation, and save the result in the flash_type variable.
[0145] (2) Select and bind the USB OTG peripheral device to be used, and initialize the fastboot protocol.
[0146] (3) The USB enters the data listening state. When there is data, an interrupt will be generated and the data sent from the USB host will be obtained.
[0147] (4) Parse the fastboot command parameters on the PC, such as flash / erase / getvar / boot / reboot / oem, etc.
[0148] (5) Select the eMMC to be operated on based on the value of flash_type. When flash_type=0, operate on eMMC 0 directly; when flash_type=1, operate on eMMC 1 directly; when flash_type=2 or other values, identify which eMMC it is according to the partition name in the received PC fastboot parameters, and then operate on the corresponding eMMC. If the command parameter does not include a partition name, such as oem, then format both eMMCs directly.
[0149] (6) Perform corresponding operations on the eMMC according to the functions of the fastboot command parameters flash / erase / getvar / boot / reboot / oem on the PC. For example, flash means writing the image to the eMMC; erase means erasing a partition or all partitions of the eMMC.
[0150] This invention provides a corresponding system upgrade device for a multi-system mobile terminal. The mobile terminal includes at least two embedded memories, and the operating system is stored in the embedded memories. This upgrade device is a functional module of u-boot. The design of the multi_fastboot program is mainly completed on u-boot, and the execution of the multi_fastboot program also runs on u-boot. Figure 7 As shown, the upgrade device includes a partition information table creation unit 71, a partition creation unit 72, and a partition operation unit 73.
[0151] The partition information table creation unit 71 is used to create a partition information table corresponding to each of the embedded memories, and to store the partition information in the partition table in a structured manner. The partition information table includes the partition table name and the full name of the partition that uniquely corresponds to the partition.
[0152] A partition unit 72 is established to read the partition information table, identify the corresponding embedded memory according to the partition table name, and partition one or more embedded memories uniformly according to the partition information table.
[0153] The partition operation unit 73 is used to receive partition operation commands, query the partition information table according to the partition operation commands, identify the embedded memory that needs to be operated corresponding to the partition information table, and uniformly operate on the partitions of one or more embedded memories.
[0154] Specifically, the partitioning unit 72 is also used to: identify commands from the mobile terminal; determine the embedded memory to be operated based on the commands from the mobile terminal; save the determination result; directly partition the embedded memory based on the determination result; connect to the USB host and initialize the fastboot communication protocol of the mobile terminal based on the commands from the mobile terminal; the peripheral device entering the data listening state obtains the partitioning operation command issued by the PC; receive and parse the partitioning operation command; if the partition name is obtained, identify the embedded memory according to the partition name, partition the embedded memory, and operate on the partition; if the full partition name is not obtained, exit the process.
[0155] Specifically, the partition operation unit 73 is also used to receive the partition name transmitted by the PC bound to the mobile terminal, traverse the partition information table according to the partition name, identify the partition information table corresponding to the partition name, determine the embedded memory to be operated according to the partition information table, read the partition table corresponding to the embedded memory, and operate on the partition table.
[0156] This invention provides a corresponding system upgrade terminal for multi-system mobile terminals, such as... Figure 8 As shown, it includes a memory 801 and a processor 802. The memory 801 stores a computer program that can run on the processor 802. When the processor 802 executes the computer program, it implements the steps of the first embodiment of the system upgrade method for a multi-system mobile terminal.
[0157] This invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of a first embodiment of a system upgrade method for a multi-system mobile terminal.
[0158] The aforementioned mobile terminal partitions its embedded memory and performs read / write operations on these partitions by recognizing partitioning commands sent by a peripheral device (PC). This enables unified partitioning and flashing of multiple operating systems on the mobile terminal, making the flashing process simple and efficient. Furthermore, by parsing fastboot command parameters, it can operate on individual embedded memory partitions, supporting individual flashing and upgrade modes for specific embedded memory devices. This meets the needs of single eMMC flashing and upgrades, as well as multi-eMMC flashing and upgrades for new operating systems.
[0159] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A system upgrade method for a multi-system mobile terminal, applied to a single machine with multiple operating systems on a Hypervisor virtualization system in pass-through mode, wherein the mobile terminal includes at least two embedded memories, the system is stored in the embedded memories, the embedded memories are eMMC, and each system exclusively occupies one eMMC, characterized in that, The system upgrade method for multi-system mobile terminals includes: Create a partition information table corresponding to each of the embedded memories, and store the partition information in the partition information table in a structured manner. The partition information table includes a partition information table name and a partition full name that uniquely corresponds to the partition. The partition information table includes, in chronological order, the structoem_part_info structure information of all partitions of the embedded memory: partition name, partition name, partition system format, and partition length. The partition full name includes the partition name and partition name. Read the partition information table, identify the corresponding embedded memory according to the partition information table name, and partition one or more embedded memories uniformly according to the partition information table; The system receives a partition operation command, queries the partition information table according to the partition operation command to identify the embedded memory corresponding to the partition information table that needs to be operated, and performs unified operations on the partitions of one or more embedded memories. Specifically, this includes: receiving a partition name transmitted from a PC bound to the mobile terminal; traversing the partition information table according to the partition name to identify the partition information table corresponding to the partition name; determining the embedded memory that needs to be operated based on the partition information table; reading the partition information table corresponding to the embedded memory and performing operations on the partition. The system upgrade method for the multi-system mobile terminal is encapsulated as an application muti_fastboot in u-boot. muti_fastboot follows the fastboot protocol and communicates with the fastboot service on the PC. The steps for eMMC flashing and upgrading based on muti_fastboot are as follows: (1) Identify the parameters of the muti_fastboot command input at the u-boot end, determine the eMMC number to be operated on or automatically find the eMMC by partition name during operation, and save the result in the flash_type variable; (2) Select and bind the required USB OTG peripheral device, and initialize the fastboot protocol; (3) The USB enters the data listening state. When there is data, an interrupt will be generated and the data sent from the USB host will be obtained. (4) Parse the fastboot command parameters on the PC; (5) Select the eMMC to be operated on based on the value of flash_type; (6) Perform corresponding functions on the eMMC according to the functions of the fastboot command parameters on the PC.
2. The system upgrade method for multi-system mobile terminals according to claim 1, characterized in that, The step of reading the partition information table, identifying the embedded memory according to the partition information table name, and uniformly partitioning one or more embedded memories according to the partition information table includes: The command of the mobile terminal is identified, the embedded memory to be operated is determined based on the command of the mobile terminal, and the determination result is saved; Based on the judgment result, the embedded memory is directly partitioned.
3. The system upgrade method for multi-system mobile terminals according to claim 2, characterized in that, The step of reading the partition information table, identifying the embedded memory according to the partition information table name, and uniformly partitioning one or more embedded memories according to the partition information table includes: Connect to the USB host and initialize the fastboot communication protocol of the mobile terminal according to the commands of the mobile terminal; Peripherals that have entered data listening state receive partition operation commands issued by the PC. The process receives and parses the partition operation command. If a partition name is obtained, the embedded memory is identified according to the partition name, the embedded memory is partitioned, and operations are performed on the partition. If the partition name is not obtained, the process exits.
4. A system upgrade device for a multi-system mobile terminal, applied to a single machine with multiple operating systems on a Hypervisor virtualization system in pass-through mode, wherein the mobile terminal includes at least two embedded memories, the system is stored in the embedded memories, the embedded memories are eMMC, and each system exclusively occupies one eMMC, characterized in that, The system upgrade device for multi-system mobile terminals includes: A partition information table creation unit is used to create a partition information table corresponding to each of the embedded memories, and to store the partition information in the partition information table in a structured manner. The partition information table includes a partition information table name and a fully qualified name of the partition that uniquely corresponds to the partition. The partition information table includes, in chronological order, the struct oem_part_info structure information of all partitions of the embedded memory. Partition name, partition partition name, partition system format, and partition length; the full partition name includes both the partition name and the partition partition name. A partition unit is established to read the partition information table, identify the corresponding embedded memory according to the partition information table name, and partition one or more embedded memories uniformly according to the partition information table. The partition operation unit is used to receive partition operation commands, query the partition information table according to the partition operation commands, identify the embedded memory that needs to be operated corresponding to the partition information table, and uniformly operate on the partitions of one or more embedded memories. The operation partitioning unit is further configured to: receive a partition name transmitted by a PC bound to the mobile terminal; traverse the partition information table according to the partition name; identify the partition information table corresponding to the partition name; determine the embedded memory to be operated according to the partition information table; read the partition information table corresponding to the embedded memory; and perform operations on the partition. The partition creation and operation units are integrated into the application `muti_fastboot` running in u-boot. `muti_fastboot` follows the fastboot protocol and communicates with the fastboot service on the PC. It performs partitioning operations on the specified eMMC based on the `muti_fastboot` command parameters input from the u-boot end and the fastboot command parameters input from the PC. The steps for flashing and upgrading eMMC based on multi_fastboot are as follows: (1) Identify the parameters of the muti_fastboot command input at the u-boot end, determine the eMMC number to be operated on or automatically find the eMMC by partition name during operation, and save the result in the flash_type variable; (2) Select and bind the required USB OTG peripheral device, and initialize the fastboot protocol; (3) The USB enters the data listening state. When there is data, an interrupt will be generated and the data sent from the USB host will be obtained. (4) Parse the fastboot command parameters on the PC; (5) Select the eMMC to be operated on based on the value of flash_type; (6) Perform corresponding functions on the eMMC according to the functions of the fastboot command parameters on the PC.
5. The system upgrade device for a multi-system mobile terminal according to claim 4, characterized in that, The partitioning unit is also used to: identify the commands of the mobile terminal; determine the embedded memory to be operated based on the commands of the mobile terminal; and save the determination result; directly partition the embedded memory based on the determination result; connect to the USB host and initialize the fastboot communication protocol of the mobile terminal based on the commands of the mobile terminal; and obtain the partitioning operation command issued by the PC from the peripheral device that has entered the data listening state. Receive and parse the partition operation command; if a partition name is obtained, identify the embedded memory according to the partition name, partition the embedded memory, and perform operations on the partition. If the partition name is not obtained, the process will exit.
6. A system upgrade terminal for multi-system mobile terminals, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the computer program to implement the steps of the system upgrade method for a multi-system mobile terminal as described in any one of claims 1 to 3.
7. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the system upgrade method for a multi-system mobile terminal as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Supporting multiple operating system environments in computing device without contents conversion
CN106796507A
Embedded multi-system upgrading method based on Hypervisor and computer readable storage medium
CN111522569A