CN116932010B - System firmware upgrading method, device and server - Google Patents

System firmware upgrading method, device and server Download PDF

Info

Publication number
CN116932010B
CN116932010B CN202311182425.4A CN202311182425A CN116932010B CN 116932010 B CN116932010 B CN 116932010B CN 202311182425 A CN202311182425 A CN 202311182425A CN 116932010 B CN116932010 B CN 116932010B
Authority
CN
China
Prior art keywords
file
equipment
area
upgrading
starting
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
CN202311182425.4A
Other languages
Chinese (zh)
Other versions
CN116932010A (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.)
Capital Information Technology Development Co ltd
Original Assignee
Capital Information Technology Development 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 Capital Information Technology Development Co ltd filed Critical Capital Information Technology Development Co ltd
Priority to CN202311182425.4A priority Critical patent/CN116932010B/en
Publication of CN116932010A publication Critical patent/CN116932010A/en
Application granted granted Critical
Publication of CN116932010B publication Critical patent/CN116932010B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • G06F11/0757Error or fault detection not based on redundancy by exceeding limits by exceeding a time limit, i.e. time-out, e.g. watchdogs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1433Saving, restoring, recovering or retrying at system level during software upgrading
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention provides a system firmware upgrading method, a device and a server, which relate to the technical field of on-line upgrading of embedded equipment system firmware, and comprise the following steps: acquiring a system firmware upgrade file through a system boot partition; performing equipment information verification processing on the system firmware upgrade file, updating data of a file operation area in the equipment system by using the system firmware upgrade file when the equipment information verification passes, and restarting the updated equipment system; monitoring a system restarting process of the equipment system, and performing system operation verification processing on the restarting process of the equipment system; if the operation verification of the equipment system is passed, updating the data of the file backup area and the equipment information storage area in the equipment system by using the system firmware upgrade file to determine a target equipment system which is successfully upgraded. The invention can reduce the system upgrading time and obviously improve the system upgrading efficiency.

Description

System firmware upgrading method, device and server
Technical Field
The present invention relates to the field of online firmware upgrade of embedded devices, and in particular, to a method, an apparatus, and a server for upgrading system firmware.
Background
When the user purchases the embedded product, the software system of the embedded device may have bug or incomplete function implementation, so that the system needs to be further optimized after shipment, and the functions of the embedded system are perfected. At present, related technology proposes that after an embedded system stops running, a board card in an embedded equipment case can be disassembled, and a professional technician performs connection burning through a debugging serial port or an emulator.
Disclosure of Invention
Therefore, the present invention aims to provide a method, an apparatus and a server for upgrading system firmware, which can reduce the system upgrade time and significantly improve the system upgrade efficiency by upgrading the system on line.
In a first aspect, an embodiment of the present invention provides a method for upgrading system firmware, where the method is applied to an online firmware upgrading system of an embedded device, and the method includes: acquiring a system firmware upgrade file through a system boot partition, wherein the system boot partition is used for booting a loader; and performing equipment information verification processing on the system firmware upgrade file, and updating data of a file operation area in the equipment system by using the system firmware upgrade file when the equipment information verification passes, and restarting the updated equipment system, wherein the file operation area comprises: a software core and an operating system of the equipment system; monitoring a system restarting process of the equipment system, and performing system operation verification processing on the restarting process of the equipment system; if the operation verification of the equipment system is passed, updating the data of the file backup area and the equipment information storage area in the equipment system by using a system firmware update file to determine a target equipment system which is successfully updated, wherein the file backup area comprises: the backup of the software core and the running system of the device system before upgrading, the device information storage area comprises: ID number and version number information.
In one embodiment, an appliance system includes: the storage device, before the step of obtaining the system firmware upgrade file through the system boot partition, includes: partitioning the storage device to determine a target partition set, wherein the target partition set comprises: the system comprises a system boot partition, a start identification partition, a file running area, a file backup area and a device information storage area.
In one embodiment, the step of performing device information verification processing on the system firmware upgrade file includes: copying a first system file of the file operation area to a file backup area, and determining a first system backup file; performing CRC (cyclic redundancy check) on the system firmware upgrade file; and when the CRC check is passed, matching the first device information in the device information storage area with the second device information in the system firmware upgrade file.
In one embodiment, after the step of matching the first device information of the device information storage area with the second device information in the system firmware upgrade file, the method includes: if the matching fails, returning an error code and recovering the normal operation of the equipment system; if the matching is successful, the system firmware upgrade file is sent to the file running area for data updating, an updated second system file is determined, and the updated equipment system is restarted.
In one embodiment, the step of performing a system operation check process on a restart process of a device system includes: determining an operation flow of the equipment system based on the starting identification partition, wherein the starting identification partition is used for storing a starting identification of the system, and the operation flow of the equipment system comprises: an online upgrade process and a normal business process; when the equipment system is in an online upgrading process, judging whether the loading starting time is smaller than a preset time interval or not through a preset timer; if the loading starting time is not less than the preset time interval, entering a normal service flow, restoring the first system backup file of the file backup area to the file operation area, and restarting the equipment system after returning an error code; if the loading starting time is smaller than the preset time interval, determining that the operation check of the equipment system is passed, and continuing the online upgrading process.
In one embodiment, the step of determining an operational flow of the device system based on the boot identification partition comprises: performing state analysis on the starting identifier in the starting identifier partition; when the starting mark is in an error state, the equipment system is in a normal service flow; when the start-up identifier is in a correct state, the equipment system is in an online upgrade process.
In one embodiment, the step of updating data of the file backup area and the device information storage area in the device system with the system firmware upgrade file includes: backing up the second system file of the file operation area to the file backup area so as to update the first system backup file of the file backup area into the second system backup file; and updating the first device information of the device information storage area to the second device information in the system firmware upgrade file.
In a second aspect, an embodiment of the present invention further provides a system firmware upgrade apparatus, where the apparatus is applied to a firmware online upgrade system of an embedded device, and the apparatus includes: the upgrade file acquisition module acquires a system firmware upgrade file through a system boot partition, wherein the system boot partition is used for booting a loader; the information verification module is used for performing equipment information verification processing on the system firmware upgrade file, updating data of a file operation area in the equipment system by using the system firmware upgrade file when the equipment information verification passes, and restarting the updated equipment system, wherein the file operation area comprises: a software core and an operating system of the equipment system; the operation checking module is used for monitoring a system restarting process of the equipment system and performing system operation checking processing on the restarting process of the equipment system; and a system upgrading module for updating the data of the file backup area and the equipment information storage area in the equipment system by using the system firmware upgrading file if the operation verification of the equipment system is passed, and determining a target equipment system which is successfully upgraded, wherein the file backup area comprises: the backup of the software core and the running system of the device system before upgrading, the device information storage area comprises: ID number and version number information.
In a third aspect, embodiments of the present invention also provide a server comprising a processor and a memory, the memory storing computer executable instructions executable by the processor, the processor executing the computer executable instructions to implement the method of any one of the first aspects.
In a fourth aspect, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions that, when invoked and executed by a processor, cause the processor to implement the method of any one of the first aspects.
The embodiment of the invention has the following beneficial effects:
according to the system firmware upgrading method, device and server provided by the embodiment of the invention, the system firmware upgrading file is acquired through the system boot partition, the device information verification processing is carried out on the system firmware upgrading file, and when the device information verification passes, the data of the file operation area in the device system is updated by utilizing the system firmware upgrading file; restarting the updated equipment system, monitoring the system restarting process of the equipment system, performing system operation verification processing on the restarting process of the equipment system, and if the operation verification of the equipment system is passed, updating the data of the file backup area and the equipment information storage area in the equipment system by using a system firmware upgrading file to determine a target equipment system which is successfully upgraded.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the above objects, features and advantages of the present invention more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a system firmware upgrading method according to an embodiment of the present invention;
fig. 2 is a specific flow chart of a system firmware upgrading method according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating another embodiment of a method for upgrading system firmware;
fig. 4 is a schematic structural diagram of a system firmware upgrading device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described in conjunction with the embodiments, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
At present, the firmware upgrading of the traditional embedded equipment can be completed by professional technicians through a debugging serial port or an emulator, the embedded equipment in operation is required to be stopped, the board card is required to be disassembled from an embedded equipment cabinet, and the embedded equipment is required to be burnt through wiring with the emulator.
Referring to a flow chart of a system firmware upgrading method shown in fig. 1, the method is applied to a firmware online upgrading system of an embedded device, and mainly includes the following steps S102 to S108:
step S102, obtaining a system firmware upgrade file through a system boot partition, where the system boot partition is used to boot a loader, and receiving the system firmware upgrade file through a boot program (such as Uboot and lio) in the system boot partition, where in one embodiment, the device system includes: the method comprises the steps that a storage device Flash is required to be subjected to partition processing before a step of acquiring a system firmware upgrade file through a system boot partition, and a target partition set is determined, wherein the target partition set comprises: system boot partition: uboot, start identification partition: boot flagParam, file run area: normal Kernel and Normal RootFs, file backup area: back Kernel and back RootFs, and device information storage area devinfo.
Step S104, performing device information verification processing on the system firmware upgrade file, updating data of a file operation area in the device system by using the system firmware upgrade file when the device information verification passes, and restarting the updated device system, wherein the file operation area is used for storing software cores of the device system which normally operates and file images of the operation system, and in one embodiment, setting a start identifier in a start identifier partition after updating the data of the file operation area in the device system by using the system firmware upgrade file.
Step S106, monitoring the system restarting process of the equipment system and performing system operation checking processing on the restarting process of the equipment system, wherein in one implementation mode, the system operation checking processing is used for judging whether the system can normally operate after updating the data of the file operation area by the system firmware upgrade file, wherein the judging basis is mainly as follows: whether the normal starting can be performed within a specified time; the state of the starting mark in the starting mark partition is used for determining whether the normal business process is entered or the system online upgrading process is entered, in one implementation mode, the judging sequences of the two judging bases can be interchanged, and corresponding system operation checking processes are adopted aiming at different judging sequences.
Step S108, if the operation verification of the equipment system is passed, updating the data of the file backup area and the equipment information storage area in the equipment system by using the system firmware update file to determine a target equipment system which is successfully updated, wherein the file backup area comprises: the backup of the software core and the running system of the device system before upgrading, the device information storage area comprises: in one embodiment, after the operation verification is passed, the ID number and version number information can be updated with respect to the file operation area, the file backup area and the device information storage area, and an upgrade success code is returned to the background server, so as to complete the system firmware upgrade process.
According to the system firmware upgrading method provided by the embodiment of the invention, the system upgrading time can be reduced and the system upgrading efficiency can be obviously improved through the firmware online upgrading system.
The embodiment of the invention provides an implementation manner of online upgrading firmware of embedded equipment, which is shown in a specific flow diagram of a system firmware upgrading method in fig. 2, and specifically comprises the following steps (1) to (3):
(1) Before the system firmware upgrade file is imported into the system, the first system file (the software core and the running system of the system before upgrade) of the file running area is required to be copied to the file backup area, the first system backup file (the software core and the backup of the running system of the system before upgrade) is determined, and the system firmware upgrade file is subjected to CRC (cyclic redundancy check), in one implementation mode, when the CRC passes, the first device information of the device information storage area is matched with the second device information in the system firmware upgrade file: if the matching fails, returning an error code and recovering the normal operation of the equipment system; if the matching is successful, the system firmware upgrade file is sent to a file operation area for data updating, an updated second system file (a software core and an operation system of the updated system) is determined, and after a start-up identification is set, the updated equipment system is restarted, wherein the file operation area comprises: in one embodiment, the files in the file running area are updated at the above stage to obtain a second system file, and only the matching check is performed on the first device information in the device information storage area and the second device information in the system firmware updating file, and no update is performed.
(2) Monitoring a system restarting process of the equipment system, and determining an operation flow of the equipment system based on the starting identification partition: performing state analysis on the starting identifier in the starting identifier partition, when the starting identifier is in an error state (FALSE), the equipment system is in a normal service flow, and when the starting identifier is in a correct state (TRUE), the equipment system is in an online upgrading flow, wherein the starting identifier partition is used for storing the starting identifier of the system, and the operation flow of the equipment system comprises: in one embodiment, if it is determined that the system upgrade fails, a corresponding error code needs to be returned, and the system is restarted after being configured as FALSE, at this time, the system enters the normal service flow, and the process of restarting and rechecking in the online upgrade flow does not need to be repeated.
(3) When the equipment system is in an online upgrade process, judging whether the loading starting time is smaller than a preset time interval or not through a preset timer (timing a watchdog for one minute): if the loading starting time is not less than the preset time interval, entering a normal service flow, restoring the first system backup file of the file backup area to the file operation area, and restarting the equipment system after returning an error code; if the loading start time is smaller than the preset time interval, determining that the operation check of the equipment system passes, continuing to perform an online upgrading process, and updating data of the file backup area and the equipment information storage area in the equipment system, wherein in one implementation mode, after an error code is returned, the system is restarted after a start identifier is configured as FALSE, in another implementation mode, the system is guided to start from the file operation area, judging the loading time interval, and if the judging result is unqualified, indicating that the system is abnormal after upgrading, so that the system is started too slowly or cannot be started normally.
In one embodiment, the process of updating data of a file backup area and a device information storage area in a device system includes: and backing up the second system file of the file operation area to the file backup area so as to update the first system backup file of the file backup area into the second system backup file, and updating the first device information of the device information storage area into the second device information in the system firmware upgrading file, thereby obtaining a target device system of which the file operation area, the file backup area and the device information storage area are all used for completing system firmware upgrading (the second system file, the second system backup file and the second device information).
In one implementation manner, for the foregoing step S106, the embodiment of the present invention further provides another implementation manner of performing a system operation verification process on a restarting process of an equipment system, referring to a specific flow diagram of another system firmware upgrading method shown in fig. 3, after a system is booted from a file operation area, a timer is set first to determine whether the system can be normally booted, and then a startup identification state is determined: when the starting time is not less than one minute and the starting mark is in an error state, determining that the non-upgrading flow system is restarted, and returning an error code to the background server; when the starting time is not less than one minute and the starting mark is in a correct state, restoring the system file before upgrading, confirming the upgrading failure, setting the starting mark in the correct state to be in an error state after an error code is returned, restarting the system, and confirming the end of the upgrading process; when the starting time is less than one minute and the starting mark is in an error state, confirming that the starting mark is a non-upgrading process, and enabling the system to normally operate; when the starting time is less than one minute and the starting mark is in a correct state, copying the updated file in the file running area to the file backup area, updating the data in the equipment information storage area, setting the starting mark in the correct state to an error state, thereby avoiding the system from entering the updating process again for verification after restarting, entering the normal running process, returning an updating success code to the background server, and ending the updating process.
In summary, the invention can upgrade the system on line through the firmware, can reduce the system upgrade time, and obviously improve the system upgrade efficiency.
For the system firmware upgrading method provided by the foregoing embodiment, the embodiment of the present invention provides a system firmware upgrading device, which is applied to a firmware online upgrading system of an embedded device, referring to a structural schematic diagram of a system firmware upgrading device shown in fig. 4, where the device includes the following parts:
the upgrade file acquisition module 402 acquires a system firmware upgrade file through a system boot partition, wherein the system boot partition is used for booting a loader;
the information verification module 404 performs device information verification processing on the system firmware upgrade file, and updates data of a file operation area in the device system by using the system firmware upgrade file when the device information verification passes, and restarts the updated device system, where the file operation area includes: a software core and an operating system of the equipment system;
the operation checking module 406 monitors a system restarting process of the equipment system and performs system operation checking processing on the restarting process of the equipment system;
and a system upgrade module 408, configured to update data of a file backup area and an equipment information storage area in the equipment system by using a system firmware upgrade file if the operation check of the equipment system is passed, to determine a target equipment system that is successfully upgraded, where the file backup area includes: the backup of the software core and the running system of the device system before upgrading, the device information storage area comprises: ID number and version number information.
According to the firmware online upgrading device provided by the embodiment of the application, the system upgrading time can be reduced and the system upgrading efficiency can be remarkably improved through the firmware online upgrading system.
In one embodiment, an apparatus system includes: the storage device, before performing the step of obtaining the upgrade file of the system firmware through the system boot partition, the upgrade file obtaining module 402 is further configured to: partitioning the storage device to determine a target partition set, wherein the target partition set comprises: the system comprises a system boot partition, a start identification partition, a file running area, a file backup area and a device information storage area.
In one embodiment, when performing the step of performing the device information verification process on the system firmware upgrade file, the information verification module 404 is further configured to: copying a first system file of the file operation area to a file backup area, and determining a first system backup file; performing CRC (cyclic redundancy check) on the system firmware upgrade file; and when the CRC check is passed, matching the first device information in the device information storage area with the second device information in the system firmware upgrade file.
In one embodiment, after performing the step of matching the first device information in the device information storage area with the second device information in the system firmware upgrade file, the information verification module 404 is further configured to: if the matching fails, returning an error code and recovering the normal operation of the equipment system; if the matching is successful, the system firmware upgrade file is sent to the file running area for data updating, an updated second system file is determined, and the updated equipment system is restarted.
In one embodiment, when performing the step of performing the system operation checking process on the rebooting process of the device system, the operation checking module 406 is further configured to: determining an operation flow of the equipment system based on the starting identification partition, wherein the starting identification partition is used for storing a starting identification of the system, and the operation flow of the equipment system comprises: an online upgrade process and a normal business process; when the equipment system is in an online upgrading process, judging whether the loading starting time is smaller than a preset time interval or not through a preset timer; if the loading starting time is not less than the preset time interval, entering a normal service flow, restoring the first system backup file of the file backup area to the file operation area, and restarting the equipment system after returning an error code; if the loading starting time is smaller than the preset time interval, determining that the operation check of the equipment system is passed, and continuing the online upgrading process.
In one embodiment, when performing the step of determining the operation flow of the device system based on the boot identification partition, the operation verification module 406 is further configured to: performing state analysis on the starting identifier in the starting identifier partition; when the starting mark is in an error state, the equipment system is in a normal service flow; when the start-up identifier is in a correct state, the equipment system is in an online upgrade process.
In one embodiment, when the step of updating the data in the file backup area and the device information storage area in the device system with the system firmware upgrade file is performed, the system upgrade module 408 is further configured to: backing up the second system file of the file operation area to the file backup area so as to update the first system backup file of the file backup area into the second system backup file; and updating the first device information of the device information storage area to the second device information in the system firmware upgrade file.
The device provided by the embodiment of the present invention has the same implementation principle and technical effects as those of the foregoing method embodiment, and for the sake of brevity, reference may be made to the corresponding content in the foregoing method embodiment where the device embodiment is not mentioned.
The embodiment of the invention provides electronic equipment, which comprises a processor and a storage device; the storage means has stored thereon a computer program which, when executed by the processor, performs the method of any of the embodiments described above.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, where the electronic device 100 includes: a processor 50, a memory 51, a bus 52 and a communication interface 53, the processor 50, the communication interface 53 and the memory 51 being connected by the bus 52; the processor 50 is arranged to execute executable modules, such as computer programs, stored in the memory 51.
The memory 51 may include a high-speed random access memory (RAM, random Access Memory), and may further include a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory. The communication connection between the system network element and at least one other network element is achieved via at least one communication interface 53 (which may be wired or wireless), and the internet, wide area network, local network, metropolitan area network, etc. may be used.
Bus 52 may be an ISA bus, a PCI bus, an EISA bus, or the like. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in FIG. 5, but not only one bus or type of bus.
The memory 51 is configured to store a program, and the processor 50 executes the program after receiving an execution instruction, and the method executed by the apparatus for flow defining disclosed in any of the foregoing embodiments of the present invention may be applied to the processor 50 or implemented by the processor 50.
The processor 50 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuitry in hardware in the processor 50 or by instructions in the form of software. The processor 50 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a digital signal processor (Digital Signal Processing, DSP for short), application specific integrated circuit (Application Specific Integrated Circuit, ASIC for short), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA for short), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory 51 and the processor 50 reads the information in the memory 51 and in combination with its hardware performs the steps of the above method.
The computer program product of the readable storage medium provided by the embodiment of the present invention includes a computer readable storage medium storing a program code, where the program code includes instructions for executing the method described in the foregoing method embodiment, and the specific implementation may refer to the foregoing method embodiment and will not be described herein.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the above examples are only specific embodiments of the present invention, and are not intended to limit the scope of the present invention, but it should be understood by those skilled in the art that the present invention is not limited thereto, and that the present invention is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (6)

1. A method for upgrading system firmware, wherein the method is applied to a firmware online upgrading system of an embedded device, and the method comprises the following steps:
partitioning the storage device to determine a target partition set, wherein the target partition set comprises: the system comprises a system boot partition, a starting identification partition, a file running area, a file backup area and an equipment information storage area;
acquiring a system firmware upgrade file through the system boot partition, wherein the system boot partition is used for booting a loader;
and performing equipment information verification processing on the system firmware upgrading file, and when the equipment information verification is passed, updating the data of the file running area in the equipment system by using the system firmware upgrading file, and restarting the updated equipment system, wherein the file running area comprises: a software core and an operating system of the device system, the device system comprising: the storage device;
monitoring a system restarting process of the equipment system, and performing system operation verification processing on the restarting process of the equipment system;
the method comprises the steps of determining an operation flow of a device system based on a starting identification partition, wherein the starting identification partition is used for storing a starting identification of the system, and the operation flow of the device system comprises the following steps: an online upgrade process and a normal business process; when the equipment system is in the online upgrading process, judging whether the loading starting time is smaller than a preset time interval or not through a preset timer; if the loading starting time is not less than the preset time interval, entering the normal business process, restoring the first system backup file of the file backup area to the file operation area, and restarting the equipment system after returning an error code; if the loading starting time is smaller than the preset time interval, determining that the operation check of the equipment system is passed, and continuing the online upgrading process;
performing state analysis on the starting identifier in the starting identifier partition; when the starting mark is in an error state, the equipment system is in the normal business process; when the starting mark is in a correct state, the equipment system is in the online upgrading process;
if the operation verification of the equipment system is passed, updating the data of the file backup area and the equipment information storage area in the equipment system by using the system firmware upgrading file to determine a target equipment system with successful upgrading, wherein the file backup area comprises: and before upgrading, backing up the software core and the running system of the equipment system, wherein the equipment information storage area comprises: ID number and version number information;
backing up the second system file of the file operation area to the file backup area so as to update the first system backup file of the file backup area into the second system backup file; and updating the first device information of the device information storage area to the second device information in the system firmware upgrade file.
2. The system firmware upgrade method of claim 1, wherein the step of performing a device information verification process on the system firmware upgrade file comprises:
copying the first system file of the file operation area to the file backup area to determine a first system backup file;
performing CRC (cyclic redundancy check) on the system firmware upgrade file;
and when the CRC passes, matching the first device information in the device information storage area with the second device information in the system firmware upgrade file.
3. The system firmware upgrade method of claim 2, wherein after the step of matching the first device information of the device information storage area with the second device information in the system firmware upgrade file, comprising:
if the matching fails, returning an error code and recovering the normal operation of the equipment system;
if the matching is successful, the system firmware upgrading file is sent to the file running area to update data, an updated second system file is determined, and the updated equipment system is restarted.
4. A system firmware upgrade apparatus, wherein the apparatus is applied to a firmware online upgrade system of an embedded device, the apparatus comprising:
partitioning the storage device to determine a target partition set, wherein the target partition set comprises: the system comprises a system boot partition, a starting identification partition, a file running area, a file backup area and an equipment information storage area;
the upgrade file acquisition module acquires a system firmware upgrade file through the system boot partition, wherein the system boot partition is used for booting a loader;
the information verification module is used for carrying out equipment information verification processing on the system firmware upgrading file, and when the equipment information verification is passed, updating the data of the file operation area in the equipment system by using the system firmware upgrading file, and restarting the updated equipment system, wherein the file operation area comprises: a software core and an operating system of the device system, the device system comprising: the storage device;
the operation checking module is used for monitoring a system restarting process of the equipment system and performing system operation checking processing on the restarting process of the equipment system;
the method comprises the steps of determining an operation flow of a device system based on a starting identification partition, wherein the starting identification partition is used for storing a starting identification of the system, and the operation flow of the device system comprises the following steps: an online upgrade process and a normal business process; when the equipment system is in the online upgrading process, judging whether the loading starting time is smaller than a preset time interval or not through a preset timer; if the loading starting time is not less than the preset time interval, entering the normal business process, restoring the first system backup file of the file backup area to the file operation area, and restarting the equipment system after returning an error code; if the loading starting time is smaller than the preset time interval, determining that the operation check of the equipment system is passed, and continuing the online upgrading process;
performing state analysis on the starting identifier in the starting identifier partition; when the starting mark is in an error state, the equipment system is in the normal business process; when the starting mark is in a correct state, the equipment system is in the online upgrading process;
and a system upgrading module for updating the data of the file backup area and the equipment information storage area in the equipment system by using the system firmware upgrading file if the operation verification of the equipment system is passed, and determining a target equipment system which is successfully upgraded, wherein the file backup area comprises: and before upgrading, backing up the software core and the running system of the equipment system, wherein the equipment information storage area comprises: ID number and version number information;
backing up the second system file of the file operation area to the file backup area so as to update the first system backup file of the file backup area into the second system backup file; and updating the first device information of the device information storage area to the second device information in the system firmware upgrade file.
5. A server comprising a processor and a memory, the memory storing computer executable instructions executable by the processor, the processor executing the computer executable instructions to implement the method of any one of claims 1 to 3.
6. A computer readable storage medium storing computer executable instructions which, when invoked and executed by a processor, cause the processor to implement the method of any one of claims 1 to 3.
CN202311182425.4A 2023-09-14 2023-09-14 System firmware upgrading method, device and server Active CN116932010B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311182425.4A CN116932010B (en) 2023-09-14 2023-09-14 System firmware upgrading method, device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311182425.4A CN116932010B (en) 2023-09-14 2023-09-14 System firmware upgrading method, device and server

Publications (2)

Publication Number Publication Date
CN116932010A CN116932010A (en) 2023-10-24
CN116932010B true CN116932010B (en) 2024-01-19

Family

ID=88384648

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311182425.4A Active CN116932010B (en) 2023-09-14 2023-09-14 System firmware upgrading method, device and server

Country Status (1)

Country Link
CN (1) CN116932010B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101782859A (en) * 2010-03-18 2010-07-21 上海乐毅信息科技有限公司 Upgrading method of embedded system in application
CN102075564A (en) * 2010-12-23 2011-05-25 李华嵩 Remote software upgrading technique
WO2017067448A1 (en) * 2015-10-22 2017-04-27 深圳市中兴微电子技术有限公司 Firmware-over-the-air upgrade method, system and computer storage medium
CN109032846A (en) * 2018-08-08 2018-12-18 京信通信系统(中国)有限公司 Equipment remote backup upgrade method, device, computer storage medium and equipment
CN110333891A (en) * 2019-07-08 2019-10-15 四川爱联科技有限公司 The method of enhanced OTA upgrading based on Internet of Things
CN111104146A (en) * 2019-12-18 2020-05-05 天地伟业技术有限公司 Embedded equipment with high stability and maintainability
CN113703801A (en) * 2021-07-14 2021-11-26 深圳市有为信息技术发展有限公司 Vehicle-mounted terminal firmware upgrading method and electronic device
CN114035818A (en) * 2021-10-25 2022-02-11 深圳市联洲国际技术有限公司 Firmware upgrading method and device, computer equipment and storage medium
CN114064084A (en) * 2021-11-23 2022-02-18 瑞斯康达科技发展股份有限公司 ONU upgrade management method, storage medium, electronic device, and ONU

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101782859A (en) * 2010-03-18 2010-07-21 上海乐毅信息科技有限公司 Upgrading method of embedded system in application
CN102075564A (en) * 2010-12-23 2011-05-25 李华嵩 Remote software upgrading technique
WO2017067448A1 (en) * 2015-10-22 2017-04-27 深圳市中兴微电子技术有限公司 Firmware-over-the-air upgrade method, system and computer storage medium
CN109032846A (en) * 2018-08-08 2018-12-18 京信通信系统(中国)有限公司 Equipment remote backup upgrade method, device, computer storage medium and equipment
CN110333891A (en) * 2019-07-08 2019-10-15 四川爱联科技有限公司 The method of enhanced OTA upgrading based on Internet of Things
CN111104146A (en) * 2019-12-18 2020-05-05 天地伟业技术有限公司 Embedded equipment with high stability and maintainability
CN113703801A (en) * 2021-07-14 2021-11-26 深圳市有为信息技术发展有限公司 Vehicle-mounted terminal firmware upgrading method and electronic device
CN114035818A (en) * 2021-10-25 2022-02-11 深圳市联洲国际技术有限公司 Firmware upgrading method and device, computer equipment and storage medium
CN114064084A (en) * 2021-11-23 2022-02-18 瑞斯康达科技发展股份有限公司 ONU upgrade management method, storage medium, electronic device, and ONU

Also Published As

Publication number Publication date
CN116932010A (en) 2023-10-24

Similar Documents

Publication Publication Date Title
TWI384367B (en) System of updating firmware and method thereof
WO2016206514A1 (en) Startup processing method and device
CN110162435B (en) Method, system, terminal and storage medium for starting and testing PXE of server
CN101807152B (en) Basic output and input system for self verification of selection read only memory and verification method thereof
CN109101247B (en) Method and device for installing driver and server
CN111736906A (en) BIOS-based boot entry synchronous storage method, system, terminal and storage medium
CN113110891B (en) Firmware loading method and device for solid state disk, computer equipment and storage medium
CN110737449A (en) Method, apparatus, and machine-readable storage medium for processing device firmware
CN113138791A (en) Upgrade processing method and device based on embedded system and electronic equipment
CN110286953B (en) Method and device for starting embedded system, embedded device and storage medium
CN116932010B (en) System firmware upgrading method, device and server
CN113867812B (en) Method, system, equipment and medium for BMC to acquire link information
CN115827069A (en) Starting control method, system and device for server mainboard
CN114153503A (en) BIOS control method, device and medium
CN110908725B (en) Application program starting method and device, electronic equipment and readable medium
CN112667444A (en) System upgrading method, storage medium and terminal equipment
CN112596749A (en) Method and device for system power-on self-test and self-repair
CN115129384A (en) Electronic equipment and running method of starting program of electronic equipment
CN113900934B (en) Multi-mirror hybrid refresh test method, system, terminal and storage medium
CN115291957B (en) Initialization method and device of multiprocessor mainboard
CN117130672A (en) Server start flow control method, system, terminal and storage medium
CN112346786B (en) Debugging information recording method applied to startup stage and operation stage after startup
CN114265603A (en) System upgrading method and device based on asymmetric partition and electronic equipment
CN116089153A (en) BMC abnormal factor confirmation method, system, terminal and storage medium
CN117675576A (en) Method and device for upgrading server firmware, server and electronic equipment

Legal Events

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