Commit graph

74 commits

Author SHA1 Message Date
Thomas Cort 2cb302057c Importing usr.bin/column
No Minix-specific changes needed.

Change-Id: Ia883c948f6b9e5602f29fbf28f87646529563a84
2013-10-17 17:22:40 -04:00
Thomas Cort e816d08843 Importing sbin/nologin
No Minix-specific changes needed.

Change-Id: I727432c4a28654e351a9289b3e03f143a1c26a7b
2013-10-17 08:40:33 -04:00
Thomas Cort 401bad1a4d Importing usr.bin/users
No Minix-specific changes needed.

Change-Id: I886ff43d1ec63c6c3393bc1307425676b107a274
2013-10-16 13:18:59 -04:00
Thomas Cort 40b23ce476 Importing usr.bin/unzip
No Minix-specific changes needed.

Change-Id: Ib0b2bf2254acf3d8704bd6acda83af997240ebcf
2013-10-14 23:53:26 -04:00
Thomas Cort 1e69cb63f4 Importing usr.bin/nl
* Add _SC_LINE_MAX to unistd.h (value of 15 from NetBSD).
 * Add _SC_LINE_MAX case to sysconf(3) in libc.
 * usr.bin/nl itself required no Minix specific changes.

Change-Id: I10f056ccdf4f212beb1272f735f41303e5036c05
2013-10-14 18:06:05 -04:00
Thomas Cort b50dbb4d24 Importing usr.bin/machine
Change-Id: I7dd97073e94cbb75fdac7f15c73437c8ce44a606
2013-10-02 14:58:25 +02:00
Thomas Cort 79cc8b683f Importing usr.bin/rev
Change-Id: I73c661eb9d4cca5c17b969bb3831541c1f7f9319
2013-09-30 15:19:38 +02:00
Ben Gras b6d951df17 arm_sdimage.sh: use native minix partition util
. make filesystems on primary partitions to make it
	  easier on the minix partition util
	. so sfdisk isn't required as an external tool
	. also make partition and hitherto x86-only utilities
	  arch-independent

Change-Id: Ib4e07e45d038d084dde1858917d3deb7f0616532
2013-09-27 14:13:43 +02:00
Lionel Sambuc 0b8a9e801d Importing usr.bin/basename
Change-Id: I2c71c83bc6a420390c4aed015373f78ebf425903
2013-08-25 18:51:36 +02:00
Lionel Sambuc 17120a359b Fix testsh1 execution in /usr/tests/minix-posix
Change-Id: Ib9ee7d9af72b5da2c6585cc11f80feefd4de5844
2013-08-24 15:08:21 +02:00
Antoine Leca cfc36e5fd3 Drop obsolete <minix/compiler.h> and <minix/crtso.h>
Change-Id: I05da32bd2bdf014b6fd5c39d6e808d3c73812dc0
2013-08-07 16:28:39 +00:00
Antoine Leca da82f9b2e8 <a.out.h>, MINIX style: remove as obsolete
Change-Id: Icc8b7210d60a93ac9cc4610d676dcba270756410
2013-08-06 11:43:35 +02:00
Antoine Leca 14f89a8efe Remove unmaintained "ack" size nm mdb
Change-Id: Iba84fd51f16577e6123148d4505c7687ea1c071d
2013-08-06 10:14:09 +02:00
Thomas Cort 09db2a8c67 readclock: add support for am335x RTC
Add support for getting/setting the am335x SoC's internal real
time clock. Also, allow the power off alarm to be set.

Make readclock an "always on" driver. This is needed for setting
power-off alarms whenever the power button is pressed on the BBB.

Replace the readclock.sh script & single run driver with a
readclock program that takes the same arguments and forwards
the requests on to the always up readclock driver.

Change-Id: Ifd6c2acd80ae4b5e79d83df510df445c24e24a71
2013-08-05 08:37:51 -04:00
Lionel Sambuc 11be35a165 Importing NetBSD "Kyua" test framework
To do so, a few dependencies have been imported:

 * external/bsd/lutok
 * external/mit/lua
 * external/public-domain/sqlite
 * external/public-domain/xz

The Kyua framework is the new generation of ATF (Automated Test
Framework), it is composed of:

 * external/bsd/atf
 * external/bsd/kyua-atf-compat
 * external/bsd/kyua-cli
 * external/bsd/kyua-tester
 * tests

Kyua/ATF being written in C++, it depends on libstdc++ which is
provided by GCC. As this is not part of the sources, Kyua is only
compiled when the native GCC utils are installed.

To install Kyua do the following:

 * In a cross-build enviromnent, add the following to the build.sh
   commandline: -V MKBINUTILS=yes -V MKGCCCMDS=yes

WARNING:
  At this point the import is still experimental, and not supported
  on native builds (a.k.a make build).

Change-Id: I26aee23c5bbd2d64adcb7c1beb98fe0d479d7ada
2013-07-23 20:43:41 +02:00
Thomas Cort 8a643e5128 libi2cdriver: library for i2c device drivers
Change-Id: Ib6d5617e4b62e0bc5b25e6fa92b44baf536b1961
2013-07-15 17:02:57 -04:00
Thomas Cort 3c59273c97 Importing usr.sbin/i2cscan
Change-Id: I7b776d6e5f3fe4f7a1af353b995ef9e2e752c7ea
2013-07-15 11:11:13 -04:00
Thomas Cort 550fdfb443 i2c: initial bus drivers for am335x and dm37xx
Change-Id: I478704fbf30dbf6d3382bcbfb11e75b512c032a1
2013-07-15 11:11:13 -04:00
Lionel Sambuc 0cdf705cc6 Enable optional GCC install and GCC improvements
-By adding MKGCC=yes and MKGCCCMDS=yes on the make commandline
   it is now possible to compile and install GCC on the system.

   Before doing this, if you are not using the build.sh script,
   you will need to call the fetch scripts in order to retrieve
   the sources of GCC and its dependencies.

 -Reduce difference with NetBSD share/mk

   Move Minix-specific parameters from bsd.gcc.mk to bsd.own.mk,
   which is anyway patched, so that bsd.gcc.mk is now aligned
   on the NetBSD version.

 -Clean libraries dependencies, compiles stdc++ only if gcc is
   also compiled (it is part of the gcc sources)

 -Correct minix.h header sequence, cleanup spec headers.

 -Fix cross-compilation from a 32bit host targeting MINIX/arm

Change-Id: I1b234af18eed4ab5675188244e931b2a2b7bd943
2013-07-12 14:22:03 +02:00
Lionel Sambuc c566d4623b Allow install of binutils and import texinfo
- Enable installing binutils from the base system.

 - Import texinfo which is required for the binutils tools
   to be compiled.

 - Also adapted the fetch rules to correctly generate the
   gitignore files for gcc, and allow the case of multiple
   modules in the same directory, as found in gnu/dist.

Warning: This patch has an entry in docs/UPDATING

Change-Id: Ib781734e8fd7f9c6265fa65d62ba2cf3fccbc5ba
2013-07-12 14:18:08 +02:00
Lionel Sambuc 4af66e563d Upgrading to binutils-2.22
* Added --with-ld=default
 * Added --with-lto
 * Fixed ld script for ARM
 * Options are prepared for future activation of gold.

Change-Id: Id9618904055e18d1b37f5e9585f775c367ff356e
2013-07-08 18:53:55 +02:00
Xiaoguang Sun 64f10ee644 Implement getrusage
Implement getrusage.
These fields of struct rusage are not supported and always set to zero at this time
long ru_nswap;           /* swaps */
long ru_inblock;         /* block input operations */
long ru_oublock;         /* block output operations */
long ru_msgsnd;          /* messages sent */
long ru_msgrcv;          /* messages received */
long ru_nvcsw;           /* voluntary context switches */
long ru_nivcsw;          /* involuntary context switches */

test75.c is the unit test for this new function

Change-Id: I3f1eb69de1fce90d087d76773b09021fc6106539
2013-07-01 23:00:47 +02:00
Thomas Cort 4241cc5d98 include: Import dev/i2c/i2c_io.h
Change-Id: Icb754891349b7f571863f3a87b0318c28c35ac79
2013-06-27 14:20:12 -04:00
Anton Kuijsten 2e3046757a LLVM bitcode for almost the whole source tree
Change-Id: Ibc6f89de112e0649c3a3bfe49c2baa2ed0746212
2013-06-18 10:49:53 +02:00
Thomas Cort ba92d5219d clkconf: move clkconf from libgpio to it's own lib
Clock configuration will be needed by other/future subsystems such as i2c.
Extract the functionality from libgpio and put it into it's own library.

Change-Id: I6f6de0b3fb4d305ddfeac74123b78c983d1318dd
2013-06-18 09:09:23 +02:00
Thomas Cort 3d257f8073 Importing usr.bin/shuffle 2013-06-10 10:51:49 +02:00
Thomas Cort 1d842c6a57 Importing libexec/fingerd 2013-06-02 08:14:05 -04:00
Thomas Cort 92f7a4ab20 Importing usr.bin/bdes 2013-06-02 09:52:35 +02:00
Ben Gras 49b9165251 vm: mmap support
. test74 for mmap functionality
	. vm: add a mem_file memory type that specifies an mmap()ped
	  memory range, backed by a file
	. add fdref, an object that keeps track of FD references within
	  VM per process and so knows how to de-duplicate the use of FD's
	  by various mmap()ped ranges; there can be many more than there can
	  be FD's
	. turned off for now, enable with 'filemap=1' as boot option

Change-Id: I640b1126cdaa522a0560301cf6732b7661555672
2013-05-31 15:42:01 +00:00
Thomas Cort d8b7bfdfe8 Importing usr.bin/logname 2013-05-31 16:13:41 +02:00
Ben Gras 62da011387 import netbsd ftpd
Change-Id: Id7a3dbd40a6f37c55bcbb0d1456301f60626298f
2013-05-30 16:29:20 +00:00
Antoine Leca e35821b207 mkfs.mfs: various programs
Split in as many programs as needed to support various variants of MFS
Manual page updated (in mandoc format)
2013-05-13 11:18:15 +02:00
Ben Gras 49eb1f4806 vm: new secondary cache code
Primary purpose of change: to support the mmap implementation, VM must
know both (a) about some block metadata for FS cache blocks, i.e.
inode numbers and inode offsets where applicable; and (b) know about
*all* cache blocks, i.e.  also of the FS primary caches and not just
the blocks that spill into the secondary one. This changes the
interface and VM data structures.

This change is only for the interface (libminixfs) and VM data
structures; the filesystem code is unmodified, so although the
secondary cache will be used as normal, blocks will not be annotated
with inode information until the FS is modified to provide this
information. Until it is modified, mmap of files will fail gracefully
on such filesystems.

This is indicated to VFS/VM by returning ENOSYS for REQ_PEEK.

Change-Id: I1d2df6c485e6c5e89eb28d9055076cc02629594e
2013-04-24 10:18:16 +00:00
Ben Gras adf2032bc0 vm: remove secondary cache code
This commit removes the secondary cache code implementation from
VM and its usage from libminixfs. It is to be replaced by a new
implementation.

Change-Id: I8fa3af06330e7604c7e0dd4cbe39d3ce353a05b1
2013-04-24 10:18:10 +00:00
Kees Jongenburger fd7bb1786e build:add tool to convert from METALOG to proto files.
Change-Id: I5c4e15b1a2bac5a4ca3a0530f8d6aa2643ac720a
2013-04-21 21:36:30 +02:00
Kees Jongenburger f8dbcfa7f2 build:add script to sort netbsd sets and sort minix/mi.
Change-Id: I309d8bbcfe2f5b6d5e1ae7626422c4402985ad1d
2013-04-21 21:35:49 +02:00
Ben Gras 32a4e0d84d many new tests
. test70: regression test for m_out vfs race condition

The following tests use testcache.c to generate test i/o
patterns, generate random write data and verify the reads.

	. test71: blackbox full-stack test of FS operation, testing
	  using the regular VFS interface crazy i/o patterns
	  with various working set sizes, triggering only
	  primary cache, also secondary cache, and finally
	  disk i/o and verifying contents all the time
	. test72: unit test of libminixfs, implementing
	  functions it needs from -lsys and -lblockdriver
	  and the client in order to simulate a working
	  cache client and backend environment.
	. test73: blackbox test of secondary vm cache in isolation

Change-Id: I1287e9753182b8719e634917ad158e3c1e079ceb
2013-04-19 16:21:48 +00:00
Lionel Sambuc 435f2b0095 Downgrading to netbsd zlib version
Change-Id: I83cf73d8357ea34ab5e49fe15bd4c45ce54cac01
2013-04-09 16:43:13 +02:00
Lionel Sambuc dd6b239665 Removing include/minix/limits.h
This files defines two constants which are only used through
sys/syslimits. So they where moved there instead of including the file
and it was removed.

Change-Id: Iba3d220144dddf5d6411a6c66e2f223a1aafb50f
2013-04-09 16:43:02 +02:00
Thomas Cort 8357e3a442 Importing usr.sbin/rdate
Import the NetBSD rdate command and remove the Minix rdate command.
The default behaviour for both is the same. The NetBSD version adds
options to just display the time, adjust the time using adjtime(),
and set the time without printing the time.

Porting Notes:
 - Compiles cleanly out of the box without any warnings
 - Path changes from /usr/bin/rdate to /usr/sbin/rdate
 - checked pkgsrc for any usages of rdate (none found)
 - checked src for any usages of rdate (none found)

Testing:
 - all command line options work (tested with time.nist.gov server)
 - Native and cross build OK

Change-Id: I613449763891a896527f337999c006a970c3924c
2013-04-08 08:37:04 +02:00
Thomas Cort 15b3d77268 libc: add adjtime() system call.
Implement the adjtime() system call and add a test for it to test69.
Additionally, install the adjtime.2 and clock_*.2 man pages.
2013-04-04 15:04:54 +02:00
Thomas Cort 18ad4c0799 test69: add clock_getres() and clock_gettime() tests. 2013-04-04 15:04:53 +02:00
Ben Gras d6bc6cb44b some etc fixes
. split user-editable and system-owned files in etc/Makefile
	. mtab is a symlink, not a file now; remove it
	. force-install of certain system-controlled /etc files from
	  top Makefile
	. rename /etc/make.conf to /etc/mk.conf; and don't set $ARCH;
	  reduce difference in bsd.own.mk

Change-Id: I9f4bbb8d37ba80cba7dcfcf1a9a89e934910f579
2013-04-04 12:50:12 +00:00
Tomas Hruby a1fa603ed5 lwip (inet's alternative) is compiled by default 2013-03-25 16:51:25 +01:00
Thomas Cort 1d4c0ebe0f Importing usr.bin/from 2013-03-23 16:11:11 +01:00
Thomas Cort 66601c7f92 Importing usr.bin/whatis
- LSC: fixed missing entry in minix/mi

Change-Id: I5766dd72819e3b15ef24ab49c5ee3a5aa42049c4
2013-03-23 16:10:23 +01:00
David van Moolenbroek 50e46307de Move MINIX reboot definitions into minix/reboot.h
Also fix a buffer overflow in commands/reboot/sh_wall.c.

Change-Id: I3a61057c4f0221d1700e14d44520b4ad17f1dbe1
2013-03-20 16:50:01 +00:00
Thomas Cort 2718b5688b Importing bin/ksh 2013-03-14 11:33:10 +01:00
Lionel Sambuc a212fd1ba5 Install default users directly
Install /home/ast and /home/bin as part of the system build procedure,
as the setup script is not ran on the arm image.

/home/bin is needed for successful completion of our test suite.

This patch does not change the setup script, as it is not bothered by
those files/directiories being already there, and may be useful during
reinstallation on intel systems.

Change-Id: I358c881df09223c343442673aa0822937f9ea33c
2013-03-13 10:43:40 +01:00
Lionel Sambuc 5180c3cfb9 Installing posix tests in /usr/tests/minix-posix
The goal is to enable anyone to simply run our current test suite.

Change-Id: I27d8856cb82a4be2baa5dc5273526383b7f4fc2c
2013-03-13 10:43:16 +01:00