BelaPlatform / bela-image-builder

Scripts to build a Bela image from scratch
MIT License
35 stars 16 forks source link

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

Closed giuliomoro closed 4 years ago

giuliomoro commented 6 years ago

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?

giuliomoro commented 4 years ago

done with

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

in b73f6c7ef3a018e79d4f4095a0e0ea994fc1791f