Commit graph

6789 commits

Author SHA1 Message Date
Ben Gras
a875715bb4 restore single user mode
. the minix init started rc with the 'bootargs' variable.
	  this can now be cleanly passed to rc by executing sysenv
	  from the ramdisk rc script.

Change-Id: I68d0d2ab0be326b2ae30438a62dd7649b600c2d2
2014-09-12 23:16:13 +02:00
Ben Gras
8d311af7ae small arm image script changes
. let you specify IMG as a block device directly. this minimizes
	  i/o (only write used parts of the filesystem) and so turnaround
	  time - while still allowing the big default FS size.

Change-Id: Ib738499464e0d350a474a706f688d3f10806207d
2014-09-12 14:20:37 +02:00
Lionel Sambuc
ab5c98ee5a Temporarily disable the is9600 FS server
It is currently too broken to be of any use anyway. Fixes are pending,
which is why this patch is intended to be reverted before those are
merged.

For the time being, the following tools can be used to access cdroms:
 - isodir
 - isoinfo
 - isoread
 - writeisofs

Change-Id: I681e8f1224bb464ba978f893dc18d46fa06a8208
2014-09-12 13:39:49 +02:00
Lionel Sambuc
6631803105 usb/hcd: asserts should not have side effects
They can be deactivated with -DNDEBUG, which is why they can't contain
code which should always be run.

It seems the local implementation of USB_ASSERT doesn't honor the
CPP flags NDEBUG, this will be corrected in a later patch.

Change-Id: Iac56b09fd563f1b8c4c7be15a468a05b9cc86a18
2014-09-12 13:20:43 +02:00
Lionel Sambuc
d5b158e992 pkgin_sets: Fix python package name
Change-Id: I09658a10f750b3d15867d6bd69d749c61831a00d
2014-09-12 11:10:30 +02:00
Lionel Sambuc
684b2eb975 /usr/Makefile: prevent pkgin from hanging
Change-Id: Ida6086f3c2d3300609aaebb931d094fd779c73ea
2014-09-12 11:07:33 +02:00
David van Moolenbroek
bb9431cb88 Kernel: update copyright year
Change-Id: I1776f1bc6402f264c7095c17a9ace087036cf010
2014-09-10 13:01:45 +00:00
David van Moolenbroek
e60f57aa30 rc: update (unused) default service directory
Change-Id: I62f838a47ef92975ef88319fffd94f83814fef49
2014-09-09 10:04:31 -04:00
David van Moolenbroek
16b6870659 blocktest: update test.sh for new shell
Change-Id: I9c08139db972013a16f5794bd213b69bba0b5350
2014-09-09 10:04:09 -04:00
Sky Liu
2fde3a4846 Porting uuencode/uudecode from NetBSD
Lionel: I fixed small mistakes in the mi file, typos, missing keywords,
        and whitespace fixes.

Change-Id: If0c04b923af328838f2d0950e189bf28995bc0f0
2014-09-08 19:51:28 +02:00
Lionel Sambuc
31b808b8fa Drop minix-malloc & friends
Known limitations:
 - comment for now testisofs, as iso9660fs is known to be broken.

Benefits:
 - near 3x speed improvement on C++ code compilation, bringing down
   make build to from 44min down to 21min.

 - Allows for X applications to work properly, which should be available
   in near-term future through pkgsrc for 3.3.0.

Change-Id: I8f4179a7ea925ed381642add32cfd8c5822217e4
2014-09-08 17:30:18 +02:00
Lionel Sambuc
6f7ac603f2 Allow elf_unpack to withstand invalid ELF headers
Change-Id: I10a0f3111176b9614b8531d6736e2e860eb95ce4
2014-09-08 11:48:57 +02:00
Lionel Sambuc
ea36b58e62 Set uts.machine to i386 on intel 32bit platforms.
Change-Id: Ic0833843f0d3e3df50fcbde11b453b846f0d4f33
2014-09-05 15:35:23 +02:00
Lionel Sambuc
3f072cf30f commands/setup: fixes for new sh & renamed fsck
- adapt an arithmetic expression for the new sh
 - update the fsck call to use the main fsck wrapper instead of a
   specific fsck version.

Change-Id: I7e25bf6e54b5c9f564082459e78b9ce5c39254cf
2014-09-05 10:26:19 +02:00
Lionel Sambuc
c48c7d47f7 Remove SETS.* from the CD.
Change-Id: I06385c51d7d24b4e0e6af037c5953ef11695c923
2014-09-05 10:26:19 +02:00
Lionel Sambuc
094431dd97 set LD_LIBRARY_PATH
Change-Id: I959043857b381df561ce156b7388444628c81afb
2014-09-05 10:26:18 +02:00
Ben Gras
85ebb0e0c3 tps65950: allow 0 as id for qemu beaglexm
makes booting on qemu beaglexm a lot prettier.

Change-Id: I45d0383abbf0d21227a95f538ed78ca6c1ed7871
2014-09-04 13:46:02 +02:00
Ben Gras
683d394d66 devmand: skip unconfigured script invocations
. if a up/down script isn't specified, devmand
	  would try to execute a command line with (null)
	  in it, causing messy messages on startup
	. skip script at a higher level when missing,
	  and add asserts for expected strings at the lower level

Change-Id: Ia0d772076f3781caa5879ea4e64b53fa6c6e8478
2014-09-04 13:33:11 +02:00
Ben Gras
a4d4ce4adb retire unstack & datasizes in favour of addr2line
Change-Id: Ibf5db75f3358c3c0bf81ca211a6602b333af0473
2014-09-03 19:14:13 +02:00
Ben Gras
fcba33f524 increase root FS size to 128MB
Change-Id: Ibccc32d672b138fd267641e5e5a6e06bfa8502e9
2014-09-03 18:36:11 +02:00
Ben Gras
4f9ef4d3b0 VM: mem_shared: allow re-pagefault
Change-Id: Iffd0e265c03f064545c9689ac204c58335d32c9a
2014-09-03 14:32:54 +02:00
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