CN111124435A - Memory partition capacity adjusting method and device - Google Patents

Memory partition capacity adjusting method and device Download PDF

Info

Publication number
CN111124435A
CN111124435A CN201911050766.XA CN201911050766A CN111124435A CN 111124435 A CN111124435 A CN 111124435A CN 201911050766 A CN201911050766 A CN 201911050766A CN 111124435 A CN111124435 A CN 111124435A
Authority
CN
China
Prior art keywords
burning
partition
memory
module
capacity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911050766.XA
Other languages
Chinese (zh)
Inventor
孟繁旭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huizhou Foryou General Electronics Co Ltd
Original Assignee
Huizhou Foryou General Electronics 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 Huizhou Foryou General Electronics Co Ltd filed Critical Huizhou Foryou General Electronics Co Ltd
Priority to CN201911050766.XA priority Critical patent/CN111124435A/en
Publication of CN111124435A publication Critical patent/CN111124435A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System (AREA)

Abstract

The invention provides a method and a device for adjusting the partition capacity of a memory, comprising the following steps: s1, setting the master memory partition as a system firmware partition and a user data partition; s2, setting a burning state identifier in the system firmware partition; s3, generating a burning mirror image by the system firmware program, and setting the burning state identifier to be in an effective state in the burning mirror image; s4, burning the burning mirror image into a target memory; s5, reading the state of the burning state identifier in the target memory; s6, judging whether the state of the burning state identifier is an effective state, if so, entering the next step, otherwise, entering the step S9; s7, acquiring the total capacity of the target memory, and reconfiguring the capacity of the user data partition of the target memory; s8, setting the burning state identification in the target memory to be in an invalid state; and S9, starting the system according to the normal file loading flow. The invention realizes the automatic adjustment of the partition capacity of the memory.

Description

Memory partition capacity adjusting method and device
Technical Field
The present invention relates to the field of memory technologies, and in particular, to a method and an apparatus for adjusting partition capacity of a memory.
Background
When the vehicle-mounted information terminal is produced, the system program needs to be burned into the memory in batches, wherein the memory which is widely applied is the eMMC, and the eMMC for storing the system program is related to whether the vehicle-mounted information terminal can normally run.
The system program burning device mainly comprises a computer control end and a burner, and the computer control end and the burner realize the receiving and sending of commands through bus communication. At present, a system program burning method is to completely copy all data in the existing vehicle-mounted information terminal eMMC (i.e., a master eMMC) to manufacture a burning mirror image, and then burn the burning mirror image into a target eMMC in batch by using a system program burning device. Aiming at target eMMC with different capacities, a one-to-one mode is adopted, namely, the burning mirror image and the target eMMC are uniquely matched. However, since the configuration of each vehicle-mounted information terminal is different, the target eMMC capacity is also different, and thus the same basic burn image needs to be properly modified to adapt to the target eMMC with different capacity, which results in that a large amount of burn image switching work needs to be performed by a burn worker, the production efficiency is reduced, adaptation errors are easily caused, and the vehicle-mounted information terminal cannot be normally started.
Therefore, the prior art is in need of further improvement.
Disclosure of Invention
The invention provides a method and a device for adjusting the partition capacity of a memory, aiming at overcoming the defects in the prior art and realizing the automatic adjustment of the partition capacity of the memory.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
one aspect of the present invention provides a method for adjusting partition capacity of a memory, including:
s1, setting a master memory partition into a system firmware partition and a user data partition, wherein the system firmware partition is located at the front end address of the master memory, and the user data partition is located at the tail end address of the master memory;
s2, setting a burning state identifier in the system firmware partition, wherein the burning state identifier is used for identifying whether the target burning memory is started for the first time after burning;
s3, generating a burning mirror image by the system firmware program, and setting the burning state identifier to be in an effective state in the burning mirror image;
s4, burning the burning mirror image into a target memory;
s5, after the system is powered on, reading the state of the burning state identifier in the target memory;
s6, judging whether the state of the burning state identifier is an effective state, if so, entering the next step, otherwise, entering the step S9;
s7, acquiring the total capacity of the target memory, and reconfiguring the capacity of the user data partition of the target memory;
s8, setting the burning state identification in the target memory to be in an invalid state;
and S9, starting the system according to the normal file loading flow.
Further, after the step S7, the method further includes:
and step S71, formatting the user data partition into an ext4 format.
Specifically, the burning state identifier is arranged at the rear end of the system firmware partition.
Specifically, the capacity of the user data partition is located in the last partition of the target memory.
Specifically, the capacity of the user data partition is configured by a GPT table.
Specifically, the capacity of the user data partition is the difference between the total capacity of the target memory and the size of the system firmware.
The invention provides a device for adjusting the partition capacity of a memory, which comprises a memory module, a mirror image generation module, a mirror image burning module, a burning state read-write module, a judgment module, a capacity acquisition module and a capacity configuration module, wherein the memory module is used for storing a plurality of memory partitions;
the memory module is connected with the mirror image burning module, the burning state reading and writing module and the capacity configuration module, the judging module is connected with the burning state reading and writing module and the capacity acquisition module, the capacity acquisition module is also connected with the capacity configuration module, the capacity configuration module is also connected with the burning state reading and writing module, and the mirror image generation module is also connected with the mirror image burning module;
the memory module is used for storing system firmware data and user data written by the burning mirror image;
the mirror image generation module is used for generating a burning mirror image for the partitioned mother plate memory;
the mirror image burning module is used for burning the burning mirror image generated by the mirror image generating module into a target memory;
the burning state read-write module is used for reading and writing the state of the burning state identifier in the target memory;
the judging module is used for judging whether the burning state identifier is effective or not;
the capacity acquisition module is used for acquiring the capacity of the target memory;
and the capacity configuration module is used for configuring the capacity of the user data partition of the target memory.
Further, the memory partition capacity adjusting apparatus further includes a formatting module, configured to format the user data partition into an ext4 format.
Specifically, the mirror image generation module comprises a partition submodule and a burning state identifier setting submodule, wherein the partition submodule is used for partitioning the master memory partition according to a preset rule; the burning state identification setting submodule is used for setting the burning state identification of the system firmware partition.
Specifically, the memory module is an eMMC.
The invention has the beneficial effects that: according to the method, the master memory is partitioned according to the preset rule, the burning state identifier is set in the system firmware partition, and when the system is powered on, whether the capacity of the user data partition of the target memory is reconfigured is determined according to the state of the burning state identifier in the target memory, so that the automatic adjustment of the partition capacity of the memory is realized.
Drawings
FIG. 1 is a flow chart of a memory partition capacity adjustment method of the present invention;
FIG. 2 is a schematic diagram of the structure of the memory partition capacity adjusting apparatus of the present invention;
FIG. 3 is a schematic diagram of another structure of the memory partition capacity adjustment apparatus of the present invention.
Detailed Description
The embodiments of the present invention will be described in detail with reference to the accompanying drawings, which are for reference and illustrative purposes only and are not intended to limit the scope of the invention.
An embodiment of the present invention provides a method for adjusting a capacity of a memory partition, including:
s1, setting the master memory partition as a system firmware partition and a user data partition, wherein the system firmware partition is located at the front end address of the master memory, and the user data partition is located at the tail end address of the master memory.
In specific implementation, when partition arrangement is set for the master memory (e.g., eMMC), a system firmware (e.g., uboot, kernel, system, etc.) partition is placed at a front address of the master memory, and a user data partition, in which data is written only when a user uses the system data partition, is placed at a rear address of the master memory.
S2, setting a burning state identifier in the system firmware partition, wherein the burning state identifier is used for identifying whether the target burning memory is started for the first time after burning.
In specific implementation, the burning state identifier is arranged at the rear end of the system firmware partition.
S3, generating a burning mirror image by the system firmware program, and setting the burning state identification to be a valid state in the burning mirror image.
In this embodiment, the valid state is 1, which indicates that the target flash memory is first booted after being burned.
And S4, burning the burning mirror image into a target memory.
After the burning mirror image is burnt into the target memory, the target memory has a data structure which is the same as that of the burning mirror image, namely the target memory is divided into a system firmware partition and a user data partition, the system firmware partition is located at the front end address of the target memory, and the user data partition is located at the tail end address of the target memory.
And S5, after the system is powered on, reading the state of the burning state identifier in the target memory.
And S6, judging whether the state of the burning state identifier is an effective state, if so, entering the next step, and if not, entering the step S9.
S7, acquiring the total capacity of the target memory, and reconfiguring the capacity of the user data partition of the target memory.
In this embodiment, the capacity of the user data partition is located in the last partition of the target memory.
In this embodiment, the capacity of the user data partition is configured by a GPT table.
In this embodiment, the capacity of the user data partition is the difference between the total capacity of the target memory and the size of the system firmware.
And S8, setting the burning state identification in the target memory to be in an invalid state.
In this embodiment, the invalid state is 0, which indicates that the target memory is not booted for the first time after being burned, and it is not necessary to perform automatic adjustment on the size of the user data partition of the target memory.
And S9, starting the system according to the normal file loading flow.
In another embodiment of the present invention, after the step S7, the method further includes:
and step S71, formatting the user data partition into an ext4 format.
As shown in fig. 2, another aspect of the present invention provides a device for adjusting partition capacity of a memory, including a memory module, a mirror image generation module, a mirror image burning module, a burning state reading/writing module, a judgment module, a capacity acquisition module, and a capacity allocation module;
the memory module is connected with the mirror image burning module, the burning state reading and writing module and the capacity configuration module, the judging module is connected with the burning state reading and writing module and the capacity acquisition module, the capacity acquisition module is also connected with the capacity configuration module, the capacity configuration module is also connected with the burning state reading and writing module, and the mirror image generation module is also connected with the mirror image burning module;
the memory module is used for storing system firmware data and user data written by the burning mirror image;
the mirror image generation module is used for generating a burning mirror image for the partitioned mother plate memory;
the mirror image burning module is used for burning the burning mirror image generated by the mirror image generating module into a target memory;
the burning state read-write module is used for reading and writing the state of the burning state identifier in the target memory;
the judging module is used for judging whether the burning state identifier is effective or not;
the capacity acquisition module is used for acquiring the capacity of the target memory;
and the capacity configuration module is used for configuring the capacity of the user data partition of the target memory.
The mirror image generation module comprises a partition submodule and a burning state identifier setting submodule, and the partition submodule is used for partitioning the master memory partition according to a preset rule; the burning state identification setting submodule is used for setting the burning state identification of the system firmware partition.
In another embodiment of the present invention, as shown in fig. 3, the memory partition capacity adjusting apparatus further comprises a formatting module for formatting the user data partition into an ext4 format.
The working process of the memory partition capacity regulating device comprises the following steps:
firstly, partitioning a master memory partition according to a preset rule through a partition submodule of the mirror image generation module, specifically: setting the master memory as a system firmware partition and a user data partition, wherein the system firmware partition is positioned at the front end address of the master memory, and the user data partition is positioned at the tail end address of the master memory; the method comprises the steps of setting a burning state identifier of a system firmware partition through a burning state identifier setting submodule, then generating a burning mirror image of a system firmware program, and burning the burning mirror image into a target memory through a mirror image burning module.
After the system is powered on, the burning state read-write module reads the state of the burning state identifier in the target memory and sends the state of the burning state identifier to the judging module, when the judging module judges that the state of the burning state identifier is an effective state, the capacity obtaining module obtains the total capacity of the target memory, and the capacity configuring module reconfigures the capacity of a user data partition of the target memory;
and after the capacity configuration is finished, the burning state reading and writing module sets the burning state identification in the target memory to be in an invalid state.
In this embodiment, the memory module is an eMMC.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention and should not be taken as limiting the scope of the present invention.

Claims (10)

1. A method for memory partition capacity adjustment, comprising:
s1, setting a master memory partition into a system firmware partition and a user data partition, wherein the system firmware partition is located at the front end address of the master memory, and the user data partition is located at the tail end address of the master memory;
s2, setting a burning state identifier in the system firmware partition, wherein the burning state identifier is used for identifying whether the target burning memory is started for the first time after burning;
s3, generating a burning mirror image by the system firmware program, and setting the burning state identifier to be in an effective state in the burning mirror image;
s4, burning the burning mirror image into a target memory;
s5, after the system is powered on, reading the state of the burning state identifier in the target memory;
s6, judging whether the state of the burning state identifier is an effective state, if so, entering the next step, otherwise, entering the step S9;
s7, acquiring the total capacity of the target memory, and reconfiguring the capacity of the user data partition of the target memory;
s8, setting the burning state identification in the target memory to be in an invalid state;
and S9, starting the system according to the normal file loading flow.
2. The memory partition capacity adjusting method according to claim 1, further comprising, after the step S7:
and step S71, formatting the user data partition into an ext4 format.
3. The method as claimed in claim 2, wherein the burning status flag is set at a back end of the system firmware partition.
4. The memory partition capacity adjustment method of claim 1, wherein the capacity of the user data partition is located in a last partition of the target memory.
5. The memory partition capacity adjustment method of claim 4, wherein the capacity of the user data partition is configured by a GPT table.
6. The memory partition capacity adjustment method of claim 5, wherein the capacity of the user data partition is a difference between the total capacity of the target memory and the size of the system firmware.
7. A memory partition capacity adjusting apparatus, comprising: the device comprises a memory module, a mirror image generation module, a mirror image burning module, a burning state read-write module, a judgment module, a capacity acquisition module and a capacity configuration module;
the memory module is connected with the mirror image burning module, the burning state reading and writing module and the capacity configuration module, the judging module is connected with the burning state reading and writing module and the capacity acquisition module, the capacity acquisition module is also connected with the capacity configuration module, the capacity configuration module is also connected with the burning state reading and writing module, and the mirror image generation module is also connected with the mirror image burning module;
the memory module is used for storing system firmware data and user data written by the burning mirror image;
the mirror image generation module is used for generating a burning mirror image for the partitioned mother plate memory;
the mirror image burning module is used for burning the burning mirror image generated by the mirror image generating module into a target memory;
the burning state read-write module is used for reading and writing the state of the burning state identifier in the target memory;
the judging module is used for judging whether the burning state identifier is effective or not;
the capacity acquisition module is used for acquiring the capacity of the target memory;
and the capacity configuration module is used for configuring the capacity of the user data partition of the target memory.
8. The memory partition capacity modulation device of claim 7, further comprising a formatting module for formatting the user data partition in ext4 format.
9. The memory partition capacity adjusting device according to claim 8, wherein the mirror image generation module includes a partition submodule and a burning status identifier setting submodule, and the partition submodule is configured to partition the master memory partition according to a preset rule; the burning state identification setting submodule is used for setting the burning state identification of the system firmware partition.
10. The device as claimed in any one of claims 7 to 9, wherein the memory module is an eMMC.
CN201911050766.XA 2019-10-31 2019-10-31 Memory partition capacity adjusting method and device Pending CN111124435A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911050766.XA CN111124435A (en) 2019-10-31 2019-10-31 Memory partition capacity adjusting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911050766.XA CN111124435A (en) 2019-10-31 2019-10-31 Memory partition capacity adjusting method and device

Publications (1)

Publication Number Publication Date
CN111124435A true CN111124435A (en) 2020-05-08

Family

ID=70495486

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911050766.XA Pending CN111124435A (en) 2019-10-31 2019-10-31 Memory partition capacity adjusting method and device

Country Status (1)

Country Link
CN (1) CN111124435A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113157282A (en) * 2021-03-31 2021-07-23 惠州华阳通用电子有限公司 Method for generating burn image file
CN117573042A (en) * 2024-01-16 2024-02-20 深圳前海深蕾半导体有限公司 Storage space allocation method, device and system, terminal equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7712131B1 (en) * 2005-02-09 2010-05-04 David Lethe Method and apparatus for storage and use of diagnostic software using removeable secure solid-state memory
CN102129375A (en) * 2010-01-12 2011-07-20 中国移动通信集团公司 Method and equipment for system upgrade of mobile terminal
CN103092660A (en) * 2013-01-31 2013-05-08 深圳市共进电子股份有限公司 Delivery configuration and production configuration safe and fast switching method for embedded device
CN105094935A (en) * 2015-09-24 2015-11-25 广东欧珀移动通信有限公司 Method for writing firmware in electronic equipment and electronic equipment
CN105678183A (en) * 2015-12-30 2016-06-15 青岛海信移动通信技术股份有限公司 User data management method and device for intelligent terminal
CN106843949A (en) * 2017-01-11 2017-06-13 微鲸科技有限公司 The preparation method of system image, the system installation method of electronic equipment
CN107066343A (en) * 2017-01-24 2017-08-18 广东欧珀移动通信有限公司 The restorative procedure of partition table, device and mobile terminal in mobile terminal

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7712131B1 (en) * 2005-02-09 2010-05-04 David Lethe Method and apparatus for storage and use of diagnostic software using removeable secure solid-state memory
CN102129375A (en) * 2010-01-12 2011-07-20 中国移动通信集团公司 Method and equipment for system upgrade of mobile terminal
CN103092660A (en) * 2013-01-31 2013-05-08 深圳市共进电子股份有限公司 Delivery configuration and production configuration safe and fast switching method for embedded device
CN105094935A (en) * 2015-09-24 2015-11-25 广东欧珀移动通信有限公司 Method for writing firmware in electronic equipment and electronic equipment
CN105678183A (en) * 2015-12-30 2016-06-15 青岛海信移动通信技术股份有限公司 User data management method and device for intelligent terminal
CN106843949A (en) * 2017-01-11 2017-06-13 微鲸科技有限公司 The preparation method of system image, the system installation method of electronic equipment
CN107066343A (en) * 2017-01-24 2017-08-18 广东欧珀移动通信有限公司 The restorative procedure of partition table, device and mobile terminal in mobile terminal

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113157282A (en) * 2021-03-31 2021-07-23 惠州华阳通用电子有限公司 Method for generating burn image file
CN113157282B (en) * 2021-03-31 2024-06-04 惠州华阳通用电子有限公司 Method for generating burning mirror image file
CN117573042A (en) * 2024-01-16 2024-02-20 深圳前海深蕾半导体有限公司 Storage space allocation method, device and system, terminal equipment and storage medium
CN117573042B (en) * 2024-01-16 2024-06-25 深圳前海深蕾半导体有限公司 Storage space allocation method, device and system, terminal equipment and storage medium

Similar Documents

Publication Publication Date Title
CN103777972B (en) System, configuration method based on field programmable gate array and upgrade method
CN103678144B (en) Data storage device and flash memory control method
EP2770432B1 (en) Electronic control device for automobile and data communication method
US11360698B2 (en) Electronic control unit for vehicle and method of writing data
CN111124435A (en) Memory partition capacity adjusting method and device
CN111158697B (en) Method for manufacturing burning mirror image
CN108037938B (en) Card opening method of eMMC
CN111176665B (en) High-capacity emmc mirror image manufacturing method and device
CN103761131A (en) Multi-board-card automatic updating method and system based on internal storage sharing
CN113190241B (en) Method and device for expanding capacity of data partition, electronic equipment and storage medium
US20220261181A1 (en) Overhead Reduction in Data Transfer Protocol for Data Storage Devices
CN112231251B (en) Board card slot identification method and device, communication equipment and readable storage medium
CN109032622A (en) Firmware fast writing method and system
CN117111983A (en) SOC chip burning method and device, electronic product and medium
CN105242941A (en) burning method and device
CN105988737A (en) Memory system, computing system including the same and method of operating the memory system
CN108170117B (en) Method and system for automatically identifying and distributing vehicle-mounted module parameters
CN101727333A (en) Method for updating firmware in microprocessor and firmware updating system
US11805214B2 (en) Image forming apparatus, control system, and control method using a detachable part
CN113343319B (en) FLASH type identification method and type identification system
CN114237640A (en) Chip test control panel Uboot burning method based on serial port protocol
CN103226479B (en) Electronic apparatus system and electronic equipment
CN110471801A (en) A kind of management method and device and equipment of the volume production procedural information storing equipment
CN218298988U (en) Device for burning chips in batches
CN219811182U (en) Recording circuit, recorder, recording device and recording system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200508