--- elwix/config/etc/rootfs/rc 2017/10/08 00:05:37 1.7.2.4 +++ elwix/config/etc/rootfs/rc 2020/06/11 00:56:32 1.7.2.8 @@ -2,7 +2,7 @@ # # Boot startup script for ELWIX RootFS ... # -# $Id: rc,v 1.7.2.4 2017/10/08 00:05:37 misho Exp $ +# $Id: rc,v 1.7.2.8 2020/06/11 00:56:32 misho Exp $ stty status '^T' @@ -21,15 +21,19 @@ export HOME PATH TERM BLOCKSIZE EDITOR PAGER ETCDEV="md1" ETCSIZE="8m" +VARDEV="md2" +VARSIZE="16m" + FRMDEV="md3" -FRMSIZE="42m" +FRMSIZE="96m" FRMFILE="elwix-firmware.sys" FRMDEV2="md4" -FRMSIZE2="21m" +FRMSIZE2="32m" FRMFILE2="elwix-firmware2.sys" FRMPATH="/elwix" +FRM2PATH="/elwix/pkg" FIT2CF="/dev/ufs/fit2cf" CFDIR="/elwix/cf" @@ -66,17 +70,17 @@ boot_elwix2() { echo " RootFS: Loading ELWIX secondary firmware" - mdmfs -s $FRMSIZE2 -S -n -m0 -oasync $FRMDEV2 /elwix/pkg + mdmfs -s $FRMSIZE2 -S -n -m0 -oasync $FRMDEV2 $FRM2PATH if [ "$?" != "0" ]; then failed_sysvol "to mount firmware image " $FRMFILE2 fi - cd /elwix/pkg + cd $FRM2PATH pax -r -z -pe -f $FRMPATH/$FRMFILE2 if [ "$?" != "0" ]; then failed_sysvol "to load firmware image " $FRMFILE2 fi cd - - mount -ur /elwix/pkg + mount -ur $FRM2PATH } mount_usr() @@ -95,6 +99,9 @@ mount_usr() echo "ELWIX>>> Firmware RootFS boot stage ..." +mount -ttmpfs tmpfs /tmp +mdmfs -s $VARSIZE -S -n $VARDEV /var + if test -c $ELWIX2; then BOOTSLICE=`kenv currdev` if test "${BOOTSLICE#disk0}" != "a:"; then @@ -102,26 +109,14 @@ if test -c $ELWIX2; then fi fi -if ! mount -o ro $ELWIX $FRMPATH; then - umount $FRMPATH +if ! mount -o ro $ELWIX $FRMPATH 1>/dev/null 2>&1; then + umount $FRMPATH 1>/dev/null 2>&1 fsck -y $ELWIX 1>/dev/null 2>&1 - if ! mount -o ro $ELWIX $FRMPATH; then - umount -f $FRMPATH + if ! mount -o ro $ELWIX $FRMPATH 1>/dev/null 2>&1; then + umount -f $FRMPATH 1>/dev/null 2>&1 fsck -f -y $ELWIX 1>/dev/null 2>&1 if ! mount -o ro $ELWIX $FRMPATH; then - failed_sysvol mount "system volume" - fi - fi -fi - -if ! mount -a; then - umount -A - fsck -y 1>/dev/null 2>&1 - if ! mount -a; then - umount -A -f - fsck -f -y 1>/dev/null 2>&1 - if ! mount -a; then - failed_sysvol mount "system volume" + failed_sysvol mount "storage volume" fi fi fi