CN116301973A - Firmware upgrading method, device, equipment and readable storage medium - Google Patents

Firmware upgrading method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN116301973A
CN116301973A CN202310132737.8A CN202310132737A CN116301973A CN 116301973 A CN116301973 A CN 116301973A CN 202310132737 A CN202310132737 A CN 202310132737A CN 116301973 A CN116301973 A CN 116301973A
Authority
CN
China
Prior art keywords
firmware
upgrading
upgrade
slot
medium
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
CN202310132737.8A
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202310132737.8A priority Critical patent/CN116301973A/en
Publication of CN116301973A publication Critical patent/CN116301973A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The invention provides a firmware upgrading method, a device, equipment and a readable storage medium, relating to the field of firmware upgrading, wherein the method comprises the following steps: responding to a firmware upgrading instruction, and acquiring starting information in a key starting area of a first medium; determining a target upgrading slot area from all upgrading slot areas of the second medium according to the starting information; obtaining firmware to be upgraded from the target upgrade slot area, and upgrading the firmware to be upgraded according to the firmware upgrade instruction; the starting information is obtained by calling a firmware boot program FBL from a read-only slot area of the first medium; the read-only slot area also stores read-only function firmware for offline programming; the capacity of the first medium is smaller than the capacity of the second medium; the firmware upgrade speed of the first medium is smaller than the firmware upgrade speed of the second medium. The invention not only can ensure the factory offline programming of the solid state disk, but also can improve the upgrading efficiency of the firmware, thereby reducing the influence of the firmware upgrading on the operation business of the user.

Description

Firmware upgrading method, device, equipment and readable storage medium
Technical Field
The present invention relates to the field of firmware upgrade, and in particular, to a method, apparatus, device and readable storage medium for firmware upgrade.
Background
At present, firmware to be upgraded is usually stored in a Norflash medium, however, the processing mode can reduce the speed of erasing redundant files after upgrading the firmware by the solid state disk, and also reduce the speed of writing corresponding upgrade files, so that the firmware upgrade time is too long, and the storage service is abnormal.
Disclosure of Invention
The invention provides a firmware upgrading method, a device, equipment and a readable storage medium, which are used for solving the technical defect of realizing quick firmware upgrading under the condition of ensuring industrial offline programming in the prior art.
In a first aspect, the present invention provides a firmware upgrade method, including:
responding to a firmware upgrading instruction, and acquiring starting information in a key starting area of a first medium;
determining a target upgrade slot area from all upgrade slot areas of the second medium according to the starting information;
obtaining firmware to be upgraded from the target upgrade slot area, and upgrading the firmware to be upgraded according to the firmware upgrade instruction;
The starting information is obtained by calling a firmware boot program FBL from a read-only slot area of the first medium;
the read-only slot area also stores read-only function firmware for offline programming;
the capacity of the first medium is smaller than the capacity of the second medium;
the firmware upgrading speed of the first medium is smaller than that of the second medium.
According to the firmware upgrading method provided by the invention, after the target upgrading slot area is determined from all upgrading slot areas of the second medium, the method further comprises the following steps:
and calling the FCC micro-code area of the first medium under the condition that the target upgrading slot position area is in a power-on running state so as to establish a message channel for reading data with the target upgrading slot position area according to the FCC micro-code area.
According to the firmware upgrading method provided by the invention, the firmware to be upgraded is obtained from the target upgrading slot area, and is upgraded according to the firmware upgrading instruction, and the method comprises the following steps:
according to the message channel, acquiring the firmware to be upgraded from the main backup or the slave backup of the target upgrading slot area;
according to the firmware upgrading instruction, version upgrading parameters matched with version information carried by the firmware upgrading instruction are obtained from a preset server;
And upgrading the firmware to be upgraded according to the version upgrading parameters.
According to the firmware upgrading method provided by the invention, before the firmware to be upgraded is upgraded according to the version upgrading parameter, the method further comprises the following steps:
and under the condition that the firmware to be upgraded cannot be obtained from the main backup or the slave backup of the target upgrading slot area, obtaining the read-only function firmware so as to load and operate the solid state disk according to the read-only function firmware.
According to the firmware upgrading method provided by the invention, after the firmware to be upgraded is upgraded according to the firmware upgrading instruction, the method further comprises the following steps:
under the condition that firmware upgrading is completed, upgrading completion information is generated, wherein the upgrading completion information at least comprises upgrading slot area information where the upgraded firmware is located;
updating the starting information according to the upgrading completion information, and generating a restarting instruction;
and responding to the restarting instruction, and acquiring the updated firmware from an updating slot area where the updated firmware is located according to updated starting information so as to load and operate the solid state disk according to the updated firmware.
According to the firmware upgrading method provided by the invention, the determining of the target upgrading slot area from all the upgrading slot areas of the second medium according to the starting information comprises the following steps:
Determining a target upgrade slot area from all upgrade slot areas of the second medium under the condition that the upgrade slot areas matched with the starting information exist in all upgrade slot areas;
under the condition that the upgrading slot areas matched with the starting information do not exist in all the upgrading slot areas, determining a target upgrading slot area from all the upgrading slot areas of the second medium according to the firmware upgrading characteristics in the firmware upgrading instruction;
the firmware upgrade feature includes a firmware protocol version and a target upgrade power consumption.
According to the firmware upgrading method provided by the invention, the determining of the target upgrading slot area from all the upgrading slot areas of the second medium according to the firmware upgrading characteristics in the firmware upgrading instruction comprises the following steps:
determining a preset protocol version corresponding to each upgrading slot region and a preset power consumption interval corresponding to each upgrading slot region;
under the condition that the firmware protocol version of the firmware upgrading feature is matched with a preset protocol version corresponding to any upgrading slot position area, determining the upgrading slot position area as a target upgrading slot position area;
determining target upgrading power consumption of the firmware upgrading feature under the condition that the firmware protocol version of the firmware upgrading feature is not matched with the preset protocol version corresponding to all upgrading slot areas;
And under the condition that the target upgrading power consumption falls into a preset power consumption interval corresponding to any upgrading slot position area, determining the upgrading slot position area as a target upgrading slot position area.
According to the firmware upgrading method provided by the invention, after responding to the firmware upgrading instruction, the method further comprises the following steps:
and determining the read-only slot area of the first medium according to the boot program BOOTROM.
In a second aspect, there is provided a firmware upgrade apparatus, comprising:
an acquisition unit: the method comprises the steps of responding to a firmware upgrading instruction, and acquiring starting information in a key starting area of a first medium;
a determination unit: the target upgrading slot position area is determined from all upgrading slot position areas of the second medium according to the starting information;
an upgrading unit: the method comprises the steps of obtaining firmware to be upgraded from the target upgrading slot area, and upgrading the firmware to be upgraded according to the firmware upgrading instruction;
the starting information is obtained by calling a firmware boot program FBL from a read-only slot area of the first medium;
the read-only slot area also stores read-only function firmware for offline programming;
the capacity of the first medium is smaller than the capacity of the second medium;
The firmware upgrading speed of the first medium is smaller than that of the second medium.
In a third aspect, the present invention further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the firmware upgrade method when executing the program.
In a fourth aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a firmware upgrade method as described in any of the above.
The invention provides a firmware upgrading method, a device, equipment and a readable storage medium, wherein read-only functional firmware for offline programming is stored in a read-only slot area of a first medium, and firmware to be upgraded is stored in a second medium, so that when firmware upgrading is executed, the firmware to be upgraded can be obtained from the second medium, and is upgraded according to a firmware upgrading instruction.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a firmware upgrade method according to the present invention;
FIG. 2 is a schematic flow chart of upgrading the firmware to be upgraded according to the present invention;
FIG. 3 is a second flowchart of a firmware upgrade method according to the present invention;
FIG. 4 is a schematic flow chart of determining a target upgrade slot area according to the start information provided by the present invention;
FIG. 5 is a flow chart of determining a target upgrade slot area according to firmware upgrade features provided by the present invention;
FIG. 6 is a third flowchart of a firmware upgrade method according to the present invention;
FIG. 7 is a schematic diagram of a firmware upgrade apparatus provided by the present invention;
fig. 8 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
When Solid State Disk (SSD) is used in storage, especially in actual factory production, firmware programming and post assembly are required to be performed, factory aging test is performed, and an external offline programming mode can effectively improve production efficiency and simplify flow of enterprises, so that firmware offline programming is required to be performed in a nonvolatile medium Norflash, SSD products can be subjected to continuous online upgrading service due to the characteristic of firmware BUG or updated new products after leaving factories, and online upgrading in a very short time is required to be ensured, so that influence on user service is reduced.
However, when the upgraded firmware is saved to the non-volatile medium Norflash, the slow erasing and writing speed of the upgraded firmware will cause the whole firmware to be upgraded for too long, and cause the abnormality of the enterprise storage service; if all the firmware is written into the second medium of the SSD, the factory offline programming cannot be guaranteed. In order to solve the above technical problems, the present invention provides a firmware upgrading method, a device and a readable storage medium, and fig. 1 is a schematic flow diagram of the firmware upgrading method, and provides a firmware upgrading method, which includes:
Step 101, responding to a firmware upgrading instruction, and acquiring starting information in a key starting area of a first medium;
102, determining a target upgrade slot area from all upgrade slot areas of a second medium according to the starting information;
step 103, obtaining firmware to be upgraded from the target upgrade slot area, and upgrading the firmware to be upgraded according to the firmware upgrade instruction;
the starting information is obtained by calling a firmware boot program FBL from a read-only slot area of the first medium;
the read-only slot area also stores read-only function firmware for offline programming;
the capacity of the first medium is smaller than the capacity of the second medium;
the firmware upgrading speed of the first medium is smaller than that of the second medium.
In step 101, the first medium is a Norflash medium, and the second medium is a Nand medium, and the invention can execute firmware running instructions and firmware upgrading instructions, and by dividing a slot area of the firmware, the invention only supports firmware read-only in a read-only slot area, but cannot support firmware upgrading, and is used for firmware upgrading in an upgrading slot area, specifically, because the read-only slot area is not used for firmware upgrading, in order to save cost, the capacity of the first medium is smaller than the capacity of the second medium, and considering that the capacity of the first medium is not required to be excessively large, the first medium corresponding to the read-only slot area can adopt a chip with a preset capacity or less, and optionally, the preset capacity is 8MB.
Optionally, the firmware upgrading speed of the first medium is smaller than that of the second medium, and the second medium corresponding to the upgrading slot area for firmware upgrading can ensure that the upgrading speed is higher and the storage time is shorter, so that the upgraded firmware is stored in the second medium, and quick firmware upgrading can be realized.
Further, fig. 6 is a third flow chart of the firmware upgrading method provided by the present invention, where the first medium includes a read-only slot area, a key start area, a controller (Flash Channel Controller, FCC) microcode area, and an address map of the first medium, and after receiving a firmware upgrading instruction and responding to the firmware upgrading instruction, start information in the key start area of the first medium is obtained, where the start information is used to obtain positions of the firmware to be upgraded in all upgrade slot areas of the second medium.
It is understood by those skilled in the art that, in the case of the first firmware upgrade, since the second medium does not have the corresponding firmware to be upgraded, the target upgrade slot area may be determined according to the firmware upgrade feature or the form of the designated upgrade slot area, and the firmware upgrade is completed in the target upgrade slot area, after the firmware upgrade is completed, the upgrade completion information corresponding to the start information is generated, which indicates the upgrade slot area stored in the upgraded firmware, so that when the next firmware upgrade operation is performed, the upgrade slot area where the current firmware to be upgraded is located can be obtained according to the start information.
Optionally, after responding to the firmware upgrade instruction, the method includes:
and determining the read-only slot area of the first medium according to the boot program BOOTROM.
In response to the firmware upgrade instruction, when the solid state disk is started, the fixed address where the read-only slot area of the first medium is located is read according to the boot program BOOTROM, namely, the address mapping of the first medium in fig. 6 is realized, further, the starting information is obtained by calling the firmware boot program (Firmware Boot Loader, FBL) from the read-only slot area of the first medium, more particularly, during the starting process, firmware reading is performed from the read-only slot area of the first medium according to a preset strategy, and after the firmware boot program is read, a firmware boot program FBL mirror program is operated, and the firmware boot program FBL reads the starting information in a key starting area of the first medium.
Optionally, the read-only slot area further stores read-only function firmware for offline programming, and by storing the read-only function firmware for offline programming in the read-only slot area of the first medium, firmware upgrading is not required.
In step 102, according to the start information, a target upgrade slot area is determined from all upgrade slot areas of the second medium, alternatively, the upgrade slot area of the present invention may be divided into 2 areas, 3 areas or even more areas, which may be divided according to different upgrade characteristics, or may be divided according to different upgrade versions, so as to divide the upgrade slot area into a plurality of areas, which may provide a personalized upgrade requirement for a user on one hand, and may also timely remedy the upgrade slot area with other upgrade slot areas even with other upgrade slot areas in case that one upgrade slot area fails. Whether the upgrade slot area or the read-only slot area is divided into two parts, wherein one part is a firmware boot program FBL and the other part is used for storing user firmware, and the user firmware can be read-only function firmware or firmware to be upgraded.
Optionally, according to the start-up information, if the position of the firmware to be upgraded in all upgrade slot areas is read from the start-up information, it means that the firmware to be upgraded is kept in the corresponding target upgrade slot area, at this time, the target upgrade slot area may be determined from all upgrade slot areas of the second medium, as shown in fig. 6, in order to further improve the reliability of the firmware to be upgraded in the second medium, when the firmware to be upgraded is stored, the invention adopts a dual backup mechanism, that is, a master backup and a slave backup exist in each upgrade slot area, optionally, the firmware to be upgraded is obtained from the master backup, and if the master backup has a BUG or fails in reading, the firmware to be upgraded is obtained from the slave backup.
In an alternative embodiment, after determining the target upgrade slot area from all upgrade slot areas of the second medium, comprising:
and calling the FCC micro-code area of the first medium under the condition that the target upgrading slot position area is in a power-on running state so as to establish a message channel for reading data with the target upgrading slot position area according to the FCC micro-code area.
The method comprises the steps of firstly ensuring that a target upgrading slot position area is in a power-on running state, optionally ensuring that all upgrading slot position areas are in the power-on running state so as to ensure that the upgrading process is normally and stably carried out, determining whether loading of an FCC microcode area is carried out according to the power-on state and the upgrading slot position area of running firmware, calling the FCC microcode area of a first medium under the condition that the target upgrading slot position area is ensured to be in the power-on running state, initializing related FCC microcode, and establishing a message channel for reading data with the target upgrading slot position area according to the FCC microcode area as shown in figure 6.
In step 103, the firmware to be upgraded is obtained from the target upgrade slot area, and is upgraded according to the firmware upgrade instruction, and the invention reads data based on the message channel constructed in step 102, so as to obtain the firmware to be upgraded corresponding to the start information, wherein the firmware upgrade instruction can include the version to be upgraded, the characteristic to be upgraded, the content to be upgraded, and the like, so as to obtain the corresponding upgrade parameters according to the firmware upgrade instruction, and finally complete the upgrade of the firmware to be upgraded.
The invention provides a firmware upgrading method, a device, equipment and a readable storage medium, wherein read-only functional firmware for offline programming is stored in a read-only slot area of a first medium, and firmware to be upgraded is stored in a second medium, so that when firmware upgrading is executed, the firmware to be upgraded can be obtained from the second medium, and is upgraded according to a firmware upgrading instruction.
Fig. 2 is a schematic flow chart of upgrading the firmware to be upgraded provided in the present invention, where the obtaining the firmware to be upgraded from the target upgrade slot area, upgrading the firmware to be upgraded according to the firmware upgrade instruction, includes:
step 1031, according to the message channel, obtaining the firmware to be upgraded from the primary backup or the secondary backup of the target upgrade slot area;
step 1032, according to the firmware upgrade instruction, obtaining version upgrade parameters matched with version information carried by the firmware upgrade instruction from a preset server;
Step 1033, upgrading the firmware to be upgraded according to the version upgrading parameters.
In step 1031, according to the message channel, the firmware to be upgraded is obtained from the master backup or the slave backup of the target upgrade slot area, where the firmware to be upgraded in the master backup is the same as the firmware to be upgraded in the slave backup, optionally, after the target upgrade slot area is upgraded last time, the upgraded firmware is stored in the target upgrade slot area as the firmware to be upgraded, so as to be upgraded next time.
In step 1032, according to the firmware upgrade instruction, the version upgrade parameter matched with the version information carried by the firmware upgrade instruction is obtained from a preset server, the firmware to be upgraded is the firmware body under the current version, and the version upgrade parameter to be upgraded is also required to be obtained in the invention.
In step 1033, the firmware to be upgraded is upgraded according to the version upgrade parameter, optionally, for example, the version of the firmware to be upgraded is 1.16, and according to the firmware upgrade instruction, the version upgrade parameter matched with the version 1.16 of the firmware upgrade instruction is obtained from a preset server, and the firmware to be upgraded is upgraded according to the version upgrade parameter with the version number of 1.16.
Optionally, before the firmware to be upgraded is upgraded according to the version upgrade parameter, the method further includes:
and under the condition that the firmware to be upgraded cannot be obtained from the main backup or the slave backup of the target upgrading slot area, obtaining the read-only function firmware so as to load and operate the solid state disk according to the read-only function firmware.
In order to prevent the solid state disk from being unable to be normally used due to upgrade failure in the upgrade process, the invention preferably ensures the normal operation of the solid state disk under the condition that the firmware to be upgraded cannot be obtained, and the read-only function firmware is obtained from the read-only slot area of the first medium so as to load and operate the solid state disk according to the read-only function firmware.
Optionally, when firmware is upgraded, an online upgrade mode of continuous service online upgrade (Non-Disruptive Firmware Update, NDFU) can be adopted, and by selecting or determining a target upgrade slot area, the firmware is required to be upgraded quickly so as to minimize the influence on running service, so that the firmware for upgrade needs to be stored in a second medium instead of being stored in Norflash, and the second medium is stored in a single-layer unit (Single Level Cell, SLC) mode, and in such an embodiment, the storage time can be controlled to be 42ms, which is thousands of times faster than the mode of storing the firmware for upgrade in Norflash.
According to the invention, based on offline programming of the first medium, the factory efficiency of the SSD product is improved, and the updated firmware is stored in the Nand nonvolatile medium, so that the rapidity is improved when the firmware is updated, and the influence on the operation business of a user is reduced. The invention divides a plurality of upgrading slot areas and a read-only slot area, wherein read-only firmware of the read-only slot area is used for factory offline programming and is stored in a first medium, and only the factory process of an enterprise is allowed to be modified; the invention also sets a key start information area and an FCC microcode area in the first medium, which are used for reading and loading firmware when the SSD device is started, thereby improving the upgrading rapidity.
Fig. 3 is a second flowchart of a firmware upgrade method according to the present invention, after upgrading the firmware to be upgraded according to the firmware upgrade instruction, the method further includes:
step 201, under the condition that firmware upgrading is completed, upgrading completion information is generated, wherein the upgrading completion information at least comprises upgrading slot area information where the upgraded firmware is located;
step 202, updating the starting information according to the upgrading completion information, and generating a restarting instruction;
and 203, responding to the restarting instruction, and acquiring the updated firmware from the updated slot area where the updated firmware is located according to the updated starting information so as to load and operate the solid state disk according to the updated firmware.
In step 201, under the condition that the firmware upgrade is completed, storing the upgraded firmware to an upgrade slot area where the upgraded firmware is located when lifting, and generating upgrade completion information, where the upgrade completion information at least includes upgrade slot area information where the upgraded firmware is located.
In step 202, the starting information is updated according to the upgrade completion information, and a restart instruction is generated, in order to ensure that the firmware after upgrade is used normally, the firmware after upgrade is tested after upgrade is completed, and in this case, in order to enable the upgrade slot area where the firmware after upgrade is located to be obtained from the second medium when the firmware is operated again, the starting information is updated according to the upgrade completion information, and the restart instruction is generated.
In step 203, in response to the restart instruction, according to the updated start information, the updated firmware is obtained from the updated slot area where the updated firmware is located, so as to load and operate the solid state disk according to the updated firmware, where the restart instruction plays a role in automatic restart in the present invention, after the restart instruction is generated, the updated firmware is obtained from the updated slot area where the updated firmware is located according to the updated start information, where the updated firmware is the firmware that is updated last time and is used for testing whether the firmware is updated successfully and can operate normally.
FIG. 4 is a schematic flow chart of determining a target upgrade slot area according to the start information provided by the present invention, where determining the target upgrade slot area from all upgrade slot areas of the second medium according to the start information includes:
step 1021, determining a target upgrade slot area from all upgrade slot areas of the second medium under the condition that the upgrade slot areas matched with the starting information exist in all upgrade slot areas;
step 1022, determining a target upgrade slot area from all upgrade slot areas of the second medium according to the firmware upgrade feature in the firmware upgrade instruction under the condition that the upgrade slot areas matched with the starting information do not exist in all upgrade slot areas;
the firmware upgrade feature includes a firmware protocol version and a target upgrade power consumption.
Step 1021 discloses a scheme for determining a target upgrade SLOT area, which matches all upgrade SLOT areas through starting information, so as to obtain the target upgrade SLOT area, at this time, upgrade SLOT areas matched with the starting information exist in all upgrade SLOT areas, for example, the starting information includes SLOT3, and SLOT3 in all upgrade SLOT areas is in a state of normal power-on operation, and then the target upgrade SLOT area is determined to be SLOT3.
Step 1022 discloses a case that no upgrade slot area matched with the start information exists in all upgrade slot areas, and this solution is to solve the problem that the upgrade slot area matched with the start information has a fault and cannot be used normally, at this time, according to the firmware upgrade feature in the firmware upgrade instruction, the target upgrade slot area is determined from all upgrade slot areas of the second medium, where the firmware upgrade feature includes a firmware protocol version and target upgrade power consumption.
FIG. 5 is a schematic flow chart of determining a target upgrade slot area according to firmware upgrade features provided by the present invention, where determining the target upgrade slot area from all upgrade slot areas of the second medium according to the firmware upgrade features in the firmware upgrade instruction includes:
step 10221, determining a preset protocol version corresponding to each upgrade slot area and a preset power consumption interval corresponding to each upgrade slot area;
Step 10222, determining the upgrade slot area as a target upgrade slot area when the firmware protocol version of the firmware upgrade feature is matched with a preset protocol version corresponding to any upgrade slot area;
step 10223, determining target upgrade power consumption of the firmware upgrade feature under the condition that the firmware protocol version of the firmware upgrade feature is not matched with the preset protocol version corresponding to all upgrade slot areas;
step 10224, determining the upgrade slot area as a target upgrade slot area under the condition that the target upgrade power consumption falls within a preset power consumption interval corresponding to any upgrade slot area.
In step 10221, determining a preset protocol version corresponding to each upgrade SLOT area and a preset power consumption interval corresponding to each upgrade SLOT area, where in the present invention, the upgrade SLOT areas may be switched, so that each time an upgrade is performed, a protocol version at each time of the upgrade is left in a different upgrade SLOT area, for example, when a version number is 1.2 is performed in SLOT2, a firmware to be upgraded with a version number of 1.2 is maintained in SLOT 2; if the SLOT3 is updated with the version number of 1.5, the firmware to be updated with the version number of 1.5 is maintained in the SLOT 3; upgrade with version number 1.8 is performed on SLOT4, and firmware to be upgraded with version number 1.8 is maintained on SLOT 4.
The preset power consumption interval refers to power consumption estimation during each upgrade, some firmware upgrades may select higher power consumption to improve upgrade efficiency, and some firmware upgrades may select lower power to achieve the purposes of energy saving and emission reduction.
In step 10222, under the condition that the firmware protocol version of the firmware upgrading feature is matched with the preset protocol version corresponding to any upgrading SLOT position area, determining that the upgrading SLOT position area is a target upgrading SLOT position area, and combining with the embodiment in step 10221, if the firmware protocol version of the firmware upgrading feature is 1.8, selecting the firmware to be upgraded in the SLOT4, and determining that the target upgrading SLOT position area is the SLOT4.
In step 10223, if the firmware protocol version of the firmware upgrade feature is not matched with the preset protocol version corresponding to any upgrade SLOT area, determining the target upgrade power consumption of the firmware upgrade feature, and in combination with the embodiment in step 10221, if the firmware protocol version of the firmware upgrade feature is 1.6, in each of SLOT2, SLOT3 and SLOT4, there is no preset protocol version corresponding to the upgrade SLOT area matched with the firmware upgrade feature, and at this time, determining the target upgrade power consumption of the firmware upgrade feature, for example, the target upgrade power consumption is 6W.
In step 10224, when the target upgrade power consumption falls within a preset power consumption interval corresponding to any upgrade SLOT area, determining the upgrade SLOT area as a target upgrade SLOT area, where those skilled in the art understand that the power consumption interval of the preset SLOT2 is 1W to 5W; presetting a power consumption interval of SLOT3 to be 5W to 10W; and if the power consumption interval of the SLOT4 is preset to be 10W to 15W, selecting SLOT3 as a target upgrade SLOT area under the condition that the target upgrade power consumption is 6W.
Fig. 7 is a schematic structural diagram of a firmware upgrading apparatus provided by the present invention, and the present invention discloses a firmware upgrading apparatus, which includes an obtaining unit 1: for obtaining the start-up information in the key start-up area of the first medium in response to the firmware upgrade instruction, the operation principle of the obtaining unit 1 may refer to the foregoing step 101, which is not described herein.
The firmware upgrade apparatus further includes a determination unit 2: for determining the target upgrade slot area from all upgrade slot areas of the second medium according to the start information, the working principle of the determining unit 2 may refer to the foregoing step 102, which is not described herein.
The firmware upgrade apparatus further includes an upgrade unit 3: the working principle of the upgrade unit 3 may refer to the foregoing step 103, which is not described herein again.
The starting information is obtained by calling a firmware boot program FBL from a read-only slot area of the first medium;
the read-only slot area also stores read-only function firmware for offline programming;
the capacity of the first medium is smaller than the capacity of the second medium;
the firmware upgrading speed of the first medium is smaller than that of the second medium.
The invention provides a firmware upgrading method, a device, equipment and a readable storage medium, wherein read-only functional firmware for offline programming is stored in a read-only slot area of a first medium, and firmware to be upgraded is stored in a second medium, so that when firmware upgrading is executed, the firmware to be upgraded can be obtained from the second medium, and is upgraded according to a firmware upgrading instruction.
Fig. 8 is a schematic structural diagram of an electronic device provided by the present invention. As shown in fig. 8, the electronic device may include: processor 810, communication interface (Communications Interface) 820, memory 830, and communication bus 840, wherein processor 810, communication interface 820, memory 830 accomplish communication with each other through communication bus 840. Processor 810 may call logic instructions in memory 830 to perform a firmware upgrade method comprising: responding to a firmware upgrading instruction, and acquiring starting information in a key starting area of a first medium; determining a target upgrade slot area from all upgrade slot areas of the second medium according to the starting information; obtaining firmware to be upgraded from the target upgrade slot area, and upgrading the firmware to be upgraded according to the firmware upgrade instruction; the starting information is obtained by calling a firmware boot program FBL from a read-only slot area of the first medium; the read-only slot area also stores read-only function firmware for offline programming; the capacity of the first medium is smaller than the capacity of the second medium; the firmware upgrading speed of the first medium is smaller than that of the second medium.
Further, the logic instructions in the memory 830 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, the computer program product including a computer program, the computer program being storable on a non-transitory computer readable storage medium, the computer program, when executed by a processor, being capable of executing a firmware upgrade method provided by the above methods, the method comprising: responding to a firmware upgrading instruction, and acquiring starting information in a key starting area of a first medium; determining a target upgrade slot area from all upgrade slot areas of the second medium according to the starting information; obtaining firmware to be upgraded from the target upgrade slot area, and upgrading the firmware to be upgraded according to the firmware upgrade instruction; the starting information is obtained by calling a firmware boot program FBL from a read-only slot area of the first medium; the read-only slot area also stores read-only function firmware for offline programming; the capacity of the first medium is smaller than the capacity of the second medium; the firmware upgrading speed of the first medium is smaller than that of the second medium.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform a firmware upgrade method provided by the above methods, the method comprising: responding to a firmware upgrading instruction, and acquiring starting information in a key starting area of a first medium; determining a target upgrade slot area from all upgrade slot areas of the second medium according to the starting information; obtaining firmware to be upgraded from the target upgrade slot area, and upgrading the firmware to be upgraded according to the firmware upgrade instruction; the starting information is obtained by calling a firmware boot program FBL from a read-only slot area of the first medium; the read-only slot area also stores read-only function firmware for offline programming; the capacity of the first medium is smaller than the capacity of the second medium; the firmware upgrading speed of the first medium is smaller than that of the second medium.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. 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 invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (11)

1. A firmware upgrade method, comprising:
responding to a firmware upgrading instruction, and acquiring starting information in a key starting area of a first medium;
determining a target upgrade slot area from all upgrade slot areas of the second medium according to the starting information;
obtaining firmware to be upgraded from the target upgrade slot area, and upgrading the firmware to be upgraded according to the firmware upgrade instruction;
the starting information is obtained by calling a firmware boot program FBL from a read-only slot area of the first medium;
the read-only slot area also stores read-only function firmware for offline programming;
the capacity of the first medium is smaller than the capacity of the second medium;
the firmware upgrading speed of the first medium is smaller than that of the second medium.
2. The firmware upgrade method of claim 1, wherein after said determining a target upgrade slot area from all upgrade slot areas of the second medium, the method further comprises:
and calling the FCC micro-code area of the first medium under the condition that the target upgrading slot position area is in a power-on running state so as to establish a message channel for reading data with the target upgrading slot position area according to the FCC micro-code area.
3. The firmware upgrade method according to claim 2, wherein the obtaining the firmware to be upgraded from the target upgrade slot area, and upgrading the firmware to be upgraded according to the firmware upgrade instruction, includes:
according to the message channel, acquiring the firmware to be upgraded from the main backup or the slave backup of the target upgrading slot area;
according to the firmware upgrading instruction, version upgrading parameters matched with version information carried by the firmware upgrading instruction are obtained from a preset server;
and upgrading the firmware to be upgraded according to the version upgrading parameters.
4. A firmware upgrade method according to claim 3, further comprising, before said upgrading said firmware to be upgraded according to said version upgrade parameter:
and under the condition that the firmware to be upgraded cannot be obtained from the main backup or the slave backup of the target upgrading slot area, obtaining the read-only function firmware so as to load and operate the solid state disk according to the read-only function firmware.
5. The firmware upgrade method according to claim 1, further comprising, after said upgrading of said firmware to be upgraded according to said firmware upgrade instruction:
Under the condition that firmware upgrading is completed, upgrading completion information is generated, wherein the upgrading completion information at least comprises upgrading slot area information where the upgraded firmware is located;
updating the starting information according to the upgrading completion information, and generating a restarting instruction;
and responding to the restarting instruction, and acquiring the updated firmware from an updating slot area where the updated firmware is located according to updated starting information so as to load and operate the solid state disk according to the updated firmware.
6. The firmware upgrade method of claim 1, wherein the determining a target upgrade slot area from all upgrade slot areas of the second medium according to the start-up information comprises:
determining a target upgrade slot area from all upgrade slot areas of the second medium under the condition that the upgrade slot areas matched with the starting information exist in all upgrade slot areas;
under the condition that the upgrading slot areas matched with the starting information do not exist in all the upgrading slot areas, determining a target upgrading slot area from all the upgrading slot areas of the second medium according to the firmware upgrading characteristics in the firmware upgrading instruction;
The firmware upgrade feature includes a firmware protocol version and a target upgrade power consumption.
7. The firmware upgrade method of claim 6, wherein said determining a target upgrade slot area from all upgrade slot areas of the second medium according to firmware upgrade features in the firmware upgrade instructions comprises:
determining a preset protocol version corresponding to each upgrading slot region and a preset power consumption interval corresponding to each upgrading slot region;
under the condition that the firmware protocol version of the firmware upgrading feature is matched with a preset protocol version corresponding to any upgrading slot position area, determining the upgrading slot position area as a target upgrading slot position area;
determining target upgrading power consumption of the firmware upgrading feature under the condition that the firmware protocol version of the firmware upgrading feature is not matched with the preset protocol version corresponding to all upgrading slot areas;
and under the condition that the target upgrading power consumption falls into a preset power consumption interval corresponding to any upgrading slot position area, determining the upgrading slot position area as a target upgrading slot position area.
8. The firmware upgrade method of claim 1, wherein after responding to the firmware upgrade instruction, the method further comprises:
And determining the read-only slot area of the first medium according to the boot program BOOTROM.
9. A firmware upgrade apparatus, comprising:
an acquisition unit: the method comprises the steps of responding to a firmware upgrading instruction, and acquiring starting information in a key starting area of a first medium;
a determination unit: the target upgrading slot position area is determined from all upgrading slot position areas of the second medium according to the starting information;
an upgrading unit: the method comprises the steps of obtaining firmware to be upgraded from the target upgrading slot area, and upgrading the firmware to be upgraded according to the firmware upgrading instruction;
the starting information is obtained by calling a firmware boot program FBL from a read-only slot area of the first medium;
the read-only slot area also stores read-only function firmware for offline programming;
the capacity of the first medium is smaller than the capacity of the second medium;
the firmware upgrading speed of the first medium is smaller than that of the second medium.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the firmware upgrade method of any of claims 1-8 when the program is executed by the processor.
11. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the firmware upgrade method of any of claims 1-8.
CN202310132737.8A 2023-02-17 2023-02-17 Firmware upgrading method, device, equipment and readable storage medium Pending CN116301973A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310132737.8A CN116301973A (en) 2023-02-17 2023-02-17 Firmware upgrading method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310132737.8A CN116301973A (en) 2023-02-17 2023-02-17 Firmware upgrading method, device, equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN116301973A true CN116301973A (en) 2023-06-23

Family

ID=86817823

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310132737.8A Pending CN116301973A (en) 2023-02-17 2023-02-17 Firmware upgrading method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN116301973A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117312055A (en) * 2023-11-16 2023-12-29 荣耀终端有限公司 Data backup method and related device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117312055A (en) * 2023-11-16 2023-12-29 荣耀终端有限公司 Data backup method and related device
CN117312055B (en) * 2023-11-16 2024-04-19 荣耀终端有限公司 Data backup method and related device

Similar Documents

Publication Publication Date Title
CN102023908B (en) Method and device for backing up boot program
CN110347414A (en) Firmware update, device, equipment and computer readable storage medium
CN105930236A (en) Application program version returning method based on BMS Bootloaderupgrade
US11314665B2 (en) Information processing system, information processing device, BIOS updating method for information processing device, and BIOS updating program for information processing device
CN113110891B (en) Firmware loading method and device for solid state disk, computer equipment and storage medium
CN116301973A (en) Firmware upgrading method, device, equipment and readable storage medium
CN106775674B (en) Equipment based on universal boot loader and starting method thereof
CN111124509B (en) Server starting method and device
CN108733517A (en) SSD firmware upgrades guard method and device
CN111026417A (en) Embedded equipment upgrading method and embedded equipment
CN109634781A (en) One kind is based on embedded program two-region Backup Images system and starting method
CN112433769A (en) BMC starting method and device, computer equipment and storage medium
CN105468390B (en) BOOT online upgrading device and method
CN110597532A (en) Data acquisition module, firmware upgrading method thereof and storage medium
CN116450244B (en) Chip starting method, device, computer equipment and storage medium
CN116382745B (en) Firmware loading upgrading method and device
CN116795408A (en) ECU software upgrading method and system and vehicle
CN109976958B (en) Method and device for improving firmware test efficiency and storage medium
CN114398087B (en) Method for improving running stability of singlechip after program updating and singlechip
CN113467797B (en) Program updating method, device and system and computer readable storage medium
CN114464231A (en) Firmware storage method and system
CN113835741A (en) Patch loading method, network element and computer readable storage medium
CN110502367A (en) A kind of control method and electronic equipment
CN114281598A (en) flash backup recovery method and system, communication equipment and storage medium
CN116185510A (en) Partition switch starting method, array server and computer readable storage medium

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