CN114006901A - Embedded network equipment cover-dismounting-free firmware upgrading method and system - Google Patents
Embedded network equipment cover-dismounting-free firmware upgrading method and system Download PDFInfo
- Publication number
- CN114006901A CN114006901A CN202111648632.5A CN202111648632A CN114006901A CN 114006901 A CN114006901 A CN 114006901A CN 202111648632 A CN202111648632 A CN 202111648632A CN 114006901 A CN114006901 A CN 114006901A
- Authority
- CN
- China
- Prior art keywords
- firmware
- server
- flashing
- network
- upgrading
- 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.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/34—Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters
-
- 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (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 invention belongs to the technical field of communication, and discloses a method for upgrading a firmware of an un-dismounted cover of embedded network equipment, which comprises the following steps: step 1: starting a Boot loader, and entering a flashing mode; step 2: acquiring network flashing agent firmware through a network card, wherein the network flashing agent firmware is prestored in a first peripheral server; and step 3: storing the network flashing agent firmware into a memory and operating to obtain a network flashing agent system operating in the memory; and 4, step 4: running a flashing script on the network flashing agent system; and 5: acquiring system firmware from a second peripheral server through a network card; step 6: the method can upgrade the firmware only through the internet access under the condition that the Boot loader works normally without dismounting the shell. Meanwhile, the invention also discloses a system for implementing the method.
Description
Technical Field
The invention belongs to the technical field of communication, and particularly relates to a method and a system for upgrading firmware of an embedded network device without detaching a cover.
Background
When the embedded network device needs firmware update, the conventional operation is to upgrade the firmware through the WEB page of the device or to upgrade the firmware through the SSH login re-order line. However, under some abnormal conditions, such as WEB program abnormality or SSH failure to log in, or even firmware damage in FLASH failure to start, the conventional upgrading method is no longer applicable.
Generally speaking, Boot loaders in FLASH can work normally because of the write protection measures. Some advanced point systems can be started from other storage media (such as a U disk and an SD card) and then upgrade firmware by switching BOOT mode selection of a CPU (central processing unit), or upgrade firmware by other storage media under a BOOT loader, but the premise is that equipment needs to support a BOOT mode selection switch and a corresponding storage media interface. Many low-cost embedded network devices do not support or expose such BOOT mode selection, or support such external interfaces, or even have no outgoing console, such as IPC, wireless router, CPE, and some industrial gateway devices. The existing related repairing and brushing methods comprise the following steps:
1. programming FLASH on board programmers is supported, and the programmer interface is not usually exposed to the chassis.
2. When the programming of FLASH in a board programmer is not supported, the FLASH needs to be welded, and the off-line programmer is used for programming and then re-mounting.
The two firmware upgrading methods are time-consuming and labor-consuming, and operation can be performed without disassembling the shell.
Disclosure of Invention
The invention mainly aims to provide a method for upgrading firmware of an embedded network device without detaching a cover, which can upgrade the firmware only through a network port under the condition that a Boot loader works normally without detaching a shell.
Meanwhile, the invention also discloses a system for implementing the method.
According to a first aspect of the present invention, there is provided a method for upgrading firmware of an embedded network device without detaching a set cover, the method comprising the steps of:
step 1: starting a Boot loader, and entering a flashing mode;
step 2: acquiring network flashing agent firmware through a network card, wherein the network flashing agent firmware is prestored in a first peripheral server;
and step 3: storing the network flashing agent firmware into a memory and operating to obtain a network flashing agent system operating in the memory;
and 4, step 4: running a flashing script on the network flashing agent system, wherein the flashing script is obtained from a second peripheral server;
and 5: acquiring system firmware from a second peripheral server through a network card;
step 6: writing the system firmware into the formatted flash memory, automatically resetting the network flashing agent system after the firmware writing is finished, and running the system firmware in the flash memory to finish upgrading.
In the method for upgrading the firmware of the non-dismantling cover of the embedded network device, the step 1 specifically comprises:
and starting the Boot loader, and entering a flashing mode or normally starting a system of the embedded network equipment according to the user operation.
In the method for upgrading the firmware of the embedded network device without detaching the cover, the first server is a TFTP server, and the second server is an FTP server;
and starting the FTP client in the network flashing proxy system, and acquiring a flashing script and system firmware from the FTP server through the FTP client.
In the method for upgrading firmware of an embedded network device without detaching a set cover, the step 5 further includes: formatting and partitioning the flash memory according to the partition information; in the step 6, the system firmware is written into the designated partition;
and the partition information is recorded in the flashing script.
In the method for upgrading the firmware of the non-dismantling cover of the embedded network device, the network card initialization operation is further performed after the steps 1 and 4 are performed.
Meanwhile, the invention also discloses a system for upgrading the firmware of the embedded network equipment without detaching the machine cover, which comprises a first server and a second server, wherein the first server stores the network machine-refreshing agent firmware, and the second server stores the system firmware;
when the embedded network equipment needs to be upgraded, the network flashing agent firmware and the flashing script are obtained from the first server based on any one of the methods, and when the flashing script is run, the system firmware is obtained from the second server and is adopted to upgrade the firmware.
In the above system for upgrading the firmware without detaching the embedded network device, the first server is a TFTP server, and the second server is an FTP server.
One of the above technical solutions of the present invention has at least one of the following advantages or beneficial effects:
in the invention, the network flashing agent firmware is obtained and stored in the memory, the flashing script can be obtained by running the firmware, the system firmware can be obtained by running the flashing script, the network flashing agent system is automatically reset after the firmware is written in the flash memory, and the system firmware in the flash memory is run to realize the upgrading of the system firmware.
The method only needs the normal network card and can start the Boot loader.
The method and the system can be implemented under abnormal conditions such as damaged system firmware, abnormal WEB program or incapability of logging in by SSH, and can realize the purpose of upgrading the system firmware without detaching the machine.
Drawings
The invention is further described below with reference to the accompanying drawings and examples;
FIG. 1 is a flow chart of example 1 of the present invention;
fig. 2 is a block diagram of the structure of embodiment 2 of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.
Example 1
Referring to fig. 1, a method for upgrading firmware of an embedded network device without detaching a set cover, the embedded network device having a network card and running a linux system, the method comprising the steps of:
step 1: starting a Boot loader, and entering a flashing mode;
in the last 20 years, embedded systems have used rom (eprom) as their storage device, however in recent years, Flash memory has fully replaced the status of rom (eprom) in embedded systems, and is used for storing Boot loaders and operating systems or program codes, or directly as hard disk.
The Boot loader needs to be started before the linux system, generally, the damage probability of system firmware is far greater than that of the Boot loader, and therefore the method is provided on the premise that the Boot loader can operate.
After Boot loader is started, if a user presses a certain key for a long time, such as a start key for 3s, the mode is started, and if the user does not do any operation, the linux system is operated and started normally.
Step 2: initializing a network card, and acquiring network flashing agent firmware through the network card, wherein the network flashing agent firmware is prestored in a first peripheral server; the first server is preferably a TFTP server that communicates with the device based on the simple file transfer protocol.
In this embodiment, the reason why the first server is preferably a TFTP server is that: FTP servers require TCP, while TFTP requires UDP. UDP is simple and easy to implement, whereas TCP is implemented in Bootloader in a non-tasking environment with a large workload.
Under a flashing mode, after a network card is initialized, network flashing agent firmware is obtained from a first server and written to a specified address of a memory;
bootloaders of different CPUs (different manufacturers or different CPU architectures) are generally not completely uniform. The specific address written on the memory after the first server acquires the network flashing agent firmware is specified in the Bootloader of the specific hardware platform. That is, at this stage, after the Bootloader enters the flush mode, the Bootloader knows which name of the flush agent firmware it needs to obtain from the TFTP server, and also knows which address of the memory the obtained flush agent firmware exists at. Generally, the version and the name of the flashing agent firmware are matched with the name and the model of the internet of things device, and the name and the model of the internet of things device are transmitted before the flashing agent firmware is acquired from the first server to search for the matched firmware.
And step 3: storing the network flashing agent firmware into a memory and operating the network flashing agent firmware; after the network flashing agent firmware is run, a network flashing agent system is run in the memory, and the agent system has necessary tools for running corresponding scripts and writing necessary information and tools of the firmware into the flash.
The machine-refreshing agent firmware is only required to be acquired by the bootloader and stored in the memory, and is guided to run by the bootloader.
And 4, step 4: running a flashing script on a network flashing agent system, initializing a network card, establishing an FTP client, and establishing a communication connection based on a file transfer protocol between the FTP client and a second server;
the system refreshing script is generated after the network refreshing agent firmware is started, and the memory address of the system firmware is recorded in the network refreshing script;
and 5: acquiring system firmware from a second peripheral server through a network card;
after the network flashing agent system starts to operate, the network flashing agent system downloads the flashing script from the second server, and the flashing script sysupdate.
The premise of programming the corresponding partition is to format and partition the flash memory, the formatting and the partitioning are performed according to the partition information, and the partition information is stored in a memory of the internet of things device and cannot be lost in the flashing process.
The partition information is used to format and partition the flash memory.
In the invention, the IP address stored in the firmware of the first server, whether the firmware of the first server is the flashing agent firmware, the flashing script or the system firmware, can be written into the memory of the Internet of things equipment in advance and cannot be lost due to the flashing process.
During the continuous updating process, the administrator can correspondingly update the relevant firmware and scripts in the first server and the second server.
How to distinguish the firmware and the script suitable for the device from the scripts and the firmware in the first server and the second server is achieved in many ways, for example, the name of the firmware script corresponds to the name and the model of the device, or a special folder is arranged to store the script and the firmware for a specific device, so that the required firmware and the script can be accurately acquired.
Step 6: writing the system firmware into the formatted flash memory, automatically resetting the network flashing agent system after the firmware writing is finished, and running the system firmware in the flash memory to finish upgrading.
The invention has the advantages that: the method can finish system upgrading only by starting the Boot loader with a normal network card, can be implemented under abnormal conditions such as damaged system firmware, abnormal WEB program or incapability of logging in by SSH and the like, and can realize the purpose of upgrading the system firmware without dismantling the machine.
Example 2
Referring to fig. 2, an embedded network device disassembly-free cover firmware upgrade system includes a first server 1 and a second server 2, wherein the first server stores a network update proxy firmware therein, and the second server stores a system firmware; the embedded network device 3 needs to be able to Boot the Boot loader and needs a network card 4 to be able to access the network.
When the embedded network device needs to perform firmware upgrade, the method according to embodiment 1 is used to obtain a network flush agent firmware from a first server and run a flush script, and when the flush script is run, a system firmware is obtained from a second server and the firmware upgrade is performed by using the system firmware, where the first server is a TFTP server and the second server is an FTP server.
While embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims (7)
1. A method for upgrading firmware of an exempt-dismantling cover of an embedded network device is characterized by comprising the following steps:
step 1: starting a Boot loader, and entering a flashing mode;
step 2: acquiring network flashing agent firmware through a network card, wherein the network flashing agent firmware is prestored in a first peripheral server;
and step 3: storing the network flashing agent firmware into a memory and operating to obtain a network flashing agent system operating in the memory;
and 4, step 4: running a flashing script on the network flashing agent system, wherein the flashing script is obtained from a second peripheral server;
and 5: acquiring system firmware from a second peripheral server through a network card;
step 6: writing the system firmware into the formatted flash memory, automatically resetting the network flashing agent system after the firmware writing is finished, and running the system firmware in the flash memory to finish upgrading.
2. The method for upgrading firmware of a tamper-free cover of an embedded network device according to claim 1, wherein the step 1 specifically comprises:
and starting the Boot loader, and entering a flashing mode or normally starting a system of the embedded network equipment according to the user operation.
3. The method for upgrading firmware of a non-removable cover of an embedded network device according to claim 1, wherein the first server is a TFTP server and the second server is an FTP server;
and starting the FTP client in the network flashing proxy system, and acquiring a flashing script and system firmware from the FTP server through the FTP client.
4. The method for upgrading firmware of a tamper-free cover of an embedded network device according to claim 1, wherein the step 5 further comprises: formatting and partitioning the flash memory according to the partition information; in the step 6, the system firmware is written into the designated partition;
and the partition information is recorded in the flashing script.
5. The method for upgrading firmware of a tamper-free cover of an embedded network device according to claim 1, wherein a network card initialization operation is further performed after the steps 1 and 4 are performed.
6. A firmware upgrading system of an embedded network device without detaching a machine cover is characterized by comprising a first server and a second server, wherein the first server stores network machine-refreshing agent firmware, and the second server stores system firmware;
when the embedded network equipment needs firmware upgrading, the network flashing agent firmware is obtained from the first server based on the method of any one of claims 1 to 5, the flashing script is run, and when the flashing script is run, the system firmware is obtained from the second server and the firmware upgrading is carried out by adopting the system firmware.
7. The embedded network device tamper-free cover firmware upgrade system of claim 6, wherein the first server is a TFTP server and the second server is a FTP server.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111648632.5A CN114006901B (en) | 2021-12-31 | 2021-12-31 | Embedded network equipment cover-dismounting-free firmware upgrading method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111648632.5A CN114006901B (en) | 2021-12-31 | 2021-12-31 | Embedded network equipment cover-dismounting-free firmware upgrading method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114006901A true CN114006901A (en) | 2022-02-01 |
CN114006901B CN114006901B (en) | 2022-04-08 |
Family
ID=79932358
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111648632.5A Active CN114006901B (en) | 2021-12-31 | 2021-12-31 | Embedded network equipment cover-dismounting-free firmware upgrading method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114006901B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116679946A (en) * | 2022-11-22 | 2023-09-01 | 荣耀终端有限公司 | Firmware upgrading method and terminal |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2001004749A1 (en) * | 1999-07-08 | 2001-01-18 | Axis Ab | Method and apparatus for upgrading firmware in an embedded system |
CN102141940A (en) * | 2010-12-29 | 2011-08-03 | Tcl集团股份有限公司 | Device, method and system for recovering firmware update |
CN104933367A (en) * | 2014-03-17 | 2015-09-23 | 联想(北京)有限公司 | Information processing method and electronic device |
CN105337782A (en) * | 2015-11-27 | 2016-02-17 | 上海斐讯数据通信技术有限公司 | Method and device for automatic upgrading after boot failure of network equipment firmware |
CN110109693A (en) * | 2019-04-22 | 2019-08-09 | 南京理工大学 | Embedded device remote firmware updating method |
CN111813428A (en) * | 2020-06-02 | 2020-10-23 | 西安闻泰电子科技有限公司 | Method and device for upgrading terminal firmware, electronic equipment and storage medium |
-
2021
- 2021-12-31 CN CN202111648632.5A patent/CN114006901B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2001004749A1 (en) * | 1999-07-08 | 2001-01-18 | Axis Ab | Method and apparatus for upgrading firmware in an embedded system |
CN102141940A (en) * | 2010-12-29 | 2011-08-03 | Tcl集团股份有限公司 | Device, method and system for recovering firmware update |
CN104933367A (en) * | 2014-03-17 | 2015-09-23 | 联想(北京)有限公司 | Information processing method and electronic device |
CN105337782A (en) * | 2015-11-27 | 2016-02-17 | 上海斐讯数据通信技术有限公司 | Method and device for automatic upgrading after boot failure of network equipment firmware |
CN110109693A (en) * | 2019-04-22 | 2019-08-09 | 南京理工大学 | Embedded device remote firmware updating method |
CN111813428A (en) * | 2020-06-02 | 2020-10-23 | 西安闻泰电子科技有限公司 | Method and device for upgrading terminal firmware, electronic equipment and storage medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116679946A (en) * | 2022-11-22 | 2023-09-01 | 荣耀终端有限公司 | Firmware upgrading method and terminal |
Also Published As
Publication number | Publication date |
---|---|
CN114006901B (en) | 2022-04-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7991988B2 (en) | Communication device and firmware update method thereof | |
CN110879712B (en) | Cloud data center physical host installation method and related device | |
EP2456257B1 (en) | Method and system for upgrading wireless data card | |
US7895428B2 (en) | Applying firmware updates to servers in a data center | |
US8375252B2 (en) | Method, device and system for automatic device failure recovery | |
US10635428B2 (en) | System and method for in-service update of software | |
US20160132420A1 (en) | Backup method, pre-testing method for environment updating and system thereof | |
CN110045991B (en) | RAID configuration method and device of server, computer equipment and storage medium | |
CN102726025B (en) | Installation method and relative devices of business packet | |
CN114006901B (en) | Embedded network equipment cover-dismounting-free firmware upgrading method and system | |
US11989548B2 (en) | Pushing a firmware update patch to a computing device via an out-of-band path | |
CN111273924A (en) | Software updating method and device | |
CN103136005A (en) | Method of updating firmware | |
CN101196823A (en) | Method, system and equipment for on-line software upgrade in open application structure | |
CN107220085B (en) | Method for automatically upgrading RAID card firmware | |
CN100464520C (en) | Method and system for realizing distributed data loading | |
CN109960657B (en) | Test environment deployment method and related device | |
CN111045710A (en) | Method, equipment and medium for upgrading SAS-Expander firmware based on IPMI command | |
CN115794182A (en) | Firmware out-of-band upgrading method and device, electronic equipment and storage medium | |
CN110262875B (en) | Communication method and system of Windows virtual machine and KVM host based on patch mechanism | |
KR100456978B1 (en) | Method for File Downloading in Agent | |
CN113886218B (en) | Method, device, equipment and readable medium for verifying BIOS refreshing | |
CN113507388B (en) | Equipment deployment configuration method and device, electronic equipment and storage medium | |
CN117873519A (en) | Firmware upgrading method and device, storage medium and electronic device | |
CN115576584A (en) | BIOS upgrading method and device, BMC and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |