filesystem: improved beaglebone bootloader upgrade.
This commit is contained in:
parent
2ab3dadef9
commit
b19eb70d84
@ -130,9 +130,11 @@ uboot_part_upgrade()
|
|||||||
echo 'done'
|
echo 'done'
|
||||||
|
|
||||||
for f in MLO u-boot.img; do
|
for f in MLO u-boot.img; do
|
||||||
|
if [ -f "/mnt/$f" ]; then
|
||||||
echo -en "* $label: Replacing $f... "
|
echo -en "* $label: Replacing $f... "
|
||||||
cp "$base/.glued-new/boot/$f" /mnt
|
cp "$base/.glued-new/boot/$f" /mnt
|
||||||
echo 'done'
|
echo 'done'
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo -en "* $label: unmounting bootloader partition... "
|
echo -en "* $label: unmounting bootloader partition... "
|
||||||
@ -152,7 +154,8 @@ uboot_part_upgrade_check()
|
|||||||
# Check if board is a BeagleBone black.
|
# Check if board is a BeagleBone black.
|
||||||
dmesg | grep -i 'machine model' | grep -i beaglebone > /dev/null 2>&1
|
dmesg | grep -i 'machine model' | grep -i beaglebone > /dev/null 2>&1
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
uboot_part_upgrade 'BeagleBone Black' '/dev/mmcblk1p1'
|
dev="$(ls /sys/class/mmc_host/mmc?/mmc?:0001/block)"
|
||||||
|
uboot_part_upgrade 'BeagleBone Black' "/dev/${dev}p1"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user