CN112732186A - DDR self-adaptation method, device and computer readable storage medium - Google Patents

DDR self-adaptation method, device and computer readable storage medium Download PDF

Info

Publication number
CN112732186A
CN112732186A CN202011644029.5A CN202011644029A CN112732186A CN 112732186 A CN112732186 A CN 112732186A CN 202011644029 A CN202011644029 A CN 202011644029A CN 112732186 A CN112732186 A CN 112732186A
Authority
CN
China
Prior art keywords
ddr
file
bootargs
preset
memory
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
CN202011644029.5A
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.)
Shenzhen Skyworth RGB Electronics Co Ltd
Original Assignee
Shenzhen Skyworth RGB 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 Shenzhen Skyworth RGB Electronics Co Ltd filed Critical Shenzhen Skyworth RGB Electronics Co Ltd
Priority to CN202011644029.5A priority Critical patent/CN112732186A/en
Publication of CN112732186A publication Critical patent/CN112732186A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1668Details of memory controller
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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

Landscapes

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

Abstract

The invention discloses a DDR self-adaption method which comprises the steps of obtaining a preset bootargs file, wherein the preset bootargs file is obtained by loading a default DDR reg file; confirming the memory capacity of the DDR to be configured, and setting the preset bootargs file according to the memory capacity to form a target bootargs file; and loading the target bootargs file to change the memory configuration parameters of the DDR to be configured. The invention also discloses a device and a computer readable storage medium. According to the method, the configuration parameters of bootargs are set, so that the DDR with the capacity size can share one configuration file, the number of branches is reduced, the development is simplified, the development and test efficiency is improved, and meanwhile, basic conditions are provided for rapid iterative upgrade of software.

Description

DDR self-adaptation method, device and computer readable storage medium
Technical Field
The invention relates to the technical field of data storage, in particular to a DDR self-adaption method, a DDR self-adaption device and a computer readable storage medium.
Background
The Android system is one of mainstream operating systems of current intelligent equipment, due to the openness, the market share is larger and larger, the influence range is wider and wider, and with the continuous progress and development of the Android intelligent equipment, the requirements of users on the Android intelligent equipment are also different. Based on the positioning of different products, for a series of products, a device manufacturer often configures DDRs with different sizes for a host machine type and a plurality of derived machine types to meet the requirements of different users. In the past, different DDR register tables are required to be configured by software aiming at DDR with different sizes, so that DDR needs to be adapted through different software, a host machine type and a plurality of derived machine types cannot share the same upgrade package, and the cost of development and maintenance of product software is increased.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a DDR self-adaption method, a DDR self-adaption device and a computer readable storage medium, and aims to solve the technical problem that for DDR of different sizes, different DDR register tables are required to be configured by software and different software is applied to adapt to DDR, so that the development and maintenance cost of product software is increased under the condition that a host machine type and a plurality of derived machine types cannot share the same upgrade package.
In order to achieve the above object, the present invention provides a DDR adaptive method, which includes the following steps:
acquiring a preset bootargs file, wherein the preset bootargs file is acquired by loading a default DDR reg file;
confirming the memory capacity of the DDR to be configured, and setting the preset bootargs file according to the memory capacity to form a target bootargs file;
loading the target bootargs file to change the memory configuration parameters of the DDR to be configured
Optionally, the step of setting the preset bootargs file according to the memory capacity to form a target bootargs file includes:
calling a setenv function, and setting the memory capacity to the file parameter of the preset bootargs file through the called setenv function;
and forming a target bootargs file based on the preset bootargs file with the changed file parameters.
Optionally, the DDR adaptation method further includes:
and acquiring the default DDR reg file of the DDR to be configured, and generating a preset bootargs file by using the DDR reg file.
Optionally, the step of generating a preset bootargs file from the DDR reg file includes:
generating a corresponding reg file from the default DDR reg file;
and compiling the reg file by boot, and generating a preset bootargs file according to a compiling result.
Optionally, after the step of generating the preset bootargs file by using the DDR reg file, the method further includes:
obtaining compatible parameters of DDR to be configured;
and updating the parameter configuration of the preset bootargs file through the compatible parameters.
Optionally, the step of obtaining compatible parameters of the DDR to be configured includes:
acquiring the memory capacity of the DDR to be configured, wherein the memory capacity is the memory capacity of one or more DDR to be configured;
and generating compatible parameters according to the memory capacity.
Optionally, the DDR adaptation method further includes:
acquiring cfg.mak files;
deleting the DDR memory configuration parameters of the cfg.
Optionally, the DDR adaptation method further includes:
changing the configuration of lunch mk of the current terminal system;
directing the configuration to the default DDR reg file.
In addition, to achieve the above object, the present invention provides a DDR adaptive device, including: the DDR adaptation method comprises the following steps of a memory, a processor and a DDR adaptation program stored on the memory and capable of running on the processor, wherein the DDR adaptation program realizes the steps of the DDR adaptation method when executed by the processor.
To achieve the above object, the present invention also provides a computer-readable storage medium, comprising: the DDR adaptation method comprises the following steps of a memory, a processor and a DDR adaptation program stored on the memory and capable of running on the processor, wherein the DDR adaptation program realizes the steps of the DDR adaptation method when executed by the processor.
The DDR self-adaption method comprises the steps of obtaining a preset bootargs file, wherein the preset bootargs file is obtained by loading a default DDR reg file; confirming the memory capacity of the DDR to be configured, and setting the preset bootargs file according to the memory capacity to form a target bootargs file; and loading the target bootargs file to change the memory configuration parameters of the DDR to be configured. According to the method, the multiple memory capacities are arranged in the bootargs file, so that multiple DDR with different memory capacities can share the same application file, the technical problem that the host type and multiple derived machine types cannot share the same upgrading package with the DDR is solved, the multiple DDR capacities share one configuration file by setting the configuration parameters of the bootargs, the branch number is reduced, the development is simplified, the development and test efficiency is improved, and meanwhile basic conditions are provided for rapid iterative upgrading of software. The maintenance cost of the software is reduced, and considerable human resources and time cost are saved and optimized for the research and development design, test evaluation, burning verification and the like of the television.
Drawings
FIG. 1 is a schematic diagram of a terminal \ device structure of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a DDR adaptation method according to a first embodiment of the present invention;
fig. 3 is a flowchart illustrating a DDR adaptive method according to a second embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The main solution of the embodiment of the invention is as follows: acquiring a preset bootargs file, wherein the preset bootargs file is acquired by loading a default DDR reg file; confirming the memory capacity of the DDR to be configured, and setting the preset bootargs file according to the memory capacity to form a target bootargs file; and loading the target bootargs file to change the memory configuration parameters of the DDR to be configured.
In the prior art, when the DDR with different memory capacities is upgraded, different DDR register tables need to be configured by software and different software is applied to adapt to the DDR, so that the development and maintenance costs of product software are increased under the condition that a host machine type and a plurality of derived machine types cannot share the same upgrade package.
The invention provides a solution, which enables a plurality of DDR with different memory capacities to share the same application file by setting a plurality of memory capacities in bootargs files, solves the technical problem that the DDR of a host type and a plurality of derived machine types cannot share the same upgrading package, enables the DDR of a plurality of DDR capacities to share one configuration file by setting configuration parameters of bootargs, reduces the number of branches, simplifies the development, improves the development and test efficiency, and provides basic conditions for rapid iterative upgrading of software. The maintenance cost of the software is reduced, and considerable human resources and time cost are saved and optimized for the research and development design, test evaluation, burning verification and the like of the television.
As shown in fig. 1, fig. 1 is a schematic diagram of a terminal \ device structure of a hardware operating environment according to an embodiment of the present invention.
The terminal of the embodiment of the invention can be a PC, and can also be a mobile or non-mobile terminal device such as a smart phone, a tablet computer, an electronic book reader, a portable computer and the like.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a DDR adaptation program.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to call the DDR adaptation program stored in the memory 1005 and perform the following operations:
acquiring a preset bootargs file, wherein the preset bootargs file is acquired by loading a default DDR reg file;
confirming the memory capacity of the DDR to be configured, and setting the preset bootargs file according to the memory capacity to form a target bootargs file;
and loading the target bootargs file to change the memory configuration parameters of the DDR to be configured.
Further, the processor 1001 may call the DDR adaptation program stored in the memory 1005, and further perform the following operations:
calling a setenv function, and setting the memory capacity to the file parameter of the preset bootargs file through the called setenv function;
and forming a target bootargs file based on the preset bootargs file with the changed file parameters.
Further, the processor 1001 may call the DDR adaptation program stored in the memory 1005, and further perform the following operations:
and acquiring the default DDR reg file of the DDR to be configured, and generating a preset bootargs file by using the DDR reg file.
Further, the processor 1001 may call the DDR adaptation program stored in the memory 1005, and further perform the following operations:
generating a corresponding reg file from the default DDR reg file;
and compiling the reg file by boot, and generating a preset bootargs file according to a compiling result.
Further, the processor 1001 may call the DDR adaptation program stored in the memory 1005, and further perform the following operations:
obtaining compatible parameters of DDR to be configured;
and updating the parameter configuration of the preset bootargs file through the compatible parameters.
Further, the processor 1001 may call the DDR adaptation program stored in the memory 1005, and further perform the following operations:
acquiring the memory capacity of the DDR to be configured, wherein the memory capacity is the memory capacity of one or more DDR to be configured;
and generating compatible parameters according to the memory capacity.
Further, the processor 1001 may call the DDR adaptation program stored in the memory 1005, and further perform the following operations:
acquiring cfg.mak files;
deleting the DDR memory configuration parameters of the cfg.
Further, the processor 1001 may call the DDR adaptation program stored in the memory 1005, and further perform the following operations:
changing the configuration of lunch mk of the current terminal system;
directing the configuration to the default DDR reg file.
Referring to fig. 2, fig. 2 is a schematic flowchart of a DDR adaptive method according to a first embodiment of the present invention, where the DDR adaptive method includes:
step S10, acquiring a preset bootargs file, wherein the preset bootargs file is acquired by loading a default DDR reg file;
based on the current DDR (Double Data Rate, DDR SDRAM is a Double Data Rate synchronous dynamic random access memory) configuration requirement, after a current application terminal is started, loading a preset bootargs file to obtain a configuration file configuring the DDR, where the application terminal is a terminal device implementing the current DDR configuration, and in the terminal device, configuring a related function setting to implement the configuration operation of the current DDR, generally, the terminal device function setting based on the DDR configuration operation includes changing a system file content of the terminal device to point to a default DDR reg file to load, in order to obtain the preset bootargs file configuring the DDR, and in actual application, an operation of changing the system file content pointing of the terminal device may be as follows:
changing the configuration of lunch mk of the current terminal system;
directing the configuration to the default DDR reg file.
Based on the current DDR configuration operation, the lunch mk file of the terminal device of the current configuration operation is changed, taking the co-packaged model of the same terminal system as an example, W81 and W81P share one lunch, and the lunch mk configuration is as follows:
the default 3G DDR reg profile is selected because the two co-packaged models W81 and W81P have the minimum memory of 3G:
EMMC_BOOT_REG_NAME:=
hi3751v811dmo_4layer_cpu1500m_DDR4_2133_3072m_1024mch0_2048mch1.reg
in addition, regarding the current DDR setting of the terminal device, before changing the content of lunch mk to point to the default DDR reg file, the original configuration parameters related to the DDR of the terminal device need to be deleted so as to automatically identify the DDR capacity size, so the DDR adaptive method further includes:
acquiring cfg.mak files;
deleting the DDR memory configuration parameters of the cfg.
In the current terminal device, a DDR memory configuration parameter related to modification of a system file registered based on a DDR memory parameter is obtained in a terminal system file, and in practical application, the change of the terminal system file exists in a configuration item, so that a file for deleting the DDR memory configuration parameter takes a 3G DDR device as an example, the configuration item in the terminal system file is defined as CFG _ MEM _3G ═ y, and according to the determined configuration item, CFG _ MEM _3G ═ y is deleted, and thus, when the terminal system starts to load a DDR reg file, the terminal device application system automatically identifies the DDR size, and the kernel core obtains the DDR related parameter from the boot boots of the boott to configure, so as to implement DDR self-adaptation.
As shown above, according to the relevant configuration operation of the current terminal device system, based on the preset bootargs file that is configured currently, after the default DDR reg configuration file is loaded first at the boot startup earliest stage of the terminal device, the DDR reg file names are as follows:
hi3751v811dmo_4layer_cpu1500m_DDR4_2133_3072m_1024mch0_2048mch1.reg
and acquiring and loading a corresponding preset bootargs file according to preset bootargs file pointing information pre-registered in the default DDR reg file, wherein the file name of the preset bootargs file is defined as a bootargs _ Hi3751V811-64bit _ security. txt file in the terminal equipment.
Step S20, confirming the memory capacity of the DDR to be configured, and setting the preset bootargs file according to the memory capacity to form a target bootargs file;
based on the current DDR to be configured, defining the DDR to be configured, confirming the memory capacity of the DDR to be configured, setting the relevant parameter content of the preset bootargs file according to the memory capacity, and when a system application file of a terminal device is changed, needing relevant function change, namely, setting the preset bootargs file according to the memory capacity to form a target bootargs file, wherein the step comprises the following steps:
calling a setenv function, and setting the memory capacity to the file parameter of the preset bootargs file through the called setenv function;
and forming a target bootargs file based on the preset bootargs file with the changed file parameters.
Based on the current DDR configuration requirement, changing the file parameter of the preset bootargs file based on a program operation call setenv function, where the setenv function is a Linux application function and is used to change or increase the content of the environment variable, and resetting the file parameter of the bootargs file in a setenv manner to implement the configuration of the DDR parameter, where the changing manner is, for example, W81, for example, the W81 memory is 3G, and the mem-3G dma _ ne-2G, mmz-DDR, 0,1972M, and 72M configuration parameters obtained from bootargs _ Hi3751V811-64bit _ security.txt are set to the rearmost side of bootargs to update bootargs; if the memory W81P is 4G, the configuration parameters mem ═ 4G,3584M @0x0,512m @0x100000000dma _ zone ═ 3584M mmz ═ ddr obtained from bootargs _ Hi3751V811-64bit _ security. And taking the updated bootargs file as a target bootargs file to realize the current DDR memory configuration update.
Step S30, the target bootargs file is loaded to change the memory configuration parameters of the to-be-configured DDR.
According to the updated target bootargs file, loading the target bootargs file to change the memory configuration parameters of the DDR to be configured, in practical application, the mode of loading the target bootargs file is a system file loading mode when an application system of a terminal device is started, related configuration parameter contents in the target bootargs file are involved, and the DDR memory configuration parameter change realized by loading the target bootargs file is related to the configured related configuration parameters in the target bootargs file, so that the DDR for changing the memory configuration parameters realized by loading the target bootargs file includes one or more DDR under the condition that a plurality of DDR related configuration parameter contents are registered in the target bootargs file.
In this embodiment, by setting a plurality of memory capacities in the bootargs file, a plurality of DDRs with different memory capacities can share the same application file, thereby solving the technical problem that the host type and a plurality of derived model can not share the same upgrade package with the DDR size. The maintenance cost of the software is reduced, and considerable human resources and time cost are saved and optimized for the research and development design, test evaluation, burning verification and the like of the television.
Referring to fig. 3, fig. 3 is a flowchart illustrating a DDR adaptive method according to a second embodiment of the present invention, based on the first embodiment shown in fig. 2, the DDR adaptive method further includes:
step S40, obtaining the default DDR reg file of the DDR to be configured, and generating a preset bootargs file by using the DDR reg file.
Step S50, obtaining compatible parameters of the DDR to be configured;
and step S60, updating the parameter configuration of the preset bootargs file through the compatible parameters.
The method comprises the steps of obtaining a default DDR reg file of a DDR to be configured based on a DDR to be configured of a current terminal device, wherein the default DDR reg file is the default configuration file based on the DDR to be configured and is used for loading to apply the DDR when a terminal system is started, and the default DDR reg file is a system application file based on the terminal device. After the default DDR reg file is obtained, a preset bootargs file is generated by the default DDR reg file, namely the DDR reg file generates the preset bootargs file, and the method comprises the following steps:
generating a corresponding reg file from the default DDR reg file;
and compiling the reg file by boot, and generating a preset bootargs file according to a compiling result.
In practical applications, when a corresponding reg file is generated from a default DDR reg file, the default DDR reg file is used as a system file loaded when the system of a terminal device is applied, and may also be defined as a system application file, that is, a sysreg file, where the sysreg file is used to describe basic SOC operation information such as CPU configuration and DDR configuration when the application system of the terminal device is enabled, and is used to configure a main chip at an early stage by a boot, so that the application system of the terminal device runs normally. The files generated based on the default DDR reg file include two, that is, the reg file generated based on the DDR reg (sysreg) file includes two, one is an excel file, and one is a reg file manually generated based on the excel file. When the application is carried out, the reg file is compiled into the boot for use through system compilation (boot) of the terminal system, so that the file which really realizes application validation is the reg file manually generated based on the Excel file, and after the application system based on the current terminal equipment is compiled, namely the reg file is compiled by the boot, a preset bootargs file is generated based on the compiling result.
Further, in a preset bootargs file generated based on a default DDR reg file of a current DDR of the terminal device, the parameter configuration of a plurality of current DDRs is involved, and the generated preset bootargs file is updated with a compatible parameter of the current to-be-configured DDR, where the compatible parameter is defined as standard format parameter information applicable to the content of the preset bootargs file generated for the memory capacity of the current to-be-configured DDR, and therefore, the step of obtaining the compatible parameter of the to-be-configured DDR includes:
acquiring the memory capacity of the DDR to be configured, wherein the memory capacity is the memory capacity of one or more DDR to be configured;
and generating compatible parameters according to the memory capacity.
Based on the preset bootargs file generated currently, generating compatible parameters according to the memory capacity of the current DDR to be configured to update the parameter configuration in the preset bootargs file to realize the change of the memory configuration parameters of the DDR to be configured, in practical application, generating compatible parameters according to the memory capacity of the DDR to be configured to the configuration update operation of the bootargs file, wherein the relevant steps of the update operation can be as follows:
BOOT_ARGS_FILE:=$(DEVICE_DIR_PATH)/etc/bootargs_Hi3751V811-64bit_security.txt
taking DDR to be configured with memory capacity of 1.5G, 2G, 3G, 4G as an example, when configuring bootargs parameters compatible with DDR capacity of 1.5G (1536M) and 2G, 3G, 4G, the corresponding bootargs _ Hi3751V811-64bit _ security. txt file is changed as follows:
mem_1536M=mem=1536M mmz=ddr,0,0,72M
mem_2G=mem=2G mmz=ddr,0,0,72M
mem_3G=mem=3G dma_zone=2G mmz=ddr,0,1972M,72M
mem_4G=mem=4G,3584M@0x0,512M@0x100000000
dma_zone=3584M mmz=ddr,0,1972M,72M
bootargs=selinux=1
the reason for loading the application system of the terminal equipment is related to, the memory size cannot be specified in the bootargs file, and the bootargs file (mem-3072M) needs to be changed into bootargs-selinux-1
Wherein:
mem_1536M=mem=1536M mmz=ddr,0,0,72M
mem_2G=mem=2G mmz=ddr,0,0,72M
mem_3G=mem=3G dma_zone=2G mmz=ddr,0,1972M,72M
mem_4G=mem=4G,3584M@0x0,512M@0x100000000
dma_zone=3584M mmz=ddr,0,1972M,72M
as described above, the parameter configuration updating operation of the preset bootgs file is compatible with bootgs parameters of different DDR sizes, where 1.5G is (1536M), 2G, 3G, and 4G, and:
mem_4G=mem=4G,3584M@0x0,512M@0x100000000
dma_zone=3584M mmz=ddr,0,1972M,72M
in addition, the parameters of the above configuration parameter update operation may be defined as related contents as follows:
dmazone 3584M is a maximum address range defining dmazone;
mem represents the capacity of the whole DDR memory;
the memory is divided into an OS memory and an MMZ memory, wherein the OS memory is used by the system, and the MMZ memory is used by the local media;
MMZ is a region size based on mmz regions, e.g., mmz ═ ddr,0,1972M,72M indicating that the start address 1972M is reserved throughout mem, and the size is 72M for MMZ use, with the remainder allocated for system memory use. Since the setting content of the mmz parameter is based on the memory application parameter when the terminal device is turned on, the setting needs to be performed correspondingly according to the specific memory capacity of the current terminal device DDR, otherwise, the terminal device cannot be turned on due to the failure of the power-on hibb 0 to apply for the memory.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where a DDR adaptive program is stored on the computer-readable storage medium, and when executed by a processor, the DDR adaptive program implements the following operations:
acquiring a preset bootargs file, wherein the preset bootargs file is acquired by loading a default DDR reg file;
confirming the memory capacity of the DDR to be configured, and setting the preset bootargs file according to the memory capacity to form a target bootargs file;
and loading the target bootargs file to change the memory configuration parameters of the DDR to be configured.
Further, the DDR adaptation program when executed by the processor further implements the following operations:
calling a setenv function, and setting the memory capacity to the file parameter of the preset bootargs file through the called setenv function;
and forming a target bootargs file based on the preset bootargs file with the changed file parameters.
Further, the DDR adaptation program when executed by the processor further implements the following operations:
and acquiring the default DDR reg file of the DDR to be configured, and generating a preset bootargs file by using the DDR reg file.
Further, the DDR adaptation program when executed by the processor further implements the following operations:
generating a corresponding reg file from the default DDR reg file;
and compiling the reg file by boot, and generating a preset bootargs file according to a compiling result.
Further, the DDR adaptation program when executed by the processor further implements the following operations:
obtaining compatible parameters of DDR to be configured;
and updating the parameter configuration of the preset bootargs file through the compatible parameters.
Further, the DDR adaptation program when executed by the processor further implements the following operations:
acquiring the memory capacity of the DDR to be configured, wherein the memory capacity is the memory capacity of one or more DDR to be configured;
and generating compatible parameters according to the memory capacity.
Further, the DDR adaptation program when executed by the processor further implements the following operations:
acquiring cfg.mak files;
deleting the DDR memory configuration parameters of the cfg.
Further, the DDR adaptation program when executed by the processor further implements the following operations:
changing the configuration of lunch mk of the current terminal system;
directing the configuration to the default DDR reg file.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A DDR adaptation method is characterized by comprising the following steps:
acquiring a preset bootargs file, wherein the preset bootargs file is acquired by loading a default DDR reg file;
confirming the memory capacity of the DDR to be configured, and setting the preset bootargs file according to the memory capacity to form a target bootargs file;
and loading the target bootargs file to change the memory configuration parameters of the DDR to be configured.
2. The DDR adaptive method according to claim 1, wherein the step of setting the preset bootargs file according to the memory capacity to form a target bootargs file comprises:
calling a setenv function, and setting the memory capacity to the file parameter of the preset bootargs file through the called setenv function;
and forming a target bootargs file based on the preset bootargs file with the changed file parameters.
3. The DDR adaptation method of claim 1, further comprising:
and acquiring the default DDR reg file of the DDR to be configured, and generating a preset bootargs file by using the DDR reg file.
4. The DDR adaptation method of claim 3, wherein the step of generating a preset bootargs file from the DDR reg file comprises:
generating a corresponding reg file from the default DDR reg file;
and compiling the reg file by boot, and generating a preset bootargs file according to a compiling result.
5. The DDR adaptation method of claim 3, wherein after the step of generating the preset bootargs file with the DDR reg file, the DDR adaptation method further comprises:
obtaining compatible parameters of DDR to be configured;
and updating the parameter configuration of the preset bootargs file through the compatible parameters.
6. The DDR adaptation method of claim 5, wherein the step of obtaining compatible parameters for the DDR to be configured comprises:
acquiring the memory capacity of the DDR to be configured, wherein the memory capacity is the memory capacity of one or more DDR to be configured;
and generating compatible parameters according to the memory capacity.
7. The DDR adaptation method of claim 1, further comprising:
acquiring cfg.mak files;
deleting the DDR memory configuration parameters of the cfg.
8. The DDR adaptation method of claim 1, further comprising:
changing the configuration of lunch mk of the current terminal system;
directing the configuration to the default DDR reg file.
9. A DDR adaptation apparatus, comprising: a memory, a processor, and a DDR adaptation program stored on the memory and executable on the processor, the DDR adaptation program when executed by the processor implementing the steps of the DDR adaptation method of any one of claims 1 to 8.
10. A computer-readable storage medium, the computer-readable storage medium comprising: a memory, a processor, and a DDR adaptation program stored on the memory and executable on the processor, the DDR adaptation program when executed by the processor implementing the steps of the DDR adaptation method of any one of claims 1 to 8.
CN202011644029.5A 2020-12-31 2020-12-31 DDR self-adaptation method, device and computer readable storage medium Pending CN112732186A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011644029.5A CN112732186A (en) 2020-12-31 2020-12-31 DDR self-adaptation method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011644029.5A CN112732186A (en) 2020-12-31 2020-12-31 DDR self-adaptation method, device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN112732186A true CN112732186A (en) 2021-04-30

Family

ID=75609323

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011644029.5A Pending CN112732186A (en) 2020-12-31 2020-12-31 DDR self-adaptation method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112732186A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114637540A (en) * 2022-03-17 2022-06-17 深圳创维-Rgb电子有限公司 Method, device and equipment for configuring parameters in memory self-adaption mode and computer storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102306127A (en) * 2011-08-05 2012-01-04 烽火通信科技股份有限公司 Novel method for identifying and initializing DDRIII (double-data-rate III) memory
CN106598887A (en) * 2016-12-05 2017-04-26 北京小米移动软件有限公司 DDR memory configuration method and device as well as electronic equipment
WO2019051652A1 (en) * 2017-09-12 2019-03-21 深圳传音通讯有限公司 Hardware device configuration method, mobile terminal and computer-readable storage medium
CN110162495A (en) * 2019-05-27 2019-08-23 眸芯科技(上海)有限公司 DDR adaptive approach and device
CN110780940A (en) * 2019-09-24 2020-02-11 维沃移动通信有限公司 Application program loading method, electronic device and storage medium
CN110888679A (en) * 2019-11-08 2020-03-17 苏州浪潮智能科技有限公司 Memory compatibility method, device, equipment and medium
CN112052043A (en) * 2020-08-10 2020-12-08 烽火通信科技股份有限公司 Method, device, equipment and storage medium for adapting memory bank parameters of embedded system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102306127A (en) * 2011-08-05 2012-01-04 烽火通信科技股份有限公司 Novel method for identifying and initializing DDRIII (double-data-rate III) memory
CN106598887A (en) * 2016-12-05 2017-04-26 北京小米移动软件有限公司 DDR memory configuration method and device as well as electronic equipment
WO2019051652A1 (en) * 2017-09-12 2019-03-21 深圳传音通讯有限公司 Hardware device configuration method, mobile terminal and computer-readable storage medium
CN110162495A (en) * 2019-05-27 2019-08-23 眸芯科技(上海)有限公司 DDR adaptive approach and device
CN110780940A (en) * 2019-09-24 2020-02-11 维沃移动通信有限公司 Application program loading method, electronic device and storage medium
CN110888679A (en) * 2019-11-08 2020-03-17 苏州浪潮智能科技有限公司 Memory compatibility method, device, equipment and medium
CN112052043A (en) * 2020-08-10 2020-12-08 烽火通信科技股份有限公司 Method, device, equipment and storage medium for adapting memory bank parameters of embedded system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114637540A (en) * 2022-03-17 2022-06-17 深圳创维-Rgb电子有限公司 Method, device and equipment for configuring parameters in memory self-adaption mode and computer storage medium

Similar Documents

Publication Publication Date Title
CN104252342B (en) Embedded application implementation method and device capable of configuring parameters
US20170303063A1 (en) Updating Web Resources
WO2020001112A1 (en) Application method for platform supporting multiple types of devices, and mobile terminal
CN106469071B (en) Application theme changing method and device
CN106648685B (en) Intelligent terminal system application processing method and device and intelligent terminal
CN111068328A (en) Game advertisement configuration table generation method, terminal device and medium
CN111726818A (en) Wireless chip testing method and device, computer equipment and storage medium
CN113504918A (en) Equipment tree configuration optimization method and device, computer equipment and storage medium
US10078532B2 (en) Resource management method and device for terminal system among multiple operating systems
CN112732186A (en) DDR self-adaptation method, device and computer readable storage medium
CN108733370B (en) Stylized display method, device, terminal and storage medium of native APP
CN110515671A (en) Initial method, apparatus for initializing, terminal device and readable storage medium storing program for executing
CN113157337A (en) Application program starting method and device, terminal equipment and storage medium
CN110955449B (en) Gray scale release method and device for client
CN110989986A (en) Software template-based software generation method and device and computer equipment
CN108089895B (en) Activity registration method and device in plug-in, electronic equipment and storage medium
CN115454403A (en) Page construction method and device and storage medium
CN110035322A (en) A kind of method, apparatus and computer readable storage medium of activation system
US11050621B2 (en) Client, server and differential upgrade method
CN113010195B (en) System upgrading method, storage medium and terminal equipment
CN113282363A (en) Method and device for optimizing hybrid APP
CN111522564A (en) Method and device for identifying system upgrading state and computer readable storage medium
CN111177624A (en) Website front-back end communication method and device, computer equipment and storage medium
CN110247966B (en) Kernel creation method, smart television and computer-readable storage medium
CN114518844B (en) Data processing method

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