amx-mst701/scripts/flash_sd.sh
2024-12-18 13:57:56 +01:00

20 lines
442 B
Bash
Executable File

#!/bin/bash
patch=uImage-with-dtb
rdpatch=initramfs.uImage
device=$1
echo "Patch $patch/$rdpatch to $device. Sure?"
read
echo "Flashing kernel..."
sudo dd if=$patch of=$device bs=512 seek=2048 conv=notrunc
#echo "Flashing backup kernel..."
#sudo dd if=$patch of=$device bs=512 seek=40960 conv=notrunc
echo "Flashing initrd..."
#sudo dd if=$rdpatch of=$device bs=512 seek=34816 conv=notrunc # 2048 + 16*1024*1024/512
echo "skipped."
sync