DOC-NO: 1553-CXA 109 62, Rev A Uen

User guide for the mkconfig tool

General

The mkconfig tool is used to generate configuration files
that are are required by boards that use the IPLOADR (ref.1) 
to load programs.

The configuration file is a readable ASCII file that contains 
information about the individual blocks that should be loaded 
onto a board.

The mkconfig tool is delivered as independent src code that
can be compiled to work on the Solaris and Linux platforms,
(ref.4).

Mkconfig can be dowloaded as a tar-file from GASK and then
compiled with make on the host machine on which it will 
execute.

Execute mkconfig in a shell, for example console or xterm.


Use case

To generate a configuration file all the program files that 
should be loaded onto the board must be located in an accessible
directory. Currently (rev R1B) the only supported program format 
is the RPDOUT fomat, (ref ?), which is an uncompressed program 
format that has the file extension .chk.

For example of usage see the following example. In the example a 
small guide from the mkconfig binary is included. The help guide 
can be found by just entering mkconfig in a shell where the 
mkconfig binary resides.

-------------------------------------------------------------
Usage: mkconfig [-options] infile1.chk [infile2.chk ...]
    -p <path>    Path name to be added to each program file.
    -o <file>    Write output to this file (config.txt is default).
    -v           Display current program version.
    -f           Force creation of erroneous configuration file.

In this example a file named config_1.txt will be created.
It will contain information to load the program files inet, iploadr
and riexr via IPLOADR.

to102io4>mkconfig -o config_1.txt -p PROGRAM_FILES/ INET/inet_rpi_CXC\
         1323465_R2A.chk IPLOADR/iploadr_CXC1322955_R1C.chk RIEX/riexr\
         _CXC14613_R3A04.chk

-------------------------------------------------------------


A generated mkconfig file will contain information for the IPLOADR
to be able to load correct program files. The generated
file will contain three entries for each included file:
 
- the directory (url) in where the file is located on the file server.
  The directory is relative to the /tftpboot/ directory on
  the file server.
- a checksum of each file. 
- the SUID of the file. The SUID is extracted from the program
  file. 

An example of a generated file can be seen below.

-------------------------------------------------------------
# Config file for IPLOADR.
# Automatically created by the mkconfig utility, do not edit!

[PROG1]
url = PROGRAM_FILES/INET/inet_rpi_CXC1323465_R2A.chk
checksum = 0xc060
suid = CXC1323465R2A

[PROG2]
url =  PROGRAM_FILES/IPLOADR/iploadr_CXC1322955_R1C.chk
checksum = 0xb6f4
suid = CXC1322955R1C

[PROG3]
url = PROGRAM_FILES/RIEX/riexr_CXC14613_R3A04.chk
checksum = 0x8db1
suid = 9000/CXC14613R3A04

[CONFIG]
created = Fri Feb 22 15:04:24 2002
by = telorb@to102io4
checksum = 0xdae1
-------------------------------------------------------------

The generated configuration file could be placed in any decired
directory of the file server. The configuration file will be fetched
by a board when the board knows from where to fetch it. The fetching 
information is distributed to the board when the board gets a
DHCP-reply from a DHCP-server, see the Requirements section.


Requirements

Below are all the requirments that need to be met to be able to
use the configuration file. For further knowledge see IPLOADR
documentation (Ref.1) and INET documentation (Ref.2).

- A board or boards that use the IPLOADR function.
- A bootserver (DHCP) that assigns the board's IP-addresses,
  an IP-address of a file server and a search path to a
  the generated configuration file, also see Ref.3 for 
  knowledge of address assignment.
- A file server (TFTP), that contains the configuration file
  and all the programs that are referred to in the configuration
  file.


References
1) IPLOADR, 1551-XXXXXXXX Uen
2) INET, 1551-CNZ 212 333 Uen
3) RIEX, Interface description
   Magazine address handling in GEM, 1/15519-CAA 204 03 Uen
4) Product number for mkconfig src code?