Skip to content

Commit b53b22c

Browse files
committed
correct usage of the emmc/sd devices during install and kernel upgrade
1 parent 95f251c commit b53b22c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

kernel/resources/shared/FlashKernelPartition.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ is_device_veyron() {
4646
echo "False"
4747
}
4848

49+
# returns the full path to the emmc device, in the form /dev/mmcblk#
4950
get_emmc_devname() {
5051
local devname=$(find /dev -name "mmcblk*boot0" | sed "s/boot0//")
5152
if [ -z "$devname" ]
@@ -55,6 +56,7 @@ get_emmc_devname() {
5556
echo $devname
5657
}
5758

59+
# returns the full path to the sd card device, in the form /dev/mmcblk#
5860
get_sd_devname() {
5961
local emmc=$(get_emmc_devname)
6062
devname=$(find /dev -name "mmcblk*" ! -iwholename "*${emmc}*" ! -name "*mmcblk*p*")

scripts/InstallScripts/InstallPrawnOS.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,17 @@ is_device_veyron() {
6161
echo "false"
6262
}
6363

64+
# returns the full path to the emmc device, in the form /dev/mmcblk#
6465
get_emmc_devname() {
6566
local devname=$(find /dev -name "mmcblk*boot0" | sed "s/boot0//")
6667
if [ -z "$devname" ]
6768
then
6869
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;
6970
fi
70-
echo $(basename $devname)
71+
echo $devname
7172
}
7273

74+
# returns the full path to the sd card device, in the form /dev/mmcblk#
7375
get_sd_devname() {
7476
local emmc=$(get_emmc_devname)
7577
devname=$(find /dev -name "mmcblk*" ! -iwholename "*${emmc}*" ! -name "*mmcblk*p*")
@@ -329,7 +331,7 @@ external_partition() {
329331

330332
#simply expand to fill the current boot device
331333
expand() {
332-
if [[ $BOOT_DEVICE == "/dev/$(get_emmc_devname)" ]]
334+
if [[ $BOOT_DEVICE == "$(get_emmc_devname)" ]]
333335
then
334336
echo "Can't expand to fill internal emmc, install will have done this already"
335337
exit

0 commit comments

Comments
 (0)