2006-02-15 12:18:21 +01:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
2008-12-11 15:42:23 +01:00
|
|
|
|
|
|
|
exec >/dev/log
|
|
|
|
exec 2>/dev/log
|
|
|
|
exec </dev/null
|
|
|
|
|
2013-12-06 12:04:52 +01:00
|
|
|
FSCK=/bin/fsck_mfs
|
2012-05-07 13:38:39 +02:00
|
|
|
ACPI=/usr/sbin/acpi
|
2013-03-06 19:27:47 +01:00
|
|
|
|
|
|
|
if [ X`/bin/sysenv arch` = Xi386 ]
|
2013-05-16 15:34:17 +02:00
|
|
|
then if [ -e $ACPI -a -n "`sysenv acpi`" ]
|
2013-03-06 19:27:47 +01:00
|
|
|
then
|
|
|
|
/bin/service -c up $ACPI
|
|
|
|
fi
|
2013-05-16 15:34:17 +02:00
|
|
|
/bin/service -c up /usr/sbin/pci
|
2013-05-15 17:45:33 +02:00
|
|
|
|
Input infrastructure, INPUT server, PCKBD driver
This commit separates the low-level keyboard driver from TTY, putting
it in a separate driver (PCKBD). The commit also separates management
of raw input devices from TTY, and puts it in a separate server
(INPUT). All keyboard and mouse input from hardware is sent by drivers
to the INPUT server, which either sends it to a process that has
opened a raw input device, or otherwise forwards it to TTY for
standard processing.
Design by Dirk Vogt. Prototype by Uli Kastlunger.
Additional changes made to the prototype:
- the event communication is now based on USB HID codes; all input
drivers have to use USB codes to describe events;
- all TTY keymaps have been converted to USB format, with the effect
that a single keymap covers all keys; there is no (static) escaped
keymap anymore;
- further keymap tweaks now allow remapping of literally all keys;
- input device renumbering and protocol rewrite;
- INPUT server rewrite, with added support for cancel and select;
- PCKBD reimplementation, including PC/AT-to-USB translation;
- support for manipulating keyboard LEDs has been added;
- keyboard and mouse multiplexer devices have been added to INPUT,
primarily so that an X server need only open two devices;
- a new "libinputdriver" library abstracts away protocol details from
input drivers, and should be used by all future input drivers;
- both INPUT and PCKBD can be restarted;
- TTY is now scheduled by KERNEL, so that it won't be punished for
running a lot; without this, simply running "yes" on the console
kills the system;
- the KIOCBELL IOCTL has been moved to /dev/console;
- support for the SCANCODES termios setting has been removed;
- obsolete keymap compression has been removed;
- the obsolete Olivetti M24 keymap has been removed.
Change-Id: I3a672fb8c4fd566734e4b46d3994b4b7fc96d578
2013-09-28 14:46:21 +02:00
|
|
|
/bin/service -c up /sbin/input -dev /dev/kbdmux
|
|
|
|
/bin/service -c up /sbin/pckbd
|
|
|
|
|
2013-05-15 17:45:33 +02:00
|
|
|
# Start procfs so we can access /proc/pci
|
|
|
|
mount -t procfs none /proc >/dev/null
|
|
|
|
|
|
|
|
# Do we want to use the virtio block device?
|
|
|
|
# If not specified, default to yes if the device is found.
|
|
|
|
if /bin/sysenv virtio_blk >/dev/null
|
|
|
|
then virtio_blk="`/bin/sysenv virtio_blk`"
|
|
|
|
elif grep '^[^ ]* [^ ]* 1AF4:1001 ' /proc/pci >/dev/null
|
|
|
|
then echo "virtio_blk not set, defaulting to using found virtio device."
|
|
|
|
virtio_blk=yes
|
|
|
|
fi
|
|
|
|
|
2013-03-06 19:27:47 +01:00
|
|
|
/bin/service -cn up /sbin/floppy -dev /dev/fd0
|
|
|
|
if [ X`/bin/sysenv ahci` = Xyes ]
|
|
|
|
then
|
|
|
|
# this is here temporarily, for testing purposes
|
|
|
|
/bin/service -c up /sbin/ahci -dev /dev/c0d0 -label ahci_0 -args instance=0
|
2013-05-15 17:45:33 +02:00
|
|
|
elif [ X"$virtio_blk" = Xyes ]
|
2013-03-06 19:27:47 +01:00
|
|
|
then
|
|
|
|
/bin/service -c up /sbin/virtio_blk -dev /dev/c0d0 -label virtio_blk_0 -args instance=0
|
|
|
|
else
|
|
|
|
/bin/service -c up /sbin/at_wini -dev /dev/c0d0 -label at_wini_0
|
2013-10-02 19:37:00 +02:00
|
|
|
/bin/service -cr up /sbin/at_wini -dev /dev/c1d0 -label at_wini_1 -args instance=1 2>/dev/null || :
|
2013-03-06 19:27:47 +01:00
|
|
|
fi
|
2013-05-15 17:45:33 +02:00
|
|
|
/bin/umount /proc >/dev/null
|
2010-09-02 17:44:36 +02:00
|
|
|
fi
|
2013-03-06 19:27:47 +01:00
|
|
|
|
|
|
|
if [ X`/bin/sysenv arch` = Xearm ]
|
2013-04-08 15:08:15 +02:00
|
|
|
then echo Starting the mmc driver
|
2013-03-06 19:27:47 +01:00
|
|
|
/bin/service -c up /sbin/mmc -dev /dev/c0d0
|
2006-02-15 12:18:21 +01:00
|
|
|
fi
|
2013-03-06 19:27:47 +01:00
|
|
|
|
2011-02-23 14:05:28 +01:00
|
|
|
/bin/service up /sbin/procfs || echo "WARNING: couldn't start procfs"
|
2006-02-15 12:18:21 +01:00
|
|
|
|
2012-01-31 12:48:14 +01:00
|
|
|
if /bin/sysenv rootdevname >/dev/null
|
2012-11-01 19:40:56 +01:00
|
|
|
then rootdevname=/dev/`/bin/sysenv rootdevname`
|
|
|
|
else echo "rootdevname not set"
|
|
|
|
exit 1
|
2012-01-31 12:48:14 +01:00
|
|
|
fi
|
2006-02-15 12:18:21 +01:00
|
|
|
|
2009-08-18 13:36:01 +02:00
|
|
|
if [ "`sysenv bin_img`" = 1 ]
|
|
|
|
then
|
|
|
|
bin_img="-i "
|
|
|
|
fi
|
|
|
|
|
2006-02-15 12:18:21 +01:00
|
|
|
if sysenv cdproberoot >/dev/null
|
|
|
|
then
|
|
|
|
echo
|
|
|
|
echo 'Looking for boot CD. This may take a minute.'
|
|
|
|
echo 'Please ignore any error messages.'
|
|
|
|
echo
|
|
|
|
cddev=`cdprobe` || { echo 'No CD found'; exit 1; }
|
|
|
|
export cddev
|
|
|
|
echo "Loading ramdisk from ${cddev}p1"
|
|
|
|
loadramdisk "$cddev"p1
|
|
|
|
elif [ "$rootdevname" = "/dev/ram" ]
|
|
|
|
then
|
2012-11-01 19:40:56 +01:00
|
|
|
ramimagename=/dev/`/bin/sysenv ramimagename`
|
2006-02-15 12:18:21 +01:00
|
|
|
echo "Loading ramdisk from $ramimagename"
|
2012-01-31 12:48:14 +01:00
|
|
|
loadramdisk "$ramimagename" || echo "WARNING: loadramdisk failed"
|
2006-02-15 12:18:21 +01:00
|
|
|
fi
|
2012-11-01 19:40:56 +01:00
|
|
|
|
2006-02-15 12:18:21 +01:00
|
|
|
echo "Root device name is $rootdevname"
|
2011-12-22 01:29:27 +01:00
|
|
|
if [ -e $FSCK ]
|
|
|
|
then $FSCK -p $rootdevname
|
|
|
|
fi
|
2012-04-10 04:07:51 +02:00
|
|
|
|
|
|
|
# Change root from temporary boot ramdisk to the configure
|
|
|
|
# root device
|
|
|
|
/bin/mount -n $bin_img"$rootdevname" /
|
|
|
|
|
2012-02-14 16:44:21 +01:00
|
|
|
/bin/mount -e -n -t procfs none /proc || echo "WARNING: couldn't mount procfs"
|
2011-12-22 01:29:27 +01:00
|
|
|
|
2006-03-07 15:58:18 +01:00
|
|
|
exec /bin/sh /etc/rc "$@"
|