CN112181467B - Method and device for upgrading memory firmware of terminal, terminal and storage medium - Google Patents

Method and device for upgrading memory firmware of terminal, terminal and storage medium Download PDF

Info

Publication number
CN112181467B
CN112181467B CN202011080247.0A CN202011080247A CN112181467B CN 112181467 B CN112181467 B CN 112181467B CN 202011080247 A CN202011080247 A CN 202011080247A CN 112181467 B CN112181467 B CN 112181467B
Authority
CN
China
Prior art keywords
firmware
memory
upgraded
upgrading
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011080247.0A
Other languages
Chinese (zh)
Other versions
CN112181467A (en
Inventor
李志刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202011080247.0A priority Critical patent/CN112181467B/en
Publication of CN112181467A publication Critical patent/CN112181467A/en
Application granted granted Critical
Publication of CN112181467B publication Critical patent/CN112181467B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/654Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The embodiment of the disclosure provides a method, a device, a terminal and a storage medium for upgrading memory firmware of the terminal, wherein the method comprises the following steps: acquiring target information of a memory, wherein the target information comprises: firmware information of the memory; determining whether the firmware of the memory needs to be upgraded according to the target information of the memory; if the memory firmware is required to be upgraded, judging whether a preset mark exists or not; if the preset identifier exists, the memory firmware is not updated; if the preset identifier does not exist, the preset identifier is created according to the target information of the memory, and the memory firmware is updated. The method in the disclosure can improve the security of firmware upgrade.

Description

Method and device for upgrading memory firmware of terminal, terminal and storage medium
Technical Field
The disclosure relates to the technical field of intelligent terminals, and in particular relates to a method and a device for upgrading memory firmware of a terminal, the terminal and a storage medium.
Background
UFS (Universal Flash Storage, universal flash memory storage) is a memory device of a cell phone on which all system data and user data are stored, including operating systems, application software, user generated data such as photographs and videos taken, etc. The internal hardware of the UFS device is composed of a storage medium and a controller, and corresponding control software, called firmware. Due to the complexity of the firmware, the firmware of the manufacturer is still continuously upgraded and perfected after the UFS device leaves the factory. The UFS protocol specifies FFU (Filed Firmware Update) functionality that updates the firmware of the UFS while retaining the UFS data, so that the firmware can be updated after the UFS leaves the factory.
As the UFS is the only storage device in the mobile phone, once the data in the UFS is abnormal due to firmware updating, the mobile phone can not be started completely, and personal data of a user can be lost. Therefore, at present, each handset manufacturer completes verification of the UFS firmware in the development stage, and once sold, the firmware is not upgraded. But would be a significant penalty if the UFS firmware had serious defects not found.
The current upgrading method of firmware provided by the UFS manufacturer mainly comprises 2 kinds, namely, a special upgrading tool is used for directly upgrading the UFS device, and the upgrading method is adopted by the UFS manufacturer for upgrading the UFS device without a patch. Another is to provide simple tool software to upgrade UFS devices already produced by the patch in the laboratory.
The existing firmware upgrading mode is only aimed at unsold UFS devices, after-sales users cannot upgrade the firmware of the UFS devices, and a protection mechanism in the existing firmware upgrading process is not sound enough, so that the use is not safe enough, a certain failure probability exists, and the mobile phone is easy to restart continuously after failure.
Disclosure of Invention
To at least partially solve the existing problems, the present disclosure provides a method, an apparatus, a terminal, and a storage medium for upgrading memory firmware of a terminal.
The present disclosure adopts the following technical solutions.
In some embodiments, the present disclosure provides a memory firmware upgrade method of a terminal, including:
acquiring target information of a memory, wherein the target information comprises: firmware information of the memory;
determining whether the firmware of the memory needs to be upgraded according to the target information of the memory;
if the memory firmware is required to be upgraded, judging whether a preset mark exists or not;
if the preset identifier exists, the memory firmware is not updated;
if the preset identifier does not exist, the preset identifier is created according to the target information of the memory, and the memory firmware is updated.
In some embodiments, the present disclosure provides a memory firmware upgrade apparatus of a terminal, including:
an acquisition unit configured to acquire target information of a memory, the target information including: firmware information of the memory;
the determining unit is used for determining whether the firmware of the memory needs to be upgraded according to the target information of the memory;
the judging unit is used for judging whether a preset mark exists or not if the memory firmware needs to be upgraded;
the control unit is used for not upgrading the memory firmware if the preset identifier exists;
and the control unit is also used for creating the preset identifier according to the memory target information and upgrading the memory firmware if the preset identifier does not exist.
In some embodiments, the present disclosure provides a terminal comprising: at least one memory and at least one processor;
the memory is used for storing program codes, and the processor is used for calling the program codes stored in the memory to execute the method.
In some embodiments, the present disclosure provides a storage medium for storing program code for performing the above-described method.
According to the memory firmware upgrading method of the terminal, whether the preset identifier exists is determined before the memory is subjected to firmware upgrading, if the preset identifier exists, the firmware is not upgraded, if the preset identifier does not exist, the preset identifier is created and the firmware is upgraded, so that when the firmware is upgraded in a failure mode, the firmware is not upgraded again because the preset identifier is created, and the method is not restarted repeatedly after the firmware is upgraded in a failure mode.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
Fig. 1 is a flowchart of a memory firmware upgrade method of a terminal according to an embodiment of the present disclosure.
Fig. 2 is a schematic diagram of a firmware upgrade method of a terminal according to an embodiment of the present disclosure before entering a Recovery mode.
Fig. 3 is a schematic diagram of a firmware upgrade method of a terminal according to an embodiment of the present disclosure after entering a Recovery mode.
FIG. 4 is a schematic diagram of a firmware upgrade performed in Recovery mode according to an embodiment of the present disclosure.
Fig. 5 is a schematic diagram of the composition of a memory firmware upgrade apparatus of a terminal according to an embodiment of the present disclosure.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in and/or in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "a" and "an" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be construed as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
The following describes in detail the scheme provided by the embodiment of the present application with reference to the accompanying drawings.
In the prior art, a UFS memory is commonly used in terminals such as mobile phones, firmware of the UFS memory is not upgraded after a chip leaves a factory, and the currently commonly used UFS firmware upgrading method has a certain failure probability, and is repeatedly upgraded and restarted after failure.
In order to at least partially solve the problems in the prior art and improve the security of the memory firmware upgrading process, an embodiment of the present disclosure provides a method for upgrading the memory firmware of a terminal.
As shown in fig. 1, fig. 1 is a flowchart of a memory firmware upgrade method of a terminal according to an embodiment of the present disclosure, including the steps of:
s11: acquiring target information of a memory;
specifically, the memory in the embodiment of the present disclosure is a memory of a terminal, and the terminal may be, for example, a mobile phone, a tablet, etc., the terminal may be a terminal of an android system, and the memory may be a UFS memory. The target information includes: firmware information of the memory. In some embodiments, the target information may also include device information for the memory, such as the model number and manufacturer of the memory, etc. In some embodiments, the firmware information includes a current firmware version of the memory.
S12: and determining whether the firmware of the memory needs to be upgraded according to the target information of the memory.
In some embodiments, the memory firmware may be determined to need to be upgraded by comparing the current firmware version of the memory with the version of the firmware to be upgraded, if the current firmware version is lower than the version of the firmware to be upgraded.
S13: if the memory firmware needs to be updated, judging whether a preset identifier exists.
In some embodiments, the preset identifier may be a file, that is, the target information may be recorded in the file, or the target information may be recorded directly by using a file name, for example, the target information is directly used as the file name of the file, so that only whether the file with the name of the target information is detected is needed, so that the search speed can be greatly improved, and whether the identifier exists can be quickly determined. In some embodiments, determining whether the preset identifier exists includes determining whether the preset identifier of the current firmware information including the memory exists, that is, determining whether the identifier exists first, and then determining whether the identifier of the current firmware information including the memory exists.
S14: if the preset identifier exists, the firmware of the memory is not upgraded.
In some embodiments, the preset identifier is used for recording whether the current firmware of the memory is updated with firmware and the firmware is updated with the firmware fails, that is, firmware information with the update failure is recorded in the preset identifier, so that when the firmware is updated, if the firmware information in the identifier is the same as the firmware information of the memory, the identifier is the preset identifier, which indicates that the current firmware of the memory is updated with the firmware but fails, so that the current firmware is not updated again, and repeated restarting caused by repeated updating after the firmware updating fails is avoided.
S15: if the preset identifier does not exist, the preset identifier is created according to the target information of the memory, and the memory firmware is updated.
Specifically, in some embodiments, if there is no preset identifier indicating that firmware upgrade has not been performed on the memory, the firmware upgrade may be performed, before the firmware upgrade, the preset identifier is created and the current firmware information is recorded by the preset identifier, which indicates that the current firmware is upgraded, and then the firmware upgrade is performed, so if the firmware upgrade is successfully performed from firmware 1 to firmware 2, the firmware information of firmware 1 is recorded in the preset identifier, and when the firmware upgrade is performed next time, the firmware upgrade is desired to be performed from firmware 2 to firmware 3, the firmware upgrade may be performed normally although the firmware upgrade is performed although the firmware information of firmware 1 is recorded in the identifier before the upgrade is performed, and if the firmware upgrade is failed, the firmware upgrade from firmware 1 to firmware 2 is not attempted again because the firmware information of firmware 1 is already recorded in the preset identifier.
In some embodiments, the firmware upgrade program of the memory and the firmware to be upgraded are integrated in the operating system of the terminal. In the prior art, after the memory leaves the factory, the memory cannot be upgraded, and in the embodiment of the disclosure, the firmware to be upgraded and the firmware to be upgraded are integrated in the operating system of the terminal, so that the terminal can directly upgrade the firmware of the memory without using a professional upgrade tool, and the operation of a user is facilitated.
In some embodiments of the present disclosure, when a terminal is started, target information of a memory is obtained, and whether the firmware of the memory needs to be upgraded is determined according to the target information of the memory. Specifically, before the firmware of the memory is upgraded, whether the firmware is upgraded is judged, when the opportunity of judging whether the firmware is upgraded is that the memory is started, the desktop is not accessed, and the application program is prevented from accessing the memory when the firmware is upgraded, so that the judgment is performed when the terminal is started, and if the firmware is required to be upgraded, the desktop is not accessed, so that the application program is prevented from accessing the memory.
In some embodiments, determining whether an upgrade to the memory firmware is required based on target information of the memory includes: acquiring white list information and a version of firmware to be upgraded; if the version of the firmware to be upgraded and the target information of the memory meet the requirements of the white list information, the firmware of the memory needs to be upgraded; wherein the whitelist information includes: before and after firmware versions allowing upgrading, or device information allowing upgrading and before and after firmware versions allowing upgrading; the target information of the memory includes: firmware information of the memory, or firmware information of the memory and device information of the memory; the firmware information of the memory includes: the current firmware version of the memory.
Specifically, in some embodiments, the white list records which memories can be upgraded with firmware, and to which versions the firmware can be upgraded from, if the target information of the memory required to be upgraded with firmware accords with the condition recorded in the white list information that the firmware is allowed to be upgraded, the firmware can be upgraded, and if the device information of the memory does not accord with the condition recorded in the white list information that the firmware is allowed to be upgraded, the firmware is not upgraded, so that the condition that the firmware is not upgraded due to incompatibility is prevented.
In some embodiments, the memory firmware is upgraded in Recovery mode. Specifically, the Recovery mode is a reduced mode of the Android system, only the kernel and a small number of service programs of the operating system are loaded in the mode, the complete Android system in the normal mode is not loaded, and the mode mainly performs some work related to system maintenance. The reason for doing so is to ensure that the memory is hung into the read-write command of the memory in the upgrading process to prevent the firmware upgrading from being interfered, and the firmware upgrading is abnormal, because a plurality of read-write operations are carried out on the memory in the starting process of the normal mode, and the Recovery mode has no read-write operation on the memory after the starting, thereby ensuring the safety of the memory firmware upgrading and effectively reducing the probability of upgrading failure.
In some embodiments, upgrading the memory firmware includes: generating a firmware upgrading instruction, and controlling the terminal to enter a first mode; and reading the firmware upgrading instruction and upgrading the memory firmware in the first mode. In some embodiments, the first mode is a Recovery mode, a firmware upgrade instruction is generated after firmware upgrade is determined, and firmware upgrade is performed after the firmware upgrade instruction is detected after the firmware upgrade is restarted to enter the Recovery mode.
In some embodiments, upgrading memory firmware in a first mode includes: the method comprises the steps of obtaining firmware to be upgraded, reading the firmware to be upgraded into a user space of a memory, copying the firmware to be upgraded from the user space to a kernel space, writing the firmware to be upgraded into a memory, and upgrading the memory firmware.
Specifically, in some embodiments, the firmware to be upgraded may be pre-stored in a memory of the terminal, and the firmware of the memory needs to be refreshed when the firmware is upgraded, so that the firmware to be upgraded needs to be put into the memory first, the memory includes a user space and a kernel space, an application program usually runs in the user space, an operating system and a driver program run in the kernel space, the user space has different rights from the kernel space, the kernel space has rights of all hardware devices, the user space has only rights of common hardware, and higher rights are needed when the firmware is upgraded to the memory, so that the firmware is required to run in the kernel space.
In some embodiments, obtaining firmware to be upgraded, and reading the firmware to be upgraded into a user space of a memory includes: reading target information of the memory; determining the storage position of firmware to be upgraded from a white list according to the target information of the memory; and reading the firmware to be upgraded into a user space of the memory according to the storage position. Specifically, in some embodiments, after entering the first mode, target information of the memory is read first, and according to the target information, a corresponding storage location of the firmware to be upgraded is searched in the white list, in some embodiments, a plurality of firmware programs may be provided in the terminal, but the firmware programs that can be used for upgrading of the memory need to meet the requirement of the white list, so that the firmware programs that can be upgraded, namely the firmware to be upgraded, are searched from the white list first, the storage location of the firmware to be upgraded is recorded in the white list, and the firmware to be upgraded is read into the memory according to the storage location.
In some embodiments, before the firmware is upgraded, the firmware to be upgraded is obtained, and the manner of obtaining the firmware to be upgraded includes: and acquiring a system upgrade package in an Over The Air (OTA) mode, wherein The firmware to be upgraded is integrated in The system upgrade package. In some embodiments, the terminal is restarted after the firmware of the memory is upgraded.
In order to better illustrate the methods set forth by the embodiments of the present disclosure, a specific embodiment is set forth below. Referring to fig. 2 and 3, the memory is illustrated as UFS memory in the present embodiment, and the terminal is illustrated as a mobile phone, but this illustration is only illustrative and not limiting.
In this embodiment, the UFS firmware upgrading program and the target UFS firmware to be upgraded are integrated in a formal user system software version, and after the normal mode of the mobile phone is started, the information of the current UFS device of the mobile phone, including the manufacturer name, the device name and the firmware version number information, is read. A whitelist of firmware upgrades may be built into the system, only the firmware versions in the whitelist are upgraded. The white list contains manufacturer information, device information and firmware version information of all UFS devices supporting firmware upgrade. The firmware version information contains the information of new and old firmware versions before and after upgrading, namely, upgrading from a certain old version to a certain new version is allowed.
Judging whether the current UFS device needs to be upgraded with firmware, if not, doing no operation, continuing normal starting, otherwise, continuing to next step, judging whether a UFS upgrading identification file recorded with the current firmware version number and the UFS device number exists, and if the identification file exists, indicating that the upgrading has been performed once, but the upgrading is not successful, not performing the upgrading, and continuing normal starting. The presence of this identification document proves that this firmware version has been upgraded once. Even if the firmware upgrade fails due to some abnormal condition, the firmware version number of the UFS is still the old version number before the upgrade, if this flag file is not present, the upgrade operation is entered again, and this may occur as a dead loop.
With continued reference to fig. 2, if the UFS upgrade identification file with the current firmware version number and the device number is not recorded, a character string is formed with the UFS device number and the firmware version number as a file name, and the UFS upgrade identification file is created.
And setting a UFS upgrading command, and restarting to enter a Recovery mode.
Referring to fig. 3, entering a Recovery mode, detecting a UFS firmware upgrade command, performing a firmware upgrade operation of the UFS, clearing a Recovery flag after the UFS firmware upgrade is completed, and restarting to enter a normal mode.
For the process of firmware upgrade in Recovery mode, please refer to fig. 4, read the device information of UFS, including manufacturer information, device information (such as model) and current firmware version, obtain the corresponding location of the firmware file to be upgraded stored from the white list, and read the content of the target file into the memory, specifically in the user space of the memory.
The firmware to be upgraded is transferred from the user space to the kernel space, for example, the following manner can be adopted: opening a device file of the UFS, sending an ioctl command to a device handle, wherein the specific command word is SG_IO, and the transferred parameters comprise a command word for upgrading the UFS firmware and an address of the UFS firmware in a memory, so that the command for upgrading the UFS firmware and related information are transferred from a user space to a kernel space.
The firmware to be upgraded is then written to the UFS device, for example: in the process of ioctl, the kernel space receives the SG_IO command word and parameters, writes the command word and the firmware content of the UFS firmware upgrade into the UFS, and completes the operation of the firmware upgrade of the UFS.
After the firmware is upgraded, restarting to enter a normal starting mode, wherein the UFS device is new in firmware, and the whole upgrading process is completed.
And after the normal mode is re-entered in the restarting process, the firmware version number of the UFS device is read again, and if the upgrade is successful, the new firmware version number after the upgrade is read for the time, and the normal starting is continued. If the upgrade fails, the old firmware version number before the upgrade is read, and then whether the upgrade identification file exists is judged, and the upgrade flow is stopped and normal starting is continued because the upgrade identification file exists, so that the infinite restarting cycle caused by the upgrade failure of the memory firmware is avoided.
The present disclosure also proposes a memory firmware upgrade apparatus of a terminal, as shown in fig. 5, including:
an acquisition unit 10 for acquiring target information of the memory, the target information including: firmware information of the memory;
a determining unit 20, configured to determine whether the firmware of the memory needs to be upgraded according to the target information of the memory;
a judging unit 30, configured to judge whether a preset identifier exists if the memory firmware needs to be upgraded;
the control unit 40 is configured to not upgrade the memory firmware if the preset identifier exists;
the control unit 40 is further configured to create the preset identifier according to the memory target information if the preset identifier does not exist, and upgrade the memory firmware.
For embodiments of the device, reference is made to the description of method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the modules illustrated as separate modules may or may not be separate. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present application without undue burden.
The method and apparatus of the present disclosure are described above based on the embodiments and applications. In addition, the present disclosure also provides a terminal and a storage medium, which are described below.
Referring now to fig. 6, a schematic diagram of an electronic device (e.g., a terminal device or server) 800 suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in the drawings is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
The electronic device 800 may include a processing means (e.g., a central processor, a graphics processor, etc.) 801 that may perform various appropriate actions and processes in accordance with programs stored in a Read Only Memory (ROM) 802 or loaded from a storage 808 into a Random Access Memory (RAM) 803. In the RAM803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
In general, the following devices may be connected to the I/O interface 805: input devices 806 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 807 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, etc.; storage 808 including, for example, magnetic tape, hard disk, etc.; communication means 809. The communication means 809 may allow the electronic device 800 to communicate wirelessly or by wire with other devices to exchange data. While an electronic device 800 having various means is shown, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication device 809, or installed from storage device 808, or installed from ROM 802. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 801.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform the methods of the present disclosure described above.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, there is provided a memory firmware upgrade method of a terminal, including:
acquiring target information of a memory, wherein the target information comprises: firmware information of the memory;
determining whether the firmware of the memory needs to be upgraded according to the target information of the memory;
if the memory firmware is required to be upgraded, judging whether a preset mark exists or not;
if the preset identifier exists, the memory firmware is not updated;
if the preset identifier does not exist, the preset identifier is created according to the target information of the memory, and the memory firmware is updated.
According to one or more embodiments of the present disclosure, there is provided a memory firmware upgrade method of a terminal, in which a firmware upgrade program of a memory and a firmware to be upgraded are integrated in an operating system of the terminal.
According to one or more embodiments of the present disclosure, a method for upgrading memory firmware of a terminal is provided, when the terminal is started, target information of a memory is obtained, and whether the memory firmware needs to be upgraded is determined according to the target information of the memory.
According to one or more embodiments of the present disclosure, there is provided a memory firmware upgrade method of a terminal, which determines whether or not to upgrade memory firmware according to target information of a memory, including:
acquiring white list information and a version of firmware to be upgraded;
if the version of the firmware to be upgraded and the target information of the memory meet the requirements of the white list information, the firmware of the memory needs to be upgraded;
wherein the white list information includes: before and after firmware versions allowing upgrading, or device information allowing upgrading and before and after firmware versions allowing upgrading;
the target information of the memory includes: firmware information of the memory, or firmware information of the memory and device information of the memory;
the firmware information of the memory includes: the current firmware version of the memory.
According to one or more embodiments of the present disclosure, there is provided a memory firmware upgrade method of a terminal, the upgrade of the memory firmware including:
generating a firmware upgrading instruction, and controlling the terminal to enter a first mode;
and reading a firmware upgrading instruction, and upgrading the memory firmware in a first mode.
According to one or more embodiments of the present disclosure, there is provided a memory firmware upgrade method of a terminal, which upgrades memory firmware in a first mode, including:
acquiring firmware to be upgraded, and reading the firmware to be upgraded into a user space of a memory;
copying firmware to be upgraded from a user space to a kernel space;
writing the firmware to be upgraded into the memory to upgrade the firmware of the memory.
According to one or more embodiments of the present disclosure, there is provided a method for upgrading a memory firmware of a terminal, acquiring firmware to be upgraded, and reading the firmware to be upgraded into a user space of a memory, including:
reading target information of a memory;
determining the storage position of firmware to be upgraded from a white list according to target information of a memory;
and reading the firmware to be upgraded into the user space of the memory according to the storage position.
According to one or more embodiments of the present disclosure, there is provided a memory firmware upgrade apparatus of a terminal, including:
an acquisition unit configured to acquire target information of a memory, the target information including: firmware information of the memory;
the determining unit is used for determining whether the firmware of the memory needs to be upgraded according to the target information of the memory;
the judging unit is used for judging whether a preset mark exists or not if the memory firmware needs to be upgraded;
the control unit is used for not upgrading the memory firmware if the preset identifier exists;
and the control unit is also used for creating the preset identifier according to the memory target information and upgrading the memory firmware if the preset identifier does not exist.
According to one or more embodiments of the present disclosure, there is provided a terminal including: at least one memory and at least one processor;
wherein the at least one memory is configured to store program code and the at least one processor is configured to invoke the program code stored by the at least one memory to perform the method of any of the above.
According to one or more embodiments of the present disclosure, there is provided a storage medium for storing program code for performing the above-described method.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.

Claims (10)

1. A method for upgrading memory firmware of a terminal, comprising:
acquiring target information of a memory, wherein the target information comprises: firmware information of the memory;
determining whether the firmware of the memory needs to be upgraded according to the target information of the memory;
if the firmware of the memory needs to be upgraded, judging whether a preset identifier exists, wherein if the identifier exists and the firmware information in the identifier is the same as the firmware information of the memory, the identifier is the preset identifier, and the fact that the current firmware of the memory is upgraded but fails is indicated;
if the preset identifier exists, the memory firmware is not updated;
if the preset identifier does not exist, the preset identifier is created according to the target information of the memory, and the memory firmware is upgraded.
2. The method for upgrading memory firmware of a terminal according to claim 1, wherein,
the firmware upgrading program of the memory and the firmware to be upgraded are integrated in the operating system of the terminal.
3. The method for upgrading memory firmware of a terminal according to claim 1, wherein,
and when the terminal is started, acquiring target information of a memory, and determining whether the memory firmware needs to be upgraded according to the target information of the memory.
4. The memory firmware upgrading method of the terminal according to claim 1, wherein determining whether the memory firmware needs to be upgraded according to target information of a memory comprises:
acquiring white list information and a version of firmware to be upgraded;
if the version of the firmware to be upgraded and the target information of the memory meet the requirements of the white list information, the firmware of the memory needs to be upgraded;
wherein the whitelist information includes: before and after firmware versions allowing upgrading, or device information allowing upgrading and before and after firmware versions allowing upgrading;
the target information of the memory includes: firmware information of the memory, or firmware information of the memory and device information of the memory;
the firmware information of the memory includes: the current firmware version of the memory.
5. The method for upgrading memory firmware of a terminal according to claim 1, wherein upgrading the memory firmware comprises:
generating a firmware upgrading instruction, and controlling the terminal to enter a first mode;
and reading the firmware upgrading instruction and upgrading the memory firmware in the first mode.
6. The method for upgrading memory firmware of a terminal according to claim 5, wherein the upgrading of the memory firmware in the first mode comprises:
acquiring firmware to be upgraded, and reading the firmware to be upgraded into a user space of a memory;
copying the firmware to be upgraded from the user space to a kernel space;
writing the firmware to be upgraded into the memory to upgrade the memory firmware.
7. The method for upgrading memory firmware of a terminal according to claim 6, wherein obtaining firmware to be upgraded, and reading the firmware to be upgraded into a user space of a memory, comprises:
reading target information of the memory;
determining the storage position of firmware to be upgraded from a white list according to the target information of the memory;
and reading the firmware to be upgraded into a user space of the memory according to the storage position.
8. A memory firmware upgrade apparatus of a terminal, comprising:
an acquisition unit configured to acquire target information of a memory, the target information including: firmware information of the memory;
the determining unit is used for determining whether the firmware of the memory needs to be upgraded according to the target information of the memory;
the judging unit is used for judging whether a preset identifier exists or not if the firmware of the memory needs to be upgraded, wherein if the identifier exists and the firmware information in the identifier is the same as the firmware information of the memory, the identifier is the preset identifier, and the fact that the current firmware of the memory is upgraded but fails is indicated;
the control unit is used for not upgrading the memory firmware if the preset identifier exists;
and the control unit is further used for creating the preset identifier according to the memory target information and upgrading the memory firmware if the preset identifier does not exist.
9. A terminal, comprising:
at least one memory and at least one processor;
wherein the at least one memory is configured to store program code, and the at least one processor is configured to invoke the program code stored by the at least one memory to perform the method of any of claims 1 to 7.
10. A storage medium for storing program code for performing the method of any one of claims 1 to 7.
CN202011080247.0A 2020-10-10 2020-10-10 Method and device for upgrading memory firmware of terminal, terminal and storage medium Active CN112181467B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011080247.0A CN112181467B (en) 2020-10-10 2020-10-10 Method and device for upgrading memory firmware of terminal, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011080247.0A CN112181467B (en) 2020-10-10 2020-10-10 Method and device for upgrading memory firmware of terminal, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN112181467A CN112181467A (en) 2021-01-05
CN112181467B true CN112181467B (en) 2023-11-14

Family

ID=73947470

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011080247.0A Active CN112181467B (en) 2020-10-10 2020-10-10 Method and device for upgrading memory firmware of terminal, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN112181467B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113239363A (en) * 2021-06-01 2021-08-10 长江存储科技有限责任公司 Firmware updating method, device, equipment, readable storage medium and memory system

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102033770A (en) * 2010-12-17 2011-04-27 中兴通讯股份有限公司 Touch screen firmware upgrading method and device for mobile terminal
CN105446772A (en) * 2015-11-16 2016-03-30 青岛海信移动通信技术股份有限公司 System upgrading method and apparatus
EP3043512A1 (en) * 2013-10-10 2016-07-13 ZTE Corporation Firmware upgrade method and system, upper computer and optical module
CN105955784A (en) * 2016-05-10 2016-09-21 广州日滨科技发展有限公司 Elevator program upgrade and backup methods and systems, and mobile terminals
CN105975300A (en) * 2016-04-29 2016-09-28 乐视控股(北京)有限公司 System upgrading method and device
CN106445621A (en) * 2016-10-31 2017-02-22 乐视控股(北京)有限公司 Upgrading method and device of application and electronic device
CN106610840A (en) * 2015-10-22 2017-05-03 深圳市中兴微电子技术有限公司 FOTA (Firmware Over-The-Air) upgrade method and system
CN106843957A (en) * 2017-01-17 2017-06-13 青岛海信移动通信技术股份有限公司 System firmware upgrade method and device
CN108228230A (en) * 2017-12-28 2018-06-29 努比亚技术有限公司 Upgrade method, terminal and the computer readable storage medium of UFS firmwares
CN108228222A (en) * 2017-12-27 2018-06-29 努比亚技术有限公司 A kind of upgrade method of firmware data, mobile terminal and computer storage media
US10042634B1 (en) * 2015-12-28 2018-08-07 EMC IP Holding Company LLC Storage management system and method
CN111158729A (en) * 2019-12-30 2020-05-15 深圳Tcl数字技术有限公司 System upgrading method, device, equipment and storage medium
CN111367545A (en) * 2020-02-13 2020-07-03 北京三快在线科技有限公司 Terminal upgrading method and device, server, terminal equipment and readable storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020188934A1 (en) * 2001-06-12 2002-12-12 Nortel Networks Limited Method and system for upgrading existing firmware on third party hardware
US8250566B2 (en) * 2007-09-27 2012-08-21 Mark Zusman Automated software upgrade and distribution

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102033770A (en) * 2010-12-17 2011-04-27 中兴通讯股份有限公司 Touch screen firmware upgrading method and device for mobile terminal
EP3043512A1 (en) * 2013-10-10 2016-07-13 ZTE Corporation Firmware upgrade method and system, upper computer and optical module
CN106610840A (en) * 2015-10-22 2017-05-03 深圳市中兴微电子技术有限公司 FOTA (Firmware Over-The-Air) upgrade method and system
CN105446772A (en) * 2015-11-16 2016-03-30 青岛海信移动通信技术股份有限公司 System upgrading method and apparatus
US10042634B1 (en) * 2015-12-28 2018-08-07 EMC IP Holding Company LLC Storage management system and method
CN105975300A (en) * 2016-04-29 2016-09-28 乐视控股(北京)有限公司 System upgrading method and device
CN105955784A (en) * 2016-05-10 2016-09-21 广州日滨科技发展有限公司 Elevator program upgrade and backup methods and systems, and mobile terminals
CN106445621A (en) * 2016-10-31 2017-02-22 乐视控股(北京)有限公司 Upgrading method and device of application and electronic device
CN106843957A (en) * 2017-01-17 2017-06-13 青岛海信移动通信技术股份有限公司 System firmware upgrade method and device
CN108228222A (en) * 2017-12-27 2018-06-29 努比亚技术有限公司 A kind of upgrade method of firmware data, mobile terminal and computer storage media
CN108228230A (en) * 2017-12-28 2018-06-29 努比亚技术有限公司 Upgrade method, terminal and the computer readable storage medium of UFS firmwares
CN111158729A (en) * 2019-12-30 2020-05-15 深圳Tcl数字技术有限公司 System upgrading method, device, equipment and storage medium
CN111367545A (en) * 2020-02-13 2020-07-03 北京三快在线科技有限公司 Terminal upgrading method and device, server, terminal equipment and readable storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
An Efficient and Dependable FOTA-Based Upgrade Mechanism for In-Vehicle Systems;Zhenjiang Wang;《 2019 International Conference on Internet of Things (iThings) and IEEE Green Computing and Communications (GreenCom) and IEEE Cyber, Physical and Social Computing (CPSCom) and IEEE Smart Data (SmartData)》;全文 *
基于TFTP与AES的嵌入式设备远程固件升级;方兵兵;《数据通信》(第2期);全文 *
嵌入式固件远程升级技术的研究与实现;王广辉;《中国优秀硕士学位论文全文数据库 (信息科技辑)》(第1期);全文 *

Also Published As

Publication number Publication date
CN112181467A (en) 2021-01-05

Similar Documents

Publication Publication Date Title
CN106293507B (en) Electronic device with external memory and method of operating the same
CN110502357B (en) Stack backtracking method, device, medium and equipment
US20120102477A1 (en) Firmware update method and apparatus for a mobile device
CN109964227B (en) Method and terminal for updating SELinux security policy
KR100988157B1 (en) Method and apparatus for detecting memory device configuration, and computer readable medium containing instructions for performing method for detecting memory device configuration
KR101674934B1 (en) Apparatus and method of reporting exception
CN111459523A (en) Image quality chip software upgrading method and device, electronic equipment and storage medium
CN110457049B (en) Method and device for realizing plug-in automation, electronic equipment and storage medium
CN115328563B (en) System starting method and electronic equipment
CN111240766B (en) Application starting method and device, electronic equipment and computer readable storage medium
CN110673986A (en) Memory operation abnormity capturing method, device, terminal and storage medium
CN111079125A (en) Method and device for calling third-party library dynamic lifting authority by application program
CN112181467B (en) Method and device for upgrading memory firmware of terminal, terminal and storage medium
CN114780019A (en) Electronic device management method and device, electronic device and storage medium
CN111177732B (en) System debugging mode control method and system and electronic equipment
CN116700768B (en) Application processing method and related device
CN104298618A (en) Instruction processing method and device for intelligent terminal
KR20190021773A (en) Electronic device and method for operating data of the same
CN111367720A (en) Data protection method and device, electronic equipment and computer readable storage medium
CN114880003A (en) System upgrading method of intelligent terminal, intelligent terminal and storage medium
CN114296764A (en) System upgrading method and device, storage medium and electronic equipment
CN113760631A (en) Page loading duration determination method, device, equipment and storage medium
CN111367555B (en) Assertion method, assertion device, electronic equipment and computer readable medium
CN115562697B (en) Upgrade method, device and storage medium
CN112559394B (en) System library access method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant