S5PV210學習筆記一:刷機

硬件圖示:

1,破壞iNand中的bootloader以從SD2啓動

如果是安卓:

busybox dd if=/dev/zero of=/dev/block/mmcblk0 bs=512 seek=1 count=1 conv=sync

sync

如果是linux:

busybox dd if=/dev/zero of=/dev/mmcblk0 bs=512 seek=1 count=1 conv=sync

sync

出現如下打印時成功:

onv=sync10v3 ~]# busybox dd if=/dev/zero of=/dev/mmcblk0 bs=512 seek=1 count=1 c 
1+0 records in
1+0 records out
[root@x210v3 ~]# sync

SD checksum Error

2,製作啓動SD卡與使用fastboot刷機:

(1)使用制卡工具燒寫uboot

注意:制卡工具要用管理員身份運行,否則燒寫uboot失敗

(2)使用fastboot刷機

注意:要使用另外一根線作爲鏈接fastboot的線,同時電腦要安裝fastboot驅動,否則無法識別開發板

驅動位置:H:\朱老師大講堂\開發版光盤資料\X210V3S_A\tools\USB驅動\x210_android_driver

然後PC端執行fastboot devices可以看見開發板的設備名

鏈接上fastboot後可以在串口終端看到開發板的分區信息:

注意:上電後3秒內在終端輸入回車,進入uboot。然後輸入fastboot命令,板卡啓動fastboot

x210 # fastboot
[Partition table on MoviNAND]
ptn 0 name='bootloader' start=0x0 len=N/A (use hard-coded info. (cmd: movi))
ptn 1 name='kernel' start=N/A len=N/A (use hard-coded info. (cmd: movi))
ptn 2 name='ramdisk' start=N/A len=0x300000(~3072KB) (use hard-coded info. (cmd: movi))
ptn 3 name='config' start=0xB11E00 len=0x1024BC00(~264495KB) 
ptn 4 name='system' start=0x10D5DA00 len=0x1024BC00(~264495KB) 
ptn 5 name='cache' start=0x20FA9600 len=0x6751800(~105798KB) 
ptn 6 name='userdata' start=0x276FAE00 len=0xC3CC2A00(~3207946KB)

在PC端FASTBOOT 文件夾下建立image文件夾,將要燒寫的鏡像文件(安卓與linux)放入此文件家中,PC端執行如下指令:

升級uboot過程:

E:\linux210_tools\fastboot>fastboot flash bootloader image\QT4.8\uboot.bin
sending 'bootloader' (384 KB)... OKAY
writing 'bootloader'... OKAY

升級linux kernel過程:
E:\linux210_tools\fastboot>fastboot flash kernel image\QT4.8\zImage-qt
sending 'kernel' (3566 KB)... OKAY
writing 'kernel'... OKAY

升級文件系統過程:
E:\linux210_tools\fastboot>fastboot flash system image\QT4.8\rootfs_qt4.ext3
sending 'system' (262144 KB)... OKAY
writing 'system'... OKAY

燒寫的過程中可以在開發板上看見進度條,同時開發板串口打印:

Received 17 bytes: download:00060000
Starting download of 393216 bytes

downloading of 393216 bytes finished
Received 16 bytes: flash:bootloader
flashing 'bootloader'
Writing BL1 to sector 1 (16 sectors).. checksum : 0xed75e
writing bootloader.. 49, 1024 
MMC write: dev # 0, block # 49, count 1024 ... 1024 blocks written: OK
completed
partition 'bootloader' flashed
Received 17 bytes: download:0037b800
Starting download of 3651584 bytes
...
downloading of 3651584 bytes finished
Received 12 bytes: flash:kernel
flashing 'kernel'
writing kernel.. 1073, 8192 
MMC write: dev # 0, block # 1073, count 8192 ... 8192 blocks written: OK
completed
partition 'kernel' flashed
Received 17 bytes: download:10000000
Starting download of 268435456 bytes
................................................................................
................................................................................
................................................................................
...............
downloading of 268435456 bytes finished
Received 12 bytes: flash:system
flashing 'system'
MMC write: dev # 0, block # 551661, count 528990 ... 528990 blocks written: OK
partition 'system' flashed

完成後,PC端執行,fastboot reboot,重啓開發板,重啓後開發板正常運行

進入系統後,用戶名:root    密碼:123456

(3)使用DNW工具刷機

    在一次fastboot刷機後,發現板子串口輸出亂碼、SD卡不啓動。以爲開發板變磚頭了。這時候的解決思路就是dnw刷機。

 

3,安裝交叉編譯器:

1.4.3.4、交叉編譯工具鏈的安裝
步驟1:打開虛擬機,在/usr/local/下創建/usr/local/arm文件夾
步驟2:先將安裝包從Windows中弄到linux中去。可以用共享文件夾,也可以用Samba,也可以cuteftp。
步驟3:解壓。tar -jxvf arm-2009q3.tar.bz2
到此相當於程序已經安裝完畢,真正的應用程序安裝在/usr/local/arm/arm-2009q3/bin目錄下

注意64微系統會出現:

 

arm-none-linux-gnueabi-gcc -v 出現: No such file or directory

此時,執行

使用 sudo apt-get install ia32-libs命令
這個庫已經失效了,此時用另外的三個庫替換,可以使用: sudo apt-get install lib32z1


 

 

 

 

 

 

 

 

 

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章