]> Zhao Yanbai Git Server - minix.git/log
minix.git
10 years agoIntroduce message types mess_u{8,16,32,64}
Lionel Sambuc [Mon, 28 Apr 2014 12:21:40 +0000 (14:21 +0200)]
Introduce message types mess_u{8,16,32,64}

Those messages offer a simple array of the given type. This should allow
for fast and simple prototyping.

When a protocol is fixed, then proper message types should be defined.

Change-Id: I4e98eeb0493924f3015862a51d14d894315e2bc2

10 years agoservers/iso9660fs: drop unused function fs_access
Lionel Sambuc [Thu, 1 May 2014 09:46:28 +0000 (11:46 +0200)]
servers/iso9660fs: drop unused function fs_access

As a consequence, remove protect.c which is now empty.

Change-Id: I675f9059510b3a22262f2bab4f18964a5356aa62

10 years agoUse fixed size type for on-disk representation
Lionel Sambuc [Fri, 2 May 2014 05:41:15 +0000 (07:41 +0200)]
Use fixed size type for on-disk representation

Use fixed size for directory entries records, instead of semantic type
in the struct which is used to access on-disk records.

Change-Id: If8816d367eaa7070ccb17202ffc9047b5aee5d3e

10 years agoadded sethostname syscall with proper error checks
Morgawr [Thu, 24 Apr 2014 00:12:48 +0000 (02:12 +0200)]
added sethostname syscall with proper error checks

Change-Id: I4b4e0a7c4035e19d5843b86ee1f714096adcecd2

10 years agoadded chmod util from NetBSD userland
Morgawr [Tue, 22 Apr 2014 23:48:23 +0000 (01:48 +0200)]
added chmod util from NetBSD userland

Change-Id: Ice81a29becedcebfc1ff42ac9826c291b6451189

10 years agoremove __BIT_TYPES_DEFINED__ because they are actually not defined.
Kees Jongenburger [Tue, 1 Apr 2014 09:19:17 +0000 (09:19 +0000)]
remove __BIT_TYPES_DEFINED__ because they are actually not defined.

Change-Id: Iae6489c013ff92042f001d50e9a9983a409c268e

10 years agoarm:ddekit use simple alloc to allocate stack.
Kees Jongenburger [Tue, 29 Apr 2014 06:55:34 +0000 (08:55 +0200)]
arm:ddekit use simple alloc to allocate stack.

Workaround for:
-ddekit large alloc unnecessarily allocating physical contiguous memory.
-the ARM port expecting that physical contiguous memory equals device memory.

10 years agoStub for setpgid
Lionel Sambuc [Thu, 24 Apr 2014 11:39:50 +0000 (13:39 +0200)]
Stub for setpgid

This implements a near noop setpgid, unless the use is one equivalent
to setsid, in which case it will behave as such.

Also activates setpgrp, which is implemented in terms of setpgid.

Change-Id: I84411cb1957351aa1d3985623cd9e69bdf6f8d4c

10 years agoStub for setrlimit
Lionel Sambuc [Mon, 28 Apr 2014 08:05:45 +0000 (10:05 +0200)]
Stub for setrlimit

Change-Id: I54c7233d71805711bd72e1e751456aad30fd3e35

10 years agoImporting sbin/chown
Lionel Sambuc [Wed, 26 Mar 2014 17:35:18 +0000 (18:35 +0100)]
Importing sbin/chown

Change-Id: I49950ec241985a8a8f1fc29e01c0212278fbeaa9

10 years agoFrom Ben Gras, add select support on /dev/random.
Lionel Sambuc [Wed, 16 Apr 2014 11:57:52 +0000 (13:57 +0200)]
From Ben Gras, add select support on /dev/random.

Change-Id: I47bf4c45285458ecc224df0564edf98afdb2c9d6

10 years agoPrefix libc (u)mount with minix_
Lionel Sambuc [Mon, 17 Mar 2014 13:01:22 +0000 (14:01 +0100)]
Prefix libc (u)mount with minix_

The goal is to prevent a name collision with the expected mount/umount
function signatures, if we decide one day to allow any application
using those to work on MINIX.

At this moment the caller has to start the required services, but if we
implement that logic inside the mount/unmout function, this would allow
any application to call those function successfully.

By renaming those now, we prevent a possible ABI break in the future.

Change-Id: Iaf6a9472bca0dda6bfe634bdb6029b3aa2e1ea3b

10 years agoin6.h
Lionel Sambuc [Tue, 22 Apr 2014 16:50:26 +0000 (18:50 +0200)]
in6.h

Change-Id: Id548a6a144ca77ef3a7bb76f24b8b902efd680b4

10 years agoFollow the namespace pattern for [cs]profile
Lionel Sambuc [Mon, 14 Apr 2014 09:49:40 +0000 (11:49 +0200)]
Follow the namespace pattern for [cs]profile

Change-Id: I5ad7eb1d7f4b4364e668c2f30dfc628f89b0d579

10 years agoHide SO_PASSCRED and SO_PEERCRED by default.
Lionel Sambuc [Tue, 22 Apr 2014 15:37:52 +0000 (17:37 +0200)]
Hide SO_PASSCRED and SO_PEERCRED by default.

This cause in some software to assume we are linux, as this is rightly
only used there.

By default hide it behind _MINIX_SYSTEM, until we have removed traces
of it from getpeereid/[gs]etsocketopt and replaced it by the NetBSD
mechanism.

Change-Id: Iacd4cc1b152bcb7e90f5b1249185a222c90351d6

10 years agoAdd /bin/false to /etc/shells
Lionel Sambuc [Mon, 14 Apr 2014 10:13:22 +0000 (12:13 +0200)]
Add /bin/false to /etc/shells

/bin/false is often used by PKGSRC packages which create unpriviledged
users as part of their install process.

This fixes the generation and installation of such packages.

Change-Id: Ie2a590c56c86dc40a61e3c08d14f5443ebe4f58c

10 years agoAdding an initial ddekit test.
Kees Jongenburger [Tue, 25 Mar 2014 15:02:31 +0000 (16:02 +0100)]
Adding an initial ddekit test.

Change-Id: I0522449bb7bbbb23efc132ede3a02da95efe0326

10 years agotest:test51 add a few more tests for calling setcontext.
Kees Jongenburger [Tue, 25 Mar 2014 15:03:06 +0000 (16:03 +0100)]
test:test51 add a few more tests for calling setcontext.

Change-Id: I272ac01c77537b80bab328aae1acd7b6ce6027fb

10 years agoddekit:use ucontext to switch threads
Kees Jongenburger [Mon, 24 Mar 2014 15:55:57 +0000 (16:55 +0100)]
ddekit:use ucontext to switch threads

Use getcontext/makecontext and setcontext to create/modify and
switch thread when using ddekit.

Change-Id: I485ad61cb2eb5b8e7b486775f282ff6501912dfd

10 years agobuild:also build the hello driver on arm.
Kees Jongenburger [Mon, 24 Mar 2014 15:38:24 +0000 (16:38 +0100)]
build:also build the hello driver on arm.

Change-Id: I5dd82d3b56b907bfc137313f503f9d9c52c199ef

10 years agobuild:make libminc a build dependency of services.
Kees Jongenburger [Mon, 24 Mar 2014 15:31:17 +0000 (16:31 +0100)]
build:make libminc a build dependency of services.

Make libminc a build dependency of services to ensure the services
get rebuilt if libminc changes.

Change-Id: I703a9d98d7641a9a85e04d88402a7228ad0be19f

10 years agolibc:x86 fix for get and setcontext assembly calls.
Kees Jongenburger [Wed, 2 Apr 2014 07:28:38 +0000 (09:28 +0200)]
libc:x86 fix for get and setcontext assembly calls.

The get and set context calls where wrongly assuming that the value
of arguments passed on the stack where kept unmodified.

Change-Id: I779b08d7f5a6472c5e9dc351ae44abb2acafb3bd

10 years agox86:ensure that getcontext will return 0.
Kees Jongenburger [Mon, 24 Mar 2014 15:16:21 +0000 (16:16 +0100)]
x86:ensure that getcontext will return 0.

The setcontext method did not alway set the return value to 0 after
restoring the desired context. Specially When calling setcontext with
the _UC_IGNSIGM and the _UC_IGNFPU flags the return value would be non
zero.

Change-Id: Iec7f8d6a680950aa53e3c88c86e03f65005e66b2

10 years agobuild:check if .settings file is a file.
Kees Jongenburger [Mon, 24 Mar 2014 16:30:45 +0000 (17:30 +0100)]
build:check if .settings file is a file.

Check if the .settings entry is a file and not a directory. Eclipse
as we found out also likes creating .settings directories.

Change-Id: I3cbcaa7aa9e5dfb3d51c6c71df7fd72079fe213e

10 years agoimporting tail
Claudio Martella [Mon, 31 Mar 2014 20:02:03 +0000 (22:02 +0200)]
importing tail

Change-Id: Ieda9690195ccd78f081b383cb530702d45537122

10 years agoAdd TAP output to kyua, see kyua help report-tap.
Lionel Sambuc [Thu, 27 Mar 2014 14:43:45 +0000 (15:43 +0100)]
Add TAP output to kyua, see kyua help report-tap.

Change-Id: Id64218b820da85b5dba75324c732f4e02b898849

10 years agoImporting games/tetris
Thomas Cort [Sat, 22 Mar 2014 10:14:14 +0000 (06:14 -0400)]
Importing games/tetris

No Minix specific changes needed.

Change-Id: Ia6a2d9d2192ae0cee29e395aa42271005c6179c2

10 years agoWorkaround missing lchmod/lchown
Lionel Sambuc [Sat, 15 Mar 2014 13:11:22 +0000 (14:11 +0100)]
Workaround missing lchmod/lchown

Change-Id: I231a0010722619d389b763af35ff55f84ca9cb76

10 years agopatch(1) problems workaround
Ben Gras [Tue, 18 Mar 2014 10:43:08 +0000 (11:43 +0100)]
patch(1) problems workaround

. NUL input in 2 source files cause patch(1)
  to truncate the input (and fail the patches); a sed
  command removes the NULs
. in binutils/ld, configdoc.texi is patched to be removed
  but some patch(1)es leave an empty file, causing build problems;
  this file is explicitly removed.

Change-Id: Iec38d3992b0df4f7bbb9a87b1320005ab3272ff1

10 years agommap: accept non-PROT_WRITE MAP_SHARED mappings
Ben Gras [Mon, 17 Mar 2014 14:53:28 +0000 (15:53 +0100)]
mmap: accept non-PROT_WRITE MAP_SHARED mappings

Currently we don't accept writable file mmap()s, as there is no
system in place to guarantee dirty buffers would make it back to
disk. But we can actually accept MAP_SHARED for PROT_READ mappings,
meaning the ranges aren't writable at all (and no private copy is
made as with MAP_PRIVATE), as it turns out a fairly large class of
usage.

. fail writable MAP_SHARED mappings at runtime
. reduces some minix-specific patches
. lets binutils gold build on minix without further patching

Change-Id: If2896c0a555328ac5b324afa706063fc6d86519e

10 years agowriteisofs build fix (missing NAME_MAX define).
Ryan Sheridan [Mon, 17 Mar 2014 20:06:32 +0000 (13:06 -0700)]
writeisofs build fix (missing NAME_MAX define).

Building writeisofs on OS X led to a failure due to the NAME_MAX define
being missing.

10 years agoImporting games/arithmetic
Thomas Cort [Sun, 16 Mar 2014 14:56:05 +0000 (10:56 -0400)]
Importing games/arithmetic

No Minix specific changes needed.

Change-Id: I67d7a01edea0cee5be403dbbea20c2ca0f1771f0

10 years agoImporting games/random
Thomas Cort [Sun, 16 Mar 2014 14:52:07 +0000 (10:52 -0400)]
Importing games/random

No Minix specific changes needed.

Change-Id: I0fd074325f334f03426accbece4e731b746ebe14

10 years agoImporting games/wargames
Thomas Cort [Sun, 16 Mar 2014 14:49:56 +0000 (10:49 -0400)]
Importing games/wargames

No Minix specific changes needed.

Change-Id: Ie752ee476dd6be712b1dc9cae6ea260f12aaf906

10 years agoImporting games/monop
Thomas Cort [Sun, 16 Mar 2014 14:42:24 +0000 (10:42 -0400)]
Importing games/monop

No Minix specific changes needed.

Change-Id: I362b974a95911d26fcd8a4401129ca946179d93c

10 years agoImporting games/number
Thomas Cort [Sun, 16 Mar 2014 14:38:37 +0000 (10:38 -0400)]
Importing games/number

No Minix specific changes needed.

Change-Id: Iaf87f29a954f241d41c101dd74fe338b9d7c4d95

10 years agoImporting games/bcd
Thomas Cort [Sun, 16 Mar 2014 14:31:53 +0000 (10:31 -0400)]
Importing games/bcd

No Minix specific changes needed.

Change-Id: Ib98d41526baf73445f3a9465dd75fbc517b1edbe

10 years agoImporting games/ppt
Thomas Cort [Sun, 16 Mar 2014 14:29:05 +0000 (10:29 -0400)]
Importing games/ppt

No Minix specific changes needed.

Change-Id: I81eecad5c0f4c1d7a7dba356bcc2e928e3f2c175

10 years agoImporting games/morse
Thomas Cort [Sun, 16 Mar 2014 14:17:38 +0000 (10:17 -0400)]
Importing games/morse

No Minix specific changes needed.

Change-Id: Ie0d427d39a5392c0c0f2c3856ba36286957d21a4

10 years agoImporting games/pig
Thomas Cort [Sun, 16 Mar 2014 14:13:31 +0000 (10:13 -0400)]
Importing games/pig

No Minix specific changes needed.

Change-Id: If6c638f44e9cabc5b667f0b30a0654f1e8e61c13

10 years agoImporting games/fortune
Thomas Cort [Sun, 16 Mar 2014 13:39:21 +0000 (09:39 -0400)]
Importing games/fortune

Replaces commands/fortune. No Minix specific changes needed.

Change-Id: Iac79ea82dedd12e80377c85954da5e2d8eee74af

10 years agoImporting games/factor
Thomas Cort [Sat, 15 Mar 2014 20:05:49 +0000 (16:05 -0400)]
Importing games/factor

Replaces commands/factor. No Minix specific changes needed.

Change-Id: Ie2a58534c59a1ebbf922d483fb27abd8dffd1f5f

10 years agoImporting games/primes
Thomas Cort [Sat, 15 Mar 2014 20:04:13 +0000 (16:04 -0400)]
Importing games/primes

No Minix specific changes needed.

Change-Id: Id4133ad419cb1e31e49b625ad80bb003561afaad

10 years agoImporting games/adventure
Thomas Cort [Sat, 15 Mar 2014 19:46:01 +0000 (15:46 -0400)]
Importing games/adventure

No Minix specific changes needed.

Change-Id: I6826d660c60a9e01676e21ef9b95d27e64a67aa5

10 years agoImport NetBSD touch command
Zachary Storer [Sat, 15 Mar 2014 17:55:55 +0000 (11:55 -0600)]
Import NetBSD touch command

Replaces the 'touch' functionality provided by commands/touch.

10 years agoImport NetBSD echo command
Zachary Storer [Fri, 14 Mar 2014 08:09:14 +0000 (02:09 -0600)]
Import NetBSD echo command

Replaces the 'echo' functionality provided by commands/echo.

10 years agofix declaration of minix_kerninfo_user
Lionel Sambuc [Mon, 10 Mar 2014 20:23:08 +0000 (21:23 +0100)]
fix declaration of minix_kerninfo_user

10 years agoMove Assert to check MAGIC before actual use of the MBI record
Lionel Sambuc [Mon, 10 Mar 2014 20:28:36 +0000 (21:28 +0100)]
Move Assert to check MAGIC before actual use of the MBI record

10 years agobuild:update 'git review' config to match gerrit.minix3.org
Kees Jongenburger [Mon, 10 Mar 2014 15:16:14 +0000 (16:16 +0100)]
build:update 'git review' config to match gerrit.minix3.org

We have moved the gerrit service to a new server and at the same time allowed
direct access to gerrit. This change updates the '.gitreview' file to reflect
these changes. If you have an existing checkout you might need to update your
.ssh/config file to remove the git-minix alias and edit .git/config to update
the gerrit repository from 'git-minix' to the new url sheme:
ssh://username@gerrit.minix3.org:2222/minix

Change-Id: I621848d56c81c8c22a90b8092adf4ab0f29e2fb8

10 years agousr.bin/make: -j fix
Lionel Sambuc [Fri, 25 Apr 2014 14:06:33 +0000 (16:06 +0200)]
usr.bin/make: -j fix

The job option enable the usage of pipes to communicate with sub-makes.

On MINIX, it seems that there is possibility of receiving an EAGAIN on
such reads, even when it had previously been tested for POLLIN using
poll().

This patch is a workaround, by wrapping the read operation within a
do {} while(errno == EAGAIN && ...) loop.

Change-Id: Ia184c4d600efe7218d197820df87761604120862

10 years agoFix perl build hanging on pipe
Lionel Sambuc [Thu, 3 Apr 2014 13:53:43 +0000 (15:53 +0200)]
Fix perl build hanging on pipe

Change-Id: Ic1ff95f45c6082b9310b27783190ce8f92c2afad

10 years agovfs: call pipe_check before reviving select()
Ben Gras [Wed, 5 Mar 2014 14:12:54 +0000 (15:12 +0100)]
vfs: call pipe_check before reviving select()

. select callback on close() on a pipe
  would falsely revive a read-select on
  the pipe
. the extra pipe_check catches it
. fixes the new import of the netbsd
  make in -j N mode (make jobs that communicate
  with pipes)

10 years ago_MINIX_SYSTEM - fixes for in-minix crossbuild
Ben Gras [Wed, 5 Mar 2014 11:21:55 +0000 (12:21 +0100)]
_MINIX_SYSTEM - fixes for in-minix crossbuild

. define _MINIX_SYSTEM for all system code from minix.service.mk
. hide some system-level declarations and definitions
  behind _MINIX_SYSTEM to cleanly fix host tool build problems on
  Minix (such as: NONE being defined and paddr_t being used but not
  declared)
. the similar definition _SYSTEM is unsuitable as it changes the
  values of errno definitions

Change-Id: I407de79e2575115243a074b16e79546a279cfa3e

10 years agotest74: add mmap-related regression tests
Ben Gras [Fri, 28 Feb 2014 15:56:40 +0000 (16:56 +0100)]
test74: add mmap-related regression tests

tests many complex system/process memory interaction cases.

has to run as root so it can flush the FS cache; needed to
force FS cache misses for unmapped pages.

See the comment in test74.c for a full description of what the tested
cases are.

also re-enable filemap on arm

10 years agoVFS: add F_FLUSH_FS_CACHE fcntl
Ben Gras [Fri, 28 Feb 2014 15:26:13 +0000 (16:26 +0100)]
VFS: add F_FLUSH_FS_CACHE fcntl

This fcntl requests all cached blocks associated with the minor device
number associated with the regular file are invalidated. If the file
is a block special, invalidate the blocks associated with that minor
device instead.

This is to be used for a test that tests unmapped file-mapped memory
ranges whose blocks are not in the cache and therefore must be fetched
from a FS.

Change-Id: Ide914b2e88413aa90bd731ae587ca06fa5f13ebc

10 years agomake vfs & filesystems use failable copying
Ben Gras [Thu, 16 Jan 2014 13:22:13 +0000 (14:22 +0100)]
make vfs & filesystems use failable copying

Change the kernel to add features to vircopy and safecopies so that
transparent copy fixing won't happen to avoid deadlocks, and such copies
fail with EFAULT.

Transparently making copying work from filesystems (as normally done by
the kernel & VM when copying fails because of missing/readonly memory)
is problematic as it can happen that, for file-mapped ranges, that that
same filesystem that is blocked on the copy request is needed to satisfy
the memory range, leading to deadlock. Dito for VFS itself, if done with
a blocking call.

This change makes the copying done from a filesystem fail in such cases
with EFAULT by VFS adding the CPF_TRY flag to the grants. If a FS call
fails with EFAULT, VFS will then request the range to be made available
to VM after the FS is unblocked, allowing it to be used to satisfy the
range if need be in another VFS thread.

Similarly, for datacopies that VFS itself does, it uses the failable
vircopy variant and callers use a wrapper that talk to VM if necessary
to get the copy to work.

. kernel: add CPF_TRY flag to safecopies
. kernel: only request writable ranges to VM for the
  target buffer when copying fails
. do copying in VFS TRY-first
. some fixes in VM to build SANITYCHECK mode
. add regression test for the cases where
  - a FS system call needs memory mapped in a process that the
    FS itself must map.
  - such a range covers more than one file-mapped region.
. add 'try' mode to vircopy, physcopy
. add flags field to copy kernel call messages
. if CP_FLAG_TRY is set, do not transparently try
  to fix memory ranges
. for use by VFS when accessing user buffers to avoid
  deadlock
. remove some obsolete backwards compatability assignments
        . VFS: let thread scheduling work for VM requests too
          Allows VFS to make calls to VM while suspending and resuming
          the currently running thread. Does currently not work for the
          main thread.
        . VM: add fix memory range call for use by VFS

Change-Id: I295794269cea51a3163519a9cfe5901301d90b32

10 years agoPFS: when copy fails, don't change state
Ben Gras [Wed, 26 Feb 2014 14:57:08 +0000 (15:57 +0100)]
PFS: when copy fails, don't change state

. makes it safe to transparently repeate i/o operation on
  EFAULT
. needed for future re-issued i/o operation change in VFS

Change-Id: Iea6b29f3bff19002dcd69b30569671768ac17e21

10 years agodevmand: don't die so easily
David van Moolenbroek [Tue, 25 Feb 2014 23:28:43 +0000 (00:28 +0100)]
devmand: don't die so easily

Change-Id: I048a975fb35dadf07ebb5d067d76fb1d1892bda8

10 years agoRS: also wait for VM's RS_INIT message
David van Moolenbroek [Tue, 25 Feb 2014 14:08:20 +0000 (15:08 +0100)]
RS: also wait for VM's RS_INIT message

Bug reported by JD Begin.

Change-Id: Idd8c4299f20253fe2d982af319002bfb67af27c6

10 years agoVM: fix corruption from recursive PDE allocation
David van Moolenbroek [Tue, 25 Feb 2014 14:04:02 +0000 (15:04 +0100)]
VM: fix corruption from recursive PDE allocation

Change-Id: I6176b849fefca4bed3e92648b0d72ff47658915c

10 years agoTTY: do not reply to KERNEL
David van Moolenbroek [Tue, 25 Feb 2014 13:44:58 +0000 (14:44 +0100)]
TTY: do not reply to KERNEL

Diagnostics messages are printed using locally generated requests,
using KERNEL as the calling endpoint.  No reply should be sent for
such cases.  This check was accidentally lost with the previous
removal of tty_reply().

Change-Id: I4b76215a4d90e927b0071675d89d861aa399abb3

10 years agoRearrange endpoint number layout
David van Moolenbroek [Tue, 25 Feb 2014 13:24:52 +0000 (14:24 +0100)]
Rearrange endpoint number layout

The constants ANY, NONE, and SELF are now a function of the way the
endpoint number is split between a generation number and a process
slot number, rather than the other way around.  This allows for the
use of bit masking and shifting instead of the previous (and more
expensive) multiplication and division.

Change-Id: Id890eea74435444128c75eb0c89816b948f43c0b

10 years agoPTY: split off from TTY
David van Moolenbroek [Mon, 24 Feb 2014 22:28:12 +0000 (23:28 +0100)]
PTY: split off from TTY

Requires recreation of /dev/tty[pq]*, /dev/pty[pq]* device nodes.

Change-Id: I0e5a28d82faa934497fd3b97d619e506bcb5f439

10 years agoInstall sources with MKSRC=yes
Ben Gras [Thu, 27 Feb 2014 09:27:28 +0000 (10:27 +0100)]
Install sources with MKSRC=yes

Change-Id: Iee433cfe6796af0ea292c7eadff365a32059a609

10 years agofix for ld.so @ bitcode build
Ben Gras [Sun, 4 May 2014 11:52:22 +0000 (13:52 +0200)]
fix for ld.so @ bitcode build

ld.so linked with gold didn't work - gold was not generating
the _DYNAMIC ptr in the first GOT entry, leaving it zero, causing
mayhem for ld.so.

  . patch for gold: always generate _DYNAMIC ptr. submitted upstream,
    more info here: https://sourceware.org/bugzilla/show_bug.cgi?id=16900
  . revert "REMOVE ME: Static tests for now" - we can link tests dynamically
    This reverts commit 3e0a3993deb831eb5abcd1c1a2cb1246b43f8d1d.

Change-Id: I4f2910ec2592c31bbd14a85d8a6045497fcaf4e3

10 years agobackport 2 binutils patches
Ben Gras [Thu, 13 Mar 2014 12:21:32 +0000 (13:21 +0100)]
backport 2 binutils patches

These 2 patches are from upstream binutils and together properly
detect whether -ldl is necessary and available to build ld and gold
in plugins mode, instead of hard-coding its usage always. This lets
us build ld and gold on *bsd and minix systems, which do not have
or need -ldl for dl*() functions.

Change-Id: Ie21d027f5d7c225edc9e6e0c6fa2e4b34f421415

10 years agoBinutils: Synchronization & Gold activation
Lionel Sambuc [Mon, 17 Feb 2014 15:55:07 +0000 (16:55 +0100)]
Binutils: Synchronization & Gold activation

Change-Id: I5235984746178ee30b5db18e7def0016d9a0e36f

10 years agolibsffs: return 64-bit value in st_size
Ben Gras [Mon, 24 Feb 2014 16:41:05 +0000 (17:41 +0100)]
libsffs: return 64-bit value in st_size

Change-Id: Ife7e590279e582a233f7cd95bf16ae2ac394d9c2

10 years ago64-bit CDEV_POS
Ben Gras [Mon, 24 Feb 2014 16:30:31 +0000 (17:30 +0100)]
64-bit CDEV_POS

Change-Id: Iecdadf3dd92cc14525961976f51a9eb16a996d62

10 years ago64-bit REQ_TRC_START, REQ_TRC_END
Ben Gras [Mon, 24 Feb 2014 16:28:29 +0000 (17:28 +0100)]
64-bit REQ_TRC_START, REQ_TRC_END

Change-Id: I567804209695b5ec0d83a453d93e36cbf8900f1a

10 years ago64-bit VFS_LSEEK_OFF
Ben Gras [Mon, 24 Feb 2014 16:16:17 +0000 (17:16 +0100)]
64-bit VFS_LSEEK_OFF

Change-Id: Ic0b6d65cbde1033462b909436efa92464094f1ec

10 years ago64-bit VFS_VMCALL_OFFSET
Ben Gras [Mon, 24 Feb 2014 16:14:07 +0000 (17:14 +0100)]
64-bit VFS_VMCALL_OFFSET

Change-Id: I29725365a199f850420cd0e4e3902cf70dffe9ad

10 years ago64-bit VFS_TRUNCATE_OFF
Ben Gras [Mon, 24 Feb 2014 16:12:30 +0000 (17:12 +0100)]
64-bit VFS_TRUNCATE_OFF

Change-Id: I4bd5cc57ddda2525b0bec6f044f35196a2c21f2e

10 years ago64-bit RES_FILE_SIZE
Ben Gras [Mon, 24 Feb 2014 16:02:03 +0000 (17:02 +0100)]
64-bit RES_FILE_SIZE

Change-Id: Ia17b4b4722f87fb35142948b62d4a8392ded5f73

10 years ago64-bit RES_SEEK_POS
Ben Gras [Mon, 24 Feb 2014 15:54:37 +0000 (16:54 +0100)]
64-bit RES_SEEK_POS

Change-Id: Id13f06417f2f600db167bec7b33bc825742cae79

10 years ago64-bit REQ_SEEK_POS
Ben Gras [Mon, 24 Feb 2014 13:50:01 +0000 (14:50 +0100)]
64-bit REQ_SEEK_POS

Change-Id: I2e51a188b171af0f0a02349e4eccbe78e7cc2e0c

10 years ago64-bit bdev position
Ben Gras [Mon, 24 Feb 2014 13:22:04 +0000 (14:22 +0100)]
64-bit bdev position

Change-Id: I149693624610e04af0c5e4437b5efa484a33467d

10 years agoImport NetBSD sleep command
Zachary Storer [Mon, 24 Feb 2014 20:48:43 +0000 (13:48 -0700)]
Import NetBSD sleep command

Replaces the 'sleep' functionality provided by commands/sleep.

Change-Id: I8758bf027b26aaef7954848803d6da982c753bfa

10 years agoarm-refactor:remove dependency from memory.c to omap_timer.h.
Kees Jongenburger [Mon, 24 Feb 2014 08:47:13 +0000 (09:47 +0100)]
arm-refactor:remove dependency from memory.c to omap_timer.h.

Remove the dependency from memory.c to omap_timer.h.

Change-Id: I1f1a0e5436ac725e4b0db9d7d404194384794802

10 years agoarm-refactor:indent the omap bsp code.
Kees Jongenburger [Mon, 24 Feb 2014 08:40:30 +0000 (09:40 +0100)]
arm-refactor:indent the omap bsp code.

Indent the omap bsd code using indent with the following settings
in indent.pro.
-bap -br -ce -ci4 -cli0 -d0 -di0 -i8 -ip4 -l79 -nbc -ncdb -ndj
-nfc1 -nlp -npcs -psl -sc -sob -fca -l79 -lc79

Change-Id: I09e7de9ad4b33f78bff96e3de4470f1c5ba854ce

10 years agoGetting rid of "old-style-definition"
Lionel Sambuc [Mon, 24 Feb 2014 13:00:17 +0000 (14:00 +0100)]
Getting rid of "old-style-definition"

Patch submitted by hoefnix. Ref.
https://groups.google.com/d/msg/minix-dev/sHQDVJRyx1c/eJjrYOqk5bgJ

Change-Id: I2fcdf4cf119ef252ccc7df06849baf37ffd08440

10 years agox86_hdimage.sh: use nbstat from tooldir.
Thomas Cort [Sat, 22 Feb 2014 21:32:12 +0000 (16:32 -0500)]
x86_hdimage.sh: use nbstat from tooldir.

The syntax of the stat(1) command varies between Linux and FreeBSD.
This prevented `x86_hdimage.sh -i` from succeeding on FreeBSD 10.0.
The fix is to use the NetBSD stat from the tooldir for all systems.

Change-Id: I121e5fd36b0d4a944ba0109cf58095ab7d150847

10 years agoImport NetBSD true and false commands
Zachary Storer [Sat, 22 Feb 2014 20:20:45 +0000 (13:20 -0700)]
Import NetBSD true and false commands

Replaces the 'true' and 'false' functionality provided by commands/true
and commands/false.

Change-Id: I736efb9a650f3154eb21e442d676a0f5d2dee957

10 years agoupdating bsd patch, moving it back to usr.bin
Lionel Sambuc [Wed, 19 Feb 2014 16:10:34 +0000 (17:10 +0100)]
updating bsd patch, moving it back to usr.bin

Change-Id: Ibc356c932693729ebf86cc4cc51aeca65163af9b

10 years agoforce C++ executables to be dynamic
Ben Gras [Wed, 11 Jun 2014 15:06:15 +0000 (17:06 +0200)]
force C++ executables to be dynamic

. for C++ exceptions when built with llvm and using libunwind

Change-Id: I22fe6a1fd0b2af7323c7deecce919764e2354614

10 years agoExperimental pthread compatibility library
Lionel Sambuc [Tue, 14 Jan 2014 12:48:43 +0000 (13:48 +0100)]
Experimental pthread compatibility library

This patch adds pthread compatibility by using libmthread.

To use this with a program using pthreads, you have to replace
  #include <pthread>
with
  #define _MTHREADIFY_PTHREADS
  #include <minix/mthreads>

This also changes the initialization function to be a constructor, which
is implicitly called before the call to main. This allows for
conformance with pthreads, while not paying a high price by checking on
each mthread_* call whether the library has been initialized or not.

As mthread_init is now a constructor, it also has been set as static, and
relevent calls removed from programs using it.

Change-Id: I2aa375db557958d2bee9a70d285aabb990c88f00

10 years agoReplace wget with ftp as default in fetch scripts
Lionel Sambuc [Thu, 23 Jan 2014 10:38:26 +0000 (11:38 +0100)]
Replace wget with ftp as default in fetch scripts

This default is overriden by curl when it is available on the system.

This allows for the fetch script to work on MINIX systems without any
additions from PKGSRC, while requiring either a netbsd compatible ftp or
curl to be installed on other systems.

Change-Id: Id79f799e1ef0f5fde6bb1c0e570984b7579519fb

10 years agobuild:Remove the usage of sloppy file list. 00/1200/4
Kees Jongenburger [Mon, 25 Nov 2013 13:47:22 +0000 (14:47 +0100)]
build:Remove the usage of sloppy file list.

Remove the usage of sloppy files list in the build scripts to
get early errors when files are added.

Change-Id: Id89c1391da675c76d7511a973f7f2dcda8befbb2

10 years agodistrib:include "test63" and "mod" if MKPIC=yes 01/1201/3
Kees Jongenburger [Tue, 7 Jan 2014 15:18:16 +0000 (16:18 +0100)]
distrib:include "test63" and "mod" if MKPIC=yes

Only include the shared library test test63 and it's mod when building
using MKPIC=yes.

Change-Id: I75ecc5c73508de24ed85fd7cf9490ea3c5b64021

10 years agoSynchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC)
Lionel Sambuc [Fri, 6 Dec 2013 11:04:52 +0000 (12:04 +0100)]
Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC)

 - Fix for possible unset uid/gid in toproto
 - Fix for default mtree style
 - Update libelf
 - Importing libexecinfo
 - Resynchronize GCC, mpc, gmp, mpfr
 - build.sh: Replace params with show-params.
     This has been done as the make target has been renamed in the same
     way, while a new target named params has been added. This new
     target generates a file containing all the parameters, instead of
     printing it on the console.
 - Update test48 with new etc/services (Fix by Ben Gras <ben@minix3.org)
     get getservbyport() out of the inner loop

Change-Id: Ie6ad5226fa2621ff9f0dee8782ea48f9443d2091

10 years agoi386 param.h
Ben Gras [Fri, 13 Dec 2013 18:55:06 +0000 (19:55 +0100)]
i386 param.h

Change-Id: I880dbe83ad611cc0736d2a76a9f67b133f2fc025

10 years agoKernel: fix register corruption on signal delivery
David van Moolenbroek [Thu, 27 Feb 2014 17:30:45 +0000 (18:30 +0100)]
Kernel: fix register corruption on signal delivery

This fixes problems with test79 and other programs.

Change-Id: I14de097a3b01114ec5dbd687ab5be9290ad13fc7

10 years ago<machine/signal.h>
Ben Gras [Tue, 10 Dec 2013 23:47:22 +0000 (00:47 +0100)]
<machine/signal.h>

. use netbsd sigframe, sigcontext struct
. netbsd sigframe *contains* sigcontext; use that directly
  in kernel sigsend
. drop two fields from minix x86 stackframe.h (process context)
  that were unused, retadr and st

use in-sigframe sigcontext

Change-Id: Ib59d699596dc3a78163dee59f19730482fdddf11

10 years agoi386 cpu.h
Ben Gras [Fri, 13 Dec 2013 12:58:47 +0000 (13:58 +0100)]
i386 cpu.h

Change-Id: Iae6d8727ba6e005a8b6e3bed4008f3f3282a1a81

10 years ago<sys/poll.h>
Ben Gras [Fri, 13 Dec 2013 10:58:44 +0000 (11:58 +0100)]
<sys/poll.h>

Change-Id: I8758d224115bdd1344cd00da6e636c529b1c191e

10 years ago<sys/ioccom.h>, <sys/ioctl.h>
Ben Gras [Thu, 12 Dec 2013 16:34:44 +0000 (17:34 +0100)]
<sys/ioccom.h>, <sys/ioctl.h>

. use <sys/ioccom.h> to make ioctls
. use netbsd <sys/ioctl.h>, include minix ioctls
. convert to varargs ioctl() like netbsd

Change-Id: Id5165780df48172b28bf0003603516d30d7c1abb

10 years ago<sys/syslimits.h>
Ben Gras [Thu, 12 Dec 2013 13:27:56 +0000 (14:27 +0100)]
<sys/syslimits.h>

reduces differences, raise NAME_MAX

Change-Id: I2e5f6296e6539162c52fdf13fb1fd27a56587e0c

10 years ago<sys/siginfo.h>
Ben Gras [Thu, 12 Dec 2013 13:07:22 +0000 (14:07 +0100)]
<sys/siginfo.h>

Change-Id: I1fcfd04308639c5340cd0a5c2e8a926d7edc5abf

10 years ago<sys/fcntl.h>, remove O_REOPEN
Ben Gras [Thu, 12 Dec 2013 12:50:23 +0000 (13:50 +0100)]
<sys/fcntl.h>, remove O_REOPEN

Change-Id: Id6493f30bb0fec7460d01f357ada9b2c2a4f5eb7

10 years ago<sys/resource.h>
Ben Gras [Tue, 10 Dec 2013 23:27:32 +0000 (00:27 +0100)]
<sys/resource.h>

Change-Id: I5858e1b56e65fc9cf480120d96c68770d3a11dd2