JP2006202086A - Updating method for firmware - Google Patents

Updating method for firmware Download PDF

Info

Publication number
JP2006202086A
JP2006202086A JP2005013789A JP2005013789A JP2006202086A JP 2006202086 A JP2006202086 A JP 2006202086A JP 2005013789 A JP2005013789 A JP 2005013789A JP 2005013789 A JP2005013789 A JP 2005013789A JP 2006202086 A JP2006202086 A JP 2006202086A
Authority
JP
Japan
Prior art keywords
file
firmware
update
updated
rom
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
JP2005013789A
Other languages
Japanese (ja)
Inventor
Shinya Ohira
真也 大平
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.)
DIGION Inc
Original Assignee
DIGION Inc
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 DIGION Inc filed Critical DIGION Inc
Priority to JP2005013789A priority Critical patent/JP2006202086A/en
Publication of JP2006202086A publication Critical patent/JP2006202086A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To evade incomplete updating of firmware and to carry out firmware updating when the free area in ROM runs short. <P>SOLUTION: The incomplete updating of the firmware is evaded by operating a file system so that a file to be updated is given the original name after a file to be updated is written in as a different file to a free area in the ROM such as a flash memory through the file system and writing in is terminated normally. The safe and sure updating of the firmware is carried out by using a module for updating when it is necessary to update the firmware with a combination of two or more files, or the free area in the ROM runs short. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、ファームウェア更新中の障害に対して、特別な自動復旧機能などを必要としない安全確実なファームウェア更新方法に関するものである。   The present invention relates to a secure firmware update method that does not require a special automatic recovery function or the like for a failure during firmware update.

ファームウェアの更新中に電源断など不慮の障害が発生すると、ROM内のファームウェアが不完全に書き換えられて破損してしまうことにより、システムが起動しない状態になってしまう可能性がある。ファームウェア復旧のためにはROMを交換するなどの手作業が必要であった。   If an unexpected failure such as a power interruption occurs during the firmware update, the firmware in the ROM may be incompletely rewritten and damaged, and the system may not start up. To restore the firmware, manual work such as replacing the ROM was required.

ファームウェア復旧の自動化に関しては、様々な方法が提案されている。たとえば、特開平10−307726「起動エラー時におけるファームウェア リカバリ方式」では、更新前のファームウェアをあらかじめ別の記憶装置にバックアップを行う方法が、また特開2004−38716「障害発生時の自動復旧機能を備えたファームウェア更新方法」では、正常に更新が行うことができたかどうかのフラグと復旧プログラムを備えた方法が提案されている。
特開平10−307726号公報 特開2004−38716号公報
Various methods have been proposed for automating firmware recovery. For example, in Japanese Patent Application Laid-Open No. 10-307726 “Firmware Recovery Method at Startup Error”, a method for backing up firmware before update to another storage device in advance is disclosed in Japanese Patent Application Laid-Open No. 2004-38716 “Automatic Recovery Function in Case of Failure”. In the “Firmware Update Method”, a method including a flag indicating whether the update has been successfully performed and a recovery program has been proposed.
JP-A-10-307726 JP 2004-38716 A

しかしながら、これらの方法では、通常使用するROM以外のファームウェア記憶装置や復旧プログラムを用意することによる製品のコストアップや製品試験工数増大への影響が避けられない。   However, these methods inevitably affect the cost of the product and increase the number of product test steps by preparing a firmware storage device other than the ROM that is normally used and a recovery program.

本発明は、前述のファームウェアが不完全に書き換えられて破損した場合に復旧させるのではなく、ROMのファイルシステムを経由してファームウェアを更新することにより、障害によるファームウェアが破損することを完全に回避するものである。   The present invention does not recover when the above-mentioned firmware is incompletely rewritten and is damaged, but by updating the firmware via the ROM file system, it is possible to completely prevent the firmware from being damaged due to a failure. To do.

本発明を用いることで、従来のシステムに対しても、特別なハードウェアを追加することなく、低コストで安全確実なファームウェア更新方法を提供することができる。   By using the present invention, it is possible to provide a safe and reliable firmware update method for a conventional system without adding special hardware.

請求項1に記載の本発明は、ファームウェアをROMのファイルシステムを経由してファイル単位で更新することが第一の特徴である。従来、ファームウェアの更新はファームウェアの全体あるいは複数に分けられたモジュール群をブロック単位で書き換えるものであったが、本発明ではファイルシステムを経由して、ファイル単位での更新を行う。   The first feature of the present invention described in claim 1 is that the firmware is updated in units of files via the ROM file system. Conventionally, firmware is updated by rewriting the entire firmware or a group of modules divided into a plurality of blocks, but in the present invention, updating is performed in units of files via a file system.

さらに、ROMの空き領域に更新すべきファイルを別ファイルとして書き込み、正常に書き込みが終了した後、更新すべきファイルが本来の名称になるようファイルシステムを操作することで、ファームウェアの更新が不完全になることを回避することが第二の特徴である。   Furthermore, the firmware update is incomplete by writing the file to be updated in the free area of the ROM as a separate file and operating the file system so that the file to be updated has the original name after the writing is completed normally. The second feature is to avoid becoming.

書き換えが必要なファイルをネットワークや他の機器より送られてきた新しいデータで直接置き換える場合、この最中に障害が発生するとファームウェアが破損してしまう。これは従来のブロック単位での更新の場合でもファイルシステムを経由した更新の場合でも同様である。   If a file that needs to be rewritten is directly replaced with new data sent from a network or other device, the firmware will be damaged if a failure occurs during this time. This is the same in the case of the update in the conventional block unit and the update through the file system.

そこで、以下の方法を用いて、ファームウェアが破損することを回避する。更新すべきファイル名をabcd.efgとする。まず、ROMの空き領域に更新用の新しいファイルを本来とは違った名前で格納する。空き領域はファイルシステム自体が管理しているため、ファームウェア更新プログラムに対して特別な仕掛けは必要なく、変更した名前でファイルを保存するだけの操作で十分である。仮にこの名前を~abcd.efgとする。この保存時に万が一、障害が発生したとしても、システムの実行には関係のない名前のファイルが存在しているだけであるため特に問題は生じない。正常に~abcd.efgが作成されたことを確認した後、ファイルシステムを操作して、更新された新しいファイルデータ~abcd.efgが示す領域をファイル名abcd.efgにマッピングし直す。この操作はファイルシステムにおいてアトミック操作(不可分操作)のため、ファイル更新時において不正なファイルが作成される可能性はない。   Therefore, the following method is used to prevent the firmware from being damaged. The file name to be updated is abcd.efg. First, a new file for update is stored in a free area of the ROM with a name different from the original name. Since the free area is managed by the file system itself, no special mechanism is required for the firmware update program, and it is sufficient to save the file with the changed name. Let this name be ~ abcd.efg. Even if a failure occurs at the time of saving, there is no particular problem because there is only a file with a name that has nothing to do with the execution of the system. After confirming that ~ abcd.efg has been created normally, the file system is operated to remap the area indicated by the updated new file data ~ abcd.efg to the file name abcd.efg. Since this operation is an atomic operation (inseparable operation) in the file system, there is no possibility that an illegal file is created when the file is updated.

UNIX(登録商標)のファイルシステムを利用した場合の例をあげて説明する。UNIX(登録商標)以外のファイルシステムでも各部の名称以外は基本的に同様と考えてもよい。図1は、UNIX(登録商標)のファイルシステムの概略を表したものである。ファイルシステムはディレクトリ10内の抽象的なファイル名Aを抽象的なファイルセグメントであるインデックスノード(以下iノードと称する)にマッピングする。抽象的なファイルセグメントであるiノード11は、ROM16内の当該セグメントを記憶する物理的なデータブロック13〜14、あるいは、さらにiノード12を経由して(複数のiノードを経由する場合もあり得る)、物理的なデータブロック15へとマッピングされる。このようにしてUNIX(登録商標)のファイルシステムは抽象的なファイル名と物理的なデータブロックをiノード経由でマッピングしている。   An example in the case where a UNIX (registered trademark) file system is used will be described. A file system other than UNIX (registered trademark) may be basically the same except for the names of the components. FIG. 1 shows an outline of a UNIX (registered trademark) file system. The file system maps the abstract file name A in the directory 10 to an index node (hereinafter referred to as an i-node) that is an abstract file segment. The i-node 11 that is an abstract file segment passes through the physical data blocks 13 to 14 storing the segment in the ROM 16 or further via the i-node 12 (there may be a plurality of i-nodes). Get) mapped to the physical data block 15. In this way, the UNIX (registered trademark) file system maps abstract file names and physical data blocks via inodes.

図2はファームウェア更新前のファイルシステムの状態である。更新対象のファイル名をabcd.efgとする。このファイルはiノード21を経由して物理データブロック22とマッピングされている。この図では、abcd.efg以外のファイルのiノード記述は省略している。   FIG. 2 shows the state of the file system before updating the firmware. The file name to be updated is abcd.efg. This file is mapped to the physical data block 22 via the i-node 21. In this figure, the i-node description of files other than abcd.efg is omitted.

図3は更新ファイルを~abcd.efgというファイル名で書き込んだ状態を示している。ファイルシステムにより、ROMの空き領域にデータブロックが確保され、iノード34を経由して更新ファイルが~abcd.efgというファイル名で物理データブロック35へマッピングされている。   FIG. 3 shows a state where an update file is written with a file name of ~ abcd.efg. The data block is secured in the free area of the ROM by the file system, and the update file is mapped to the physical data block 35 with the file name ~ abcd.efg via the i-node 34.

図4は、更新すべきabcd.efgに対応するiノードポインタ46をもともとの値nから更新ファイル~abcd.efgに対応するzにマッピングし直した後の状態を表している。この操作はUNIX(登録商標)のシステムコールを用いて行われるアトミック操作であるため、障害により不正な状態に陥ることはあり得ない。元のiノード41はファイル名とのマッピング状態から解放され、iノード41にマッピングされていた物理データブロック42は以後空き領域として扱われる。   FIG. 4 shows a state after the i-node pointer 46 corresponding to abcd.efg to be updated is re-mapped from the original value n to z corresponding to the update file ~ abcd.efg. Since this operation is an atomic operation performed using a system call of UNIX (registered trademark), it is impossible to fall into an illegal state due to a failure. The original i-node 41 is released from the mapping state with the file name, and the physical data block 42 mapped to the i-node 41 is thereafter treated as a free area.

以上は一つのファイルに対する更新の説明であるが、複数のファイルの更新が必要な場合も、上記の手順を繰り返すことにより不正な状態に陥ることなくファームウェア更新が可能である。   The above is the description of the update for one file, but when a plurality of files need to be updated, the firmware can be updated without falling into an illegal state by repeating the above procedure.

請求項2に記載の本発明は、必ず複数のファイルの組み合わせで行う必要がある場合かつ更新すべきファイルの総ファイルサイズがROMの空き容量を超えている場合のファームウェア更新方法を提供する。アプリケーションソフトとそれが利用するドライバソフトなどはバージョンに不整合が生じることのないよう同時に更新する必要がある。ドライバソフトだけ更新が成功した時点で障害が発生するとアプリケーションソフトとドライバソフト間に不整合が生じ、システムが起動しない場合がありえる。   The present invention according to claim 2 provides a method for updating firmware when it is necessary to perform a combination of a plurality of files and when the total file size of files to be updated exceeds the free space of the ROM. Application software and driver software used by the application software must be updated at the same time so that there is no inconsistency between versions. If a failure occurs at the time when only the driver software is successfully updated, inconsistency may occur between the application software and the driver software, and the system may not start.

これらの問題を以下の方法を用いて回避する。まず更新用モジュールを作成する。またモジュールが有する機能は、基本的に図5に示す単純なものであり、その他、必要に応じて更新状態を表示するなどの機能を有する。また、同時に更新するファイルとの整合性を持ち、更新対象でシステムの実行時には必ず起動されるモジュール名とする。   These problems are avoided using the following method. First, an update module is created. Further, the function of the module is basically the simple one shown in FIG. 5, and has other functions such as displaying an update status as necessary. Also, the module name must be consistent with the files to be updated at the same time, and must be activated whenever the system is executed as the update target.

更新用モジュールを更新対象のファイルと請求項1の方法を用いて置換する。更新用モジュールは、更新が必要なファイルをネットワークや他の機器より請求項1の更新方法を用いて更新を行う。この作業を繰り返し、すべてのファイルが正常でかつ更新済みであることを確認できれば、自分自身を本来の更新ファイルに更新する処理を行い、更新された本来のシステムが起動する状態になる。   The update module is replaced with the file to be updated using the method of claim 1. The update module updates a file that needs to be updated from the network or another device using the update method according to claim 1. If this operation is repeated and it is confirmed that all the files are normal and updated, the process of updating itself to the original update file is performed, and the updated original system is activated.

更新の途中で障害が発生したとしても、更新用モジュールがROM上に残っているため、次回起動時に更新の継続が可能であり、最終的には必ず全てのファイルが更新された状態になることが保証される。   Even if a failure occurs in the middle of the update, the update module remains in the ROM, so the update can be continued at the next startup, and all files must be updated in the end. Is guaranteed.

UNIX(登録商標)ファイルシステム概略Overview of UNIX (registered trademark) file system ファイル更新前のiノード状態Inode state before file update 更新ファイル保存後のiノード状態Inode state after saving update file ファイル更新後のiノード状態Inode state after file update 更新用モジュール機能フローチャートUpdate module function flowchart

符号の説明Explanation of symbols

10 ディレクトリ
11 iノード
12 iノード
13 物理データブロック
14 物理データブロック
15 物理データブロック
16 ROM
20 ディレクトリ
21 iノード
22 物理データブロック
23 ROM
30 ディレクトリ
31 iノード
32 物理データブロック
33 ROM
34 iノード
35 物理データブロック
40 ディレクトリ
41 iノード
42 物理データブロック
43 ROM
44 iノード
45 物理データブロック
46 変更されたiノードポインタ
10 directory 11 inode 12 inode 13 physical data block 14 physical data block 15 physical data block 16 ROM
20 directory 21 inode 22 physical data block 23 ROM
30 directory 31 inode 32 physical data block 33 ROM
34 inode 35 physical data block 40 directory 41 inode 42 physical data block 43 ROM
44 inode 45 physical data block 46 modified inode pointer

Claims (2)

ファイルシステムを経由してフラッシュメモリなどROMの空き領域に更新すべきファイルを別ファイルとして書き込み、正常に書き込みが終了した後、更新すべきファイルが本来の名称になるようファイルシステムを操作し、更新が不完全になることを回避することを特徴とするファームウェア更新方法。   Write the file to be updated as a separate file to the free space in the ROM such as flash memory via the file system, and after successfully writing, operate the file system so that the file to be updated has the original name and update. Firmware update method characterized by avoiding incompleteness of image.
総ファイルサイズが空き領域をこえるような複数のファイルの組み合わせでファームウェアの更新を行う必要がある場合など、必要なファイルを更新する機能を有する更新用モジュールを用いて、不正なファイルの組み合わせとなることを回避し、複数回の差分更新をくりかえすことにより更新が可能なことを特徴とするファームウェア更新方法。

When the firmware needs to be updated with a combination of multiple files whose total file size exceeds the free space, an invalid file combination is made using an update module that has a function to update the necessary files. A firmware update method characterized in that the update is possible by repeating a plurality of differential updates.
JP2005013789A 2005-01-21 2005-01-21 Updating method for firmware Pending JP2006202086A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005013789A JP2006202086A (en) 2005-01-21 2005-01-21 Updating method for firmware

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005013789A JP2006202086A (en) 2005-01-21 2005-01-21 Updating method for firmware

Publications (1)

Publication Number Publication Date
JP2006202086A true JP2006202086A (en) 2006-08-03

Family

ID=36960021

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005013789A Pending JP2006202086A (en) 2005-01-21 2005-01-21 Updating method for firmware

Country Status (1)

Country Link
JP (1) JP2006202086A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009048557A (en) * 2007-08-22 2009-03-05 Mitsubishi Electric Corp Data update device, data update method, and data update program
CN102132259A (en) * 2009-03-30 2011-07-20 日立系统解决方案有限公司 Firmware updating system, firmware delivering server, firmware incorporating device, and program
US20160320216A1 (en) * 2013-12-19 2016-11-03 Airbus Operations S.A.S. Simplified measurement device and method and tool for manufacturing such a device
US10136531B2 (en) 2013-12-19 2018-11-20 Airbus Operations S.A.S. Measurement device with single control circuit
US10330503B2 (en) 2013-12-19 2019-06-25 Airbus Operations S.A.S. Measurement device comprising sensors arranged in recesses covered by a single film

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009048557A (en) * 2007-08-22 2009-03-05 Mitsubishi Electric Corp Data update device, data update method, and data update program
CN102132259A (en) * 2009-03-30 2011-07-20 日立系统解决方案有限公司 Firmware updating system, firmware delivering server, firmware incorporating device, and program
US8522233B2 (en) 2009-03-30 2013-08-27 Hitachi Solutions, Ltd. Firmware updating system, firmware delivering server, firmware embedded device, and program
US20160320216A1 (en) * 2013-12-19 2016-11-03 Airbus Operations S.A.S. Simplified measurement device and method and tool for manufacturing such a device
US10136531B2 (en) 2013-12-19 2018-11-20 Airbus Operations S.A.S. Measurement device with single control circuit
US10330503B2 (en) 2013-12-19 2019-06-25 Airbus Operations S.A.S. Measurement device comprising sensors arranged in recesses covered by a single film
US10352739B2 (en) * 2013-12-19 2019-07-16 Airbus Operation S.A.S. Simplified measurement device and method and tool for manufacturing such a device

Similar Documents

Publication Publication Date Title
US7747664B2 (en) Storage system format for transaction safe file system
WO2010098019A2 (en) Program update device, program update method, and information processing device
US7702659B2 (en) Robust, self-maintaining file system
WO2011024688A1 (en) Firmware update system, and information apparatus, as well as program
US20100064127A1 (en) Method for updating basic input/output system and method for repairing thereof
JP3003619B2 (en) Apparatus internal setting information backup apparatus and method, and storage medium storing apparatus internal setting information backup control program
JP2006202086A (en) Updating method for firmware
CN101710373A (en) File operation method of embedded system
US7801859B1 (en) Tracking filesystem backups
CN113419897B (en) File processing method and device, electronic equipment and storage medium thereof
JPS5913783B2 (en) Duplicate file method
TWI740429B (en) Method and system for managing backup data
JP5545432B2 (en) BIOS update method, BIOS update device, and BIOS update program
JP5180578B2 (en) Business continuity system
CN100407158C (en) Method for accessing data file of telecommunication apparatus
JP2007133535A (en) File system inside storage device
JP2009020753A (en) Data synchronization system and program
US8555020B2 (en) Reclaiming space occupied by an expired variable record in a non-volatile record storage
JP2005165557A (en) Information processor, control method and control program
CN115146277A (en) Safe starting method based on package management and computer storage medium
JPS62107350A (en) Data managing system for auxiliary storage device
JP2003330506A (en) Apparatus and method for data backup in programmable controller
JPH04307643A (en) Highly reliable file system
JP2009230395A (en) Journal log recording control method
KR20060056646A (en) Removable storage and recovering method for file system using removable sotrages