Charles.Forsyth20080316-1724f8aa38218 years agoHistory
80 lines · 3.7 KB · Text
RawDownload
Installing hosted Inferno from source First change mkconfig to reflect your host environment,specifically ROOT (which must be an absolute path name), SYSHOST and OBJTYPE.      Like the native kernels  emu relies on  several  auxil-iary libraries (the source of which it often shares with thenative kernels).  Emu itself is built by the  mkfile in theemu  platform  directory  for  the host, as described above.Each library has its own  mkfile; the various components aremade  in  the  right order by the  mkfile at the root of theInferno tree.  The   mkfile  for  each  platform  will  alsoinvoke  mk recursively to make the appropriate libraries fora given configuration.      The Unix emu variant generally is  covered  by  `POSIX'(with  common  extensions)  but  each Unix port has one filethat   differs   considerably   for   each   port,    namelyemu/platform/os.c, the differences corresponding to the dif-ferent ways  under  Unix  of  implementing  kernel-scheduledthreads efficiently.      There  are  working  emu  versions   for   FreeBSD/386,Irix/mips,  Linux/386,  MacOSX/power, Plan 9, Solaris/sparc,and Windows (NT, 2000 and Explorer plug-in).  Each  platformtypically  uses  mechanisms  specific  to the host operatingsystem to implement Inferno's internal thread/process struc-ture.   POSIX  threads  have often been found to be insuffi-cient (poorly implemented) on some platforms, and if so  areavoided.  See  kproc in  emu/*/os.c.      Source is included for ports to HP/UX  (S800  architec-ture),  Solaris/386, and Unixware, in case someone wishes totake them up now, but we have not determined their fitness.      The Plan 9 hosted implementation is unusual in that  itsupports several processor types:  386,  mips,  power (PowerPC) and  sparc.  Furthermore, all versions of   emu  can  bebuilt on any processor type, in the usual way for Plan 9.      Otherwise, as distributed,  emu for a platform can onlybe built when running on that platform.      One unusual variant makes the whole of Inferno a  plug-in  for Microsoft's Internet Explorer, giving the same envi-ronment for Inferno applications running in an HTML page  asis  provided by hosted or native Inferno.  That is, there isnot a distinct `applet' environment with special programminginterfaces.   The  source for the various plug-in componentsis found in  /tools/plugin and    /usr/internet  within  theInferno  tree;  they  use the version of  emu defined by theconfiguration file  /emu/Nt/ie.      All the libraries an executables can be built in a treecontaining only the source code.  To do that for a supportedvariant of hosted Inferno, on Unix or Plan 9, do the follow-ing in the root of the Inferno tree: 1.   Run  makemk.sh to rebuild the   mk  command,  which  is     used to build everything else. 2.   Set  PATH (or  path on Plan 9)  to  include  the    bin     directory for the platform, which will now contain the     mk binary just built.  On Unix, export  PATH. 3.   Then  mk nuke to remove any extraneous object files. 4.   Finally,    mk  install  to  create  and  install   the     libraries,    limbo  compiler,  emu for hosted Inferno,     and auxiliary commands.  The rules do that in an  order     that ensures that the commands or libraries needed by a     later stage are built and installed first.  (Note  that     a  plain   mk will not suffice, because it does not put     the results in the search path.) Doing something similar  on  Windows  or  Plan  9  currentlyrequires  the  executable  for    mk  to be available in thesearch path, since there is no  equivalent  of    makemk.sh.Otherwise  the procedure is the same.  On Plan 9, of course,the host system's normal version of  mk should be adequate.