DEFAULT_SDCARD_PARTUUID=e91c4e10-16e6-4c0e-bd0e-77becf4a3582
sudo partx -d ${DEVSDCARD}
sudo sgdisk -o ${DEVSDCARD}
sudo sgdisk --resize-table=128 -a 1 \
-n 1:34:545 -c 1:fsbl1 \
-n 2:546:1057 -c 2:fsbl2 \
-n 3:1058:5153 -c 3:fip \
-n 4:5154:136225 -c 4:bootfs -A 4:set:2 \
-n 5:136226:2233377 -c 5:rootfs -u 5:${DEFAULT_SDCARD_PARTUUID} \
-n 6:2233378:4330529 -c 6:userfs \
-n 7:4330530:8524833 -c 7:raw \
-p ${DEVSDCARD}
sudo dd if=arm-trusted-firmware/tf-a-stm32mp153d-ssonic-sdcard.stm32 of=${DEVSDCARD}1 conv=fdatasync bs=8M
sudo dd if=arm-trusted-firmware/tf-a-stm32mp153d-ssonic-sdcard.stm32 of=${DEVSDCARD}2 conv=fdatasync bs=8M
sudo dd if=fip/fip-stm32mp153d-ssonic-trusted.bin of=${DEVSDCARD}3 conv=fdatasync bs=8M
sudo dd if=st-image-bootfs-openstlinux-weston-stm32mp153d-ssonic.ext4 of=${DEVSDCARD}4 conv=fdatasync bs=8M
sudo dd if=st-image-core-openstlinux-weston-stm32mp153d-ssonic.ext4 of=${DEVSDCARD}5 conv=fdatasync bs=8M
sudo dd if=st-image-userfs-openstlinux-weston-stm32mp153d-ssonic.ext4 of=${DEVSDCARD}6 conv=fdatasync bs=8M
sudo dd if=/dev/null of=${DEVSDCARD}7 conv=fdatasync bs=8M count=4