virtio_blk: always start if found
Change-Id: Iec70c67e1b675297b5ffb800a9fb263feffa9271
This commit is contained in:
parent
7a0497feae
commit
a476662532
3 changed files with 20 additions and 4 deletions
|
@ -29,7 +29,7 @@ ETC= system.conf master.passwd
|
||||||
EXTRA= rc
|
EXTRA= rc
|
||||||
PROTO_FILES= proto.common.etc proto.common.dynamic proto.dev
|
PROTO_FILES= proto.common.etc proto.common.dynamic proto.dev
|
||||||
PROG_DRIVERS=
|
PROG_DRIVERS=
|
||||||
PROG_COMMANDS= mount fsck.mfs sh service loadramdisk sysenv
|
PROG_COMMANDS= mount umount grep fsck.mfs sh service loadramdisk sysenv
|
||||||
PROG_SERVERS= mfs procfs
|
PROG_SERVERS= mfs procfs
|
||||||
PROG_BIN=
|
PROG_BIN=
|
||||||
PROG_SBIN=
|
PROG_SBIN=
|
||||||
|
|
|
@ -10,6 +10,8 @@ d--755 0 0
|
||||||
fsck.mfs ---755 0 0 fsck.mfs
|
fsck.mfs ---755 0 0 fsck.mfs
|
||||||
#endif
|
#endif
|
||||||
mount ---755 0 0 mount
|
mount ---755 0 0 mount
|
||||||
|
umount ---755 0 0 umount
|
||||||
|
grep ---755 0 0 grep
|
||||||
sh ---755 0 0 sh
|
sh ---755 0 0 sh
|
||||||
service ---755 0 0 service
|
service ---755 0 0 service
|
||||||
$
|
$
|
||||||
|
@ -42,6 +44,8 @@ d--755 0 0
|
||||||
#endif
|
#endif
|
||||||
$
|
$
|
||||||
$
|
$
|
||||||
|
proc d--755 0 0
|
||||||
|
$
|
||||||
dev d--755 0 0
|
dev d--755 0 0
|
||||||
#include "proto.dev"
|
#include "proto.dev"
|
||||||
$
|
$
|
||||||
|
|
|
@ -9,23 +9,35 @@ FSCK=/bin/fsck.mfs
|
||||||
ACPI=/usr/sbin/acpi
|
ACPI=/usr/sbin/acpi
|
||||||
|
|
||||||
if [ X`/bin/sysenv arch` = Xi386 ]
|
if [ X`/bin/sysenv arch` = Xi386 ]
|
||||||
then if [ -e $ACPI -a -n "`sysenv acpi`" ]
|
then
|
||||||
|
/bin/service -c up /usr/sbin/pci
|
||||||
|
/bin/service up /sbin/procfs || echo "WARNING: couldn't start procfs"
|
||||||
|
/bin/mount -e -n -t procfs none /proc || echo "WARNING: couldn't mount procfs"
|
||||||
|
|
||||||
|
# Do we want to use the virtio block device?
|
||||||
|
if grep '^[^ ]* [^ ]* 1AF4:1001 ' /proc/pci >/dev/null
|
||||||
|
then virtio_blk=yes
|
||||||
|
else virtio_blk="`/bin/sysenv virtio_blk`"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -e $ACPI -a -n "`sysenv acpi`" ]
|
||||||
then
|
then
|
||||||
/bin/service -c up $ACPI
|
/bin/service -c up $ACPI
|
||||||
fi
|
fi
|
||||||
/bin/service -c up /usr/sbin/pci
|
|
||||||
/bin/service -cn up /sbin/floppy -dev /dev/fd0
|
/bin/service -cn up /sbin/floppy -dev /dev/fd0
|
||||||
if [ X`/bin/sysenv ahci` = Xyes ]
|
if [ X`/bin/sysenv ahci` = Xyes ]
|
||||||
then
|
then
|
||||||
# this is here temporarily, for testing purposes
|
# this is here temporarily, for testing purposes
|
||||||
/bin/service -c up /sbin/ahci -dev /dev/c0d0 -label ahci_0 -args instance=0
|
/bin/service -c up /sbin/ahci -dev /dev/c0d0 -label ahci_0 -args instance=0
|
||||||
elif [ X`/bin/sysenv virtio_blk` = Xyes ]
|
elif [ X"$virtio_blk" = Xyes ]
|
||||||
then
|
then
|
||||||
/bin/service -c up /sbin/virtio_blk -dev /dev/c0d0 -label virtio_blk_0 -args instance=0
|
/bin/service -c up /sbin/virtio_blk -dev /dev/c0d0 -label virtio_blk_0 -args instance=0
|
||||||
else
|
else
|
||||||
/bin/service -c up /sbin/at_wini -dev /dev/c0d0 -label at_wini_0
|
/bin/service -c up /sbin/at_wini -dev /dev/c0d0 -label at_wini_0
|
||||||
/bin/service -cr up /sbin/at_wini -dev /dev/c1d0 -label at_wini_1 -args instance=1
|
/bin/service -cr up /sbin/at_wini -dev /dev/c1d0 -label at_wini_1 -args instance=1
|
||||||
fi
|
fi
|
||||||
|
/bin/umount /proc
|
||||||
|
/bin/service down procfs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ X`/bin/sysenv arch` = Xearm ]
|
if [ X`/bin/sysenv arch` = Xearm ]
|
||||||
|
|
Loading…
Reference in a new issue