CN106371863A - Embedded multi-operation system boot program upgrading method - Google Patents

Embedded multi-operation system boot program upgrading method Download PDF

Info

Publication number
CN106371863A
CN106371863A CN201610710912.7A CN201610710912A CN106371863A CN 106371863 A CN106371863 A CN 106371863A CN 201610710912 A CN201610710912 A CN 201610710912A CN 106371863 A CN106371863 A CN 106371863A
Authority
CN
China
Prior art keywords
bootstrap
loader
flash
boot
program
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
Application number
CN201610710912.7A
Other languages
Chinese (zh)
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.)
Accelink Technologies Co Ltd
Original Assignee
Accelink Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Accelink Technologies Co Ltd filed Critical Accelink Technologies Co Ltd
Priority to CN201610710912.7A priority Critical patent/CN106371863A/en
Publication of CN106371863A publication Critical patent/CN106371863A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Landscapes

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

Abstract

The invention discloses an embedded multi-operation system boot program upgrading method. A pre-boot program is added before an embedded operation system boot program and a PRE-Loader is pre-solidified in an independent read-only memory, so that errors caused by manual writing of error programs in a using process are avoided. In a PRE-Loader execution process, a serial port of a target board, a Flash, a memory, stack and the like are initialized, so that an operator can upgrade and load boot programs of multiple operation systems through the serial port, writes the boot programs in a Nor flash, and upgrades and loads operation system kernels stored in the Nor flash and root file systems stored in a Nand flash through the boot programs, the function of booting and upgrading the operation systems is realized, the systems are prevented from being destructed due to reasons of power failure and the like in the upgrading process of the operation system boot programs, and the risk of program stealing caused by reservation of a JTAG port on the target board is lowered.

Description

A kind of bootstrap upgrade method of embedded multiple operating system
Technical field
The present invention relates to a kind of upgrade method of embedded OS, specifically a kind of multiple embedded operation systems that upgrade The method of system bootstrap, belongs to field of computer technology.
Background technology
In today of automaticity increasingly raising, embedded device is ubiquitous, with the raising of automaticity, more The built-in equipment operation coming the more embedded OS.In general, the startup of system is required for boot-loader's Guiding, when boot-loader is not normally functioning, whole system just can not work completely, so boot-loader is whole Very important status is occupied in system.
Embedded OS type is a lot, and each have their own advantage, conventional operating system include linux, Vxworks, ucos ii (micro control operation system two) etc., their startup is required for boot- The guiding of loader, upgrading boot-loader typically has a following several method:
Method one: before making Target Board, nor flash chip is not also welded on Target Board, now first with burning Boot-loader programming in nor flash, is then welded on Target Board by piece machine;
Method two: had the boot-loader program that can run in Target Board, boot-loader is made by programming There is the function of upgrading, therefore, during boot-loader is transferred internal memory operation, is upgraded by boot-loader and order Order, by new boot-loader file write nor flash, is restarted Target Board and can be run new boot-loader program, Thus completing to upgrade;
Method three: design certain physical circuit and connect, the jtag interface in objective chip is drawn, such that it is able to pass through Jtag interface is upgraded to boot-loader.
However, being analyzed finding prior art Shortcomings to three kinds of conventional upgrade methods, specifically as follows:
Method one can only be using once before nor flash chip is not also welded on Target Board, after burn-oning Method one is lack scope for their abilities it is impossible to realize the upgrading to boot-loader again;
Method two is a kind of the most frequently used mode, it using to be boot-loader be loaded into during execution In internal memory, the boot-loader file in flash can be written over.But there is problems that, when in upgrading boot- Power-off during loader, the boot-loader loss in internal memory and the boot-loader file in nor flash are broken Bad;Or the boot-loader file of upgrading is problematic, the boot-loader after upgrading after power-off restarting cannot hold OK, the consequence that both of these case leads to is exactly that system again cannot start;
Method three is upgraded to boot-loader by jtag mouth, can be with upgrading power down and file in solution two The problem of mistake is it is only necessary to again upgrade.But it there is problems that, by jtag upgrading need to design extra electricity Road, additionally, the process of upgrading is more complicated loaded down with trivial details, upgrading required time is longer it is even more important that it needs on Target Board Stay jtag mouth, this brings serious potential safety hazard to the program of Target Board.
Content of the invention
For above-mentioned prior art existing problems, the present invention provides a kind of bootstrap upgrading of embedded multiple operating system Method, for solving unreliable, the unsafe problem existing for existing upgrade method, can also provide a kind of upgrading to draw simultaneously The method leading several operation systems.
The present invention is achieved through the following technical solutions a kind of above-mentioned purpose: bootstrap liter of embedded multiple operating system Level method, this bootstrap upgrade method comprises the steps:
1) add one section of pre-boot program (pre- before the bootstrap (boot-loader) of embedded OS Loader), and by pre-loader it is solidified in independent read only memory rom, simultaneously electricity in given processor on hardware Run pre-loader afterwards first;
2) pre-loader completes initialization operation to the serial ports of objective chip, flash, internal memory and storehouse, then waits User input instruction, input instruction includes updated boot programs and bootload program;
3) if user selects updated boot programs, the bootstrap under computer specified path is write by system by serial ports Enter in Target Board nor flash, if user selects bootload program, the bootstrap in nor flash is added by system It is downloaded in internal memory and executes, and then upgrade, guide operating system nucleus (kernel) and root file system (root file System, rootfs);
4) if user does not have input instruction, system executes default action and loads the bootstrap of designated storage area and hold OK.
Further, described pre-loader program enables to whole embedded system upgrading or loads several operation systems Bootstrap, and then guide several operation systems
Further, described bootstrap is written to Target Board (nor flash) from computer by serial ports.
Further, the work completing in described pre-loader includes initialization string mouth, flash, internal memory, storehouse, specifies Input is specified with accepting user in bootstrap memory block.
The bootstrap of storage several operation systems and system kernel in described Target Board (nor flash), and The root file system of corresponding operating system is stored, so that system can run several operation systems in nand flash.
The invention has the beneficial effects as follows: 1) the method can be upgraded, load the bootstrap of multiple embedded OSs, Thus guiding several operation systems, realize the switching of several operation systems on same set of hardware system, and easy to operate;2) by In serial ports being initialized by pre-loader before bootstrap, therefore serial ports updated boot programs can be passed through, and not Need initialization but the jtag mouth of complex operation, go jtag button also to greatly increase the safety of program simultaneously;3) due to Pre-loader program Solidification, in read only memory, is difficult to be damaged due to artificial maloperation, so the reliability of system Property very high, avoid the bootstrap of operating system in escalation process due to the guiding journey of power-off or mistake of having upgraded simultaneously Sequence, will not lose or because mistake upgrading damages in power down.
Brief description
Fig. 1 is embedded multiple operating system overall structure block diagram;
Fig. 2 is the workflow diagram of pre-loader of the present invention.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation description is it is clear that described embodiment is only a part of embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of not making creative work Embodiment, broadly falls into the scope of protection of the invention.
As depicted in figs. 1 and 2, a kind of bootstrap upgrade method of embedded multiple operating system, the liter of this bootstrap Level method comprises the steps:
1) add one section of pre-boot program pre- before bootstrap boot-loader of embedded OS Loader, and pre-boot program pre-loader is solidified in independent read only memory, designated treatment on hardware simultaneously Pre-boot program pre-loader is run first after electricity on device;
2) pre-boot program pre-loader completes initialization behaviour to the serial ports of objective chip, flash, internal memory and storehouse Make, then wait user input instruction, input instruction includes updated boot programs and bootload program;
3) if user selects updated boot programs, the bootstrap under computer specified path is write by system by serial ports Enter in Target Board nor flash, if user selects bootload program, the bootstrap in nor flash is added by system It is downloaded in internal memory and executes, and then upgrade, guide operating system nucleus and root file system;
4) if user does not have input instruction, system executes default action and loads the bootstrap of designated storage area and hold OK.In pre-loader implementation procedure, user selects to need loaded which kind of bootstrap, and then this bootstrap goes to load phase The operating system answered and root file system, thus realize the upgrading of several operation systems.
Technical scheme after improving as the present invention is: described pre-loader program enables to whole embedded system Upgrading or the bootstrap loading several operation systems, and then guide several operation systems.
Technical scheme after improving as the present invention is: described bootstrap is written to Target Board by serial ports from computer In nor flash, without jtag fever writes, this operating process is made to be greatly simplified;Because pre-loader makes Bootstrap can be upgraded by serial ports, without staying jtag interface therefore on Target Board, it is to avoid program is stolen, whole system The safety of system greatly improves.
Technical scheme after improving as the present invention is: the work completing in described pre-loader program includes initializing Serial ports, flash, internal memory, storehouse, specify bootstrap memory block and accept user specify input.
Technical scheme after improving as the present invention is: stores several operation systems in described Target Board nor flash Bootstrap, and store kernel and the root file system of corresponding operating system in nand flash, so that system can To run several operation systems.
Technical scheme after improving as the present invention is: can prestore multiple embedded operations in nor flash The bootstrap of system, convenient guiding several operation systems.
Embodiment one
A kind of bootstrap upgrade method of embedded multiple operating system, this upgrade method includes:
1) add pre-loader pre-boot program before embedded OS bootstrap.This program leaves one in In the read only memory of piece independence, and be before this read only memory is welded on Target Board by program Solidification wherein.? In the hardware designs of Target Board, run this pre-loader program, do so by hardware given processor first after electricity, it is to avoid The generation of situations such as during upgrading boot-loader, system cut-off damages to system, and pre-loader program due to Be premature cure in read only memory, therefore also it will be made to be destroyed due to faulty operation, the degree of reliability of system obtains To raising;
2) pre-loader initializes to the serial ports of objective chip, flash, internal memory, storehouse etc. first, then waits User input instruction, optional instruction includes updated boot programs, bootload program etc.;
3) if user selects updated boot programs, the bootstrap under computer specified path is write by system by serial ports Enter in Target Board nor flash, if user selects bootload program, the bootstrap in nor flash is added by system It is downloaded in internal memory and executes, and then upgrade, guide operating system nucleus and root file system etc..
4) due to the introducing of pre-loader, and the continuous increase of current memory capacity, can be in the nor of Target Board Deposit bootstrap and the system kernel of several operation systems in flash, and deposit corresponding root file in nand flash System, in pre-loader implementation procedure, user selects to need loaded which kind of bootstrap, and then this bootstrap goes to load Corresponding operating system and root file system, realize the function of multiple operating system;
5) if user does not have input instruction, system executes the bootstrap of default action loading designated storage area simultaneously Execution.
Upgrading method of the present invention can easily be upgraded several operation systems, such as linux, vxworks etc., by In different operating system by respective advantage, different projects is different to the demand of operating system, and same project is not Also different to the demand of operating system under same time or purpose, method proposed by the invention can be very easily multiple Switch between operating system.
Secondly as pre-loader program Solidification is in one piece of read only memory, it is never because of operation The maloperation of person is destroyed, and this guarantees the guiding journey of mistake of still having upgraded regardless of power-off during system upgrade Sequence, will not result in Target Board and cannot start and upgrade it is only necessary to re-start.
Additionally, user can by jtag read objective chip in bin file, therefore stay on Target Board jtag mouth to Target Board brings the potential safety hazard of program, and in the today so valuing trade secret, this is necessarily worthless, in the present invention In the safety of the system that improves of upgrading is carried out to bootstrap by serial ports.
Embodiment provided above is the better embodiment of the present invention, is only used for the convenient explanation present invention, not to this Bright make any pro forma restriction, any those of ordinary skill in the art, if without departing from the carried skill of the present invention In the range of art feature, made, using disclosed technology contents, the Equivalent embodiments that local is changed or modified, and Without departing from the technical characteristic content of the present invention, all still fall within the range of the technology of the present invention feature.

Claims (5)

1. a kind of bootstrap upgrade method of embedded multiple operating system is it is characterised in that the upgrade method of this bootstrap Comprise the steps:
1) added one section of pre-boot program pre-loader before bootstrap boot-loader of embedded OS, And pre-boot program pre-loader is solidified in independent read only memory rom, simultaneously in given processor on hardware Pre-boot program pre-loader is run first after electricity;
2) pre-boot program pre-loader completes initialization operation to the serial ports of objective chip, flash, internal memory and storehouse, so Wait user input instruction afterwards, input instruction includes updated boot programs and bootload program;
3) if user selects updated boot programs, the bootstrap under computer specified path is written to by system by serial ports In Target Board nor flash, if user selects bootload program, the boot program loads in nor flash are arrived by system In internal memory and execute, so upgrade, guiding operating system nucleus and root file system;
4) if user does not have input instruction, system executes default action and loads the bootstrap of designated storage area and execute.
2. a kind of embedded multiple operating system according to claim 1 bootstrap upgrade method it is characterised in that: institute State pre-loader program and enable to whole embedded system upgrading or the bootstrap loading several operation systems, Jin Eryin Lead several operation systems.
3. the bootstrap upgrade method of a kind of embedded multiple operating system according to claim 1 and 2, its feature exists In: described bootstrap is written to Target Board nor flash from computer by serial ports.
4. a kind of embedded multiple operating system according to claim 1 bootstrap upgrade method it is characterised in that: institute State the work completing in pre-loader program to include initialization string mouth, flash, internal memory, storehouse, specify bootstrap memory block Specify input with accepting user.
5. a kind of embedded multiple operating system according to claim 1 bootstrap upgrade method it is characterised in that: institute State bootstrap and the system kernel storing several operation systems in Target Board nor flash, and deposit in nand flash The root file system of storage corresponding operating system, so that system can run several operation systems.
CN201610710912.7A 2016-08-24 2016-08-24 Embedded multi-operation system boot program upgrading method Pending CN106371863A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610710912.7A CN106371863A (en) 2016-08-24 2016-08-24 Embedded multi-operation system boot program upgrading method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610710912.7A CN106371863A (en) 2016-08-24 2016-08-24 Embedded multi-operation system boot program upgrading method

Publications (1)

Publication Number Publication Date
CN106371863A true CN106371863A (en) 2017-02-01

Family

ID=57879000

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610710912.7A Pending CN106371863A (en) 2016-08-24 2016-08-24 Embedded multi-operation system boot program upgrading method

Country Status (1)

Country Link
CN (1) CN106371863A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108108179A (en) * 2017-12-15 2018-06-01 中国船舶重工集团公司第七0七研究所 A kind of TMS32C6713 burning program FLASH methods based on serial ports
CN108829442A (en) * 2017-05-04 2018-11-16 杭州海康威视数字技术股份有限公司 Program starts method and device
CN108958777A (en) * 2018-08-03 2018-12-07 广州云海智联科技有限公司 A kind of wireless charging device and control method
CN109409032A (en) * 2018-10-24 2019-03-01 山东超越数控电子股份有限公司 A kind of system kernel analysis method of Safety-Critical System
CN109814885A (en) * 2019-01-11 2019-05-28 厦门亿联网络技术股份有限公司 A kind of bare die method for burn-recording based on XMODEM
CN110795159A (en) * 2019-10-30 2020-02-14 福建省汽车工业集团云度新能源汽车股份有限公司 Method for preventing vehicle-mounted ECU from being mistakenly upgraded and incapable of being refreshed and storage device
CN111258604A (en) * 2020-01-14 2020-06-09 深圳市有为信息技术发展有限公司 Bootloader upgrading system and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1570884A (en) * 2003-07-18 2005-01-26 英业达股份有限公司 Multiple operating system boot loading method
US20090144538A1 (en) * 2007-11-05 2009-06-04 Duda Kenneth J Patch installation at boot time for dynamically installable, piecemeal revertible patches
CN102469207A (en) * 2010-11-19 2012-05-23 希姆通信息技术(上海)有限公司 Multi-operation system mobile phone and implementation method thereof
CN102902556A (en) * 2012-09-06 2013-01-30 深圳市共进电子股份有限公司 Multistage boot load method of embedded equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1570884A (en) * 2003-07-18 2005-01-26 英业达股份有限公司 Multiple operating system boot loading method
US20090144538A1 (en) * 2007-11-05 2009-06-04 Duda Kenneth J Patch installation at boot time for dynamically installable, piecemeal revertible patches
CN102469207A (en) * 2010-11-19 2012-05-23 希姆通信息技术(上海)有限公司 Multi-operation system mobile phone and implementation method thereof
CN102902556A (en) * 2012-09-06 2013-01-30 深圳市共进电子股份有限公司 Multistage boot load method of embedded equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
EF75823: "NOR FLASH和NAND FLASH的比较", 《HTTP://WWW.DOC88.COM/P-6116104546564.HTML》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108829442A (en) * 2017-05-04 2018-11-16 杭州海康威视数字技术股份有限公司 Program starts method and device
CN108829442B (en) * 2017-05-04 2021-12-14 杭州海康威视数字技术股份有限公司 Program starting method and device
CN108108179A (en) * 2017-12-15 2018-06-01 中国船舶重工集团公司第七0七研究所 A kind of TMS32C6713 burning program FLASH methods based on serial ports
CN108958777A (en) * 2018-08-03 2018-12-07 广州云海智联科技有限公司 A kind of wireless charging device and control method
CN109409032A (en) * 2018-10-24 2019-03-01 山东超越数控电子股份有限公司 A kind of system kernel analysis method of Safety-Critical System
CN109814885A (en) * 2019-01-11 2019-05-28 厦门亿联网络技术股份有限公司 A kind of bare die method for burn-recording based on XMODEM
CN110795159A (en) * 2019-10-30 2020-02-14 福建省汽车工业集团云度新能源汽车股份有限公司 Method for preventing vehicle-mounted ECU from being mistakenly upgraded and incapable of being refreshed and storage device
CN110795159B (en) * 2019-10-30 2023-07-21 福建省汽车工业集团云度新能源汽车股份有限公司 Method for preventing vehicle-mounted ECU from being updated by mistake and being incapable of being re-brushed and storage device
CN111258604A (en) * 2020-01-14 2020-06-09 深圳市有为信息技术发展有限公司 Bootloader upgrading system and method

Similar Documents

Publication Publication Date Title
CN106371863A (en) Embedded multi-operation system boot program upgrading method
CN105260205B (en) The method that dual operating systems start is realized on a kind of embedded board
CN104850762B (en) Prevent the undesirable method of the movement of computer, computer program and computer
US6711675B1 (en) Protected boot flow
US8181007B2 (en) Electronic device and method for secure operating system update in embedded system
TWI382346B (en) Computer system with dual bios protection mechanism and control method of the same
US9703635B2 (en) Method, computer program, and computer for restoring set of variables
US10409617B2 (en) BIOS switching device
CN101373451B (en) Computer system for protecting double-basic input /output system program and control method thereof
CN103077056B (en) Use the Bootlorder implementation method of a small amount of ROM resource
CN103970564A (en) Automatic repairing and upgrading method of embedded operating system and embedded operating system with automatic repairing and upgrading functions
WO2021103745A1 (en) Method for protectively desiging boot program
CN109426527B (en) Computer system and method for sharing Bluetooth data between UEFI firmware and operating system
WO2012071852A1 (en) Method and apparatus for upgrading bootstrap program
CN108874582A (en) A kind of system recovery method, device and terminal
CN108897576A (en) A method of the quick start BOOT based on ARM chip
WO2015184732A1 (en) Bootstrap storage method, bootstrap fault recovery method and device, and computer storage medium
CN107544804A (en) The startup method and device of embedded system terminal development mode
CN112306782B (en) Debugging test-oriented operating system kernel guiding and loading hardware and method
US11221842B2 (en) Systems and methods for executing and verifying system firmware update before committing firmware update to motherboard
US10198270B2 (en) Dynamic hardware configuration via firmware interface at computing device boot
CN103106161A (en) Display card basic input output system (BIOS) updating method based on input/output (IO) access mode
TWI609378B (en) Data storage device and operating method
CN109582370B (en) Starting method and device of NOR FLASH embedded equipment
EP3798831B1 (en) Resilient upgradable boot loader with power reset

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20170201

RJ01 Rejection of invention patent application after publication