MarS Board 是基于飛思卡爾(Freescale Semiconductor)i.MX 6Dual 處理器的評估板。i.MX 6Dual 處理器集成了高達 1GHz 的 ARM Cortex™-A9 內核、2D和3D 圖形處理器和 3D 1080p 視頻處理器。MarS Board評 估板具有豐富的接口,包括HDMI接口、 LVDS 接口、 Mini USB OTG接口、 Mini USB Debug 接口、RJ45 接口、USB Host 接口、TF 卡接口和 LCD 顯示接口,能夠幫助開發者針對上 網本、桌面一體機、高端移動互聯網設備、高端掌上電腦、高端便攜式媒體播放器、游戲 機和便攜式導航設備等各種不同領域進行開發。
這個板子是國內的英蓓特設計的,網上能直接找的資料很少,官方給的燒寫工具是Mfgtools-Rel-12.04.01_ER_MX6Q_UPDATER,但是存在兼容性問題,不支持XP以上系統以及USB3.0
我使用的系統是win 8.1PRo,所以只能另外找工具,最終我使用的是Mfgtools-Rel-4.1.0_130816_MX6Q_UPDATER,可以兼容win 8.1,但是還是需要一個USB HUB將USB3.0轉換到2.0
使用Mfgtools-Rel-4.1.0_130816_MX6Q_UPDATER要注意在Profiles/MX6Q linux Update/OS Firmware目錄下要有鏡像文件,否則燒錄工具不能打開
這個燒錄工具與官方提供的使用方法大致相同,在cfg.ini中要燒錄的預配置,配置文件內容如下
1 [profiles]2 chip = MX6Q Linux Update3 4 [platform]5 board = MarS Board6 7 [LIST]8 name = Ubuntu-Marsboard-eMMC
我選擇的燒寫配置為Ubuntu-Marsboard-eMMC,如果要修改,在Profiles/MX6Q Linux Update/OS Firmware目錄下ucl2.xml中記錄了Ubuntu-Marsboard-eMMC的配置
1 <LIST name="ubuntu-Marsboard-eMMC" desc="Choose eMMC as media"> 2 <CMD state="BootStrap" type="boot" body="BootStrap" file ="u-boot.bin" >Loading U-boot</CMD> 3 <CMD state="BootStrap" type="load" file="uImage" address="0x10800000" 4 loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Loading Kernel.</CMD> 5 <CMD state="BootStrap" type="load" file="initramfs.cpio.gz.uboot" address="0x10C00000" 6 loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Loading Initramfs.</CMD> 7 <CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD> 8 9 <CMD state="Updater" type="push" body="$ flash_eraseall /dev/mtd0">Erasing Boot partition</CMD>10 <CMD state="Updater" type="push" body="send" file="files/u-boot.bin">Sending U-Boot</CMD>11 <CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mtd0 bs=512">write U-Boot to SPI-NOR</CMD>12 <CMD state="Updater" type="push" body="$ flash_eraseall /dev/mtd1">Clear Params</CMD>13 14 <CMD state="Updater" type="push" body="send" file="files/uImage">Sending kernel uImage</CMD>15 <CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk0 bs=1M seek=1 conv=fsync">write kernel image to sd card</CMD>16 17 <CMD state="Updater" type="push" body="send" file="mksdcard.sh.tar">Sending partition shell</CMD>18 <CMD state="Updater" type="push" body="$ tar xf $FILE "> Partitioning...</CMD>19 <CMD state="Updater" type="push" body="$ sh mksdcard.sh /dev/mmcblk0"> Partitioning...</CMD>20 21 <CMD state="Updater" type="push" body="$ mkfs.ext3 -j /dev/mmcblk0p1">Formatting rootfs partition</CMD>22 <CMD state="Updater" type="push" body="$ mkdir -p /mnt/mmcblk0p1"/> 23 <CMD state="Updater" type="push" body="$ mount -t ext3 /dev/mmcblk0p1 /mnt/mmcblk0p1"/>24 <CMD state="Updater" type="push" body="pipe tar --numeric-owner -zxv -C /mnt/mmcblk0p1" file="files/oneiric.tgz">Sending and writting rootfs</CMD>25 <CMD state="Updater" type="push" body="frf">Finishing rootfs write</CMD>26 <CMD state="Updater" type="push" body="$ umount /mnt/mmcblk0p1">Unmounting rootfs partition</CMD>27 <CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>28 </LIST>
在上面配置的24行
<CMD state="Updater" type="push" body="pipe tar --numeric-owner -zxv -C /mnt/mmcblk0p1" file="files/oneiric.tgz">Sending and writting rootfs</CMD>
這里設置了燒寫用的系統文件鏡像為files/oneiric.tgz,也就是用/Profiles/MX6Q Linux Update/OS Firmware/files/oneiric.tgz文件
要注意的是,這個燒錄方式與樹莓派的燒錄方式有明顯不同,樹莓派的鏡像文件只有一個img文件,但是這里分為了三個,分別是u-boot.bin、uImage和oneiric.tgz
u-boot.bin是記錄引導區的鏡像,uImage是Linux內核鏡像,oneiric.tgz是文件系統鏡像。
官方提供了交叉編譯工具和源代碼,也可使用Freescale提供的BSP,可以自己精簡編譯內核,生成u-boot.bin和uImage文件
oneiric.tgz文件則決定了系統的版本號,MarSBoard使用的是Ubuntu的衍生版本Linaro,官方自帶的oneiric.tgz中是11.10的版本,可以去Linaro的官方網站下載最新版本的鏡像,通過替換這個鏡像使用更高版本的系統。
如果要使用14.04以上版本的系統,u-boot.bin文件需要下載最新的源碼編譯生成,否則無法正常引導。
要注意的是由于內核與內核動態模塊不是一起編譯的(內核在uImage中,內核動態模塊在oneiric.tgz中),所以有些功能無法使用(如iptables)
準備好u-boot.bin、uImage和oneiric.tgz這三個文件就可以開始燒錄了,燒錄工具會先載入內核文件和引導文件,然后設備自動重啟(中途USB會斷開一小會兒,又會自動連上)開始燒錄
新聞熱點
疑難解答