m2dock在windows下的燒錄
阿新 • • 發佈:2021-08-03
PhoenixCard燒錄映象
PhoenixSuit和PhoenixCard是全志晶片常用的兩種燒錄工具,一個是USB燒錄,另一個是sd卡燒錄。對於需要燒錄到flash中的,常用PhoenixSuit,而使用sd卡的在用PhoenixSuit需要安裝USB驅動等一系列的麻煩操作,就可以使用PhoenixCard進行燒錄。
獲取資源
PhoenixCard下載站連線:下載站 - Sipeed
系統映象下載站連線:下載站 - Sipeed
SD Card Formatter下載連線:SD Card Formatter
系統燒錄
插入sd卡,開啟SD Card Formatter
Refresh後點擊Format後格式化,注意選中對應的sd卡;
開啟PhoenixSuit,韌體處選擇對應映象包(下載映象後需要先解壓),然後重新整理碟符,如果未找到可以嘗試重新插拔下SD卡,勾選啟動卡,點選燒卡。
大概30s後,燒錄完成。
Windows使用dd燒錄
下載dd映象帶有xx-dd檔案即可
下載Etcher
首先使用SD Card Formatter格式化sd卡,然後開啟軟體,點選Flash from file
,選中dd映象包,然後點選Select target選中sd卡,最後點選Flash燒錄。
燒錄完畢後,即可放入M2 dock中執行。
分割槽擴容(dd)
使用dd映象後,會有部分儲存空間未被使用,這時候需要擴容分割槽進行使用。
linux下可以用fdisk或者GParted擴容,windows下可以嘗試使用Diskgenus擴容(不推薦使用windows,可能會造成一些問題)
這裡以fdisk示例,其他方法請自行摸索。
將sd卡插入電腦,執行sudo fdisk -l
,檢視sd卡分割槽位置,如下即為/dev/sdb;
/dev/sdb1 49152 49663 512 256K Microsoft basic data /dev/sdb2 49664 61951 12288 6M Microsoft basic data /dev/sdb3 61952 324095 262144 128M Microsoft basic data /dev/sdb4 324096 487935 163840 80M Microsoft basic data
然後執行以下命令:
##使用fdisk更改/dev/sdb分割槽;
sudo fdisk /dev/sdb
Welcome to fdisk (util-linux 2.36.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
##d刪除分割槽,,一路回車即可;
Command (m for help): d
Partition number (1-5, default 5):
Partition 5 has been deleted.
##建立分割槽,一路回車即可;
Command (m for help): n
Selected partition 5
First sector (487936-7744508, default 489472):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (489472-7744508, default 7744508):
Created a new partition 5 of type 'Linux filesystem' and of size 3.5 GiB.
##專家模式
Command (m for help): x
##建立分割槽名稱
Expert command (m for help): n
Partition number (1-5, default 5):
New name: UDISK
Partition name changed from '' to 'UDISK'.
##儲存分割槽;
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
插入M2dock,驗證:
root@sipeed:/# fdisk -l
Found valid GPT with protective MBR; using GPT
Disk /dev/mmcblk0: 7626752 sectors, 3724M
Logical sector size: 512
Disk identifier (GUID): ab6f3888-569a-4926-9668-80941dcb40bc
Partition table holds up to 8 entries
First usable sector is 49152, last usable sector is 7626748
Number Start (sector) End (sector) Size Name
1 49152 49663 256K env
2 49664 61951 6144K boot
3 61952 717311 320M rootfs
4 717312 881151 80.0M swap
5 882688 7626748 3292M UDISK