CN114816491B - System upgrade method, device and terminal for multi-system mobile terminal - Google Patents

System upgrade method, device and terminal for multi-system mobile terminal

Info

Publication number
CN114816491B
CN114816491B CN202110084815.2A CN202110084815A CN114816491B CN 114816491 B CN114816491 B CN 114816491B CN 202110084815 A CN202110084815 A CN 202110084815A CN 114816491 B CN114816491 B CN 114816491B
Authority
CN
China
Prior art keywords
partition
information table
mobile terminal
name
fastboot
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110084815.2A
Other languages
Chinese (zh)
Other versions
CN114816491A (en
Inventor
韦荣伟
王创乐
胡玉杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Lan You Technology Co Ltd
Original Assignee
Shenzhen Lan You 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 Shenzhen Lan You Technology Co Ltd filed Critical Shenzhen Lan You Technology Co Ltd
Priority to CN202110084815.2A priority Critical patent/CN114816491B/en
Publication of CN114816491A publication Critical patent/CN114816491A/en
Application granted granted Critical
Publication of CN114816491B publication Critical patent/CN114816491B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/654Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Landscapes

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

Abstract

本发明提供了一种用于多系统移动终端的系统升级方法、升级装置和终端,用于多系统移动终端的系统升级方法包括:创建各个内嵌式存储器对应的分区信息表,并以结构信息的方式将分区信息对应存储在分区表中,分区信息表包括分区表名及与分区唯一对应的分区全名;读取分区信息表,根据分区表名识别对应的内嵌式存储器,并按分区信息表统一对单个或多个内嵌式存储器分区;接收分区操作命令,根据分区操作命令查询分区信息表,以识别分区信息表对应需要操作的内嵌式存储器,并统一对单个或多个内嵌式存储器的分区进行操作。本发明的多系统移动终端的系统升级方法具有刷机升级过程简易、高效等特点。

The present invention provides a system upgrade method, upgrade device, and terminal for a multi-system mobile terminal. The system upgrade method for a multi-system mobile terminal includes: creating a partition information table corresponding to each embedded memory, and storing the partition information in the partition table in the form of structural information, wherein the partition information table includes a partition table name and a full partition name uniquely corresponding to the partition; reading the partition information table, identifying the corresponding embedded memory according to the partition table name, and uniformly partitioning a single or multiple embedded memories according to the partition information table; 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 the partitions of the single or multiple embedded memories. The system upgrade method for a multi-system mobile terminal of the present invention has the characteristics of a simple and efficient flash upgrade process.

Description

System upgrading method and device for multi-system mobile terminal and terminal
Technical Field
The invention relates to the technical field of communication, and mainly discloses a solution for brushing a plurality of eMMCs (embedded memories) on a host computer (PC) through a fastboot brushing mode on the basis of one-machine multi-operation system on a virtualization system Hypervisor in a pass through (passthrough) mode. And more particularly, to a system upgrade method and apparatus for a multi-system mobile terminal, and a terminal.
Background
With the rapid development of the requirements of technology and application nowadays, the requirement of realizing one-machine-multiple-system operation on an embedded system is larger and larger, and the solution of requiring one machine-multiple-screen-multiple-system on an intelligent cockpit nowadays (for safety and compliance with vehicle regulations, an instrument operates a QNX system and a central control operates an Android system) is widely applied in the future, the system can bring great test to the working efficiency of a CPU and an eMMC, the CPU can continuously promote the calculation force according to the moore law, but the eMMC can be operated under high load to meet the read-write requirements of the two systems. Therefore, a solution of the same SOC of EMMC FLASH supporting multiple operating systems each exclusive of one eMMC on the market is widely used.
Currently, on the product of a Hypervisor system running in a pass through mode, because a plurality of operating systems (mainly solving a dual system mode) are running on the same SOC, and each system is exclusive to one EMMC FLASH in order to improve efficiency, so that the multi-operating system cannot be updated by using a fastboot system-on-a-bus mode, namely, in the scheme of the existing system for updating the system by using a fastboot system-on-a-bus mode, only one EMMC FLASH system-on-a-bus updating mirror image is supported, and multiple eMMCs are not supported to be uniformly updated.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a simple system upgrading method, device and terminal for a multi-system mobile terminal, wherein unified partition table establishment, unified batch updating, independent partition updating, unified erasing partition and independent erasing partition are realized for a plurality of eMMCs through fastboot updating modes.
The technical solution for solving the above technical problems is to provide a system upgrade method for a multi-system mobile terminal, where the mobile terminal includes at least two embedded memories, the system is stored in the embedded memories, and the system upgrade method for the multi-system mobile terminal includes:
Creating a partition information table corresponding to each embedded memory, and correspondingly storing the partition information in the partition table in a structural information mode, wherein the partition information table comprises partition table names and partition full names uniquely corresponding to the partitions;
Reading the partition information table, identifying the corresponding embedded memory according to the partition table name, and uniformly partitioning a single or a plurality of embedded memories according to the partition information table;
And receiving a partition operation command, inquiring the partition information table according to the partition operation command so as to identify the embedded memories which are required to be operated and uniformly operating the partitions of the single or a plurality of embedded memories.
In the system upgrading method for the multi-system mobile terminal, the partition information table comprises struct oem _part_info structure information of all partitions of the embedded memory according to the sequence:
partition name, partition alias, partition system format and partition length, wherein the partition full name comprises partition name and partition alias.
In the system upgrading method for the multi-system mobile terminal of the present invention, the reading of the partition information table, the identifying of the embedded memory corresponding to the partition information table according to the partition table name, and the partitioning of the embedded memory includes:
Identifying a command of the mobile terminal, judging the embedded memory to be operated according to the command of the mobile terminal, and storing a judging result;
And directly partitioning the embedded memory according to the judging result.
In the system upgrading method for the multi-system mobile terminal of the present invention, the reading of the partition information table, the identifying of the embedded memory corresponding to the partition information table according to the partition table name, and the partitioning of the embedded memory includes:
Connecting to a USB host, and initializing fastboot communication protocol of the mobile terminal according to the command of the mobile terminal;
the peripheral equipment entering the interception data state acquires a partition operation command sent by a PC end;
and receiving and analyzing the partition operation command, if the partition name is acquired, identifying the embedded memory according to the partition name, partitioning the embedded memory and operating the partition, and if the partition name is not acquired, exiting the process.
In the system upgrading method for a multi-system mobile terminal of the present invention, the receiving a partition operation command, querying 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 operating the partitions of the single or multiple embedded memories includes:
Receiving the partition name transmitted by the PC terminal bound with the mobile terminal, traversing the partition information table according to the partition name, and identifying a partition information table corresponding to the partition name;
determining and judging the embedded memory needing to be operated according to the partition information table;
and reading the partition table corresponding to the embedded memory, and operating the partition table.
The invention also provides a system upgrade apparatus for a multi-system mobile terminal, the mobile terminal comprising at least two embedded memories, the system being stored in the embedded memories, characterized in that the system upgrade apparatus for a multi-system mobile terminal comprises:
The partition information table unit is used for creating partition information tables corresponding to the embedded memories and correspondingly storing the partition information in the partition tables in a structure information mode, and the partition information tables comprise partition table names and partition full names uniquely corresponding to the partitions;
The partition unit is used for reading the partition information table, identifying the corresponding embedded memories according to the partition table names, and uniformly partitioning a single embedded memory or a plurality of embedded memories according to the partition information table;
and the operation partition unit is used for receiving a partition operation command, inquiring the partition information table according to the partition operation command so as to identify the embedded memories which are required to be operated and corresponding to the partition information table, and uniformly operating the partitions of the single or multiple embedded memories.
In the system upgrading device for the multi-system mobile terminal, the partition information table comprises struct oem _part_info structure information of all partitions of the embedded memory according to the sequence:
partition name, partition alias, partition system format and partition length, wherein the partition full name comprises partition name and partition alias.
In the system upgrading device for the multi-system mobile terminal, the partition establishing unit is further used for identifying the command of the mobile terminal, judging the embedded memory to be operated according to the command of the mobile terminal, storing the judging result, directly partitioning the embedded memory according to the judging result, initializing fastboot communication protocols of the mobile terminal according to the command of the mobile terminal, connecting to a USB host, acquiring a partition operation command sent by a PC end by the peripheral equipment in a data interception state, receiving and analyzing the partition operation command, identifying the embedded memory according to the partition name if the partition name is acquired, partitioning the embedded memory and operating the partition, and exiting the process if the partition name is not acquired;
the operation partition unit is further used for receiving the partition names transmitted by the PC end bound with the mobile terminal, traversing the partition information table according to the partition names, identifying partition information tables corresponding to the partition names, determining the embedded memory to be operated according to the partition information tables, reading the partition tables corresponding to the embedded memory, and operating the partition tables.
The invention also provides another system upgrading terminal for the multi-system mobile terminal, which comprises a memory and a processor, wherein the memory stores a computer program capable of running on the processor, and the processor executes the computer program to realize the steps of the system upgrading method for the multi-system mobile terminal.
The invention also provides a computer readable storage medium, the storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the system upgrading method for the multi-system mobile terminal according to any one of the above.
In the system upgrading method, the device and the terminal for the multi-system mobile terminal, in a boot loader (u-boot) of an embedded system, the embedded memory is identified for partitioning according to the full name of the partition by establishing the partition information table, and partition operation instructions input by external equipment are received to uniformly operate the partitions of a single or a plurality of embedded memories, so that the multi-system boot upgrade is realized through a fastboot boot mode, and the operation process is simple and efficient. Meanwhile, the command parameters can be analyzed fastboot, the partition of the embedded memory can be independently operated, namely, the single eMMC updating and multi-eMMC updating requirements of the novel operating system can be met by independently supporting a certain eMMC updating and upgrading mode.
Drawings
FIG. 1 is a flow chart of a first embodiment of the present invention for a system upgrade of a multi-system mobile terminal;
FIG. 2 is a flow diagram illustration of an embedded memory partition;
FIG. 3 is a diagram of a partition information table data format;
FIG. 4 is a schematic diagram of a communication model between a u-boot terminal and a PC terminal;
FIG. 5 is a flow chart of a second embodiment of a system upgrade method for a multi-system mobile terminal of the present invention;
FIG. 6 is a flow chart of a third embodiment of a system upgrade method for a multi-system mobile terminal according to the present invention;
FIG. 7 is a schematic diagram of an embodiment of a system upgrade apparatus for a multi-system mobile terminal of the present invention;
fig. 8 is a schematic diagram of an embodiment of a system upgrade terminal for a multi-system mobile terminal of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
As shown in fig. 1, which is a flowchart of a first embodiment of a system upgrade method for a multi-system mobile terminal, the system upgrade method for a multi-system mobile terminal may be applied to an intelligent cockpit, the mobile terminal includes at least two embedded memories, the systems are stored in the embedded memories, and the system upgrade method for a multi-system mobile terminal includes:
And S11, creating a partition information table corresponding to each embedded memory, and correspondingly storing the partition information in the partition table in a mode of structural information, wherein the partition information table comprises partition table names and partition full names uniquely corresponding to the partitions.
Further, the partition information table comprises struct oem _part_info structure information of all partitions of the embedded memory in sequence, wherein the partition full name comprises a partition name and a partition alias, and the partition information table comprises all partitions of two eMMCs.
In the above step, taking as an example a mobile terminal that has been able to successfully drive two emmcs using u-boot, the two emmcs are numbered 0 (QNX system) and 1 (Android), respectively, and for example, an eMMC dev 0 or mmc dev 1 command is input to enable normal detection of the eMMC. According to the use requirements of QNX and Android systems on eMMC, partition tables are respectively built for eMMC 0 and eMMC 1, and are respectively stored in two tables of oem _part_table_0 and oem _part_table_1 in a manner of struct oem _part_info structure information. For example, oem _partition_table_0 and oem _partition_table_1 partition information table specific information is as follows:
Table-partition information table
It should be noted that when unifying the partitions to eMMC, it is necessary to ensure that all the partition full names are unique, where the partition full names represent character strings composed of partition names and partition aliases, such as system_a partition, and in the partition table, the partition names are "system", and the partition distinction names are "a", so the partition full names are "system_a".
And S12, reading the partition information table, identifying the corresponding embedded memory according to the partition table name, and uniformly partitioning a single embedded memory or a plurality of embedded memories according to the partition information table.
Accordingly, FIG. 2 is a flow chart of the partition of the embedded memory. The mobile terminal comprises two eMMC0 and eMMC 1, reads the partition information tables oem _partition_table_0 and oem _partition_table_1, automatically identifies which eMMC the partition is on according to the full name of the partition, writes the partition information table into the corresponding eMMC, partitions the eMMC, and after the partition is successful, the partition table structures of the eMMC0 and the eMMC 1 are shown in figure 3.
The method comprises the steps of judging the embedded memory to be operated according to the command of the mobile terminal, storing the judging result, and directly partitioning the embedded memory according to the judging result.
The method comprises the steps of connecting to a USB host, initializing fastboot communication protocols of the mobile terminal according to commands of the mobile terminal, enabling the peripheral device entering a data interception state to acquire partition operation commands sent by a PC end, receiving and analyzing the partition operation commands, identifying the embedded memory according to the partition names if the partition names are acquired, partitioning the embedded memory and operating the partition, and exiting the process if the partition names are not acquired.
Step S13, receiving a partition operation command, inquiring the partition information table according to the partition operation command so as to identify the embedded memories which are required to be operated and corresponding to the partition information table, and uniformly operating the partitions of the single or multiple embedded memories.
The method comprises the steps of receiving partition names transmitted by a PC (personal computer) terminal bound with a mobile terminal, traversing the partition information table according to the partition names, identifying partition information tables corresponding to the partition names, determining the embedded memory which needs to be operated according to the partition information tables, reading the partition tables corresponding to the embedded memory, and operating the partition tables.
Fig. 4 is a schematic diagram of a communication model between a u-boot terminal and a PC terminal. The software program of the invention can run in BootLoader meeting various requirements, but the implementation of the invention is mainly realized in u-boot, so muti _ fastboot exists as application software on u-boot in the example of the invention. The invention follows fastboot protocol, can manage multiple eMMCs in multiple dimensions to meet the running requirement of a novel operating system. And fastboot service at the PC end is fully compatible with conventional fastboot. The program designed by the invention realizes communication with fashboot service of the PC end by using the USB and is used as the USB device end. The muti _ fastboot communication realized by the u-boot end of the mobile terminal completely follows the standard fastboot protocol, and when the mobile terminal communicates with fastboot of the PC end, the PC end fastboot serves as a server end, and the muti _ fastboot of the u-boot end serves as a client end.
In the process of updating the flash, muti _ fastboot can support only one eMMC (for example, only eMMC 0 is operated, command: muti _ fastboot mmc 0), and can also support 2 emmcs at the same time, and in the process of specific flash, the number corresponding to the eMMC is automatically found according to the partition name, and then the corresponding eMMC is operated. Taking the u-boot end brush mode including eMMC 0 and eMMC 01 as an example, the command is exemplified as follows:
1. Single brushing machine eMMC 0
(1) U-boot end command:
muti_fastboot mmc 0
(2) PC side command:
Brushing machines according to the partition:
fastboot flash{partition}{image_file}
Examples of commands are as follows:
fastboot flash dos dos.img
fastboot flash qnxdisk qnxdata.img
erasure of partitions:
fastboot erase{partition}
Examples of commands are as follows:
fastboot erase dos
fastboot erase qnxdisk
Formatting:
Formatting a partition:
fastboot format{partition}
Examples of commands are as follows:
fastboot format dos
global formatting, reestablishing the partition table:
fastboot oem format
2. Single brushing machine eMMC 1
(1) U-boot end command:
muti_fastboot mmc 1
(2) PC side command:
Brushing machines according to the partition:
fastboot flash{partition}{image_file}
Examples of commands are as follows:
fastboot flash dtb dtb.img
fastboot flash dtbo dtbo.img
fastboot flash boot boot.img
fastboot flash metadata metadata.img
fastboot flash system system.img
fastboot flash vendor vendor.img
fastboot flash product product.img
erasure of partitions:
fastboot erase{partition}
Examples of commands are as follows:
fastboot erase misc
fastboot erase pst
fastboot erase vbmeta
fastboot erase dtb
fastboot erase dtbo
fastboot erase boot
fastboot erase metadata
fastboot erase system
fastboot erase vendor
fastboot erase qnxdisk
fastboot erase product
fastboot erase userdata
Formatting:
Formatting a partition:
fastboot format{partition}
fastboot format userdata
global formatting, reestablishing the partition table:
fastboot oem format
It should be noted that for a system employing a/B partitioning, muti _ fastboot is only flushed to one partition in a/B, as the a/B partitioning is mainly used for OTA upgrades, etc., and this option may be set in the implementation of muti _ fastboot. That is, assuming that the system boot is set to use the A partition, when the PC side executes the command "fastboot FLASH SYSTEM system. Img" to flush, only the system_a partition is flushed, and the system_b partition is disregarded.
3. Automatic brushing machine according to subareas
1) U-boot end command:
muti_fastboot mmc
(2) PC side command:
And the PC end command is completely the same as the commands in the commands 1 and 2, after the commands are executed, the u-boot end automatically installs and transmits the past partition name to search the number of the eMMC, and then the corresponding eMMC partition is operated.
PC end fastboot public instruction
Loading kernel operation according to u-boot parameters:
fastboot boot
Restarting:
fastboot reboot
fastboot reboot bootloader
Reading version information:
fastboot getver:version
as known from the above upgrade of the communication brush machine matched with muti _ fastboot of the PC end fastboot and the u-boot end, the embodiment completely follows fastboot protocol standard, mainly performs unified management of synchronous operation on eMMC 0 and eMMC 1, and reduces the differentiation of use to the greatest extent, so that the use of users is simpler and more convenient.
As shown in fig. 5, a second embodiment of a system upgrade method for a multi-system mobile terminal according to the present invention is provided, and the preconditions of the second embodiment include:
(1) The system used by the mobile terminal of the embodiment can normally operate multiple systems, and each system uses one eMMC exclusively;
(2) The u-boot used in this embodiment has successfully driven two pieces of eMMC (embedded memory), and the two pieces of eMMC are numbered 0 (QNX system) and 1 (Android), respectively, and commands such as input "mmc dev 0" or "mmc dev 1" are capable of normally detecting eMMC.
(3) The u-boot used in this embodiment already supports the USB OTG functionality.
(4) The u-boot used by the invention already supports updating the Android system for the eMMC 1.
The steps of the continuous operation flow after the eMMC partitioning are as follows:
(1) Acquiring a transferred partition name Temp-name from the peripheral device;
(2) Traversing partition information tables oem _partition_table_0 and oem _partition_table_1, judging partition information tables corresponding to partition names, and ending the traversal if the partition information tables corresponding to the partition names are not found;
(3) Identifying a partition information table, and automatically identifying which eMMC the partition is on according to the name of the partition table;
(4) And reading a partition information table in the corresponding eMMC, and then managing/operating the corresponding eMMC partition.
As shown in fig. 6, which is a third embodiment of the system upgrade method for a multi-system mobile terminal of the present invention, it should be noted that the preconditions of the third embodiment include:
(1) The system used by the mobile terminal can normally run a plurality of systems, and each system exclusively uses one eMMC;
(2) The u-boot used has successfully driven two pieces of eMMC (embedded memory), and the two pieces of eMMC are numbered 0 (QNX system) and 1 (Android), respectively, and commands such as input of "mmc dev 0" or "mmc dev 1" can normally detect eMMC.
(3) The u-boot used already supports the USB OTG functionality.
(4) The u-boot used already supports upgrading the Android system for the eMMC 1 brush engine.
The steps for carrying out eMMC brush machine upgrading based on muti _ fastboot are as follows:
(1) And identifying muti _ fastboot command parameters input at the u-boot end, judging whether the eMMC number needs to be operated or automatically searching the eMMC according to the partition name during operation, and storing the result in a flash_type variable.
(2) Select and bind the USB OTG peripheral device that is needed to be used and initialize fastboot protocols.
(3) The USB enters a state of listening to the data, and when the data is available, an interrupt is generated, and the data sent from the USB host is acquired.
(4) And analyzing command parameters of the PC end fastboot, such as flash/erase/getvar/boot/reboot/oem and the like.
(5) And selecting the eMMC to be operated according to the value of the flash_type. When flash_type=0, eMMC 0 is directly and independently operated, when flash_type=1, eMMC 1 is directly and independently operated, when flash_type=2 or other values, which eMMC is identified according to the partition name carried in the received PC side fastboot parameter, then the corresponding eMMC is operated, if the command parameter without the partition name is, for example oem, formatting operation is directly performed on both emmcs.
(6) And performing corresponding function operation on the eMMC according to the function of the PC end fastboot command parameter flash/erase/getvar/boot/reboot/oem, wherein for example, flash indicates that the mirror image is written into the eMMC, and erase indicates that a certain partition or all partitions of the eMMC are erased.
The invention provides a corresponding system upgrading device for a multi-system mobile terminal, which is applied to the mobile terminal, wherein the mobile terminal comprises at least two embedded memories, the operating systems are stored in the embedded memories, the upgrading device is a functional module of a u-boot, the design of muti _ fastboot programs is mainly finished on the u-boot, and the muti _ fastboot programs are also operated on the u-boot. As shown in fig. 7, the upgrade apparatus includes a create partition information table unit 71, a create partition unit 72, an operate partition unit 73:
A partition information table creating unit 71, configured to create a partition information table corresponding to each embedded memory, and store the partition information in the partition table in a corresponding manner in a structure information manner, where the partition information table includes a partition table name and a partition full name uniquely corresponding to the partition;
Establishing a partition unit 72, configured to read the partition information table, identify the corresponding embedded memories according to the partition table names, and partition a single or multiple embedded memories according to the partition information table;
and an operation partition unit 73, configured to receive a partition operation command, query the partition information table according to the partition operation command, identify the embedded memory that needs to be operated corresponding to the partition information table, and operate the partitions of the single or multiple embedded memories in a unified manner.
The partition establishing unit 72 is further configured to identify a command of the mobile terminal, determine the embedded memory to be operated according to the command of the mobile terminal, and store a determination result, directly partition the embedded memory according to the determination result, initialize fastboot communication protocols of the mobile terminal according to the command of the mobile terminal, acquire a partition operation command sent by a PC end from the peripheral device that enters a listening data state, receive and parse the partition operation command, identify the embedded memory according to the partition name if the partition name is acquired, partition the embedded memory and perform partition operation, and exit the process if the partition full name is not acquired;
Specifically, the operation partition unit 73 is further configured to receive the partition name transferred from the PC terminal bound to the mobile terminal, traverse the partition information table according to the partition name, identify a 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 the partition table.
The invention provides a corresponding system upgrade terminal for a multi-system mobile terminal, as shown in fig. 8, comprising a memory 801 and a processor 802, wherein the memory 801 stores a computer program capable of running on the processor 802, and the processor 802 implements the steps of the first embodiment of the system upgrade method for the multi-system mobile terminal when executing the computer program.
The present invention provides a computer readable storage medium having stored thereon 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.
According to the mobile terminal, the embedded memory in the mobile terminal is partitioned and read-write operation is performed on the partition by identifying the partition operation instruction sent by the peripheral equipment (PC end), so that unified partition and machine brushing of multiple operating systems of the mobile terminal are realized, and the machine brushing process is simple and efficient. Meanwhile, the command parameters can be analyzed fastboot, the partitions of the embedded memory can be independently operated, namely, the updating mode of a certain embedded memory can be independently supported, and the single eMMC updating and multi-eMMC updating requirements of the operation of the novel operating system can be met.
The present invention is not limited to the above-mentioned embodiments, and any changes or substitutions that can be easily understood by those skilled in the art within the technical scope of the present invention are intended to be included in the scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims (7)

1.一种用于多系统移动终端的系统升级方法,应用于直通模式的虚拟化系统Hypervisor上的一机多操作系统,所述移动终端包括至少两个内嵌式存储器,所述系统存储在所述内嵌式存储器中,所述内嵌式存储器为eMMC,每一个所述系统独占一颗eMMC,其特征在于,所述用于多系统移动终端的系统升级方法包括:1. A system upgrade method for a multi-system mobile terminal, applied to a multi-operating system on a virtualization system hypervisor in pass-through mode, wherein the mobile terminal includes at least two embedded memories, the systems are stored in the embedded memories, the embedded memories are eMMCs, and each system occupies an exclusive eMMC. The system upgrade method for a multi-system mobile terminal comprises: 创建各个所述内嵌式存储器对应的分区信息表,并以结构信息的方式将所述分区信息对应存储在所述分区信息表中,所述分区信息表包括分区信息表名及与所述分区唯一对应的分区全名;所述分区信息表中,按先后顺序包括所述内嵌式存储器的所有分区的structoem_part_info结构信息:分区名、分区别名、分区系统格式和分区长度;所述分区全名包括分区名和分区别名;Creating a partition information table corresponding to each embedded memory and storing the partition information in the partition information table in the form of structural information, wherein the partition information table includes a partition information table name and a partition full name uniquely corresponding to the partition; the partition information table includes, in order, structoem_part_info structural information of all partitions of the embedded memory: partition name, partition alias, partition system format, and partition length; the partition full name includes the partition name and partition alias; 读取所述分区信息表,根据所述分区信息表名识别对应的所述内嵌式存储器,并按所述分区信息表统一对单个或多个内嵌式存储器分区;Reading the partition information table, identifying the corresponding embedded memory according to the partition information table name, and uniformly partitioning the single or multiple embedded memories according to the partition information table; 接收分区操作命令,根据所述分区操作命令查询所述分区信息表,以识别所述分区信息表对应需要操作的所述内嵌式存储器,并统一对单个或多个所述内嵌式存储器的分区进行操作,具体包括:接收与所述移动终端绑定的PC端传递的分区名,根据所述分区名遍历所述分区信息表,识别所述分区名对应的分区信息表;根据所述分区信息表确定判断需要操作的所述内嵌式存储器;读取所述内嵌式存储器对应的分区信息表,并对分区进行操作;Receiving a partition operation command, querying 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 operating a single or multiple partitions of the embedded memory, specifically comprising: receiving a partition name transmitted by a PC terminal 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 that needs to be operated according to the partition information table; reading the partition information table corresponding to the embedded memory, and operating the partition; 所述多系统移动终端的系统升级方法被封装为u-boot中的应用程序muti_fastboot,muti_fastboot遵循fastboot协议,与PC端的fashboot service实现通信,基于muti_fastboot进行eMMC刷机升级的步骤为:The system upgrade method of the multi-system mobile terminal is encapsulated as the application muti_fastboot in u-boot. muti_fastboot follows the fastboot protocol and communicates with the flashboot service on the PC. The steps of performing eMMC flash upgrade based on muti_fastboot are as follows: (1)识别在u-boot端输入的muti_fastboot命令参数,判断需要操作的eMMC编号或者操作时按分区名自动寻找eMMC,并将结果保存在flash_type变量中;(1) Identify the muti_fastboot command parameters entered on the u-boot side, determine the eMMC number to be operated or automatically search for the eMMC by partition name during operation, and save the result in the flash_type variable; (2)选择并绑定所需要使用的USB OTG外围设备,并初始化fastboot协议;(2) Select and bind the required USB OTG peripheral device and initialize the fastboot protocol; (3)USB进入侦听数据的状态,有数据时将产生中断,并获取从USB host发来的数据;(3) The USB enters the state of listening for data. When there is data, an interrupt will be generated and the data sent from the USB host will be obtained; (4)解析PC端fastboot命令参数;(4) Parsing the fastboot command parameters on the PC; (5)根据flash_type的取值选择要操作的eMMC;(5) Select the eMMC to be operated according to the value of flash_type; (6)根据PC端fastboot命令参数的功能来对eMMC进行对应功能操作。(6) Perform corresponding functional operations on the eMMC according to the functions of the fastboot command parameters on the PC. 2.根据权利要求1所述的用于多系统移动终端的系统升级方法,其特征在于,所述读取所述分区信息表,根据所述分区信息表名识别所述内嵌式存储器,并按所述分区信息表统一对单个或多个内嵌式存储器分区包括:2. The system upgrade method for a multi-system mobile terminal according to claim 1, wherein the reading of the partition information table, identifying the embedded memory according to the partition information table name, and uniformly partitioning the single or multiple embedded memories according to the partition information table comprises: 识别所述移动终端的命令,根据所述移动终端的命令判断需要操作的所述内嵌式存储器,并保存判断结果;Identifying a command from the mobile terminal, determining the embedded memory to be operated according to the command from the mobile terminal, and storing the determination result; 根据所述判断结果,对所述内嵌式存储器直接分区。The embedded memory is directly partitioned according to the judgment result. 3.根据权利要求2所述的用于多系统移动终端的系统升级方法,其特征在于,所述读取所述分区信息表,根据所述分区信息表名识别所述内嵌式存储器,并按所述分区信息表统一对单个或多个内嵌式存储器分区包括:3. The system upgrade method for a multi-system mobile terminal according to claim 2, wherein the reading of the partition information table, identifying the embedded memory according to the partition information table name, and uniformly partitioning the single or multiple embedded memories according to the partition information table comprises: 连接到USB主机,并根据所述移动终端的命令初始化所述移动终端的fastboot通信协议;Connecting to a USB host and initializing the fastboot communication protocol of the mobile terminal according to a command of the mobile terminal; 进入侦听数据状态的外设获取PC端发出的分区操作命令;The peripheral device that enters the data listening state obtains the partition operation command sent by the PC; 接收并解析所述分区操作命令,若获取到分区名,按所述分区名识别所述内嵌式存储器,对所述内嵌式存储器进行分区并对分区进行操作;若未获取到所述分区名,则退出流程。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 operate the partition; if the partition name is not obtained, exit the process. 4.一种用于多系统移动终端的系统升级装置,应用于直通模式的虚拟化系统Hypervisor上的一机多操作系统,所述移动终端包括至少两个内嵌式存储器,所述系统存储在所述内嵌式存储器中,所述内嵌式存储器为eMMC,每一个所述系统独占一颗eMMC,其特征在于,所述用于多系统移动终端的系统升级装置包括:4. A system upgrade device for a multi-system mobile terminal, applied to a single machine with multiple operating systems on a virtualization system hypervisor in pass-through mode, wherein the mobile terminal includes at least two embedded memories, the systems are stored in the embedded memories, the embedded memories are eMMCs, and each system occupies an exclusive eMMC. The system upgrade device for a multi-system mobile terminal comprises: 创建分区信息表单元,用于创建各个所述内嵌式存储器对应的分区信息表,并以结构信息的方式将所述分区信息对应存储在所述分区信息表中,所述分区信息表包括分区信息表名及与所述分区唯一对应的分区全名;所述分区信息表中,按先后顺序包括所述内嵌式存储器的所有分区的struct oem_part_info结构信息:A partition information table creation unit is configured to create a partition information table corresponding to each embedded memory and store the partition information in the partition information table in the form of structural information. The partition information table includes a partition information table name and a full name of a partition uniquely corresponding to the partition. The partition information table includes, in order, struct oem_part_info structure information of all partitions of the embedded memory: 分区名、分区别名、分区系统格式和分区长度;所述分区全名包括分区名和分区别名;Partition name, partition alias, partition system format and partition length; the full partition name includes the partition name and partition alias; 建立分区单元,用于读取所述分区信息表,根据所述分区信息表名识别对应的所述内嵌式存储器,并按所述分区信息表统一对单个或多个内嵌式存储器分区;Establishing a partitioning unit, configured to read the partition information table, identify the corresponding embedded memory according to the partition information table name, and uniformly partition the single or multiple embedded memories according to the partition information table; 操作分区单元,用于接收分区操作命令,根据所述分区操作命令查询所述分区信息表,以识别所述分区信息表对应需要操作的所述内嵌式存储器,并统一对单个或多个所述内嵌式存储器的分区进行操作;an operation partition unit, configured to receive a partition operation command, query the partition information table according to the partition operation command, identify the embedded memory that needs to be operated corresponding to the partition information table, and uniformly operate a single partition or multiple partitions of the embedded memory; 所述操作分区单元还用于,接收与所述移动终端绑定的PC端传递的分区名,根据所述分区名遍历所述分区信息表,识别所述分区名对应的分区信息表;根据所述分区信息表确定判断需要操作的所述内嵌式存储器;读取所述内嵌式存储器对应的分区信息表,并对分区进行操作;The operation partition 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 that needs to be operated according to the partition information table; read the partition information table corresponding to the embedded memory, and operate the partition; 所述建立分区单元和操作分区单元被集成在运行于u-boot中的应用程序muti_fastboot中,muti_fastboot遵循fastboot协议,与PC端的fashboot service实现通信,根据u-boot端输入的muti_fastboot命令参数和PC端输入的fastboot命令参数实现对指定eMMC的分区操作;其中:The partition establishment unit and the partition operation unit are integrated into the muti_fastboot application running in u-boot. muti_fastboot follows the fastboot protocol and communicates with the flashboot service on the PC side. It implements the partition operation of the specified eMMC according to the muti_fastboot command parameters input by the u-boot side and the fastboot command parameters input by the PC side. 基于muti_fastboot进行eMMC刷机升级的步骤为:The steps for upgrading the eMMC flashing system based on muti_fastboot are as follows: (1)识别在u-boot端输入的muti_fastboot命令参数,判断需要操作的eMMC编号或者操作时按分区名自动寻找eMMC,并将结果保存在flash_type变量中;(1) Identify the muti_fastboot command parameters entered on the u-boot side, determine the eMMC number to be operated or automatically search for the eMMC by partition name during operation, and save the result in the flash_type variable; (2)选择并绑定所需要使用的USB OTG外围设备,并初始化fastboot协议;(2) Select and bind the required USB OTG peripheral device and initialize the fastboot protocol; (3)USB进入侦听数据的状态,有数据时将产生中断,并获取从USB host发来的数据;(3) The USB enters the state of listening for data. When there is data, an interrupt will be generated and the data sent from the USB host will be obtained; (4)解析PC端fastboot命令参数;(4) Parsing the fastboot command parameters on the PC; (5)根据flash_type的取值选择要操作的eMMC;(5) Select the eMMC to be operated according to the value of flash_type; (6)根据PC端fastboot命令参数的功能来对eMMC进行对应功能操作。(6) Perform corresponding functional operations on the eMMC according to the functions of the fastboot command parameters on the PC. 5.根据权利要求4所述的用于多系统移动终端的系统升级装置,其特征在于,所述建立分区单元还用于,识别所述移动终端的命令,根据所述移动终端的命令判断需要操作的所述内嵌式存储器,并保存判断结果;根据所述判断结果,对所述内嵌式存储器直接分区;连接到USB主机,并根据所述移动终端的命令初始化所述移动终端的fastboot通信协议;进入侦听数据状态的外设获取PC端发出的分区操作命令;接收并解析所述分区操作命令,若获取到分区名,按所述分区名识别所述内嵌式存储器,对所述内嵌式存储器进行分区并对分区进行操作;若未获取到所述分区名,则退出流程。5. The system upgrade device for a multi-system mobile terminal according to claim 4 is characterized in that the partition establishment unit is also used to identify the command of the mobile terminal, determine the embedded memory that needs to be operated according to the command of the mobile terminal, and save the judgment result; directly partition the embedded memory according to the judgment result; connect to the 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 partition operation command issued by the PC; receives and parses the partition operation command, if the partition name is obtained, identifies the embedded memory according to the partition name, partitions the embedded memory and operates the partition; if the partition name is not obtained, exits the process. 6.一种用于多系统移动终端的系统升级终端,其特征在于,包括存储器和处理器,所述存储器中存储有可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1至3中任一项所述用于多系统移动终端的系统升级方法的步骤。6. A system upgrade terminal for a multi-system mobile terminal, characterized in that it includes a memory and a processor, the memory storing a computer program that can be run on the processor, and the processor implementing the steps of the system upgrade method for a multi-system mobile terminal as described in any one of claims 1 to 3 when executing the computer program. 7.一种计算机可读存储介质,所述存储介质上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时,实现如权利要求1至3中任一项所述用于多系统移动终端的系统升级方法的步骤。7. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the system upgrade method for a multi-system mobile terminal according to any one of claims 1 to 3 are implemented.
CN202110084815.2A 2021-01-21 2021-01-21 System upgrade method, device and terminal for multi-system mobile terminal Active CN114816491B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110084815.2A CN114816491B (en) 2021-01-21 2021-01-21 System upgrade method, device and terminal for multi-system mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110084815.2A CN114816491B (en) 2021-01-21 2021-01-21 System upgrade method, device and terminal for multi-system mobile terminal

Publications (2)

Publication Number Publication Date
CN114816491A CN114816491A (en) 2022-07-29
CN114816491B true CN114816491B (en) 2025-10-28

Family

ID=82524721

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110084815.2A Active CN114816491B (en) 2021-01-21 2021-01-21 System upgrade method, device and terminal for multi-system mobile terminal

Country Status (1)

Country Link
CN (1) CN114816491B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116679946B (en) * 2022-11-22 2024-07-23 荣耀终端有限公司 A firmware upgrade method and terminal
CN116450184B (en) * 2023-06-09 2023-10-13 联宝(合肥)电子科技有限公司 System upgrading method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106796507A (en) * 2014-09-18 2017-05-31 英特尔公司 The multiple operating system environment in computing device is supported without Content Transformation
CN111522569A (en) * 2020-05-09 2020-08-11 中瓴智行(成都)科技有限公司 Hypervisor-based embedded multi-system upgrading method and computer-readable storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103559054B (en) * 2013-10-30 2017-10-10 华为终端有限公司 Realization, delet method and the device of intelligent terminal multi-operation system
CN107622204A (en) * 2017-09-26 2018-01-23 北京计算机技术及应用研究所 A storage and start-up method of a domestic tablet dual system based on a domestic operating system
US10754580B2 (en) * 2017-10-23 2020-08-25 Micron Technology, Inc. Virtual partition management in a memory device
CN111104148B (en) * 2019-12-26 2023-06-16 红石阳光(北京)科技股份有限公司 Upgrading method and system for chip platform integrated with Linux and android systems and readable storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106796507A (en) * 2014-09-18 2017-05-31 英特尔公司 The multiple operating system environment in computing device is supported without Content Transformation
CN111522569A (en) * 2020-05-09 2020-08-11 中瓴智行(成都)科技有限公司 Hypervisor-based embedded multi-system upgrading method and computer-readable storage medium

Also Published As

Publication number Publication date
CN114816491A (en) 2022-07-29

Similar Documents

Publication Publication Date Title
US8296521B2 (en) Method of configuring non-volatile memory for a hybrid disk drive
US9301164B2 (en) Method, system, and terminal for performing system update between mobile communication terminals
CN103365696B (en) BIOS image file acquisition methods and device
CN113835644B (en) Complete machine migration method, device, equipment and storage medium
CN101110039B (en) Terminal unit self-installing and self-starting system and method thereof
CN101763279A (en) BootLoader architectural design method
US20130339718A1 (en) Information processing device and method for controlling information processing device
US8677084B2 (en) Method of configuring non-volatile memory for a hybrid disk drive
CN113900693A (en) Firmware upgrading method, device and system, electronic equipment and storage medium
CN113849272A (en) Method and device for adding GPU (graphics processing Unit) resources in virtual machine
CN114816491B (en) System upgrade method, device and terminal for multi-system mobile terminal
CN102073524B (en) A kind of method of wireless communication terminal and self-starting thereof
CN104407890A (en) Method for starting Android system from OTG (On-The-Go) equipment
JP2013513874A (en) Data card upgrade method and device
CN112162794A (en) Single board starting method, device, single board and network equipment
US20070168905A1 (en) Networked linux machine and windows software development system
CN120492043A (en) Firmware function customization method and device, electronic equipment and storage medium
CN112667544A (en) Method, device, system and medium for controlling mainboard slot enabling
JP2002366501A (en) Peripheral device, computer system and installer program
CN115033299B (en) Method and terminal for starting production test system
CN117393029A (en) A RAID card testing method and test server
CN117766011A (en) Automatic testing method and system for compatibility of solid state disk and external storage device
JP3693240B2 (en) Method and system for executing adapter configuration routines utilizing different operating modes
CN115794180A (en) A bootloader upgrade method and system
CN112148376A (en) Terminal starting method and device

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
GR01 Patent grant
GR01 Patent grant