./bin/mv minix-base
./bin/netconf minix-base
./bin/pax minix-base
-./bin/printconfig minix-base
+./bin/printconfig minix-base obsolete
./bin/printroot minix-base
./bin/ps minix-base
./bin/pwd minix-base
./bin/readclock minix-base
./bin/rm minix-base
./bin/rmdir minix-base
-./bin/service minix-base
+./bin/service minix-base obsolete
./bin/setup minix-base
./bin/sh minix-base
./bin/sleep minix-base
./sbin/fsck_mfs minix-base
./sbin/halt minix-base
./sbin/init minix-base
+./sbin/minix-service minix-base
./sbin/mkfs.mfs minix-base
./sbin/mknod minix-base
./sbin/newfs_ext2fs minix-base
./sbin/nologin minix-base
./sbin/ping minix-base
./sbin/poweroff minix-base
+./sbin/printconfig minix-base
./sbin/reboot minix-base
./sbin/shutdown minix-base
./sbin/sysctl minix-base
./usr/libdata/debug/bin/mount.debug minix-debug debug
./usr/libdata/debug/bin/mv.debug minix-debug debug
./usr/libdata/debug/bin/pax.debug minix-debug debug
-./usr/libdata/debug/bin/printconfig.debug minix-debug debug
+./usr/libdata/debug/bin/printconfig.debug minix-debug debug,obsolete
./usr/libdata/debug/bin/printroot.debug minix-debug debug
./usr/libdata/debug/bin/ps.debug minix-debug debug
./usr/libdata/debug/bin/pwd.debug minix-debug debug
./usr/libdata/debug/bin/readclock.debug minix-debug debug
./usr/libdata/debug/bin/rm.debug minix-debug debug
./usr/libdata/debug/bin/rmdir.debug minix-debug debug
-./usr/libdata/debug/bin/service.debug minix-debug debug
+./usr/libdata/debug/bin/service.debug minix-debug debug,obsolete
./usr/libdata/debug/bin/sh.debug minix-debug debug
./usr/libdata/debug/bin/sleep.debug minix-debug debug
./usr/libdata/debug/bin/stty.debug minix-debug debug
./usr/libdata/debug/sbin/fsck_ext2fs.debug minix-debug debug
./usr/libdata/debug/sbin/fsck_mfs.debug minix-debug debug
./usr/libdata/debug/sbin/init.debug minix-debug debug
+./usr/libdata/debug/sbin/minix-service.debug minix-debug debug
./usr/libdata/debug/sbin/mknod.debug minix-debug debug
./usr/libdata/debug/sbin/newfs_ext2fs.debug minix-debug debug
./usr/libdata/debug/sbin/newfs_msdos.debug minix-debug debug
./usr/libdata/debug/sbin/newfs_udf.debug minix-debug debug
./usr/libdata/debug/sbin/newfs_v7fs.debug minix-debug debug
./usr/libdata/debug/sbin/ping.debug minix-debug debug
+./usr/libdata/debug/sbin/printconfig.debug minix-debug debug
./usr/libdata/debug/sbin/reboot.debug minix-debug debug
./usr/libdata/debug/sbin/shutdown.debug minix-debug debug
./usr/libdata/debug/sbin/sysctl.debug minix-debug debug
./usr/man/man8/loadramdisk.8 minix-man
./usr/man/man8/makefs.8 minix-man
./usr/man/man8/makewhatis.8 minix-man
+./usr/man/man8/minix-service.8 minix-man
./usr/man/man8/mknod.8 minix-man
./usr/man/man8/mtree.8 minix-man
./usr/man/man8/netconf.8 minix-man
./usr/man/man8/rshd.8 minix-man
./usr/man/man8/screendump.8 minix-man
./usr/man/man8/serial-ip.8 minix-man obsolete
-./usr/man/man8/service.8 minix-man
+./usr/man/man8/service.8 minix-man obsolete
./usr/man/man8/setup.8 minix-man
./usr/man/man8/shutdown.8 minix-man
./usr/man/man8/slip.8 minix-man
+20170222:
+ Because of naming conflicts, the MINIX 3 service(8) utility has been
+ renamed to "minix-service". After successfully rebuilding the system
+ *and* rebooting (no earlier!), remove the old service utility:
+
+ # rm /bin/service
+
+ Better yet, use the postinstall(8) command to remove all files marked
+ as obsolete. It is not a bad idea to do this every now and then:
+
+ # postinstall fix obsolete
+
+ ..but only ever after the reboot! Either way, deleting the old service
+ tool will avoid conflicts with the same-named NetBSD utility later on.
+
20170218:
Before starting a build, you will have to update your master.passwd and
group files in /etc. This is needed because we have switched over from
service=$1
shift
- service $opt up /service/$service "$@"
+ minix-service $opt up /service/$service "$@"
}
edit()
if [ ! -x $binlocation ]
then binlocation=/sbin/$service
fi
- service $opt edit $binlocation -label $service "$@"
+ minix-service $opt edit $binlocation -label $service "$@"
}
while getopts 'saf' opt
rootline=`cat /etc/mtab | grep "on / "`
rootfs=fs_`echo "$rootline" | cut -d' ' -f1 | cut -d'/' -f3`
roottype=`echo "$rootline" | cut -d' ' -f5`
- service -c edit /service/$roottype -label $rootfs
+ minix-service -c edit /service/$roottype -label $rootfs
fi
if [ "$sflag" ]
if [ -x /service/usbd ]
then
- service down usbd
+ minix-service down usbd
fi
# Tell RS server we're going down.
- service shutdown
+ minix-service shutdown
;;
esac
# TSL2550 Ambient Light Sensor
test -e /dev/tsl2550b3s39 || (cd /dev && MAKEDEV tsl2550b3s39)
-/bin/service up /service/tsl2550 -dev /dev/tsl2550b3s39 \
+/sbin/minix-service up /service/tsl2550 -dev /dev/tsl2550b3s39 \
-label tsl2550.3.39 -args 'bus=3 address=0x39' && echo -n " tsl2550"
# SHT21 Temperature and Humidity Sensor
test -e /dev/sht21b3s40 || (cd /dev && MAKEDEV sht21b3s40)
-/bin/service up /service/sht21 -dev /dev/sht21b3s40 \
+/sbin/minix-service up /service/sht21 -dev /dev/sht21b3s40 \
-label sht21.3.40 -args 'bus=3 address=0x40' && echo -n " sht21"
# BMP085 Temperature and Pressure Sensor
test -e /dev/bmp085b3s77 || (cd /dev && MAKEDEV bmp085b3s77)
-/bin/service up /service/bmp085 -dev /dev/bmp085b3s77 \
+/sbin/minix-service up /service/bmp085 -dev /dev/bmp085b3s77 \
-label bmp085.3.77 -args 'bus=3 address=0x77' && echo -n " bmp085"
daemonize tcpd http /usr/share/beaglebone/weather/weatherstation.lua
restarts=$(grep restarts /proc/service/$1 |cut -d: -f2)
restarts=$(( $restarts + 1 ))
-service down "$1"
+minix-service down "$1"
kill_by_name dhcpd
kill_by_name nonamed
kill_by_name syslogd
sleep 3
if [ X`/bin/sysenv lwip` = Xyes ]
then
- service up /service/lwip -script /etc/rs.inet -dev /dev/ip -restarts $restarts
+ minix-service up /service/lwip -script /etc/rs.inet -dev /dev/ip -restarts $restarts
dhcpd --lwip &
else
- service up /service/inet -script /etc/rs.inet -dev /dev/ip -restarts $restarts
+ minix-service up /service/inet -script /etc/rs.inet -dev /dev/ip -restarts $restarts
daemonize dhcpd
fi
daemonize nonamed -L
for dir in $SERVICES_DIRS
do bin=$dir/$service
if [ -x $bin -a -z "$found" ]
- then service $opt up $bin "$@"
+ then minix-service $opt up $bin "$@"
echo -n " $service"
found=yes
fi
intr irdpd isoread \
loadkeys loadramdisk logger look lp \
lpd lspci mail MAKEDEV \
- mount mt netconf \
+ minix-service mount mt netconf \
nonamed \
prep printroot \
profile progressbar pr_routes \
ramdisk rarpd rawspeed readclock \
remsync rget rlogin \
- rotate service setup \
+ rotate setup \
slip spell sprofalyze sprofdiff srccrc \
svrctl swifi synctree sysenv \
tcpd tcpdp tcpstat telnet \
#include <assert.h>
#include <signal.h>
#include <minix/dmap.h>
+#include <minix/paths.h>
#include "usb_driver.h"
#include "proto.h"
-#define SERVICE_BINARY "/bin/service"
-
-
#define DEVMAN_TYPE_NAME "dev_type"
#define PATH_LEN 256
#define INVAL_MAJOR -1
assert(inst->label);
snprintf(cmdl, 1024, "%s down %s %d",
- SERVICE_BINARY, inst->label, inst->dev_id);
- dbg("executing service: \"%s\"", cmdl);
+ _PATH_MINIX_SERVICE, inst->label, inst->dev_id);
+ dbg("executing minix-service: \"%s\"", cmdl);
ret = system(cmdl);
if (ret != 0)
{
assert(inst->label);
snprintf(cmdl, 1024, "%s up %s -major %d -devid %d -label %s",
- SERVICE_BINARY, inst->drv->binary, inst->major, inst->dev_id,
+ _PATH_MINIX_SERVICE, inst->drv->binary, inst->major, inst->dev_id,
inst->label);
- dbg("executing service: \"%s\"", cmdl);
+ dbg("executing minix-service: \"%s\"", cmdl);
ret = system(cmdl);
drv_inst->dev_id = dev_id;
- /* start driver (invoke service) */
+ /* start driver (invoke minix-service) */
start_driver(drv_inst);
/*
--- /dev/null
+# Makefile for minix-service
+PROGS= minix-service printconfig
+SRCS.minix-service=minix-service.c parse.c util.c
+SRCS.printconfig=print.c parse.c util.c
+
+BINDIR= /sbin
+MAN.minix-service= minix-service.8 system.conf.5
+MAN.printconfig=
+
+.include <bsd.prog.mk>
-.TH SERVICE 8
+.TH MINIX-SERVICE 8
.SH NAME
-service \- Manage an operating system service.
+minix-service \- Manage an operating system service.
.SH SYNOPSIS
.PP
-\fBservice [-b -c -n -p -r] (up|run|edit|update)\fR \fI<binary|self>\fR
+\fBminix-service [-b -c -n -p -r] (up|run|edit|update)\fR \fI<binary|self>\fR
[\fB-args\fR \fI<args>\fR] [\fB-dev\fR \fI<special>\fR]
[\fB-period\fR \fI<ticks>\fR]
[\fB-script\fR \fI<path>\fR] [\fB-label\fR \fI<name>\fR]
[\fB-config\fR \fI<path>\fR] [\fB-state\fR \fI<state>\fR]
[\fB-maxtime\fR \fI<time>\fR]
.PP
-\fBservice down\fR \fI<label>\fR
+\fBminix-service down\fR \fI<label>\fR
.PP
-\fBservice refresh\fR \fI<label>\fR
+\fBminix-service refresh\fR \fI<label>\fR
.PP
-\fBservice restart\fR \fI<label>\fR
+\fBminix-service restart\fR \fI<label>\fR
.PP
-\fBservice clone\fR \fI<label>\fR
+\fBminix-service clone\fR \fI<label>\fR
.PP
-\fBservice shutdown\fR
+\fBminix-service shutdown\fR
.br
.de FL
.TP
..
.SH DESCRIPTION
.PP
-The \fBservice\fR utility instructs the reincarnation server (\fBRS\fR)
+The \fBminix-service\fR utility instructs the reincarnation server (\fBRS\fR)
to perform an action for a given system service (an OS server
or device driver). The action may concern an existing system service
(SHIFT+F6 to list them all), or a new system service to be started
.SH ACTIONS
.PP
.SS
-\fBservice up\fR \fI<binary>\fR
+\fBminix-service up\fR \fI<binary>\fR
.PP
.PP
Starts a new system service identified by the given \fI<binary>\fR,
The default is to use the global system configuration file \fB/etc/system.conf\fR.
.PP
.SS
-\fBservice run\fR \fI<binary>\fR
+\fBminix-service run\fR \fI<binary>\fR
.PP
.PP
Runs a new system service identified by the given \fI<binary>\fR,
which must be specified using an absolute path. Similar to
-\fBservice up\fR \fI<binary>\fR, but instructs \fBRS\fR not to
+\fBminix-service up\fR \fI<binary>\fR, but instructs \fBRS\fR not to
restart the service upon termination. This action is currently a shorthand
-for \fBservice up\fR \fI<binary>\fR \fB-script\fR \fI/etc/rs.single\fR, which
-uses a recovery script that simply brings down the service upon termination.
-This action should be only used for short-lived programs that need system
-service privileges and do not require crash recovery support.
+for \fBminix-service up\fR \fI<binary>\fR \fB-script\fR \fI/etc/rs.single\fR,
+which uses a recovery script that simply brings down the service upon
+termination. This action should be only used for short-lived programs that need
+system service privileges and do not require crash recovery support.
.PP
.SS
-\fBservice edit\fR \fI<binary>\fR [\fB-label\fR \fI<name>\fR]
+\fBminix-service edit\fR \fI<binary>\fR [\fB-label\fR \fI<name>\fR]
.PP
.PP
Edits settings of an existing system service identified by the given
action takes the same options supported by the \fBup\fR action.
.PP
.SS
-\fBservice update\fR \fI<binary|self>\fR
+\fBminix-service update\fR \fI<binary|self>\fR
.PP
.PP
Live updates an existing system service with a new version identified by the
for the update. The default is 0 (unlimited).
.PP
.SS
-\fBservice down\fR \fI<label>\fR
+\fBminix-service down\fR \fI<label>\fR
.PP
.PP
Stops an existing system service identified by the given \fI<label>\fR. \fBRS\fR
services cannot be shut down.
.PP
.SS
-\fBservice refresh\fR \fI<label>\fR
+\fBminix-service refresh\fR \fI<label>\fR
.PP
.PP
Refreshes an existing system service identified by the given \fI<label>\fR.
\fBRS\fR will kill the service and attempt to restart it.
.PP
.SS
-\fBservice restart\fR \fI<label>\fR
+\fBminix-service restart\fR \fI<label>\fR
.PP
.PP
Restarts an existing terminated system service identified by the
given \fI<label>\fR. This action can only be used from a recovery script.
.PP
.SS
-\fBservice clone\fR \fI<label>\fR
+\fBminix-service clone\fR \fI<label>\fR
.PP
.PP
Clones an existing system service to create a replica \fBRS\fR will use
to restart the service upon termination.
.PP
.SS
-\fBservice shutdown\fR
+\fBminix-service shutdown\fR
.PP
.PP
Tells \fBRS\fR the system is about to shutdown and no system service should
.PP
.SH EXAMPLES
.TP 20
-.B service up /sbin/is -period 5HZ
+.B minix-service up /sbin/is -period 5HZ
# Start the IS server and check its status every 5 seconds.
.br
.TP 20
-.B service up /usr/sbin/dp8390 -args DPETH0=pci
+.B minix-service up /usr/sbin/dp8390 -args DPETH0=pci
# Start the DP8390 ethernet driver, passing one argument.
.br
.TP 20
-.B service down lance
+.B minix-service down lance
# Stop the system service with label lance.
.br
.SH "SEE ALSO"
}
if (cp == NULL)
{
- fprintf(stderr, "service: service '%s' not found in '%s'\n",
- label, filename);
+ fprintf(stderr, "minix-service: service '%s' not found in "
+ "'%s'\n", label, filename);
exit(1);
}
.B /etc/system.conf
is the global system configuration file that contains the
configuration for all the primary system services. This is the file
-that the \fBservice\fR utility uses by default. Custom configuration
+that the \fBminix-service\fR utility uses by default. Custom configuration
files with the same format can be specified on a per-service basis. See
-.BR service (8)
+.BR minix-service (8)
for more details.
This page is a summary of all the elements that can be found in this
The syntax used is that of the common configuration file described in
.BR configfile (5).
.PP
-The \fBservice\fR utility scans the configuration file from beginning to end
-to gather information about a specific system service when starting or
+The \fBminix-service\fR utility scans the configuration file from beginning to
+end to gather information about a specific system service when starting or
updating the properties of a service.
The file contains a collection of service entries of the form:
.RS
specifies the user id or the user name to use to run the system service.
\fISELF\fR can be used when the service has to start with the realuid of
-the user who's executing the \fBservice\fR utility.
+the user who's executing the \fBminix-service\fR utility.
Many system services run with root privileges (uid \fB0\fR).
The default user is service (uid \fB12\fR).
.RE
.PP
.SH "SEE ALSO"
.BR configfile (5),
-.BR service (8),
+.BR minix-service (8),
.BR boot (8).
.SH AUTHOR
Cristiano Giuffrida <giuffrida@cs.vu.nl>
{
va_list ap;
- fprintf(stderr, "service: fatal error: ");
+ fprintf(stderr, "minix-service: fatal error: ");
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
{
va_list ap;
- fprintf(stderr, "service: warning: ");
+ fprintf(stderr, "minix-service: warning: ");
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
+++ /dev/null
-# Makefile for service
-PROGS= service printconfig
-SRCS.service=service.c parse.c util.c
-SRCS.printconfig=print.c parse.c util.c
-
-BINDIR= /bin
-MAN.service= service.8 system.conf.5
-MAN.printconfig=
-
-.include <bsd.prog.mk>
# 'Recovery' script immediately restarts.
echo "Arguments: $@" >/dev/console
-service restart "$1"
+minix-service restart "$1"
start_driver()
{
- service up $EXE -label $LABEL -script /etc/rs.single -period 3HZ
+ minix-service up $EXE -label $LABEL -script /etc/rs.single -period 3HZ
}
do_one()
}
# Start our own driver.
-service down $LABEL
+minix-service down $LABEL
sleep 10 # Allow driver to die
start_driver
esac
# Start our own driver.
-service down $LABEL
+minix-service down $LABEL
sleep 2 # Allow driver to die
-service up $EXE -script `pwd`/rs.restart_imm -period 3HZ $DEV
+minix-service up $EXE -script `pwd`/rs.restart_imm -period 3HZ $DEV
i=0
while [ $i -lt "$count" ]
done
# Restart the driver
-service refresh $LABEL
+minix-service refresh $LABEL
esac
# Start our own driver.
-service down $LABEL
+minix-service down $LABEL
sleep 10 # Allow driver to die
-service up $EXE -script `pwd`/rs.restart_imm -period 3HZ
+minix-service up $EXE -script `pwd`/rs.restart_imm -period 3HZ
i=0
while [ $i -lt "$count" ]
echo "driver failed to connect after $connect_blocks blocks"
# Restart the driver
-service refresh $LABEL
+minix-service refresh $LABEL
Enable verbose mode.
.El
.Sh SEE ALSO
-.Xr service 8
+.Xr minix-service 8
.Sh AUTHORS
The
.Nm
STATES="vfs:2 ahci_:2 virtio_blk_:2"
# If this variable is set, it is used as timeout for the live updates. The
-# service(8) argument takes a number of click ticks, or a number of seconds
-# if the value ends with "HZ".
+# minix-service(8) argument takes a number of click ticks, or a number of
+# seconds if the value ends with "HZ".
TIMEOUT=300HZ
# Configuration ends here.
# Perform the live update. The update may legitimately fail if the
# service is not in the right state. TODO: report transient errors
# as debugging output only.
- service -a update $binary -progname $filename -label $label \
+ minix-service -a update $binary -progname $filename -label $label \
-asr-count $count $state $maxtime
error=$?
if [ $error -eq 0 ]; then
sb16/ SB16 ISA driver
Running the drivers:
-* service up /service/es137{0,1} -dev /dev/audio
+* minix-service up /service/es137{0,1} -dev /dev/audio
(default 7 and 220)
- make install
- MAKEDEV /dev/audio (if /dev/audio doesn't allready exist)
-- service up /service/sb16_dsp -dev /dev/audio
-- service up /service/sb16_mixer -dev /dev/mixer
+- minix-service up /service/sb16_dsp -dev /dev/audio
+- minix-service up /service/sb16_mixer -dev /dev/mixer
done... (you can include the last 2 lines in /usr/etc/rc)
Starting up the instances:
-/bin/service up /service/i2c -dev /dev/i2c-1 -label i2c.1 -args instance=1
-/bin/service up /service/i2c -dev /dev/i2c-2 -label i2c.2 -args instance=2
-/bin/service up /service/i2c -dev /dev/i2c-3 -label i2c.3 -args instance=3
+/sbin/minix-service up /service/i2c -dev /dev/i2c-1 -label i2c.1 -args instance=1
+/sbin/minix-service up /service/i2c -dev /dev/i2c-2 -label i2c.2 -args instance=2
+/sbin/minix-service up /service/i2c -dev /dev/i2c-3 -label i2c.3 -args instance=3
There is an i2cscan program from NetBSD which can detect devices on the bus:
Starting up an instance:
-/bin/service up /service/cat24c256 -dev /dev/eepromb1s50 -label cat24c256.1.50 -args 'bus=1 address=0x50'
+/sbin/minix-service up /service/cat24c256 -dev /dev/eepromb1s50 -label cat24c256.1.50 -args 'bus=1 address=0x50'
Starting up an instance:
-/bin/service up /usr/sbin/tps65217 -label tps65217.1.24 \
+/sbin/minix-service up /usr/sbin/tps65217 -label tps65217.1.24 \
-args 'bus=1 address=0x24'
Killing an instance:
-/bin/service down tps65217.1.24
+/sbin/minix-service down tps65217.1.24
Starting up an instance:
-/bin/service up /service/tps65950 -label tps65950.1.48 \
+/sbin/minix-service up /service/tps65950 -label tps65950.1.48 \
-args 'bus=1 address=0x48'
Killing an instance:
-/bin/service down tps65950.1.48
+/sbin/minix-service down tps65950.1.48
The measurement resolution is configurable in the chip, but this driver just
uses standard mode. It could probably be implemented with an ioctl() or by
-passing an argument via the service command, but it doesn't seem too useful at
-this time. See the data sheet for the trade-offs between conversion time,
-power consumption, and resolution.
+passing an argument via the minix-service command, but it doesn't seem too
+useful at this time. See the data sheet for the trade-offs between conversion
+time, power consumption, and resolution.
While only the BMP085 is supported at present, the BMP085's predecessor,
SMD500, should be easy to support in this driver with some small changes
this is how you start up an instance:
cd /dev && MAKEDEV bmp085b3s77
-/bin/service up /service/bmp085 -label bmp085.3.77 -dev /dev/bmp085b3s77 \
- -args 'bus=3 address=0x77'
+/sbin/minix-service up /service/bmp085 -label bmp085.3.77 \
+ -dev /dev/bmp085b3s77 -args 'bus=3 address=0x77'
Getting the sensor value:
Killing an instance:
-/bin/service down bmp085.3.77
+/sbin/minix-service down bmp085.3.77
The measurement resolution is configurable in the chip, but this driver just
uses the default maximum resolutions (12-bit for Humidity, 14-bit for
temperature). It could probably be implemented with an ioctl() or by passing
-an argument via the service command, but it doesn't seem too useful at this
-time. See the data sheet for the trade-off between faster conversion time and
-lower resolution.
+an argument via the minix-service command, but it doesn't seem too useful at
+this time. See the data sheet for the trade-off between faster conversion time
+and lower resolution.
In testing, the temperature sensor reported a value several degrees higher
than an indoor thermometer placed nearby. It doesn't appear to be a bug in the
this is how you start up an instance:
cd /dev && MAKEDEV sht21b3s40
-/bin/service up /service/sht21 -label sht21.3.40 -dev /dev/sht21b3s40 \
+/sbin/minix-service up /service/sht21 -label sht21.3.40 -dev /dev/sht21b3s40 \
-args 'bus=3 address=0x40'
Getting the sensor value:
Killing an instance:
-/bin/service down sht21.3.40
+/sbin/minix-service down sht21.3.40
this is how you start up an instance:
cd /dev && MAKEDEV tsl2550b3s39
-/bin/service up /service/tsl2550 -label tsl2550.3.39 -dev /dev/tsl2550b3s39 \
- -args 'bus=3 address=0x39'
+/sbin/minix-service up /service/tsl2550 -label tsl2550.3.39 \
+ -dev /dev/tsl2550b3s39 -args 'bus=3 address=0x39'
Getting the sensor value:
Killing an instance:
-/bin/service down tsl2550.3.39
+/sbin/minix-service down tsl2550.3.39
* Mini how-to
On the BeagleBone Black, the block device files /dev/c1d* (major = 8) are free.
The driver can use /dev/c1d0.
-# service up /service/emmc -dev /dev/c1d0
+# minix-service up /service/emmc -dev /dev/c1d0
* Programmed Input/Output
The driver does not have support for DMA.
Embedded MultiMediaCard Product Standard (MMCA, 4.41). Document number: JESD84-A441
AM335x Sitara Processors Datasheet. Literature number: SPRS717F
OMAP35x Applications Processor Technical Reference Manual. Literature number: SPRUF98X
-MINIX 3 MMC/SD source code.
\ No newline at end of file
+MINIX 3 MMC/SD source code.
/* apply the env setting passed to this driver parameters accepted
* log_level=[0-4] (NONE,WARN,INFO,DEBUG,TRACE) instance=[0-3]
* instance/bus number to use for this driver Passing these arguments
- * is done when starting the driver using the service command in the
- * following way service up /service/mmc -args "log_level=2 instance=1
- * driver=dummy" -dev /dev/c2d0 */
+ * is done when starting the driver using the minix-service command in
+ * the following way:
+ * minix-service up /service/mmc -args "log_level=2 instance=1
+ * driver=dummy" -dev /dev/c2d0 */
char driver[16];
memset(driver, '\0', 16);
(void) env_get_param("driver", driver, 16);
dir.mount:= minix/commands/mount
PROGRAMS+= procfs
dir.procfs:= minix/fs/procfs
-PROGRAMS+= service
-dir.service:= minix/commands/service
+PROGRAMS+= minix-service
+dir.minix-service:= minix/commands/minix-service
PROGRAMS+= sh
dir.sh:= bin/sh
PROGRAMS+= sysenv
umount ---755 0 0 umount
grep ---755 0 0 grep
sh ---755 0 0 sh
- service ---755 0 0 service
+ $
+ sbin d--755 0 0
+ minix-service ---755 0 0 minix-service
$
service d--755 0 0
#ifdef __i386__
exec 2>/dev/log
exec </dev/null
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+
FSCK=/bin/fsck_mfs
ACPI=/service/acpi
if [ X`/bin/sysenv arch` = Xi386 ]
then if [ -e $ACPI -a -n "`sysenv acpi`" ]
then
- /bin/service -c up $ACPI
+ minix-service -c up $ACPI
fi
- /bin/service -c up /service/pci -dev /dev/pci
+ minix-service -c up /service/pci -dev /dev/pci
- /bin/service -c up /service/input -dev /dev/kbdmux
- /bin/service -c up /service/pckbd || :
+ minix-service -c up /service/input -dev /dev/kbdmux
+ minix-service -c up /service/pckbd || :
# Start procfs so we can access /proc/pci
mount -t procfs none /proc >/dev/null
virtio_blk=yes
fi
- /bin/service -cn up /service/floppy -dev /dev/fd0
+ minix-service -cn up /service/floppy -dev /dev/fd0
if [ X`/bin/sysenv ahci` = Xyes ]
then
# this is here temporarily, for testing purposes
- /bin/service -c up /service/ahci -dev /dev/c0d0 -label ahci_0 -args instance=0
+ minix-service -c up /service/ahci -dev /dev/c0d0 -label ahci_0 -args instance=0
elif [ X"$virtio_blk" = Xyes ]
then
- /bin/service -c up /service/virtio_blk -dev /dev/c0d0 -label virtio_blk_0 -args instance=0
+ minix-service -c up /service/virtio_blk -dev /dev/c0d0 -label virtio_blk_0 -args instance=0
else
- /bin/service -c up /service/at_wini -dev /dev/c0d0 -label at_wini_0
- /bin/service -cr up /service/at_wini -dev /dev/c1d0 -label at_wini_1 -args instance=1 2>/dev/null || :
+ minix-service -c up /service/at_wini -dev /dev/c0d0 -label at_wini_0
+ minix-service -cr up /service/at_wini -dev /dev/c1d0 -label at_wini_1 -args instance=1 2>/dev/null || :
fi
/bin/umount /proc >/dev/null
fi
if [ X`/bin/sysenv arch` = Xearm ]
then echo Starting the mmc driver
- /bin/service -c up /service/mmc -dev /dev/c0d0
+ minix-service -c up /service/mmc -dev /dev/c0d0
fi
-/bin/service up /service/procfs || echo "WARNING: couldn't start procfs"
+minix-service up /service/procfs || echo "WARNING: couldn't start procfs"
if /bin/sysenv rootdevname >/dev/null
then rootdevname=/dev/`/bin/sysenv rootdevname`
Starting up an instance:
-service up /service/fb -dev /dev/fb0 -args edid.0=cat24c256.3.50
+minix-service up /service/fb -dev /dev/fb0 -args edid.0=cat24c256.3.50
The arguments take the following form:
static char edid_providers[FB_DEV_NR][RS_MAX_LABEL_LEN+1];
/*
- * Populate edid_providers from command line arguments. The service command
- * should get EDID providers like this: "-args edid.0=tda19988.1.3470" where
- * 0 is the minor number of the frame buffer, tda19988 is the device driver,
- * 1 is the i2c bus and 3470 is the slave address (the TDA19988 has 2 slave
- * addresses 0x34 and 0x70).
+ * Populate edid_providers from command line arguments. The minix-service
+ * command should get EDID providers like this: "-args edid.0=tda19988.1.3470"
+ * where 0 is the minor number of the frame buffer, tda19988 is the device
+ * driver, 1 is the i2c bus and 3470 is the slave address (the TDA19988 has 2
+ * slave addresses 0x34 and 0x70).
*/
int
fb_edid_args_parse(void)
Starting up an instance:
-/bin/service up /service/tda19988 -label tda19988.1.3470 \
+/sbin/minix-service up /service/tda19988 -label tda19988.1.3470 \
-args 'cec_bus=1 cec_address=0x34 hdmi_bus=1 hdmi_address=0x70'
Killing an instance:
-/bin/service down tda19988.1.3470
+/sbin/minix-service down tda19988.1.3470
The driver is meant to be accessed from other drivers using the block
device protocol, so it doesn't have a reserved major number and device file.
cd /dev
mknod tda19988 b 32 0
chmod 600 tda19988
-/bin/service up /service/tda19988 -label tda19988.1.3470 \
+/sbin/minix-service up /service/tda19988 -label tda19988.1.3470 \
-dev /dev/tda19988 \
-args 'cec_bus=1 cec_address=0x34 hdmi_bus=1 hdmi_address=0x70'
dd if=/dev/tda19988 of=/root/edid.dat count=1 bs=128
-/bin/service down tda19988.1.3470
+/sbin/minix-service down tda19988.1.3470
hexdump -C /root/edid.dat
rm tda19988
#ifndef _MINIX_PATHS_H_
#define _MINIX_PATHS_H_
-#define _PATH_SERVICE "/bin/service"
+#define _PATH_MINIX_SERVICE "/sbin/minix-service"
#define _PATH_PROC "/proc/"
#define _PATH_SYSTEM_CONF "/etc/system.conf"
static int rs_down(char *label)
{
char cmd[200];
- if(strlen(_PATH_SERVICE)+strlen(label)+50 >= sizeof(cmd))
+ if(strlen(_PATH_MINIX_SERVICE)+strlen(label)+50 >= sizeof(cmd))
return -1;
- sprintf(cmd, _PATH_SERVICE " down '%s'", label);
+ sprintf(cmd, _PATH_MINIX_SERVICE " down '%s'", label);
return system(cmd);
}
return(-1);
}
- if (strlen(_PATH_SERVICE) + strlen(path) + strlen(label) +
+ if (strlen(_PATH_MINIX_SERVICE) + strlen(path) + strlen(label) +
strlen(args) + 50 >= sizeof(cmd)) {
errno = E2BIG;
return -1;
}
- sprintf(cmd, _PATH_SERVICE " %sup %s -label '%s' -args '%s %s %s%s'",
+ sprintf(cmd, _PATH_MINIX_SERVICE
+ " %sup %s -label '%s' -args '%s %s %s%s'",
reuse ? "-r ": "", path, label, special, name,
args[0] ? "-o " : "", args);
if [ ! -b "$1" ]; then echo "$1 is not a block device" >&2; exit 1; fi
pair=$(devtopair $1)
if [ -z "$pair" ]; then echo "driver not found for $1" >&2; exit 1; fi
- service up `pwd`/blocktest -args "$pair,$2" -config system.conf \
+ minix-service up `pwd`/blocktest -args "$pair,$2" -config system.conf \
-script /etc/rs.single -label blocktest_$(stat -f '%r' $1)
}
# runs the ddekit driver on the given device with the given parameters
run_ddekittest () {
if [ ! -x ddekittest_driver ]; then echo "compile ddekittest first!" >&2; exit 1; fi
- service up `pwd`/ddekittest_driver -config system.conf \
+ minix-service up `pwd`/ddekittest_driver -config system.conf \
-script /etc/rs.single -label ddekittest
}
#
run_ddekittest
sleep 10
-service down ddekittest
+minix-service down ddekittest
PWD=`pwd`
-service up ${PWD}/subs -config system.conf -script /etc/rs.single
-service up ${PWD}/dstest -config system.conf -script /etc/rs.single
-service down subs
+minix-service up ${PWD}/subs -config system.conf -script /etc/rs.single
+minix-service up ${PWD}/dstest -config system.conf -script /etc/rs.single
+minix-service down subs
EXP=$2
shift 2
$RWBLOCKS $DEV $PAT
- service up /service/fbd -dev /dev/fbd -args "$PAIR" || exit 1
+ minix-service up /service/fbd -dev /dev/fbd -args "$PAIR" || exit 1
fbdctl add $@ >/dev/null
#fbdctl list
RES="`$RWBLOCKS /dev/fbd`"
- service down fbd
+ minix-service down fbd
echo -n "$RES: "
if echo "$RES" | egrep "^$EXP\$" >/dev/null 2>&1; then
if [ "$OPT" = "-last" -a "$RES" != "$LAST" ]; then
WS=$3
shift 3
$RWBLOCKS $DEV UUUUUUUUUUUUUUUU
- service up /service/fbd -dev /dev/fbd -args "$PAIR" || exit 1
+ minix-service up /service/fbd -dev /dev/fbd -args "$PAIR" || exit 1
fbdctl add $@ >/dev/null
#fbdctl list
$RWBLOCKS /dev/fbd $PAT $WS
- service down fbd
+ minix-service down fbd
RES="`$RWBLOCKS $DEV`"
echo -n "$RES: "
if echo "$RES" | egrep "^$EXP\$" >/dev/null 2>&1; then
make >/dev/null
echo -n "Kernel test (sys_padconf): "
-service up `pwd`/padconftest -config system.conf -label padconftest -script /etc/rs.single
+minix-service up `pwd`/padconftest -config system.conf -label padconftest -script /etc/rs.single
r=$?
if [ $r -ne 0 ]; then
make >/dev/null
echo -n "Kernel test (sys_vumap): "
-service up `pwd`/vumaprelay -config system.conf -label vumaprelay -script /etc/rs.single
-service up `pwd`/vumaptest -config system.conf -script /etc/rs.single 2>/dev/null
+minix-service up `pwd`/vumaprelay -config system.conf -label vumaprelay -script /etc/rs.single
+minix-service up `pwd`/vumaptest -config system.conf -script /etc/rs.single 2>/dev/null
r=$?
-service down vumaprelay
+minix-service down vumaprelay
if [ $r -ne 0 ]; then
echo "failure"
#!/bin/sh
-service down grantor
-service down requestor
+minix-service down grantor
+minix-service down requestor
PWD=`pwd`
-service up ${PWD}/grantor -config ${PWD}/system.conf -script ${PWD}/down
-service up ${PWD}/requestor -config ${PWD}/system.conf -script ${PWD}/down
+minix-service up ${PWD}/grantor -config ${PWD}/system.conf -script ${PWD}/down
+minix-service up ${PWD}/requestor -config ${PWD}/system.conf -script ${PWD}/down
/* stop residual testvm service if any */
snprintf(cmdline, sizeof(cmdline), "%s down testvm >/dev/null 2>&1",
- _PATH_SERVICE);
+ _PATH_MINIX_SERVICE);
if(system(cmdline) < 0) { e(9); exit(1); }
/* start the testvm service */
snprintf(cmdline, sizeof(cmdline),
"%s up /%s/../testvm -script /etc/rs.single "
"-args /%s/%s -config %s/../testvm.conf",
- _PATH_SERVICE, cwd, cwd, pipefn, cwd);
+ _PATH_MINIX_SERVICE, cwd, cwd, pipefn, cwd);
if(system(cmdline) < 0) { e(10); exit(1); }
/* don't hang forever if the open or read block */
echo $flags | grep -q 'r' || return 0
echo $flags | grep -q 'R' && return 0
- service clone $label
+ minix-service clone $label
return 1
}
label=$1
- service unclone $label
+ minix-service unclone $label
}
#######################################################################
restarts_pre=$(get_value restarts ${service})
endpoint_pre=$(get_value endpoint ${service})
- service fi ${label}
+ minix-service fi ${label}
if ! wait_for_service ${service} ${restarts_pre}
then
echo not ok
restarts_pre=$(get_value restarts ${service})
endpoint_pre=$(get_value endpoint ${service})
- service fi ${label}
+ minix-service fi ${label}
if ! wait_for_service ${service} ${restarts_pre}
then
echo not ok
lu_maxtime=${lu_maxtime:-3HZ}
lu_state=${lu_state:-1}
- service ${lu_opts} update ${prog} -label ${label} -maxtime ${lu_maxtime} -state ${lu_state}
+ minix-service ${lu_opts} update ${prog} -label ${label} -maxtime ${lu_maxtime} -state ${lu_state}
if [ $? -ne $result ]
then
return 1
if [ $index -eq $once_index ]
then
- service ${lu_opts_once} -q update self \
+ minix-service ${lu_opts_once} -q update self \
-label ${label} \
-maxtime ${lu_maxtime_once} \
-state ${lu_state_once} || ret=2
else
- service ${lu_opts} -q update self \
+ minix-service ${lu_opts} -q update self \
-label ${label} \
-maxtime ${lu_maxtime} \
-state ${lu_state} || ret=2
fi
done
- service sysctl upd_run
+ minix-service sysctl upd_run
result=$?
# We may experience transient failures as a result of services
bomb() {
echo $*
- service down rmibtest 2>/dev/null
+ minix-service down rmibtest 2>/dev/null
exit 1
}
old_objects=`sysctl -n minix.mib.objects 2>/dev/null` || bomb "no MIB stats?"
old_remotes=`sysctl -n minix.mib.remotes 2>/dev/null` || bomb "no MIB stats?"
-service up `pwd`/rmibtest -label rmibtest -config rmibtest.conf || \
+minix-service up `pwd`/rmibtest -label rmibtest -config rmibtest.conf || \
bomb "unable to start test service"
cd ..
# Test the minix.test shadowing subtree using a subset of the regular MIB test
./test87 19 >/dev/null || bomb "test87 reported failure"
-service down rmibtest
+minix-service down rmibtest
sleep 1
echo "ok"
exit 0
else
- service down vnd0
+ minix-service down vnd0
fi
fi
if vndconfig -l vnd1 >/dev/null 2>&1; then
echo "ok"
exit 0
else
- service down vnd1
+ minix-service down vnd1
fi
fi
snprintf(cmd, sizeof(cmd),
"%s up %s/vnd -label vnd%u -args instance=%u -dev %s",
- _PATH_SERVICE, _PATH_DRIVERS, n, n, dev);
+ _PATH_MINIX_SERVICE, _PATH_DRIVERS, n, n, dev);
status = system(cmd);
if (verbose)
printf("%s: stopping driver\n", dev);
- snprintf(cmd, sizeof(cmd), "%s down vnd%u", _PATH_SERVICE,
- vnu.vnu_unit);
+ snprintf(cmd, sizeof(cmd), "%s down vnd%u",
+ _PATH_MINIX_SERVICE, vnu.vnu_unit);
system(cmd);
}