TWI489390B - Electronic apparatus and system updating method thereof - Google Patents

Electronic apparatus and system updating method thereof Download PDF

Info

Publication number
TWI489390B
TWI489390B TW097134641A TW97134641A TWI489390B TW I489390 B TWI489390 B TW I489390B TW 097134641 A TW097134641 A TW 097134641A TW 97134641 A TW97134641 A TW 97134641A TW I489390 B TWI489390 B TW I489390B
Authority
TW
Taiwan
Prior art keywords
storage medium
slave
data
updateable
updated
Prior art date
Application number
TW097134641A
Other languages
Chinese (zh)
Other versions
TW201011648A (en
Inventor
Fan Li
Original Assignee
Inventec Appliances Corp
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 Inventec Appliances Corp filed Critical Inventec Appliances Corp
Priority to TW097134641A priority Critical patent/TWI489390B/en
Publication of TW201011648A publication Critical patent/TW201011648A/en
Application granted granted Critical
Publication of TWI489390B publication Critical patent/TWI489390B/en

Links

Description

電子裝置及其系統更新方法Electronic device and system updating method thereof

本發明係關於一種系統更新方法,特別是關於一種電子裝置之系統更新方法。The present invention relates to a system updating method, and more particularly to a system updating method for an electronic device.

早期的消費類手持式裝置都是將系統(Firmware)燒錄在電子抹除式唯讀記憶體(Electrically Erasable Programmable Read-Only Memory,EEPROM;EEPROM即NOR Flash)中,然後通過CPU直接引導,把NOR Flash的內容導入到記憶體(memory)之中執行。一旦系統出現問題,手持式裝置即重新啟動(Reset),再將NOR Flash的內容重新載入到記憶體中,達到恢復的作用。In the early consumer handheld devices, the firmware was burned in an Electrically Erasable Programmable Read-Only Memory (EEPROM; EEPROM, NOR Flash), and then directly guided by the CPU. The content of NOR Flash is imported into memory (memory) for execution. Once there is a problem with the system, the handheld device is reset, and the contents of the NOR Flash are reloaded into the memory to restore the function.

然而,隨著多媒體和網路技術的發展,系統的大小越來越大。考量成本之下,將系統燒錄在昂貴的NOR Flash裡面已經不是非常現實的作法。於是,目前越來越多的系統配置都是將系統分為開機程式(bootloader)及作業系統(OS)兩部分:將開機程式以及部分調試或診斷程式燒錄到NOR Flash,而將作業系統燒錄到相對廉價的大容量存儲介質,例如NAND Flash或硬碟(HDD)。當手持式裝置開機後,CPU從NOR Flash引導,接著執行開機程式以驅動基本的設備,例如記憶體、顯示面板、NAND Flash或者硬碟。之後,儲存於大容量存儲介質中之作業系統被載入到記憶體中執行。However, with the development of multimedia and network technologies, the size of the system is growing. Under the cost of consideration, it is not a very realistic practice to burn the system into expensive NOR Flash. Therefore, more and more system configurations are divided into two parts: the bootloader and the operating system (OS): the boot program and some debugging or diagnostic programs are burned to the NOR Flash, and the operating system is burned. Record relatively inexpensive mass storage media such as NAND Flash or hard disk (HDD). When the handheld device is powered on, the CPU boots from the NOR Flash and then executes a boot program to drive the basic device, such as memory, display panel, NAND Flash or hard drive. Thereafter, the operating system stored in the mass storage medium is loaded into the memory for execution.

隨著用戶等級的提升,越來越多的用戶需要對裝置的系統實行自定義的操作,如升級新的系統或安裝新的軟體,但是同時也帶來越來越多的風險。目前,手持式裝置之系統的更新步驟一般如下: 1.準備好升級檔之後,將產品連接到電腦,使產品進入可以升級的模式;2a.假如產品的系統是放置於大容量存儲介質,通過特定軟體將升級檔複製到產品的大容量存儲介質後脫離電腦,將升級檔從大容量存儲介質讀取至記憶體,接著從記憶體中運行程式,開始更新大容量存儲介質裡面的內容;2b.假如產品的系統是放置NOR Flash,通過特定的燒錄程式直接對NOR Flash的內容進行更新即可;3.升級完畢之後,一般通過Reset動作重新讀取系統的內容即完成更新。As user levels increase, more and more users need to perform custom operations on the device's system, such as upgrading new systems or installing new software, but at the same time bringing more and more risks. At present, the update procedure of the system of the handheld device is generally as follows: 1. After preparing the upgrade file, connect the product to the computer to make the product enter the upgradeable mode; 2a. If the product system is placed on a large-capacity storage medium, copy the upgrade file to the product's large-capacity storage medium through a specific software. After leaving the computer, the upgrade file is read from the large-capacity storage medium to the memory, and then the program is run from the memory to start updating the contents of the large-capacity storage medium; 2b. If the product system is placed with the NOR Flash, through the specific The programming program can directly update the content of the NOR Flash; 3. After the upgrade is completed, the content of the system is generally read by the Reset action to complete the update.

升級系統的風險在於在升級的這段時間,不允許產品有斷電的情況發生。對於系統存放於NOR Flash的產品來說尤其重要,因為Flash需要先擦除其中內容然後再寫入,一旦寫入過程中斷電,Flash的內容就會不完整,這樣產品就會無法開機(dead unit),沒有特別的方法無法復原。The risk of upgrading the system is that during the upgrade period, the product is not allowed to have a power outage. It is especially important for products stored in NOR Flash, because Flash needs to erase the content and then write it. Once the writing process is interrupted, the content of Flash will be incomplete, so the product will not boot. Unit), there is no special way to recover.

對於系統存放於大容量存儲介質的產品來說,更新在NOR Flash裡面的開機程式變成關鍵部分。雖然更新時間已經大幅縮短,但是依舊存在風險。一旦NOR Flash的內容丟失,產品將同樣無法開機。不過,如果僅僅只是大容量存儲介質的內容丟失,則可以通過NOR Flash中的開機程式進入到系統的特別模式重新安裝大容量存儲介質中的內容即可復原。For products stored on large-capacity storage media, updating the boot program in NOR Flash becomes a key part. Although the update time has been greatly shortened, there are still risks. Once the content of NOR Flash is lost, the product will also fail to boot. However, if only the content of the mass storage medium is lost, you can restore it by re-installing the contents of the large-capacity storage medium by entering the special mode of the system through the boot program in NOR Flash.

基本上,安裝在消費類手持式裝置上的新軟體都是放置於大容量存儲介質中。安裝軟體的缺點在於,雖然這類軟體一般只是更新外部存儲元件,因此一般不會發生系統無法啟動。但是,那些用以設置個性化系統的軟體,若安裝不當覆 蓋掉系統文件,就會發生系統錯誤的問題,對於智慧型手機(smart phone)的Windows Mobile系統尤其明顯。在系統出錯時,一般的用戶可能沒有辦法進入特殊的模式來實現系統的復原,因為操作上對於非專業者會有很大的挑戰性。Basically, new software installed on consumer handheld devices is placed in mass storage media. The disadvantage of installing software is that although such software generally only updates external storage components, it generally does not occur that the system cannot be started. However, those software used to set up a personalized system, if improperly installed System errors can occur when the system files are closed, especially for the Windows Mobile system of smart phones. In the event of a system error, the average user may not be able to enter a special mode to achieve system recovery, because the operation will be very challenging for non-professionals.

目前,電腦類產品仍需要很多系統維護,而消費類手持式裝置隨著系統的複雜和將來多媒體網絡的進步,使得其很可能面臨與目前電腦產品類似的維護問題。因此,本發明之範疇在於提供一種電子裝置及其系統更新方法,以解決上述問題。At present, computer products still need a lot of system maintenance, and with the complexity of the system and the advancement of multimedia networks in the future, consumer handheld devices are likely to face maintenance problems similar to current computer products. Accordingly, the scope of the present invention is to provide an electronic device and a system updating method thereof to solve the above problems.

本發明之一範疇在於提供一種電子裝置之系統更新方法。One aspect of the present invention is to provide a system updating method for an electronic device.

根據本發明之一具體實施例,電子裝置包含一主要(primary)可更新式存儲介質、一第一從屬(secondary)可更新式存儲介質、一第二從屬可更新式存儲介質、一資料儲存單元以及一系統修復單元(system-restoring unit)。主要可更新式存儲介質儲存一現行(current)系統資料,而資料儲存單元儲存現行系統資料之一備份資料。According to an embodiment of the present invention, an electronic device includes a primary renewable storage medium, a first secondary updateable storage medium, a second dependent updateable storage medium, and a data storage unit. And a system-restoring unit. The main updatable storage medium stores a current system data, and the data storage unit stores one of the current system data backup data.

該系統更新方法包含下列步驟:(a)更新第一從屬可更新式存儲介質之內容;(b)更新第二從屬可更新式存儲介質之內容,若更新成功,進行步驟(c),若更新失敗,進行步驟(d);(c)複製一更新的(update)系統資料至主要可更新式存儲介質中以取代並更新現行系統資料,若更新成功則完成系統更新方法,若更新失敗則進行步驟(e);(d)藉由觸發系統修復單元,透過第一從屬可更新式存儲 介質致動電子裝置後進行步驟(b);以及(e)藉由觸發系統修復單元,複製備份資料至主要可更新式存儲介質中以取代現行系統資料後進行步驟(c)。The system update method comprises the steps of: (a) updating the content of the first slave updateable storage medium; (b) updating the content of the second slave updateable storage medium, and if the update is successful, performing step (c) if updating Failure, proceed to step (d); (c) copy an updated system data to the main updatable storage medium to replace and update the current system data, if the update is successful, complete the system update method, if the update fails, proceed Step (e); (d) by triggering the system repair unit through the first slave renewable storage After the medium actuates the electronic device, step (b) is performed; and (e) step (c) is performed by triggering the system repair unit to copy the backup data to the main updatable storage medium to replace the current system data.

根據本發明之另一具體實施例,電子裝置包含一主要可更新式存儲介質、一第一從屬可更新式存儲介質、一第二從屬可更新式存儲介質、一資料儲存單元及一系統修復單元。主要可更新式存儲介質儲存一第一現行系統資料,而資料儲存單元儲存一第二現行系統資料、第一現行系統資料之一第一備份資料及第二現行系統資料之一第二備份資料。According to another embodiment of the present invention, an electronic device includes a primary updatable storage medium, a first slave renewable storage medium, a second slave updatable storage medium, a data storage unit, and a system repair unit. . The primary updateable storage medium stores a first current system data, and the data storage unit stores a second current system data, a first backup data of the first current system data, and a second backup data of the second current system data.

該系統更新方法包含下列步驟:(a)更新第一從屬可更新式存儲介質之內容;(b)更新第二從屬可更新式存儲介質之內容,若更新成功,進行步驟(c),若更新失敗,進行步驟(d);(c)複製一第一更新的系統資料至主要可更新式存儲介質中以取代並更新第一現行系統資料,若更新成功,進行步驟(e),若更新失敗,進行步驟(f);(d)藉由觸發系統修復單元,透過第一從屬可更新式存儲介質致動電子裝置後進行步驟(b);(e)複製一第二更新的系統資料至資料儲存單元中以取代並更新第二備份資料,若更新成功,進行步驟(g);(f)藉由觸發系統修復單元,複製第一備份資料至主要可更新式存儲介質中以取代第一現行系統資料後進行步驟(c);(g)複製第二更新的系統資料以取代並更新第二現行系統資料,若更新成功則完成系統更新方法,若更新失敗,進行步驟(h);以及(h)藉由觸發系統修復單元,複製第二備份資料以取代第 二現行系統資料後進行步驟(g)。The system update method comprises the steps of: (a) updating the content of the first slave updateable storage medium; (b) updating the content of the second slave updateable storage medium, and if the update is successful, performing step (c) if updating If the failure occurs, step (d) is performed; (c) copying the first updated system data to the main updatable storage medium to replace and update the first current system data, if the update is successful, performing step (e), if the update fails Step (f); (d) performing the step (b) by triggering the system repair unit to actuate the electronic device through the first slave renewable storage medium; (e) copying a second updated system data to the data Replacing and updating the second backup data in the storage unit, if the update is successful, performing step (g); (f) by triggering the system repair unit, copying the first backup data to the main updatable storage medium to replace the first current After the system data, step (c); (g) copying the second updated system data to replace and update the second current system data, and if the update is successful, completing the system update method, if the update fails, performing step (h); h) borrow Trigger system repair unit, the second backup copy of the data to replace Step (g) is followed by the current system data.

本發明之另一範疇在於提供一種電子裝置。Another aspect of the present invention is to provide an electronic device.

根據本發明之一具體實施例,電子裝置包含一主要可更新式存儲介質、一第一從屬可更新式存儲介質、一第二從屬可更新式存儲介質、一資料儲存單元、一系統修復單元以及一處理單元。According to an embodiment of the present invention, an electronic device includes a primary updatable storage medium, a first slave renewable storage medium, a second slave updatable storage medium, a data storage unit, a system repair unit, and A processing unit.

主要可更新式存儲介質儲存一現行系統資料,而資料儲存單元儲存該現行系統資料之一備份資料。處理單元分別耦接至主要可更新式存儲介質、第一從屬可更新式存儲介質、第二從屬可更新式存儲介質、資料儲存單元以及系統修復單元。The main updatable storage medium stores an existing system data, and the data storage unit stores one of the current system data backup data. The processing unit is coupled to the primary updatable storage medium, the first slave updatable storage medium, the second slave updatable storage medium, the data storage unit, and the system repair unit, respectively.

當主要可更新式存儲介質中之現行系統資料於一更新期間更新失敗時,系統修復單元能夠被觸發,致使處理單元能夠透過第一從屬可更新式存儲介質或第二從屬可更新式存儲介質致動電子裝置並且複製儲存於資料儲存單元中之備份資料至主要可更新式存儲介質中取代現行系統資料,藉此可確保電子裝置於更新期間不會出現失效的問題。When the current system data in the primary updatable storage medium fails to be updated during an update, the system repair unit can be triggered to enable the processing unit to transmit the first dependent updateable storage medium or the second dependent updateable storage medium The electronic device and the backup data stored in the data storage unit are copied to the main updatable storage medium to replace the current system data, thereby ensuring that the electronic device does not suffer from failure during the update.

根據本發明之另一具體實施例,電子裝置包含一主要可更新式存儲介質、一第一從屬可更新式存儲介質、一第二從屬可更新式存儲介質、一資料儲存單元、一系統修復單元以及一處理單元。主要可更新式存儲介質儲存一第一現行系統資料。資料儲存單元儲存一第二現行系統資料、第一現行系統資料之一第一備份資料及第二現行系統資料之一第二備份資料。According to another embodiment of the present invention, an electronic device includes a primary updatable storage medium, a first slave renewable storage medium, a second slave updatable storage medium, a data storage unit, and a system repair unit. And a processing unit. The primary updatable storage medium stores a first current system profile. The data storage unit stores a second current system data, a first backup data of the first current system data, and a second backup data of the second current system data.

其中,當主要可更新式存儲介質中之第一現行系統資料於一更新期間更新失敗時,系統修復單元能夠被觸發,致使 處理單元能夠透過第一從屬可更新式存儲介質或第二從屬可更新式存儲介質致動電子裝置並且複製儲存於資料儲存單元中之第一備份資料至主要可更新式存儲介質中取代第一現行系統資料。Wherein, when the first current system data in the primary updatable storage medium fails to be updated during an update, the system repair unit can be triggered, resulting in The processing unit can actuate the electronic device through the first slave renewable storage medium or the second slave updateable storage medium and copy the first backup data stored in the data storage unit to the primary updateable storage medium to replace the first current System information.

此外,當資料儲存單元中之第二現行系統資料於該更新期間更新失敗時,系統修復單元亦能夠被觸發,致使處理單元複製儲存於資料儲存單元中之第二備份資料取代第二現行系統資料以致動電子裝置。In addition, when the second current system data in the data storage unit fails to be updated during the update, the system repair unit can also be triggered, so that the processing unit copies the second backup data stored in the data storage unit to replace the second current system data. To actuate the electronic device.

關於本發明之優點與精神可以藉由以下的發明詳述及所附圖式得到進一步的瞭解。The advantages and spirit of the present invention will be further understood from the following detailed description of the invention.

本發明提供了一種電子裝置及其系統更新方法。於實際應用中,根據本發明之電子裝置可以是手機、個人數位助理(PDA)以及多媒體播放機(例如MP3播放器)等,但不以此為限。The invention provides an electronic device and a system updating method thereof. In an actual application, the electronic device according to the present invention may be a mobile phone, a personal digital assistant (PDA), and a multimedia player (such as an MP3 player), but is not limited thereto.

一旦電子裝置之系統出現問題,使用者只要依照說明並按住規定的按鈕,即可使系統恢復到正常狀態。因此,根據本發明,使用者不用藉助專業維修人士的幫助,也不必在網路上尋求解決方法,只要透過「一鍵恢復」即可有效杜絕電子裝置的失效。以下列舉兩個實施例以充分說明本發明之構想。Once there is a problem with the system of the electronic device, the user can return the system to the normal state by following the instructions and pressing the prescribed button. Therefore, according to the present invention, the user does not need to resort to the help of a professional maintenance person, and does not need to find a solution on the Internet, as long as the "one-click recovery" can effectively prevent the failure of the electronic device. Two examples are listed below to fully illustrate the concept of the invention.

第一具體實施例:First specific embodiment:

請參閱圖一、圖三A至圖三C。圖一係繪示根據本發明之第一具體實施例之電子裝置1之功能方塊圖。圖三A及圖三B係繪示第一具體實施例之電子裝置1的正常啟動過程之 流程圖。圖三C係繪示第一具體實施例之電子裝置1的系統更新過程之流程圖。Please refer to Figure 1, Figure 3A to Figure 3C. 1 is a functional block diagram of an electronic device 1 according to a first embodiment of the present invention. FIG. 3A and FIG. 3B are diagrams showing the normal startup process of the electronic device 1 of the first embodiment. flow chart. FIG. 3C is a flow chart showing a system updating process of the electronic device 1 of the first embodiment.

如圖一所示,電子裝置1包含主要可更新式存儲介質10、第一從屬可更新式存儲介質11、第二從屬可更新式存儲介質12、處理單元13、資料儲存單元14以及系統修復單元15。處理單元13分別耦接至主要可更新式存儲介質10、第一從屬可更新式存儲介質11、第二從屬可更新式存儲介質12、資料儲存單元14以及系統修復單元15。As shown in FIG. 1, the electronic device 1 includes a main updatable storage medium 10, a first slave renewable storage medium 11, a second slave renewable storage medium 12, a processing unit 13, a data storage unit 14, and a system repair unit. 15. The processing unit 13 is coupled to the primary updatable storage medium 10, the first slave updatable storage medium 11, the second slave updatable storage medium 12, the data storage unit 14, and the system repair unit 15, respectively.

於實際應用中,主要可更新式存儲介質10、第一從屬可更新式存儲介質11以及第二從屬可更新式存儲介質12皆可以是一NOR快閃記憶體(NOR Flash)。資料儲存單元14可以是一NAND快閃記憶體(NAND Flash)、一硬碟或一外部儲存裝置(例如記憶卡)。In practical applications, the primary updatable storage medium 10, the first slave updatable storage medium 11, and the second slave updatable storage medium 12 may all be a NOR flash memory (NOR Flash). The data storage unit 14 can be a NAND flash (NAND Flash), a hard disk or an external storage device (such as a memory card).

主要可更新式存儲介質10儲存一現行系統資料100,而資料儲存單元14儲存該現行系統資料100之備份資料140。於此實施例中,現行系統資料100可以包含一開機程式(bootloader)及一作業系統(OS)。實務上,資料儲存單元14內之備份資料140可以設定為唯有在電子裝置1進入系統還原模式時才可以被讀取。The primary updatable storage medium 10 stores an existing system data 100, and the data storage unit 14 stores backup data 140 of the current system data 100. In this embodiment, the current system data 100 can include a bootloader and an operating system (OS). In practice, the backup data 140 in the data storage unit 14 can be set to be read only when the electronic device 1 enters the system restore mode.

第一從屬可更新式存儲介質11以及第二從屬可更新式存儲介質12不需要大量的儲存量。於此實施例中,本發明採用兩塊大小皆為16KB的第一及第二從屬可更新式存儲介質11、12作為一範例。因為NOR Flash價格昂貴,使用多塊不僅浪費而且造成了成本的上升。又,低容量的NOR Flash亦使得成本支出可以減少到最低。The first slave updatable storage medium 11 and the second slave updatable storage medium 12 do not require a large amount of storage. In this embodiment, the present invention uses two first and second slave renewable storage media 11, 12 each having a size of 16 KB as an example. Because NOR Flash is expensive, using multiple blocks is not only wasteful but also causes an increase in cost. In addition, low-capacity NOR Flash also minimizes costs.

如圖一所示,第一從屬可更新式存儲介質11及第二從屬 可更新式存儲介質12各儲存第一開機碼110及第二開機碼120,分別可以從主要可更新式存儲介質10所儲存之開機程式中複製而得。是故,本發明之電子裝置1可以由處理單元13先透過第一及第二從屬可更新式存儲介質11、12其中之一的開機碼引導開機程式後啟動。As shown in FIG. 1, the first slave renewable storage medium 11 and the second slave The updateable storage medium 12 stores the first boot code 110 and the second boot code 120, respectively, which can be copied from the boot program stored in the main updatable storage medium 10. Therefore, the electronic device 1 of the present invention can be started by the processing unit 13 by booting the booting program through the boot code of one of the first and second slave-updable storage media 11, 12.

如圖三A所示,電子裝置1之正常啟動首先會執行步驟S100以引導開機程式。接著,執行步驟S102以驅動基本設備,例如顯示面板、NAND Flash或者硬碟。若正常啟動的過程中順利,最後會執行步驟S128,處理單元13從主要可更新式存儲介質10載入並驅動作業系統。As shown in FIG. 3A, the normal startup of the electronic device 1 first executes step S100 to boot the booting program. Next, step S102 is performed to drive a basic device such as a display panel, a NAND Flash or a hard disk. If the normal startup process is successful, step S128 is finally performed, and the processing unit 13 loads and drives the operating system from the main updatable storage medium 10.

當電子裝置1之系統要進行升級時,需將升級檔內容讀取到電子裝置1中,之後載入到記憶體中執行更新流程,如圖三C所示。執行步驟S200,更新第一從屬可更新式存儲介質11之內容。執行步驟S202,由處理單元13判斷第一從屬可更新式存儲介質11是否更新成功。需注意的是,若先更新第一從屬可更新式存儲介質11表示,處理單元13可預設先透過第二從屬可更新式存儲介質12以引導開機程式。When the system of the electronic device 1 is to be upgraded, the contents of the upgrade file are read into the electronic device 1, and then loaded into the memory to perform an update process, as shown in FIG. 3C. Step S200 is executed to update the content of the first dependent updateable storage medium 11. Step S202 is executed, and the processing unit 13 determines whether the first dependent updateable storage medium 11 is successfully updated. It should be noted that, if the first slave updateable storage medium 11 is updated, the processing unit 13 may preset to first boot the boot program through the second slave updateable storage medium 12.

第一從屬可更新式存儲介質11包含N個資料區段(sector),步驟S200係從第k個資料區段開始更新,直到每一個資料區段都更新完為止,其中N為一整數,k為介於1~N間之一整數。於此實施例中,步驟S200可以先在第一個資料區段寫入一更新中資訊(例如寫入「UPDATING」)或保持空白,從第二個資料區段開始寫入更新資料到第N個資料區段後,再將更新資料寫入第一個資料區段中即完成更新第一從屬可更新式存儲介質11。The first slave updateable storage medium 11 includes N data sectors, and the step S200 is updated from the kth data sector until each data sector is updated, where N is an integer, k It is an integer between 1 and N. In this embodiment, step S200 may first write an update information (for example, write "UPDATING") or keep blank in the first data section, and write update data from the second data section to the Nth. After the data section is written, the update data is written into the first data section to complete the update of the first slave updateable storage medium 11.

若更新的過程中因斷電而失敗,則步驟S202的判斷結果將為否,之後回到步驟S100。進行到步驟S104時,處理單 元13會判斷第一從屬可更新式存儲介質11中之第一個資料區段是否出現「UPDATING」資訊或仍保持空白,若是,處理單元13會執行步驟S106,複製第二從屬可更新式存儲介質12之內容以取代第一從屬可更新式存儲介質11之內容後重新啟動,之後再度進行步驟S200。If the power failure fails due to the power failure, the determination result of step S202 will be NO, and then return to step S100. When proceeding to step S104, the processing order The element 13 determines whether the first data section of the first slave updatable storage medium 11 has "UPDATING" information or remains blank. If so, the processing unit 13 performs step S106 to copy the second slave updatable storage. The content of the medium 12 is replaced by the content of the first slave renewable storage medium 11 and then restarted, and then step S200 is performed again.

若步驟S202的判斷結果為是,處理單元13進一步可以執行步驟S204,檢查已更新的第一從屬可更新式存儲介質11中之一第一檢查碼是否與一第一目標檢查碼相同。若是,進行步驟S206,以更新第二從屬可更新式存儲介質12之內容;若否,重覆步驟S200。於步驟S206之後,處理單元13會執行步驟S208,判斷第二從屬可更新式存儲介質12是否更新成功。If the result of the determination in step S202 is YES, the processing unit 13 may further perform step S204 to check whether one of the updated first dependent updateable storage media 11 is the same as the first target check code. If yes, step S206 is performed to update the content of the second slave updateable storage medium 12; if not, step S200 is repeated. After step S206, the processing unit 13 performs step S208 to determine whether the second dependent updateable storage medium 12 is successfully updated.

若步驟S208的判斷結果為否,則執行步驟S210以觸發系統修復單元15,接著透過第一從屬可更新式存儲介質11致動電子裝置1後進行步驟S206。於實際應用中,系統修復單元15可以實施成一按鍵,並且若按鍵被按壓則會產生觸發信號至處理單元13。If the result of the determination in step S208 is no, step S210 is executed to trigger the system repair unit 15, and then the electronic device 1 is actuated through the first slave updateable storage medium 11, and then step S206 is performed. In practical applications, the system repair unit 15 can be implemented as a button, and a trigger signal is generated to the processing unit 13 if the button is pressed.

如先前所述,由於處理單元13預設先透過第二從屬可更新式存儲介質12引導開機程式,若更新的過程失敗,電子裝置1將會失效。此時,使用者可以觸發系統修復單元15(即按壓對應的按鍵),致使處理單元13轉而透過第一從屬可更新式存儲介質11引導開機程式後再度更新第二從屬可更新式存儲介質12。功能上,系統修復單元15用以切換兩個從屬可更新式存儲介質之間的引導路線。As previously described, since the processing unit 13 presets to boot the boot program through the second slave-updable storage medium 12, if the update process fails, the electronic device 1 will fail. At this time, the user can trigger the system repair unit 15 (ie, press the corresponding button), so that the processing unit 13 turns the second slave renewable storage medium 12 again after booting the boot program through the first slave renewable storage medium 11. . Functionally, system repair unit 15 is used to switch the boot route between two slave renewable storage media.

於第二從屬可更新式存儲介質12更新成功後,電子裝置1會自動重新啟動。於步驟S108,處理單元13進一步可檢查已更新的第一從屬可更新式存儲介質11中之第一檢查碼是否 與已更新的第二從屬可更新式存儲介質12中之一第二檢查碼相同。若否,處理單元13會執行步驟S110,複製第一從屬可更新式存儲介質11之內容以取代第二從屬可更新式存儲介質12之內容,目的為防止第二從屬可更新式存儲介質12之內容不正確導致無法正常啟動。After the second dependent updateable storage medium 12 is successfully updated, the electronic device 1 is automatically restarted. In step S108, the processing unit 13 further checks whether the first check code in the updated first dependent updateable storage medium 11 is The second check code is the same as one of the updated second dependent updateable storage media 12. If not, the processing unit 13 performs step S110 to copy the content of the first slave updateable storage medium 11 to replace the content of the second slave updateable storage medium 12, in order to prevent the second dependent updateable storage medium 12 from being The content is incorrect and cannot be started properly.

若步驟S208的判斷結果為是,則執行步驟S212,藉由複製一更新的系統資料至主要可更新式存儲介質10中以取代並更新現行系統資料100。然後,執行步驟S214,由處理單元13判斷主要可更新式存儲介質10是否更新成功。需注意的是,第二從屬可更新式存儲介質12及主要可更新式存儲介質10的更新方式可與第一從屬可更新式存儲介質11相同,在此便不再贅述。若步驟S214的判斷結果為是,則完成電子裝置1之更新程序。If the result of the determination in step S208 is YES, step S212 is performed to replace and update the current system data 100 by copying an updated system data into the main updatable storage medium 10. Then, step S214 is executed, and it is determined by the processing unit 13 whether the primary updatable storage medium 10 is successfully updated. It should be noted that the update manner of the second slave renewable storage medium 12 and the primary updateable storage medium 10 may be the same as that of the first slave updateable storage medium 11, and details are not described herein again. If the result of the determination in step S214 is YES, the update procedure of the electronic device 1 is completed.

若步驟S214的判斷結果為否,電子裝置1亦將會失效。此時,執行步驟S216以觸發系統修復單元15並且重新進行啟動流程。到了步驟S112時,處理單元13會判斷目前是否要更新主要可更新式存儲介質10。若是,則執行步驟S114,處理單元13會檢查主要可更新式存儲介質10中是否出現「UPDATING」資訊或仍保持空白。若是,處理單元13會從資料儲存單元14中複製備份資料140至主要可更新式存儲介質10中以取代現行系統資料100,重新啟動電子裝置1後再度執行步驟S212。If the decision result in the step S214 is NO, the electronic device 1 will also be invalid. At this time, step S216 is performed to trigger the system repair unit 15 and the startup process is restarted. When the process proceeds to step S112, the processing unit 13 determines whether the primary updatable storage medium 10 is currently to be updated. If yes, step S114 is executed, and the processing unit 13 checks whether the "UPDATING" information appears in the main updatable storage medium 10 or remains blank. If so, the processing unit 13 copies the backup data 140 from the data storage unit 14 to the main updatable storage medium 10 to replace the current system data 100. After restarting the electronic device 1, step S212 is performed again.

另外,若步驟S114的判斷結果為否,處理單元13進一步可以執行步驟S116,檢查已更新的主要可更新式存儲介質10中之一檢查碼是否與該備份資料140中之一檢查碼相同。若否,處理單元13會執行步驟S120,複製更新的系統資料至資料儲存單元14中以取代並更新該備份資料140。In addition, if the result of the determination in step S114 is negative, the processing unit 13 may further perform step S116 to check whether one of the updated primary updateable storage media 10 is the same as one of the backup data 140. If not, the processing unit 13 performs step S120 to copy the updated system data to the data storage unit 14 to replace and update the backup data 140.

若步驟S112的判斷結果為否,處理單元13進一步可以執行步驟S122以判斷是否為修復模式。若是,處理單元13會從資料儲存單元14中複製備份資料140至主要可更新式存儲介質10中以取代現行系統資料100,之後重新啟動電子裝置1;若否,處理單元13進一步可以執行步驟S124,檢查已更新的第一從屬可更新式存儲介質11中之第一檢查碼是否與已更新的第二從屬可更新式存儲介質12中之一第二檢查碼相同。If the result of the determination in step S112 is negative, the processing unit 13 may further perform step S122 to determine whether it is the repair mode. If yes, the processing unit 13 copies the backup data 140 from the data storage unit 14 to the main updatable storage medium 10 to replace the current system data 100, and then restarts the electronic device 1; if not, the processing unit 13 can further perform step S124. And checking whether the first check code in the updated first dependent updateable storage medium 11 is the same as the second check code in one of the updated second dependent updateable storage mediums 12.

若步驟S124的判斷結果為否,處理單元13會執行步驟S126,複製第二從屬可更新式存儲介質12之內容以取代第一從屬可更新式存儲介質11之內容後重新啟動電子裝置1,目的為保證第一及第二從屬可更新式存儲介質11、12之內容相同,即都更新至最新版本;若是,處理單元13會執行步驟S128,載入並驅動作業系統。If the result of the determination in step S124 is no, the processing unit 13 executes step S126 to copy the content of the second slave updateable storage medium 12 to replace the content of the first slave updateable storage medium 11 and restart the electronic device 1. To ensure that the contents of the first and second slave renewable storage media 11, 12 are the same, they are all updated to the latest version; if so, the processing unit 13 executes step S128 to load and drive the operating system.

第二具體實施例:Second specific embodiment:

請參閱圖二、圖四A至圖四B及圖五A至圖五B。圖二係繪示根據本發明之第二具體實施例之電子裝置2之功能方塊圖。圖四A至圖四B係繪示第二具體實施例之電子裝置2的正常啟動過程之流程圖。圖五A至圖五B係繪示第二具體實施例之電子裝置2的系統更新過程之流程圖。Please refer to Figure 2, Figure 4A to Figure 4B and Figure 5A to Figure 5B. 2 is a functional block diagram of an electronic device 2 in accordance with a second embodiment of the present invention. 4A to 4B are flowcharts showing a normal startup process of the electronic device 2 of the second embodiment. 5A to 5B are flowcharts showing a system updating process of the electronic device 2 of the second embodiment.

如圖二所示,電子裝置2包含主要可更新式存儲介質20、第一從屬可更新式存儲介質21、第二從屬可更新式存儲介質22、處理單元23、資料儲存單元24以及系統修復單元25。第一從屬可更新式存儲介質21及第二從屬可更新式存儲介質22分別儲存第一開機碼210及第二開機碼220。As shown in FIG. 2, the electronic device 2 includes a main updatable storage medium 20, a first slave renewable storage medium 21, a second slave updateable storage medium 22, a processing unit 23, a data storage unit 24, and a system repair unit. 25. The first slave updateable storage medium 21 and the second slave updateable storage medium 22 respectively store the first boot code 210 and the second boot code 220.

主要可更新式存儲介質20、第一從屬可更新式存儲介質 21以及第二從屬可更新式存儲介質22皆可以是一NOR快閃記憶體。資料儲存單元24可以是一NAND快閃記憶體、一硬碟或一外部儲存裝置(例如記憶卡)。Primary updatable storage medium 20, first slave renewable storage medium Both the 21 and the second slave renewable storage medium 22 can be a NOR flash memory. The data storage unit 24 can be a NAND flash memory, a hard disk or an external storage device (such as a memory card).

主要可更新式存儲介質20儲存第一現行系統資料200。資料儲存單元24儲存第二現行系統資料240、第一現行系統資料200之第一備份資料242及第二現行系統資料240之第二備份資料244。需注意的是,於此實施例中之第一現行系統資料200為一開機程式,而第二現行系統資料240為一作業系統。The primary updatable storage medium 20 stores the first current system data 200. The data storage unit 24 stores the second current system data 240, the first backup data 242 of the first current system data 200, and the second backup data 244 of the second current system data 240. It should be noted that the first current system data 200 in this embodiment is a booting program, and the second current system data 240 is an operating system.

同樣地,當電子裝置2之系統要進行升級時,需將升級檔內容讀取到電子裝置2中,之後載入到記憶體中執行更新流程,如圖五A至圖五B所示。基本上,此實施例中之主要可更新式存儲介質20、第一從屬可更新式存儲介質21及第二從屬可更新式存儲介質22的更新流程與第一具體實施例相同,而圖五A至圖五B之流程圖增加了儲存於資料儲存單元24中之第二現行系統資料240及第二備份資料244的更新流程。Similarly, when the system of the electronic device 2 is to be upgraded, the content of the upgrade file needs to be read into the electronic device 2, and then loaded into the memory to perform the update process, as shown in FIG. 5A to FIG. Basically, the update process of the primary updatable storage medium 20, the first slave updatable storage medium 21, and the second slave updatable storage medium 22 in this embodiment is the same as that of the first embodiment, and FIG. 5A The flowchart of FIG. 5B increases the update flow of the second current system data 240 and the second backup data 244 stored in the data storage unit 24.

若步驟S414的判斷結果為是,則執行步驟S418,複製第二更新的系統資料至資料儲存單元24中以取代並更新第二備份資料244。之後,處理單元23執行步驟S420,判斷是否更新成功。若否,則重覆步驟S418;若是,處理單元23進一步可以執行步驟S422,檢查已更新的第二備份資料244中之一檢查碼是否與一目標檢查碼相同。若步驟S422的判斷結果為否,則回到步驟S418;若是,則執行步驟S424,複製第二更新的系統資料以取代並更新第二現行系統資料240。第二現行系統資料240的更新流程與上述的NOR flash相同,在此不再多做贅述。If the result of the determination in step S414 is YES, step S418 is executed to copy the second updated system data to the data storage unit 24 to replace and update the second backup data 244. Thereafter, the processing unit 23 performs step S420 to determine whether the update is successful. If not, step S418 is repeated; if so, processing unit 23 may further perform step S422 to check whether one of the updated second backup data 244 is the same as a target check code. If the result of the determination in step S422 is no, the process returns to step S418; if so, step S424 is executed to copy the second updated system data to replace and update the second current system data 240. The update process of the second current system data 240 is the same as the above-mentioned NOR flash, and will not be described again here.

接著,執行步驟S426,判斷是否更新成功。若是,則完成電子裝置2之更新程序;若否,電子裝置2會自動重新啟動。除了於步驟S322判斷是否修復主要可更新式存儲介質20外,到了步驟S328,處理單元23可以判斷是否修復資料儲存單元24中之第二現行系統資料240。若是,藉由觸發系統修復單元25,處理單元23會執行步驟S330,複製第二備份資料244以取代第二現行系統資料240後重新啟動,之後進行步驟S424;若否,處理單元23會執行步驟S332,從資料儲存單元24中載入並驅動作業系統。Next, step S426 is performed to determine whether the update is successful. If yes, the update procedure of the electronic device 2 is completed; if not, the electronic device 2 is automatically restarted. In addition to determining whether to repair the primary updatable storage medium 20 in step S322, to step S328, the processing unit 23 may determine whether to repair the second current system data 240 in the data storage unit 24. If the system repair unit 25 is triggered, the processing unit 23 performs step S330, copies the second backup data 244 to replace the second current system data 240, and then restarts, and then proceeds to step S424; if not, the processing unit 23 performs steps. S332, loading and driving the operating system from the data storage unit 24.

綜上所述,根據本發明之電子裝置僅需藉由一系統還原鍵即可讓電子裝置從異常狀態恢復到正常狀態,著實提昇了產品的可靠度及使用上的便利性。此外,對於製造商來說,只要略微地增加硬體的成本及設計空間,即可大幅減少產品的返修率。In summary, the electronic device according to the present invention only needs to restore the electronic device from the abnormal state to the normal state by using a system restore button, thereby improving the reliability of the product and the convenience in use. In addition, for manufacturers, as long as the hardware cost and design space are slightly increased, the product repair rate can be greatly reduced.

藉由以上較佳具體實施例之詳述,係希望能更加清楚描述本發明之特徵與精神,而並非以上述所揭露的較佳具體實施例來對本發明之範疇加以限制。相反地,其目的是希望能涵蓋各種改變及具相等性的安排於本發明所欲申請之專利範圍的範疇內。因此,本發明所申請之專利範圍的範疇應該根據上述的說明作最寬廣的解釋,以致使其涵蓋所有可能的改變以及具相等性的安排。The features and spirit of the present invention will be more apparent from the detailed description of the preferred embodiments. On the contrary, the intention is to cover various modifications and equivalents within the scope of the invention as claimed. Therefore, the scope of the patented scope of the invention should be construed as broadly construed in the

1、2‧‧‧電子裝置1, 2‧‧‧ electronic devices

10、20‧‧‧主要可更新式存儲介質10, 20‧‧‧ main updatable storage media

11、21‧‧‧第一從屬可更新式存儲介質11, 21‧‧‧ first dependent renewable storage medium

12、22‧‧‧第二從屬可更新式存儲介質12.22‧‧‧Second dependent renewable storage medium

13、23‧‧‧處理單元13, 23‧‧ ‧ processing unit

14、24‧‧‧資料儲存單元14, 24‧‧‧ data storage unit

15、25‧‧‧系統修復單元15, 25‧‧‧System Repair Unit

100‧‧‧現行系統資料100‧‧‧ Current system information

140‧‧‧備份資料140‧‧‧Backup information

110、210‧‧‧第一開機碼110, 210‧‧‧ first boot code

120、220‧‧‧第二開機碼120, 220‧‧‧ second boot code

200‧‧‧第一現行系統資料200‧‧‧ First current system information

240‧‧‧第二現行系統資料240‧‧‧ Second current system information

242‧‧‧第一備份資料242‧‧‧First backup data

244‧‧‧第二備份資料244‧‧‧Second backup data

S100~S128‧‧‧流程步驟S100~S128‧‧‧ Process steps

S200~S216‧‧‧流程步驟S200~S216‧‧‧ Process steps

S300~S332‧‧‧流程步驟S300~S332‧‧‧ Process steps

S400~S426‧‧‧流程步驟S400~S426‧‧‧ Process steps

圖一係繪示根據本發明之第一具體實施例之電子裝置之功能方塊圖。1 is a functional block diagram of an electronic device in accordance with a first embodiment of the present invention.

圖二係繪示根據本發明之第二具體實施例之電子裝置之功能方塊圖。2 is a functional block diagram of an electronic device according to a second embodiment of the present invention.

圖三A及圖三B係繪示第一具體實施例之電子裝置的正常啟動過程之流程圖。FIG. 3A and FIG. 3B are flowcharts showing a normal startup process of the electronic device of the first embodiment.

圖三C係繪示第一具體實施例之電子裝置的系統更新過程之流程圖。FIG. 3C is a flow chart showing a system updating process of the electronic device of the first embodiment.

圖四A至圖四B係繪示第二具體實施例之電子裝置的正常啟動過程之流程圖。4A to 4B are flowcharts showing a normal startup process of the electronic device of the second embodiment.

圖五A至圖五B係繪示第二具體實施例之電子裝置的系統更新過程之流程圖。5A to 5B are flowcharts showing a system updating process of the electronic device of the second embodiment.

1‧‧‧電子裝置1‧‧‧Electronic device

10‧‧‧主要可更新式存儲介質10‧‧‧Main updateable storage media

11‧‧‧第一從屬可更新式存儲介質11‧‧‧First dependent renewable storage medium

12‧‧‧第二從屬可更新式存儲介質12‧‧‧Second slave renewable storage medium

13‧‧‧處理單元13‧‧‧Processing unit

14‧‧‧資料儲存單元14‧‧‧Data storage unit

15‧‧‧系統修復單元15‧‧‧System Repair Unit

100‧‧‧現行系統資料100‧‧‧ Current system information

140‧‧‧備份資料140‧‧‧Backup information

110‧‧‧第一開機碼110‧‧‧First boot code

120‧‧‧第二開機碼120‧‧‧Second boot code

Claims (10)

一種電子裝置之系統更新方法,該電子裝置包含一主要可更新式存儲介質、一第一從屬可更新式存儲介質、一第二從屬可更新式存儲介質、一資料儲存單元以及一系統修復單元,該主要可更新式存儲介質儲存一現行系統資料,而該資料儲存單元儲存該現行系統資料之一備份資料,該主要可更新式存儲介質、該第一從屬可更新式存儲介質以及該第二從屬可更新式存儲介質皆為一非揮發性記憶體,該方法包含下列步驟:(a)更新該第一從屬可更新式存儲介質之內容;(b)更新該第二從屬可更新式存儲介質之內容,若更新成功,進行步驟(c),若更新失敗,進行步驟(d);(c)複製一更新的系統資料至該主要可更新式存儲介質中以取代並更新該現行系統資料,若更新成功則完成該系統更新方法,若更新失敗則進行步驟(e);(d)藉由觸發該系統修復單元,透過該第一從屬可更新式存儲介質致動該電子裝置後進行步驟(b);以及(e)藉由觸發該系統修復單元,複製該備份資料至該主要可更新式存儲介質中以取代該現行系統資料後進行步驟(c)。 A system updating method for an electronic device, comprising: a main updatable storage medium, a first slave renewable storage medium, a second slave renewable storage medium, a data storage unit, and a system repair unit. The primary updatable storage medium stores an existing system data, and the data storage unit stores one of the current system data backup data, the primary updatable storage medium, the first slave renewable storage medium, and the second slave The updateable storage medium is a non-volatile memory, and the method comprises the steps of: (a) updating the content of the first dependent updateable storage medium; and (b) updating the second dependent updateable storage medium. Content, if the update is successful, proceed to step (c), if the update fails, perform step (d); (c) copy an updated system data to the primary updateable storage medium to replace and update the current system data, if If the update succeeds, the system update method is completed, and if the update fails, step (e) is performed; (d) by triggering the system repair unit, through the first slave The updateable storage medium performs the step (b) after actuating the electronic device; and (e) by triggering the system repair unit to copy the backup data to the primary updateable storage medium to replace the current system data Step (c). 如申請專利範圍第1項所述之方法,其中若步驟(a)更新成功,該方法進一步包含下列步驟:(f)檢查已更新的該第一從屬可更新式存儲介質中之一第一檢查碼是否與一第一目標檢查碼相同,若是,進行步驟(b),若否,重覆步驟(a);(g)若步驟(a)更新失敗,複製該第二從屬可更新式存儲介質之內容以取代該第一從屬可更新式存儲介質之內容 後重覆步驟(a);(h)檢查已更新的該第一從屬可更新式存儲介質中之該第一檢查碼是否與已更新的該第二從屬可更新式存儲介質中之一第二檢查碼相同,若否,複製該第一從屬可更新式存儲介質之內容以取代該第二從屬可更新式存儲介質之內容;以及(i)檢查已更新的該主要可更新式存儲介質中之一第一檢查碼是否與該備份資料中之一第二檢查碼相同,若否,複製該更新的系統資料至該資料儲存單元中並取代該備份資料。 The method of claim 1, wherein if the step (a) is successfully updated, the method further comprises the following steps: (f) checking one of the updated first slave renewable storage media. Whether the code is the same as a first target check code, if yes, proceeding to step (b), if not, repeating step (a); (g) if step (a) fails to update, copying the second slave updateable storage medium Content to replace the content of the first slave renewable storage medium Repetitively repeating step (a); (h) checking whether the first check code in the updated first dependent updateable storage medium is updated with one of the updated second dependent updateable storage medium The check code is the same, if not, copying the content of the first slave updateable storage medium to replace the content of the second slave updateable storage medium; and (i) checking the updated primary primary updateable storage medium Whether the first check code is the same as the second check code of the backup data, and if not, copying the updated system data to the data storage unit and replacing the backup data. 如申請專利範圍第1項所述之方法,其中該主要可更新式存儲介質、該第一從屬可更新式存儲介質以及該第二從屬可更新式存儲介質皆為一NOR快閃記憶體,該資料儲存單元係一NAND快閃記憶體、一硬碟或一外部儲存裝置,該現行系統資料包含一開機程式及一作業系統。 The method of claim 1, wherein the primary updatable storage medium, the first slave updatable storage medium, and the second slave updatable storage medium are each a NOR flash memory, The data storage unit is a NAND flash memory, a hard disk or an external storage device. The current system data includes a booting program and an operating system. 一種電子裝置之系統更新方法,該電子裝置包含一主要可更新式存儲介質、一第一從屬可更新式存儲介質、一第二從屬可更新式存儲介質、一資料儲存單元及一系統修復單元,該主要可更新式存儲介質儲存一第一現行系統資料,而該資料儲存單元儲存一第二現行系統資料、該第一現行系統資料之一第一備份資料及該第二現行系統資料之一第二備份資料,該主要可更新式存儲介質、該第一從屬可更新式存儲介質以及該第二從屬可更新式存儲介質皆為一非揮發性記憶體,該方法包含下列步驟:(a)更新該第一從屬可更新式存儲介質之內容;(b)更新該第二從屬可更新式存儲介質之內容,若更新成功,進行步驟(c),若更新失敗,進行步驟(d); (c)複製一第一更新的系統資料至該主要可更新式存儲介質中以取代並更新該第一現行系統資料,若更新成功,進行步驟(e),若更新失敗,進行步驟(f);(d)藉由觸發該系統修復單元,透過該第一從屬可更新式存儲介質致動該電子裝置後進行步驟(b);(e)複製一第二更新的系統資料至該資料儲存單元中以取代並更新該第二備份資料,若更新成功,進行步驟(g);(f)藉由觸發該系統修復單元,複製該第一備份資料至該主要可更新式存儲介質中以取代該第一現行系統資料後進行步驟(c);(g)複製該第二更新的系統資料以取代並更新該第二現行系統資料,若更新成功則完成該系統更新方法,若更新失敗,進行步驟(h);以及(h)藉由觸發該系統修復單元,複製該第二備份資料以取代該第二現行系統資料後進行步驟(g)。 A system updating method for an electronic device, comprising: a main updatable storage medium, a first slave renewable storage medium, a second slave renewable storage medium, a data storage unit, and a system repair unit. The primary updateable storage medium stores a first current system data, and the data storage unit stores a second current system data, one of the first current system data, the first backup data, and the second current system data. The backup data, the primary updateable storage medium, the first dependent updateable storage medium, and the second dependent updateable storage medium are all non-volatile memory, and the method comprises the following steps: (a) updating The content of the first slave updateable storage medium; (b) updating the content of the second slave updateable storage medium, if the update is successful, performing step (c), if the update fails, performing step (d); (c) copying the first updated system data to the primary updateable storage medium to replace and update the first current system data, if the update is successful, performing step (e), if the update fails, performing step (f) (d) by triggering the system repair unit, actuating the electronic device through the first slave renewable storage medium, and performing step (b); (e) copying a second updated system data to the data storage unit Substituting and updating the second backup data, if the update is successful, performing step (g); (f) by triggering the system repair unit, copying the first backup data to the primary updatable storage medium to replace the The first current system data is followed by step (c); (g) copying the second updated system data to replace and update the second current system data, and if the update is successful, the system update method is completed, and if the update fails, the steps are performed. (h); and (h) performing step (g) by triggering the system repair unit to copy the second backup data to replace the second current system data. 如申請專利範圍第4項所述之方法,其中若步驟(a)更新成功,該方法進一步包含下列步驟:(i)檢查已更新的該第一從屬可更新式存儲介質中之一第一檢查碼是否與一第一目標檢查碼相同,若是,進行步驟(b),若否,重覆步驟(a);(j)若步驟(a)更新失敗,複製該第二從屬可更新式存儲介質之內容以取代該第一從屬可更新式存儲介質之內容後重覆步驟(a);(k)檢查已更新的該第一從屬可更新式存儲介質中之該第一檢查碼是否與已更新的該第二從屬可更新式存儲介質中之一第二檢查碼相同,若否,複製該第一從屬可更新式存儲介質之內容以取代該第二從屬可更新式存 儲介質之內容;(l)檢查已更新的該主要可更新式存儲介質中之一第一檢查碼是否與該第一備份資料中之一第二檢查碼相同,若否,複製該第一更新的系統資料至該資料儲存單元中並取代該第一備份資料;以及(m)若步驟(e)更新成功,檢查已更新的該第二備份資料中之一檢查碼是否與一目標檢查碼相同,若是,進行步驟(g),若否,重覆步驟(e)。 The method of claim 4, wherein if the step (a) is successfully updated, the method further comprises the step of: (i) checking one of the updated first slave renewable storage media. Whether the code is the same as a first target check code, if yes, proceeding to step (b), if not, repeating step (a); (j) if step (a) fails to update, copying the second slave updateable storage medium Repetitively replacing the content of the first dependent updateable storage medium with step (a); (k) checking whether the first check code in the updated first dependent updateable storage medium is updated The second check code of the second slave updateable storage medium is the same, if not, copying the content of the first slave updateable storage medium to replace the second slave updateable memory The content of the storage medium; (1) checking whether one of the first updateable storage media that has been updated is the same as the second check code of the first backup data, and if not, copying the first update System data is added to the data storage unit and replaces the first backup data; and (m) if step (e) is successfully updated, checking whether one of the updated second backup data is the same as a target check code If yes, proceed to step (g), if not, repeat step (e). 申請專利範圍第4項所述之方法,其中該主要可更新式存儲介質、該第一從屬可更新式存儲介質以及該第二從屬可更新式存儲介質皆為一NOR快閃記憶體,該資料儲存單元係一NAND快閃記憶體、一硬碟或一外部儲存裝置,該現行系統資料包含一開機程式及一作業系統。 The method of claim 4, wherein the primary updatable storage medium, the first slave updatable storage medium, and the second slave updatable storage medium are each a NOR flash memory, the data The storage unit is a NAND flash memory, a hard disk or an external storage device. The current system data includes a booting program and an operating system. 一種電子裝置,包含:一主要可更新式存儲介質,為一非揮發性記憶體,儲存一現行系統資料;一第一從屬可更新式存儲介質,為一非揮發性記憶體;一第二從屬可更新式存儲介質,為一非揮發性記憶體;一資料儲存單元,儲存該現行系統資料之一備份資料;一系統修復單元;以及一處理單元,分別耦接至該主要可更新式存儲介質、該第一從屬可更新式存儲介質、該第二從屬可更新式存儲介質、該資料儲存單元以及該系統修復單元;其中當該主要可更新式存儲介質中之該現行系統資料於一更新期間更新失敗時,該系統修復單元能夠被觸發,致使該處理單元透過該第一從屬可更新式存儲介質或該第二從屬可更新式存儲介質致動該電子裝置並且複製儲存於該資料儲存單 元中之該備份資料至該主要可更新式存儲介質中以取代該現行系統資料。 An electronic device comprising: a primary updatable storage medium storing a current system data as a non-volatile memory; a first slave renewable storage medium being a non-volatile memory; and a second slave An updateable storage medium is a non-volatile memory; a data storage unit stores a backup data of the current system data; a system repair unit; and a processing unit coupled to the main updateable storage medium The first dependent updateable storage medium, the second dependent updateable storage medium, the data storage unit, and the system repair unit; wherein the current system data in the primary updatable storage medium is during an update period When the update fails, the system repair unit can be triggered to cause the processing unit to actuate the electronic device through the first slave renewable storage medium or the second slave updateable storage medium and copy and store the data storage form The backup data in the element is replaced by the primary updateable storage medium to replace the current system data. 如申請專利範圍第7項所述之電子裝置,其中該第一從屬可更新式存儲介質及該第二從屬可更新式存儲介質分別儲存一第一開機碼及一第二開機碼,該處理單元係預設藉由該第一開機碼以致動該電子裝置,當該第一從屬可更新式存儲介質於該更新期間更新失敗時,該系統修復單元能夠被觸發,致使該處理單元透過該第二從屬可更新式存儲介質並藉由該第二開機碼以致動該電子裝置,該處理單元進一步檢查已更新的該第一從屬可更新式存儲介質中之一第一檢查碼是否與已更新的該第二從屬可更新式存儲介質中之一第二檢查碼相同,若否,該處理單元複製該第二從屬可更新式存儲介質之內容以取代該第一從屬可更新式存儲介質之內容,該處理單元進一步檢查已更新的該主要可更新式存儲介質中之一第一檢查碼是否與該備份資料中之一第二檢查碼相同,若否,該處理單元複製已更新的該主要可更新式存儲介質中之內容至該資料儲存單元中以取代該備份資料,該主要可更新式存儲介質、該第一從屬可更新式存儲介質以及該第二從屬可更新式存儲介質皆為一NOR快閃記憶體,該資料儲存單元係一NAND快閃記憶體、一硬碟或一外部儲存裝置,該現行系統資料包含一開機程式及一作業系統。 The electronic device of claim 7, wherein the first slave renewable storage medium and the second slave updateable storage medium respectively store a first boot code and a second boot code, the processing unit Presetting, by the first boot code, the electronic device, when the first slave updateable storage medium fails to update during the update, the system repair unit can be triggered, so that the processing unit transmits the second Relying on the updateable storage medium and actuating the electronic device by the second boot code, the processing unit further checking whether the first check code of the updated one of the first slave renewable storage media is updated with the updated The second check code of the second slave updateable storage medium is the same. If not, the processing unit copies the content of the second slave updateable storage medium to replace the content of the first slave updateable storage medium. The processing unit further checks whether one of the first updateable storage media that has been updated is the same as the second check code of the backup data, if No, the processing unit copies the updated content of the primary updatable storage medium to the data storage unit to replace the backup data, the primary updatable storage medium, the first dependent updateable storage medium, and the The second slave renewable storage medium is a NOR flash memory, the data storage unit is a NAND flash memory, a hard disk or an external storage device, and the current system data includes a booting program and an operating system. . 一種電子裝置,包含:一主要可更新式存儲介質,為一非揮發性記憶體,儲存一第一現行系統資料;一第一從屬可更新式存儲介質,為一非揮發性記憶體;一第二從屬可更新式存儲介質,為一非揮發性記憶體;一資料儲存單元,儲存一第二現行系統資料、該第一現 行系統資料之一第一備份資料及該第二現行系統資料之一第二備份資料;一系統修復單元;以及一處理單元,分別耦接至該主要可更新式存儲介質、該第一從屬可更新式存儲介質、該第二從屬可更新式存儲介質、該資料儲存單元以及該系統修復單元;其中當該主要可更新式存儲介質中之該第一現行系統資料於一更新期間更新失敗時,該系統修復單元能夠被觸發,致使該處理單元透過該第一從屬可更新式存儲介質或該第二從屬可更新式存儲介質致動該電子裝置並且複製儲存於該資料儲存單元中之該第一備份資料至該主要可更新式存儲介質中取代該第一現行系統資料;以及其中當該資料儲存單元中之該第二現行系統資料於該更新期間更新失敗時,該系統修復單元能夠被觸發,致使該處理單元複製儲存於該資料儲存單元中之該第二備份資料取代該第二現行系統資料以致動該電子裝置。 An electronic device comprising: a primary renewable storage medium storing a first current system data as a non-volatile memory; and a first slave renewable storage medium being a non-volatile memory; The second slave renewable storage medium is a non-volatile memory; a data storage unit stores a second current system data, the first present a first backup data of the system data and a second backup data of the second current system data; a system repair unit; and a processing unit coupled to the primary updateable storage medium, the first slave An updated storage medium, the second dependent updateable storage medium, the data storage unit, and the system repair unit; wherein when the first current system data in the primary updatable storage medium fails to be updated during an update, The system repair unit can be triggered to cause the processing unit to actuate the electronic device through the first slave renewable storage medium or the second slave updateable storage medium and copy the first stored in the data storage unit Replacing the first current system data with the backup data to the primary updatable storage medium; and wherein the system repair unit can be triggered when the second current system data in the data storage unit fails to update during the update period, Causing the processing unit to copy the second backup data stored in the data storage unit to replace the second present System data such that the movement of the electronic device. 如申請專利範圍第9項所述之電子裝置,其中該第一從屬可更新式存儲介質及該第二從屬可更新式存儲介質分別儲存一第一開機碼及一第二開機碼,該處理單元係預設藉由該第一開機碼以致動該電子裝置,當該第一從屬可更新式存儲介質於該更新期間更新失敗時,該系統修復單元能夠被觸發,致使該處理單元透過該第二從屬可更新式存儲介質並藉由該第二開機碼以致動該電子裝置,該處理單元進一步檢查已更新的該第一從屬可更新式存儲介質中之一第一檢查碼是否與已更新的該第二從屬可更新式存儲介質中之一第二檢查碼相同,若否,該處理單元複製該第二從屬可更新式存儲介質之內容以取代該第一從屬可更新式存儲介質之內容,該處理單元進一步檢查已更新的該主要可更新式存儲介質中之一第一 檢查碼是否與該備份資料中之一第二檢查碼相同,若否,該處理單元複製已更新的該主要可更新式存儲介質中之內容至該資料儲存單元中以取代該備份資料,該主要可更新式存儲介質、該第一從屬可更新式存儲介質以及該第二從屬可更新式存儲介質皆為一NOR快閃記憶體,該資料儲存單元係一NAND快閃記憶體、一硬碟或一外部儲存裝置,該現行系統資料包含一開機程式及一作業系統。 The electronic device of claim 9, wherein the first slave renewable storage medium and the second slave updateable storage medium respectively store a first boot code and a second boot code, the processing unit Presetting, by the first boot code, the electronic device, when the first slave updateable storage medium fails to update during the update, the system repair unit can be triggered, so that the processing unit transmits the second Relying on the updateable storage medium and actuating the electronic device by the second boot code, the processing unit further checking whether the first check code of the updated one of the first slave renewable storage media is updated with the updated The second check code of the second slave updateable storage medium is the same. If not, the processing unit copies the content of the second slave updateable storage medium to replace the content of the first slave updateable storage medium. The processing unit further checks one of the updated ones of the primary updatable storage media Whether the check code is the same as one of the second check codes in the backup data, and if not, the processing unit copies the updated content of the primary updateable storage medium to the data storage unit to replace the backup data, the main The updateable storage medium, the first dependent updateable storage medium, and the second dependent updateable storage medium are all a NOR flash memory, and the data storage unit is a NAND flash memory, a hard disk or An external storage device, the current system data includes a booting program and an operating system.
TW097134641A 2008-09-10 2008-09-10 Electronic apparatus and system updating method thereof TWI489390B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW097134641A TWI489390B (en) 2008-09-10 2008-09-10 Electronic apparatus and system updating method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW097134641A TWI489390B (en) 2008-09-10 2008-09-10 Electronic apparatus and system updating method thereof

Publications (2)

Publication Number Publication Date
TW201011648A TW201011648A (en) 2010-03-16
TWI489390B true TWI489390B (en) 2015-06-21

Family

ID=44828704

Family Applications (1)

Application Number Title Priority Date Filing Date
TW097134641A TWI489390B (en) 2008-09-10 2008-09-10 Electronic apparatus and system updating method thereof

Country Status (1)

Country Link
TW (1) TWI489390B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI575459B (en) * 2016-03-14 2017-03-21 晨星半導體股份有限公司 Terminal device and system upgrading method thereof

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI578232B (en) * 2015-12-16 2017-04-11 環勝電子(深圳)有限公司 Handheld device and operating system updating method thereof

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI220962B (en) * 2003-01-20 2004-09-11 Mediatek Inc Firmware updating method and related apparatus for checking content of replacing firmware before firmware updating
TW200713037A (en) * 2005-09-06 2007-04-01 Benq Corp System and method for updating firmware
TW200825915A (en) * 2006-12-07 2008-06-16 Wistron Corp Computer system and related method for preventing from failing to update BIOS program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI220962B (en) * 2003-01-20 2004-09-11 Mediatek Inc Firmware updating method and related apparatus for checking content of replacing firmware before firmware updating
TW200713037A (en) * 2005-09-06 2007-04-01 Benq Corp System and method for updating firmware
TW200825915A (en) * 2006-12-07 2008-06-16 Wistron Corp Computer system and related method for preventing from failing to update BIOS program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI575459B (en) * 2016-03-14 2017-03-21 晨星半導體股份有限公司 Terminal device and system upgrading method thereof

Also Published As

Publication number Publication date
TW201011648A (en) 2010-03-16

Similar Documents

Publication Publication Date Title
US9858066B2 (en) Updating firmware of a hardware component
US8423991B2 (en) Embedded network device and firmware upgrading method
JP5113700B2 (en) Firmware update apparatus and method
US20140351569A1 (en) Software updating process for an embedded device
TW201222554A (en) Handling errors during device bootup from a non-volatile memory
CN102023908A (en) Method and device for backing up boot program
CN113254048B (en) Method, device and equipment for updating boot program and computer readable medium
JP4940599B2 (en) Information processing apparatus, information processing apparatus control program, and information processing apparatus control method
JP2008504628A (en) Safe flushing
US11144299B2 (en) Firmware updating method
TWI489390B (en) Electronic apparatus and system updating method thereof
CN111522690B (en) Data storage device and method for maintaining normal start-up operation of data storage device
CN113157303A (en) Upgrading method, embedded system, terminal and computer storage medium
TW202131170A (en) Firmware corruption recovery
US9311075B2 (en) Electronic apparatus and BIOS updating apparatus thereof
TW201617861A (en) Firmware updating method and electronic apparatus using the same
WO2022093197A1 (en) Firmware overwrites using queues and pointers
KR101850272B1 (en) Method for updating boot image for fast booting and image forming apparatus for performing the same
EP4113288B1 (en) Systems and method for bootup activation of firmware images
CN111045709B (en) Firmware upgrading method and firmware upgrading device
TWI407371B (en) Embedded networking device and firmware updating method
CN116126385A (en) Data storage device and method capable of updating operating system rapidly
JP2023119785A (en) Computer and data mismatch determination method
CN116541081A (en) Method, device, equipment and storage medium for managing startup loading of embedded system
JP2005228225A (en) Memory card adaptor