2022-10-14

[개발노트] sd카드 만들기.

#!/bin/sh
DEVSDCARD=/dev/sdb
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

댓글 없음:

댓글 쓰기

암호화 + base64 하고 쉘스크립트.

 #!/bin/bash # IV와 UserKey를 설정합니다 (아스키 문자열을 그대로 사용). IV="0123456789abcdef"  UserKey="0123456789abcdef" # IV와 UserKey를 16...