CN111694580B - Method and device for upgrading and initializing storage device and electronic device - Google Patents

Method and device for upgrading and initializing storage device and electronic device Download PDF

Info

Publication number
CN111694580B
CN111694580B CN201910187099.3A CN201910187099A CN111694580B CN 111694580 B CN111694580 B CN 111694580B CN 201910187099 A CN201910187099 A CN 201910187099A CN 111694580 B CN111694580 B CN 111694580B
Authority
CN
China
Prior art keywords
function
function configuration
configuration
storage device
product
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
CN201910187099.3A
Other languages
Chinese (zh)
Other versions
CN111694580A (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.)
Macrosan Technologies Co Ltd
Original Assignee
Macrosan Technologies 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 Macrosan Technologies Co Ltd filed Critical Macrosan Technologies Co Ltd
Priority to CN201910187099.3A priority Critical patent/CN111694580B/en
Publication of CN111694580A publication Critical patent/CN111694580A/en
Application granted granted Critical
Publication of CN111694580B publication Critical patent/CN111694580B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

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

Abstract

The application provides a method and a device for upgrading and initializing a storage device, an electronic device and a machine-readable storage medium. In the application, on one hand, the upgrade server obtains a general function configuration corresponding to the storage device; creating a differential function configuration corresponding to the generic function configuration based on the product model of the storage device; packaging the difference function configuration into the firmware program; programming the firmware program and the general function configuration to the storage device; on the other hand, after the storage device is upgraded, the difference function configuration is obtained from the firmware program based on the product model of the storage device; acquiring a product function configuration corresponding to the storage device based on the difference function configuration and the general function configuration; performing initialization by the storage device based on the product function configuration.

Description

Method and device for upgrading and initializing storage device and electronic device
Technical Field
The present application relates to the field of storage technologies, and in particular, to a method and an apparatus for upgrading and initializing a storage device, an electronic device, and a machine-readable storage medium.
Background
The firmware, which is the most basic and underlying software of the embedded device, is usually written in a nonvolatile memory included in the embedded device, for example, a common nonvolatile memory such as Flash, EEPROM (Electrically Erasable and Programmable read only memory), and the like.
Disclosure of Invention
In one aspect, the application provides a method and an apparatus for upgrading a storage device, an electronic device and a machine-readable storage medium.
The application provides an upgrading method of a storage device, which is applied to an upgrading server, wherein the upgrading server acquires a firmware program corresponding to the storage device in advance; the method comprises the following steps:
acquiring a general function configuration corresponding to the storage device;
creating a difference function configuration corresponding to the general function configuration based on the product model of the storage device, wherein the difference function configuration comprises a mapping relation with a function item corresponding to the general function configuration;
packaging the difference function configuration into the firmware program;
and programming the firmware program and the general function configuration to the storage device.
The application also provides an upgrading device of the storage equipment, which is applied to an upgrading server, wherein the upgrading server acquires a firmware program corresponding to the storage equipment in advance; the device comprises:
the acquisition module acquires the general function configuration corresponding to the storage equipment;
the upgrading module is used for creating a difference function configuration corresponding to the general function configuration based on the product model of the storage equipment, wherein the difference function configuration comprises a mapping relation with a function item corresponding to the general function configuration;
the upgrading module is further used for packaging the difference function configuration into the firmware program;
the upgrade module further writes the firmware program and the general function configuration to the storage device.
The application also provides an electronic device, which comprises a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are mutually connected through the bus; the memory stores machine readable instructions, and the processor executes the upgrading method of the storage device by calling the machine readable instructions.
The application also provides a machine-readable storage medium, wherein the machine-readable storage medium stores machine-readable instructions, and the machine-readable instructions are called and executed by a processor to realize the upgrading method of the storage device.
In another aspect, the present application provides a method and an apparatus for initializing a storage device, an electronic device, and a machine-readable storage medium.
The application provides an initialization method of a storage device, which is applied to the storage device, and after the above upgrade method for the storage device is executed, the storage device obtains a firmware program and a general function configuration, wherein the firmware program includes a difference function configuration corresponding to the storage device, and the method includes:
obtaining the difference function configuration from the firmware program based on the product model of the storage device;
acquiring a product function configuration corresponding to the storage device based on the difference function configuration and the general function configuration;
performing initialization by the storage device based on the product function configuration.
The present application further provides an initialization apparatus for a storage device, where the apparatus is applied to a storage device, and after the above-mentioned upgrade method for the storage device is executed, the storage device obtains a firmware program and a general functional configuration, where the firmware program includes a differential functional configuration corresponding to the storage device, and the apparatus includes:
the acquisition module is used for acquiring the difference function configuration from the firmware program based on the product model of the storage equipment;
the initialization module is used for acquiring the product function configuration corresponding to the storage equipment based on the difference function configuration and the general function configuration;
the initialization module further performs initialization by the storage device based on the product function configuration.
Through the embodiment, the storage devices of different product models share one common function configuration, different difference function configurations corresponding to the common function configuration are created, and the difference function configurations and the firmware program are packaged together; on one hand, the upgrading process of the storage equipment is simplified, and the risk that the firmware program is inconsistent with the configuration possibly existing in the upgrading process is reduced, so that the upgrading usability is improved; on the other hand, different function configurations corresponding to different product models of storage equipment are flexibly and dynamically generated through the storage equipment based on the combination of the different function configurations and the general function configurations, and initialization is executed, so that the maintenance cost of firmware programs and configurations corresponding to multiple types of storage products is reduced.
Drawings
FIG. 1 is a flow chart of an upgrade of a storage device provided in an exemplary embodiment.
FIG. 2 is a flow chart of an initialization process of a storage device according to an exemplary embodiment.
Fig. 3 is a block diagram of an upgrade apparatus for a storage device according to an exemplary embodiment.
Fig. 4 is a block diagram of an initialization apparatus of a storage device according to an exemplary embodiment.
Fig. 5 is a hardware block diagram of an electronic device according to an exemplary embodiment.
FIG. 6 is a hardware block diagram of another electronic device provided by an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if," as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination," depending on the context.
In order to make those skilled in the art better understand the technical solution in the embodiment of the present application, first, a brief description will be given below to the related technologies of upgrading and initializing the storage device according to the embodiment of the present application.
Generally, the embedded device is partitioned for the contained nonvolatile storage; wherein different partitions are used to store different data. For a specific scheme of partition division of an embedded device, please refer to table 1 for example:
Figure BDA0001993213860000041
TABLE 1
As illustrated in table 1, partition 1 is used to store "boot loader and its configuration", partition 2 is used to store "firmware program", partition 3 is used to store "firmware configuration" corresponding to firmware program, and partition 4 is used to store other data, such as: system logs, and the like.
In some scenarios, when a user needs to upgrade a "firmware program" and a "firmware configuration" of an embedded device, firstly, the "firmware program" and the "firmware configuration" of a specified upgrade version corresponding to the embedded device need to be deployed on an upgrade server; then, the upgrade server writes the "firmware program" and the "firmware configuration" of the designated upgrade version into the partition 2 and the partition 3, respectively, in sequence, thereby completing the upgrade process of the embedded device.
In other scenarios, after the embedded device completes the upgrade process, when the device is powered on, the device initialization process is executed: firstly, automatically running a 'starting bootstrap program', and initializing the lowest level of a CPU after the 'starting bootstrap program' reads corresponding configuration; then, the 'firmware program' in the partition 2 is loaded by the 'boot loader' to the memory for execution, and the control right of the system is handed to the 'firmware program'; then, the firmware program acquires the firmware configuration in the partition 3 to complete the initialization process of the whole embedded device; finally, the embedded device reaches a stable operation state.
The application aims to provide a method for packaging the difference function configuration and the firmware program together for upgrading the storage device; and after the storage equipment is upgraded, acquiring the product function configuration based on the general function configuration and the difference function configuration and executing initialization to realize the technical scheme of upgrading and initializing the storage equipment.
When the method is realized, after the difference configuration is generated, the difference function configuration and the firmware program are packaged together, and the packaged firmware program and the general function configuration are respectively programmed into corresponding partitions in the nonvolatile storage included in the storage device. And after the storage equipment completes the upgrading process, acquiring the product function configuration based on the general function configuration and the difference function configuration, and executing initialization.
In the scheme, a common function configuration is shared by storage devices of different product models, different difference function configurations corresponding to the common function configuration are created, and the difference function configurations and the firmware program are packaged together; on one hand, the upgrading process of the storage equipment is simplified, and the risk that the firmware program is inconsistent with the configuration possibly existing in the upgrading process is reduced, so that the upgrading usability is improved; on the other hand, different function configurations corresponding to different product models of storage equipment are flexibly and dynamically generated through the storage equipment based on the combination of the different function configurations and the general function configurations, and initialization is executed, so that the maintenance cost of firmware programs and configurations corresponding to multiple types of storage products is reduced.
The present application is described below with reference to specific embodiments and specific application scenarios.
Referring to fig. 1, fig. 1 is a method for upgrading a storage device, which is applied to an upgrade server and performs the following steps:
and 102, acquiring the general function configuration corresponding to the storage device.
And 104, creating a difference function configuration corresponding to the general function configuration based on the product model of the storage device, wherein the difference function configuration comprises a mapping relation with a function item corresponding to the general function configuration.
And 106, packaging the difference function configuration into the firmware program.
And step 108, programming the firmware program and the general function configuration to the storage device.
After the upgrade server finishes upgrading the storage device, the storage device executes an initialization process after powering on the device, please refer to fig. 2.
Fig. 2 is an initialization method of a storage device, which is applied to a storage device and obtains a firmware program and a general function configuration after executing the above upgrade method for the storage device, where the firmware program includes a difference function configuration corresponding to the storage device, and the upgrade server obtains the firmware program corresponding to the storage device in advance; the method comprises the following steps:
step 202, obtaining the difference function configuration from the firmware program based on the product model of the storage device.
And 204, acquiring a product function configuration corresponding to the storage device based on the difference function configuration and the general function configuration.
Based on the product function configuration, initialization is performed by the storage device, step 206.
The following describes in detail the technical solutions related to the present application by specific embodiments and in combination with "storage device upgrade" and "storage device initialization":
1) Storage device upgrade
In this specification, the upgrade server may include any type of device connected to the storage device through a network and a hardware interface, and the device stores a firmware program to be upgraded corresponding to the storage device, a corresponding configuration, and the like.
The storage device may include an embedded device for managing storage resources and having a nonvolatile storage, and the storage device is a device to be upgraded with respect to the upgrade server. The firmware program corresponding to the storage device can support product function configuration of multiple product models, so that the storage device is upgraded to devices of different product models.
In this specification, the product function configuration refers to a firmware configuration file corresponding to a firmware program of a storage device of a certain product model, and the structure of the firmware configuration file is divided according to functions.
In one embodiment, a product function configuration with a product model T1 is shown, as exemplified in table 2:
Figure BDA0001993213860000071
TABLE 2
As shown in table 2, the structure of the firmware configuration file is divided into a function item a, a function item B, and a function item C according to functions, and the contents corresponding to the function items are F1, F2, and F3, respectively. The above is only an example, and the name of the actual function item and its content can be defined by itself according to the user's needs and the functions supported by the storage device.
In one embodiment, a product function configuration with a product model T2 is shown, as exemplified in table 3:
Figure BDA0001993213860000081
TABLE 3
The structure of the firmware configuration file shown in the above table 3 is the same as table 2, and is not described again. The function items in table 3 are the same as those in table 2, that is, the function items A, B, C are the same, and the contents of the function items corresponding to the same function items are different. The above are only exemplary, and the names and the contents of the actual function items may be partially the same or different, and are not described in detail again.
In this specification, the general function configuration refers to a file or a table of maximum configuration intersection of product function configuration files of different product models corresponding to the storage device, and the general function configuration may be configured by a user specification.
For example: taking table 2 with the product model number T1 and table 3 with the product model number T2 as examples, please refer to table 4 for the above general function configuration:
Figure BDA0001993213860000082
TABLE 4
As shown in table 4, the general function configuration is identical to the function items in tables 2 and 3, and the content of the function item is the intersection of the content of the function items in tables 2 and 3, for example, the function item a in the general function configuration corresponds to the intersection of the content of the function item a in tables 2 and 3, that is, F1, and the function item B in the general function configuration corresponds to the intersection of the content of the function item B in tables 2 and 3, that is, F2. The above are merely exemplary, and many combinations exist in practice, which are not described again.
In this specification, the differential function configuration refers to a differential configuration between the product function configuration of a certain product model and the general function configuration, and the differential configuration may be specifically organized in a file or a table, and is not specifically limited.
The differential function configuration comprises a one-to-one mapping relation of function items corresponding to the general function configuration, and the mapping relation is realized based on a bitmap.
When the function item corresponding to the general function configuration is realized, the difference function configuration comprises that the function item corresponding to the general function configuration is represented by a bit, and when the bit is set to be 0, the bit represents a reset state, namely the content of the function item corresponding to the general function configuration is pointed to; when the bit is set to 1, it represents a set state, that is, it points to the content of the function item corresponding to the above-mentioned difference function configuration.
The difference function configuration further includes an independent function item, where the independent function item refers to a function item corresponding to the general function item in one-to-one correspondence in the difference function configuration, but the content of the function item is different from that of the general function item.
In this specification, if the product function configuration is identical to the content of the function item corresponding to the general function configuration, the mapping relationship is directed to the content of the function item corresponding to the general function configuration. If not, copying the content of the function item corresponding to the product function configuration to the independent function item, and pointing the mapping relation to the independent function item.
For example: continuing with the example of the product function configuration corresponding to the product model T1 in table 2, please refer to the example in table 5 for the difference function configuration with the product model T1:
independent function item Content of independent function items Mapping relation (bitmap)
Function item A F1、F11 1
Function item B F2、F22 1
Function item C F3、F33 1
TABLE 5
As shown in table 5, if the product function configuration (table 2) corresponding to T1 is different from the content of the function item A, B, C corresponding to the general function configuration (table 4), the content of the function item A, B, C corresponding to the product function configuration corresponding to T1 is copied to the difference function configuration (table 5), and is the independent function item A, B, C; and setting bit corresponding to the mapping relation of each function item in the difference function configuration to be 1, and respectively pointing to the independent function item A, B, C.
In another illustrated embodiment, the example is continued with the product function configuration corresponding to the product model T2 in table 3, and the difference function configuration with the product model T2 is shown in table 6:
function item Content of function item Mapping relation (bitmap)
Function item A F1、F12 1
Function item B - 0
Function item C F3、F32 1
TABLE 6
As shown in table 6, the product function configuration corresponding to T2 (table 3) is different from the general function configuration (table 4) in the function item A, C; copying the content of the function item A, C corresponding to the product function configuration corresponding to T2 into the difference function configuration (table 6), which is an independent function item A, C, respectively, and setting bits corresponding to the mapping relationship of the A, C function item in the difference function configuration to 1, which point to the independent function item A, C, respectively; if the product function configuration (table 3) corresponding to T2 is the same as the content of the function item B corresponding to the general function configuration (table 4), bit corresponding to the mapping relationship of the function item B in the differential function configuration is set to 0, and is used to point to the content of the function item B corresponding to the general function configuration.
In this specification, the step of packaging the difference function configuration into the firmware program by the upgrade server means that the upgrade server combines a plurality of difference function configurations of different product models together.
For example: the above-mentioned plurality of difference function configurations in table 5 and table 6 are all merged together. And packaging the firmware program into an upgrade file, namely generating a new firmware program comprising a plurality of different functional configurations.
In this specification, after the firmware program to be upgraded is packaged, the upgrade server writes the firmware program and the general function configuration into a corresponding partition of a nonvolatile memory included in the storage device.
For example: the upgrade server writes the firmware program and the general function configuration into the partition 2 and the partition 3 shown in table 1, respectively, thereby completing the upgrade process of the storage device.
It should be noted that the general function configuration only needs to be upgraded once when the storage device is shipped from a factory, and in a subsequent upgrading process, the upgrade server only needs to write a firmware program of a new version (including the difference configuration) into the storage device, and the general function configuration does not need to be written again.
2) Storage device initialization
And when the upgrading server finishes the upgrading process aiming at the storage equipment and the storage equipment is powered on, executing an equipment initialization process.
Specifically, the storage device obtains the programmed firmware program and the general-purpose function configuration in the corresponding "storage device upgrade" from the corresponding partition of the included nonvolatile storage (table 4).
In this specification, during execution of the firmware program, based on a product model of the storage device, a difference function configuration corresponding to the product model is obtained from the firmware program.
In implementation, the product model of the storage device may be read from a hardware register or a device type configuration of the storage device, and is not limited specifically.
In this specification, the product model of the storage device includes, for example: the product model of the storage equipment is T1 or T2; the difference function configuration refers to a difference function configuration corresponding to a product model of the storage device, for example: the difference function configuration of T1 is table 5, and the difference function configuration of T2 is table 6.
In this specification, the firmware program obtains a product function configuration corresponding to the storage device based on the obtained difference function configuration and the obtained general function configuration, where the product function configuration is exemplified in table 2 or table 3.
In an embodiment shown in the foregoing, if the mapping relationship corresponding to the function item of the differential function configuration points to the content of the function item corresponding to the general function configuration, the content of the function item corresponding to the general function configuration is read and is used as the content of the function item of the product function configuration corresponding to the storage device.
For example: as shown in table 5, since the values of 3 bits of the mapping relationship corresponding function item A, B, C are all 1, the firmware program is instructed to read the contents of the independent function item based on the corresponding independent function item A, B, C in the differential function configuration, which is the content of the function item A, B, C of the product function configuration corresponding to the T1 model. The above-described process is only exemplary,
in another illustrated embodiment, the product model of the storage device is T2, the difference function configuration is table 6, and the firmware program traverses the mapping relationship corresponding to each independent function item of the difference function configuration (table 6); as shown in table 6, since the values of 2 bits of the mapping relationship corresponding function item A, C are all 1, the firmware program is instructed to read the content of the independent function item based on the corresponding independent function item A, C in the differential function configuration, which is the content of the function item A, C of the product function configuration corresponding to the T1 model.
Since the value of bit corresponding to the mapping relation corresponding function item B is 0, the firmware program is instructed to read the content of the function item B in the general function configuration based on the corresponding function item B in the general function configuration (table 4) as the content of the function item B of the product function configuration corresponding to the T2 model.
In this specification, after the firmware program generates a product function configuration corresponding to a storage device of a different product model, initialization is performed based on the content of a function item in the product function configuration.
Such as: and starting a snapshot function of the storage device based on the content of the function item A in the product function configuration. For another example: and setting a cache mode of the storage device based on the content of the function item B in the product function configuration.
After the initialization is completed, the firmware finally enables the storage device to reach a stable operation state.
In the technical scheme, the storage devices of different product models share one common function configuration, different difference function configurations corresponding to the common function configuration are created, and the difference function configurations and the firmware program are packaged together; on one hand, the upgrading process of the storage equipment is simplified, the risk that the firmware program is inconsistent with the configuration possibly existing in the upgrading process is reduced, and therefore the upgrading usability is improved; on the other hand, different function configurations corresponding to different product models of storage equipment are flexibly and dynamically generated through the storage equipment based on the combination of the different function configurations and the general function configurations, and initialization is executed, so that the maintenance cost of firmware programs and configurations corresponding to multiple types of storage products is reduced.
Fig. 3 is a block diagram of an upgrade apparatus for a storage device according to an exemplary embodiment of the present application. Corresponding to the foregoing method embodiment, the present application further provides an embodiment of an upgrade apparatus for a storage device, where the upgrade apparatus is applied to an upgrade server, where the upgrade server obtains a firmware program corresponding to the storage device in advance, please refer to an upgrade apparatus 30 for a storage device illustrated in fig. 3, and the upgrade apparatus includes:
an obtaining module 301, configured to obtain a general function configuration corresponding to the storage device;
an upgrade module 302, configured to create a difference function configuration corresponding to the general function configuration based on a product model of the storage device, where the difference function configuration includes a mapping relationship with a function item corresponding to the general function configuration;
the upgrade module 302 further packages the difference function configuration into the firmware program;
the upgrade module 302 further writes the firmware program and the generic function configuration to the storage device.
In an embodiment of the present application, the storage device is an embedded device.
In the embodiment of the application, the mapping relation is realized based on a bitmap.
In this embodiment of the present application, the upgrade module 302 further:
acquiring product function configuration of the product model corresponding to the storage equipment based on the product model of the storage equipment;
and generating the difference function configuration based on the content difference of the function items corresponding to the product function configuration and the general function configuration.
In this embodiment, the difference function configuration further includes an independent function item, and the upgrade module 302 further:
if the product function configuration is the same as the content of the function item corresponding to the general function configuration, directing the mapping relation to the content of the function item corresponding to the general function configuration;
and if the product function configuration is different from the independent function item, copying the content of the function item corresponding to the product function configuration to the independent function item, and pointing the mapping relation to the independent function item.
Fig. 4 is a block diagram of an initialization apparatus of a storage device according to an exemplary embodiment of the present application. Corresponding to the foregoing method embodiment, the present application further provides an embodiment of an initialization apparatus for a storage device, where the apparatus is applied to a storage device, and after the foregoing upgrade method for the storage device is executed, the storage device obtains a firmware program and a general functional configuration, where the firmware program includes a difference functional configuration corresponding to the storage device, please refer to an upgrade apparatus 40 for a storage device illustrated in fig. 4, where the apparatus includes:
an obtaining module 401, configured to obtain the difference function configuration from the firmware program based on the product model of the storage device;
an initialization module 402, configured to obtain a product function configuration corresponding to the storage device based on the difference function configuration and the general function configuration;
the initialization module 402 further performs initialization by the storage device based on the product function configuration.
In this embodiment of the application, the initialization module 402 further:
and if the mapping relation corresponding to the function item of the differential function configuration points to the content of the function item corresponding to the general function configuration, reading the content of the function item corresponding to the general function configuration, and using the content as the content of the function item of the product function configuration corresponding to the storage device.
In this embodiment of the application, the initialization module 402 further:
and if the mapping relation corresponding to the function item of the difference function configuration points to the independent function item, reading the content of the independent function item, and taking the content as the content of the function item of the product function configuration corresponding to the storage device.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, wherein the modules described as separate parts may or may not be physically separate, and the parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The systems, devices, modules or modules illustrated in the above embodiments may be implemented by a computer chip or an entity, or by an article of manufacture with certain functionality. A typical implementation device is a computer, which may be in the form of a personal computer, laptop, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
The embodiment of the upgrade apparatus of the upgrade server of the present application may be applied to the electronic device shown in fig. 5. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. Taking a software implementation as an example, as a logical device, the device is a machine executable instruction formed by reading a corresponding computer program instruction in a machine readable storage medium through a processor of the electronic device where the device is located and then running the computer program instruction. From a hardware aspect, as shown in fig. 5, the hardware structure diagram of the electronic device where the upgrade apparatus of the upgrade server is located in the present application is shown, except for the processor, the communication interface, the bus and the machine-readable storage medium shown in fig. 5, the electronic device where the apparatus is located in the embodiment may also include other hardware according to the actual function of the electronic device, which is not described again.
Correspondingly, an embodiment of the present application further provides a hardware structure of an electronic device of the apparatus shown in fig. 3, please refer to fig. 5, and fig. 5 is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. The apparatus comprises: a communication interface 501, a processor 502, a machine-readable storage medium 503, and a bus 504; the communication interface 501, the processor 502 and the machine-readable storage medium 503 are configured to communicate with each other via a bus 504. The communication interface 501 is used for performing network communication. Processor 502 may be a Central Processing Unit (CPU), and processor 502 may execute machine-readable instructions stored in machine-readable storage medium 503 to implement the above-described method of memory device upgrade.
The machine-readable storage medium 503 referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: volatile memory, non-volatile memory, or similar storage media. In particular, the machine-readable storage medium 403 may be a RAM (random Access Memory), a flash Memory, a storage drive (e.g., a hard disk drive), a solid state disk, any type of storage disk (e.g., a compact disk, a DVD, etc.), or similar storage medium, or a combination thereof.
To this end, the description of the hardware configuration shown in fig. 5 is completed.
Further, embodiments of the present application also provide a machine-readable storage medium, such as machine-readable storage medium 503 in fig. 5, comprising machine-executable instructions, which are executable by processor 502 in a data processing apparatus to implement the above-described method for memory device upgrade.
The embodiment of the initialization apparatus of the storage device of the present application can be applied to the electronic device shown in fig. 6. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. Taking a software implementation as an example, as a logical device, the device is a machine executable instruction formed by reading a corresponding computer program instruction in a machine readable storage medium through a processor of the electronic device where the device is located and then running the computer program instruction. From a hardware aspect, as shown in fig. 6, the hardware structure diagram of the electronic device where the initialization apparatus of the storage device of the present application is located is shown, except for the processor, the communication interface, the bus and the machine-readable storage medium shown in fig. 6, the electronic device where the apparatus is located in the embodiment may also include other hardware according to the actual function of the electronic device, which is not described again.
Correspondingly, an embodiment of the present application further provides a hardware structure of an electronic device of the apparatus shown in fig. 4, please refer to fig. 6, and fig. 6 is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. The apparatus comprises: a communication interface 601, a processor 602, a machine-readable storage medium 603, and a bus 604; the communication interface 601, the processor 602, and the machine-readable storage medium 603 communicate with each other via a bus 604. The communication interface 501 is used for performing network communication. The processor 502 may be a Central Processing Unit (CPU) and the processor 602 may execute machine-readable instructions stored in the machine-readable storage medium 603 to implement the above-described storage device initialization method.
The machine-readable storage medium 603 referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: volatile memory, non-volatile memory, or similar storage media. In particular, the machine-readable storage medium 603 may be a RAM (random Access Memory), a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., a compact disk, a DVD, etc.), or similar storage medium, or a combination thereof.
Up to this point, the description of the hardware configuration shown in fig. 6 is completed.
Further, embodiments of the present application also provide a machine-readable storage medium, such as machine-readable storage medium 603 in fig. 6, comprising machine-executable instructions, which are executable by processor 602 in a data processing apparatus to implement the above-described method for storage device initialization.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (20)

1. The method for upgrading the storage equipment is characterized in that the method is applied to an upgrading server, and the upgrading server acquires a firmware program corresponding to the storage equipment in advance; the method comprises the following steps:
acquiring a general function configuration corresponding to the storage device;
creating a difference function configuration corresponding to the general function configuration based on the difference between the product function configuration of the product model of the storage device and the general function configuration, wherein the difference function configuration comprises a mapping relation with function items corresponding to the general function configuration, the difference function configuration comprises independent function items corresponding to the function items in the general function configuration but with different contents, and the mapping relation points to the independent function items so as to use the contents of the independent function items as the contents of the function items of the product function configuration corresponding to the storage device in the initialization process of the storage device;
packaging the difference function configuration into the firmware program;
and programming the firmware program and the general function configuration to the storage device.
2. The method of claim 1, wherein the storage device is an embedded device.
3. The method of claim 1, wherein the mapping is implemented based on a bitmap.
4. The method of claim 3, wherein creating a differential functional configuration corresponding to the generic functional configuration based on the product model of the storage device comprises:
acquiring product function configuration of the product model corresponding to the storage equipment based on the product model of the storage equipment;
and generating the difference function configuration based on the content difference of the function items corresponding to the product function configuration and the general function configuration.
5. The method of claim 4, wherein the differential function configuration further comprises an independent function item, and wherein generating the differential function configuration based on the content difference of the product function configuration and the function item corresponding to the general function configuration comprises:
if the product function configuration is the same as the content of the function item corresponding to the general function configuration, directing the mapping relation to the content of the function item corresponding to the general function configuration;
and if the product function configuration is different from the independent function item, copying the content of the function item corresponding to the product function configuration to the independent function item, and pointing the mapping relation to the independent function item.
6. A method for initializing a storage device, wherein the method is applied to a storage device, and after performing any one of the methods of claims 1 to 5, the storage device obtains a firmware program and a general functional configuration, wherein the firmware program includes a differential functional configuration corresponding to the storage device, and the method includes:
obtaining the difference function configuration from the firmware program based on the product model of the storage device;
acquiring a product function configuration corresponding to the storage device based on the difference function configuration and the general function configuration;
performing initialization by the storage device based on the product function configuration.
7. The method according to claim 6, wherein the obtaining the product function configuration corresponding to the storage device based on the difference function configuration and the general function configuration comprises:
and if the mapping relation corresponding to the function item of the differential function configuration points to the content of the function item corresponding to the general function configuration, reading the content of the function item corresponding to the general function configuration, and taking the content as the content of the function item of the product function configuration corresponding to the storage device.
8. The method according to claim 6, wherein the obtaining the product function configuration corresponding to the storage device based on the difference function configuration and the general function configuration comprises:
and if the mapping relation corresponding to the function item of the difference function configuration points to the independent function item, reading the content of the independent function item, and taking the content as the content of the function item of the product function configuration corresponding to the storage device.
9. The device for upgrading the storage equipment is characterized in that the device is applied to an upgrading server, and the upgrading server acquires a firmware program corresponding to the storage equipment in advance; the device comprises:
the acquisition module acquires the general function configuration corresponding to the storage equipment;
the upgrading module is used for creating a difference function configuration corresponding to the general function configuration based on the difference between the product function configuration of the product model of the storage device and the general function configuration, wherein the difference function configuration comprises a mapping relation with function items corresponding to the general function configuration, the difference function configuration comprises independent function items which correspond to the function items in the general function configuration and have different contents, and the mapping relation points to the independent function items so as to take the contents of the independent function items as the contents of the function items of the product function configuration corresponding to the storage device in the initialization process of the storage device;
the upgrading module is further used for packaging the difference function configuration into the firmware program;
the upgrade module further writes the firmware program and the general function configuration to the storage device.
10. The apparatus of claim 9, wherein the storage device is an embedded device.
11. The apparatus of claim 9, wherein the mapping is implemented based on a bitmap.
12. The apparatus of claim 11, wherein the upgrade module is further to:
acquiring product function configuration of the product model corresponding to the storage equipment based on the product model of the storage equipment;
and generating the difference function configuration based on the content difference of the function items corresponding to the product function configuration and the general function configuration.
13. The apparatus of claim 12, wherein the differential functional configuration further comprises a stand-alone functional item, and wherein the upgrade module is further to:
if the product function configuration is the same as the content of the function item corresponding to the general function configuration, directing the mapping relation to the content of the function item corresponding to the general function configuration;
and if the product function configuration is different from the independent function item, copying the content of the function item corresponding to the product function configuration to the independent function item, and pointing the mapping relation to the independent function item.
14. An initialization apparatus for a storage device, wherein the apparatus is applied to a storage device, and after executing any one of the apparatus of claims 9 to 13, the storage device obtains a firmware program and a general functional configuration, wherein the firmware program includes a differential functional configuration corresponding to the storage device, and the apparatus includes:
an obtaining module, configured to obtain the difference function configuration from the firmware program based on a product model of the storage device;
the initialization module is used for acquiring the product function configuration corresponding to the storage equipment based on the difference function configuration and the general function configuration;
the initialization module further performs initialization by the storage device based on the product functional configuration.
15. The apparatus of claim 14, wherein the initialization module is further to:
and if the mapping relation corresponding to the function item of the differential function configuration points to the content of the function item corresponding to the general function configuration, reading the content of the function item corresponding to the general function configuration, and using the content as the content of the function item of the product function configuration corresponding to the storage device.
16. The apparatus of claim 14, wherein the initialization module is further to:
and if the mapping relation corresponding to the function item of the difference function configuration points to the independent function item, reading the content of the independent function item, and taking the content as the content of the function item of the product function configuration corresponding to the storage device.
17. An electronic device is characterized by comprising a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are connected with each other through the bus;
the memory has stored therein machine-readable instructions, the processor executing the method of any one of claims 1 to 5 by calling the machine-readable instructions.
18. An electronic device is characterized by comprising a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are connected with each other through the bus;
the memory has stored therein machine-readable instructions, which the processor executes by calling the machine-readable instructions to perform the method of any one of claims 6 to 8.
19. A machine-readable storage medium having stored thereon machine-readable instructions which, when invoked and executed by a processor, carry out the method of any of claims 1 to 5.
20. A machine-readable storage medium having stored thereon machine-readable instructions which, when invoked and executed by a processor, carry out the method of any of claims 6 to 8.
CN201910187099.3A 2019-03-13 2019-03-13 Method and device for upgrading and initializing storage device and electronic device Active CN111694580B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910187099.3A CN111694580B (en) 2019-03-13 2019-03-13 Method and device for upgrading and initializing storage device and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910187099.3A CN111694580B (en) 2019-03-13 2019-03-13 Method and device for upgrading and initializing storage device and electronic device

Publications (2)

Publication Number Publication Date
CN111694580A CN111694580A (en) 2020-09-22
CN111694580B true CN111694580B (en) 2023-03-10

Family

ID=72474943

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910187099.3A Active CN111694580B (en) 2019-03-13 2019-03-13 Method and device for upgrading and initializing storage device and electronic device

Country Status (1)

Country Link
CN (1) CN111694580B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114020211B (en) * 2021-10-12 2024-03-15 深圳市广和通无线股份有限公司 Storage space management method, device, equipment and storage medium
CN113656112A (en) * 2021-10-21 2021-11-16 成都怡康科技有限公司 Firmware program configuration method applied to serialized products

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102364891A (en) * 2011-09-13 2012-02-29 杭州华三通信技术有限公司 Method for upgrading software of embedded Ethernet equipment and embedded Ethernet equipment
CN102707980A (en) * 2012-05-29 2012-10-03 深圳市共进电子股份有限公司 Embedded product customization method based on MTD partition
CN105159716A (en) * 2015-09-02 2015-12-16 福州瑞芯微电子股份有限公司 Memory device initialization method and electronic equipment
CN106102083A (en) * 2016-05-19 2016-11-09 青岛海信移动通信技术股份有限公司 Collocation method and equipment
CN107729179A (en) * 2017-09-29 2018-02-23 烽火通信科技股份有限公司 Unified Software Mirroring based on same processor different hardware realizes system and method
CN108551487A (en) * 2018-04-26 2018-09-18 Oppo广东移动通信有限公司 Application dispositions method, device, server and the storage medium of PaaS platform
CN108958744A (en) * 2018-06-21 2018-12-07 北京京东金融科技控股有限公司 Dispositions method, device, medium and the electronic equipment of big data distributed type assemblies

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103336703B (en) * 2013-07-08 2018-09-18 惠州Tcl移动通信有限公司 The method of generation upgrade package, server, method for upgrading software, mobile terminal
EP3049920A1 (en) * 2013-09-27 2016-08-03 Rudolf Markus Petri Method and device for the automated production and provision of at least one software application
EP3156897B1 (en) * 2014-06-11 2023-04-19 Fujitsu Limited Program generation device, program generation method and program
CN105653258A (en) * 2015-11-06 2016-06-08 乐视移动智能信息技术(北京)有限公司 Code processing method and apparatus
CN106843956B (en) * 2017-01-17 2020-07-14 青岛海信移动通信技术股份有限公司 Method and device for generating system firmware package
CN108228230A (en) * 2017-12-28 2018-06-29 努比亚技术有限公司 Upgrade method, terminal and the computer readable storage medium of UFS firmwares

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102364891A (en) * 2011-09-13 2012-02-29 杭州华三通信技术有限公司 Method for upgrading software of embedded Ethernet equipment and embedded Ethernet equipment
CN102707980A (en) * 2012-05-29 2012-10-03 深圳市共进电子股份有限公司 Embedded product customization method based on MTD partition
CN105159716A (en) * 2015-09-02 2015-12-16 福州瑞芯微电子股份有限公司 Memory device initialization method and electronic equipment
CN106102083A (en) * 2016-05-19 2016-11-09 青岛海信移动通信技术股份有限公司 Collocation method and equipment
CN107729179A (en) * 2017-09-29 2018-02-23 烽火通信科技股份有限公司 Unified Software Mirroring based on same processor different hardware realizes system and method
CN108551487A (en) * 2018-04-26 2018-09-18 Oppo广东移动通信有限公司 Application dispositions method, device, server and the storage medium of PaaS platform
CN108958744A (en) * 2018-06-21 2018-12-07 北京京东金融科技控股有限公司 Dispositions method, device, medium and the electronic equipment of big data distributed type assemblies

Also Published As

Publication number Publication date
CN111694580A (en) 2020-09-22

Similar Documents

Publication Publication Date Title
US8370835B2 (en) Method for dynamically generating a configuration for a virtual machine with a virtual hard disk in an external storage device
US8219793B2 (en) Storage medium to manage a master boot record and a method of booting a computer system using a storage medium
US9563446B2 (en) Binary file generation
US10475516B2 (en) Data storage device and data erasing method wherein after erasing process, predetermined value is written to indicate completion of said erasing method
CN111124288B (en) VPD storage management method, device, equipment and readable storage medium
CN110515641A (en) The update method of server firmware, apparatus and system
CN113238819B (en) Dynamic loading method and system of drive file suitable for U-Boot
CN111694580B (en) Method and device for upgrading and initializing storage device and electronic device
CN108829449A (en) A kind of method, apparatus, equipment and the medium of BIOS start-up operation system
US7958344B2 (en) Method for adjusting set-up default value of bios and mainboard using the same method
US9715398B2 (en) Program code loading method of application and computing system using the same
US8788800B2 (en) OS processing method, system and non-transitory computer readable storage medium thereof
US20030233536A1 (en) Automatic selection of firmware for a computer that allows a plurality of process types
US10359971B2 (en) Storing memory profile data of an application in non-volatile memory
US20160055007A1 (en) Information processing apparatus and setting method for information processing apparatus
KR102429346B1 (en) Memory Upgrade System And Method
CN110968333A (en) Configuration information replacement method and device, machine-readable storage medium and processor
JP2022536681A (en) non-volatile storage identifier
US8230209B1 (en) Method and apparatus for automatically providing a user the opportunity to boot from an alternate storage device where a valid operating system resides
US20230350593A1 (en) Method, system, and circuit for deploying file system on embedded memory in programmable computing device
CN113645046B (en) Network card driver installation method, main server and medium
JP7355876B2 (en) Program startup method, equipment, and storage medium
CN111435285B (en) Data writing method and device for storage volume, electronic equipment and machine-readable storage medium
CN107436918A (en) Database implementation method, device and equipment
CN109344089B (en) Method and device for operating norflash

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