JP2004227520A - Device, method and program for generating old and new program rewriting information, and computer readable recording medium recording the program - Google Patents
Device, method and program for generating old and new program rewriting information, and computer readable recording medium recording the program Download PDFInfo
- Publication number
- JP2004227520A JP2004227520A JP2003017959A JP2003017959A JP2004227520A JP 2004227520 A JP2004227520 A JP 2004227520A JP 2003017959 A JP2003017959 A JP 2003017959A JP 2003017959 A JP2003017959 A JP 2003017959A JP 2004227520 A JP2004227520 A JP 2004227520A
- Authority
- JP
- Japan
- Prior art keywords
- program
- information
- new
- old
- rewriting
- 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.)
- Abandoned
Links
Images
Landscapes
- Stored Programmes (AREA)
Abstract
Description
【0001】
【発明の属する技術分野】
本発明は、新旧プログラムの書換情報を生成する新旧プログラム書換情報生成装置に関する。特に、携帯電話などの組み込み型の小型情報処理機器の補助記憶装置において、フラッシュメモリ上の内容を更新する場合に、ソフトウエアのバイナリイメージでの差分を抽出し、その差分を表現する方法を用いた装置に関する。
【0002】
【従来の技術】
中央局と基地局とから構成され、中央局が基地局の処理プログラムを管理するシステムにおいて、中央局から基地局へのプログラムのダウンロードの処理時間を短縮すると共に中央局の構成を簡単化することを目的として以下の手段が公知となっている。中央局は、最新の基地局の処理プログラムとプログラムブロック情報とを保持しており、基地局2が保持する処理プログラムが最新でない場合は、まずプログラムブロック情報を基地局に送出する。基地局では、受信したプログラムブロック情報と自装置内のプログラムブロック情報とを比較し、現在保持していないプログラムブロックのみを中央局に対して要求する。中央局では、要求されたプログラムブロックを基地局に対して送出する。基地局では、受信したプログラムブロックと、自装置内に保持しているプログラムブロックとを用いて、自装置内の処理プログラムを最新の状態に更新する。(特許文献1参照)
【0003】
記憶容量を小さくし、記憶されているソフトウエアの一部分を更新可能にすることを目的として以下の手段が公知となっている。フラッシュメモリには、コードA、データA、およびデータBが非圧縮で記憶されており、コードBが圧縮されて記憶されている。これらの記憶されているモジュールをRAM上に展開する場合、コピー・伸張プログラムに従って行われる。例えば、コードA、データA、およびデータBを、それぞれRAM上にコピーした後、コードBをRAM上に伸張する。例えば、コードAを更新する場合、コードAよりも小さいサイズになるように更新するコードA’を圧縮すれば、コードAの領域に、コードA’を置き換える(更新する)ことが可能となる。(特許文献2参照)
【0004】
従来の技術として、格納されている旧プログラムから新プログラムへの変更を、旧プログラムデータの変更部分をフラッシュメモリからRAMへコピーし、RAM上で書き換えたプログラムデータを前記フラッシュメモリに戻すことにより行うこと、前記変更部分のコピー及び前記RAM上での書き換えを書き換え単位毎に行うこと、前記書き換え単位は、前記フラッシュメモリの記憶領域の一部分を消去する上での最小単位となるセクターであることが記載されている。(特許文献3参照)
【0005】
フラッシュメモリに記憶された、複数のプログラムブロックからなるプログラムデータの一部のプログラムブロックのデータを更新するにあたり、更新対象であるプログラムブロックに対してのみデータの書き換えを行うことを目的として以下の手段が公知となっている。A〜Eの各機能を実現するための複数のプログラムブロックを記憶したフラッシュメモリに対して、たとえば、機能DのOSデータを更新する場合、第4番目のメモリブロック54のデータを消去する前に、機能DのOSデータとともに第4番目のメモリブロック内に格納された、機能CのOSデータの一部と機能EのOSデータの一部のデータを、パーソナルコンピュータに一時的に退避し、第4番目のメモリブロックのデータを消去した後、新しい機能DのOSデータとともに退避データを第4番目のメモリブロックの元の位置に書き込む。(特許文献4参照)
【0006】
【特許文献1】
特開2000−353096号公報
【特許文献2】
特開2001−166941号公報
【特許文献3】
特開2002−014833号公報
【特許文献4】
特開2000−242487号公報
【0007】
【発明が解決しようとする課題】
特許文献1では、一定の大きさのブロックに分けてプログラムの置換を行うだけであり、単にブロックに分けるだけでは差分情報は小さくならないし、フラッシュROMの特性を考えた場合に必要なワークメモリに関しては考慮されていないという問題があった。
【0008】
特許文献2は、単に差分情報の大きさを小さくするために圧縮の技術を利用するのであって、根本のデータを小さくすることに関しては触れられていないし、ワークメモリサイズに関しても考慮されていない。
【0009】
特許文献3では、差分データを小さくする方法やワークメモリサイズとの関連に関しては触れられていない。
【0010】
特許文献4では、プログラム更新のための操作順序に関しては開示されているが、差分データを小さくする方法やワークメモリとの関係に関しては触れられていない。
【0011】
ここで、フラッシュROM上の場合は、一旦古い情報をワークメモリに読み込んでから再度フラッシュROMに書き込まなければならないという特性がある。一度フラッシュROMを書き直してしまうと、古い版の情報は書き換わってしまうため利用できない。
また、特に、一般に組み込み機器や、携帯電話では、コストの関係で、ワークメモリを十分にとっておき、新しい版のイメージを全部作成してから書き直すような方法が適用できるほどワークメモリは大きくない。
【0012】
本発明は、新旧プログラムを書換えるための情報としての差分情報を小さくすることを目的とする。
【0013】
さらに、本発明は、例えば、フラッシュROMの特性を考えた場合に必要とされるワークメモリについて、ワークメモリのサイズを考慮した新旧プログラムを書換えるための情報としての差分情報を生成することを目的とする。
【0014】
【課題を解決するための手段】
この発明に係る新旧プログラム書換情報生成装置は、新プログラムと旧プログラムとを記憶する記憶部と、
上記記憶部により記憶された新プログラムと旧プログラムとを比較し、新プログラムの各部に対し、新プログラムの一部と位置及び内容が同一である旧プログラムの第1の部分と新プログラムの一部と位置が異なるが内容が同一である旧プログラムの第2の部分と旧プログラムには存在しない新プログラムの第3の部分との内いずれかを判定し、判定された部分に基づいて、旧プログラムを新プログラムに書換えるための所定の情報を生成する所定情報生成部と、
上記所定情報生成部により生成された所定の情報を出力する出力部と
を備えたことを特徴とする。
【0015】
【発明の実施の形態】
実施の形態1.
例えば、組み込みソフトウエアの機器のフィールドでのバージョンアップのためには、バージョンアップ用のデータを組み込み機器に入力し書き換える処理が必要になる。新たなソフトウエアの全情報を送り込むと膨大なデータ量になる。そこで、古いファイルとの差分情報を送る。差分情報を適用するためには、古い版(旧プログラム)の情報に差分情報を適用して新しい情報(新プログラム)を作る。
【0016】
以下に実施の形態を述べる。
図1は、実施の形態1における構成図と処理の流れを示した図である。
図1において、組み込みソフトウエア差分情報生成装置1(新旧プログラム書換情報生成装置の一例である)は、ハードディスク装置100、コード読み込み部103、メモリ101、ハードディスク装置110、出力部111、所定情報生成部120を備えている。ハードディスク装置100には、新版ファイル102と旧版ファイル602とが記憶されている。
記憶部は、新プログラムと旧プログラムとを記憶する。すなわち、記憶部或いは記憶装置の一例として、メモリ101には、新版バイナリイメージ104と旧版バイナリイメージ604とが記憶されている。
所定情報生成部120は、同一領域検出部105(検出部の一例である)、書換情報生成部121を有している。書換情報生成部121は、差分情報生成部106、最適差分情報生成部107を有している。
【0017】
ハードディスク装置100は、例えばPC(パーソナルコンピュータ)で構成するような場合のシステムが持つ。
メモリ101は、例えばPCで構成する場合における書換え可能なランダムアクセスメモリである。
新版ファイル102と旧版ファイル602とはハードディスク装置100上に置くファイルであり、組み込みソフトウエアの差分情報を生成する元となる新、旧プログラムの両バージョンのファイルを示している。本ファイルからは一意に組み込みシステムのソフトウエアを構成できるものであれば、その途上のフォーマットでも差し支えない。例えば、バイナリファイルであって、その内容からアドレス位置などを決めることができる形式であったり、テキストファイルであって、その情報からアドレス位置などの情報がわかる形式でよい。
【0018】
コード読み込み部103は、図示していない組み込み機器上で実行する新、旧の複数のプログラムに関して、前記新、旧のプログラムのコードを組み込みソフトウエア差分情報生成装置1(新旧プログラム書換情報生成装置の一例である)内のメモリ101内に読み込む。組み込みソフトウエア差分情報生成装置1の一例として、例えば、PC等の計算機が挙げられる。コード読み込み部103は、ハードディスク装置100上のファイル、ここでは、新版ファイル102と旧版ファイル602とをその形式に従って、メモリ101上に、図示していない組み込み機器(新旧プログラム書換装置の一例である)のアドレスイメージで展開する。比較可能であれば、バイナリ形式で展開していても、テキスト形式で展開していてもかまわない。
新版バイナリイメージ104と旧版バイナリイメージ604とは、前期コード読み込み部103で読み込まれたメモリ101上の組み込み機器の新旧プログラムそれぞれのバイナリコードを表現する各データである。
【0019】
所定情報生成部120は、上記記憶部(ここでは、メモリ101)により記憶された新プログラムと旧プログラムとを比較し、新プログラムの各部に対し、新プログラムの一部と位置及び内容が同一である旧プログラムの第1の部分と新プログラムの一部と位置が異なるが内容が同一である旧プログラムの第2の部分と旧プログラムには存在しない新プログラムの第3の部分との内いずれかを判定し、判定された部分に基づいて、旧プログラムを新プログラムに書換えるための所定の情報を生成する。
【0020】
以下、上記所定情報生成部120の機能について細分して説明する。
検出部の一例としての同一領域検出部105は、上記記憶部により記憶された新プログラムと旧プログラムとを比較し、新プログラムの上段から順に、上記第1の部分と第2の部分とを検出する。
詳細に言いかえると、同一領域検出部105は、前記コード読み込み部103によって読み込まれた複数のバイナリコードを比較して同一領域を検出する。すなわち、同一領域検出部105は、新版と旧版とのメモリ101上の新版バイナリイメージ104と旧版バイナリイメージ604とから同一領域(第1の部分の一例である)を検出する。同一領域検出部105は、2つのファイルをまずバイナリ比較し、アドレスとその内容の双方とも一致している領域(部分)を抽出する。ここで抽出された部分は位置、内容ともに一致しているため、新版でも旧版でも置き換える必要のない部分である。また、同一領域検出部105は、バイナリ比較し、アドレスは違うものの内容が一致している部分(第2の部分の一例である)を探す。これはメモリ上の位置をずらすだけで表現できるもので、実際には新版(新プログラム)と旧版(旧プログラム)では着目したメモリ101上のアドレス位置で見ると内容が変わっているため書き換える必要があるが、旧版のイメージをワークメモリにコピーし、再度新版の新しいアドレス位置にワークメモリからコピーして書き込めばよい領域であること示している。
【0021】
この同一領域検出部105による同一領域検出のためにはアドレスの位置のずれをみつける参考データとしてコンパイラやリンカの出力したアドレス情報を使って比較しても良いし、新版のある決まった領域を旧版から探し出すという方法を使っても良い。
【0022】
そして、書換情報生成部121は、上記検出部の一例としての同一領域検出部105により検出されなかった部分を第3の部分として、上記検出部の一例としての同一領域検出部105により検出された第1の部分と第2の部分と上記検出部の一例としての同一領域検出部105により検出されなかった第3の部分との内少なくとも1つを選択し、選択された部分に基づいて、旧プログラムを新プログラムに書換えるための差分ファイル108(所定の情報の一例である)を生成する。
書換情報生成部121の内部では、以下の処理をおこなう。
差分情報生成部106は、前記同一領域検出部105の生成結果から差分情報を生成する。差分情報生成部106は、前期同一領域検出部105によって検出されたアドレスも含めた同一領域をスキップ領域(第1の部分の一例である)とし、アドレスは違うが内容は同じ領域をアドレスのコピー領域(第2の部分の一例である)とし、旧版上に全く現れない新版上の領域をデータ領域(第3の部分の一例である)とわけて、新版上の連続したアドレス上で、上記3種類を順番に表現する手段である。言いかえれば、差分情報生成部106は、前記同一領域検出部105の生成結果から、アドレス位置、内容の双方同一である同一領域(第1の部分の一例である)と、アドレス位置に違いはあるが内容が同一である移動あり同一領域(第2の部分の一例である)と、更新領域(第3の部分の一例である)の3つに分類する領域分類手段である。
【0023】
次に、最適差分情報生成部107は、プログラム実行対象である組込み機器のワークメモリサイズ情報と前記差分情報生成部106の生成結果から、最適差分情報を生成する。最適差分情報生成部107は、前記分類結果を組み合わせて組み込み機器上で逐次解釈実行可能な逐次解釈実行差分情報生成手段でもある。最適差分情報生成部107は、前記差分情報生成部106の出力結果で、コピーの関係などで、旧版の状態を消せる場合と消せない場合とを判断し、消せる場合には、そこまではコピーして新版に入れ替えても良いということを示すフラグを出力していく。その結果、フラグ間の新版のイメージがワークメモリを超えるような場合にはコピーで表現するのではなく、データで表現するというような形式に変換し、フラグ間のサイズがワークメモリのサイズを超えないようにする手段である。
【0024】
差分ファイル108は、前記最適差分情報生成部107の結果出力される差分データファイルである。差分ファイル108は、ハードディスク装置110に記憶される。
出力部111は、上記所定情報生成部の一例としての最適差分情報生成部107により生成された差分ファイル108(所定の情報の一例である)を出力する。出力部111は、差分ファイル108をハードディスク装置110から入力して出力しても構わないし、最適差分情報生成部107から直接入力して出力しても構わない。
【0025】
図2は、新版、旧版ファイル構成の一例を示す図である。
図2を用いて、前記コード読み込み部103を説明する。
図2において、ファイル201はバイナリ形式のファイルの例である。ファイル202はテキスト形式のファイルの例である。実際には、これらはファイル上は2ビットの形式で表現されており、ここでは16進法で記載している。ファイル201のファイルの例の場合は通常のエディタなどでは見ることができず、バイナリエディタなどをとおして見ることができる例である。ファイル202はその逆であり、通常のエディタで見ることができる形式であり、テキストファイル形式である。しかしながらこのままのイメージで組み込みソフトウエアのメモリイメージになるわけではなく、ファイル201の形に変換してメモリ101上には格納される。本実施の形態では、ファイル201とファイル202はファイルの形式が違うだけで同じ内容を示している。
【0026】
ファイル201の形に変換するこのデータの変換は、例えばメモリ101上のイメージの「0」は、「30」で表し、「1」は「31」であらわすというように16進で表現できる16のパターンをテーブルを見て変換するだけで変換することができる。このようにして、コード読み込み部103は、ファイルをハードディスク装置100から読みこんでメモリ101上に展開する。
図2におけるファイル203,204に示すように、アドレスの情報を付加することにより、絶対アドレス位置の特定も可能となる。読み込んだデータは例えば配列などを使ってアドレス位置とデータの対応がつくようにメモリ101上で管理する。ファイル203は、ファイル201の情報に、「0000」、「0008」、「0010」とアドレスの情報が付加されている。ファイル204は、ファイル202の情報に、「S300008」、「S300088」、「S300108」とアドレスの情報が付加されている。
【0027】
図3は、同一領域検出部と差分情報生成部を説明するためのファイル例を示す図である。
同一領域検出部105では、まず、アドレスが同じで内容も同じ領域を探す。ファイル301は旧版のファイル、ファイル302は新版のファイルであり、図3では、ファイル301,302をメモリ101上に読み込んだ図が示されている。図3において、ファイル301上のポイント303からポイント304までと、ファイル302上のポイント310からポイント312までとはアドレス、内容ともすべて一致している。
これらの情報は、差分情報生成部106によって、ファイル320に示すように、SKIPの関係として分類され出力される。ファイル320の最初のSKIP(第1の情報の一例である)の意味は、0から8バイトはスキップする、即ち、その間は内容を変更しないことを意味している。すなわち、差分情報生成部106によって、第1の部分に分類される。
【0028】
同一領域検出部105は次に位置がずれているが内容は同じ領域(第2の部分の一例である)を探す。具体的な方法としてはコンパイラ、リンカの出力情報を利用して関数単位などでで位置情報が異なるが全く同じである可能性のあるところを比較するなどの方法でもかまわない、いわゆるUNIX(登録商標)オペレーティングシステムに含まれるdiffの機能を利用するようなことをしてもかまわない。
同一領域検出部105の結果として、ポイント314からポイント315までは、ポイント307からポイント308までと内容は同一であるが、アドレスは違うことが同一領域検出部105によって検出されるため、差分情報生成部106によってCOPYの関係として分類され出力される。ファイル320におけるCOPY(第2の情報の一例である)とは、旧版のアドレスである12バイト目(位置情報の一例である)から12バイト(データ量の一例である)を新版の現在の位置から12バイトにコピーするという意味になる。
【0029】
同一領域検出部105は、ポイント313からポイント314に関して内容が同一である領域を検出しない。ポイント313からポイント314に関しては同一のデータが存在しないため、新版で新たに付加されたデータである。同一領域検出部105によって比較して結果、ポイント313からポイント314までは、内容が同一である領域がないと検出されるため、差分情報生成部106によってDATAの関係として分類され出力される。ファイル320における「DATA2,1111」(第3の情報の一例である)の内、「DATA」とは、「,」の次に示す2バイトデータ「1111」が現在の位置から入るという意味となり、「2」とは、「DATA2,」の次に示すデータ「1111」が現在の位置から2バイト(データ量の一例である)入るという意味となる。
【0030】
最後に、同一領域検出部105は、ポイント315からポイント316に関して内容が同一である領域を検出しない。上記同様、ポイント315からポイント316に関しては同一のデータが存在しないため、新版で新たに付加されたデータである。同一領域検出部105によって比較して結果、ポイント315からポイント316までは、内容が同一である領域がないと検出されるため、差分情報生成部106によってDATAの関係として分類され出力される。ファイル320における「DATA2,FFFF」(第3の情報の一例である)の内、「DATA」とは、「,」の次に示す2バイトデータ「FFFF」が現在の位置から入るという意味となり、「2」とは、「DATA2,」の次に示すデータ「FFFF」が現在の位置から2バイト入るという意味となる。ここで、差分情報生成部106は、ポイント315からポイント316までの2バイト分はDATAの関係として出力している。しかし、ポイント306の直前の2バイト分をCOPYの関係で出力してもかまわない。
【0031】
差分情報生成部106は、同一領域検出部105の結果に基づいて前記のように、差分情報として、逐次実行差分情報生成手段によってCOPYとSKIPとDATAの関係を実行順序で示していく。このようにして出てくる差分情報として正しい解は複数考えられるがどれでもかまわない。
以上のような差分情報を生成することで、新旧プログラムを書換えるための情報としての差分情報を小さくすることができる。
【0032】
次に、最適差分情報生成部107に関して図4を用いて説明する。
図4は、最適差分情報生成部を説明するためのファイル例を示す図である。
図4におけるファイル400は、図3における差分情報の例であるファイル320と同じものである。図4におけるファイル401は別の解(差分情報の例)である。
【0033】
最適差分情報生成部107が、差分情報にフラグ情報を使用する場合について説明する。
差分情報の一部をCOPYコマンドで表現した場合、ファイル401において、3行目は12バイト目から12バイトのコピーしていることになるが新版上では、10バイト目から書き込んでいることになる。4行目の「COPY」は、9バイト目から2バイトのコピーを示しているが、このコピーを実行するときには、既に10バイト目からの書き込みが行われている場合も考えられるためそのまま出力していいかどうかわからない。
【0034】
そこで、ワークメモリ上に読み込み、差分情報にフラグ情報も使うこととし、フラグ情報が来るまではワークメモリ上のデータをフラッシュROMに書き込まないこととしてデータ内容を保証する。
【0035】
次に、COPYのアドレスの位置関係で逆転がない場合、すなわち、ファイル401のように、4行目の「COPY」に基づいて、9バイト目から2バイトのコピーを実行するときに、既に10バイト目からの書き込みが行われているような場合でない場合は、COPYコマンドの後ろにフラグをつけることができる。
このフラグがあれば、そのフラグ以前の位置の情報は保証する必要がない。
【0036】
以上のようにして、最適差分情報生成部107は、最適差分情報(ここでは、差分ファイル108(所定の情報の一例である))を生成し、出力する。
【0037】
次に、最適差分情報生成部107が、最適差分情報(ここでは、差分ファイル108(所定の情報の一例である))を生成する際の最適化方法について説明する。
最適差分情報生成部107は、差分情報生成部106により生成された差分情報の内、COPYコマンド(すなわちCOPYの関係)を表現するためにかかるバイト数を調べる。例えば、COPYを1バイトで表現できるとして、COPYコマンドで表現するためには、さらに、サイズ情報とアドレス情報とが必要になる。この情報のデータサイズとデータコマンド(すなわちDATAの関係)で表現した場合のデータサイズとを比較し、どちらが最適かを決める。
【0038】
すなわち、上記書換情報生成部121、特に、最適差分情報生成部107は、上記検出部の一例である同一領域検出部105により検出されなかった上記第3の部分がある場合に、上記第3の部分にかかる部分を第3の部分ではなく上記第2の部分として上記最適差分情報(ここでは、差分ファイル108(所定の情報の一例である))を生成するようにしても構わない。
【0039】
以上のように構成することで、さらに、例えば、フラッシュROMの特性を考えた場合に必要とされるワークメモリについて、ワークメモリのサイズを考慮した新旧プログラムを書換えるための情報としての差分情報を生成することができる。
【0040】
ここで、上記新旧プログラム書換装置の一例である組込み機器は、旧プログラムを図示していない記憶装置に記憶している。組込み機器は、上記第2の部分に基づいて生成された所定の情報の一例である差分ファイル108により旧プログラムを新プログラムに書換える場合に、例えば、組込み機器が有する所定のワークメモリに自己が記憶する旧プログラムの上記第2の部分に該当する部分のコピーを退避させ、旧プログラムの内上記最適差分情報により書換える箇所を初期化し、上記所定のワークメモリに退避させた上記第2の部分に該当する部分のコピーを移動し、上記初期化された箇所に上記移動させた上記第2の部分に該当する部分のコピーを書き込む書換動作をおこなう。
【0041】
すなわち、上記新旧プログラム書換装置は、上記第2の部分に基づいて生成された所定の情報により旧プログラムを新プログラムに書換える場合に、所定の書換動作をおこなう。
【0042】
言いかえれば、差分情報生成部106は、前記領域分類手段にて生成される領域を、移動あり同一領域(第2の部分)のワークメモリ退避、更新する領域を初期化する更新領域初期化、移動あり同一領域を初期化された更新領域に移動する移動あり同一領域移動、初期化された更新領域に移動された移動あり同一領域を書き込む更新領域書込みの順を1回以上繰り返すように差分情報を生成する逐次実行差分情報生成手段でもある。
【0043】
ここで、最適差分情報生成部107は、差分情報生成部106において、生成された差分情報が前期1回あたりのワークメモリ退避の容量が実際にあるワークメモリの容量を越える場合には、超えた部分をワークメモリ退避の不要な更新領域(ここでは、データコマンド)として扱う。すなわち、ワークメモリが非常に小さく、ワークメモリ上のデータをフラッシュROMに書き込まないこととすることでもデータ内容を保証できない場合は、図4におけるファイル401の最後の行(4行目)のコピーコマンド「COPY9,2」の代わりに、ファイル400の最後の行(4行目)のデータコマンド「DATA2,FFFF」を出力することとする。
【0044】
すなわち、上記書換情報生成部121、特に、最適差分情報生成部107は、上記検出部の一例である同一領域検出部105により上記第2の部分に検出された部分がある場合に、上記部分を第2の部分ではなく上記第3の部分として上記所定の情報を生成するようにしても構わない。
【0045】
以上のようにして、最適差分情報生成部107は、最適差分情報(ここでは、差分ファイル108(所定の情報の一例である))を生成し、出力する。
【0046】
以上のように構成することで、さらに、例えば、フラッシュROMの特性を考えた場合に必要とされるワークメモリについて、ワークメモリのサイズを考慮した新旧プログラムを書換えるための情報としての差分情報を生成することができる。
【0047】
そして、上記出力部111は、上記新旧プログラム書換装置によりおこなわれる所定の書換動作に連動して第1の情報、第2の情報、第3の情報という上記複数の情報のうち上段から順に必要な次回の情報を出力する。
【0048】
以上のように、上記所定情報生成部120は、新プログラムの上段から順に、上記第1の部分に基づく場合に、上記旧プログラムの第1の部分を素通りすることを示す第1の情報(ここでは、例えば図4におけるファイル400の「SKIP0,8」)を生成し、上記第2の部分に基づく場合に、上記旧プログラムの第2の部分の位置情報とデータ量とを示す第2の情報(ここでは、例えば図4におけるファイル400の「COPY12,12」)を生成し、上記第3の部分に基づく場合に、上記新プログラムの第3の部分のデータ量とデータとを示す第3の情報(ここでは、例えば図4におけるファイル400の「DATA2,FFFF」)を生成する。
【0049】
そして、上記所定情報生成部120は、旧プログラムを新プログラムに書換えるためには上記第1の情報と上記第2の情報と上記第3の情報との内少なくとも2つの情報が必要な場合に、上記必要な内少なくとも2つの情報を新プログラムの上段から順に組合わせて上記所定の情報を生成する。
【0050】
ここで、次のような場合を考える。それは、以上のようにして生成した最適差分情報の大きさが大きい場合である。この場合、データを送り込んで操作するためにもこのデータを保持するワークメモリがフラッシュROMのイメージを作成するものとは別に必要になる。そこで、最適差分情報生成部107は、このデータ転送用のワークメモリも考えたフラグを入れるようにしても構わない。フラグ間のデータサイズはデータ転送用のワークメモリサイズを超えないように設定しておき、フラグ情報があるところで、データを分断し、ファイルに分割してもかまわない。
【0051】
かかる場合、上記構成を言いかえれば、上記書換情報生成部121、特に、最適差分情報生成部107は、所定のワークメモリを用いて旧プログラムを新プログラムに書換をおこなう新旧プログラム書換装置の所定のワークメモリサイズを記憶し、上記所定の情報が上記記憶された所定のワークメモリサイズを超えないように上記所定の情報を生成する。
【0052】
そして、上記書換情報生成部121、特に、最適差分情報生成部107は、上記所定の情報が上記記憶された所定のワークメモリサイズを超える場合に、上記所定の情報を上段から順に分割して複数の情報にすることで上記所定の情報が所定のワークメモリサイズを超えないように生成する。
【0053】
図5は、データを分割する場合の説明図である。
図5を用いて説明すると、最適差分情報生成部107の出力の差分情報であるファイル500は、全体のサイズがワークメモリサイズ503を超えている。しかし、ファイル500は、フラグ501より左側部分ではワークメモリサイズ503を超えているがフラグ502より左側部分ではワークメモリサイズ503を超えていない。このような場合に、最適差分情報生成部107は、ファイル500をファイル504とファイル505の2つのファイルに分割し、出力部111がデータを転送することにより、差分データが差分データ受信用のワークメモリを超えないようにすることができる。
【0054】
そして、上記出力部111は、上記最適差分情報生成部107により生成された複数の情報を上段から順に出力し、上記出力するにあたり上記複数の情報のうち出力された前回の情報に基づいて上記新旧プログラム書換装置により旧プログラムが新プログラムに書換られるのを待って上記複数の情報のうち次の情報を上記新旧プログラム書換装置に出力する。
【0055】
言いかえれば、上記所定のワークメモリは、上記出力部により出力された所定の情報を記憶し、上記新旧プログラム書換装置により旧プログラムが新プログラムに書換られると記憶された所定の情報を削除する。
そして、上記書換情報生成部121は、上記所定の情報が上記記憶された所定のワークメモリサイズを超える場合に、上記所定のワークメモリから削除されても構わないように上記所定の情報を上段から順に分割して複数の情報にすることで上記所定の情報が所定のワークメモリサイズを超えないように生成する。
そして、上記出力部111は、上記書換情報生成部121により生成された複数の情報を上段から順に出力する。
すなわち、上記出力部111は、上記出力するにあたり上記複数の情報のうち出力された前回の情報が上記所定のワークメモリから削除されるのを待って上記複数の情報のうち次の情報を上記新旧プログラム書換装置に出力する。
いずれにしろ、分割した単位でデータを転送し実行する。
【0056】
以上のように、最適差分情報生成部107は、差分データ量が多い場合には、データを複数のデータに分割する分割手段を備える。
【0057】
以上のように構成することで、さらに、例えば、フラッシュROMの特性を考えた場合に必要とされるワークメモリについて、ワークメモリのサイズを考慮した新旧プログラムを書換えるための情報としての差分情報を生成することができる。
【0058】
また最適差分情報を生成する上では、このようなワークメモリサイズを超えるようなフラグ間になる場合は、フラグを強制的に入れ、残りをデータで表現することでかまわない。
【0059】
また、このようにフラグを利用することにより、差分データの切れ目で、フラッシュROMのイメージを作るためのワークメモリもクリアできるように差分データを構成することができる。
【0060】
以上のように、最適差分情報生成部107における上記分割手段において、差分データの切れ目で、ワークメモリをクリアできるように情報を配置したことを特徴とする。
【0061】
本実施の形態では、このような制限のある環境で、差分を適用できるように差分情報を作成するために、差分情報にワークメモリへの読み込み、書き込みといった処理の切れ目を明確に入れ、ワークメモリサイズを意識し、時には差分情報サイズが大きくなったとしても処理可能であることを優先とする方法を適用する。
【0062】
以上のように構成することで、さらに、例えば、フラッシュROMの特性を考えた場合に必要とされるワークメモリについて、ワークメモリのサイズを考慮した新旧プログラムを書換えるための情報としての差分情報を生成することができる。
【0063】
以上の説明において、組み込みソフトウエア差分情報生成装置1は、図示されていないが、システムユニット、CRT(Cathode Ray Tube)表示装置、キーボード(K/B)、マウス、コンパクトディスク装置(CDD)、プリンタ装置、スキャナ装置を備えている。CRT表示装置、K/B、マウス、CDD、プリンタ装置、スキャナ装置は、システムユニットにケーブルで接続されている。
また、組み込みソフトウエア差分情報生成装置1は、図示されていないが、プログラムを実行するCPU(Central Processing Unit)を備えている。CPUは、バスを介してROM(Read Only Memory)(記憶装置の一例である)、RAM(Random Access Memory)(記憶装置の一例である)、通信ボード、CRT表示装置、K/B、マウス、FDD(Flexible Disk Drive)、磁気ディスク装置(記憶装置の一例である)、CDD、プリンタ装置、スキャナ装置と接続されている。通信ボードは、インターネットに接続されている。
ここで、通信ボードは、インターネットに限らず、さらに、LAN(ローカルエリアネットワーク)、或いはISDN等のWAN(ワイドエリアネットワーク)に接続されていても構わない。
磁気ディスク装置には、オペレーティングシステム(OS)、ウィンドウシステム、プログラム群、ファイル群が記憶されている。プログラム群は、CPU、OS、ウィンドウシステムにより実行される。
【0064】
また、以上の説明において、各実施の形態の説明において「〜部」として説明したものは、一部或いはすべてコンピュータで動作可能なプログラムにより構成することができる。これらのプログラムは、例えば、C言語により作成することができる。或いは、HTMLやSGMLやXMLを用いても構わない。或いは、JAVA(登録商標)を用いて画面表示を行っても構わない。
プログラムにより構成する場合、上記プログラム群には、各実施の形態の説明において「〜部」として説明したものにより実行されるプログラムが記憶されている。ファイル群には、上記実施の形態の説明において「ファイル」として説明したものが記憶されている。
また、各実施の形態の説明において「〜部」として説明したものは、ROMに記憶されたファームウェアで実現されていても構わない。或いは、ソフトウエア或いは、ハードウェア或いは、ソフトウエアとハードウェアとファームウェアとの組み合わせで実施されても構わない。
また、上記各実施の形態を実施させるプログラムは、また、磁気ディスク装置、FD(Flexible Disk)、光ディスク、CD(コンパクトディスク)、MD(ミニディスク)、DVD(Digital Versatile Disk)等のその他の記録媒体による記録装置を用いて記憶されても構わない。
【0065】
【発明の効果】
本発明により、フラッシュROMのサイズに比べてワークメモリが小さい組み込み機器のソフトウエアを更新する際に、対象となる機器上で実行可能なサイズの差分データを作成することができるようになった。即ち、実行時間、書換え速度ともに効率的に実行可能なデータを作成できる。
【図面の簡単な説明】
【図1】実施の形態1における構成図と処理の流れを示した図である。
【図2】新版、旧版ファイル構成の一例を示す図である。
【図3】同一領域検出部と差分情報生成部を説明するためのファイル例を示す図である。
【図4】最適差分情報生成部を説明するためのファイル例を示す図である。
【図5】データを分割する場合の説明図である。
【符号の説明】
1 組み込みソフトウエア差分情報生成装置、100 ハードディスク装置、101 メモリ、102 新版ファイル、103 コード読み込み部、104 新版バイナリイメージ、105 同一領域検出部、106 差分情報生成部、107 最適差分情報生成部、108 差分ファイル、110 ハードディスク装置、111 出力部、120 所定情報生成部、121 書換情報生成部、201 ファイル、202 ファイル、203 ファイル、204 ファイル、301 ファイル、302 ファイル、320 ファイル、400 ファイル、401 ファイル、500 ファイル、501 フラグ、502 フラグ、503 ワークメモリサイズ、504 ファイル、505 ファイル、602 旧版ファイル、604 旧版バイナリイメージ。[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a new and old program rewriting information generation device that generates rewriting information for new and old programs. In particular, when updating the contents of the flash memory in an auxiliary storage device of an embedded small information processing device such as a mobile phone, a method of extracting a difference in a software binary image and expressing the difference is used. Related devices.
[0002]
[Prior art]
In a system comprising a central station and a base station, in which the central station manages the processing program of the base station, the processing time for downloading the program from the central station to the base station is reduced and the configuration of the central station is simplified. The following means are known for the purpose. The central station holds the latest processing program and program block information of the base station, and if the processing program held by the
[0003]
The following means are known for the purpose of reducing the storage capacity and enabling a part of stored software to be updated. In the flash memory, the code A, the data A, and the data B are stored in an uncompressed state, and the code B is stored in a compressed state. When these stored modules are expanded on the RAM, they are performed according to a copy / decompression program. For example, the code A, the data A, and the data B are respectively copied on the RAM, and then the code B is expanded on the RAM. For example, when updating the code A, if the code A ′ to be updated is compressed to have a smaller size than the code A, the code A ′ can be replaced (updated) in the area of the code A. (See Patent Document 2)
[0004]
As a conventional technique, a stored old program is changed to a new program by copying a changed portion of the old program data from the flash memory to the RAM and returning the program data rewritten on the RAM to the flash memory. Performing the copying of the changed portion and rewriting on the RAM for each rewriting unit, wherein the rewriting unit is a sector which is a minimum unit for erasing a part of the storage area of the flash memory. Has been described. (See Patent Document 3)
[0005]
In updating data of some program blocks of program data including a plurality of program blocks stored in a flash memory, the following means is provided for the purpose of rewriting data only to the program block to be updated. Is known. For example, when updating the OS data of the function D in the flash memory storing a plurality of program blocks for realizing each of the functions A to E, before erasing the data of the fourth memory block 54, A part of the OS data of the function C and a part of the OS data of the function E, which are stored in the fourth memory block together with the OS data of the function D, are temporarily saved in the personal computer. After erasing the data of the fourth memory block, the save data is written to the original position of the fourth memory block together with the OS data of the new function D. (See Patent Document 4)
[0006]
[Patent Document 1]
JP 2000-353096 A
[Patent Document 2]
JP 2001-166941 A
[Patent Document 3]
JP-A-2002-014833
[Patent Document 4]
JP 2000-242487 A
[0007]
[Problems to be solved by the invention]
In Patent Literature 1, the program replacement is performed only by dividing the program into blocks of a fixed size, and merely dividing the program into blocks does not reduce the difference information, and the work memory required in consideration of the characteristics of the flash ROM is not considered. There was a problem that was not considered.
[0008]
[0009]
Patent Document 3 does not mention a method for reducing the difference data or the relationship with the work memory size.
[0010]
Patent Literature 4 discloses an operation sequence for updating a program, but does not mention a method for reducing difference data or a relationship with a work memory.
[0011]
Here, in the case of the flash ROM, there is a characteristic that old information must be once read into the work memory and then written again into the flash ROM. Once the flash ROM is rewritten, the old version information is rewritten and cannot be used.
In particular, in general, in the case of embedded devices and mobile phones, the work memory is not so large that a sufficient working memory is reserved due to cost considerations, and a method of creating and rewriting a new version of an image can be applied.
[0012]
An object of the present invention is to reduce difference information as information for rewriting old and new programs.
[0013]
Still another object of the present invention is to generate difference information as information for rewriting a new and old program in consideration of the size of a work memory, for a work memory required in consideration of the characteristics of a flash ROM, for example. And
[0014]
[Means for Solving the Problems]
A new and old program rewriting information generation device according to the present invention includes: a storage unit that stores a new program and an old program;
The new program and the old program stored in the storage unit are compared, and for each part of the new program, a first part of the old program and a part of the new program having the same position and contents as a part of the new program And a third part of the new program which does not exist in the old program and a second part of the old program which is different in the position but has the same contents, and the old program is determined based on the determined part. A predetermined information generating unit for generating predetermined information for rewriting the new program into
An output unit that outputs predetermined information generated by the predetermined information generation unit;
It is characterized by having.
[0015]
BEST MODE FOR CARRYING OUT THE INVENTION
Embodiment 1 FIG.
For example, in order to upgrade embedded software in the field of a device, it is necessary to input data for the version upgrade to the embedded device and rewrite the data. Sending all the information of the new software will result in a huge amount of data. Then, the difference information with the old file is sent. In order to apply the difference information, new information (new program) is created by applying the difference information to information of an old version (old program).
[0016]
An embodiment will be described below.
FIG. 1 is a diagram showing a configuration diagram and a processing flow in the first embodiment.
In FIG. 1, an embedded software difference information generation device 1 (an example of a new and old program rewrite information generation device) includes a
The storage unit stores the new program and the old program. That is, the new
The predetermined information generation unit 120 includes the same area detection unit 105 (an example of a detection unit) and a rewrite information generation unit 121. The rewriting information generation unit 121 includes a difference
[0017]
The
The memory 101 is, for example, a rewritable random access memory in a case where the memory 101 is configured by a PC.
The
[0018]
The
The new version
[0019]
The predetermined information generation unit 120 compares the new program and the old program stored in the storage unit (here, the memory 101), and determines that each part of the new program has the same position and content as a part of the new program. Any one of a second part of the old program which is different in position from the first part of a certain old program and a part of the new program but has the same contents, and a third part of the new program which does not exist in the old program Is determined, and predetermined information for rewriting the old program with the new program is generated based on the determined portion.
[0020]
Hereinafter, the function of the predetermined information generation unit 120 will be described in detail.
The same area detection unit 105 as an example of a detection unit compares the new program and the old program stored in the storage unit, and detects the first part and the second part in order from the top of the new program. I do.
In other words, the same area detection unit 105 detects the same area by comparing a plurality of binary codes read by the
[0021]
In order to detect the same area by the same area detection unit 105, comparison may be performed using address information output by a compiler or a linker as reference data for finding a shift in an address position. You may use the method of finding out from.
[0022]
Then, the rewrite information generation unit 121 detects the portion not detected by the same region detection unit 105 as an example of the detection unit as a third portion, and detects the portion by the same region detection unit 105 as an example of the detection unit. At least one of the first part, the second part, and the third part not detected by the same area detection unit 105 as an example of the detection unit is selected, and the old part is selected based on the selected part. A difference file 108 (an example of predetermined information) for rewriting a program to a new program is generated.
The following processing is performed inside the rewrite information generation unit 121.
The difference
[0023]
Next, the optimum difference
[0024]
The
The
[0025]
FIG. 2 is a diagram showing an example of a new-version and old-version file configuration.
The
In FIG. 2, a
[0026]
The conversion of the data to be converted into the form of the
As shown in the
[0027]
FIG. 3 is a diagram illustrating an example of a file for explaining the same area detection unit and the difference information generation unit.
The same area detection unit 105 first searches for an area having the same address and the same contents. The
These pieces of information are classified and output as SKIP relations by the difference
[0028]
The same area detection unit 105 searches for an area (an example of a second part) whose position is shifted next but whose contents are the same. As a specific method, a method may be used in which position information differs in function units or the like, but may be exactly the same, using output information of a compiler or a linker. ) The diff function included in the operating system may be used.
As a result of the same area detection unit 105, since the contents from
[0029]
The same area detection unit 105 does not detect an area whose contents are the same for the
[0030]
Finally, the same area detection unit 105 does not detect an area whose contents are the same from
[0031]
As described above, the difference
By generating the difference information as described above, the difference information as information for rewriting the old and new programs can be reduced.
[0032]
Next, the optimal difference
FIG. 4 is a diagram illustrating an example of a file for explaining the optimum difference information generation unit.
The
[0033]
The case where the optimal difference
When a part of the difference information is expressed by the COPY command, the third line in the file 401 is copied from the 12th byte to the 12th byte, but is written from the 10th byte in the new version. . “COPY” in the fourth line indicates a copy of 2 bytes from the 9th byte. However, when this copy is executed, the data may be output as it is because writing from the 10th byte may already be performed. I don't know if I can go.
[0034]
Therefore, the data content is assured by reading the data on the work memory and using the flag information for the difference information, and not writing the data on the work memory to the flash ROM until the flag information comes.
[0035]
Next, when there is no reversal due to the positional relationship of the COPY address, that is, when copying two bytes from the ninth byte based on “COPY” on the fourth line as in the file 401, already In the case where writing from the byte is not performed, a flag can be added after the COPY command.
With this flag, there is no need to guarantee the position information before the flag.
[0036]
As described above, the optimum difference
[0037]
Next, an optimization method when the optimum difference
The optimum difference
[0038]
That is, the rewriting information generation unit 121, particularly, the optimal difference
[0039]
With the above configuration, for example, for work memory required in consideration of the characteristics of the flash ROM, difference information as information for rewriting old and new programs in consideration of the size of the work memory is further provided. Can be generated.
[0040]
Here, an embedded device as an example of the new and old program rewriting device stores an old program in a storage device (not shown). When the embedded device rewrites the old program to the new program by the
[0041]
That is, the new and old program rewriting device performs a predetermined rewriting operation when rewriting an old program with a new program based on predetermined information generated based on the second part.
[0042]
In other words, the difference
[0043]
Here, when the difference information generated by the difference
[0044]
That is, the rewriting information generation unit 121, particularly, the optimal difference
[0045]
As described above, the optimum difference
[0046]
With the above configuration, for example, for work memory required in consideration of the characteristics of the flash ROM, difference information as information for rewriting old and new programs in consideration of the size of the work memory is further provided. Can be generated.
[0047]
The
[0048]
As described above, the predetermined information generation unit 120, in order from the top of the new program, based on the first part, passes the first information indicating that the first part of the old program is passed through (here, Then, for example, when “SKIP0,8” of the
[0049]
The predetermined information generating unit 120 is configured to rewrite the old program to the new program when at least two of the first information, the second information, and the third information are needed. The predetermined information is generated by combining at least two pieces of the necessary information in order from the top of the new program.
[0050]
Here, the following case is considered. This is the case when the size of the optimal difference information generated as described above is large. In this case, a work memory for holding the data is also required to send and operate the data in addition to the work memory for creating the image of the flash ROM. Therefore, the optimum difference
[0051]
In such a case, in other words, the rewriting information generating unit 121, in particular, the optimal difference
[0052]
When the predetermined information exceeds the stored predetermined work memory size, the rewriting information generation unit 121, in particular, the optimal difference
[0053]
FIG. 5 is an explanatory diagram when data is divided.
Explaining with reference to FIG. 5, the
[0054]
The
[0055]
In other words, the predetermined work memory stores the predetermined information output by the output unit, and deletes the stored predetermined information when the old program is rewritten by the new and old program rewriting device into the new program.
Then, when the predetermined information exceeds the stored predetermined work memory size, the rewriting information generation unit 121 deletes the predetermined information from the top so that it may be deleted from the predetermined work memory. The predetermined information is generated so as not to exceed a predetermined work memory size by sequentially dividing the information into a plurality of pieces of information.
Then, the
That is, the
In any case, data is transferred and executed in divided units.
[0056]
As described above, the optimal difference
[0057]
With the above configuration, for example, for work memory required in consideration of the characteristics of the flash ROM, difference information as information for rewriting old and new programs in consideration of the size of the work memory is further provided. Can be generated.
[0058]
Further, in generating the optimum difference information, when there is a gap between the flags that exceeds such a work memory size, the flag may be forcibly inserted and the rest may be represented by data.
[0059]
Further, by using the flag in this way, the difference data can be configured so that the work memory for creating the image of the flash ROM can be cleared at the break of the difference data.
[0060]
As described above, the division means in the optimum difference
[0061]
In the present embodiment, in such a limited environment, in order to create difference information so that the difference can be applied, a break in processing such as reading and writing to the work memory is clearly included in the difference information, and the work memory In consideration of the size, sometimes a method of giving priority to being able to process even if the difference information size becomes large is applied.
[0062]
With the above configuration, for example, for work memory required in consideration of the characteristics of the flash ROM, difference information as information for rewriting old and new programs in consideration of the size of the work memory is further provided. Can be generated.
[0063]
In the above description, the embedded software difference information generation device 1 is not shown, but a system unit, a CRT (Cathode Ray Tube) display device, a keyboard (K / B), a mouse, a compact disk device (CDD), a printer Device and a scanner device. The CRT display device, K / B, mouse, CDD, printer device, and scanner device are connected to the system unit by cables.
Although not shown, the embedded software difference information generation device 1 includes a CPU (Central Processing Unit) that executes a program. The CPU is connected to a ROM (Read Only Memory) (an example of a storage device), a RAM (Random Access Memory) (an example of a storage device), a communication board, a CRT display device, a K / B, a mouse, via a bus. It is connected to an FDD (Flexible Disk Drive), a magnetic disk device (an example of a storage device), a CDD, a printer device, and a scanner device. The communication board is connected to the Internet.
Here, the communication board is not limited to the Internet, and may be connected to a LAN (Local Area Network) or a WAN (Wide Area Network) such as ISDN.
The magnetic disk device stores an operating system (OS), a window system, a group of programs, and a group of files. The program group is executed by a CPU, an OS, and a window system.
[0064]
Further, in the above description, what is described as “-unit” in the description of each embodiment can be partially or entirely configured by a computer-operable program. These programs can be created in C language, for example. Alternatively, HTML, SGML, or XML may be used. Alternatively, the screen display may be performed using JAVA (registered trademark).
When constituted by programs, the programs stored in the above-described program group are those executed by those described as “-unit” in the description of each embodiment. In the file group, those described as “files” in the description of the above embodiment are stored.
In addition, what is described as “-unit” in the description of each embodiment may be realized by firmware stored in a ROM. Alternatively, the present invention may be implemented by software, hardware, or a combination of software, hardware, and firmware.
Further, a program for implementing the above-described embodiments includes a magnetic disk device, an FD (Flexible Disk), an optical disk, a CD (Compact Disk), an MD (Mini Disk), a DVD (Digital Versatile Disk), and the like. The information may be stored using a recording device using a medium.
[0065]
【The invention's effect】
According to the present invention, when updating software of an embedded device whose work memory is smaller than the size of the flash ROM, difference data having a size executable on the target device can be created. That is, it is possible to create data that can be executed efficiently in both the execution time and the rewriting speed.
[Brief description of the drawings]
FIG. 1 is a diagram showing a configuration diagram and a processing flow in a first embodiment.
FIG. 2 is a diagram showing an example of a new-version and old-version file configuration.
FIG. 3 is a diagram illustrating an example of a file for explaining a same area detection unit and a difference information generation unit;
FIG. 4 is a diagram illustrating an example of a file for explaining an optimum difference information generation unit.
FIG. 5 is an explanatory diagram when data is divided.
[Explanation of symbols]
1 embedded software difference information generation device, 100 hard disk device, 101 memory, 102 new version file, 103 code reading unit, 104 new version binary image, 105 identical area detection unit, 106 difference information generation unit, 107 optimal difference information generation unit, 108 Difference file, 110 hard disk device, 111 output unit, 120 predetermined information generation unit, 121 rewrite information generation unit, 201 file, 202 file, 203 file, 204 file, 301 file, 302 file, 320 file, 400 file, 401 file, 500 files, 501 flag, 502 flag, 503 work memory size, 504 file, 505 file, 602 old version file, 604 old version binary image.
Claims (13)
上記記憶部により記憶された新プログラムと旧プログラムとを比較し、新プログラムの各部に対し、新プログラムの一部と位置及び内容が同一である旧プログラムの第1の部分と新プログラムの一部と位置が異なるが内容が同一である旧プログラムの第2の部分と旧プログラムには存在しない新プログラムの第3の部分との内いずれかを判定し、判定された部分に基づいて、旧プログラムを新プログラムに書換えるための所定の情報を生成する所定情報生成部と、
上記所定情報生成部により生成された所定の情報を出力する出力部と
を備えたことを特徴とする新旧プログラム書換情報生成装置。A storage unit for storing the new program and the old program,
The new program and the old program stored in the storage unit are compared, and for each part of the new program, a first part of the old program and a part of the new program having the same position and contents as a part of the new program And a third part of the new program which does not exist in the old program and a second part of the old program which is different in the position but has the same contents, and the old program is determined based on the determined part. A predetermined information generating unit for generating predetermined information for rewriting the new program into
An output unit for outputting the predetermined information generated by the predetermined information generation unit.
上記記憶部により記憶された新プログラムと旧プログラムとを比較し、新プログラムの上段から順に、上記第1の部分と第2の部分とを検出する検出部と、
上記検出部により検出されなかった部分を第3の部分として、上記検出部により検出された第1の部分と第2の部分と上記検出部により検出されなかった第3の部分との内少なくとも1つを選択し、選択された部分に基づいて、旧プログラムを新プログラムに書換えるための所定の情報を生成する書換情報生成部と
を有することを特徴とする請求項1記載の新旧プログラム書換情報生成装置。The predetermined information generation unit includes:
A detection unit that compares the new program and the old program stored by the storage unit and detects the first part and the second part in order from the top of the new program;
A part not detected by the detection unit is defined as a third part, and at least one of the first part, the second part, and the third part not detected by the detection unit is detected by the detection unit. 2. A new and old program rewriting information according to claim 1, further comprising: a rewriting information generating unit for selecting one of the two programs and generating predetermined information for rewriting the old program to the new program based on the selected part. Generator.
上記出力部は、上記書換情報生成部により生成された複数の情報を上段から順に出力し、上記出力するにあたり上記複数の情報のうち出力された前回の情報に基づいて上記新旧プログラム書換装置により旧プログラムが新プログラムに書換られるのを待って上記複数の情報のうち次の情報を上記新旧プログラム書換装置に出力することを特徴とする請求項5記載の新旧プログラム書換情報生成装置。When the predetermined information exceeds the stored predetermined work memory size, the rewriting information generation unit divides the predetermined information in order from the top to form a plurality of pieces of information, so that the predetermined information is Generated so as not to exceed the work memory size of
The output unit sequentially outputs a plurality of pieces of information generated by the rewrite information generation unit from an upper stage, and outputs the plurality of pieces of information by the new and old program rewriting device based on previous information output from among the plurality of pieces of information. 6. The new and old program rewriting information generating device according to claim 5, wherein the next information of the plurality of pieces of information is output to the new and old program rewriting device after the program is rewritten with the new program.
上記書換情報生成部は、上記所定の情報が上記記憶された所定のワークメモリサイズを超える場合に、上記所定のワークメモリから削除されても構わないように上記所定の情報を上段から順に分割して複数の情報にすることで上記所定の情報が所定のワークメモリサイズを超えないように生成し、
上記出力部は、上記書換情報生成部により生成された複数の情報を上段から順に出力し、
上記書換情報生成部は、上記所定の情報を上段から順に分割するにあたり、上記所定のワークメモリから削除されても構わないように上記所定の情報を上段から順に分割し、
上記出力部は、上記出力するにあたり上記複数の情報のうち出力された前回の情報が上記所定のワークメモリから削除されるのを待って上記複数の情報のうち次の情報を上記新旧プログラム書換装置に出力することを特徴とする請求項5記載の新旧プログラム書換情報生成装置。The predetermined work memory stores the predetermined information output by the output unit, deletes the predetermined information stored when the old program is rewritten by the new and old program rewriting device to the new program,
When the predetermined information exceeds the stored predetermined work memory size, the rewrite information generation unit divides the predetermined information in order from the top so that it may be deleted from the predetermined work memory. By generating a plurality of pieces of information, the predetermined information is generated so as not to exceed a predetermined work memory size,
The output unit outputs the plurality of pieces of information generated by the rewrite information generation unit in order from the top,
The rewriting information generating unit, when dividing the predetermined information in order from the top, divides the predetermined information in order from the top so that it may be deleted from the predetermined work memory,
The output unit waits until the previous information output of the plurality of pieces of information is deleted from the predetermined work memory in outputting the information, and then outputs the next information of the plurality of pieces of information to the new / old program rewriting device. 6. The new and old program rewriting information generating device according to claim 5, wherein the information is output to the device.
上記出力部は、上記新旧プログラム書換装置によりおこなわれる所定の書換動作に連動して上記複数の情報のうち次の情報を出力することを特徴とする請求項6又は7記載の新旧プログラム書換情報生成装置。The new and old program rewriting device performs a predetermined rewriting operation when rewriting an old program with a new program based on predetermined information generated based on the second part,
8. The new and old program rewriting information generation according to claim 6, wherein the output unit outputs the next information among the plurality of pieces of information in conjunction with a predetermined rewriting operation performed by the new and old program rewriting device. apparatus.
上記記憶工程により上記記憶装置に記憶された新プログラムと旧プログラムとを比較し、新プログラムの各部に対し、新プログラムの一部と位置及び内容が同一である旧プログラムの第1の部分と新プログラムの一部と位置が異なるが内容が同一である旧プログラムの第2の部分と旧プログラムには存在しない新プログラムの第3の部分との内いずれかを判定する判定工程と、
上記判定工程により判定された部分に基づいて、旧プログラムを新プログラムに書換えるための所定の情報を生成する所定情報生成工程と、
上記所定情報生成工程により生成された所定の情報を出力する出力工程と
を備えたことを特徴とする新旧プログラム書換情報生成方法。A storage step of storing the new program and the old program in a storage device;
The new program and the old program stored in the storage device in the storage step are compared with each other, and each part of the new program is compared with the first part of the old program having the same position and content as a part of the new program. A judging step of judging one of a second part of the old program which is different in position from the part of the program but has the same content, and a third part of the new program which does not exist in the old program;
A predetermined information generating step of generating predetermined information for rewriting an old program to a new program based on the portion determined in the determining step;
An output step of outputting the predetermined information generated by the predetermined information generation step.
上記記憶処理により上記記憶装置に記憶された新プログラムと旧プログラムとを比較し、新プログラムの各部に対し、新プログラムの一部と位置及び内容が同一である旧プログラムの第1の部分と新プログラムの一部と位置が異なるが内容が同一である旧プログラムの第2の部分と旧プログラムには存在しない新プログラムの第3の部分との内いずれかを判定する判定処理と、
上記判定処理により判定された部分に基づいて、旧プログラムを新プログラムに書換えるための所定の情報を生成する所定情報生成処理と、
上記所定情報生成処理により生成された所定の情報を出力する出力処理と
をコンピュータに実行させるためのプログラム。Storage processing for storing the new program and the old program in a storage device;
By comparing the new program and the old program stored in the storage device by the storage processing, each part of the new program is compared with the first part of the old program having the same position and content as a part of the new program. A determination process of determining one of a second part of the old program which is different in position from a part of the program but has the same content, and a third part of the new program which does not exist in the old program;
A predetermined information generation process for generating predetermined information for rewriting an old program to a new program based on the portion determined by the determination process;
A program for causing a computer to execute an output process of outputting predetermined information generated by the predetermined information generation process.
上記記憶処理により上記記憶装置に記憶された新プログラムと旧プログラムとを比較し、新プログラムの各部に対し、新プログラムの一部と位置及び内容が同一である旧プログラムの第1の部分と新プログラムの一部と位置が異なるが内容が同一である旧プログラムの第2の部分と旧プログラムには存在しない新プログラムの第3の部分との内いずれかを判定する判定処理と、
上記判定処理により判定された部分に基づいて、旧プログラムを新プログラムに書換えるための所定の情報を生成する所定情報生成処理と、
上記所定情報生成処理により生成された所定の情報を出力する出力処理と
をコンピュータに実行させるためのプログラムを記録したコンピュータ読み取り可能な記録媒体。Storage processing for storing the new program and the old program in a storage device;
By comparing the new program and the old program stored in the storage device by the storage processing, each part of the new program is compared with the first part of the old program having the same position and content as a part of the new program. A determination process of determining one of a second part of the old program which is different in position from a part of the program but has the same content, and a third part of the new program which does not exist in the old program;
A predetermined information generation process for generating predetermined information for rewriting an old program to a new program based on the portion determined by the determination process;
A computer-readable recording medium which stores a program for causing a computer to execute an output process for outputting predetermined information generated by the predetermined information generation process.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003017959A JP2004227520A (en) | 2003-01-27 | 2003-01-27 | Device, method and program for generating old and new program rewriting information, and computer readable recording medium recording the program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003017959A JP2004227520A (en) | 2003-01-27 | 2003-01-27 | Device, method and program for generating old and new program rewriting information, and computer readable recording medium recording the program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2004227520A true JP2004227520A (en) | 2004-08-12 |
Family
ID=32904968
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003017959A Abandoned JP2004227520A (en) | 2003-01-27 | 2003-01-27 | Device, method and program for generating old and new program rewriting information, and computer readable recording medium recording the program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2004227520A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006294041A (en) * | 2005-04-13 | 2006-10-26 | Sharp Corp | System and method for updating application on mobile communication device |
JP2007219768A (en) * | 2006-02-15 | 2007-08-30 | Mitsubishi Electric Corp | Device and program for generating difference, and device and program for applying difference |
JP2008519360A (en) * | 2004-11-08 | 2008-06-05 | イノパス・ソフトウェアー・インコーポレーテッド | Compressed read-only memory file system (CRMFS) image update |
JP2008204287A (en) * | 2007-02-21 | 2008-09-04 | Access Co Ltd | Data generation method, data restoration method, data generation device and data restoration device |
JP2012069131A (en) * | 2006-06-19 | 2012-04-05 | Samsung Electronics Co Ltd | Program upgrading method and system for portable device capable of ota (over-the-air) |
JP2013517565A (en) * | 2010-01-12 | 2013-05-16 | グーグル インコーポレイテッド | Operating system automatic update procedure |
JP7447572B2 (en) | 2020-03-12 | 2024-03-12 | 富士電機株式会社 | Data distribution device, data distribution system, and data distribution method |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08255104A (en) * | 1994-12-14 | 1996-10-01 | At & T Corp | Efficient and highly safe updating of software and data |
-
2003
- 2003-01-27 JP JP2003017959A patent/JP2004227520A/en not_active Abandoned
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08255104A (en) * | 1994-12-14 | 1996-10-01 | At & T Corp | Efficient and highly safe updating of software and data |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008519360A (en) * | 2004-11-08 | 2008-06-05 | イノパス・ソフトウェアー・インコーポレーテッド | Compressed read-only memory file system (CRMFS) image update |
JP2006294041A (en) * | 2005-04-13 | 2006-10-26 | Sharp Corp | System and method for updating application on mobile communication device |
US8549049B2 (en) | 2005-04-13 | 2013-10-01 | Sharp Laboratories Of America, Inc. | Systems and methods for updating an application on a mobile information device |
JP2007219768A (en) * | 2006-02-15 | 2007-08-30 | Mitsubishi Electric Corp | Device and program for generating difference, and device and program for applying difference |
JP2012069131A (en) * | 2006-06-19 | 2012-04-05 | Samsung Electronics Co Ltd | Program upgrading method and system for portable device capable of ota (over-the-air) |
JP2008204287A (en) * | 2007-02-21 | 2008-09-04 | Access Co Ltd | Data generation method, data restoration method, data generation device and data restoration device |
JP2013517565A (en) * | 2010-01-12 | 2013-05-16 | グーグル インコーポレイテッド | Operating system automatic update procedure |
JP7447572B2 (en) | 2020-03-12 | 2024-03-12 | 富士電機株式会社 | Data distribution device, data distribution system, and data distribution method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20060161605A1 (en) | Data management system, a data management apparatus, a data management method, a data supplying system, and a computer-readable recording medium with a program recorded therein | |
JP2004152136A (en) | Data update system, difference data generation device and program for data update system, and post-update file restoration device and program | |
CN113066515B (en) | Optical disc recording method, computing equipment and readable storage medium | |
US7761860B2 (en) | Pre-compiling device | |
US7458071B2 (en) | Compilation method, compiler apparatus and compiler | |
JP2004227520A (en) | Device, method and program for generating old and new program rewriting information, and computer readable recording medium recording the program | |
WO2010044150A1 (en) | Program change management device, program change management program, and program change management method | |
US7478386B2 (en) | Resource-conservative installation of compressed archives | |
CN111984300B (en) | Code copying method and device, electronic equipment and computer readable storage medium | |
JP4768984B2 (en) | Compiling method, compiling program, and compiling device | |
US11789708B2 (en) | Compression of firmware updates | |
JP5100500B2 (en) | Data rewriting system, new edition data creation device, difference data creation device, new edition data creation program, and difference data creation program | |
JP4036852B2 (en) | DIFFERENTIAL DATA GENERATION DEVICE, DIFFERENTIAL DATA GENERATION METHOD, AND DIFFERENTIAL DATA GENERATION PROGRAM | |
WO2020158347A1 (en) | Information processing device, method, and program | |
JP6245028B2 (en) | Execution control method, execution control program, and execution control apparatus | |
JP4942144B2 (en) | Information processing apparatus, control method therefor, program, and storage medium | |
JP2011164759A (en) | Method, device, and program for updating bios | |
JP4477947B2 (en) | Differential application embedded device system and stored data changing method | |
JP2004258865A (en) | Method of processing information | |
JP4791205B2 (en) | Difference generation device, difference application device, difference generation program, and difference application program | |
JP4504756B2 (en) | Memory management method and memory management program in Java (registered trademark) execution environment | |
JP4865449B2 (en) | Difference generation device, difference application device, difference generation program, difference application program, difference generation application system, and difference generation application method | |
JP4249793B2 (en) | DIFFERENTIAL DATA GENERATION DEVICE, DIFFERENTIAL DATA GENERATION METHOD FOR DIFFERENTIAL DATA GENERATION DEVICE, AND DIFFERENTIAL DATA GENERATION PROGRAM | |
JP2006011950A (en) | Installer creating apparatus, its method, and program therefor | |
KR100866546B1 (en) | System and Method for developing software for sensor node |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20040511 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20040519 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20040616 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20041026 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20050322 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20050518 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20050518 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20050621 |
|
A762 | Written abandonment of application |
Free format text: JAPANESE INTERMEDIATE CODE: A762 Effective date: 20050722 |