BelaPlatform/bela-image-builder

make for smooth copy of uEnv.txt from/to eMMC when trans-flashing

Closed this issue · 1 comments

If mmcid=1 is the only line that changes when in uEnv.txt, what about

grep -v "^mmcid=[0-9]$" /mnt/boot/uEnv.txt > /tmp/uEnv.txt
echo mmcid=1 >> /tmp/uEnv.txt
cp -a /tmp/uEnv.txt /mnt/emmc_boot/uEnv.txt

?

This is because people may now be editing their uEnv.txt to add /remove overlays and they wouldn't want to lose their settings?
To double check: are we about to brick anything this way?

done with

cat $MNT_THIS_BOOT/uEnv.txt | sed "s/^\(\s*mmcid=\).*/\1$MMCID/" > $MNT_BOOT/uEnv.txt

in b73f6c7