TWI855881B - Method of mutually updating bootloader and main programs - Google Patents
Method of mutually updating bootloader and main programs Download PDFInfo
- Publication number
- TWI855881B TWI855881B TW112136962A TW112136962A TWI855881B TW I855881 B TWI855881 B TW I855881B TW 112136962 A TW112136962 A TW 112136962A TW 112136962 A TW112136962 A TW 112136962A TW I855881 B TWI855881 B TW I855881B
- Authority
- TW
- Taiwan
- Prior art keywords
- program
- main program
- boot program
- communication interface
- updating
- Prior art date
Links
Images
Landscapes
- Stored Programmes (AREA)
- Information Transfer Between Computers (AREA)
- Computer And Data Communications (AREA)
Abstract
Description
本發明涉及一種程式的更新方法,特別是涉及一種開機程式與主程式的相互更新方法。The present invention relates to a program updating method, and in particular to a method for mutually updating a boot program and a main program.
很多電子產品在不變更硬體的前提下,透過產品既有的對外通訊介面更新產品的程式(韌體),以達到功能升級或修正程式問題的目的。想要達到這個目的,產品的程式需要有兩個可獨立運作的程式,開機程式與主程式。開機程式負責透過產品既有的對外通訊介面接收指示與程式碼來更新主程式。主程式負責電子產品功能的完成。通常開機程式是嵌入式系統在加電後執行的第一段代碼,它判斷是否留在開機程式等待指示更新主程式,或跳到主程式所在的位址啟動運行。業界設計的開機程式通常設計完成即不再變動,萬一不得已需要更新,通常需要拆除產品外殼連接燒錄器才能達到更新開機程式的目的。Many electronic products can update the program (firmware) of the product through the existing external communication interface of the product without changing the hardware to achieve the purpose of functional upgrade or correction of program problems. To achieve this goal, the product program needs to have two independently operating programs, the boot program and the main program. The boot program is responsible for receiving instructions and program codes through the existing external communication interface of the product to update the main program. The main program is responsible for completing the functions of the electronic product. Usually, the boot program is the first code executed by the embedded system after power-on. It determines whether to stay in the boot program and wait for instructions to update the main program, or jump to the address where the main program is located to start running. Boot programs designed by the industry are usually designed and will not be changed once they are completed. If they need to be updated, it is usually necessary to remove the product casing and connect a burner to achieve the purpose of updating the boot program.
本發明針對現有技術的不足提供一種開機程式與主程式的相互更新方法,包含以下步驟:通過通訊介面,從外部通訊介面接收外部裝置輸出的更新訊號;由處理器,依據所述更新訊號以判斷是否更新一開機程式、一主程式或兩者,若否,則繼續進行原本行程並通過所述通訊介面從外部裝置等待接收下一所述更新訊號,若是,執行下一步驟;以及由所述處理器,依據所述更新訊號,執行所述開機程式以及所述主程式中的任一者,更新所述開機程式以及所述主程式中的另一者。The present invention aims at the inadequacies of the prior art and provides a mutual updating method of a boot program and a main program, comprising the following steps: receiving an update signal outputted by an external device from an external communication interface through a communication interface; a processor, according to the update signal, determining whether to update a boot program, a main program or both, if not, continuing the original process and waiting to receive the next update signal from the external device through the communication interface, if yes, executing the next step; and the processor, according to the update signal, executing either the boot program or the main program to update the other of the boot program and the main program.
如上所述,本發明提供一種開機程式與主程式的相互更新方法。在本發明的開機程式與主程式的相互更新方法中,透過既有的通訊介面接收更新指令,在不需使用到燒錄器的條件下,依據接收到的更新指令,以實現開機程式與主程式相互更新,或是開機程式與主程式中的任一者的更新。As described above, the present invention provides a method for updating a boot program and a main program mutually. In the method for updating a boot program and a main program mutually, an update command is received through an existing communication interface, and the boot program and the main program are updated mutually, or either of the boot program and the main program is updated according to the received update command without using a burner.
為使能更進一步瞭解本發明的特徵及技術內容,請參閱以下有關本發明的詳細說明與圖式,然而所提供的圖式僅用於提供參考與說明,並非用來對本發明加以限制。To further understand the features and technical contents of the present invention, please refer to the following detailed description and drawings of the present invention. However, the drawings provided are only used for reference and description and are not used to limit the present invention.
以下是通過特定的具體實施例來說明本發明的實施方式,本領域技術人員可由本說明書所公開的內容瞭解本發明的優點與效果。本發明可通過其他不同的具體實施例加以施行或應用,本說明書中的各項細節也可基於不同觀點與應用,在不背離本發明的構思下進行各種修改與變更。另外,本發明的附圖僅為簡單示意說明,並非依實際尺寸的描繪,事先聲明。以下的實施方式將進一步詳細說明本發明的相關技術內容,但所公開的內容並非用以限制本發明的保護範圍。另外,本文中所使用的術語“或”,應視實際情況可能包含相關聯的列出項目中的任一個或者多個的組合。The following is an explanation of the implementation of the present invention through specific concrete embodiments. Those skilled in the art can understand the advantages and effects of the present invention from the contents disclosed in this specification. The present invention can be implemented or applied through other different specific embodiments. The details in this specification can also be modified and changed in various ways based on different viewpoints and applications without departing from the concept of the present invention. In addition, the drawings of the present invention are only for simple schematic illustrations and are not depicted according to actual sizes. Please note in advance. The following implementation will further explain the relevant technical contents of the present invention in detail, but the disclosed contents are not intended to limit the scope of protection of the present invention. In addition, the term "or" used in this article may include any one or more combinations of the related listed items depending on the actual situation.
請參閱圖1至圖5,其中圖1至圖4為本發明實施例的開機程式與主程式的相互更新方法的步驟的流程圖,圖5為本發明實施例的開機程式與主程式的更新系統的方塊圖。Please refer to Figures 1 to 5, wherein Figures 1 to 4 are flow charts of the steps of the mutual updating method of the boot program and the main program of the embodiment of the present invention, and Figure 5 is a block diagram of the updating system of the boot program and the main program of the embodiment of the present invention.
本發明的開機程式與主程式的相互更新方法可由如圖5所示的開機程式與主程式的相互更新系統100(包含處理器10以及與處理器10相連接的通訊介面20)執行。The boot program and main program mutual updating method of the present invention can be executed by a boot program and main program mutual updating system 100 (including a
處理器10通過通訊介面20從一外部通訊介面91接收外部裝置92輸出的更新訊號,依據接收到的此更新訊號以判斷是否更新開機程式、主程式或兩者,執行開機程式以及主程式中的任一者,更新開機程式以及主程式中的另一者。The
詳言之,本發明的開機程式與主程式的相互更新方法可包含如圖1所示的步驟S101~S109、如圖2所示的S201~S207、如圖3所示的S301~S305及/或如圖4所示的S401~S403,詳細說明如下。In detail, the mutual updating method of the boot program and the main program of the present invention may include steps S101-S109 as shown in FIG. 1, S201-S207 as shown in FIG. 2, S301-S305 as shown in FIG. 3 and/or S401-S403 as shown in FIG. 4, as described in detail below.
請參閱圖1和圖5,其中圖1為本發明實施例的開機程式與主程式的相互更新方法所包含的先更新主程式後更新開機程式的步驟的流程圖。Please refer to FIG. 1 and FIG. 5 , wherein FIG. 1 is a flow chart of the steps of first updating the main program and then updating the boot program included in the mutual updating method of the boot program and the main program of the embodiment of the present invention.
若先更新主程式,而後更新開機程式,可執行如圖1所示的步驟S101~S109。If the main program is updated first and then the boot program is updated, steps S101 to S109 as shown in FIG. 1 may be executed.
首先,處理器10依據通過通訊介面20從外部通訊介面91接收到的外部裝置92所輸出的一主程式更新指令,從主程式運行的位址跳至開機程式儲存的位址(在如圖1所示的步驟S101)。First, the
接著,處理器10依據從外部裝置92接收到的一主程式更新指令,執行開機程式,使用通過通訊介面20從外部通訊介面91接收到的外部裝置92所輸出的一主程式更新資料,來更新主程式(在如圖1所示的步驟S103)。Next, the
接著,從開機程式運行的位址跳至主程式儲存的位址(在如圖1所示的步驟S105)。Next, jump from the address where the boot program is running to the address where the main program is stored (in step S105 as shown in FIG. 1 ).
接著,執行主程式,處理器10可依據通過通訊介面20從外部通訊介面91接收到的外部裝置92所輸出的一開機程式更新指令,使用通過通訊介面20從外部通訊介面91接收到的外部裝置92所輸出的一開機程式更新資料,來更新開機程式(在如圖1所示的步驟S107)。Next, the main program is executed, and the
最後,處理器10執行更新後的主程式以及開機程式(在如圖1所示的步驟S109)。Finally, the
請參閱圖2和圖5,其中圖2為本發明實施例的開機程式與主程式的相互更新方法所包含的先更新開機程式後更新主程式的步驟的流程圖。Please refer to FIG. 2 and FIG. 5 , wherein FIG. 2 is a flow chart of the steps of first updating the boot program and then updating the main program included in the mutual updating method of the boot program and the main program of the embodiment of the present invention.
若先更新開機式,而後更新主程式,可執行如圖2所示的步驟S201~S207。If the boot program is updated first and then the main program is updated, steps S201 to S207 as shown in FIG. 2 may be executed.
處理器10依據通過通訊介面20從外部通訊介面91接收到的外部裝置92所輸出的一開機程式更新指令,執行主程式,使用通過通訊介面20從外部通訊介面91接收到的外部裝置92所輸出的一開機程式更新資料,來更新開機程式(在如圖2所示的步驟S201)。The
接著,處理器10依據通過通訊介面20從外部通訊介面91接收到的外部裝置92所輸出的一主程式更新指令,從主程式儲存的位址跳回開機程式儲存的位址(在如圖2所示的步驟S203)。Next, the
接著,執行開機程式,使用通過通訊介面20從外部通訊介面91接收到的外部裝置92所輸出的一主程式更新資料,來更新主程式(在如圖2所示的步驟S205)。Next, the boot program is executed to update the main program using a main program update data outputted from the
接著,處理器10執行更新後的主程式以及開機程式(在如圖2所示的步驟S207)。Next, the
請參閱圖3和圖5,其中圖3為本發明實施例的開機程式與主程式的相互更新方法所包含的僅更新主程式的步驟的流程圖。Please refer to FIG. 3 and FIG. 5 , wherein FIG. 3 is a flow chart of the steps of updating only the main program included in the mutual updating method of the boot program and the main program of the embodiment of the present invention.
若僅更新主程式,可執行如圖3所示的S301~S305。If only the main program is updated, S301 to S305 as shown in FIG. 3 may be executed.
處理器10依據通過通訊介面20從外部通訊介面91接收到的外部裝置92所輸出的一主程式更新指令,從主程式運行的位址跳至開機程式儲存的位址(在如圖3所示的步驟S301)。The
接著,處理器10依據主程式更新指令,執行開機程式,使用通過通訊介面20從外部通訊介面91接收到的外部裝置92所輸出的一主程式更新資料,來更新主程式(在如圖3所示的步驟S303)。Next, the
接著,處理器10執行更新後的主程式(在如圖3所示的步驟S305)。Next, the
請參閱圖4和圖5,其中圖4為本發明實施例的開機程式與主程式的相互更新方法所包含僅更新開機程式的步驟的流程圖。Please refer to FIG. 4 and FIG. 5 , wherein FIG. 4 is a flow chart of the step of updating only the boot program in the method for mutually updating the boot program and the main program according to the embodiment of the present invention.
若僅更新開機程式,可執行如圖4所示的S401~S403。If you only want to update the boot program, you can execute S401~S403 as shown in Figure 4.
執行主程式,處理器10依據通過通訊介面20從外部通訊介面91接收到的外部裝置92所輸出的一開機程式更新指令,使用通過通訊介面20從外部通訊介面91接收到的外部裝置92所輸出的一開機程式更新資料,來更新開機程式(在如圖4所示的步驟S401)。To execute the main program, the
接著,處理器10執行更新後的開機程式(在如圖4所示的步驟S403)。Next, the
綜上所述,本發明提供一種開機程式與主程式的相互更新方法。在本發明的開機程式與主程式的相互更新方法中,透過既有的通訊介面接收更新指令,在不需使用到燒錄器的條件下,依據接收到的更新指令,以實現開機程式與主程式相互更新,或是開機程式與主程式中的任一者的更新。In summary, the present invention provides a method for updating a boot program and a main program mutually. In the method for updating a boot program and a main program mutually, an update command is received through an existing communication interface, and the boot program and the main program are updated mutually, or either of the boot program and the main program is updated according to the received update command without using a burner.
以上所公開的內容僅為本發明的優選可行實施例,並非因此侷限本發明的申請專利範圍,所以凡是運用本發明說明書及圖式內容所做的等效技術變化,均包含於本發明的申請專利範圍內。The contents disclosed above are only preferred feasible embodiments of the present invention and are not intended to limit the scope of the patent application of the present invention. Therefore, all equivalent technical changes made using the contents of the specification and drawings of the present invention are included in the scope of the patent application of the present invention.
S101~S109、S201~S207、S301~S305、S401~S403:步驟S101~S109, S201~S207, S301~S305, S401~S403: Steps
100:相互更新系統100: Mutual update system
10:處理器10: Processor
20:通訊介面20: Communication interface
91:外部通訊介面91: External communication interface
92:外部裝置92: External device
圖1為本發明實施例的開機程式與主程式的相互更新方法所包含的先更新主程式後更新開機程式的步驟的流程圖。FIG. 1 is a flow chart of the steps of first updating the main program and then updating the boot program included in the mutual updating method of the boot program and the main program according to the embodiment of the present invention.
圖2為本發明實施例的開機程式與主程式的相互更新方法所包含的先更新開機程式後更新主程式的步驟的流程圖。FIG. 2 is a flow chart of the steps of first updating the boot program and then updating the main program included in the method for mutually updating the boot program and the main program of the embodiment of the present invention.
圖3為本發明實施例的開機程式與主程式的相互更新方法所包含的僅更新主程式的步驟的流程圖。FIG. 3 is a flow chart of the steps of updating only the main program included in the mutual updating method of the boot program and the main program of the embodiment of the present invention.
圖4為本發明實施例的開機程式與主程式的相互更新方法所包含僅更新開機程式的步驟的流程圖。FIG. 4 is a flow chart of the method for mutually updating the boot program and the main program according to the embodiment of the present invention, including the step of updating only the boot program.
圖5為本發明實施例的開機程式與主程式的更新系統的方塊圖。FIG5 is a block diagram of the boot program and the main program update system of an embodiment of the present invention.
S101~S109:步驟 S101~S109: Steps
Claims (2)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW112136962A TWI855881B (en) | 2023-09-27 | 2023-09-27 | Method of mutually updating bootloader and main programs |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW112136962A TWI855881B (en) | 2023-09-27 | 2023-09-27 | Method of mutually updating bootloader and main programs |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| TWI855881B true TWI855881B (en) | 2024-09-11 |
| TW202514354A TW202514354A (en) | 2025-04-01 |
Family
ID=93649237
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW112136962A TWI855881B (en) | 2023-09-27 | 2023-09-27 | Method of mutually updating bootloader and main programs |
Country Status (1)
| Country | Link |
|---|---|
| TW (1) | TWI855881B (en) |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TW200941344A (en) * | 2008-03-21 | 2009-10-01 | Asustek Comp Inc | Computer system with dual boot-program area and method of booting the same |
| TW201419152A (en) * | 2012-11-14 | 2014-05-16 | Taiwan Secom Co Ltd | Electornic device with segmented updating program function |
| CN113220319A (en) * | 2021-03-17 | 2021-08-06 | 广州橙行智动汽车科技有限公司 | Data updating method and device and vehicle |
-
2023
- 2023-09-27 TW TW112136962A patent/TWI855881B/en active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TW200941344A (en) * | 2008-03-21 | 2009-10-01 | Asustek Comp Inc | Computer system with dual boot-program area and method of booting the same |
| TW201419152A (en) * | 2012-11-14 | 2014-05-16 | Taiwan Secom Co Ltd | Electornic device with segmented updating program function |
| CN113220319A (en) * | 2021-03-17 | 2021-08-06 | 广州橙行智动汽车科技有限公司 | Data updating method and device and vehicle |
Also Published As
| Publication number | Publication date |
|---|---|
| TW202514354A (en) | 2025-04-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN100445952C (en) | Method and device for upgrading software version in communication equipment | |
| US10437580B2 (en) | Software updating methods and systems | |
| JP2010541105A (en) | Firmware image update and management | |
| CN109416632B (en) | Apparatus and method for processing data | |
| CN105138382A (en) | Method and terminal for upgrading Android system | |
| US9411605B2 (en) | Device-less and system agnostic unified extensible firmware interface (UEFI) driver | |
| TWI855881B (en) | Method of mutually updating bootloader and main programs | |
| US7962736B1 (en) | Interactive pre-OS firmware update with repeated disabling of interrupts | |
| CN107943544B (en) | Kernel patch loading method and device | |
| JP2002196936A (en) | Starting method of system with invalidated system bios | |
| CN102169446B (en) | BIOS (basic input/output system) system and method based on basic input/output system of open source system | |
| CN112612498A (en) | Embedded equipment upgrading method and embedded equipment | |
| JP7102524B2 (en) | Firmware release of multiple binary images | |
| JP5328410B2 (en) | Booted operating system (OS) operation computer, computer OS boot method, and OS boot program | |
| CN113064647A (en) | Method, device, terminal and storage medium for configuring project port in BIOS | |
| CN101990662B (en) | Program execution device and method for controlling the same | |
| CN101101559A (en) | Engineering application method and device for starting and guiding CPU by using dual Bootrom | |
| JP6635195B2 (en) | Information processing apparatus and application management method | |
| TWI726524B (en) | Electronic processing devices and memory control methods thereof | |
| JP6248682B2 (en) | Information processing apparatus, BIOS update method, and BIOS update program | |
| US10725791B2 (en) | Operating system boot up optimizations | |
| CN119781787A (en) | Mutual updating method between boot program and main program | |
| CN103123586A (en) | Upgrading device and method based on Linux embedded operating system | |
| TWI733284B (en) | Hardware setting device and hardware setting method thereof | |
| WO2012104950A1 (en) | Activation control device, information apparatus, and activation control method |