Commit graph

6451 commits

Author SHA1 Message Date
David van Moolenbroek
81db4f2cff libpuffs: use libfsdriver
Change-Id: I26651578066e1098dc275a9cfbe5710870a13811
2014-09-18 12:46:25 +00:00
David van Moolenbroek
a99c939dee libsffs: use libfsdriver
Change-Id: Id8377873455771c614371e115643cd906d05f12c
2014-09-18 12:46:25 +00:00
David van Moolenbroek
ebd3c0673d libminixfs: add block I/O routines
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.

Change-Id: Ia0190fd5c30e8c2097ed8f4b0e3ccde1827e0b92
2014-09-18 12:46:25 +00:00
David van Moolenbroek
c5beebb68d libminixfs: do not make fs_sync upcalls
The file system may not be expecting these upcalls at arbitrary
moments, while they serve only as a performance optimization anyway.

Change-Id: I0748fd1f6c2645ddbb64466093ee36025aac45e0
2014-09-18 12:46:24 +00:00
David van Moolenbroek
35118b0a91 test72: fix mock bdev functions
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.

Change-Id: I02f4a3efcd4a32916435d82c7d5798e6b78f0a27
2014-09-18 12:46:24 +00:00
David van Moolenbroek
f018897664 test72: fix premature block size update
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.

Change-Id: I7a83f3d3bc57bafc08aa6c8df64fbf978273bbfd
2014-09-18 12:46:23 +00:00
David van Moolenbroek
89c9de7d09 Add libfsdriver: a library to drive file systems
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.

Change-Id: Ib34f0d0e021dfa3426ce8826efcf3eaa94d3ef3e
2014-09-18 12:46:23 +00:00
David van Moolenbroek
e7b4aa7d99 VFS: provide correct root directory for lookups
This fixes a VFS panic and a chroot(2) security hole.

Change-Id: Ifd1923f886501cf3a73277aab89db974798c47dc
2014-09-18 12:46:23 +00:00
David van Moolenbroek
71cd1dd4b9 VFS: do not call REQ_FLUSH on the root file system
Change-Id: I15d29a6f3d198e604ea7f7a9db600d6d18b6994b
2014-09-18 12:46:22 +00:00
Ben Gras
588a35b929 Set the motd to point to a wiki page.
Change-Id: I12bc9d07c4d3d0bcb17a27521a0f06ad5abb5fda
2014-09-13 23:56:50 +02:00
Ben Gras
5457987d13 set reasonable packages list
. clang, binutils and git and dependencies on CD
	. don't bzip .iso

Change-Id: If43324b46289de5fd1ca7b64785f8ae6e97fd6b7
2014-09-13 22:23:43 +02:00
Ben Gras
43eceae54c restore pkgin_cd
. make release.sh put packages on the cd
	. make setup script produce a better rc.package file

Change-Id: Ia4b7588975c2ddf630fa1c510715d82755f67f1e
2014-09-13 17:05:52 +02:00
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