JP2005056319A - Software update system, method and program - Google Patents

Software update system, method and program Download PDF

Info

Publication number
JP2005056319A
JP2005056319A JP2003288962A JP2003288962A JP2005056319A JP 2005056319 A JP2005056319 A JP 2005056319A JP 2003288962 A JP2003288962 A JP 2003288962A JP 2003288962 A JP2003288962 A JP 2003288962A JP 2005056319 A JP2005056319 A JP 2005056319A
Authority
JP
Japan
Prior art keywords
module
failure
terminal device
main program
storage area
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.)
Withdrawn
Application number
JP2003288962A
Other languages
Japanese (ja)
Inventor
Nobuaki Tanaka
伸明 田中
Kentaro Iida
顕太郎 飯田
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2003288962A priority Critical patent/JP2005056319A/en
Publication of JP2005056319A publication Critical patent/JP2005056319A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Executing Machine-Instructions (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a system and a method capable of updating software in module units on an OS having a dynamic link function. <P>SOLUTION: A server 1 divides a program into a module 102 and a main program 103, compiles the main program 103, provides a link in a manner utilizing a shared library, complies the module 102 as the shared library, and sends the compiled module 104 and the main program 105 to a terminal device 3. The server also has a module change means 13 for changing the module and makes changes to the data to be updated. The terminal device 3 has a storage means 33 for storing a module 106 and a main program 107. On receiving the data to be updated, the terminal device writes it in the storage means 33, creates dynamic links to the module and the main program stored in the storage means 33, and executes the dynamically linked program. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、ソフトウエアを更新するためのソフトウエア更新システム、ソフトウエア更新方法、およびソフトウエア更新プログラムに関するものである。   The present invention relates to a software update system, a software update method, and a software update program for updating software.

従来の携帯電話などの組込み機器におけるソフトウエア更新方法は、ソフトウエア更新の高速化を図るために、ソフトウエア全体を複数の要素に分解し、ソフトウエアの更新すべき部分に対応する要素のみを更新している(例えば、非特許文献1、特許文献1参照)。   In the conventional software update method for embedded devices such as mobile phones, in order to speed up the software update, the entire software is disassembled into multiple elements, and only the elements corresponding to the parts to be updated are included. It is updated (for example, see Non-Patent Document 1 and Patent Document 1).

非特許文献1では、ソフトウエアの更新を前提とした携帯電話移動機ソフトウエアの構造が記載されている。このソフトウエアの構造は、ソフトウエアを複数に分割したモジュールと、モジュール間の参照を行うためのジャンプベクタテーブルとで構成される。この構成により、あるモジュールが更新されることによって関数の配置にずれが生じた場合においても、ジャンプベクタテーブルを利用することにより、更新による影響を抑えることができる。   Non-Patent Document 1 describes the structure of mobile phone mobile device software on the premise of software update. The software structure includes a module obtained by dividing the software into a plurality of modules and a jump vector table for referencing the modules. With this configuration, even when there is a shift in the function arrangement due to a certain module being updated, the effect of the update can be suppressed by using the jump vector table.

また、特許文献1では、移動電話機用のソフトウエア書換え方法が記載されている。このソフトウエア書換え方法によれば、機能毎のプログラム部品に互いのプログラム間の参照関係を示す制御領域を備えており、プログラムを更新する際、この制御領域を更新することで、新しいプログラムを再配置している。   Further, Patent Document 1 describes a software rewriting method for a mobile phone. According to this software rewriting method, a program area for each function is provided with a control area indicating the reference relationship between the programs, and when the program is updated, the control area is updated to renew the new program. It is arranged.

しかしながら、上記従来のソフトウエア更新方法においては、リアルタイムOS(オペレーティングシステム)上での動作を前提としているため、近年普及しつつある、組み込みLinux等のようなダイナミックリンク機能を持ったOS上におけるモジュール単位でのソフトウエア書換えの実現方式については説明されていない。また、従来のソフトウエア更新方法をダイナミックリンク機能をもったOSに適用するのは困難であった。   However, since the above conventional software update method is premised on operation on a real-time OS (operating system), a module on an OS having a dynamic link function such as embedded Linux, which has been spreading in recent years. A method for realizing software rewriting in units is not described. Further, it has been difficult to apply the conventional software update method to an OS having a dynamic link function.

また、上記のような組み込みLinux等のようなダイナミックリンク機能を持ったOS上でのソフトウエア書換え方式において、モジュール化を利用したフォールトトレランス性の確保方式も明確に示されていないため、フォールトトレランス性を確保する必要がある。
特開2002−94639号公報 清原良三、栗原まり子、高橋清、橘高大造、「携帯電話のSW更新に関する検討」、情報処理学会・モバイルコンピューティングとワイヤレス通信研究会報告(22−13)、2002年10月18日、pp.93−100
In addition, in the software rewriting method on the OS having a dynamic link function such as the above-described embedded Linux, the fault tolerance ensuring method using modularization is not clearly shown. It is necessary to ensure sex.
JP 2002-94639 A Ryozo Kiyohara, Mariko Kurihara, Kiyoshi Takahashi, Daizo Tachibana, “Examination on SW update of mobile phone”, Information Processing Society of Japan, Mobile Computing and Wireless Communication Study Group Report (22-13), October 18, 2002, pp. 199 93-100

本発明は、上記従来の事情に鑑みてなされたものであって、ダイナミックリンク機能を持ったOS上において、モジュール単位でのソフトウエア更新が可能なシステムおよび方法を提供することを第1の目的とする。さらに、ダイナミックリンク機能を持ったOS上でのソフトウエア書換え方式において、フォールトトレランス性の確保された、モジュール単位でのソフトウエア更新が可能なシステムおよび方法を提供することを第2の目的とする。   The present invention has been made in view of the above-described conventional circumstances, and it is a first object of the present invention to provide a system and method capable of updating software in module units on an OS having a dynamic link function. And It is a second object of the present invention to provide a system and method capable of updating software on a module-by-module basis in a software rewriting system on an OS having a dynamic link function and ensuring fault tolerance. .

本発明の端末装置は、ソフトウエア更新システムにおける端末装置であって、
各々が1つ以上のプログラムファイルを含む、共有ライブラリ化されたモジュールおよび前記共有ライブラリにリンクされたメインプログラムに分割されたソフトウエアを記憶する記憶手段と、
更新すべきモジュール及びメインプログラムを含む更新データを受信するための通信手段と、
前記通信手段で受信した前記更新データを前記記憶手段に書込む書込み手段と、
前記記憶手段に記憶された前記モジュールおよび前記メインプログラムをダイナミックリンクするダイナミックリンク手段と、
前記ダイナミックリンクされたプログラムを実行する実行手段と、
を備えた構成を有している。
The terminal device of the present invention is a terminal device in a software update system,
Storage means for storing a shared library module and software divided into a main program linked to the shared library, each including one or more program files;
Communication means for receiving update data including a module to be updated and a main program;
Writing means for writing the update data received by the communication means into the storage means;
Dynamic link means for dynamically linking the module and the main program stored in the storage means;
Execution means for executing the dynamically linked program;
It has the composition provided with.

この構成により、ダイナミックリンク機能を持ったOS上において、モジュール単位でのソフトウエア更新を可能とすることができる。   With this configuration, it is possible to update software in units of modules on an OS having a dynamic link function.

また、本発明の端末装置は、
前記記憶手段に、前記モジュールおよび前記メインプログラムを複数に分割された記憶領域に記憶する分割記憶領域が設けられ、
前記書込み手段は、前記通信手段が受信した前記更新データを対応する分割記憶領域中の更新前データから書換えるものであり、
前記端末装置は、
前記更新データに対応する前記更新前データをバックアップするバックアップ手段と、
前記書込み手段の書込み中の障害を検出する検出手段と、
前記検出手段によって検出された障害情報を記憶する障害記憶手段と、
前記端末装置を再起動する再起動手段と、
前記再起動手段による再起動後に、再起動前の前記更新データの分割記憶領域への書込み中に障害が発生したか否かを前記障害情報により判定する障害検出判定手段と、
前記障害検出判定手段によって障害があったと判定された場合に、前記バックアップされた更新前データを元の分割記憶領域に書き戻す復元手段と、
各々の前記分割記憶領域をパーティションとして前記端末装置で用いられるファイルシステムにマウントするパーティションマウント手段と、
を更に備え、
前記ダイナミックリンク手段は、前記ファイルシステムにマウントされた前記分割記憶領域に記憶された前記モジュールおよび前記メインプログラムをダイナミックリンクする構成を有している。
The terminal device of the present invention is
The storage means is provided with a divided storage area for storing the module and the main program in a divided storage area,
The writing means rewrites the update data received by the communication means from the pre-update data in the corresponding divided storage area,
The terminal device
Backup means for backing up the pre-update data corresponding to the update data;
Detecting means for detecting a failure during writing of the writing means;
Fault storage means for storing fault information detected by the detection means;
Restarting means for restarting the terminal device;
A failure detection determination means for determining whether or not a failure has occurred during writing to the divided storage area of the update data before restart after restart by the restart means; and
When it is determined that there is a failure by the failure detection determination unit, a restoration unit that writes the backed up pre-update data back to the original divided storage area;
Partition mounting means for mounting each of the divided storage areas as a partition on a file system used in the terminal device;
Further comprising
The dynamic link means has a configuration for dynamically linking the module and the main program stored in the divided storage area mounted on the file system.

この構成により、ダイナミックリンク機能を持ったOS上における、モジュール単位でのソフトウエア更新時に、フォールトトレランス性を確保することができる。   With this configuration, fault tolerance can be ensured when updating software in units of modules on an OS having a dynamic link function.

さらに、本発明の端末装置は、
前記記憶手段に、前記モジュールおよび前記メインプログラムを複数に分割された記憶領域に記憶する分割記憶領域が設けられ、
前記書込み手段は、前記更新データを分割記憶領域に書込むものであり、
前記端末装置は、
前記更新データを、前記書込み手段が書込むべき前記分割記憶領域を指定する書込み先指定手段と、
前記書込み手段の書込み中の障害を検出する検出手段と、
前記検出手段によって検出された障害情報を記憶する障害記憶手段と、
前記端末装置を再起動する再起動手段と、
前記再起動手段による再起動後に、再起動前の前記更新データの分割記憶領域への書込み中に障害が発生したか否かを前記障害記憶手段中の情報より判定する障害検出判定手段と、
前記障害検出判定手段で判定された障害発生の有無により、前記分割記憶領域のマウント方法を制御するパーティションマウント制御手段と、
前記パーティションマウント制御手段の指示に従い、前記分割記憶領域をパーティションとして前記端末装置に用いられるファイルシステムにマウントするパーティションマウント手段と、
を更に備え、
前記パーティションマウント制御手段は、障害が生じていない場合は前記更新データが書込まれた分割領域を、障害が生じている場合は書込み以前にモジュールが存在した分割記憶領域をパーティションとして前記ファイルシステムにマウントするように前記パーティションマウント手段に指示を行い、
前記ダイナミックリンク手段は、前記ファイルシステムにマウントされた前記分割記憶領域に記憶された前記モジュールおよび前記メインプログラムをダイナミックリンクする構成を有している。
Furthermore, the terminal device of the present invention
The storage means is provided with a divided storage area for storing the module and the main program in a divided storage area,
The writing means writes the update data into a divided storage area;
The terminal device
A write destination designating unit for designating the divided storage area to which the write unit should write the update data;
Detecting means for detecting a failure during writing of the writing means;
Fault storage means for storing fault information detected by the detection means;
Restarting means for restarting the terminal device;
A failure detection determination unit that determines whether or not a failure has occurred during writing to the divided storage area of the update data before the restart after the restart by the restart unit, from the information in the fault storage unit;
Partition mount control means for controlling the mounting method of the divided storage area according to the presence or absence of occurrence of a failure determined by the failure detection determination means;
In accordance with an instruction from the partition mount control means, partition mount means for mounting the divided storage area as a partition on a file system used in the terminal device;
Further comprising
The partition mount control means uses the divided area in which the update data is written if no failure has occurred, and the divided storage area in which the module existed before the writing as a partition in the file system if a failure has occurred. Instruct the partition mounting means to mount,
The dynamic link means has a configuration for dynamically linking the module and the main program stored in the divided storage area mounted on the file system.

この構成により、ダイナミックリンク機能を持ったOS上における、モジュール単位でのソフトウエア更新時に、フォールトトレランス性を確保することができる。さらに、データ書込み回数削減により書込み時間を削減し、かつ記憶手段の書込み回数削減による記憶手段の長寿命化を図ることができる。   With this configuration, fault tolerance can be ensured when updating software in units of modules on an OS having a dynamic link function. Furthermore, it is possible to reduce the writing time by reducing the number of times of data writing and to extend the life of the storage means by reducing the number of times of writing of the storage means.

本発明のサーバは、ソフトウエア更新システムにおけるサーバであって、
ソフトウエアを、各々が1つ以上のプログラムファイルからなるモジュールおよびメインプログラムに分割するファイル単位分割手段と、
前記ファイル単位分割手段で分割された前記モジュールおよび前記メインプログラムを含むデータを記憶する記憶手段と、
前記記憶手段に記憶された前記データに変更を加えるモジュール変更手段と、
前記記憶手段に記憶されたメインプログラムをコンパイルし、共有ライブラリを利用する形態でのリンクを行うメインプログラムコンパイル手段と、
前記記憶手段に記憶されたモジュールをコンパイルするとともに共有ライブラリ化するモジュールコンパイル手段と、
通信回線を介して前記モジュールおよび前記メインプログラムを送信するための通信手段と、
を備えた構成を有している。
The server of the present invention is a server in a software update system,
File unit dividing means for dividing the software into modules and main programs each consisting of one or more program files;
Storage means for storing data including the module and the main program divided by the file unit dividing means;
Module changing means for changing the data stored in the storage means;
A main program compiling means for compiling the main program stored in the storage means and linking in a form using a shared library;
Module compiling means for compiling the module stored in the storage means and making it a shared library;
A communication means for transmitting the module and the main program via a communication line;
It has the composition provided with.

この構成により、ダイナミックリンク機能を持ったOSを搭載した端末装置に対して、モジュール単位でのソフトウエア更新を可能とすることができる。   With this configuration, it is possible to update software on a module basis for a terminal device equipped with an OS having a dynamic link function.

また、本発明は、前記端末装置と、前記サーバとを備えたソフトウエア更新システムを提供するものである。   Moreover, this invention provides the software update system provided with the said terminal device and the said server.

この構成により、ダイナミックリンク機能を持ったOS上において、モジュール単位でのソフトウエア更新を可能とすることができる。   With this configuration, it is possible to update software in units of modules on an OS having a dynamic link function.

本発明のソフトウエア更新方法は、ソフトウエア更新可能な端末装置におけるソフトウエア更新方法であって、
各々が1つ以上のプログラムファイルを含む、共有ライブラリ化されたモジュールおよび前記共有ライブラリにリンクされたメインプログラムに分割されたソフトウエアを記憶するステップと、
更新すべきモジュールおよびメインプログラムを含む更新データを受信するステップと、
前記通信手段で受信した前記更新データを前記記憶手段に書込むステップと、
前記記憶手段に記憶された前記モジュールおよび前記メインプログラムをダイナミックリンクするダイナミックリンクステップと、
前記ダイナミックリンクされたプログラムを実行するステップと、
を備えた。
The software update method of the present invention is a software update method in a terminal device capable of software update,
Storing the software divided into a shared library module and a main program linked to the shared library, each including one or more program files;
Receiving update data including a module to be updated and a main program;
Writing the update data received by the communication means into the storage means;
A dynamic link step for dynamically linking the module and the main program stored in the storage unit;
Executing the dynamically linked program;
Equipped with.

この構成により、ダイナミックリンク機能を持ったOS上において、モジュール単位でのソフトウエア更新を可能とすることができる。   With this configuration, it is possible to update software in units of modules on an OS having a dynamic link function.

また、本発明のソフトウエア更新方法は、
前記ソフトウエアを記憶手段に記憶するステップは、前記記憶手段に設けられた複数の分割記憶領域に前記モジュールおよび前記メインプログラムを記憶するものであり、
前記モジュールを書込むステップは、前記通信手段が受信した前記更新データを対応する分割記憶領域中の更新前データから書換えるものであり、
前記ソフトウエア更新方法は、
前記更新前データをバックアップするステップと、
前記書込み中の障害を検出するステップと、
前記検出手段によって検出された障害情報を記憶するステップと、
前記端末装置を再起動するステップと、
前記再起動手段による再起動後に、再起動前の更新データの分割記憶領域への書込み中に障害が発生したか否かを前記障害情報より判定する障害検出判定手段と、
前記障害検出判定手段によって障害があったと判定された場合に、前記バックアップされた更新前データを元の分割記憶領域に書き戻すステップと、
各々の前記分割記憶領域をパーティションとして前記端末装置に用いられるファイルシステムにマウントするステップと、
を更に備え、
前記ダイナミックリンクするステップは、前記ファイルシステムにマウントされた前記分割記憶領域に記憶された前記モジュールおよび前記メインプログラムをダイナミックリンクするものである。
The software update method of the present invention includes:
The step of storing the software in the storage means stores the module and the main program in a plurality of divided storage areas provided in the storage means,
The step of writing the module is to rewrite the update data received by the communication means from the pre-update data in the corresponding divided storage area,
The software update method is:
Backing up the pre-update data;
Detecting a failure during the writing;
Storing fault information detected by the detecting means;
Restarting the terminal device;
A failure detection determination means for determining from the failure information whether or not a failure has occurred during writing to the divided storage area of the update data before the restart after the restart by the restart means;
When it is determined that there is a failure by the failure detection determination means, the step of rewriting the backed up pre-update data to the original divided storage area;
Mounting each of the divided storage areas as a partition on a file system used in the terminal device;
Further comprising
The step of dynamically linking dynamically links the module and the main program stored in the divided storage area mounted on the file system.

この構成により、ダイナミックリンク機能を持ったOS上における、モジュール単位でのソフトウエア更新時に、フォールトトレランス性を確保することができる。   With this configuration, fault tolerance can be ensured when updating software in units of modules on an OS having a dynamic link function.

さらに、本発明のソフトウエア更新方法は、
前記ソフトウエアを記憶手段に記憶するステップは、前記記憶手段に設けられた複数の分割記憶領域に前記モジュールおよび前記メインプログラムを記憶するものであり、
前記更新データを書込むステップは、前記通信手段が受信した前記更新データを前記分割記憶領域に書込むものであり、
前記ソフトウエア更新方法は、
前記更新データを書込むべき前記分割記憶領域を指定するステップと、
前記更新データの書込み中の障害を検出するステップと、
前記検出手段によって検出された障害情報を記憶するステップと、
前記端末装置を再起動するステップと、
前記再起動手段による再起動後に、再起動前の前記更新データの分割記憶領域への書込み中に障害が発生したか否かを前記障害情報より判定するステップと、
前記障害検出判定手段で判定された障害発生の有無により、障害が生じていない場合は前記更新データが書込まれた分割領域を、障害が生じている場合は書込み以前にモジュールが存在した分割記憶領域をパーティションとして前記ファイルシステムにマウントするように指示を行うステップと、
前記指示に従い、前記分割記憶領域をパーティションとしてファイルシステムにマウントするステップと、
を更に備え、
前記ダイナミックリンクするステップは、前記ファイルシステムにマウントされた前記分割記憶領域に記憶された前記モジュールおよび前記メインプログラムをダイナミックリンクするものである。
Furthermore, the software update method of the present invention includes:
The step of storing the software in the storage means stores the module and the main program in a plurality of divided storage areas provided in the storage means,
The step of writing the update data is to write the update data received by the communication means to the divided storage area,
The software update method is:
Designating the divided storage area in which the update data is to be written;
Detecting a failure during writing of the update data;
Storing fault information detected by the detecting means;
Restarting the terminal device;
Determining from the failure information whether a failure has occurred during the writing of the update data before restarting into the divided storage area after restarting by the restarting means;
Depending on the presence or absence of a failure determined by the failure detection determination means, if no failure has occurred, the divided area where the update data has been written is stored, and if a failure has occurred, the divided storage in which the module existed before writing Directing the area to be mounted on the file system as a partition;
In accordance with the instructions, mounting the divided storage area as a partition on a file system;
Further comprising
The step of dynamically linking dynamically links the module and the main program stored in the divided storage area mounted on the file system.

ダイナミックリンク機能を持ったOS上における、モジュール単位でのソフトウエア更新時に、フォールトトレランス性を確保することができる。さらに、データ書込み回数削減により書込み時間を削減し、かつ記憶手段の書込み回数削減による記憶手段の長寿命化を図ることができる。   Fault tolerance can be ensured when updating software in units of modules on an OS having a dynamic link function. Furthermore, it is possible to reduce the writing time by reducing the number of times of data writing and to extend the life of the storage means by reducing the number of times of writing of the storage means.

また、本発明のソフトウエア更新方法は、端末装置のソフトウエアを更新可能なサーバにおけるソフトウエア更新方法であって、
ソフトウエアを、各々が1つ以上のソースプログラムファイルからなるモジュールおよびメインプログラムに分割するステップと、
前記ファイル単位分割手段で分割された前記モジュールおよび前記メインプログラムを記憶するステップと、
前記記憶手段に記憶された前記データに変更を加えるステップと、
前記記憶手段に記憶されたメインプログラムをコンパイルし、共有ライブラリを利用する形態でのリンクを行うステップと、
前記記憶手段に記憶されたモジュールをコンパイルおよび共有ライブラリ化するステップと、
通信回線を介してモジュールおよびメインプログラムを前記端末装置へ送信するステップと、
を備えた。
The software update method of the present invention is a software update method in a server capable of updating the software of the terminal device,
Dividing the software into modules and main programs each consisting of one or more source program files;
Storing the module and the main program divided by the file unit dividing means;
Modifying the data stored in the storage means;
Compiling the main program stored in the storage means and linking in a form using a shared library;
Compiling and storing a module stored in the storage means into a shared library;
Transmitting the module and the main program to the terminal device via a communication line;
Equipped with.

この構成により、ダイナミックリンク機能を持ったOSを搭載した端末装置に対して、モジュール単位でのソフトウエア更新を可能とすることができる。   With this configuration, it is possible to update software on a module basis for a terminal device equipped with an OS having a dynamic link function.

さらに、本発明は、コンピュータに、前記ソフトウエア更新方法の各ステップを実行させるためのソフトウエア更新プログラムを提供するものである。   Furthermore, the present invention provides a software update program for causing a computer to execute each step of the software update method.

このプログラムにより、ダイナミックリンク機能を持ったOSを搭載した端末装置に対して、モジュール単位でのソフトウエア更新を可能とすることができる。   With this program, it is possible to update software in units of modules for a terminal device equipped with an OS having a dynamic link function.

本発明によれば、ダイナミックリンク機能を持ったOS上において、モジュール単位でのソフトウエア更新が可能なシステムおよび方法を簡易に提供することができる。   According to the present invention, it is possible to easily provide a system and method capable of updating software in module units on an OS having a dynamic link function.

(第1の実施形態)
図1は、本発明の第1の実施形態を説明するためのソフトウエア更新システムを示す概略構成図である。図1に示すように、第1の実施形態のソフトウエア更新システムは、サーバ1と、サーバ1から通信回線2を介してデータを受信する端末装置3とを備える。端末装置3としては、たとえば、OSとしてLinuxが組込まれ、C言語で記述されたアプリケーションプログラムを実行可能な組込み機器等である。ただし、本発明はこれに限られるものでなく、OSやプログラム言語は他のものでも構わない。
(First embodiment)
FIG. 1 is a schematic configuration diagram showing a software update system for explaining a first embodiment of the present invention. As shown in FIG. 1, the software update system according to the first embodiment includes a server 1 and a terminal device 3 that receives data from the server 1 via a communication line 2. The terminal device 3 is, for example, an embedded device in which Linux is embedded as an OS and can execute an application program described in C language. However, the present invention is not limited to this, and other OS and program language may be used.

サーバ1は、既存のアプリケーションプログラム(以下、アプリ)101をソースコードのファイル単位で分割するファイル単位分割手段11と、ファイル単位分割手段11でアプリ101が分割されてできたモジュール102およびメインプログラム103を記憶する記憶手段12と、記憶手段12に記憶されているモジュール102を変更するモジュール変更手段13と、記憶手段12に記憶されているモジュール102をコンパイルするとともに共有ライブラリ化するコンパイル・共有ライブラリ化手段14と、記憶手段12に記憶されているメインプログラム103を共有ライブラリを利用して実行するようにコンパイルするメインプログラムコンパイル・共有ライブラリリンク手段15と、コンパイル・共有ライブラリ化手段14によってコンパイル・共有ライブラリ化されたモジュール104およびメインプログラムコンパイル・共有ライブラリリンク手段15によってコンパイルされたメインプログラム105を記憶する記憶手段16と、記憶手段16に記憶されているモジュール104およびメインプログラム105を通信回線2を介して端末装置3に送信する通信手段17と、サーバ1の動作を制御する動作制御手段18とを備える。動作制御手段18は、所定のプログラムによって動作するプロセッサを主体に構成される。   The server 1 includes a file unit dividing unit 11 that divides an existing application program (hereinafter referred to as an application) 101 in units of source code files, a module 102 that is obtained by dividing the application 101 by the file unit dividing unit 11, and a main program 103. Storage means 12 for storing the module, module changing means 13 for changing the module 102 stored in the storage means 12, and compiling / sharing of the module 102 stored in the storage means 12 into a shared library Means 14, main program compilation / shared library linking means 15 for compiling the main program 103 stored in the storage means 12 to be executed using a shared library, and compilation / shared library means 14 Accordingly, the storage unit 16 that stores the compiled module 104 and the main program 105 that is compiled by the main program compilation / shared library link unit 15, and the module 104 and the main program 105 that are stored in the storage unit 16 are stored. The communication means 17 which transmits to the terminal device 3 via the communication line 2, and the operation control means 18 which controls operation | movement of the server 1 are provided. The operation control means 18 is mainly composed of a processor that operates according to a predetermined program.

端末装置3は、サーバ1から通信回線2を通じて送られてきたモジュール、あるいはメインプログラムを受信する通信手段31と、受信したモジュールおよびメインプログラムを記憶手段33に書込む書込み手段32と、書込み手段32によって書込まれたモジュール106およびメインプログラム107を記憶する記憶手段33と、モジュール106とメインプログラム107をダイナミックリンクするダイナミックリンク手段34と、ダイナミックリンクされたソフトウエアを実行する実行手段35と、端末装置3の動作を制御する動作制御手段36とを備える。動作制御手段36は、所定のプログラムによって動作するプロセッサを主体に構成される。   The terminal device 3 includes a communication unit 31 that receives a module or a main program sent from the server 1 through the communication line 2, a writing unit 32 that writes the received module and main program to the storage unit 33, and a writing unit 32. Storage means 33 for storing the module 106 and the main program 107 written by the above, a dynamic link means 34 for dynamically linking the module 106 and the main program 107, an execution means 35 for executing the dynamically linked software, and a terminal And an operation control means 36 for controlling the operation of the apparatus 3. The operation control means 36 is mainly composed of a processor that operates according to a predetermined program.

以上のように構成されたソフトウエア更新装置について、以下その動作を説明する。なお、下記の説明の中ではすべての動作が、サーバ1では動作制御手段18からの、端末装置3では動作制御手段36からの各手段に対して出した指令に従って実行されるため、動作制御手段18または36からの指示であることは省略している。   The operation of the software updating apparatus configured as described above will be described below. In the following description, since all operations are executed in accordance with commands issued from the operation control means 18 in the server 1 and from the operation control means 36 in the terminal device 3, the operation control means. Instructions from 18 or 36 are omitted.

まず、アプリ101全体を転送する際の動作について図2を参照しながら説明する。図2は、本発明の第1の実施形態に係るソフトウエア更新システムにおけるアプリ転送の動作説明のためのフロー図である。このアプリ101全体を転送する際の動作について、図1では、実線の矢印で示している。   First, an operation when transferring the entire application 101 will be described with reference to FIG. FIG. 2 is a flowchart for explaining the operation of application transfer in the software update system according to the first embodiment of the present invention. The operation when transferring the entire application 101 is indicated by solid arrows in FIG.

まず、ファイル単位分割手段13はアプリ101のソースコードを複数のモジュール102a、102b、102c、およびメインプログラム103に分割する(ステップ201)。なお、本実施形態では、アプリ101を3つのモジュールに分割する場合を例にとって説明するが、複数のモジュールに分割するのであれば、その数は限られるものではない。   First, the file unit dividing means 13 divides the source code of the application 101 into a plurality of modules 102a, 102b, 102c and the main program 103 (step 201). In the present embodiment, the case where the application 101 is divided into three modules will be described as an example. However, the number is not limited as long as the application 101 is divided into a plurality of modules.

また、アプリ101をどのように分割するかは、システムへの要求に応じて自由に行うことができる。例えば、各モジュールが均等な大きさになるように分割する、モジュール間の依存関係が極力すくなくなるように分割する、などの分割方法を本システムのユーザが選んでもよいし、それらの基準を自動的に評価するプログラムを用いて、自動的にモジュール分割してもよい。また、メインプログラム103は、たとえば、C言語の場合は、mainという名前の関数が含まれたモジュールが該当する。このメインプログラムもユーザが選んでもよいし、プログラム等で自動的に判別してもよい。   Moreover, how to divide the application 101 can be freely performed according to a request to the system. For example, the user of this system may select a division method such as dividing each module so as to have an equal size, or dividing so that the dependency relationship between modules is minimized, and automatically selects those standards. The program may be automatically divided into modules using an evaluation program. For example, in the case of C language, the main program 103 corresponds to a module including a function named main. This main program may also be selected by the user, or may be automatically determined by a program or the like.

次に、コンパイル・共有ライブラリ化手段14は、各モジュール102a、102b、102cをコンパイルするとともに共有ライブラリ化し、それぞれ対応するモジュール104a、104b、104cを生成する(ステップ202)。ここで、モジュール102aを一つのファイルからなるとし、そのファイル名をfile-102a.cとした時、現在広く用いられているOSであるLinux、およびLinux上で広く用いられているコンパイラであるgcc(GNU Compiler Collection)を用いた場合、例えば下記のコマンドを実行することによってコンパイル、および共有ライブラリ化を行うことができる。
gcc -O -g -c -fPIC -o sub.o file-102a.c
gcc -shared -Wl,-soname,libsubs.so.1 -o libsubs.so.1 sub.o
Next, the compiling / shared library creating means 14 compiles the modules 102a, 102b, and 102c into a shared library, and generates corresponding modules 104a, 104b, and 104c, respectively (step 202). Here, assuming that the module 102a consists of a single file and the file name is file-102a.c, Linux, which is currently used widely, and gcc, which is a compiler widely used on Linux, are used. When (GNU Compiler Collection) is used, for example, the following command can be executed to compile and create a shared library.
gcc -O -g -c -fPIC -o sub.o file-102a.c
gcc -shared -Wl, -soname, libsubs.so.1 -o libsubs.so.1 sub.o

ここで、上記コマンドを実行した際に生成されるファイルlibsubs.so.1が、共有ライブラリ化されたモジュールである。上の例では、モジュール102が一つのファイルから構成される場合について説明したが、C言語プログラム等のファイルが多数ある場合は1行目のコマンドを各ファイルに対して実行し、2行目のコマンドの最後にそのファイル名群を追加すればよい。   Here, the file libsubs.so.1 generated when the above command is executed is a module made into a shared library. In the above example, the case where the module 102 is composed of one file has been described. However, when there are a large number of files such as C language programs, the command on the first line is executed for each file, and the second line Just add the file names to the end of the command.

次にメインプログラムコンパイル・共有ライブラリリンク手段15はメインプログラム103を、共有ライブラリを用いるものとしてコンパイルし、メインプログラム105を生成する(ステップ203)。ここで、メインプログラム103を一つのファイルからなるとし、そのファイル名をmain.cとした時、Linuxおよびgccを用いた場合、下記のコマンドを実行することによってコンパイルを行うことができる。
gcc -c -o main.o main.c
gcc -o main main.o libsubs.so.1 -ldl
Next, the main program compile / shared library link means 15 compiles the main program 103 using a shared library, and generates the main program 105 (step 203). Here, assuming that the main program 103 consists of one file and the file name is main.c, when using Linux and gcc, compilation can be performed by executing the following command.
gcc -c -o main.o main.c
gcc -o main main.o libsubs.so.1 -ldl

上記コマンドを実行した際に生成されるファイルmainが、共有ライブラリを用いるものとしてコンパイルされたメインプログラムである。また、モジュール102と同様、メインプログラム103は複数のファイルを含んでいても良い。   A file main generated when the above command is executed is a main program compiled using a shared library. Further, like the module 102, the main program 103 may include a plurality of files.

次に通信手段17は、コンパイルおよび共有ライブラリ化されたモジュール104a、104b、104cと、コンパイルされたメインプログラム105を通信回線2を介して端末装置3に向けて送信する(ステップ204)。   Next, the communication unit 17 transmits the compiled and shared library modules 104a, 104b, 104c and the compiled main program 105 to the terminal device 3 via the communication line 2 (step 204).

端末装置3に設けられた通信手段31はサーバ1から送信されて来たデータを受信し、書込み手段31は受信したデータを記憶手段32の中に格納する(ステップ205)。次に、ダイナミックリンク手段は34がモジュール106a、106b、106cとメインプログラム107をダイナミックリンクする(ステップ206)。実行手段35はダイナミックリンクされたプログラムを実行する(ステップ118)。このようにして、サーバ1から端末装置3へのアプリ100の転送が完了する。   The communication means 31 provided in the terminal device 3 receives the data transmitted from the server 1, and the writing means 31 stores the received data in the storage means 32 (step 205). Next, the dynamic link means 34 dynamically links the modules 106a, 106b, 106c and the main program 107 (step 206). The execution means 35 executes the dynamically linked program (step 118). In this way, the transfer of the application 100 from the server 1 to the terminal device 3 is completed.

次に、1つのモジュールのみが変更された場合の更新方法について、図3を参照しながら説明する。図3は、本発明の第1の実施形態に係るソフトウエア更新システムにおける更新方法の動作説明のためのフロー図である。ここでは、モジュール102bを、モジュール102b(ver1)からモジュール102b(ver2)へ更新する場合を例にとって説明する。なお、ver1は1つ目のバージョン、ver2は2つ目のバージョンであることを示す。また、メインプログラムを更新する場合や、複数のモジュールやメインプログラムを同時に更新する場合においても、同様である。なお、このモジュール102bを更新する際の動作について、図1では、破線の矢印で示している。   Next, an update method when only one module is changed will be described with reference to FIG. FIG. 3 is a flowchart for explaining the operation of the update method in the software update system according to the first embodiment of the present invention. Here, a case where the module 102b is updated from the module 102b (ver1) to the module 102b (ver2) will be described as an example. Note that ver1 indicates the first version and ver2 indicates the second version. The same applies to the case of updating the main program or the case of simultaneously updating a plurality of modules and the main program. In addition, the operation | movement at the time of updating this module 102b is shown with the arrow of the broken line in FIG.

まず、開発者がモジュール変更手段13を用いて、記憶手段12に記憶されているモジュール102bを、ver1からver2へ変更する(ステップ301)。このとき、モジュール102bへの変更は内部の処理のみの変更とし、外部に影響のあるデータやインタフェースには変更がないものとする。また、モジュール変更手段13は開発者が汎用のエディタなどを使って行ってもよいし、変更のための専用ツールを用いてもよい。   First, the developer uses the module changing means 13 to change the module 102b stored in the storage means 12 from ver1 to ver2 (step 301). At this time, it is assumed that the change to the module 102b is a change of only the internal processing, and there is no change in the data or interface that affects the outside. The module changing means 13 may be performed by a developer using a general-purpose editor or the like, or a dedicated tool for changing may be used.

次にコンパイル・共有ライブラリ化手段14はモジュール102b(ver2)をコンパイルし共有ライブラリ化する(ステップ302)。このステップの実行方法は図2におけるステップ202と同等である。次に通信手段112はコンパイル・共有ライブラリ化されたモジュール104b(ver2)を端末装置3に向けて通信回線2を介して送信する(ステップ303)。   Next, the compiling / shared library creating means 14 compiles the module 102b (ver2) into a shared library (step 302). The execution method of this step is equivalent to step 202 in FIG. Next, the communication unit 112 transmits the compiled module 104b (ver2) to the terminal device 3 via the communication line 2 (step 303).

端末装置3に設けられた通信手段31はサーバ1から送信されてきたデータを受信し、書込み手段31は受信したデータを記憶手段32の中に格納する(ステップ304)。このとき、サーバ1から送信されて来たのはモジュール104b(ver2)のみであるので、記憶手段32に記憶されているモジュール106b(ver1)のみ、新しいバージョン(ver2)に更新する。次にダイナミックリンク手段117はモジュール106a、106b(ver2)、106cとメインプログラム107をダイナミックリンクする(ステップ305)。実行手段118はダイナミックリンクされたプログラムを実行する(ステップ306)。   The communication unit 31 provided in the terminal device 3 receives the data transmitted from the server 1, and the writing unit 31 stores the received data in the storage unit 32 (step 304). At this time, since only the module 104b (ver 2) has been transmitted from the server 1, only the module 106b (ver 1) stored in the storage means 32 is updated to the new version (ver 2). Next, the dynamic link means 117 dynamically links the modules 106a, 106b (ver2), 106c and the main program 107 (step 305). The execution means 118 executes the dynamically linked program (step 306).

このような本発明の第1の実施形態のソフトウエア更新システムによれば、ファイル単位での分割を行うファイル単位分割手段とモジュールを共有ライブラリに変換するコンパイル・共有ライブラリ化手段と、メインプログラムを共有ライブラリを使用するものとしてコンパイルするメインプログラムコンパイル・共有ライブラリリンク手段とを設けることにより、既存のアプリをジャンプテーブルなどを作成することなくファイル単位で任意のモジュールおよびメインプログラムに分割でき、モジュール単位でのデータ転送を行なう通信手段と、ダイナミックリンク手段とを備えることにより、既存のアプリをモジュール単位で更新でき、また、ダイナミックリンク機能を備えたOSでのソフトウエアの更新を簡便に実現することができる。   According to the software update system of the first embodiment of the present invention, the file unit dividing means for dividing the file unit, the compiling / shared library means for converting the module into a shared library, and the main program By providing a main program compile / shared library link means for compiling as a shared library, existing applications can be divided into arbitrary modules and main programs in units of files without creating jump tables, etc. By providing communication means for performing data transfer and dynamic link means, existing applications can be updated in units of modules, and software update on an OS having a dynamic link function can be easily realized. Can

なお、本実施例では、モジュール分割するソフトウエアを既存アプリケーションとして説明したが、新規アプリケーション開発する際に利用することも可能である。既存アプリケーションを分割する際には、特別な操作が不要であることが利点として得られたが、新規アプリケーションを開発する際にも、モジュール分割されることを意識せずにアプリケーションを開発することが可能であるという利点を有する。また、モジュール分割を意識してアプリケーションを開発した際には、より効率的なモジュール分割が可能となり、ダイナミックリンクライブラリからの呼出し時間の短縮等、実行性能の向上などの利点が得られることは言うまでもない。   In this embodiment, the software for module division has been described as an existing application, but it can also be used when developing a new application. When dividing an existing application, it was obtained as an advantage that no special operation was required. However, when developing a new application, it is possible to develop an application without being aware of the division into modules. It has the advantage of being possible. In addition, when developing an application in consideration of module division, it is possible to achieve more efficient module division, and it is possible to obtain advantages such as improved execution performance, such as shortening the call time from the dynamic link library. Yes.

(第2の実施形態)
図4は、本発明の第2の実施形態を説明するためのソフトウエア更新システムを示す概略構成図である。同図において、第1の実施形態で説明した図1と重複する部分には同一の符号を付す。
(Second Embodiment)
FIG. 4 is a schematic configuration diagram showing a software update system for explaining the second embodiment of the present invention. In the figure, the same reference numerals are given to the portions overlapping those in FIG. 1 described in the first embodiment.

図4に示すように、第2の実施形態に係る端末装置4では、記憶手段33において、モジュール106a、106b、106cおよびメインプログラム107を、Linuxにおける異なったパーティション上にそれぞれ格納する分割記憶領域40a、40b、40c、40dが設けられている。   As shown in FIG. 4, in the terminal device 4 according to the second embodiment, in the storage unit 33, the divided storage areas 40a for storing the modules 106a, 106b, 106c and the main program 107 on different partitions in Linux, respectively. , 40b, 40c, and 40d.

また、端末装置4は、受信したデータを対応する分割記憶領域40へ書込む書込み手段41と、書込み手段41がデータを書込む前にデータを退避させるバックアップ手段42と、バックアップ手段42から送られたデータを記憶するバックアップ記憶手段43と、バックアップ記憶手段43が記憶していたデータを元の分割記憶領域に書き戻す復元手段44と、書込み手段41の書込み動作中に書込みが失敗したか否かを判定する障害検出判定手段45と、書込み手段41の動作終了後、あるいは障害検出判定手段45によって障害が検出された時点で起動され、端末装置4を再起動する再起動手段46と、障害検出判定手段45によって障害が検出されなかった場合に分割記憶領域40a、40b、40c、40dをそれぞれパーティションとし、ファイルシステム中にマウントするパーティションマウント手段47と、端末装置4全体の動作を制御する動作制御手段48と、書込み手段41の動作中に障害が発生したか否かを検出する障害検出手段49と、障害検出手段49によって障害が検出されたか否かを記憶する障害記憶手段50とを備える。ここで、動作制御手段48は、所定のプログラムによって動作するプロセッサを主体に構成される。   Further, the terminal device 4 is sent from the writing means 41 for writing the received data to the corresponding divided storage area 40, the backup means 42 for saving the data before the writing means 41 writes the data, and the backup means 42. Backup storage means 43 for storing the stored data, restoration means 44 for writing back the data stored in the backup storage means 43 to the original divided storage area, and whether or not writing failed during the writing operation of the writing means 41 A failure detection determination unit 45 that restarts the terminal device 4 after the operation of the writing unit 41 ends or when a failure is detected by the failure detection determination unit 45, and a failure detection If no failure is detected by the determination unit 45, the divided storage areas 40a, 40b, 40c, and 40d are assigned to the respective partitions. A partition mounting means 47 for mounting in the file system, an operation control means 48 for controlling the operation of the entire terminal device 4, and a failure detection means for detecting whether or not a failure has occurred during the operation of the writing means 41. 49 and a failure storage means 50 for storing whether or not a failure has been detected by the failure detection means 49. Here, the operation control means 48 is mainly composed of a processor that operates according to a predetermined program.

以上のように構成されたソフトウエア更新装置について、以下その動作を説明する。図5は、第2の実施形態に係るファイルシステムの構成を説明するための図である。   The operation of the software updating apparatus configured as described above will be described below. FIG. 5 is a diagram for explaining a configuration of a file system according to the second embodiment.

図5に示すように、分割記憶領域40a、40b、40c、40dは、それぞれ、独立したファイルシステムとして構成されている。ここで、これらの分割記憶領域は、例えば、組込み機器等に広く用いられるフラッシュROM等の整数個のブロック(セクター)から構成される。パーティションマウント手段47の動作により、分割記憶領域40a、40b、40c、40dはLinux上のアプリケーションから図5のようなディレクトリ構造として見える。   As shown in FIG. 5, the divided storage areas 40a, 40b, 40c, and 40d are each configured as an independent file system. Here, these divided storage areas are composed of, for example, an integer number of blocks (sectors) such as a flash ROM widely used in embedded devices and the like. Due to the operation of the partition mounting means 47, the divided storage areas 40a, 40b, 40c, and 40d appear as a directory structure as shown in FIG. 5 to the application on Linux.

つまり、分割記憶領域41dをルートファイルシステムとし、そのルートファイルシステム中の/fsys1, /fsys2, /fsys3というマウントポイントに、それぞれ分割記憶領域40a、40b、40cがマウントされる。ルートファイルシステム中のディレクトリ/には、メインプログラム107がファイルとして格納される。/fsys1, /fsys2, /fsys3には、それぞれ、モジュール106a、モジュール106b、モジュール106cが格納される。   That is, the divided storage area 41d is used as a root file system, and the divided storage areas 40a, 40b, and 40c are mounted at mount points / fsys1, / fsys2, and / fsys3 in the root file system, respectively. In the directory / in the root file system, the main program 107 is stored as a file. Modules 106a, 106b, and 106c are stored in / fsys1, / fsys2, and / fsys3, respectively.

本構成を用いることによって、各モジュールを更新するためには、各分割記憶領域の中のフラッシュROMのセクターを書き換えればよく、他の分割記憶領域中のモジュールは書き換える必要がない。各分割記憶領域は、フラッシュROMの1つのセクターからなる場合もあるし、合計数MBのサイズを持つ多数のフラッシュROMのセクターから構成される場合もある。前者の場合には、バックアップ記憶手段43の容量は1セクターを格納するだけの容量があればよく、メモリ容量への制限の厳しい組込み機器で用いる際には小容量のメモリの追加のみでフォールトトレランス性を実現することができる。後者の場合には、アプリを大きなモジュールに分割するだけでよく、モジュールの数が減少することによる実行効率向上や管理の煩雑さの減少を図ることができる。   In order to update each module by using this configuration, it is only necessary to rewrite the sector of the flash ROM in each divided storage area, and it is not necessary to rewrite modules in other divided storage areas. Each divided storage area may be composed of one sector of the flash ROM, or may be composed of a number of sectors of flash ROM having a total size of MB. In the former case, the capacity of the backup storage means 43 only needs to be large enough to store one sector, and when used in an embedded device with a strict limit on the memory capacity, fault tolerance can be achieved only by adding a small capacity memory. Can be realized. In the latter case, it is only necessary to divide the application into large modules, and it is possible to improve execution efficiency and reduce management complexity by reducing the number of modules.

図6は、第2の実施形態に係る端末装置におけるソフトウエア更新方法の動作説明のためのフロー図である。ここで、分割記憶領域40bに記憶されているモジュール106b(ver1)を、モジュール106b(ver2)に書換える場合を例にとって説明する。なお、サーバ10での動作は、図3におけるステップ301ないし303と同様である。   FIG. 6 is a flowchart for explaining the operation of the software updating method in the terminal device according to the second embodiment. Here, a case where the module 106b (ver1) stored in the divided storage area 40b is rewritten to the module 106b (ver2) will be described as an example. The operation in the server 10 is the same as steps 301 to 303 in FIG.

まず、動作制御手段48からの指示に従い、バックアップ手段42は分割記憶領域41bの中のモジュール106b(ver1)(ver1は1つめのバージョンであることを示す)をバックアップ記憶手段43中に記憶する(ステップ601)。次に書込み手段41はモジュール106b(ver2)(ver2は2つめのバージョンであることを示す)を分割記憶領域41bに書込む(ステップ602)。   First, in accordance with an instruction from the operation control means 48, the backup means 42 stores the module 106b (ver1) (ver1 indicates that it is the first version) in the divided storage area 41b in the backup storage means 43 ( Step 601). Next, the writing means 41 writes the module 106b (ver2) (ver2 indicates that it is the second version) into the divided storage area 41b (step 602).

次に、障害検出手段49はステップ702における書込みが正常に終了したか、障害が発生して異常終了したかを検出する(ステップ603)。もし、正常終了した場合は障害なしを障害記憶手段50に記憶させる(ステップ604)。もし、障害が発生して異常終了した場合は障害発生を障害記憶手段50に記憶させる(ステップ605)。   Next, the failure detection means 49 detects whether the writing in step 702 has been completed normally or whether a failure has occurred and ended abnormally (step 603). If the process ends normally, no failure is stored in the failure storage means 50 (step 604). If a failure occurs and terminates abnormally, the failure occurrence is stored in the failure storage means 50 (step 605).

次に、再起動手段46はソフトウエアまたは端末装置4を再起動する(ステップ606)。再起動後に、障害検出判定手段45は障害記憶手段50に障害発生が記憶されているか否かを判定する(ステップ607)。もし、障害発生が記憶されていれば、復元手段44はバックアップ記憶手段43に記憶されているモジュール106b(ver1)を分割記憶領域40bに書き戻し(ステップ611)、障害記憶手段50に障害なしを記憶させて、ステップ706に戻る(ステップ612)。   Next, the restarting means 46 restarts the software or the terminal device 4 (step 606). After the restart, the failure detection determination unit 45 determines whether or not a failure occurrence is stored in the failure storage unit 50 (step 607). If the occurrence of the failure is stored, the restoration unit 44 writes the module 106b (ver1) stored in the backup storage unit 43 back to the divided storage area 40b (step 611), and sets the failure storage unit 50 to have no failure. Then, the process returns to step 706 (step 612).

ステップ607において、もし障害なしが記憶されていれば、次にパーティションマウント手段47は分割記憶領域40a、40b、40c、40dのそれぞれのパーティションを図5に示したディレクトリに構成の通りにマウントする(ステップ608)。ダイナミックリンク手段34は全モジュール106a、106b、106cとメインプログラム107とをダイナミックリンクする(ステップ609)。次に実行手段35がダイナミックリンクしたソフトウエアを実行する(ステップ610)。   If no failure is stored in step 607, then the partition mounting means 47 mounts each partition of the divided storage areas 40a, 40b, 40c and 40d in the directory shown in FIG. Step 608). The dynamic link means 34 dynamically links all the modules 106a, 106b, 106c and the main program 107 (step 609). Next, the execution means 35 executes the dynamically linked software (step 610).

このような本発明の第2の実施形態のソフトウエア更新システムによれば、コンパイル・共有ライブラリ化手段と、メインプログラムコンパイル・共有ライブラリリンク手段と、分割記憶領域と、障害検出手段と、障害記憶手段と、バックアップ手段と、バックアップ記憶手段と、復元手段と、障害検出判定手段と、再起動手段と、パーティションマウント手段と、ダイナミックリンク手段とを備えることにより、モジュール単位でのソフトウエア更新を簡便にかつ小容量の記憶容量を用いて実現でき、またデータ書込み時の書込み障害が発生しても、動作を継続することができ、フォールトトレランス性を確保することができる。   According to such a software update system of the second embodiment of the present invention, the compiling / shared library unit, the main program compiling / shared library link unit, the divided storage area, the fault detecting unit, and the fault memory By means of means, backup means, backup storage means, restoration means, failure detection determination means, restart means, partition mount means, and dynamic link means, it is easy to update software in units of modules. In addition, it can be realized by using a small storage capacity, and even if a write failure occurs during data writing, the operation can be continued and fault tolerance can be ensured.

なお、本実施の形態では、サーバで生成されたモジュールをそのままサーバから端末装置へ送信する方式について説明したが、たとえば特開平8−255104号公報に示されるような旧バージョンと新バージョンの差分を抽出する技術を用い、サーバから端末装置へ送信されるデータ量を削減することも可能である。   In the present embodiment, the method of transmitting the module generated by the server as it is from the server to the terminal device has been described. However, for example, the difference between the old version and the new version as disclosed in JP-A-8-255104 is used. It is also possible to reduce the amount of data transmitted from the server to the terminal device using the extraction technique.

また、障害検出判定手段45により障害が判定された場合は、端末装置3の表示器やスピーカ(不図示)等を通じて使用者に通知したり、通信手段31に送信機能を持たせ、通信手段を介してサーバへ障害情報を通知してもよい。   In addition, when a failure is determined by the failure detection determination unit 45, the user is notified through a display unit, a speaker (not shown), or the like of the terminal device 3, or the communication unit 31 has a transmission function so that the communication unit is Fault information may be notified to the server via

(第3の実施形態)
図7は、本発明の第3の実施形態を説明するためのソフトウエア更新システムを示す概略構成図である。同図において、第1の実施形態で説明した図1と重複する部分には同一の符号を付す。
(Third embodiment)
FIG. 7 is a schematic configuration diagram showing a software update system for explaining the third embodiment of the present invention. In the figure, the same reference numerals are given to the portions overlapping those in FIG. 1 described in the first embodiment.

第3の実施形態に係る端末装置7は、記憶手段33において、モジュール106a、106b、106cおよびメインプログラム107を、Linuxにおける異なったパーティション上にそれぞれ格納する分割記憶領域70a、70b、70c、70d、70eが設けられている。   In the terminal device 7 according to the third embodiment, in the storage unit 33, the divided storage areas 70a, 70b, 70c, 70d, which store the modules 106a, 106b, 106c and the main program 107 on different partitions in Linux, respectively. 70e is provided.

また、端末装置7は、分割記憶領域通信手段31から受信したデータを、使用されていない分割記憶領域に書込み、その分割記憶領域、および受け取ったモジュールの旧バージョンが格納されていた分割記憶領域をパーティションマウント制御手段に伝える書込み手段71と、書込み手段71がデータを分割記憶領域に書込んでいる最中の書込み失敗の障害を検出する障害検出手段72と、障害検出手段72が検出した障害を記憶する障害記憶手段73と、ブート時に障害記憶手段73に障害発生が記憶されているか否かを判定する障害検出判定手段74と、書込み中の障害発生時、あるいは書込み正常終了時にソフトウエアまたは端末装置7を再起動する再起動手段75と、障害発生の有無により、分割記憶領域のマウント方法を制御するパーティションマウント制御手段76と、パーティションマウント制御手段76の指示に従い、パーティションのマウントを行うパーティションマウント手段77と、端末装置7全体の動作を制御する動作制御手段78と、通信手段31が受信したデータを書込む先を指定する書込み先指定手段79とを備える。ここで、動作制御手段78は、所定のプログラムによって動作するプロセッサを主体に構成される。   Further, the terminal device 7 writes the data received from the divided storage area communication means 31 to the unused divided storage area, and the divided storage area and the divided storage area in which the old version of the received module is stored. The writing means 71 for transmitting to the partition mount control means, the failure detecting means 72 for detecting the failure of the writing failure while the writing means 71 is writing the data to the divided storage area, and the failure detected by the failure detecting means 72 Fault storage means 73 for storing, fault detection determination means 74 for judging whether or not a fault occurrence is stored in the fault storage means 73 at the time of booting, software or terminal when a fault occurs during writing or when writing is normally completed The restarting means 75 for restarting the device 7 and the method for mounting the divided storage area are controlled depending on whether or not a failure has occurred The partition mount control means 76, the partition mount means 77 for mounting the partition according to the instructions of the partition mount control means 76, the operation control means 78 for controlling the overall operation of the terminal device 7, and the data received by the communication means 31 And a write destination designation means 79 for designating a destination to write. Here, the operation control means 78 is mainly composed of a processor that operates according to a predetermined program.

以上のように構成されたソフトウエア更新装置について、以下その動作を説明する。まず、図8および図9を参照しながら、ファイルシステムの構造を説明する。図8は、第2の実施形態に係るファイルシステムの構成および動作を説明するための図であり、図9は、第3の実施形態に係るファイルシステムの構成および動作を説明するための図である。   The operation of the software updating apparatus configured as described above will be described below. First, the structure of the file system will be described with reference to FIGS. FIG. 8 is a diagram for explaining the configuration and operation of the file system according to the second embodiment, and FIG. 9 is a diagram for explaining the configuration and operation of the file system according to the third embodiment. is there.

分割記憶領域70aないし70eは、図4と同じく、それぞれ、フラッシュROMの整数個のブロック(セクター)からなる独立したファイルシステムとして構成されており、図8では分割記憶領域70a、70b、70cはそれぞれ、ディレクトリ/fsys1, /fsys2, /fsys3にマウントされている。図8には第2の実施形態におけるモジュールのバックアップ、新たなモジュールの書込み、復元時のデータの流れを矢印で示している。第2の実施形態では、もし、書込み時に障害が発生しなくても、モジュールのバックアップ記憶手段へのバックアップと分割記憶領域への書込みの2回のデータ書込みが発生し、障害発生時にはさらに1回の書込みが発生する。   Each of the divided storage areas 70a to 70e is configured as an independent file system composed of an integral number of blocks (sectors) of the flash ROM, as in FIG. 4, and in FIG. 8, each of the divided storage areas 70a, 70b, and 70c Mounted in the directory / fsys1, / fsys2, / fsys3. In FIG. 8, the flow of data at the time of module backup, writing of a new module, and restoration in the second embodiment is indicated by arrows. In the second embodiment, even if a failure does not occur at the time of writing, data is written twice, that is, backup to the backup storage means of the module and writing to the divided storage area. Writing occurs.

一方、本実施の形態では、バックアップ記憶手段の代わりに、分割記憶領域70eを追加した。また、ダウンロードしたモジュールの書込みは分割記憶領域70eに行う。書込み前には分割記憶領域70bを/fsys2にマウントしていたが、書込み後は、分割記憶領域70eを/fsys2にマウントし、分割記憶領域70e中の新しいモジュールを、あたかも分割記憶領域70b中にあった古いモジュールと入れ替えたように見せ、モジュールの更新を行う。すなわち、障害の生じていない分割記憶領域に記憶されているモジュールおよびメインプログラムを、ダイナミックリンクし、実行するものである。   On the other hand, in this embodiment, a divided storage area 70e is added instead of the backup storage means. The downloaded module is written into the divided storage area 70e. The divided storage area 70b was mounted at / fsys2 before writing, but after writing, the divided storage area 70e was mounted at / fsys2, and a new module in the divided storage area 70e was installed in the divided storage area 70b. It looks like it was replaced with the old module, and updates the module. That is, the modules and the main program stored in the divided storage area where no failure has occurred are dynamically linked and executed.

次に、図10を参照しながら端末装置7の動作について説明する。図10は、第3の実施形態に係る端末装置におけるソフトウエア更新方法の動作説明のためのフロー図である。ここで、分割記憶領域70bに記憶されているモジュール106b(ver1)を、モジュール106b(ver2)に更新する場合を例にとって説明する。なお、サーバ10での動作は、図3におけるステップ301ないし303と同様である。   Next, the operation of the terminal device 7 will be described with reference to FIG. FIG. 10 is a flowchart for explaining the operation of the software update method in the terminal device according to the third embodiment. Here, a case where the module 106b (ver1) stored in the divided storage area 70b is updated to the module 106b (ver2) will be described as an example. The operation in the server 10 is the same as steps 301 to 303 in FIG.

まず、動作制御手段78からの指示に基づき、書込み先指定手段79が書込み先を決定し、その決定に従い、書込み手段71は、通信手段31から得たデータを分割記憶領域70eに書込む(ステップ1001)。この時、書込み先指定手段79は、その時点で利用されていない、バックアップ用の分割記憶領域を指定する。   First, based on an instruction from the operation control means 78, the write destination designation means 79 determines a write destination, and according to the determination, the write means 71 writes the data obtained from the communication means 31 into the divided storage area 70e (step 1001). At this time, the write destination designation means 79 designates a backup divided storage area that is not used at that time.

次に障害検出手段72は書込み中に障害が発生し、書込みが正常終了したか否かを判定する(ステップ1002)。もし、障害が発生していたら、障害記憶手段73に指示し、障害発生を記録する(ステップ1004)。もし障害が発生していなければ、障害なしを記録する(ステップ1003)。   Next, the failure detecting means 72 determines whether or not a failure has occurred during writing and the writing has been normally completed (step 1002). If a failure has occurred, the failure storage means 73 is instructed to record the failure occurrence (step 1004). If no failure has occurred, no failure is recorded (step 1003).

次に再起動手段75が端末装置7を再起動する(ステップ1005)。次に再起動後、障害検出判定手段74は、障害記憶手段73に障害が記録されているかを判定する(ステップ1006)。   Next, the restarting means 75 restarts the terminal device 7 (step 1005). Next, after restarting, the failure detection determination unit 74 determines whether a failure is recorded in the failure storage unit 73 (step 1006).

もし、障害が記録されていれば、パーティションマウント制御手段76は書換え前と同様に、分割記憶領域70aから70dをマウントするよう、パーティションマウント手段77に指示し、パーティションマウント手段77はその指示に従ってマウントする(ステップ1008)。   If a failure is recorded, the partition mount control means 76 instructs the partition mount means 77 to mount the divided storage areas 70a to 70d as before rewriting, and the partition mount means 77 mounts according to the instructions. (Step 1008).

もし、障害が記録されていなければ、パーティションマウント制御手段76は、分割記憶領域70bをマウントしていたディレクトリ /fsys2に、代わりに分割記憶領域70eをマウントし、その他のパーティションは従来通りマウントするよう、パーティションマウント手段77に指示し、パーティションマウント手段77はその指示に従ってマウントし、かつ分割記憶領域70bは利用されていないことを書込み先指定手段79に通知する(ステップ1007)。   If no failure has been recorded, the partition mount control means 76 mounts the divided storage area 70e instead of the directory / fsys2 that mounted the divided storage area 70b, and mounts the other partitions as before. Then, the partition mount unit 77 is instructed, the partition mount unit 77 mounts in accordance with the instruction, and notifies the write destination designation unit 79 that the divided storage area 70b is not used (step 1007).

次に、動作制御手段78は障害記憶手段73に障害なしを記憶させる(ステップ1009)。次にダイナミックリンク手段34は全モジュールとメインプログラムをダイナミックリンクする(ステップ1010)。次に実行手段35がダイナミックリンクしたソフトウエアを実行する(ステップ1011)。   Next, the operation control means 78 stores no failure in the failure storage means 73 (step 1009). Next, the dynamic link means 34 dynamically links all modules and the main program (step 1010). Next, the execution means 35 executes the dynamically linked software (step 1011).

このような本発明の第3の実施形態のソフトウエア更新システムによれば、コンパイル・共有ライブラリ化手段と、メインプログラムコンパイル・共有ライブラリリンク手段と、分割記憶領域と、書込み先指定手段と、障害検出手段と、障害記憶手段と、障害検出判定手段と、再起動手段と、パーティションマウント制御手段と、パーティションマウント手段と、ダイナミックリンク手段とを備えることにより、モジュール単位でのソフトウエア更新を簡便にかつ小容量の記憶容量しか用いずに実現で、またデータ書込み時の書込み障害が発生しても、動作を継続することができ、フォールトトレランス性を確保することができる。さらに、データ書込み回数削減により書込み時間を削減し、かつ不揮発メモリの書込み回数削減による長寿命化を図ることができる。   According to such a software updating system of the third embodiment of the present invention, a compiling / shared library unit, a main program compiling / shared library link unit, a divided storage area, a write destination designating unit, a failure By providing detection means, failure storage means, failure detection determination means, restart means, partition mount control means, partition mount means, and dynamic link means, it is easy to update software in units of modules. Further, it can be realized by using only a small storage capacity, and even if a write failure occurs at the time of data writing, the operation can be continued and fault tolerance can be ensured. Further, the writing time can be reduced by reducing the number of data writing times, and the life can be extended by reducing the number of writing times of the nonvolatile memory.

本発明のソフトウエア更新システムは、簡便なソフトウエア更新が可能な効果を有し、ダイナミックリンク機能を備えたOSを搭載した組込み機器等に有用である。   The software update system of the present invention has an effect that enables simple software update, and is useful for an embedded device equipped with an OS having a dynamic link function.

本発明の第1の実施形態を説明するためのソフトウエア更新システムを示す概略構成図1 is a schematic configuration diagram showing a software update system for explaining a first embodiment of the present invention; 第1の実施形態に係るソフトウエア更新システムにおけるアプリ転送の動作説明のためのフロー図Flow chart for explaining operation of application transfer in the software update system according to the first embodiment 第1の実施形態に係るソフトウエア更新システムにおける更新方法の動作説明のためのフロー図FIG. 3 is a flowchart for explaining the operation of the update method in the software update system according to the first embodiment. 本発明の第2の実施形態を説明するためのソフトウエア更新システムを示す概略構成図The schematic block diagram which shows the software update system for describing the 2nd Embodiment of this invention 第2の実施形態に係るファイルシステムの構成を説明するための図The figure for demonstrating the structure of the file system which concerns on 2nd Embodiment. 第2の実施形態に係る端末装置におけるソフトウエア更新方法の動作説明のためのフロー図The flowchart for operation | movement description of the software update method in the terminal device which concerns on 2nd Embodiment 本発明の第3の実施形態を説明するためのソフトウエア更新システムを示す概略構成図Schematic configuration diagram showing a software update system for explaining a third embodiment of the present invention 第2の実施形態に係るファイルシステムの構成および動作を説明するための図The figure for demonstrating the structure and operation | movement of a file system which concern on 2nd Embodiment. 第3の実施形態に係るファイルシステムの構成および動作を説明するための図The figure for demonstrating the structure and operation | movement of a file system concerning 3rd Embodiment. 第3の実施形態に係る端末装置におけるソフトウエア更新方法の動作説明のためのフロー図The flowchart for operation | movement description of the software update method in the terminal device which concerns on 3rd Embodiment

符号の説明Explanation of symbols

1 サーバ
2 通信回線
3、4、9 端末装置
11 ファイル単位分割手段
12、16 記憶装置
13 モジュール変更手段
14 コンパイル・共有ライブラリ化手段
15 メインプログラムコンパイル・共有ライブラリリンク手段
17、31 通信手段
18、36、48、78 動作制御手段
32、41、71 書込み手段
34 ダイナミックリンク手段
35 実行手段
40、70 分割記憶領域
42 バックアップ手段
43 バックアップ記憶手段
44 復元手段
45、74 障害検出判定手段
46、75 再起動手段
47、77 パーティションマウント手段
49、72 障害検出手段
50、73 障害記憶手段
76 パーティションマウント制御手段
79 書込み先指定手段
DESCRIPTION OF SYMBOLS 1 Server 2 Communication line 3, 4, 9 Terminal device 11 File unit division means 12, 16 Storage device 13 Module change means 14 Compile / shared library means 15 Main program compile / shared library link means 17, 31 Communication means 18, 36 , 48, 78 Operation control means 32, 41, 71 Write means 34 Dynamic link means 35 Execution means 40, 70 Divided storage area 42 Backup means 43 Backup storage means 44 Restoration means 45, 74 Fault detection determination means 46, 75 Restart means 47, 77 Partition mount means 49, 72 Fault detection means 50, 73 Fault storage means 76 Partition mount control means 79 Write destination designation means

Claims (10)

ソフトウエア更新システムにおける端末装置であって、
各々が1つ以上のプログラムファイルを含む、共有ライブラリ化されたモジュールおよび前記共有ライブラリにリンクされたメインプログラムに分割されたソフトウエアを記憶する記憶手段と、
更新すべきモジュール及びメインプログラムを含む更新データを受信するための通信手段と、
前記通信手段で受信した前記更新データを前記記憶手段に書込む書込み手段と、
前記記憶手段に記憶された前記モジュールおよび前記メインプログラムをダイナミックリンクするダイナミックリンク手段と、
前記ダイナミックリンクされたプログラムを実行する実行手段と、
を備えた端末装置。
A terminal device in a software update system,
Storage means for storing a shared library module and software divided into a main program linked to the shared library, each including one or more program files;
Communication means for receiving update data including a module to be updated and a main program;
Writing means for writing the update data received by the communication means into the storage means;
Dynamic link means for dynamically linking the module and the main program stored in the storage means;
Execution means for executing the dynamically linked program;
A terminal device comprising:
請求項1記載の端末装置であって、
前記記憶手段に、前記モジュールおよび前記メインプログラムを複数に分割された記憶領域に記憶する分割記憶領域が設けられ、
前記書込み手段は、前記通信手段が受信した前記更新データを対応する分割記憶領域中の更新前データから書換えるものであり、
前記端末装置は、
前記更新データに対応する前記更新前データをバックアップするバックアップ手段と、
前記書込み手段の書込み中の障害を検出する検出手段と、
前記検出手段によって検出された障害情報を記憶する障害記憶手段と、
前記端末装置を再起動する再起動手段と、
前記再起動手段による再起動後に、再起動前の前記更新データの分割記憶領域への書込み中に障害が発生したか否かを前記障害情報により判定する障害検出判定手段と、
前記障害検出判定手段によって障害があったと判定された場合に、前記バックアップされた更新前データを元の分割記憶領域に書き戻す復元手段と、
各々の前記分割記憶領域をパーティションとして前記端末装置で用いられるファイルシステムにマウントするパーティションマウント手段と、
を更に備え、
前記ダイナミックリンク手段は、前記ファイルシステムにマウントされた前記分割記憶領域に記憶された前記モジュールおよび前記メインプログラムをダイナミックリンクするものである端末装置。
The terminal device according to claim 1,
The storage means is provided with a divided storage area for storing the module and the main program in a divided storage area,
The writing means rewrites the update data received by the communication means from the pre-update data in the corresponding divided storage area,
The terminal device
Backup means for backing up the pre-update data corresponding to the update data;
Detecting means for detecting a failure during writing of the writing means;
Fault storage means for storing fault information detected by the detection means;
Restarting means for restarting the terminal device;
A failure detection determination means for determining whether or not a failure has occurred during writing to the divided storage area of the update data before restart after restart by the restart means; and
When it is determined that there is a failure by the failure detection determination unit, a restoration unit that writes the backed up pre-update data back to the original divided storage area;
Partition mounting means for mounting each of the divided storage areas as a partition on a file system used in the terminal device;
Further comprising
The dynamic link means is a terminal device for dynamically linking the module and the main program stored in the divided storage area mounted on the file system.
請求項1記載の端末装置であって、
前記記憶手段に、前記モジュールおよび前記メインプログラムを複数に分割された記憶領域に記憶する分割記憶領域が設けられ、
前記書込み手段は、前記更新データを分割記憶領域に書込むものであり、
前記端末装置は、
前記更新データを、前記書込み手段が書込むべき前記分割記憶領域を指定する書込み先指定手段と、
前記書込み手段の書込み中の障害を検出する検出手段と、
前記検出手段によって検出された障害情報を記憶する障害記憶手段と、
前記端末装置を再起動する再起動手段と、
前記再起動手段による再起動後に、再起動前の前記更新データの分割記憶領域への書込み中に障害が発生したか否かを前記障害記憶手段中の情報より判定する障害検出判定手段と、
前記障害検出判定手段で判定された障害発生の有無により、前記分割記憶領域のマウント方法を制御するパーティションマウント制御手段と、
前記パーティションマウント制御手段の指示に従い、前記分割記憶領域をパーティションとして前記端末装置に用いられるファイルシステムにマウントするパーティションマウント手段と、
を更に備え、
前記パーティションマウント制御手段は、障害が生じていない場合は前記更新データが書込まれた分割領域を、障害が生じている場合は書込み以前にモジュールが存在した分割記憶領域をパーティションとして前記ファイルシステムにマウントするように前記パーティションマウント手段に指示を行い、
前記ダイナミックリンク手段は、前記ファイルシステムにマウントされた前記分割記憶領域に記憶された前記モジュールおよび前記メインプログラムをダイナミックリンクするものである端末装置。
The terminal device according to claim 1,
The storage means is provided with a divided storage area for storing the module and the main program in a divided storage area,
The writing means writes the update data into a divided storage area;
The terminal device
A write destination designating unit for designating the divided storage area to which the write unit should write the update data;
Detecting means for detecting a failure during writing of the writing means;
Fault storage means for storing fault information detected by the detection means;
Restarting means for restarting the terminal device;
A failure detection determination means for determining whether or not a failure has occurred during writing to the divided storage area of the update data before restart after restarting by the restarting means, from information in the failure storage means;
Partition mount control means for controlling the mounting method of the divided storage area according to the presence or absence of occurrence of a failure determined by the failure detection determination means;
In accordance with an instruction from the partition mount control means, partition mount means for mounting the divided storage area as a partition on a file system used in the terminal device;
Further comprising
The partition mount control means uses the divided area in which the update data is written if no failure has occurred, and the divided storage area in which the module existed before the writing as a partition in the file system if a failure has occurred. Instruct the partition mounting means to mount,
The dynamic link means is a terminal device for dynamically linking the module and the main program stored in the divided storage area mounted on the file system.
ソフトウエア更新システムにおけるサーバであって、
ソフトウエアを、各々が1つ以上のソースプログラムファイルからなるモジュールおよびメインプログラムに分割するファイル単位分割手段と、
前記ファイル単位分割手段で分割された前記モジュールおよび前記メインプログラムを含むデータを記憶する記憶手段と、
前記記憶手段に記憶された前記データに変更を加えるモジュール変更手段と、
前記記憶手段に記憶されたメインプログラムをコンパイルし、共有ライブラリを利用する形態でのリンクを行うメインプログラムコンパイル手段と、
前記記憶手段に記憶されたモジュールをコンパイルするとともに共有ライブラリ化するモジュールコンパイル手段と、
通信回線を介して前記モジュールおよび前記メインプログラムを送信するための通信手段と、
を備えたサーバ。
A server in a software update system,
A file unit dividing means for dividing the software into a module and a main program each consisting of one or more source program files;
Storage means for storing data including the module and the main program divided by the file unit dividing means;
Module changing means for changing the data stored in the storage means;
A main program compiling means for compiling the main program stored in the storage means and linking in a form using a shared library;
Module compiling means for compiling the module stored in the storage means and making it a shared library;
A communication means for transmitting the module and the main program via a communication line;
A server with
請求項1ないし3のいずれか一項記載の端末装置と、請求項4記載のサーバとを備えたソフトウエア更新システム。   A software update system comprising the terminal device according to any one of claims 1 to 3 and the server according to claim 4. ソフトウエア更新可能な端末装置におけるソフトウエア更新方法であって、
各々が1つ以上のプログラムファイルを含む、共有ライブラリ化されたモジュールおよび前記共有ライブラリにリンクされたメインプログラムに分割されたソフトウエアを記憶するステップと、
更新すべきモジュールおよびメインプログラムを含む更新データを受信するステップと、
前記通信手段で受信した前記更新データを前記記憶手段に書込むステップと、
前記記憶手段に記憶された前記モジュールおよび前記メインプログラムをダイナミックリンクするダイナミックリンクステップと、
前記ダイナミックリンクされたプログラムを実行するステップと、
を備えた端末装置のソフトウエア更新方法。
A software update method in a terminal device capable of software update,
Storing the software divided into a shared library module and a main program linked to the shared library, each including one or more program files;
Receiving update data including a module to be updated and a main program;
Writing the update data received by the communication means into the storage means;
A dynamic link step for dynamically linking the module and the main program stored in the storage unit;
Executing the dynamically linked program;
A software update method for a terminal device comprising:
請求項6記載のソフトウエア更新方法であって、
前記ソフトウエアを記憶手段に記憶するステップは、前記記憶手段に設けられた複数の分割記憶領域に前記モジュールおよび前記メインプログラムを記憶するものであり、
前記モジュールを書込むステップは、前記通信手段が受信した前記更新データを対応する分割記憶領域中の更新前データから書換えるものであり、
前記ソフトウエア更新方法は、
前記更新前データをバックアップするステップと、
前記書込み中の障害を検出するステップと、
前記検出手段によって検出された障害情報を記憶するステップと、
前記端末装置を再起動するステップと、
前記再起動手段による再起動後に、再起動前の更新データの分割記憶領域への書込み中に障害が発生したか否かを前記障害情報より判定する障害検出判定手段と、
前記障害検出判定手段によって障害があったと判定された場合に、前記バックアップされた更新前データを元の分割記憶領域に書き戻すステップと、
各々の前記分割記憶領域をパーティションとして前記端末装置に用いられるファイルシステムにマウントするステップと、
を更に備え、
前記ダイナミックリンクするステップは、前記ファイルシステムにマウントされた前記分割記憶領域に記憶された前記モジュールおよび前記メインプログラムをダイナミックリンクするものである端末装置のソフトウエア更新方法。
The software update method according to claim 6, comprising:
The step of storing the software in the storage means stores the module and the main program in a plurality of divided storage areas provided in the storage means,
The step of writing the module is to rewrite the update data received by the communication means from the pre-update data in the corresponding divided storage area,
The software update method is:
Backing up the pre-update data;
Detecting a failure during the writing;
Storing fault information detected by the detecting means;
Restarting the terminal device;
A failure detection determination means for determining whether or not a failure has occurred during writing to the divided storage area of the update data before the restart after the restart by the restart means;
When it is determined that there is a failure by the failure detection determination means, the step of rewriting the backed up pre-update data to the original divided storage area;
Mounting each of the divided storage areas as a partition on a file system used in the terminal device;
Further comprising
A software update method for a terminal device, wherein the step of dynamically linking dynamically links the module and the main program stored in the divided storage area mounted on the file system.
請求項6記載のソフトウエア更新方法であって、
前記ソフトウエアを記憶手段に記憶するステップは、前記記憶手段に設けられた複数の分割記憶領域に前記モジュールおよび前記メインプログラムを記憶するものであり、
前記更新データを書込むステップは、前記通信手段が受信した前記更新データを前記分割記憶領域に書込むものであり、
前記ソフトウエア更新方法は、
前記更新データを書込むべき前記分割記憶領域を指定するステップと、
前記更新データの書込み中の障害を検出するステップと、
前記検出手段によって検出された障害情報を記憶するステップと、
前記端末装置を再起動するステップと、
前記再起動手段による再起動後に、再起動前の前記更新データの分割記憶領域への書込み中に障害が発生したか否かを前記障害情報より判定するステップと、
前記障害検出判定手段で判定された障害発生の有無により、障害が生じていない場合は前記更新データが書込まれた分割領域を、障害が生じている場合は書込み以前にモジュールが存在した分割記憶領域をパーティションとして前記ファイルシステムにマウントするように指示を行うステップと、
前記指示に従い、前記分割記憶領域をパーティションとしてファイルシステムにマウントするステップと、
を更に備え、
前記ダイナミックリンクするステップは、前記ファイルシステムにマウントされた前記分割記憶領域に記憶された前記モジュールおよび前記メインプログラムをダイナミックリンクするものである端末装置のソフトウエア更新方法。
The software update method according to claim 6, comprising:
The step of storing the software in the storage means stores the module and the main program in a plurality of divided storage areas provided in the storage means,
The step of writing the update data is to write the update data received by the communication means to the divided storage area,
The software update method is:
Designating the divided storage area in which the update data is to be written;
Detecting a failure during writing of the update data;
Storing fault information detected by the detecting means;
Restarting the terminal device;
After restarting by the restarting means, determining from the failure information whether or not a failure has occurred during the writing of the update data before restarting into the divided storage area;
Depending on the presence or absence of a failure determined by the failure detection determination means, if no failure has occurred, the divided area where the update data has been written is stored, and if a failure has occurred, the divided storage in which the module existed before writing Directing the area to be mounted on the file system as a partition;
In accordance with the instructions, mounting the divided storage area as a partition on a file system;
Further comprising
A software update method for a terminal device, wherein the step of dynamically linking dynamically links the module and the main program stored in the divided storage area mounted on the file system.
端末装置のソフトウエアを更新可能なサーバにおけるソフトウエア更新方法であって、
ソフトウエアを、各々が1つ以上のソースプログラムファイルからなるモジュールおよびメインプログラムに分割するステップと、
前記ファイル単位分割手段で分割された前記モジュールおよび前記メインプログラムを記憶するステップと、
前記記憶手段に記憶された前記データに変更を加えるステップと、
前記記憶手段に記憶されたメインプログラムをコンパイルし、共有ライブラリを利用する形態でのリンクを行うステップと、
前記記憶手段に記憶されたモジュールをコンパイルおよび共有ライブラリ化するステップと、
通信回線を介してモジュールおよびメインプログラムを前記端末装置へ送信するステップと、
を備えたサーバのソフトウエア更新方法。
A software update method in a server capable of updating software of a terminal device,
Dividing the software into modules and main programs each consisting of one or more source program files;
Storing the module and the main program divided by the file unit dividing means;
Modifying the data stored in the storage means;
Compiling the main program stored in the storage means and linking in a form using a shared library;
Compiling and storing a module stored in the storage means into a shared library;
Transmitting the module and the main program to the terminal device via a communication line;
Software update method for server with
コンピュータに、請求項6ないし9に記載の各ステップを実行させるためのソフトウエア更新プログラム。   A software update program for causing a computer to execute the steps according to claims 6 to 9.
JP2003288962A 2003-08-07 2003-08-07 Software update system, method and program Withdrawn JP2005056319A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003288962A JP2005056319A (en) 2003-08-07 2003-08-07 Software update system, method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003288962A JP2005056319A (en) 2003-08-07 2003-08-07 Software update system, method and program

Publications (1)

Publication Number Publication Date
JP2005056319A true JP2005056319A (en) 2005-03-03

Family

ID=34367445

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003288962A Withdrawn JP2005056319A (en) 2003-08-07 2003-08-07 Software update system, method and program

Country Status (1)

Country Link
JP (1) JP2005056319A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007026318A (en) * 2005-07-20 2007-02-01 Nec Corp Mobile phone, system and method for generating program, and system and method for updating program
US9003388B2 (en) 2010-08-18 2015-04-07 Ricoh Company, Ltd. Information processing apparatus and update process support system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007026318A (en) * 2005-07-20 2007-02-01 Nec Corp Mobile phone, system and method for generating program, and system and method for updating program
US9003388B2 (en) 2010-08-18 2015-04-07 Ricoh Company, Ltd. Information processing apparatus and update process support system

Similar Documents

Publication Publication Date Title
Koshy et al. Remote incremental linking for energy-efficient reprogramming of sensor networks
WO2010035596A1 (en) Firmware update device and method
CN111061638B (en) iOS system debugging method, device and server
US20120159470A1 (en) Method and device for generating software installation packet
JP4873423B2 (en) Virtualization program, simulation apparatus, and virtualization method
CN102147743A (en) Method for accelerating startup of embedded system application program
CN110659088B (en) Method and system for expanding program under embedded environment
CN103645888A (en) System and method for automatically building operation system
JP2002073378A (en) Method and device for obtaining dump of computer system
CN103324529B (en) Across task sharing operating system subprocess
JP2005056319A (en) Software update system, method and program
CN111880808A (en) Linux operating system construction and package management method
CN115495158B (en) Dynamic construction method for system service in microkernel operating system
Kajtazovic et al. A component-based dynamic link support for safety-critical embedded systems
CN110806891A (en) Method and device for generating software version of embedded equipment
KR20070096316A (en) Extensible virtual machine for reprogramming in wireless sensor networks and reprogramming method using it
KR100478463B1 (en) Dynamic Linking Method for Application Program
JP5660386B2 (en) Memory allocation management device, memory allocation management method, memory allocation management program, and program creation system
CN104281443B (en) Method for realizing code and data replacement by using TCM (trusted cryptography module)
JP2006079155A (en) Information processor
JP3682050B2 (en) Embedded software development equipment
CN107220101B (en) Container creation method and device
CN112130858A (en) Code compiling method and compiling server
JP6295914B2 (en) Programmable controller system, its support device, programmable controller
JP2004013522A (en) Logical partition type computer system

Legal Events

Date Code Title Description
A621 Written request for application examination

Effective date: 20060310

Free format text: JAPANESE INTERMEDIATE CODE: A621

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20060325

A761 Written withdrawal of application

Effective date: 20071015

Free format text: JAPANESE INTERMEDIATE CODE: A761