Commit Graph

87127 Commits

Author SHA1 Message Date
fvdl f8ff451a0a Fix reversed wait/nowait logic. 2001-10-31 22:23:18 +00:00
thorpej 44f1c938e8 Don't actually need elf64 support in installboot(8). 2001-10-31 22:13:03 +00:00
christos 961acd7fc2 PR/10266: t_getstr() leaks memory. This PR will stay in feedback
until the problem gets addressed properly. The following fix
is a stopgap measure to stop the leaking :-(

I fixed the t_getstr() memory leak problem, but that instantly
revealed a problem in t_agetstr() which is an extremely broken
interface. It realloc's memory, potentially moving the area where
it returned pointers into in previous calls. This function needs
to be removed and or changed. I added a horrible work-around for
now, but I will revisit the problem shortly. In the meantime nobody
should be using the t_agetstr() API, and I'll be fixing the rest
of the programs and or the API when I figure out the best solution...
This is t_agetstr() is used by:

	games/hack/hack.termcap.c
	games/larn/io.c
	games/tetris/screen.c
	lib/libterm/termcap.c
	lib/libterm/termcap.h
	libexec/getty/main.c
	usr.bin/top/screen.c
	usr.bin/ul/ul.c
2001-10-31 21:52:17 +00:00
thorpej 66f972ab70 Need byteorder.c for loadfile_elf*.c 2001-10-31 21:39:02 +00:00
thorpej 0971f93345 Make the ELF loadfile routines byte-order independent when used in
a non-_STANDALONE environment (e.g. installboot(8)): internalize and
externalize the exec, program, and section headers as necessary.

Reviewed and OK'd by Christos.
2001-10-31 21:24:09 +00:00
jdolecek d58125dd1f kill one more duplicate 2001-10-31 21:15:43 +00:00
tv a988fe0a8a Revert previous. src/include depends on the ability of <bsd.inc.mk> to
provide things to INCS with / in them.  Since nothing in-tree yet uses
INCS{DIR,NAME}_filename, this is not a loss at the moment.
2001-10-31 21:15:41 +00:00
jdolecek f15ae836f3 kill duplicates 2001-10-31 21:13:23 +00:00
jdolecek d66dfc84d0 Xref disklabel and mention that mbrlabel can help setup the disk label
Note that NTFS partition is no longer accessible in NetBSD once
it's marked 'dynamic' in MS Windows XP.

Pointed out by Christos.
2001-10-31 21:04:45 +00:00
tv 01523890ba No need to do the tricky XRPCGEN dance. 2001-10-31 20:58:28 +00:00
tv 89bc80292e No need to do the tricky XRPCGEN dance; simply add the rules after
.include <bsd.lib.mk>.  Defining the explicit compile rules later is fine.
2001-10-31 20:56:09 +00:00
tv 8e97329393 Don't try to do uid or gid lookups from a supplied spec file if -W is given;
the numerical IDs won't be used anyway.
2001-10-31 20:41:17 +00:00
jdolecek 159a2b871c use right number of zeroes for Cyrix i386_cpuid_cpus[] entries
reformat the entries with all zeroes to be more easier to verify
2001-10-31 20:35:21 +00:00
thorpej a43b4351a8 Oops, committed wrong copy of file in previous revision. 2001-10-31 20:22:22 +00:00
thorpej 90aee7593a Add standalone 64-bit to/from {big,little}-endian routines. 2001-10-31 20:19:52 +00:00
atatat 6e885d365a Turn the tun device/network interface into a cloning device. 2001-10-31 20:08:17 +00:00
tv dadd6e7370 Major cleanup and overhaul:
* Allow MACHINE to be set automatically on NetBSD native builds.
  Require -m only if the host is not NetBSD.

* Fail if DESTDIR is set to root (/) and the build is not NetBSD native,
  or the build is attempting a "make release" (option -R).

* Warn the user if DESTDIR is set to root (/) that the kernel must be up
  to date, or else the build might hose the system.  Also, do not remove
  DESTDIR on -r if it is set to root.

* Fail if TOOLDIR is set to / or empty after checking with nbmake.

* Allow DESTDIR and TOOLDIR to be set in mk.conf and/or by the new default
  from <bsd.own.mk>.  Note that if -T is not used to set TOOLDIR, and
  TOOLDIR is not set in the environment, then nbmake will always be
  bootstrapped (rather than looking at nbmake's timestamp).  This is
  because /bin/sh doesn't know how to get TOOLDIR from mk.conf without
  first having nbmake (...which lives in TOOLDIR).

* Do a pass of "make obj" through src/tools before installing nbmake (so
  long as -o/MKOBJDIRS=no is not specified).  This ensures that objdirs
  exist if they are desired, and paves the way for using build.sh to
  build all the src/tools without building everything else.

* Add "-w" option, which allows the builder to specify where the nbmake
  wrapper shell script should be created.  If not specified,
  $TOOLDIR/bin/nbmake-$MACHINE is still created as a default.

* Print the values of DESTDIR and TOOLDIR after bootstrapping nbmake,
  for informational purposes.

It should now be possible to type just "./build.sh" on a NetBSD-current
host and get a new build in / for the appropriate architecture.
However, building in-place like this has *not* been extensively tested
yet, so be careful.
2001-10-31 19:59:43 +00:00
gmcgarry 1d6a2b23b9 vn_marktext.9 becomes vn_markexec.9 2001-10-31 19:57:18 +00:00
gmcgarry 8e84a660f0 Document new VEXECMAP vnode flag and rename vn_marktext() to vn_markexec(). 2001-10-31 19:53:07 +00:00
jmc 100b449518 Add back logic which forces DESTDIR=/ for the distrib-dirs rule if it's not set
or it's blank. The new toolchain rules set it to blank which can run into
the sanity checks in etc/Makefile
2001-10-31 19:41:54 +00:00
tv a75f4fb35e Don't actually delete the default tooldir on "cleandir"; else we'll nuke
the nbmake that is probably currently running.

Just leave the "cleantools" manual target as a shortcut for the user.
2001-10-31 19:38:02 +00:00
jdolecek 1295376b01 Couple changes, mainly to address stuff raised recently on port-i386
('Does i386 support NTFS5 now?'):

add a note both NTFS4 and NTFS5 are supported
reformat the Limitations a bit
assert the write support is not really useful, and should not be used
add a BUGS section, note missing stuff for the write support to be useful,
and the disk label thing spotted by Christos Zoulas
2001-10-31 19:16:36 +00:00
skrll 04b6a0a047 You can build libraries with more than just cc(1) now you know. 2001-10-31 18:44:11 +00:00
jdolecek 76dc75c365 svr4 compat LKMs work on i386 2001-10-31 18:30:18 +00:00
jdolecek 2b5db1a8bb add the compat_util.c goo
XXX should prolly share this with lkm/compat, which has the same thing
2001-10-31 18:28:50 +00:00
jdolecek 060f8eead1 Add the COMPAT_UTIL_OVERRIDE stuff, and (commented out) COMPAT_43 stuff 2001-10-31 18:27:31 +00:00
skrll 0a9eeb6303 Add a man page for ld.elf_so. 2001-10-31 18:26:23 +00:00
jdolecek af8a31dd42 For i386, set gate for fasttraps appropriately when loaded (and
unset on unload), similarily to what i386/machdep.c does #ifdef
COMPAT_SVR4. This makes the svr4 LKM actually work on i386.
XXX kind of ugly, but doing this more generic way would be overkill
2001-10-31 18:25:53 +00:00
jmc a6ddeb5145 Add a sanity check. Don't rm -rf / if TOOLDIR or DESTDIR got set to / and -r
was an option
2001-10-31 18:23:55 +00:00
jdolecek 6cb3157ebe Add defines for the rest of fasttraps as defined on Solaris8/i386. For
documentation purposes only (though CLOCK_SETTIME a.k.a T_GETHRESTIME
shouldn't be too hard to implement).
2001-10-31 18:20:13 +00:00
jdolecek f3bfeee0d6 Fix one more place where we need to restore %fs/%gs explicitly. 2001-10-31 18:17:56 +00:00
jdolecek 01d4649f9f Make local INTRENTRY, INTRFASTEXIT match those in locore.s, i.e. store &
restore %fs/%gs appropriately.
Fixes kern/14275 - compat svr4 works on i386 again :)

Thanks to MOCHIDA Shuji for initial investigation on the issue, that helped
to find the bug a lot.
2001-10-31 18:16:02 +00:00
thorpej d42a6dc5c2 Rather than using a NetBSD-specific header file <machine/int_types.h>
and non-standard inttype-like types, pull in <sys/types.h> if
_KERNEL or _STANDALONE and <inttypes.h> otherwise, and use standard
inttype types.

Discussed with and OK'd by Christos.
2001-10-31 18:05:35 +00:00
bjh21 54edd2d848 Define BOOT_ELF32. Don't define ELFSIZE. 2001-10-31 17:59:38 +00:00
bjh21 82b2265851 Add loadfile_machdep.h, which has been missing since I committed boot26. 2001-10-31 17:58:54 +00:00
tv 61be23b431 * Create a variable HOST_OSTYPE that represents the host build environment,
using `uname -s`-`uname -r`-`uname -p || uname -m`.  This can be overridden
  in mk.conf or the environment, and is used by host tools to ensure that
  build hosts do not clobber each other.

* Now that there's an objdir in src/tools, make a default TOOLDIR by creating
  "tools.${HOST_OSTYPE}" in the objdir (if it exists) of src/tools.  This
  means that TOOLDIR is no longer required to be set in a build, though it
  still may be set manually if desired.

* Set MKTOOLS to "yes" by default, since the default TOOLDIR is now located
  in a known mutable location.  This may still be set manually if desired.
2001-10-31 17:46:08 +00:00
thorpej 6d2e0bcbc2 Use <machine/elf_machdep.h> to override Elf64_Word and Elf64_Sword
on the Alpha (which uses a non-standard definitions for historical
reasons), rather than #ifdef __alpha__ (which is not cross-tool safe).
2001-10-31 17:44:42 +00:00
thorpej d973bb96f1 Include <machine/elf_machdep.h> earlier, at the beginning of the file,
after the inttypes header.
2001-10-31 17:35:06 +00:00
thorpej 6797e85570 Include support for elf64. 2001-10-31 17:21:47 +00:00
thorpej e727e3f180 Split elf32 vs. elf64 handling in loadfile(), including support for
each separately and explicitly.  BOOT_ELF is now BOOT_ELF32 and
BOOT_ELF64, and ELFSIZE should no longer be defined in loadfile_machdep.h.
2001-10-31 17:20:45 +00:00
tv ec5a9a312e Add REQUIRETOOLS to make version-specific new toolchain compiler libs fail
to build if USETOOLS is set to "no" by the builder.  (Sanity check; as an
override, USETOOLS may be set to "never", but see warnings in BUILDING.)
2001-10-31 16:27:31 +00:00
tv abb4800606 Make REQUIRETOOLS work properly -- don't error if USE_NEW_TOOLCHAIN is
not set.  Also, nuke redundant USE_NEW_TOOLCHAIN check with USETOOLS.
2001-10-31 16:25:21 +00:00
tv dd7ca02987 Make handling of USETOOLS uniform: Don't need to check whether it is
defined, as <bsd.own.mk> always sets it; also, compare only against "yes"
(not "no") for a yes/no check, as there are two negative states ("no" and
"never").
2001-10-31 16:15:00 +00:00
tv c0c91b1b74 Simplify a bunch of explicit ${.OBJDIR} references to make these more like
the rest of the tree.
2001-10-31 15:57:49 +00:00
kleink e8befb717e Inspired by Stevens' APUE and the implementation example in XSH:
* Don't return if wait()ing for the child is interrupted.
* Fix a race condition for the parent's SIG{INT,QUIT} disposition.
* While we're here, convert from using signal(3) to sigaction(2).
2001-10-31 13:31:26 +00:00
reinoud a7b1e2f4a6 Rollback 2001-10-31 13:12:35 +00:00
tv 053d51348d Overhaul the initialization and handling of .OBJDIR:
* Replace chdir_verify_path() with Main_SetObjdir(), which can be called
  externally, and can take a "const char *".  (There's a lot of non-const
  "char *" passing around in var.c of what should be const strings....)

* Rewrite the initial "find my .OBJDIR" code to make use of the new
  function.  This still functions as it had in the past, but the comment
  above this block was changed to reflect reality:  if MAKEOBJDIRPREFIX
  or MAKEOBJDIR are set in the environment, then *only that value* is
  tried; make does not fall back to obj.MACHINE, obj, and /usr/obj/`pwd`
  as it would without these env vars set.

* Add a new special target, .OBJDIR:, which when parsed will cause make to
  change to a new object directory and reset .OBJDIR, and PWD in the
  environment.  This will allow some makefiles (mainly, src/tools)
  to override the default objdir semantics in order to add custom logic.
2001-10-31 03:59:42 +00:00
jmc 7526979e21 Don't run rules unless DESTDIR is set *and* contains a value. Fixes PR 14410 2001-10-31 02:58:58 +00:00
reinoud 88ca038117 Change MACHINE_ARCH to arm making it ELF now. 2001-10-31 02:10:35 +00:00
tv 7636e93f41 * Fix brokenness created by the -n option additions ("eval" still kept
quoting, so the commands were thought to be one big word with embedded
  whitespace)

* New options:
  -O obj    Set root of an obj tree; sets MAKEOBJDIR to an appropriate
            substitution pattern.
  -o        Sets MKOBJDIRS=no (otherwise sets MKOBJDIRS=yes)
  -u        Sets UPDATE
2001-10-31 01:56:10 +00:00