# US 2026/0064301 A1 · Flash partition upgrade method and device, appatatus, and storage nedium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2026/0064301 A1
- Document ID: US20260064301A1
- Status: Published application
- Kind: A1
- Application number: 19/188,037
- Filed: 2025-04-24
- Published: 2026-03-05
- Earliest claimed: 2024-04-24
- Assignees: Hangzhou Meari Technology Co., Ltd.
- Applicants: Hangzhou Meari Technology Co.,Ltd.
- Inventors: Shihai XIE; Wei JIN; Hongli YING
- Web page: https://patentgrep.com/patent/US20260064301A1

## CPC

- G06F 3/0644: {Management of space entities, e.g. partitions, extents, pools}
- G06F 3/0607: {by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device}
- G06F 3/0659: {Command handling arrangements, e.g. command buffers, queues, command scheduling}
- G06F 3/0679: {Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A Flash partition upgrade method and device, an apparatus, and a storage medium, applied to a SquashFS system are provided. The Flash partition upgrade method includes: obtaining available DDR memory information via a kernel command line and Linux; performing virtual partition creation and Flash memory copy based on the available DDR memory information and a preset virtual partition creation rule to obtain a target virtual APP MTD partition and a copy status record identifier corresponding to an APP partition in system Flash; by modifying implementation of a preset readsect function, performing data reading based on the copy status record identifier and the target virtual APP MTD partition to obtain target data; in response to a corresponding APP partition upgrade trigger condition being met, performing partition upgrade based on the target data. In this way, Flash partition upgrade under the condition of limited resources can be effectively achieved.

## Claims

### Claim 1

A Flash partition upgrade method, applied to a SquashFS system, comprising:
obtaining available DDR memory information via a corresponding kernel command line and corresponding Linux;
performing virtual partition creation and Flash memory copy based on the available DDR memory information and a preset virtual partition creation rule to obtain a target virtual APP MTD partition and a copy status record identifier corresponding to an APP partition in system Flash;
by modifying implementation of a preset readsect function, performing data reading based on the copy status record identifier and the target virtual APP MTD partition to obtain corresponding target data; and
in response to a corresponding APP partition upgrade trigger condition being met, performing partition upgrade based on the target data to complete an upgrade operation corresponding to the current APP partition.

### Claim 2 (depends on 1)

The Flash partition upgrade method according to claim 1, wherein the obtaining available DDR memory information through the corresponding kernel command line and the corresponding Linux comprises:
performing kernel boot using the corresponding kernel command line via universal boot codes to send information on memory resources used by a digital signal processor in the SquashFS system to the corresponding Linux distribution and then obtain the corresponding available DDR memory information based on the kernel command line.

### Claim 3 (depends on 1)

The Flash partition upgrade method according to claim 1, wherein the performing virtual partition creation and Flash memory copy based on the available DDR memory information and the preset virtual partition creation rule comprises:
creating a corresponding ioctl call, and after successful creation, checking if a memory for the ioctl call is greater than a memory for a MTD partition corresponding to the APP partition in the system Flash to obtain a corresponding memory determination result; or
by opening a corresponding proc node or mtd node, determining whether a memory for the proc node or the mtd node is greater than the memory for the MTD partition corresponding to the APP partition to obtain the corresponding memory determination result;
in response to the memory determination result of being greater than the memory for the MTD partition corresponding to the APP partition, performing kernel address mapping, Flash content copy, and identifier configuration based on the available DDR memory information to obtain the target virtual APP MTD partition and the copy status record identifier corresponding to the APP partition.

### Claim 4 (depends on 3)

The Flash partition upgrade method according to claim 3, wherein in response to the memory determination result of being greater than the memory for the MTD partition corresponding to the APP partition, performing kernel address mapping, Flash content copy, and identifier configuration based on the available DDR memory information comprises:
in response to the memory determination result of being greater than the memory for the MTD partition corresponding to the APP partition, performing virtual address mapping using ioremap and the available DDR memory information, and copying contents of the APP partition and the MTD partition to corresponding DDR based on the available DDR memory information to obtain the target virtual APP MTD partition after the copy is completed.

### Claim 5 (depends on 1)

The Flash partition upgrade method according to claim 1, wherein the obtaining the copy status record identifier corresponding to the APP partition in the system Flash comprises:
during a process of Flash content copy, performing identifier definition and identifier initialization using an atomic_t variable to obtain an initial copy status record identifier; and
after obtaining the target virtual APP MTD partition, obtaining a corresponding copy status record identifier that is set to 1.

### Claim 6 (depends on 1)

The Flash partition upgrade method according to claim 1, wherein by modifying implementation of the preset readsect function, performing data reading based on the copy status record identifier and the target virtual APP MTD partition comprises:
by modifying the implementation of the preset readsect function used to read a Flash content in the MTD partition, determining whether the virtual APP MTD partition corresponds to the APP partition to obtain the corresponding partition determination result;
in response to the partition determination result being positive, obtaining the corresponding copy status record identifier, and determining whether a value of the status record identifier is greater than zero to obtain the corresponding identifier determination result;
in response to the identifier determination result that the value of the copy status record identifier is greater than zero, determining whether a sequence number of a target block obtained based on the readsect function belongs to a range of the target virtual APP MTD partition to obtain a corresponding numerical determination result; and
in response to the numerical determination result that the sequence number of the target block obtained based on the readsect function belongs to the range of the target virtual APP MTD partition, obtaining the corresponding target data from the target virtual APP MTD partition.

### Claim 7 (depends on 6)

The Flash partition upgrade method according to claim 6, further comprising:
in response to the identifier determination result or the numerical determination result being negative, obtaining the target data from the APP partition.

### Claim 8

A Flash partition upgrade device, applied to a SquashFS system, comprising:
a memory information acquisition module configured to obtain available DDR memory information via a corresponding kernel command line and corresponding Linux;
a virtual partition creation module configured to perform virtual partition creation and Flash memory copy based on the available DDR memory information and a preset virtual partition creation rule to obtain a target virtual APP MTD partition and a copy status record identifier corresponding to an APP partition in system Flash;
a data read module configured to, by modifying implementation of a preset readsect function, perform data reading based on the copy status record identifier and the target virtual APP MTD partition to obtain corresponding target data; and
a partition upgrade module configured to, in response to a corresponding APP partition upgrade trigger condition being met, perform partition upgrade based on the target data to complete an upgrade operation corresponding to the current APP partition.

### Claim 9 (depends on 1)

An electronic apparatus, comprising:
a memory configured to store computer programs;
a processor configured to execute the computer programs to implement the Flash partition upgrade method according to claim 1.

### Claim 10 (depends on 1)

A computer-readable storage medium, configured to store computer programs, wherein when the computer programs are executed by a processor, the Flash partition upgrade method according to claim 1 is implemented.

### Claim 11 (depends on 2)

The Flash partition upgrade method according to claim 2, wherein by modifying implementation of the preset readsect function, performing data reading based on the copy status record identifier and the target virtual APP MTD partition comprises:
by modifying the implementation of the preset readsect function used to read a Flash content in the MTD partition, determining whether the virtual APP MTD partition corresponds to the APP partition to obtain the corresponding partition determination result;
in response to the partition determination result being positive, obtaining the corresponding copy status record identifier, and determining whether a value of the status record identifier is greater than zero to obtain the corresponding identifier determination result;
in response to the identifier determination result that the value of the copy status record identifier is greater than zero, determining whether a sequence number of a target block obtained based on the readsect function belongs to a range of the target virtual APP MTD partition to obtain a corresponding numerical determination result; and
in response to the numerical determination result that the sequence number of the target block obtained based on the readsect function belongs to the range of the target virtual APP MTD partition, obtaining the corresponding target data from the target virtual APP MTD partition.

### Claim 12 (depends on 3)

The Flash partition upgrade method according to claim 3, wherein by modifying implementation of the preset readsect function, performing data reading based on the copy status record identifier and the target virtual APP MTD partition comprises:
by modifying the implementation of the preset readsect function used to read a Flash content in the MTD partition, determining whether the virtual APP MTD partition corresponds to the APP partition to obtain the corresponding partition determination result;
in response to the partition determination result being positive, obtaining the corresponding copy status record identifier, and determining whether a value of the status record identifier is greater than zero to obtain the corresponding identifier determination result;
in response to the identifier determination result that the value of the copy status record identifier is greater than zero, determining whether a sequence number of a target block obtained based on the readsect function belongs to a range of the target virtual APP MTD partition to obtain a corresponding numerical determination result; and
in response to the numerical determination result that the sequence number of the target block obtained based on the readsect function belongs to the range of the target virtual APP MTD partition, obtaining the corresponding target data from the target virtual APP MTD partition.

### Claim 13 (depends on 4)

The Flash partition upgrade method according to claim 4, wherein by modifying implementation of the preset readsect function, performing data reading based on the copy status record identifier and the target virtual APP MTD partition comprises:
by modifying the implementation of the preset readsect function used to read a Flash content in the MTD partition, determining whether the virtual APP MTD partition corresponds to the APP partition to obtain the corresponding partition determination result;
in response to the partition determination result being positive, obtaining the corresponding copy status record identifier, and determining whether a value of the status record identifier is greater than zero to obtain the corresponding identifier determination result;
in response to the identifier determination result that the value of the copy status record identifier is greater than zero, determining whether a sequence number of a target block obtained based on the readsect function belongs to a range of the target virtual APP MTD partition to obtain a corresponding numerical determination result; and
in response to the numerical determination result that the sequence number of the target block obtained based on the readsect function belongs to the range of the target virtual APP MTD partition, obtaining the corresponding target data from the target virtual APP MTD partition.

### Claim 14 (depends on 5)

The Flash partition upgrade method according to claim 5, wherein by modifying implementation of the preset readsect function, performing data reading based on the copy status record identifier and the target virtual APP MTD partition comprises:
by modifying the implementation of the preset readsect function used to read a Flash content in the MTD partition, determining whether the virtual APP MTD partition corresponds to the APP partition to obtain the corresponding partition determination result;
in response to the partition determination result being positive, obtaining the corresponding copy status record identifier, and determining whether a value of the status record identifier is greater than zero to obtain the corresponding identifier determination result;
in response to the identifier determination result that the value of the copy status record identifier is greater than zero, determining whether a sequence number of a target block obtained based on the readsect function belongs to a range of the target virtual APP MTD partition to obtain a corresponding numerical determination result; and
in response to the numerical determination result that the sequence number of the target block obtained based on the readsect function belongs to the range of the target virtual APP MTD partition, obtaining the corresponding target data from the target virtual APP MTD partition.

### Claim 15 (depends on 9)

The electronic apparatus according to claim 9, wherein in the Flash partition upgrade method, the obtaining available DDR memory information through the corresponding kernel command line and the corresponding Linux comprises:
performing kernel boot using the corresponding kernel command line via universal boot codes to send information on memory resources used by a digital signal processor in the SquashFS system to the corresponding Linux distribution and then obtain the corresponding available DDR memory information based on the kernel command line.

### Claim 16 (depends on 9)

The electronic apparatus according to claim 9, wherein in the Flash partition upgrade method, the performing virtual partition creation and Flash memory copy based on the available DDR memory information and the preset virtual partition creation rule comprises:
creating a corresponding ioctl call, and after successful creation, checking if a memory for the ioctl call is greater than a memory for a MTD partition corresponding to the APP partition in the system Flash to obtain a corresponding memory determination result; or
by opening a corresponding proc node or mtd node, determining whether a memory for the proc node or the mtd node is greater than the memory for the MTD partition corresponding to the APP partition to obtain the corresponding memory determination result;
in response to the memory determination result of being greater than the memory for the MTD partition corresponding to the APP partition, performing kernel address mapping, Flash content copy, and identifier configuration based on the available DDR memory information to obtain the target virtual APP MTD partition and the copy status record identifier corresponding to the APP partition.

### Claim 17 (depends on 16)

The electronic apparatus according to claim 16, wherein in the Flash partition upgrade method, in response to the memory determination result of being greater than the memory for the MTD partition corresponding to the APP partition, performing kernel address mapping, Flash content copy, and identifier configuration based on the available DDR memory information comprises:
in response to the memory determination result of being greater than the memory for the MTD partition corresponding to the APP partition, performing virtual address mapping using ioremap and the available DDR memory information, and copying contents of the APP partition and the MTD partition to corresponding DDR based on the available DDR memory information to obtain the target virtual APP MTD partition after the copy is completed.

### Claim 18 (depends on 9)

The electronic apparatus according to claim 9, wherein in the Flash partition upgrade method, the obtaining the copy status record identifier corresponding to the APP partition in the system Flash comprises:
during a process of Flash content copy, performing identifier definition and identifier initialization using an atomic_t variable to obtain an initial copy status record identifier; and
after obtaining the target virtual APP MTD partition, obtaining a corresponding copy status record identifier that is set to 1.

### Claim 19 (depends on 9)

The electronic apparatus according to claim 9, wherein in the Flash partition upgrade method, by modifying implementation of the preset readsect function, performing data reading based on the copy status record identifier and the target virtual APP MTD partition comprises:
by modifying the implementation of the preset readsect function used to read a Flash content in the MTD partition, determining whether the virtual APP MTD partition corresponds to the APP partition to obtain the corresponding partition determination result;
in response to the partition determination result being positive, obtaining the corresponding copy status record identifier, and determining whether a value of the status record identifier is greater than zero to obtain the corresponding identifier determination result;
in response to the identifier determination result that the value of the copy status record identifier is greater than zero, determining whether a sequence number of a target block obtained based on the readsect function belongs to a range of the target virtual APP MTD partition to obtain a corresponding numerical determination result; and
in response to the numerical determination result that the sequence number of the target block obtained based on the readsect function belongs to the range of the target virtual APP MTD partition, obtaining the corresponding target data from the target virtual APP MTD partition.

### Claim 20 (depends on 19)

The electronic apparatus according to claim 19, wherein the Flash partition upgrade method further comprises:
in response to the identifier determination result or the numerical determination result being negative, obtaining the target data from the APP partition.
