CN111158733A - BMC upgrading method, device, equipment and computer readable storage medium - Google Patents
BMC upgrading method, device, equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN111158733A CN111158733A CN201911370218.5A CN201911370218A CN111158733A CN 111158733 A CN111158733 A CN 111158733A CN 201911370218 A CN201911370218 A CN 201911370218A CN 111158733 A CN111158733 A CN 111158733A
- Authority
- CN
- China
- Prior art keywords
- bmc
- content
- file
- identification information
- storage area
- 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.)
- Withdrawn
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
- G06F8/654—Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
Abstract
The invention discloses a BMC upgrading method, which comprises the following steps: receiving a Firmware file to be written into the BMC, and reading identification information recorded in a file header area of the Firmware file; and determining the modified data content of the Firmware file by using the identification information, and writing the modified data content into the BMC to upgrade the BMC. Therefore, in the application, the upgrading mode that the Firmware file is integrally written into the BMC in the existing scheme is changed into the mode that the modified data content in the Firmware file is only written into the BMC, so that the upgrading time can be shortened, the upgrading efficiency is improved, and the problem that the written content is damaged due to overlong upgrading time is avoided; the invention also discloses a BMC upgrading device, equipment and a computer readable storage medium, which can also realize the technical effects.
Description
Technical Field
The present invention relates to the field of BMC upgrading technology, and more particularly, to a BMC upgrading method, apparatus, device, and computer-readable storage medium.
Background
The BMC (Baseboard Management Controller) can implement functions such as related control and information supervision of a server, and is a platform for visually presenting server information. Firmware of the BMC is a bin file stored in Flash, and the Firmware contains information such as uboot, kernel, file system, configuration file, application processes and the like, so that the starting and function realization of the BMC are ensured. The BMC Firmware file is generated by script packaging, and the content of the BMC file can be modified according to requirements.
The Firmware file of the BMC is 32M in total, and the BMC function can take effect only after the Firmware file is completely written into Flash during upgrading. However, in the upgrading process of writing the Firmware file into the Flash, since the whole file of the Firmware file needs to be written, the time consumption is long, the mirror image damage phenomenon written into the Flash can occur probabilistically, and if the mirror image is damaged, the BMC start failure or the function loss can be caused.
Disclosure of Invention
The invention aims to provide a BMC upgrading method, a BMC upgrading device, equipment and a computer readable storage medium, so that BMC can be upgraded quickly, and the problem that BMC starting fails or functions are lost due to damage of written content caused by overlong upgrading time is solved.
In order to achieve the above object, the present invention provides a BMC upgrading method, including:
receiving a Firmware file to be written into the BMC;
reading identification information recorded in a file header area of the Firmware file;
determining modified data content of the Firmware file by using the identification information;
and writing the modified data content into the BMC to upgrade the BMC.
The Firmware file comprises a file header area and a preset number of content storage areas.
Wherein the predetermined number of content storage areas includes: the system comprises an uboot storage area, a kernel storage area, a file system storage area, a configuration file storage area and an application program storage area.
Wherein the determining the modified data content of the Firmware file by using the identification information comprises:
determining a target content storage area in which the data content is modified by using the area identification information;
and determining the modified data content in the target content storage area by using the content identification information, and determining the storage position of the modified data content according to the position identification information.
Wherein the writing the modified data content to the BMC to upgrade the BMC includes:
and writing the modified data content into the Flash of the BMC by using the position identification information so as to upgrade the BMC.
In order to achieve the above object, the present invention further provides a BMC upgrading apparatus, including:
the file receiving module is used for receiving a Firmware file to be written into the BMC;
the reading module is used for reading the identification information recorded in the file header area of the Firmware file;
the content determining module is used for determining modified data content of the Firmware file by using the identification information;
and the content writing module is used for writing the modified data content into the BMC so as to upgrade the BMC.
The Firmware file comprises a file header area and a preset number of content storage areas.
Wherein the predetermined number of content storage areas includes: the system comprises an uboot storage area, a kernel storage area, a file system storage area, a configuration file storage area and an application program storage area.
In order to achieve the above object, the present invention further provides a BMC upgrading device, including:
a memory for storing a computer program;
a processor for implementing the steps of the BMC upgrading method as described above when executing the computer program.
To achieve the above object, the present invention further provides a computer readable storage medium having a computer program stored thereon, where the computer program, when executed by a processor, implements the steps of the BMC upgrading method as described above.
According to the scheme, the BMC upgrading method provided by the embodiment of the invention comprises the following steps: receiving a Firmware file to be written into the BMC, and reading identification information recorded in a file header area of the Firmware file; and determining the modified data content of the Firmware file by using the identification information, and writing the modified data content into the BMC to upgrade the BMC. Therefore, in the application, the upgrading mode that the Firmware file is integrally written into the BMC in the existing scheme is changed into the mode that the modified data content in the Firmware file is only written into the BMC, so that the upgrading time can be shortened, the upgrading efficiency is improved, and the problem that the written content is damaged due to overlong upgrading time is avoided; the invention also discloses a BMC upgrading device, equipment and a computer readable storage medium, which can also realize the technical effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart of a BMC upgrading method disclosed in the embodiments of the present invention;
FIG. 2 is a schematic diagram of a Firmware file region partition structure disclosed in the embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a BMC upgrading apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a BMC upgrading device disclosed in the embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a BMC upgrading method, a BMC upgrading device, BMC upgrading equipment and a computer readable storage medium, which are used for rapidly upgrading a BMC and avoiding the problem that the BMC is failed to start or functions are lost due to damage of written content caused by overlong upgrading time.
Referring to fig. 1, a schematic flow diagram of a BMC upgrading method provided in an embodiment of the present invention is shown; the method specifically comprises the following steps:
s101, receiving a Firmware file to be written into the BMC;
wherein the Firmware file comprises a header area and a predetermined number of content storage areas. The predetermined number of content storage areas includes: the system comprises an uboot storage area, a kernel storage area, a file system storage area, a configuration file storage area and an application program storage area.
It should be noted that, in the existing BMC upgrading scheme, Firmware is written into corresponding Flash as a whole, and if BMC is upgraded by using the original upgrading scheme, 32M content needs to be written into Flash completely when BMC Firmware is upgraded by a client server, so that the time spent is long, the image damage probability is increased, the probability of influencing the startup and the normal operation of functions of the server is correspondingly increased, and troubles are caused to the client.
Therefore, in the application, in order to shorten the upgrading time, the Firmware file content is modified by modifying the Firmware packaging mode, so that a method for integrally writing the Firmware file into Flash is avoided, and the problem of mirror image damage caused by long BMC upgrading time is reduced to the maximum extent. The specific method is that the Firmware file needs to be divided into regions according to content features and attributes, for example: the Firmware file may be divided into a header area and a predetermined number of content storage areas. The specific number of the content storage areas may be set by self-definition according to the content characteristics and attributes, and is not limited in this embodiment.
S102, reading identification information recorded in a file header area of a Firmware file;
specifically, after the Firmware file is divided into areas, when a script is packaged each time, modified content needs to be recorded in a file header area of the Firmware file, the modified content can be recorded through identification information, and the identification information can indicate which area content is not modified, which area content is modified, which content is specifically modified, a specific storage position of the modified content, and the like. Therefore, when the Firmware file is obtained and updated, the identification information recorded in the file header area of the Firmware file may be written first, for example: firstly writing the initial 1M content of the Firmware file so as to select a content storage area to be written in Flash according to the recorded identification information, directly positioning the content storage area according to the identification information, writing the modified data content in Flash, and upgrading the BMC.
In addition, the specific space size of the header area and each content storage area, and what content is stored in each content storage area can be set by user according to needs. Referring to fig. 2, a schematic diagram of a Firmware file region division structure disclosed in the present invention is shown; as can be seen from the figure, in the present application, the Firmware file is divided into six regions, which are: the method comprises the following steps of (1) a file header area, an uboot storage area, a kernel storage area, a file system storage area, a configuration file storage area and an application program storage area; wherein, the file header area can be set as 1M space for recording the change content; the uboot storage area is an uboot storage position, namely a uboot. The kernel storage area is a kernel storage position, namely a ui file, and occupies a size of 4M; the file system storage area is a file system storage position and occupies 5M of size; the configuration file storage area is the storage position of each configuration file and occupies 5M of size; the application storage area is a storage location of each application, and occupies a size of 16M.
S103, determining the modified data content of the Firmware file by using the identification information;
wherein the determining the modified data content of the Firmware file by using the identification information comprises: determining a target content storage area in which the data content is modified by using the area identification information; and determining the modified data content in the target content storage area by using the content identification information, and determining the storage position of the modified data content according to the position identification information.
It is understood that, in the present application, the identification information may include area identification information indicating which area has no modified content and which area has modified content, content identification information indicating which area has specifically modified content, and location identification information indicating a specific storage location of the modified content, where the location identification information may be index information from which modified data content of the Firmware file can be directly located, thereby achieving fast determination of the modified data content. Therefore, after the identification information recorded in the file header area is read, the modified data content can be quickly positioned from the Firmware file by using the identification information, so that the upgrading can be carried out through the content.
And S104, writing the modified data content into the BMC to upgrade the BMC.
Wherein the writing the modified data content to the BMC to upgrade the BMC includes: and writing the modified data content into the Flash of the BMC by using the position identification information so as to upgrade the BMC.
It should be noted that, after the modified data content of the Firmware file is determined by using the identification information, the location where the modified data needs to be erased and written in Flash of the BMC can be searched according to the location identification information in the identification information, so that the modified data content is correspondingly written in.
It can be seen that, according to the upgrading method disclosed by the application, after the Firmware file is subjected to region division, identification information can be added during Firmware packaging, during upgrading, a region needing to be refreshed can be selected according to the identification information recorded in the divided region of the Firmware file, and the part which does not need to be modified is kept unchanged, so that the upgrading efficiency is improved.
The upgrade apparatus provided in the embodiment of the present invention is introduced below, and the upgrade apparatus described below and the upgrade method described above may be referred to each other.
Referring to fig. 3, a schematic structural diagram of a BMC upgrading apparatus provided in an embodiment of the present invention is shown; the device may specifically include:
the file receiving module 100 is used for receiving a Firmware file to be written into the BMC;
a reading module 200, configured to read identification information recorded in a header area of the Firmware file;
a content determining module 300, configured to determine modified data content of the Firmware file by using the identification information;
a content writing module 400, configured to write the modified data content into the BMC, so as to upgrade the BMC.
Wherein the Firmware file comprises a header area and a predetermined number of content storage areas.
Wherein the predetermined number of content storage areas includes: the system comprises an uboot storage area, a kernel storage area, a file system storage area, a configuration file storage area and an application program storage area.
Wherein the content determination module comprises
A first determination unit configured to determine a target content storage area in which the data content is modified, using the area identification information;
a second determination unit for determining the modified data content in the target content storage area using the content identification information;
and the third determining unit is used for determining the storage position of the modified data content according to the position identification information.
Wherein the content writing module is specifically configured to: and writing the modified data content into the Flash of the BMC by using the position identification information so as to upgrade the BMC.
Referring to fig. 4, the embodiment of the present invention further discloses a schematic structural diagram of a BMC upgrade device; the device may specifically include:
a memory for storing a computer program;
a processor, configured to implement the steps of the BMC upgrading method according to the above method embodiment when executing the computer program.
In this embodiment, the device may be a PC (Personal Computer), or may be a terminal device such as a smart phone, a tablet Computer, a palmtop Computer, or a portable Computer.
The device may include a memory 11, a processor 12, and a bus 13.
The memory 11 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 11 may in some embodiments be an internal storage unit of the device, for example a hard disk of the device. The memory 11 may also be an external storage device of the device in other embodiments, such as a plug-in hard disk provided on the device, a Smart Memory Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory 11 may also include both an internal storage unit of the device and an external storage device. The memory 11 may be used not only to store application software installed in the device and various kinds of data such as program codes for performing an upgrade method, etc., but also to temporarily store data that has been output or is to be output.
The processor 12 may be, in some embodiments, a Central Processing Unit (CPU), controller, microcontroller, microprocessor or other data Processing chip for executing program codes stored in the memory 11 or Processing data, such as program codes for executing an upgrade method.
The bus 13 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 4, but this does not indicate only one bus or one type of bus.
Further, the device may further include a network interface 14, and the network interface 14 may optionally include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which are generally used to establish a communication connection between the device and other electronic devices.
Optionally, the device may further comprise a user interface, which may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the device and for displaying a visualized user interface.
Fig. 4 shows only the device with the components 11-14, and it will be understood by those skilled in the art that the structure shown in fig. 4 does not constitute a limitation of the device, and may comprise fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
The embodiment of the invention also discloses a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and when being executed by a processor, the computer program realizes the steps of the BMC upgrading method in the embodiment of the method.
Wherein the storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
In summary, when the BMC Firmware is packaged by a script, the Firmware is divided into a plurality of areas, the identification information indicating the modified content of the version of the Firmware is written into the first area, when the BMC Firmware is updated, the area to be refreshed is selected according to the identification information recorded in the first area, and the area to be refreshed is located to the position where the Firmware is required to be modified, and the part which is not required to be modified remains unchanged. After the area is selected, the area can be directly positioned to the corresponding position of the Flash for refreshing, so that the upgrading efficiency of the BMC is greatly improved, and the problem of damage to the written content caused by overlong upgrading time is avoided.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (10)
1. A BMC upgrading method is characterized by comprising the following steps:
receiving a Firmware file to be written into the BMC;
reading identification information recorded in a file header area of the Firmware file;
determining modified data content of the Firmware file by using the identification information;
and writing the modified data content into the BMC to upgrade the BMC.
2. The BMC upgrade method according to claim 1, wherein the Firmware file includes a header area and a predetermined number of content storage areas.
3. The BMC upgrade method of claim 2, wherein the predetermined number of content storage areas comprises: the system comprises an uboot storage area, a kernel storage area, a file system storage area, a configuration file storage area and an application program storage area.
4. The BMC upgrade method according to claim 2, wherein the determining modified data content of the Firmware file by using the identification information comprises:
determining a target content storage area in which the data content is modified by using the area identification information;
and determining the modified data content in the target content storage area by using the content identification information, and determining the storage position of the modified data content according to the position identification information.
5. The BMC upgrade method of claim 4, wherein the writing the modified data content to the BMC to upgrade the BMC comprises:
and writing the modified data content into the Flash of the BMC by using the position identification information so as to upgrade the BMC.
6. A BMC upgrade apparatus, comprising:
the file receiving module is used for receiving a Firmware file to be written into the BMC;
the reading module is used for reading the identification information recorded in the file header area of the Firmware file;
the content determining module is used for determining modified data content of the Firmware file by using the identification information;
and the content writing module is used for writing the modified data content into the BMC so as to upgrade the BMC.
7. The BMC upgrade device of claim 6, wherein the Firmware file comprises a header area and a predetermined number of content storage areas.
8. The BMC upgrade device of claim 7, wherein the predetermined number of content storage areas comprises: the system comprises an uboot storage area, a kernel storage area, a file system storage area, a configuration file storage area and an application program storage area.
9. A BMC upgrade device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the BMC upgrade method as claimed in any one of claims 1 to 5 when executing said computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored thereon, which, when being executed by a processor, carries out the steps of the BMC upgrade method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911370218.5A CN111158733A (en) | 2019-12-26 | 2019-12-26 | BMC upgrading method, device, equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911370218.5A CN111158733A (en) | 2019-12-26 | 2019-12-26 | BMC upgrading method, device, equipment and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111158733A true CN111158733A (en) | 2020-05-15 |
Family
ID=70556871
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911370218.5A Withdrawn CN111158733A (en) | 2019-12-26 | 2019-12-26 | BMC upgrading method, device, equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111158733A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112015431A (en) * | 2020-08-27 | 2020-12-01 | 深圳忆联信息系统有限公司 | Method and device for modifying firmware information by one key, computer equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7293165B1 (en) * | 2003-04-03 | 2007-11-06 | Advanced Micro Devices, Inc. | BMC-hosted boot ROM interface |
WO2017185253A1 (en) * | 2016-04-27 | 2017-11-02 | 华为技术有限公司 | Patch upgrade-based file processing method and device, terminal, and storage medium |
CN108920171A (en) * | 2018-05-15 | 2018-11-30 | 联想(北京)有限公司 | Firmware update and device, electronic equipment |
CN109240739A (en) * | 2018-09-27 | 2019-01-18 | 郑州云海信息技术有限公司 | A kind of method, apparatus and controlled terminal of rapid configuration BIOS option |
-
2019
- 2019-12-26 CN CN201911370218.5A patent/CN111158733A/en not_active Withdrawn
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7293165B1 (en) * | 2003-04-03 | 2007-11-06 | Advanced Micro Devices, Inc. | BMC-hosted boot ROM interface |
WO2017185253A1 (en) * | 2016-04-27 | 2017-11-02 | 华为技术有限公司 | Patch upgrade-based file processing method and device, terminal, and storage medium |
CN108920171A (en) * | 2018-05-15 | 2018-11-30 | 联想(北京)有限公司 | Firmware update and device, electronic equipment |
CN109240739A (en) * | 2018-09-27 | 2019-01-18 | 郑州云海信息技术有限公司 | A kind of method, apparatus and controlled terminal of rapid configuration BIOS option |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112015431A (en) * | 2020-08-27 | 2020-12-01 | 深圳忆联信息系统有限公司 | Method and device for modifying firmware information by one key, computer equipment and storage medium |
CN112015431B (en) * | 2020-08-27 | 2023-12-05 | 深圳忆联信息系统有限公司 | Method, device, computer equipment and storage medium for modifying firmware information by one key |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9558016B2 (en) | Platform system, method for changing support hardware configuration of universal extensible firmware interface basic input output system and computer program product | |
CN107729083B (en) | Method for loading driver and embedded device | |
CN105144074B (en) | It is stored using the block of hybrid memory device | |
US10191838B2 (en) | Method and device for checking influence of deleting cache file, and mobile terminal | |
KR101555210B1 (en) | Apparatus and method for downloadin contents using movinand in portable terminal | |
US10802750B2 (en) | Universal flash storage memory module, controller and electronic device with advanced turbo write buffer and method for operating the memory module | |
CN109783558A (en) | Introduction method, device, computer equipment and the storage medium of Excel data | |
CN101770382A (en) | System starting method and computer system | |
CN112579187A (en) | Optimization method and device for cold start of application program | |
CN111857712A (en) | Form processing method, device, terminal and medium | |
US20110004719A1 (en) | Memory Element | |
CN111562882A (en) | Data writing method, intelligent terminal and storage medium | |
CN103677893B (en) | Method for reducing size of image file of starting up and arithmetic device | |
CN108694052B (en) | Firmware upgrading method, firmware upgrading device and firmware upgrading system | |
CN111158733A (en) | BMC upgrading method, device, equipment and computer readable storage medium | |
CN110399166B (en) | ME Nonce value saving method, device, equipment and storage medium | |
US20080276121A1 (en) | Method and infrastructure for recognition of the resources of a defective hardware unit | |
CN115878327A (en) | Bus reservation method, device, server, electronic equipment and storage medium | |
CN113704177B (en) | Storage method, system and related components of server firmware upgrade file | |
CN115509618A (en) | Drive control method, device, apparatus, storage medium, and program product | |
CN114442930A (en) | Method and device for controlling group disk array, electronic equipment and readable storage medium | |
US20170131946A1 (en) | Method and device for formatting storage of mobile terminal | |
US11556350B2 (en) | Electronic device and method for setting at least one specified pin read during booting stage when configurating a display panel dynamically | |
CN111625184A (en) | Flash memory data burning method and system | |
CN111953753B (en) | Communication device connection method, device, computer device and 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 | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20200515 |
|
WW01 | Invention patent application withdrawn after publication |