Ben Gras [Wed, 13 Jul 2011 21:59:07 +0000 (23:59 +0200)]
release.sh: jail install
. Feature to do a 'release' into a permanent
and usable FS hierarchy, usable with chroot
. Just like the temporary staging hierarchy really
. Useful to checking out and building the latest
version of minix from a host minix; to
(1) make an uptodate minix jail, and
(2) make a sterile, reproducible jail environment, and
(3) use as disposable environment in which moving /usr/pkg
is ok
(i.e. pkgsrc bulk builds)
Ben Gras [Wed, 13 Jul 2011 20:34:37 +0000 (22:34 +0200)]
generate sys_errlist without holes
. strerror() assumes this
. remove generated libminc/errlist.c
. errno's in <sys/errno.h> have to be in sorted order
. filtering out some errno.h in Makefile lets us use near-stock
errlist.awk
* VFS and installed MFSes must be in sync before and after this change *
Use struct stat from NetBSD. It requires adding new STAT, FSTAT and LSTAT
syscalls. Libc modification is both backward and forward compatible.
Also new struct stat uses modern field sizes to avoid ABI
incompatibility, when we update uid_t, gid_t and company.
Exceptions are ino_t and off_t in old libc (though paddings added).
Now users can choose between libsys, libsys + libminc and
libsys + libc. E.g. PUFFS/FUSE servers need libsys + libc while
old servers can use libsys + libminc.
Tomas Hruby [Mon, 4 Jul 2011 08:46:51 +0000 (10:46 +0200)]
E1000 - fixed reading/writing device registers
- the pointers must be flagged as volatile because otherwise they
might be "optimized" by a compiler. It is a common good
practice to access the registers this way, the keyword is in C
for a reason.
- for instance, in eeprom_eerd() when polling a register the
compiler, under certain conditions, may decide upon the first
read and if it does not break the loop it assumes that the
value is not going to change and thus stays in an infinite
loop.
. if the build target is invoked again for the install target, the
stack sizes aren't set properly. A workaround is to only build
and not install the servers. (Installing them doesn't really make
sense anyway.)
Thomas Cort [Wed, 29 Jun 2011 14:45:47 +0000 (14:45 +0000)]
opendir(3): on success, don't clobber errno
The opendir(3) function was setting errno to ENOTDIR even
when the directory existed and was opened successfully. This
caused git to falsely detect an error.
This change moves the errno assignment into the failure code
block. It also adds a test to test24 to check for errno
changing when opendir(3) returns success.
Thomas Cort [Mon, 27 Jun 2011 16:01:38 +0000 (16:01 +0000)]
use ${PKGPATH} instead of ${CATEGORIES}/${PKGBASE}
Some packages are in multiple categories (one example is
devel/libgetopt). This broke the IF statement because
${CATEGORIES} got expanded to "cat1 cat2". The proper
variable to use is PKGPATH.
Ben Gras [Thu, 23 Jun 2011 20:43:39 +0000 (22:43 +0200)]
introduce option to time assert()s
. remove a few asserts in the kernel and 64bi library
that are not compatible with the timing code
. change the TIME_BLOCKS code a little to work in-kernel
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
Antoine Leca [Mon, 25 Oct 2010 17:03:36 +0000 (18:03 +0100)]
libc!setmode.c: Avoid #if inside macro call
#if inside macro call is undefined behaviour under the C standard
(3.8.3 paragraph 10 for C90, 6.8.10 paragraph 11 for C99).
The same effect can be achieved with a slightly more verbose construct,
putting the whole macro call inside the #ifdef/#else/#endif.
Antoine LECA [Wed, 22 Jun 2011 21:35:26 +0000 (23:35 +0200)]
sys.mk: Improved defaults (sys.mk) for make(1)
. Handle more compiler names, including most cross-compilers.
. Allows to use acd(1) and [whatever-]acc to designate ACK compiler.
. Do not abort (on COMPILER_TYPE not defined) if the compiler name
is not recognized.
sys_umap now supports only:
- looking up the physical address of a virtual address in the address space
of the caller;
- looking up the physical address of a grant for which the caller is the
grantee.
This is enough for nearly all umap users. The new sys_umap_remote supports
lookups in arbitrary address spaces and grants for arbitrary grantees.
Thomas Cort [Thu, 9 Jun 2011 17:12:53 +0000 (17:12 +0000)]
A few aesthetic changes to make the minix port more acceptable
to upstream.
- revert to upstream version of function prototypes for
setting the uid and gid fields of the archive_entry.
- move uid/gid overflow checks into header_common().
- use archive_set_error() instead of fprintf() for getting
error message text back to the main program.
Ben Gras [Tue, 7 Jun 2011 12:48:31 +0000 (14:48 +0200)]
changes for detecting and building for clang/binutils elf
and minor fixes:
. add ack/clean target to lib, 'unify' clean target
. add includes as library dependency
. mk: exclude warning options clang doesn't have in non-gcc
. set -e in lib/*.sh build files
. clang compile error circumvention (disable NOASSERTS for release builds)
Thomas Cort [Tue, 7 Jun 2011 12:46:18 +0000 (12:46 +0000)]
/etc/group: add 'games' group
Several pkgsrc packages under the games category won't install
without a games group. This change adds the group with gid 13,
the default games gid on NetBSD.
Thomas Cort [Mon, 6 Jun 2011 14:31:20 +0000 (14:31 +0000)]
libarchive: fix bad timestamp bug caused by bit shift.
The file timestamps in archives created by libarchive all had
dates in the year 2038. It was caused by a bit shift in
archive_write_set_format_ustar which shifted 1 instead of 1ull.