minix/commands/reboot
Gianluca Guida cc17b27a2b Build NetBSD libc library in world in ELF mode.
3 sets of libraries are built now:
  . ack: all libraries that ack can compile (/usr/lib/i386/)
  . clang+elf: all libraries with minix headers (/usr/lib/)
  . clang+elf: all libraries with netbsd headers (/usr/netbsd/)

Once everything can be compiled with netbsd libraries and headers, the
/usr/netbsd hierarchy will be obsolete and its libraries compiled with
netbsd headers will be installed in /usr/lib, and its headers
in /usr/include. (i.e. minix libc and current minix headers set
will be gone.)

To use the NetBSD libc system (libraries + headers) before
it is the default libc, see:
   http://wiki.minix3.org/en/DevelopersGuide/UsingNetBSDCode
This wiki page also documents the maintenance of the patch
files of minix-specific changes to imported NetBSD code.

Changes in this commit:
  . libsys: Add NBSD compilation and create a safe NBSD-based libc.
  . Port rest of libraries (except libddekit) to new header system.
  . Enable compilation of libddekit with new headers.
  . Enable kernel compilation with new headers.
  . Enable drivers compilation with new headers.
  . Port legacy commands to new headers and libc.
  . Port servers to new headers.
  . Add <sys/sigcontext.h> in compat library.
  . Remove dependency file in tree.
  . Enable compilation of common/lib/libc/atomic in libsys
  . Do not generate RCSID strings in libc.
  . Temporarily disable zoneinfo as they are incompatible with NetBSD format
  . obj-nbsd for .gitignore
  . Procfs: use only integer arithmetic. (Antoine Leca)
  . Increase ramdisk size to create NBSD-based images.
  . Remove INCSYMLINKS handling hack.
  . Add nbsd_include/sys/exec_elf.h
  . Enable ELF compilation with NBSD libc.
  . Add 'make nbsdsrc' in tools to download reference NetBSD sources.
  . Automate minix-port.patch creation.
  . Avoid using fstavfs() as it is *extremely* slow and unneeded.
  . Set err() as PRIVATE to avoid name clash with libc.
  . [NBSD] servers/vm: remove compilation warnings.
  . u32 is not a long in NBSD headers.
  . UPDATING info on netbsd hierarchy
  . commands fixes for netbsd libc
2011-06-24 11:46:30 +02:00
..
halt.c Shutdown changes for multiboot: CTRL-ALT-DEL resets, panic halts 2010-08-30 19:01:58 +00:00
log.c Build NetBSD libc library in world in ELF mode. 2011-06-24 11:46:30 +02:00
Makefile Rename mkfiles from minix.*.mk to bsd.*.mk 2010-06-25 18:29:09 +00:00
README Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
sh_wall.c Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
shutdown.c Build NetBSD libc library in world in ELF mode. 2011-06-24 11:46:30 +02:00

This a new implementation of a shutdown procedure. It allows 
the system to go down graciously with informing the
users. This package contains 3 programs:

- halt = Immediately stop the system, no info to users
- shutdown = Inform users, close down the system properly
- wall = Vincent Archer's implementation of wall (Write all)

Installing

Shutdown and halt use a new systemcall, which I've added to
MM. Therefor there are several diff's which should be applied:

callnr.hd - New callnr for reboot(2)
	   Diff against /usr/include/minix/callnr.h.
	   Those of you using a symlink package should
	   change the number and mm/table.c into a free
	   number. I used 54, LSTAT.
param.hd - Defines reboot_flag as a part of the messages
proto.hd - Add's prototype for do_reboot()
table.cd - Interpretation of the systemcall to MM
mm.cd -	   I have added the do_reboot code to mm/getset.c but
	   I couldn't find a getset.c to create a useable diff :-(
	   So you can add where you want it. It is pure code, no diff.

Now edit log.c and search for ``host''. Change this into your
systemname or make it empty.

Shutdown and halt log their actions in /usr/adm/log, edit the
makefile and undefine -DLOG if you don't want this (this at the end of
the makefile). You can change SHUT_LOG in shutdown.c and log.c if you
want it in another file.

Then type a `make'. This will take a minute or so (13 sec. with bcc :-).
Remember to build a new image and update the ps_database.

Type `make install' to place the program's where I've got them.
Use them, try them and let me now if you've got problems running
something.

I have tested to sources both on 16-bits and 32-bits MINIX. I have compiled
it with gcc, bcc and ACK, so that shouldn't really give a problem. Maybe
the standard MINIX-make chokes on the makefile, atleast mine did.

NOTE:
	Make install does not place the man-pages somewhere. You should
	do this yourself.

--
Edvard Tuinder        ed@pulstar.NL.mugnet.org    v892231@si.hhs.NL
Student Computer Science
Haagse Hogeschool, The Hague, The Netherlands