Commit graph

6418 commits

Author SHA1 Message Date
David van Moolenbroek
921b550693 AHCI: remove obsolete free_contig calls
The memory used to be in its own memory region, but is now a part of
a larger memory region which is already being freed anyway.

Change-Id: Ice3174cec76e07112a1997b969dc3f47f573514c
2014-09-02 15:51:16 +00:00
Lionel Sambuc
9d3fcac4cd Some more NDEBUG fixes
- replace a stray assert(0) with abort()
 - remove unrequired copy-pasted #undef NDEBUG
 - replace some #if NDEBUG by #if DEBUG as they protect debug printf()s.

Change-Id: Iff4c0331b06e860d32d91ce6b1d6c765ed065c8b
2014-09-02 16:57:50 +02:00
Lionel Sambuc
20a91f7755 Fix -DNEDUG builds
- assert() is macro which is defined as empty, while panic is always
   present. I added an explicit abort() after the macro to make sure the
   function never returns in case of wrong flags.

 - Fixed gcc build with -NDEBUG, -Os for ARM.
   * A few 'may be used uninitialized' messages
   * A few new missing support library functions where added in libminc.

Change-Id: I69fcda2cd3888390b7ddeff4c0cd849105ce86ff
2014-09-02 15:22:15 +02:00
Lionel Sambuc
da9af514b5 Make the kernel less chatty
Change some messages from always printed to varying level of the "verbose"
argument.

Change-Id: I6899268aa895c66e72806ca4d02bb53a0e4ea785
2014-09-01 16:36:26 +02:00
Ben Gras
48e74378c7 vm: allow split of mem_anon_contig region
. so that memory of such regions can be deallocated in any order

Change-Id: I34013d6085cf19a482412cf9bed6b7f96e60e1e6
2014-09-01 15:31:19 +02:00
Lionel Sambuc
45474c5368 tools/llvm: Do not build with symbols
Do not build clang and llvm libraries with debug symbols, when built as
a cross-compilation tool.

This saves a lot of space (about 4G), and hopefully also some
compilation time.

Change-Id: Ifeb91d6932d667fa901a8efe1a95a922e6f6ba98
2014-09-01 11:14:06 +02:00
David van Moolenbroek
d3434cb55b VFS: convert EINTR to EAGAIN for nonblocking I/O
The conversion was never properly implemented for asynchronous
character drivers, and got lost during the removal of the
synchronous character protocol.

Change-Id: Ib858806859aa7a52d6b391d4c6c521a2be361fdd
2014-08-31 17:29:47 +00:00
Ben Gras
55f2063ed0 release.sh changes & fixes
. source release.functions with explicit path
	. make xargs touch not fail (due to too long invocations
	  and spaces in paths)

Change-Id: I448b96cebd641bf2c7b86ecbb3d1f1cb568e4f70
2014-08-31 17:29:21 +00:00
David van Moolenbroek
502b6bda83 Kernel: fix sys_trace
Change-Id: I44bdd3b1d79bf751923581b75c3d44f011d2a5e0
2014-08-30 19:10:12 +00:00
Lionel Sambuc
5f5dcc545f Fix bitcode support for kernel 2014-08-29 12:57:03 -04:00
Lionel Sambuc
5f8eb6fb0c minix/llvm/passes/Makefile.inc: Fix
This fixes and documents a mistake made during the sources move.
2014-08-29 12:56:57 -04:00
Erik van der Kouwe
3e2464514d Add /usr/lib/bc/libgcc_s.a to the file list
Add /usr/lib/bc/libgcc_s.a in distrib/sets/lists/minix/mi.
2014-08-29 12:56:51 -04:00
Erik van der Kouwe
a7db4b5d19 Skip modules that don't work on x86
Skip the following modules in relink.llvm/build.llvm:
 - i2c
 - gpio
 - cat24c256
 - tsl2550
2014-08-29 12:56:40 -04:00
Erik van der Kouwe
08423ba51f Adjust LLVM MINIX scripts for new source layout
Adjust to the fact that drivers and servers have moved into the minix
subdir.
2014-08-29 12:56:28 -04:00
Erik van der Kouwe
52c6ad72ab build.llvm fix to allow pass arguments
This allows pass arguments to be specified (written by Cristiano)
2014-08-29 12:56:23 -04:00
Lionel Sambuc
d90bee9749 Importing bin/sh
/etc/profile enables by default tabcompletion, as well as emacs mode,
in order to keep the old MINIX ash behavior.

Note: The shell now refuses to source a script without a relative or
      absolute path.
      This means:
        - '. myscript.sh' fails, while
        - '. ./myscript.sh' succeeds

Change-Id: I0be89b0747bd005e4c05cadb937af86883627dc6
2014-08-29 12:56:04 -04:00
Wojciech Zajac
2d64210c1d Much USB code for ARM USB support
Written by JP Embedded.

Host controller (HCD), mass storage, and hub drivers.

Change-Id: I4237cf7aeb4a1c0205a1876593a9cc67ef3d577e
2014-08-29 18:52:49 +02:00
Ben Gras
bad58c9c51 merge libminlib with libc
Change-Id: I79cc4ea90c378a1da3dac16487b53034953827a7
2014-08-28 18:49:19 +02:00
Ben Gras
c2808d8b07 remove libcompat_minix as library
. get rid of includes in libcompat_minix:
	  . move configfile.h to minix/include/
	  . all others are unneeded as they point to other files
	. merge the .c files with libc

Change-Id: I5e840c66fb9bc484f377926aa9d66473bbd16259
2014-08-28 18:49:13 +02:00
Ben Gras
d1abad940a some small changes
. add /sbin to tests $PATH for ping
	. take disable file mmap item from default boot menu
	. ask for feedback in motd
	. fix ext2fs on arm (the memory alloced with STATICINIT is flaky on arm)

Change-Id: I7525207074d62abc47ed3891139f6ef7ef6025be
2014-08-28 18:49:03 +02:00
David van Moolenbroek
27d0ecdb62 VFS: unbreak select on /dev/tty
The remapping from /dev/tty to the real controlling terminal in the
device code was confusing the select code.  The latter is now aware
of this case and should handle it properly, at the cost of one extra
field in the filp structure.

There is a nasty, hopefully sufficiently rare case of /dev/tty being
kept open while controlling terminals are changing, that we are still
not handling.  Doing so would require more than just a few changes,
but the code should at least detect and cleanly fail on this case.

Test77 now has a basic test set for selecting on /dev/tty.

Change-Id: Iaedea449cdb728d0e66a9de8faacdfd9638dfe92
2014-08-28 16:30:48 +00:00
David van Moolenbroek
673c4e01a5 PTY: let closed master cause EOF on slave
This puts PTY on par with e.g. rs232 as well as behavior documented
for other OSes.  It is not a fix for an issue in userland, though.

- add a (minimal) test case to test77;
- fix a few other minor issues in test77.

Change-Id: I89c000921ee69dd9f5713665349c1ab1ad1dc2cc
2014-08-28 16:30:25 +00:00
David van Moolenbroek
3b4688844f VFS: complete the devmajor_t/devminor_t switch
Change-Id: I9f809283f19d577cf7e02705fdbb2310ae2b6cba
2014-08-28 16:29:56 +00:00
David van Moolenbroek
391516dd77 tty/pty: unbreak stty(1)
Change-Id: I3f857dcbb89e18c7db3a72f4bd6809beb7904bc0
2014-08-28 16:29:27 +00:00
David van Moolenbroek
e5c9686c0f tty/pty: change back default CERASE to ^H
Alternatives should be considered (such as changing our keymaps to
better match NetBSD) in due time, but for now, the current default
is incredibly annoying!

Change-Id: I4cab5d6a9f39983ee8aa80362768fdb9cf3db948
2014-08-28 16:28:54 +00:00
David van Moolenbroek
7e94554b62 uptime(1): also report uptime
It might be more useful this way.  *cough*

Change-Id: I318169fef8bf7737dc46eebf5c5332ce42a9076a
2014-08-28 12:06:50 +00:00
Ben Gras
cd34841de5 INIT died problem / build system robustness
Changes provoked by debugging / making 'PM: INIT died' error debuggable.

This was caused (in one instance) by a missing /dev/console (and everything
else) on the boot time ramdisk.

	. sanity-check against this case by checking for console
	. PM: print init stacktrace and exit status when init dies
	. eliminate some explicitly invoked ${MAKE}s and a rm -rf in
	  Makefiles, causing race conditions; use explicit ordering (.WAIT)
	  instead, moving some of the burden of dependencies of partial builds
	  to the user. On the plus side, generate ramdisk just once.
	. make mkfs.mfs fail as soon as it sees an error missing file in
	  the proto file. - except for EACCES on minix native for the mfs
	  test. also fix some fmt warnings.
	. init: include debug info in executable

Change-Id: I8eea4986a4f64ecaf223aff5da321d8b4f4a3fa4
2014-08-28 08:52:50 +02:00
David van Moolenbroek
11eaad3501 Import NetBSD w(1) and uptime(1)
Change-Id: Id6cc36f4befbce4be3a471ae920d75972a44bef1
2014-08-27 10:13:37 +00:00
Lionel Sambuc
61df9b64d1 Fixes for -O3 with GCC
Change-Id: I8d8e267cc7996581729df4be0d8e21646ff9e1d2
2014-08-24 09:24:33 +00:00
David van Moolenbroek
7773367959 ps: fix reported run time 2014-08-24 09:22:36 +00:00
David van Moolenbroek
d26b52b7cf test59: fix status type for mthread_join call
Integer and pointer sizes may not be the same.
2014-08-24 09:22:35 +00:00
Lionel Sambuc
3260d16f34 Fix -DNDEBUG support
Change-Id: Ib64cef83a646bce2b0afa72b607fb9e5c306e859
2014-08-22 19:12:17 +02:00
Ben Gras
222afb38ac arm am335x: disable watchdog timer on bootup
. for new uboot (specifically beaglebone black rev c) compliance

Change-Id: I28fd0ca15f5365e14bf2bb9407f266e3e570b6d9
2014-08-22 14:30:49 +02:00
Ben Gras
2909efcb88 fix test48 - minix3.org.xyz resolves now
Change-Id: I40b86b7c8cbfcbac0c976c2477200081c2cfc8f7
2014-08-22 12:38:09 +02:00
Lionel Sambuc
7b5343bff9 Removal of commands fix: Keep builtin man pages.
Change-Id: I5cff0f987ed637677406e90faeecb8104f6551bc
2014-08-22 12:34:48 +02:00
Lionel Sambuc
ae8b65444d commands/test: removed
Change-Id: I5557eb2116d23c466ce82f1c8c9d18590316a0d0
2014-08-21 18:33:23 +02:00
Lionel Sambuc
d4c5f15a03 commands/expr: removed
Change-Id: I374f162959c6e0d708c7b1bd66f2c7a4346c097a
2014-08-21 18:33:23 +02:00
Lionel Sambuc
5b03ef0598 commands/command: removed
Change-Id: I90d57681e7bcabebff323f27af57bab108fa6d4d
2014-08-21 18:33:23 +02:00
Lionel Sambuc
4f88696945 commands/wait: removed
Change-Id: Ie712ec86ef9bbdeffb2fafb51b64600bd118d1e2
2014-08-21 18:33:22 +02:00
Lionel Sambuc
09012edc2b commands/read: removed
Change-Id: Iaa24bb634b31932f793f02c4df10b48030ab70a0
2014-08-21 18:33:22 +02:00
Lionel Sambuc
c6284ef73d commands/umask: removed
Change-Id: I0e09cd3e311dad61e72989262fef037759ae9d5d
2014-08-21 18:33:22 +02:00
Lionel Sambuc
3aa3cee7d5 commands/cd: removed
Change-Id: I438c1dfc778e23131fbd0ee1246abfb7df9437f3
2014-08-21 18:33:22 +02:00
Lionel Sambuc
594136a126 commands/getopts: removed
Change-Id: Idc9ec425749a76e2664906f2483be6071273507f
2014-08-21 18:33:21 +02:00
Ben Gras
7f5f010bbd netbsd ping & traceroute
. remove minix ping
	. add support for socket(AF_INET, SOCK_RAW, {IPPROTO_ICMP,IPPROTO_UDP})
	. gives test48 a better chance of detecting network connectivity

Change-Id: Ia678546d27ac378642f1160a141e1fc33458cce2
2014-08-21 08:07:39 -04:00
Lionel Sambuc
9a718e59fd releasetools/Makefile: updates 2014-08-21 10:59:26 +02:00
Lionel Sambuc
d13085797b minix/driver/storage/ramdisk: Makefile rework
This is an attempt at simplifying the Makefile, by specifying the home
directory of every utility, instead of trying to guess depending on some
variable.

While this is a bit more verbose, this simplifies the logic. This also makes
it simpler to add / remove programs from the ramdisk.

Change-Id: Id789a6cc6e5a9be11decec0f30c5327f19819aa1
2014-08-20 10:24:35 -04:00
Wojciech Zajac
187bd3cde6 DDEKit interrupt fix
- With this patch, DDEKit no longer uses IRQ number as interrupt ID
      and more IRQ numbers can be used with it

    - DDEKit IRQ code, will now check return values and panic on error

Change-Id: I9ef5ab1ee2262242204bdd8c0a60459a19ddcc1b
2014-08-19 18:24:29 +02:00
Lionel Sambuc
29271eabe4 Update usr/Makefile
- This improves the user messages.

 - This update the pkgsrc checkout rules to point to the new repository,
   as well as the new work process we are introducing.

 - This introduces rules for the MINIX sources, as we don't have the
   space anymore to distribute them by default on the official ISO.

Change-Id: Id1867286bd15efc46bad1d906c1ca1b3a883b064
2014-08-14 19:02:53 +02:00
Lionel Sambuc
d7e5edb2c7 /usr/tests/minix-posix/check-install
This script runs a subset of all the available test. This is aimed at
first time users which might be surprised by the warnings and time the
full test suite takes.

This runs all the tests which in case of success only print "ok" and
don't take too much time to run, independently of the network
connectivity.

Change-Id: Id54b7656a98f9ec81880f91cb63ca888a175f20f
2014-08-13 16:42:57 +02:00
Lionel Sambuc
aea6d8c922 Introduce pkgin_sets
This tool allow you to install one or more predefined package sets.

Change-Id: Id21c9e9fbd43f44f2d3b040961411428e1ae0af9
2014-08-13 16:42:57 +02:00