CN110780931A - Self-adaptive firmware starting method and system - Google Patents
Self-adaptive firmware starting method and system Download PDFInfo
- Publication number
- CN110780931A CN110780931A CN201910911293.1A CN201910911293A CN110780931A CN 110780931 A CN110780931 A CN 110780931A CN 201910911293 A CN201910911293 A CN 201910911293A CN 110780931 A CN110780931 A CN 110780931A
- Authority
- CN
- China
- Prior art keywords
- firmware
- storage medium
- adaptive
- starting
- type
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
Abstract
The invention belongs to the technical field of firmware development, and particularly relates to a self-adaptive firmware starting method and a self-adaptive firmware starting system, wherein the self-adaptive firmware starting method comprises the following steps: step S1, the first storage medium of the storage firmware is powered on and started, and the first storage medium is a power-down nonvolatile storage device; step S2, the firmware identifies the first storage medium and determines the type of the first storage medium; in step S3, the firmware executes a boot program corresponding to the type of the first storage medium according to the type of the first storage medium to boot the firmware. The invention can ensure that the firmware does not need to be correspondingly re-developed according to the difference of the first storage medium, effectively shortens the firmware development flow, reduces the firmware development cost, improves the enterprise efficiency and increases the robustness of the product.
Description
Technical Field
The invention belongs to the technical field of firmware development, and particularly relates to a self-adaptive firmware starting method and a self-adaptive firmware starting system.
Background
Firmware (firmware) is used as the most basic and lowest-layer working software of the system. Hardware devices cannot operate without firmware. The firmware is generally stored in a power-down nonvolatile storage area in the equipment, and most of the firmware is stored in an erasing-only readable storage area; the firmware can only be refreshed by a specific program; the firmware storage medium may be EEPROM and FLASH or other power-failure nonvolatile devices along with the upgrade of the product; the operation flows of different power-down nonvolatile devices are different, and if the storage medium of the firmware needs to be re-developed for different storage media each time, the flow of firmware development and the firmware development cost are increased, and the enterprise efficiency is reduced.
The schematic diagram of the traditional firmware starting method flow is shown in fig. 1, and the starting flow is divided into three parts, namely reading, executing and starting; in fig. 1, after the system is powered on, the firmware reads instructions from the storage medium according to the program written for implementation; reading instructions from the medium and executing the instructions according to the content written in the firmware; when the read instruction cannot be executed in the traditional firmware starting process, the reading process is abandoned; the whole boot process fails;
in summary, the conventional firmware boot method includes: 1) initializing a drive according to a storage medium in firmware; 2) reading out the instruction from the storage medium after the initialization of the drive; 3) executing corresponding operation according to the read instruction;
disclosure of Invention
In order to solve the problem of firmware redevelopment caused by different operation flows of firmware in different storage media in the prior art, the invention aims to provide an adaptive firmware starting technology, so that the firmware can identify different storage media and use different starting programs for starting.
In order to achieve the above object, the technical solution adopted by the present invention is a self-adaptive firmware boot method, including the following steps:
step S1, the first storage medium for storing firmware is powered on and started, and the first storage medium is a power-down nonvolatile storage device;
step S2, the firmware identifies the first storage medium and determines the type of the first storage medium;
step S3, the firmware executes a boot program corresponding to the type of the first storage medium according to the type of the first storage medium to boot the firmware.
Further, in the present invention,
step S4, after the firmware is started, writing the instruction codes in the firmware into a second storage medium to implement shielding of the first storage medium; the second storage medium is a power-down volatile storage device; the instruction code refers to an instruction code independent of the first storage medium.
Further, in the step S2, the identification is to confirm the type of the first storage medium by matching the identification number of the first storage medium.
To achieve the above object, the present invention also provides an adaptive firmware boot system for the above adaptive firmware boot method,
the device comprises an identification module, a starting program module and an adaptive starting module which are arranged on the firmware;
the identification module is used for identifying the first storage medium and determining the type of the first storage medium;
the starting program module comprises starting programs corresponding to different types of the first storage media;
the self-adaptive starting module is used for selecting a starting program corresponding to the type of the first storage medium from the starting program module according to the type of the first storage medium determined by the identification module, and starting the firmware by using the starting program.
The device further comprises an instruction reading module arranged on the firmware, wherein the instruction reading module is used for writing instruction codes in the firmware into a second storage medium after the firmware is started to realize shielding of the first storage medium; the second storage medium is a power-down volatile storage device; the instruction code refers to an instruction code independent of the first storage medium.
The invention has the beneficial effects that:
1. the invention can ensure that the firmware does not need to be correspondingly re-developed according to the difference of the first storage medium, effectively shortens the firmware development flow, reduces the firmware development cost and improves the enterprise efficiency.
2. Since the first storage medium (power-down nonvolatile storage device) is shielded after the firmware is started, instruction codes of the firmware are written into the second storage medium (power-down volatile storage device), so that the use time of the first storage medium is reduced; because the life of the first storage medium is shorter than that of the second storage medium, the second storage medium is used more, so that the robustness of the product can be effectively improved, and the probability of product errors is reduced.
Drawings
FIG. 1 is a flow chart illustrating a conventional firmware boot method according to the background of the invention;
FIG. 2 is a flowchart illustrating an adaptive firmware boot method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an adaptive firmware boot system according to an embodiment of the present invention;
FIG. 4 is a schematic illustration of a shielded first storage medium according to portions of the present invention;
in the figure: 1-identification module, 2-starting program module, 3-self-adaptive starting module, 4-first storage medium and 5-second storage medium.
Detailed Description
The invention is further described below with reference to the figures and examples.
As shown in fig. 2, the adaptive firmware boot method provided by the present invention includes the following steps:
step S1, power-on starting, namely, power-on starting is carried out on the first storage medium 4 for storing the firmware, wherein the first storage medium 4 is a power-off nonvolatile storage device;
step S2, recognizing the first storage medium 4, that is, the firmware recognizes the first storage medium 4, and determines the type of the first storage medium 4; the identification is to confirm the type of the first storage medium 4 by matching the identification number (i.e., ID number) of the first storage medium 4; different first storage media have different identification numbers; currently, widely commercially available firmware storage media are mainly magnesium light, samsung, heishi, etc. NAND FLASH, SPI FLASH, NOR FLASH, etc.;
step S3, performing adaptive boot, that is, the firmware executes a boot program corresponding to the type of the first storage medium 4 according to the type of the first storage medium 4 to boot the firmware (the boot program is a driver for booting the firmware in the first storage medium, and corresponding boot programs are set in the firmware for different types of first storage media);
step S4, reading the instruction codes, that is, after the firmware is started, reading the instruction codes in the firmware, and writing the instruction codes in the firmware into the second storage medium 5 to implement shielding of the first storage medium 4 (as shown in fig. 4); the instruction codes are instruction codes which are irrelevant to the first storage medium 4 (the instruction codes also do not comprise codes of boot program parts aiming at different types of first storage media), and are equivalent to that the first storage medium 4 is not used after being booted (the first storage medium 4 does not need to be concerned any more), so that the service time of the second storage medium 5 is prolonged; the second storage medium 5 is a power-down volatile storage device (readable and writable device such as DDR RAM or the like).
As shown in fig. 3, the present invention also provides an adaptive firmware boot system for the above adaptive firmware boot method, which includes an identification module 1, a boot program module 2, an adaptive boot module 3 and an instruction reading module, which are arranged on firmware;
the identification module 1 is used for identifying the first storage medium 4 and determining the type of the first storage medium 4;
the startup program module 2 contains startup programs corresponding to different types of first storage media 4, and the startup programs are drivers for the firmware to start in the first storage media 4;
the adaptive boot module 3 is configured to select a boot program corresponding to the type of the first storage medium 4 from the boot program module 2 according to the type of the first storage medium 4 determined by the identification module 1, and boot the firmware using the selected boot program.
The instruction reading module is used for writing instruction codes in the firmware into the second storage medium 5 after the firmware is started, so as to realize shielding of the first storage medium 4; the second storage medium 5 is a power-down volatile storage device; the instruction code refers to an instruction code unrelated to the first storage medium 4.
The device according to the present invention is not limited to the embodiments described in the specific embodiments, and those skilled in the art can derive other embodiments according to the technical solutions of the present invention, and also belong to the technical innovation scope of the present invention.
Claims (5)
1. An adaptive firmware boot method, comprising the steps of:
step S1, a first storage medium (4) for storing firmware is powered on and started, wherein the first storage medium (4) is a power-down nonvolatile storage device;
step S2, the firmware identifies the first storage medium (4) and determines the type of the first storage medium (4);
and step S3, the firmware executes a boot program corresponding to the type of the first storage medium (4) according to the type of the first storage medium (4) to boot the firmware.
2. The adaptive firmware boot method according to claim 1, wherein:
step S4, after the firmware is started, writing the instruction codes in the firmware into a second storage medium (5) to realize shielding of the first storage medium (4); the second storage medium (5) is a power-down volatile storage device; the instruction code is an instruction code independent of the first storage medium (4).
3. The adaptive firmware boot method according to claim 1, wherein: in step S2, the identification is to confirm the type of the first storage medium (4) by matching the identification number of the first storage medium (4).
4. An adaptive firmware boot system for use in the method of claim 2, wherein:
the device comprises an identification module (1), a starting program module (2) and an adaptive starting module (3) which are arranged on the firmware;
the identification module (1) is used for identifying the first storage medium (4) and determining the type of the first storage medium (4);
the starting program module (2) comprises starting programs corresponding to different types of the first storage media (4);
the self-adaptive starting module (3) is used for selecting a starting program corresponding to the type of the first storage medium (4) from the starting program module (2) according to the type of the first storage medium (4) determined by the identification module (1) and starting the firmware by using the starting program.
5. The adaptive firmware boot system of claim 4, wherein: the device also comprises an instruction reading module arranged on the firmware, wherein the instruction reading module is used for writing instruction codes in the firmware into a second storage medium (5) after the firmware is started so as to realize shielding of the first storage medium (4); the second storage medium (5) is a power-down volatile storage device; the instruction code is an instruction code independent of the first storage medium (4).
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910911293.1A CN110780931A (en) | 2019-09-25 | 2019-09-25 | Self-adaptive firmware starting method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910911293.1A CN110780931A (en) | 2019-09-25 | 2019-09-25 | Self-adaptive firmware starting method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110780931A true CN110780931A (en) | 2020-02-11 |
Family
ID=69384491
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910911293.1A Pending CN110780931A (en) | 2019-09-25 | 2019-09-25 | Self-adaptive firmware starting method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110780931A (en) |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101151356A (en) * | 2005-10-28 | 2008-03-26 | 芯邦科技(深圳)有限公司 | Storage device with compatible collocation functional control chip and making method |
CN101290601A (en) * | 2008-06-10 | 2008-10-22 | 威盛电子股份有限公司 | Peripheral apparatus control circuit, computer system and method for loading firmware |
CN101446904A (en) * | 2007-11-26 | 2009-06-03 | 联发科技股份有限公司 | Method and apparatus for managing firmware of an optical storage apparatus |
CN104536848A (en) * | 2014-12-22 | 2015-04-22 | 小米科技有限责任公司 | Firmware recovery method, device and terminal |
CN106155657A (en) * | 2014-12-26 | 2016-11-23 | 美商安迈科技股份有限公司 | The method of UEFI firmware and computer system thereof |
CN106528106A (en) * | 2016-10-31 | 2017-03-22 | 武汉光迅科技股份有限公司 | Embedded system booting method adaptive to various Flash chip types |
CN106528155A (en) * | 2016-11-10 | 2017-03-22 | 深圳怡化电脑股份有限公司 | Firmware booting system, method and apparatus of checkout controller |
CN106681700A (en) * | 2015-11-09 | 2017-05-17 | 中国长城计算机深圳股份有限公司 | Firmware identification method and system based on mainboard ID |
CN109358910A (en) * | 2018-09-05 | 2019-02-19 | 广州小鹏汽车科技有限公司 | Firmware write-in, starting method and the system for realizing firmware write-in, starting |
CN109697077A (en) * | 2017-10-24 | 2019-04-30 | 华为技术有限公司 | Hard disk firmware starts method, device and equipment |
CN109885312A (en) * | 2019-01-24 | 2019-06-14 | 深圳市北斗海量科技有限公司 | A kind of method and system of the compatible more ardware model numbers of list firmware |
CN110018854A (en) * | 2019-03-26 | 2019-07-16 | 联想(北京)有限公司 | A kind of firmware matching process, equipment and computer readable storage medium |
-
2019
- 2019-09-25 CN CN201910911293.1A patent/CN110780931A/en active Pending
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101151356A (en) * | 2005-10-28 | 2008-03-26 | 芯邦科技(深圳)有限公司 | Storage device with compatible collocation functional control chip and making method |
CN101446904A (en) * | 2007-11-26 | 2009-06-03 | 联发科技股份有限公司 | Method and apparatus for managing firmware of an optical storage apparatus |
CN101290601A (en) * | 2008-06-10 | 2008-10-22 | 威盛电子股份有限公司 | Peripheral apparatus control circuit, computer system and method for loading firmware |
CN104536848A (en) * | 2014-12-22 | 2015-04-22 | 小米科技有限责任公司 | Firmware recovery method, device and terminal |
CN106155657A (en) * | 2014-12-26 | 2016-11-23 | 美商安迈科技股份有限公司 | The method of UEFI firmware and computer system thereof |
CN106681700A (en) * | 2015-11-09 | 2017-05-17 | 中国长城计算机深圳股份有限公司 | Firmware identification method and system based on mainboard ID |
CN106528106A (en) * | 2016-10-31 | 2017-03-22 | 武汉光迅科技股份有限公司 | Embedded system booting method adaptive to various Flash chip types |
CN106528155A (en) * | 2016-11-10 | 2017-03-22 | 深圳怡化电脑股份有限公司 | Firmware booting system, method and apparatus of checkout controller |
CN109697077A (en) * | 2017-10-24 | 2019-04-30 | 华为技术有限公司 | Hard disk firmware starts method, device and equipment |
CN109358910A (en) * | 2018-09-05 | 2019-02-19 | 广州小鹏汽车科技有限公司 | Firmware write-in, starting method and the system for realizing firmware write-in, starting |
CN109885312A (en) * | 2019-01-24 | 2019-06-14 | 深圳市北斗海量科技有限公司 | A kind of method and system of the compatible more ardware model numbers of list firmware |
CN110018854A (en) * | 2019-03-26 | 2019-07-16 | 联想(北京)有限公司 | A kind of firmware matching process, equipment and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100778293B1 (en) | Digital tv and upgrade method of bootloader for the same | |
CN106528106B (en) | A kind of embedded system start method of adaptive various different Flash chip types | |
CN101634960A (en) | Method for revising BIOS parameter and regenerating checksum | |
US8423991B2 (en) | Embedded network device and firmware upgrading method | |
CN101373451B (en) | Computer system for protecting double-basic input /output system program and control method thereof | |
CN102945173A (en) | User program on-line upgrading system and method | |
CN102841802B (en) | The method for upgrading software of mobile terminal | |
CN106020861A (en) | FOTA upgrading method and system for smart watch | |
CN109408122B (en) | Equipment starting method, electronic equipment and computer storage medium | |
US20120303944A1 (en) | Data recovering system and method | |
US11467645B2 (en) | Storage device and method for sudden power off recovery thereof | |
US20100049961A1 (en) | Update method for basic input/output system and update system thereof | |
CN102890655A (en) | Memory storage device, memory controller and valid data recognition method thereof | |
CN109582332B (en) | System upgrading method and device for Internet camera | |
CN110780931A (en) | Self-adaptive firmware starting method and system | |
KR20080066381A (en) | Method for upgrading software | |
US20070143540A1 (en) | RAID setting system having scanning module and related method | |
US10691569B2 (en) | System and method for testing a data storage device | |
US10698695B2 (en) | Method for intel platform detection of parameters in Flash Rom | |
US20080209157A1 (en) | Memory partitioning method | |
CN104765626A (en) | Firmware program writing method and device | |
KR20070002849A (en) | Method for update of firm ware in an electronic products | |
CN112394965B (en) | Battery management system upgrade and operation method, controller, battery management system and storage medium | |
CN108052337A (en) | A kind of firmware upgrade method and device of eMMC production tools | |
CN101739262A (en) | Firmware updating method and electronic device using same |
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 |