You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
local device=$(tr -d '\0'< /sys/firmware/devicetree/base/model)
32
33
echo$device
33
34
}
34
35
36
+
37
+
is_device_veyron() {
38
+
local device=$(get_device)
39
+
list = "${device_veyron_speedy}${device_veyron_minnie}${device_veyron_mickey}"
40
+
fordevin$list
41
+
do
42
+
if [ "$device"=="$dev" ]
43
+
echo"True"
44
+
fi
45
+
done
46
+
echo"False"
47
+
}
48
+
35
49
get_emmc_devname() {
36
-
local devname=$(ls /dev/mmcblk*| grep -F boot0 | sed "s/boot0//")
50
+
local devname=$(find /dev -name "mmcblk*boot0"| sed "s/boot0//")
37
51
if [ -z"$devname" ]
38
52
then
39
-
echo"Unknown device! can't determine emmc devname. Please file an issue with the output of fdisk -l if you get this on a supported device";exit 1;;
53
+
echo"Unknown device! can't determine emmc devname. Please file an issue with the output of fdisk -l if you get this on a supported device";exit 1;
40
54
fi
41
55
echo$devname
42
56
}
43
57
44
58
get_sd_devname() {
45
-
local device=$(get_device)
46
-
case"$device"in
47
-
$device_veyron_speedy) local devname=mmcblk0;;
48
-
$device_veyron_minnie) local devname=mmcblk0;;
49
-
$device_veyron_mickey) local devname="";;
50
-
$device_gru_kevin) local devname=mmcblk0;;
51
-
$device_gru_bob) local devname=mmcblk0;;
52
-
* ) echo"Unknown device! can't determine sd card devname. Please file an issue with the output of fdisk -l if you get this on a supported device";exit 1;;
local device=$(tr -d '\0'< /sys/firmware/devicetree/base/model)
36
43
echo$device
37
44
}
38
45
46
+
47
+
is_device_veyron() {
48
+
local device=$(get_device)
49
+
list=("${device_veyron_speedy}"
50
+
"${device_veyron_minnie}"
51
+
"${device_veyron_mickey}"
52
+
)
53
+
local IFS=""
54
+
fordevin${list[*]}
55
+
do
56
+
if [[ "$device"=="$dev" ]];then
57
+
echo"true"
58
+
exit 0
59
+
fi
60
+
done
61
+
echo"false"
62
+
}
63
+
39
64
get_emmc_devname() {
40
-
local devname=$(ls /dev/mmcblk*| grep -F boot0 | sed "s/boot0//")
65
+
local devname=$(find /dev -name "mmcblk*boot0"| sed "s/boot0//")
41
66
if [ -z"$devname" ]
42
67
then
43
68
echo"Unknown device! can't determine emmc devname. Please file an issue with the output of fdisk -l if you get this on a supported device";exit 1;
44
69
fi
45
70
echo$devname
46
71
}
47
72
48
-
49
73
get_sd_devname() {
50
-
local device=$(get_device)
51
-
case"$device"in
52
-
$device_veyron_speedy) local devname=mmcblk0;;
53
-
$device_veyron_minnie) local devname=mmcblk0;;
54
-
$device_veyron_mickey) local devname="";;
55
-
$device_gru_kevin) local devname=mmcblk0;;
56
-
$device_gru_bob) local devname=mmcblk0;;
57
-
* ) echo"Unknown device! can't determine sd card devname. Please file an issue with the output of fdisk -l if you get this on a supported device";exit 1;;
0 commit comments