rv1106在linux下製作sd卡啟動映象步驟(luckfox_sololinker)

linuxcult發表於2024-05-31
  • 第一步參考luckfox的文件,下載download.bin,以及全部擦除
  • 對於sololinker參考luckfox 的./build.sh,主要是參考luckfox的build.sh中的mmcblk0為mmcblk1, 1為sd卡,0為emmc,以及對應指令碼複製,找到對應行1321行進行復制
	done
	case $RK_BOOT_MEDIUM in
		emmc)
			cat >> $RK_PROJECT_FILE_ROOTFS_SCRIPT <<EOF
for i in \$(seq 5 8); do
	det_partition="/dev/mmcblk1p\$i"
	mount_point=\$(mount | grep "\$det_partition" | awk '{print \$3}')
	if [ -n "\$mount_point" ]; then
	echo "Unmounting : \$det_partition (\$mount_point)"
	umount "\$det_partition"
	else
	echo "Partition is not mounted: \$det_partition"
	fi
done
EOF
	;;
	*)
	;;
	esac
	IFS=
	echo "fi }" >> $RK_PROJECT_FILE_ROOTFS_SCRIPT

	if [ "$RK_ENABLE_RECOVERY" = "y" ];then
		mkdir -p $(dirname $RK_PROJECT_FILE_RECOVERY_SCRIPT)
		cp -fa $RK_PROJECT_FILE_ROOTFS_SCRIPT $RK_PROJECT_FILE_RECOVERY_SCRIPT
		chmod a+x $RK_PROJECT_FILE_RECOVERY_SCRIPT
	fi

	cat >> $RK_PROJECT_FILE_ROOTFS_SCRIPT <<EOF
  • 更改sololinker的mk-update_pack.sh
    mk-update_pack.sh 中blkdevparts=mmcblk0 改為blkdevparts=mmcblk1
  • 將update.img轉化成bin檔案,/dev/sda為自己sd卡的目錄

programmer_image_tool 在/tools/linux/SocToolKit/bin/linux目錄

./programmer_image_tool -i output/image/update.img -t emmc

  • 寫入sd卡,也可以使用balenaEtcher同樣方便

sudo dd if=out_image.bin of=/dev/sda bs=4M status=progress oflag=sync

相關文章