The following text explains how to use the mkinp tool for building default
db input file 


1. DB file usage
    When system is in the uninitialized state, that is, the flash is
erased, the db import routine of DBIF will read in a DB file (default at
/etc/db/dbinput.db) and initialize the flash, and resume the normal start up
procedure. 
    Besides, when active APIs are enabled in DBIF, it will import the active
data from a DB file, too. These are the two situations where a DB file is
needed.

2. create DB file
    mkinp is the utility for creating the DB file. The tool read in a text
file for describing the data of the database, and then write it out to the
DB file. The format of the text file is explained later. When creating the
file, there are some mandatory options to specify, -f means a DB file is
creating, -i is the input text file name. These 2 options must be specified.
As for other options, -o is the output file name, if not specified, the
input file name will be used, with its extension changed to .db, and the -s
is expert-only option, which specify the db size.

3. Text file format
  a. it must be start by a group name, then 1 or more variable definition
for the group, followed by another group name, 1 or more variable
defineition for the second group, and so on.
  b. the last line must be newline alone, and it must immediately follow the
last data value, ie, no more than 1 newline at the end of file is allowed.
  c. group name is defined be a square-bracket
  d. The database spec
   there are 5 types of vars, the type value are 1 to 5, which represent,
respectively, byte, number, short (<=31 bytes), medium (<=63 bytes) and long
(<= 255bytes). The text_input_file (e.g. dbinput.txt) must be in
group_name      <=15 bytes
varname1        <=15 bytes
type		1-5
var_value	1byte(in decimal or 0x-hex), 4 byte, or strings
varname2	
type
var_value
\n
 
4. Sample Text file
    See dbinput.txt 

2006/5/18
Loren Hsu