From 57c044a32248ade1ac90a1081dd1002ab3e66b3b Mon Sep 17 00:00:00 2001 From: vanhofen Date: Wed, 2 Oct 2019 22:29:06 +0200 Subject: [PATCH] - vu+: fix mounting of mmcblk partitions --- skel-root/vuplus/etc/mdev.conf | 2 +- skel-root/vuplus/lib/mdev/fs/mdev-mmcblk | 32 ++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/skel-root/vuplus/etc/mdev.conf b/skel-root/vuplus/etc/mdev.conf index 44c65d29..86d95623 100644 --- a/skel-root/vuplus/etc/mdev.conf +++ b/skel-root/vuplus/etc/mdev.conf @@ -77,7 +77,7 @@ fp0 root:root 0660 =dbox/fp0 sr[0-9] root:root 0664 */lib/mdev/fs/mdev-mount # Memory cards / eMMC-Partitions mmcblk0p%(BOOT_PARTITION) root:root 0664 @mount -t vfat /dev/$MDEV /boot 2>&1 >/dev/null -mmcblk[0-9]p[0-9] root:root 0664 */lib/mdev/fs/mdev-mmcblk +mmcblk[0-9]p[0-9][0-9] root:root 0664 */lib/mdev/fs/mdev-mmcblk # WLAN devices ra[0-9]* root:root 0644 */lib/mdev/net/mdev-wlan diff --git a/skel-root/vuplus/lib/mdev/fs/mdev-mmcblk b/skel-root/vuplus/lib/mdev/fs/mdev-mmcblk index bd3cabe6..08d2d7e5 100755 --- a/skel-root/vuplus/lib/mdev/fs/mdev-mmcblk +++ b/skel-root/vuplus/lib/mdev/fs/mdev-mmcblk @@ -45,6 +45,38 @@ for i in $BLOCKS; do fi done +# vuplus mess +if [ -e /proc/stb/info/vumodel ]; then + vumodel=$(cat /proc/stb/info/vumodel) + + case $vumodel in + solo4k|ultimo4k) + KERNELDEVS="4 6 8 10" + ROOTFSDEVS="5 7 9 11" + ;; + duo4k) + KERNELDEVS="9 11 13 15" + ROOTFSDEVS="10 12 14 16" + ;; + zero4k) + KERNELDEVS="7 9 11 13" + ROOTFSDEVS="8 10 12 14" + ;; + esac + + for k in $KERNELDEVS; do + if [ "$MDEV" == "mmcblk0p$k" ]; then + KERNELDEV=$MDEV + fi + done + + for r in $ROOTFSDEVS; do + if [ "$MDEV" == "mmcblk0p$r" ]; then + ROOTFSDEV=$MDEV + fi + done +fi + if [ "$SUBDIRBOOT" == "1" -o "$USE_PARTNAMES" == "1" ]; then MOUNTPOINT="$MOUNTBASE/$R_PARTNAME" elif [ "$PARTNAME" == "storage" ]; then