dkload                     AFS Commands                  dkload


NAME

   dkload -- incorporate   external   libraries   into  kernel

                       without rebooting.


   dkload  [-readonly]  [-quiet]  [-verbose]  [-syscallResult
   <number>]
   [-path <object path>]  [-ld_cmd <loader path>]
   [-as_cmd <assembler path>]  [-nm_cmd <nm path>]
   [-libcommon <path>] [-kernel_alloc <path>]
                                                    +
   [-name <library name>]  [<library to incorporate> ]

ACCEPTABLE ABBREVIATIONS

   This command does not use the syntax conventions of the  AFS
   command  suites.   Therefore, "dkload" must be typed in full
   and switches must always be included,  though  they  may  be
   shortened as indicated.

   dkload  [-r]  [-q]  [-v]  [-s <number>] [-p <object path>]
   [-ld <loader path>]
   [-a <assembler path>]  [-nm <nm path>]  [-li <path>] [-k
   <path>]
                                                  +
   [-na <library name>]  [<library to incorporate> ]

DESCRIPTION

   Loads  one  or more libraries into the memory version of the
   local machine's kernel.  It does not alter the disk  version
   of  the kernel (/vmunix or equivalent).  Its intended use is
   loading the AFS routine library, lib.afs, into the kernel on
   client machines.

   The  dynamic  loader  begins by requesting (from a low-level
   kernel routine) allocation of a certain amount of memory  in
   which  to  load the libraries.  It resolves cross-references
   between  procedures  in  the  existing  kernel  and  in  the
   libraries (referred to as "linking" the two).  The result is
   a  list  of  memory  addresses  for   the   cross-referenced
   procedures,  which the dynamic loader stores in a table.  It
   generates  an  executable  version  of  the  libraries  with
   correct  addresses  inserted for all of the necessary kernel
   variables and procedures, and loads the executable into  the
   memory space allocated in the first phase.

REQUIREMENTS

   The  dkload  binary  file should be available in the current
   working directory, or the issuer must specify a pathname  in
   the    command    name.      The   standard   directory   is
   /usr/vice/etc/dkload     on     client     machines      and
   /usr/afs/bin/dkload on file server machines.

   The file kalloc.o should be available in the current working
   directory, or the issuer must specify a pathname with either
   the -kernel_alloc or -path argument.  This file helps in the
   first phase of dynamic loading:   allocating  kernel  memory



   for the libraries.  It is generated automatically during the
   compilation of the dkload program.

   The file libcommon.a should  be  available  in  the  current
   working  directory,  or  the  issuer must specify a pathname
   with either the -libcommon or -path  argument.    This  file
   helps  in  the  second  phase  of dynamic loading: resolving
   cross-references.  It is generated automatically during  the
   compilation of the dkload program.

   The library file(s) to be loaded (such as lib.afs) should be
   available in the current working directory,  or  the  issuer
   must use the -path argument to specify the correct path.

   The  binary  files for the standard UNIX commands ld, as and
   nm should be available in a local disk directory included in
   the  issuer's  $PATH  environment  variable.  Otherwise, the
   issuer needs to use  the  -ld_cmd,  -as_cmd  and/or  -nm_cmd
   arguments to specify the correct pathname.

ARGUMENTS

   -readonly       directs  the  command  interpreter to report
                   the actions it would  perform  if  executing
                   the command, rather than actually performing
                   it.

   -quiet          suppresses the  trace  of  actions  that  by
                   default appears on standard output (stdout).

   -verbose        increases  the  amount of information in the
                   trace  that  appears  on   standard   output
                   (stdout).    Multiple instances of this flag
                   may be provided, resulting (up to a  certain
                   point)  in  a  increasing level of detail in
                   the trace.

   -syscallResult  specifies  the  memory  address   at   which
                   allocation begins when the -readonly flag is
                   provided.  This is useful  when  the  issuer
                   wants  to  specify a memory address obtained
                   during a previous aborted run of dkload.

                   Provide  this  argument  only   when   using
                   -readonly.   The value may be either a large
                   decimal or hexidecimal  number  (the  latter
                   beginning  with  0x).    If this flag is not
                   provided, the value defaults to  0xc1456780,
                   which  may  not be acceptable on all machine
                   types but has the advantage that  it  causes
                   allocation to begin well above the addresses
                   used by standard libraries.

   -path           specifies the directory in which the command
                   interpreter  can  find kalloc.o, libcommon.a
                   and each library to be loaded, if  they  are
                   not  in  the current working directory.  The
                   value of  this  argument  is  overridden  by
                   -kernel_alloc   and   -libcommon,   or   the
                   pathnames  given   for   each   library   to
                   incorporate.



   -ld_cmd         specifies the pathname to the binary for the
                   UNIX ld command, which  the  kernel  dynamic
                   loader uses during the linking phase.

                   This  argument  is  necessary  only  if  the
                   issuer's $PATH environment variable will not
                   lead to the correct binary file.  The binary
                   file cannot be in AFS, for  instance,  since
                   the  dynamic  loader runs before the machine
                   can access AFS.

   -as_cmd         specifies the pathname to the binary for the
                   UNIX  as  command,  which the kernel dynamic
                   loader uses during the linking phase.

                   This  argument  is  necessary  only  in  the
                   conditions specified under -ld_cmd.

   -nm_cmd         specifies the pathname to the binary for the
                   UNIX nm command, which  the  kernel  dynamic
                   loader uses during the linking phase.

                   This  argument  is  necessary  only  in  the
                   conditions specified under -ld_cmd.

   -libcommon      specifies the pathname  of  the  libcommon.a
                   file.

                   This  argument is necessary only if the file
                   does  not  reside  in  the  current  working
                   directory  or if the -path argument does not
                   indicate the correct directory for it.

   -kernel_alloc   specifies the pathname of the kalloc.o file.

                   This  argument  is  necessary  only  in  the
                   conditions specified under -libcommon.

   -name           specifies  the  variable part of the library
                   name to be loaded: the  command  interpreter
                   loads        the        library       called
                   "lib<library name>.a".    For  example,   if
                   <library  name>  is  afs, then libafs.a gets
                   loaded.

                   Provide  this   argument   OR   library   to
                   incorporate.

   library to incorporate names each library to be incorporated
                   into the kernel.

                   Provide this argument OR -name.

EXAMPLE

   The following loads in the AFS libraries.  It  assumes  that
   all  files  can  be  found in the current directory or other
   expected place.  The issuer desires extra trace information.

   % dkload -verbose -name afs



PRIVILEGE REQUIRED

   Issuer must be logged into the machine's UNIX file system as
   "root" or at least have w access to /dev/mem and /dev/kmem.
