]> Zhao Yanbai Git Server - minix.git/log
minix.git
11 years agoAdd acpi poweroff
Xiaoguang Sun [Thu, 23 May 2013 11:06:13 +0000 (19:06 +0800)]
Add acpi poweroff

Use acpi poweroff if it's possible.

Change-Id: I103cc288523bf63fa536750b1d408ac88bbe35fb
Signed-off-by: Ben Gras <ben@minix3.org>
Signed-off-by: Tomas Hruby <tom@minix3.org>
11 years agovm: a bit more informative about failed pagefaults 00/600/2
Ben Gras [Wed, 29 May 2013 11:48:54 +0000 (11:48 +0000)]
vm: a bit more informative about failed pagefaults

Change-Id: I2b72dfb9291670cb837dfdb279f519892575d4a6

11 years agogen_uEnv.txt.sh shell neutraling 01/601/1
Ben Gras [Wed, 29 May 2013 12:10:22 +0000 (12:10 +0000)]
gen_uEnv.txt.sh shell neutraling

Change-Id: I52d5ac548373db1c4db9af79a24c2c9e2c1c1dcb

11 years agosyslog.conf: correct PID file path in comments. 98/598/2
Thomas Cort [Tue, 28 May 2013 19:07:10 +0000 (15:07 -0400)]
syslog.conf: correct PID file path in comments.

The syslogd.pid file has moved from /usr/run to /var/run. The comments
in syslog.conf direct the user to restart syslogd using the old PID
file location. This patch updates the comment to match the code.

Change-Id: Ib40cd1199ce201e1cbc74e1f1393d55a166ef343

11 years agoservers/pm: Fix EFAULT check for SETGROUPS 97/597/1
Lionel Sambuc [Tue, 28 May 2013 19:08:15 +0000 (19:08 +0000)]
servers/pm: Fix EFAULT check for SETGROUPS

The previous test would return EFAULT as soon as the group pointer
was NULL, while it is sensible when the count is also 0.

In that case, the SETGROUP syscall is expected to clear all the
group entries as the new set is empty.

Change-Id: I07b7e1d1f023a52e3035d53f7d9b42b660e039e8

11 years agofix some comment typo's
Qi Yong [Sun, 26 May 2013 14:11:59 +0000 (14:11 +0000)]
fix some comment typo's

Change-Id: Ic9f4333613abb858bfc28f72685424557cf2cd40

11 years agoarm:build add flags for AM335X 94/594/3
Kees Jongenburger [Fri, 24 May 2013 09:04:53 +0000 (11:04 +0200)]
arm:build add flags for AM335X

Change-Id: I1fd25d5ada52972fd2f6ec5057ff273544c65390

11 years agoarm:also use 1MB sections for mapping AM335X device memory. 93/593/3
Kees Jongenburger [Fri, 24 May 2013 08:28:00 +0000 (10:28 +0200)]
arm:also use 1MB sections for mapping AM335X device memory.

Change-Id: Idc0b285fcbabe8ec4c0be9a600b6a720c0bd3ffc

11 years agoarm:adapt MMC driver to also work on the AM335X platform. 92/592/3
Kees Jongenburger [Fri, 24 May 2013 08:26:51 +0000 (10:26 +0200)]
arm:adapt MMC driver to also work on the AM335X platform.

Change-Id: I30e69b7bfd377d1dd2b0b458dd00ee411b060285

11 years agoarm:mmc only compile mmchs when targeting arm. 95/595/1
Kees Jongenburger [Fri, 24 May 2013 13:39:41 +0000 (15:39 +0200)]
arm:mmc only compile mmchs when targeting arm.

Change-Id: Ie8d0b6461b58c2a7becda98401dece81be607a01

11 years agoarm:adapt tty driver for AM335X. 91/591/2
Kees Jongenburger [Fri, 24 May 2013 08:25:30 +0000 (10:25 +0200)]
arm:adapt tty driver for AM335X.

Change-Id: Ic861d68d0576c2abcdcb265a450c013ea2b28499

11 years agoarm:build also generate cmdline.txt 90/590/2
Kees Jongenburger [Fri, 24 May 2013 08:23:44 +0000 (10:23 +0200)]
arm:build also generate cmdline.txt

Also generate cmdline.txt as we need to use a different serial
for the AM335X boards.

Change-Id: I18c1b5911b5d7238d4a765e0aa01613908d9f2e6

11 years agoarm:omap timers remove hardcoded base address. 86/586/4
Kees Jongenburger [Thu, 23 May 2013 16:02:23 +0000 (18:02 +0200)]
arm:omap timers remove hardcoded base address.

Omap timers remove hardcoded base address and add some initial
support for the beaglebone's timers. Frclock_util will need
refactoring to remain independent of the ARM flavour.

Change-Id: I2b5d04e930364262c81b5686de634c0a51796b23

11 years agoarm:configure tick per ms to reflect the free running clock. 85/585/4
Kees Jongenburger [Thu, 23 May 2013 15:58:51 +0000 (17:58 +0200)]
arm:configure tick per ms to reflect the free running clock.

Change-Id: Ifc02658d6ae48dd01a868bfaa3d60f77bc6cc800

11 years agoarm:interupt handling remove hardcoded base address. 84/584/4
Kees Jongenburger [Thu, 23 May 2013 12:25:14 +0000 (14:25 +0200)]
arm:interupt handling remove hardcoded base address.

Remove hardcoded base address for the omap interrupt handler and add
interrupt names for AM335X in omap_intr.h.

Change-Id: Ie606d8612f55990d55f9db655583052f53950e8e

11 years agoarm:add AM335X serial 83/583/3
Kees Jongenburger [Thu, 23 May 2013 11:16:24 +0000 (13:16 +0200)]
arm:add AM335X serial

Change-Id: I728622ddd4f59529d15e8ac2499c41fa815eee3b

11 years agoarm:keep kernel and modules in the first 256MB of memory. 77/577/4
Kees Jongenburger [Thu, 23 May 2013 08:45:38 +0000 (10:45 +0200)]
arm:keep kernel and modules in the first 256MB of memory.

Keep kernel and modules in the first 256MB of memory in preparation
for the beaglebone. That target only has 256 MB of memory.

Change-Id: I3d92247b5d4e5d3aab7388fe01c2f5713d6a4593

11 years agoarm:remove hardcoded base address for the in kernel serial. 82/582/3
Kees Jongenburger [Thu, 23 May 2013 08:03:09 +0000 (10:03 +0200)]
arm:remove hardcoded base address for the in kernel serial.

Removed hardcoded base address for in kernel serial. This will ease
porting to different boards and allow us to remap i/o at later stage.

Change-Id: I4a4e00ed2aa2f94dfe928dc43a6816d3b94576b7

11 years agoarm:kernel simplify the in kernel serial. 81/581/3
Kees Jongenburger [Wed, 22 May 2013 14:40:45 +0000 (16:40 +0200)]
arm:kernel simplify the in kernel serial.

Simplify the in kernel serial header to a minimum. The driver doing
the real handling is the tty driver.

Change-Id: I5d487d71a3d22906313aa8af5e9d84b0751a6868

11 years agoarm:add DDM37XX cflag 80/580/3
Kees Jongenburger [Wed, 22 May 2013 09:25:59 +0000 (11:25 +0200)]
arm:add DDM37XX cflag

We are planning on using the NetBSD config system to perform build
system configuration when targeting different hardware variants.
This functionality however is not integrated yet and we currently
rely on using ifdef's in the code. This commit add the DDM37XX flag.

Change-Id: Ia25dfa520c7df4b648f4d1a583808de774acff63

11 years agoarm:build generate uEnv.txt 79/579/3
Kees Jongenburger [Wed, 22 May 2013 07:12:13 +0000 (09:12 +0200)]
arm:build generate uEnv.txt

Generate uEnv.txt to allow to generate an uEnv containing commands
to boot over the network.

Change-Id: I8bcd831ee474d837411568bf1c1e2c2d96ec931b

11 years agoreleasetools/arm_sdimage.sh: Improvements 89/589/2
Lionel Sambuc [Thu, 23 May 2013 16:09:19 +0000 (18:09 +0200)]
releasetools/arm_sdimage.sh: Improvements

 - Added the possibility to define the number of parallel jobs from the
   command line with (example, default is 1):
   $ JOBS=8 ./releasetools/arm_sdimage.sh

 - Generate filesystem filling the reserved partition area, instead of
   being smaller.

 - Added a possibility to specify additional parameter to the build.sh
   script from the command line with (example):
   $ BUILDVARS='-N0 -V MYVAR=yes' ./releasetools/arm_sdimage.sh

Change-Id: I5c34268ebf7d45a8d3408b45b1dc5051d775826c

11 years agousr.sbin/mkfs: Allow -b SIZE with proto file 88/588/2
Lionel Sambuc [Thu, 23 May 2013 16:02:58 +0000 (18:02 +0200)]
usr.sbin/mkfs: Allow -b SIZE with proto file

Previously, if a proto file was given, the -b argument would be ignored.

Also added:
 - if the number of inodes is not given, then an estimation is used.
 - sanity checks where moved from one special case to the general case.

Change-Id: I2abfa52bf34206c9087c64b5bfc26af866eb47cb

11 years agoFix symlink issue when generating an ARM image 87/587/2
Lionel Sambuc [Thu, 23 May 2013 16:00:34 +0000 (18:00 +0200)]
Fix symlink issue when generating an ARM image

A few symlinks were pointing to a nonexistent file named '(null)'
instead of their intended target. This was only seen when using the
arm_sdimage.sh script.

There is two ways of specifying links and directories. the first one
using an entry in one of the mtree files, and the second one in
/etc/Makefile.

Those entries where doubled, and one of them would specify some rights,
while the other had the target.

By removing those entries, I make sure there is only one definition of
these symlinks, which solves the problem I was seeing on an ARM image.

These symlinks are still present on a generated system, as they are
required.

Change-Id: I9ced8860f72d7c4d686a09720de4d8257d6e04fa

11 years agomkfs: only complain about failing stat with -d 78/578/2
Ben Gras [Thu, 23 May 2013 00:43:33 +0000 (02:43 +0200)]
mkfs: only complain about failing stat with -d

mkfs -d is a feature that needs a stat() of the mkfs binary, which
often fails (as mkfs is often not invoked with a full path or from
the same directory). it makes setup look a bit messy as the error
is always printed while installing the system, for each created FS,
even though the situation is harmless. This change only complains
when the stat is actually needed (-d).

Change-Id: I54ac01505aa97c1cbe40456c04a35aed5a7ee953

11 years agoarm: recognize instruction fetch pagefault 68/568/1
Ben Gras [Tue, 21 May 2013 12:57:57 +0000 (14:57 +0200)]
arm: recognize instruction fetch pagefault

. an instruction fetch pagefault generates a prefetch
  abort exception, this should also be a source of
  a pagefault event
. the saved_lr argument to the C exception handler was
  sometimes an address, sometimes a pointer to that address;
  the kernel sometimes dereferences it, so it should always be
  an in-kernel address, never a userspace address. fix in mpx.S
  makes it always a pointer.
. move dumping of all processes over serial out of
  the arch-specific arch_system.c

11 years agoat_wini: enable busmastering in pci if necessary
Ben Gras [Sat, 18 May 2013 13:24:23 +0000 (13:24 +0000)]
at_wini: enable busmastering in pci if necessary

11 years agovirtio_blk: always start if found 59/559/2
Ben Gras [Wed, 15 May 2013 15:45:33 +0000 (15:45 +0000)]
virtio_blk: always start if found

Change-Id: Iec70c67e1b675297b5ffb800a9fb263feffa9271

11 years agoarm:vm caching fix. 65/565/1
Kees Jongenburger [Thu, 16 May 2013 08:11:12 +0000 (10:11 +0200)]
arm:vm caching fix.

Improve reliability by using write trough cache.

11 years agoarm:vm header cleanup. 64/564/1
Kees Jongenburger [Thu, 16 May 2013 08:11:12 +0000 (10:11 +0200)]
arm:vm header cleanup.

11 years agoarm:make no assumptions about TRE and AFE 63/563/1
Kees Jongenburger [Thu, 16 May 2013 07:50:55 +0000 (09:50 +0200)]
arm:make no assumptions about TRE and AFE

The bootloader can leave the system control register
in at state that doesn't match our setup. make no assumptions
and configure TRE and AFE.

11 years agobuild:arm enable verbose mode by default. 62/562/1
Kees Jongenburger [Thu, 16 May 2013 08:20:01 +0000 (10:20 +0200)]
build:arm enable verbose mode by default.

11 years agobuild:arm disable I and D cache before loading the kernel. 61/561/1
Kees Jongenburger [Thu, 16 May 2013 08:18:07 +0000 (10:18 +0200)]
build:arm disable I and D cache before loading the kernel.

11 years agobuild:copy uEnv and cmdline.txt onto OBJ 60/560/1
Kees Jongenburger [Sat, 27 Apr 2013 07:50:04 +0000 (09:50 +0200)]
build:copy uEnv and cmdline.txt onto OBJ

11 years agobuild:make sdimage more silent. 57/557/2
Kees Jongenburger [Sat, 27 Apr 2013 20:58:49 +0000 (22:58 +0200)]
build:make sdimage more silent.

Change-Id: I9bba37c93c27c599ec914d1f069ca21e6cbfe111

11 years agobuild:add sbin and bin to path. 58/558/2
Kees Jongenburger [Tue, 14 May 2013 09:08:45 +0000 (11:08 +0200)]
build:add sbin and bin to path.

normal users don't have sbin in their path where sfdisk is
installed.

Change-Id: I7ee3412ca0f6fb208310aa7a0ee8cd88c0f3f80c

11 years agoRevert "virtio_blk: always start if found"
Ben Gras [Thu, 16 May 2013 13:34:17 +0000 (13:34 +0000)]
Revert "virtio_blk: always start if found"

Wrong commit pushed, investigating.

This reverts commit a476662532b3586e3c708f29b5e736b20d898d7e.

11 years agovirtio_blk: always start if found
Ben Gras [Wed, 15 May 2013 15:45:33 +0000 (15:45 +0000)]
virtio_blk: always start if found

Change-Id: Iec70c67e1b675297b5ffb800a9fb263feffa9271

11 years agomk.conf: workaround for pkgin sourcing it 42/542/2
Ben Gras [Wed, 8 May 2013 13:05:27 +0000 (13:05 +0000)]
mk.conf: workaround for pkgin sourcing it

Change-Id: Ie01c5781ff3372d6415bc8878270002988320c56

11 years agomkfs.mfs: various programs 34/534/2
Antoine Leca [Sat, 27 Apr 2013 15:52:14 +0000 (17:52 +0200)]
mkfs.mfs: various programs

Split in as many programs as needed to support various variants of MFS
Manual page updated (in mandoc format)

11 years agomkfs reloaded 32/532/2
Antoine Leca [Fri, 26 Apr 2013 18:54:22 +0000 (20:54 +0200)]
mkfs reloaded

* restored the zone>block stuff
* generalized the support for more-than-1-block bitmaps to also deal
  with big inodes maps in small blocks
* improved pexit() to printf-like syntax; also replaced pexit() with
  err() or errx() where there are no reference to proto lines
* unified the allocation of blocks to all use alloc_block() instead
  of raw malloc half of the time
* removed the V2_ d2_ etc. prefixes which are obscure and obsolete

While here, also
* used new-form definitions, and closer to KNF style in general
* used often-built-ins such as mem* or strncpy where relevant
* pruned a fair amount of constants which are irrelevant

Thanks to Thomas V. and Lionel who did a good amount of work with the
cross-compilation stuff and made that change to be much smoother.

11 years agokernel, random: adaptive entropy gathering 40/540/2
Ben Gras [Sun, 5 May 2013 23:52:34 +0000 (23:52 +0000)]
kernel, random: adaptive entropy gathering

kernel: stop gathering timestamps once the bin is full per interrupt

random: once seeded, retrieve new entropy at a lower rate

Change-Id: I4ce6081d39274728d82c6889686d1650cfd5fc2e

11 years agolibsys: panic hook feature 39/539/2
Ben Gras [Tue, 7 May 2013 12:36:59 +0000 (12:36 +0000)]
libsys: panic hook feature

. vfs: use it to dump threads stacks

Change-Id: I7ae3521fc153a407505f11049629e6d4142cf7c7

11 years agokernel ipc debug: various fixes 38/538/1
Ben Gras [Wed, 1 May 2013 19:02:06 +0000 (19:02 +0000)]
kernel ipc debug: various fixes

. add receive hooks in the kernel to print asynchronously
  delivered messages
. do not rely on MF_REPLY_PEND to decide between calls and errors,
  as that isn't reliable for asynchronous messages; try both instead
. add _sendcall() that extract-mfield.sh can then reliably recognize
  the fields for messages that are sent with just send()
. add DEBUG_DUMPIPC_NAMES to restrict printed messages to
  from/to given process names

Change-Id: Ia65eb02a69a2b58e73bf9f009987be06dda774a3

11 years agotty: non-overlapping code for FKEY_CONTROL 37/537/1
Ben Gras [Wed, 1 May 2013 19:01:17 +0000 (19:01 +0000)]
tty: non-overlapping code for FKEY_CONTROL

. to decode it in kernel/debug.c

Change-Id: I0d2cc66e87d97a362fa549b364b4d1b0e1225e66

11 years agobuild:Updated proto.dev from mkproto -s /dev 35/535/1
Kees Jongenburger [Mon, 29 Apr 2013 09:28:57 +0000 (11:28 +0200)]
build:Updated proto.dev from mkproto -s /dev

proto.dev was missing some entries and is currently used as base version for
the ARM root file system.

11 years agoARM:Rename ARM_BIG_PAGE to ARM_SECTION. 36/536/1
Kees Jongenburger [Mon, 29 Apr 2013 09:42:26 +0000 (11:42 +0200)]
ARM:Rename ARM_BIG_PAGE to ARM_SECTION.

The natural term to use when talking about MINIX big pages on ARM
is SECTION. A section is a level 1 page table entry pointing to
a 1MB area.

Change-Id: I9bd27ca99bc772126c31c27a537b1415db20c4a6

11 years agomkfs.mfs: double indirect block support 31/531/2
Ben Gras [Fri, 26 Apr 2013 15:35:31 +0000 (15:35 +0000)]
mkfs.mfs: double indirect block support

. allows >4MB files for default 4k block size

Change-Id: I09277fc3704fac1a44af82202c11435dc7ae8d55

11 years agoext2: annotate cache blocks with inode metadata 30/530/2
Ben Gras [Thu, 25 Apr 2013 12:03:40 +0000 (12:03 +0000)]
ext2: annotate cache blocks with inode metadata

. allows mmap() to work on it

Change-Id: I33af8b86ebb408d971478d00ed2caacf15afc7a5

11 years agolibminixfs, mfs, ext2: may re-evaluate cache size 29/529/1
Ben Gras [Fri, 26 Apr 2013 09:54:33 +0000 (09:54 +0000)]
libminixfs, mfs, ext2: may re-evaluate cache size

libminixfs may now be informed of changes to the block usage on the
filesystem. if the net change becomes big enough, libminixfs may
resize the cache based on the new usage.

. update the 2 FSes to provide this information to libminixfs

Change-Id: I158815a11da801fd5572a8de89c9e6c039b82650

11 years agolibelf:use self hosted m4. 27/527/2
Kees Jongenburger [Wed, 24 Apr 2013 09:04:28 +0000 (11:04 +0200)]
libelf:use self hosted m4.

Change-Id: Ia836aa6c43d7ccbb02047e63424923fdc74eb42d

11 years agotoproto:convert special execute bits to chars
Kees Jongenburger [Tue, 23 Apr 2013 14:51:02 +0000 (16:51 +0200)]
toproto:convert special execute bits to chars

Convert the special execute bits of the METALOG file mode entries into mkfs.mfs
compatible u and g flags.

11 years agoVFS: Implement REQ_BPEEK. 08/408/7
Ben Gras [Sat, 16 Mar 2013 04:09:36 +0000 (04:09 +0000)]
VFS: Implement REQ_BPEEK.

This commit introduces a new request type called REQ_BPEEK. It
requests minor device blocks from the FS.  Analogously to REQ_PEEK,
it requests the filesystem to get the requested blocks into its
cache, without actually copying the result anywhere.

Change-Id: If1d06645b0e17553a64b3167091e9d12efeb3d6f

11 years agolibexec: mmap support, prealloc variants 07/407/7
Ben Gras [Sat, 16 Mar 2013 03:46:37 +0000 (03:46 +0000)]
libexec: mmap support, prealloc variants

In libexec, split the memory allocation method into cleared and
non-cleared. Cleared gives zeroed memory, non-cleared gives 'junk'
memory (that will be overwritten anyway, and so needn't be cleared)
that is faster to get.

Also introduce the 'memmap' method that can be used, if available,
to map code and data from executables into a process using the
third-party mmap() mode.

Change-Id: I26694fd3c21deb8b97e01ed675dfc14719b0672b

11 years agoMFS: annotate cache blocks with inode metadata 06/406/7
Ben Gras [Sat, 16 Mar 2013 02:29:32 +0000 (02:29 +0000)]
MFS: annotate cache blocks with inode metadata

. use lmfs_* cache functions that provide the cache with inode
  metadata whenever applicable, i.e. tell the cache code which
  inode number and in-inode offset a particular cache block
  corresponds to.
. needed for mmap implementation

Change-Id: Ic7d3c0c49029880f86a31368278722e907bc2896

11 years agovm: new secondary cache code 18/418/6
Ben Gras [Wed, 20 Mar 2013 19:18:52 +0000 (19:18 +0000)]
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

11 years agoVM: memtype fix 16/416/6
Ben Gras [Wed, 20 Mar 2013 19:09:01 +0000 (19:09 +0000)]
VM: memtype fix

Memory types in VM are described by methods. Each mapped region has
a type, and all pages instantiated get that type on creation.
Individual page types has to be able to change though. This commit
changes the code to use the memory types of the individual pages,
where appropriate, instead of just the higher-level region, in case
it has changed. This is needed to e.g. support future copy-on-write
MAP_PRIVATE mmap modes.

Change-Id: I5523db14ac036ec774a54392fb67f9acb8725731

11 years agoVM: 64-bit mmap() 15/415/6
Ben Gras [Wed, 20 Mar 2013 18:45:10 +0000 (18:45 +0000)]
VM: 64-bit mmap()

Some (backwards-compatible) changes in mmap() call message fields
that allow for a 64-bit offset. minix_mmap() takes an off_t and
minix_mmap64() takes a u64_t. Some mmap() work in VM goes into a
separate function, using the new fields, so that that can be re-used
when files are to be mapped (future commit).

Change-Id: Ifb77a90b593dd3c33cf81b396068e4da1ec5fb1c

11 years agofilesystems: return ENOSYS for REQ_PEEK 14/414/6
Ben Gras [Wed, 20 Mar 2013 17:04:39 +0000 (17:04 +0000)]
filesystems: return ENOSYS for REQ_PEEK

The filesystems already implement REQ_PEEK, but do not fully
use the new filesystem cache code yet. (Because it isn't committed
yet..) REQ_PEEK should be disabled for them until they do.

This indicates to VFS that they are not annotating their cache
blocks (in VM) with inode number/offset info, and therefore mmap()
shouldn't succeed on any of their files. (Most importantly exec()
won't fallback elegantly otherwise.)

Change-Id: Ic57ee422864b4bbc031eadba32973270907b02fd

11 years agovm: remove secondary cache code 03/403/8
Ben Gras [Thu, 8 Nov 2012 12:45:06 +0000 (13:45 +0100)]
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

11 years agoChange function prototype to use endpoint_t instead of int 24/524/1
Xiaoguang Sun [Mon, 22 Apr 2013 23:50:45 +0000 (23:50 +0000)]
Change function prototype to use endpoint_t instead of int

11 years agobuild:refactor arm_sdimage.sh as to no longer require root. 21/521/2
Kees Jongenburger [Mon, 22 Apr 2013 20:53:44 +0000 (22:53 +0200)]
build:refactor arm_sdimage.sh as to no longer require root.

There where two reasons for needing root access while making ARM builds. The
first reason was that we needed root permissions to create device nodes and
assign permissions to files. The second reason we needed root was that we used
loop mounted files to copy the build output to the file backed storage.

The first problem is solved by building in unprivileged mode (adding -U) during
compilation. The second problem is solved by using mcopy to put files on the
fat partition and use the mkfs.mfs proto files to create MFS file system.

Future work might be to replace this script by the netbsd makefs tool.

Change-Id: Ibba61d4cad053f7c1ede26169d5214065a4939d8

11 years agobuild:add tool to convert from METALOG to proto files. 18/518/3
Kees Jongenburger [Fri, 19 Apr 2013 09:49:09 +0000 (11:49 +0200)]
build:add tool to convert from METALOG to proto files.

Change-Id: I5c4e15b1a2bac5a4ca3a0530f8d6aa2643ac720a

11 years agobuild:add script to sort netbsd sets and sort minix/mi. 17/517/3
Kees Jongenburger [Fri, 19 Apr 2013 09:43:26 +0000 (11:43 +0200)]
build:add script to sort netbsd sets and sort minix/mi.

Change-Id: I309d8bbcfe2f5b6d5e1ae7626422c4402985ad1d

11 years agorun script:return 1 upon test failure. 19/519/2
Kees Jongenburger [Sat, 20 Apr 2013 07:26:18 +0000 (09:26 +0200)]
run script:return 1 upon test failure.

Change-Id: If3c9d636a04da7f7b4098b58d29c492c664dab1a

11 years agomany new tests 11/511/6
Ben Gras [Fri, 12 Apr 2013 20:54:42 +0000 (20:54 +0000)]
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

11 years agovfs: fix null deref, pfs: add fchmod() 08/508/5
Ben Gras [Mon, 15 Apr 2013 17:44:19 +0000 (17:44 +0000)]
vfs: fix null deref, pfs: add fchmod()

. vfs read_only() assumes vnode->v_vmnt is non-NULL, but it can
  be NULL sometimes
. e.g. fchmod() on UDS triggered NULL deref; add a check and
  add REQ_CHMOD to pfs so unix domain sockets can be fchmod()ded
. add to test56

Change-Id: I83c840f101b647516897cc99fcf472116d762012

11 years agomkfs.mfs:add comment about the overflow check. 16/516/2
Kees Jongenburger [Thu, 18 Apr 2013 15:38:46 +0000 (17:38 +0200)]
mkfs.mfs:add comment about the overflow check.

Change-Id: I1f09c3a62377164296037f6dc9b7874023123311

11 years agomkfs.mfs:fix to allow to fill larger file systems. 15/515/2
Kees Jongenburger [Thu, 18 Apr 2013 12:29:53 +0000 (14:29 +0200)]
mkfs.mfs:fix to allow to fill larger file systems.

Allow the number of written blocks to exceed 8 * block_size.

Change-Id: I301ce46a92d86c6220c3af2acee22db26a4b4496

11 years agomkfs.mfs:remove MFS V1 related headers. 14/514/2
Kees Jongenburger [Thu, 18 Apr 2013 12:22:42 +0000 (14:22 +0200)]
mkfs.mfs:remove MFS V1 related headers.

Change-Id: I46a8128f54112ee0092ef60160d88cadd0038be0

11 years agomkfs.mfs:remove some globals 13/513/2
Kees Jongenburger [Wed, 17 Apr 2013 11:41:04 +0000 (13:41 +0200)]
mkfs.mfs:remove some globals

Remove the gobal inocount, zonecount and blockcount.

Change-Id: I77d120bb79bcf183e0c6b5abed736343af7badf2

11 years agorun script: correction, clarity
Ben Gras [Fri, 19 Apr 2013 10:24:50 +0000 (10:24 +0000)]
run script: correction, clarity

Change-Id: Ibf583c6277c67646dd90d7c49482daf4e76b78b6

11 years agotest run: feature for nicer jenkins interaction 12/512/2
Ben Gras [Thu, 18 Apr 2013 13:41:01 +0000 (13:41 +0000)]
test run: feature for nicer jenkins interaction

. add -l option to list available tests
. add -t option to specify tests to run
. also improve the root check a bit by
  not relying on an environment var
. do not print the human-friendly banner & summary
  if a test list is given to make the test
  results easy to parse

Change-Id: Id0f87d485240b1924d667af788338ae31c3dc94c

11 years agotests cleanup 10/510/2
Ben Gras [Tue, 16 Apr 2013 16:04:46 +0000 (16:04 +0000)]
tests cleanup

. make common.o link with the tests instead of being
  #included as common.c
. fix warnings about missing prototypes by declaring functions
  static
. reduces some duplicated code

Change-Id: Ic2a765d7f5886add5863190efec3fdd2d2ea2137

11 years agovfs: make m_out non-global 06/506/3
Ben Gras [Fri, 12 Apr 2013 16:41:23 +0000 (16:41 +0000)]
vfs: make m_out non-global

m_out is shared between threads as the reply message, and it can happen
results get overwritten by another thread before the reply is sent. This
change

. makes m_out local to the message handling function,
  declared on the stack of the caller
. forces callers of reply() to give it a message, or
  declare the reply message has no significant fields except
  for the return code by calling replycode()

Change-Id: Id06300083a63c72c00f34f86a5c7d96e4bbdf9f6

11 years agors232: remove unneeded lock()/unlock() functions 02/502/2
Michael W. Bombardieri [Fri, 12 Apr 2013 09:28:12 +0000 (11:28 +0200)]
rs232: remove unneeded lock()/unlock() functions

Change-Id: Ie1d2a7f460132aa59791cd7d16c9068b79675f1b

11 years agoremove utimes() workarounds
Thomas Cort [Wed, 10 Apr 2013 10:41:57 +0000 (10:41 +0000)]
remove utimes() workarounds

With the addition of utimes(), we can remove the workarounds
and use the original NetBSD code for timestamping files.

Also restore use of -p & -r for install while building

11 years agoAdd tests for utime*s() functions
Antoine Leca [Wed, 6 Feb 2013 18:29:28 +0000 (18:29 +0000)]
Add tests for utime*s() functions

11 years agoutimens(2) system call
Antoine Leca [Sat, 24 Dec 2011 14:02:54 +0000 (15:02 +0100)]
utimens(2) system call

Variant of utime(2) with struct timespec (with ns precision)
instead of time_t values; also allows for tv_nsec members
the values UTIME_NOW (force update to current time) or
UTIME_OMIT (allow to set either atim or mtim independently.)

Provides a superset of utimes(2), futimes(2), lutimes(2),
and futimens(2).
Provides the same subset of utimensat(2) as does NetBSD 6.
Also import utimens() and lutimeNS() from NetBSD-current.

11 years agocleanup:misc documentation fix.
Kees Jongenburger [Wed, 10 Apr 2013 15:05:44 +0000 (17:05 +0200)]
cleanup:misc documentation fix.

11 years agoarm_sdimage:hide non fatal errors.
Kees Jongenburger [Wed, 10 Apr 2013 14:58:46 +0000 (16:58 +0200)]
arm_sdimage:hide non fatal errors.

Redirect the output of the command that are supposed to fail to
/dev/null.

11 years agoarm:cleanup add assert.
Kees Jongenburger [Wed, 10 Apr 2013 14:53:18 +0000 (16:53 +0200)]
arm:cleanup add assert.

11 years agoarm:cleanup omap serial, remove unused defines.
Kees Jongenburger [Wed, 10 Apr 2013 14:43:10 +0000 (16:43 +0200)]
arm:cleanup omap serial, remove unused defines.

11 years agoarm:rs232 fix.
Kees Jongenburger [Wed, 10 Apr 2013 13:00:42 +0000 (15:00 +0200)]
arm:rs232 fix.

The kernel API for requesting interrupts and the associated callback
have a somewhat strange behaviour. Requesting an interrupts is done
by calling sys_irqsetpolicy using an interrupt and a given id. This
id can be modified by the sys_irqsetpolicy and must be used for
subsequent calls to sys_irqenable/sys_irqdisable. However upon an
incoming call from the kernel NOTIFY_ARG contains the original value
encoded in a set e.g. if  1 << id == true the interrupt was raised.

11 years agommc:Change startup message in rc script.
Kees Jongenburger [Mon, 8 Apr 2013 13:08:15 +0000 (15:08 +0200)]
mmc:Change startup message in rc script.

11 years agoarm:increase the amount of interrup vectors
Kees Jongenburger [Fri, 5 Apr 2013 09:33:39 +0000 (11:33 +0200)]
arm:increase the amount of interrup vectors

Increase the amount of interrup vectors in preparation for the AM335X.

11 years agoarm:cleanup remove special case memory handling.
Kees Jongenburger [Fri, 5 Apr 2013 08:50:40 +0000 (10:50 +0200)]
arm:cleanup remove special case memory handling.

We used to load the memory driver above the other modules to allow
the memory driver (ramdisk) to grow. We no longer want or need this
this as we have a working mmc driver.

11 years agoReducing external/bsd/file differences 81/481/3
Lionel Sambuc [Wed, 10 Apr 2013 09:08:42 +0000 (11:08 +0200)]
Reducing external/bsd/file differences

Change-Id: I0d025059ba0b200ac1162ea5a764fd756600ecd0

11 years agoAlso apply sub-second UTIME to libpuffs
Antoine Leca [Sun, 7 Apr 2013 08:44:49 +0000 (10:44 +0200)]
Also apply sub-second UTIME to libpuffs

11 years agoSubsecond timestamps support for FS
Antoine Leca [Wed, 21 Dec 2011 22:29:29 +0000 (23:29 +0100)]
Subsecond timestamps support for FS

Expand REQ_UTIME to include tv_nsec members
(as in struct timespec) in addition to tv_sec==time_t

Designed with help from David van Moolenbroek

11 years agoLibpuffs: use struct timespec instead of time_t
Antoine Leca [Sun, 7 Apr 2013 08:42:26 +0000 (10:42 +0200)]
Libpuffs: use struct timespec instead of time_t

11 years agosys/stat.h: better align with NetBSD-current
Antoine Leca [Fri, 5 Apr 2013 22:10:35 +0000 (00:10 +0200)]
sys/stat.h: better align with NetBSD-current

11 years agomake minix lwip make explicit use of 'int' 91/491/1
Michael W. Bombardieri [Thu, 11 Apr 2013 20:37:30 +0000 (22:37 +0200)]
make minix lwip make explicit use of 'int'

makes lwip use "unsigned int" instead of "unsigned" since this is
more obvious (i.e. type is not implied).

Change-Id: I852eb80484516e1235241d55be3e15174fa24109

11 years agoDowngrading to netbsd zlib version 80/480/2
Lionel Sambuc [Sat, 6 Apr 2013 16:45:48 +0000 (18:45 +0200)]
Downgrading to netbsd zlib version

Change-Id: I83cf73d8357ea34ab5e49fe15bd4c45ce54cac01

11 years agoRemoving include/minix/limits.h 79/479/2
Lionel Sambuc [Mon, 8 Apr 2013 14:54:49 +0000 (16:54 +0200)]
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

11 years agoAdding missing dependency on libraries for hdboot 73/473/2
Lionel Sambuc [Fri, 5 Apr 2013 12:22:46 +0000 (14:22 +0200)]
Adding missing dependency on libraries for hdboot

 * Also cleanup a bit the makefile.
 * Also removing small inconsistency for arm builds where log would be
   skipped if doing a make hdboot, but not when cross-compiling.

Change-Id: Ic9e20655234a667ea8a967d05589d4df46c2d521

11 years agotests/run: add test69 to setuids.
Thomas Cort [Sat, 6 Apr 2013 22:46:56 +0000 (22:46 +0000)]
tests/run: add test69 to setuids.

test69 requires superuser powers to adjust the time. This caused
the test to fail when run as a normal user. The patch adds test69
to the setuid list which will allow regular users to execute it.

Patch contributed by Antoine Leca.

11 years agoImporting usr.sbin/rdate 76/476/2
Thomas Cort [Sat, 6 Apr 2013 12:47:10 +0000 (12:47 +0000)]
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

11 years agoetcfiles: Improve the "install" message 77/477/1
Antoine Leca [Sat, 6 Apr 2013 22:22:07 +0000 (22:22 +0000)]
etcfiles: Improve the "install" message

11 years agoImporting usr.bin/ftp 75/475/1
Thomas Cort [Fri, 5 Apr 2013 19:02:06 +0000 (19:02 +0000)]
Importing usr.bin/ftp