oe-alliance/oe-alliance-core

SD card mount all partitions to mmc

ArnoldSchiller opened this issue · 5 comments

I was annoyed as soon as mdev mmc detects that all partitions are mounted on top of each other to /media/mmc. So partition 1 to /media/mmc and then partition 2 to /media/mmc. So only the last partition in /media/mmc is visible. With the change mount-helper.sh should continue to mount to mmc without partition, but if partitions exist the first partition /media/mmcblk and the second partition /media/mmcblk1p2 and so on.

`

--- mount-helper.sh
+++ /etc/udev/mount-helper.sh
@@ -190,9 +190,9 @@
 				elif [ "$MODEL1" == "SD	            " ]; then
 					DEVICETYPE="mmc"
 				elif [ "$MODEL1" == "SD              " ]; then
-					DEVICETYPE="mmc"
+					DEVICETYPE="mmcblk"
 				elif [ "$MODEL1" == "SD" ]; then
-					DEVICETYPE="mmc"
+					DEVICETYPE="mmcblk"
 				else
 					#echo "[mdev-mount.sh] USB device found" >> $LOG
 					if [ $PARTNUM -eq "1" -o $PARTNUM -eq "5" ] ; then
`
Huevos commented

What image are you using?

openatv 7.2

Which box and how does it show as an issue on the receiver

Now I highly doubt this is a receiver story - the kernel is Linux maxytecmultise 4.4.35 #1 SMP Tue Feb 18 23:44:49 UTC 2020 armv7l GNU/Linux - but then again the script doesn't do a label and hardcode hdd and usb. Instead of sda1 or hdd1 or media/$LABEL

WIth my change:
/dev/mmcblk1p1 on /media/mmcblk type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/mmcblk1p2 on /media/mmcblk1p2 type ext4 (rw,relatime,data=ordered)

without

/dev/mmcblk1p1 on /media/mmc type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/mmcblk1p2 on /media/mmc type ext4 (rw,relatime,data=ordered)

Well rightly or wrongly, images have this path hard coded (media/mmc), so this change would impact current code in most OE-A images. So unless you are going to go around and change them all, don,t see this code change happening