WDBS is a Wanda application that implements the subset of the standard Wanda Bootserver. A WDBS is a Wanda application(see directory .../master/wapps/wboot) built containing the kernel and hostinfo files for the systems to be booted and a trivial directory structure to find these files based on the requestors MSNL address.
The wbtool (see wbtool.8) takes a set of binary files (it strips the a.out header from these), and a list of text files and generates an assembler file from hell (order of 1Mbyte ASCII) - this provides part of the interface defined in .../wapps/wboot/wdbf.h:
extern int wdbf_num; extern char *wdbf_names[]; extern long wdbf_len[]; extern char *wdbf_data[];These are the obvious things: number of files, array of names, array of length, base pointers to data.
The directory is provided by the struct wdbf_dir structure:
#define WDB_MAX_IMAGES 16
#define WDB_END (WDB_MAX_IMAGES + 1)
typedef struct wdbf_dir {
unsigned char msnl_addr[4];
int bufs[WDB_MAX_IMAGES];
} WDBF_DIR;
extern int wdbf_dir_len;
extern struct wdbf_dir wdbf_dirs[];
This can be constructed by hand, but for switches this is done
automatically by the sc program, in the generated file <switch>-wdbc.c. The WDBS the uses this structure to lookup the files
that should be a-wdbf.appended together for booting according to the
MSNL address; the files are provided by the list of indices (up to 15)
into the wdbf_names, wdbf_len, and wdbf_data arrays,
terminated with a WDB_END.
The normal use of wbtool is to load one kernel and separate hostinfo files for each machine. A script hi can be used to generate the hostinfo files. Hence a plausible sequence of events is:
hi city00 > city00 #sc hi city01 > city01 #sc hi city02 > city02 #sc hi city03 > city03 #sc wbtool -a city_fpcNgr -h city00 city01 city02 city03 > city-wdbf.s #sc
The -a argument tells wbtool to generate ARM assembler, then a single binary file city_fpcNgr, the kernel, then the four hostinfo files.
In fact, the city-wdbc.c file:
/*
* Generated by sc tool v$Id: sc.c,v 1.14 1993/12/06 16:39:58 dm Exp $
* Generated by sc tool at Wed Feb 9 13:46:53 1994
*
* These lines magic
hi city00 > city00 #sc
hi city01 > city01 #sc
hi city02 > city02 #sc
hi city03 > city03 #sc
wbtool -a city_fpcNgr -h city00 city01 city02 city03 > city-wdbf.s #sc
*
*/
#include "wdbf.h"
struct wdbf_dir wdbf_dirs[] = {
{ {128, 232, 133, 48}, {0, 1, WDB_END, } },
{ {128, 232, 133, 49}, {0, 2, WDB_END, } },
{ {128, 232, 133, 50}, {0, 3, WDB_END, } },
{ {128, 232, 133, 51}, {0, 4, WDB_END, } }
};
int wdbf_dir_len = sizeof (wdbf_dirs) / sizeof (struct wdbf_dir);
contains the magic needed for the WDBS directory, together with the
required lines for generating the WDBS file system - the standard
Makefile will extract these lines and execute them in response
to make <switch> (in this case make city).