The new functionality aims to save each file system server from having
to implement its own block I/O routines just so that it can serve as a
root file system. The new source file (bio.c) lists the requirements
that file system servers have to fulfill in order to use the routines.
The minixfs library only ever submits vector elements (and reads) of
the system page size. The test implementation was expecting vector
elements (and reads) of the file system block size. The resulting
mismatch caused I/O to fail in various ways, even though this did not
have an effect on the actual test.
Updating the current block size before flushing the cache, which still
contained blocks with the old block size, resulted in triggering an
assert on position alignment.
This library provides new abstractions for the upper (VFS) side of
file system services, and should be used for all file system service
implementations from now on. It provides the following functionality:
- a function call table abstraction, hiding the details of the
VFS-FS protocol with simple parameters;
- a (currently limited) number of per-function steps required for
all file system implementations, such as copying in and out path
names and result buffers;
- a default implementation for multicomponent path lookups, such
that the file system merely has to implement resolution of single
components at a time;
- an abstraction for copying data from and to the file system, which
allows transparent intraprocess copying as required for the lookup
implementation;
- a set of functions to simplify getdents implementations.
The message loop provided by the library is currently for use by
single-threaded file system implementations only. Multithreaded file
system services may use the more low-level message processing
functionality.
Protocol-level optimizations such as including names in protocol
messages may be hidden entirely in this library. In addition, in the
future, the lookup implementation may be replaced by a single-
component lookup VFS/FS protocol request as part of a VFS name cache
implementation; this, too, can be hidden entirely in this library.
Ben Gras [Fri, 12 Sep 2014 10:34:13 +0000 (12:34 +0200)]
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.
Ben Gras [Thu, 4 Sep 2014 11:31:37 +0000 (13:31 +0200)]
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
- 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.
- 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.
The conversion was never properly implemented for asynchronous
character drivers, and got lost during the removal of the
synchronous character protocol.
Lionel Sambuc [Sun, 3 Aug 2014 21:10:41 +0000 (23:10 +0200)]
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
Ben Gras [Sun, 24 Aug 2014 22:19:51 +0000 (00:19 +0200)]
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
Ben Gras [Sun, 24 Aug 2014 22:19:25 +0000 (00:19 +0200)]
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)
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.
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!
Ben Gras [Mon, 25 Aug 2014 16:35:59 +0000 (18:35 +0200)]
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
Lionel Sambuc [Sun, 3 Aug 2014 19:38:36 +0000 (21:38 +0200)]
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.
Lionel Sambuc [Wed, 13 Aug 2014 11:21:19 +0000 (13:21 +0200)]
/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.
Lionel Sambuc [Fri, 8 Aug 2014 16:14:06 +0000 (18:14 +0200)]
TOOL_TIC: Set to "/usr/bin/tic", instead of "tic"
There is a tic command which comes with a package. When this package is
installed, this prevent "make build" from completing, as the packaged
tic as incompatible arguments.
Lionel Sambuc [Thu, 7 Aug 2014 11:37:43 +0000 (13:37 +0200)]
Removing /home/bin
The bin user doesn't need an actual home folder to run the tests. As
such this account should not be used in 'su - bin'. To be noted that
'su bin' still works as expected, and allow to run the minix test set
as usual.
Lionel Sambuc [Thu, 7 Aug 2014 11:15:50 +0000 (13:15 +0200)]
Removing the ast account
We used to have an account "ast" as a token to Andrew S. Tannebaum,
the creator of MINIX. The account was disable by default, with no
possible way to login.
It seems it generates more confusion than it is worth, so this removes it.
The default skeleton user profile is still stored into /etc/ast instead
of the usual /etc/skel.