Commit graph

66 commits

Author SHA1 Message Date
Kees Jongenburger
489a81f55d arm:if present start usbd
Change-Id: Ide4079b993f9525d09a6a42dfb09b958dc546942

http://gerrit.minix3.org/#/c/2695/
2014-07-28 17:05:40 +02:00
Kees Jongenburger
3553b1a2f5 arm:also start devmand on ARM.
Change-Id: Iceffd21d23efa45110a42ce2ab471c15cd6edf66

http://gerrit.minix3.org/#/c/2688/
2014-07-28 17:05:38 +02:00
Ben Gras
a06e2ab395 big <utmp.h>-inspired netbsd switch
import/switch of:
init, getty, reboot, halt, shutdown, wall, last

changes:
	. change reboot() call to netbsd prototype and args
	. allows pristine <utmp.h>
	. use clean <sys/reboot.h> instead of <minix/reboot.h>
	. implement TIOCSCTTY for use by getty so getty can get
	  controlling terminal from init's child(ren)
	. allow NULL envp for exec

Change-Id: I5ca02cb4230857140c08794bbfeba7df982c58a3
2014-03-01 09:05:02 +01:00
Lionel Sambuc
a5f47c23d5 Remove some legacy support in rc scripts & some cleanup
* Remove support for the Poor Man fstab
 * Remove checks for the missing ARCH kernel variable
 * Remove .ashrc which is anyway only read once per login
 * Cleanup PATH variable

Change-Id: Ic32e5749fba502dfa38d4d538860e717580bad60
2014-03-01 09:05:01 +01:00
David van Moolenbroek
36ac0dbcf8 Take LOG out of the boot image
Change-Id: Id2629776b53aae46629b04a42c15cbbacac9b949
2014-03-01 09:04:55 +01:00
Thomas Cort
7f98bdf040 readclock: code clean-up, add -q, manpage updates
- Simplify the message passing between readclock and the driver.

 - Add a -q command line option to suppress warning messages. This
 cuts down on the noise when readclock is called early in the boot
 sequence and a secondary RTC driver (ex TPS95650) isn't up yet.

 - Update the man page to be less i386 centric and add details about
 the new -q option.

Change-Id: If8d7c50a217ca98c1e9fae0ca92521e2e7c893e4
2013-08-09 12:41:53 +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
Ben Gras
5acaa0814f kernel, ramdisk: some boot unification
To use the new SD building script, Linux has to be configured with
loop.max_part=15 on the command line (or set at module load time)
to make the loopback device see the partitions.

This commit removes a lot of differences between the ARM and x86
boot ramdisk and rc scripts. It changes the ARM build from running
from ramdisk to requiring a full filesystem on the SD image and
booting into it.

	. ramdisk: remove some arm-only utilities only used for running
	  from the shell
	. remove ARM-only rc.arm, proto.arm.small, ttys and mylogin.sh
	  boot-time ramdisk files
	. change kernel to add "arch" variable so userland knows what
	  we're running on from sysenv
	. make ARM use the regular ramdisk rc file, changed to distinguish
	  i386-only and ARM-only drivers; requires rootdevname to be set
	. change /etc/rc and /usr/etc/rc to start i386-only drivers only on
	  i386 systems
	. change the kernel/arm to have a special case for the memory
	  driver to load it higher so it can be bigger
	. add uEnv.txt, cmdline.txt and a for now highly linux-dependent
	  SD preparation script arm_sdimage.sh to the git repository in
	  releasetools/

Change-Id: I68910ba4e96ee80f7a12b65e48b5d39b43ca6397
2013-03-07 14:29:27 +00:00
Thomas Veerman
d9f4f71916 Implement dynamic mtab support
With this patch /etc/mtab becomes obsolete.
2012-11-26 15:20:18 +00:00
Ben Gras
ed1af3c86c VM: full munmap
complete munmap implementation; single-page references made
a general munmap() implementation possible to write cleanly.

	. memory: let the MIOCRAMSIZE ioctl set the imgrd device
	  size (but only to 0)
	. let the ramdisk command set sizes to 0
	. use this command to set /dev/imgrd to 0 after mounting /usr
	  in /etc/rc, so the boot time ramdisk is freed (about 4MB
	  currently)
2012-09-18 13:17:52 +02:00
Kees Jongenburger
c4d9681327 Add entry in fstab and let the mount system call start devman.
After this commit you will need an additional entry in fstab for
the /sys file system (see docs/UPDATING).
2012-07-05 14:52:16 +02:00
Kees Jongenburger
c9b3bd9d45 Add a /sys entry to minix.mtree 2012-07-05 11:09:40 +02:00
Thomas Veerman
6759b24c57 /etc/rc: use mount -a instead of manual parsing
The rc script manually parses /etc/fstab to mount all file systems.
To do that it needs /bin/sed which does not exist anymore. mount(8)
now supports the -a flag which causes it to mount all file systems
listed in /etc/fstab except for '/'. File systems marked with 'noauto'
are skipped.
2012-06-20 10:48:38 +00:00
Kees Jongenburger
7750657783 Add hot plugging infrastructure in rc file.
Adding hot plugging infrastructure in rc file. This includes
starting the devman service, mounting it's file system and
starting the corresponding devmand daemon.

This patch also provide error free shutdown of the USB sub-system.

The USB sub system needs to be shutdown in a certain order but also
consists of components living in /usr/pkg/. By checking the
existence of usbd we can stop it in the correct order.
2012-06-18 09:31:14 +02:00
Thomas Veerman
6659ae1fc3 Fix booting into single user mode
Due to a shift, mountfstab was unable to locate the fstab file and
mount other file systems causing a number of errors to be generated.
2012-04-13 13:52:48 +00:00
David van Moolenbroek
11c15db517 rc: transitional fix for old fstab 2012-01-10 15:05:50 +01:00
Ben Gras
4d4057d8a2 netbsd fsck driver import
. fsck driver parses /etc/fstab and invokes sub-fscks
	. further simplifies fs handling in rc
2011-12-22 23:07:15 +01:00
Ben Gras
cedeabb357 mainstream-format fstab format
. detect both formats in /etc/rc
	. generate new format in setup
	. obsoletes /etc/fstab.local: everything can go in /etc/fstab
	. put shutdown/reboot/halt and a copy of /usr/adm/wtmp
	  (/etc/wtmp) on root FS so that we can do shutdown checks before
	  mounting /usr
	. new fstab format makes getfsent() and friends work
2011-11-14 14:47:28 +00:00
Arun Thomas
bac0222eec ramdisk: Add procfs to ramdisk
-Prevents kernel/procfs mismatches
-Also, strip ELF binaries in ramdisk
2011-02-23 13:05:28 +00:00
David van Moolenbroek
d269f5fb90 ProcFS integration 2010-09-14 21:27:31 +00:00
Arun Thomas
7c3cfbde1a Update PATHs for llvm and X11 2010-09-12 17:56:53 +00:00
Ben Gras
3e7c270f6c rc: add /sbin to $PATH for fsck.mfs 2010-08-18 16:07:54 +00:00
Thomas Veerman
5bf3967f26 Rename mkfs to mkfs.mfs and fsck to fsck.mfs. Add /sbin to root's PATH. 2010-08-05 12:35:00 +00:00
Ben Gras
6955228f39 rc - also add /usr/pkg/sbin to $PATH 2010-07-16 00:44:57 +00:00
Ben Gras
84e730cbd8 new dirs for pkgsrc; new $PATH for pkg root and llvm 2010-07-16 00:13:27 +00:00
Cristiano Giuffrida
f8a8ea0a79 Dynamic configuration in system.conf for boot system services. 2010-07-13 21:11:44 +00:00
Cristiano Giuffrida
3de6a807ce Configure settings for system services dynamically with the new service edit command. 2010-07-05 19:37:08 +00:00
Cristiano Giuffrida
65ef539739 Driver mapping refactory.
VFS CHANGES:
- dmap table no longer statically initialized in VFS
- Dropped FSSIGNON svrctl call no longer used by INET

INET CHANGES:
- INET announces its presence to VFS just like any other driver

RS CHANGES:
- The boot image dev table contains all the data to initialize VFS' dmap table
- RS interface supports asynchronous up and update operations now
- RS interface extended to support driver style and flags
2010-04-09 21:56:44 +00:00
Ben Gras
9fd4c2a20d introduce the fsckopts sysenv, options passed to fsck by /etc/rc.
setting 'fsckopts=-a' makes it much easier to work on a minix machine
remotely and reboot after a crash.
2010-03-31 15:06:53 +00:00
Thomas Veerman
fadbbf7b2e Unmount defunct boot ramdisk at bootup 2010-01-21 09:58:07 +00:00
David van Moolenbroek
ac9ab099c8 General cleanup:
- clean up kernel section of minix/com.h somewhat
- remove ALLOCMEM and VM_ALLOCMEM calls
- remove non-safecopy and minix-vmd support from Inet
- remove SYS_VIRVCOPY and SYS_PHYSVCOPY calls
- remove obsolete segment encoding in SYS_SAFECOPY*
- remove DEVCTL call, svrctl(FSDEVUNMAP), map_driverX
- remove declarations of unimplemented svrctl requests
- remove everything related to swapping to disk
- remove floppysetup.sh
- remove traces of rescue device
- update DESCRIBE.sh with new devices
- some other small changes
2010-01-05 19:39:27 +00:00
David van Moolenbroek
123683d4a5 Console function keys and color support:
- if "debug_fkeys" boot monitor variable is set to 0:
  - pass Fn, Shift+Fn, Ctrl+Fn, Shift+Ctrl+Fn to applications
  - don't start IS
- update termcap files with function key, color, end key support
2009-12-22 23:30:50 +00:00
Thomas Veerman
b47483433c Added a hack to start binaries from the boot image only. In particular, setting
bin_img=1 in the boot monitor will make sure that during the boot procedure the
mfs binary that is part of the boot image is the only binary that is used to
mount partitions. This is useful when for some reason the mfs binary on disk 
malfunctions, rendering Minix unable to boot. By setting bin_img=1, the binary
on disk is ignored and the binary in the boot image is used instead.

- 'service' now accepts an additional flag -r. -r implies -c. -r instructs RS
  to first look in memory if the binary has already been copied to memory and
  execute that version, instead of loading the binary from disk. For example,
  the first time a MFS is being started it is copied (-c) to memory and
  executed from there. The second time MFS is being started this way, RS will
  look in memory for a previously copied MFS binary and reuse it if it exists.
- The mount and newroot commands now accept an additional flag -i, which
  instructs them to set the MS_REUSE flag in the mount flags.
- The mount system call now supports the MS_REUSE flag and invokes 'service'
  with the -r flag when MS_REUSE is set.
- /etc/rc and the rc script that's included in the boot image check for the
  existence of the bin_img flag in the boot monitor, and invoke mount and 
  newroot with the -i flag accordingly.
2009-08-18 11:36:01 +00:00
Ben Gras
b6b361a474 rc script needs to open its own stdin, stdout and stderr 2008-12-11 14:50:56 +00:00
Ben Gras
c078ec0331 Basic VM and other minor improvements.
Not complete, probably not fully debugged or optimized.
2008-11-19 12:26:10 +00:00
Ben Gras
ef8ec86b78 Don't always update CMOS on shutdown. 2007-04-10 13:40:09 +00:00
Ben Gras
0d5c50f3fc Update CMOS time at shutdown time. 2007-02-16 15:52:39 +00:00
Ben Gras
f47aa04a30 . removed readclock command and cmos driver.
. replaced by a readclock 'driver' that runs once, a re-imported version
  of the minix 2.0.4 readclock command.
. this has also restored cmos writing.
. readclock wrapper script calls service command to run /bin/readclock.drv
  once.
2007-01-12 16:35:04 +00:00
Philip Homburg
c39a693274 Disabled /etc/rc.rescue 2006-09-08 13:20:57 +00:00
Ben Gras
4d115fcd91 rc: don't start floppy or at driver
passwd: add games for nethack
2006-03-08 12:21:40 +00:00
Philip Homburg
c3a88d15d8 Initial root filesystem is now on a ramdisk that is part of the image. 2006-02-15 11:18:21 +00:00
Ben Gras
093cfe1143 . less verbose cd /usr debugging
. save random data only if /usr is mounted rw, don't display error otherwise
2006-01-18 09:33:09 +00:00
Jorrit Herder
2aac756e76 New up() functions in rc scripts. 2005-11-28 15:39:01 +00:00
Jorrit Herder
7a7e680da7 Added periodic checks from RS to drivers. 2005-10-21 14:34:13 +00:00
Ben Gras
ca5b81bf6f /etc/rc.rescue initializes driver rescue environment 2005-10-21 10:47:13 +00:00
Jorrit Herder
3e78f1aaa6 Tell RS server about upcoming shutdown. 2005-10-20 20:38:58 +00:00
Ben Gras
5fd54a0d53 Print fsck messages to explain delays 2005-10-04 14:35:36 +00:00
Ben Gras
5c15fed299 oops 2005-09-01 16:58:19 +00:00
Ben Gras
e6ca4ed1bf oops 2005-09-01 16:27:49 +00:00
Ben Gras
946603a68c /home fixes 2005-09-01 16:26:22 +00:00