DM355 DVEVM軟體安裝

來源:互聯網
上載者:User
安裝會有以下三種提示符:
1.host $ 主機命令SHELL視窗提示符
2.EVM # 輸入命令到 U-Boot shell視窗,通過串口與目標板通訊
3.target $輸入命令到 Linux shell視窗,通過串口與目標板通訊
一.
COPY以下檔案到電腦上一個tmp臨時目錄下,需1.2G空間以上
❏ mvl_4_0_1_demo_sys_setuplinux.bin
❏ mvl_4_0_1_demo_target_setuplinux.bin
❏ lsp_DM355_setuplinux_#_##_##_##.bin
❏ dvsdk_DM355_setuplinux_#_##_##_##.bin
❏ xdc_setuplinux_#_##_##_##.bin
確保有一個X graphical display,可通過DISPLAY環境變數來設定
csh:
host $ setenv DISPLAY cnabc0314159d1:0
ksh or bash:
host $ export DISPLAY=cnabc0314159d1:0
二.
正式安裝
1.以ROOT身份登入LINUX主機,這樣可運行X graphical installer還安裝MontaVista
Linux.
進入以上的tmp下執行以下命令:
host $ ./mvl_4_0_1_demo_sys_setuplinux.bin
host $ ./mvl_4_0_1_demo_target_setuplinux.bin
host $ ./lsp_DM355_setuplinux_#_##_##_##.bin
以上可能需花幾分鐘
(註:若不能執行可運行chmod +x *.bin,變更檔屬性為可執行檔)
建議不要安裝在預設目錄,如可選/opt/mv_pro_4.0.1
執行以上命令後在/opt/_4.mv_pro0.1下出現以下三個檔案
■ mvltools4.0.1-no-target.tar.gz
■ mvl4.0.1-target_path.tar.gz
■ DaVinciLSP-#_#_#_#.tar.gz
三.
進入/opt/_4.mv_pro0.1執行:
host $ cd /opt/mv_pro_4.0.1
而後用以下命令解壓縮
host $ tar zxf mvltools4.0.1-no-target.tar.gz
host $ tar zxf mvl4.0.1-target_path.tar.gz
host $ tar zxf DaVinciLSP-#_#_#_#.tar.gz
以上會建立以下目錄
/opt/mv_pro_4.0.1/montavista/ directory
四.安裝DVSDK software
DVSDK software包括 Codec Engine components, sample data files, xDAIS
and xDM header files, and a contiguous memory allocator for Linux (CMEM).
以USER帳號登入,以下參考使用者家(HOME)目錄"~"
host $ cd /tmp(進入最開始臨時目錄)
host $ ./dvsdk_DM355_setuplinux_#_##_##_##.bin
不要安裝在預設目錄下,安裝在USER家目錄下,如/home/<useracct>
host $ cd /tmp
host $ ./xdc_setuplinux_#_##_##_##.bin
到此為止,可以刪除COPY到TMP下的檔案了.
注:可用rm -rf來移除以上所安裝元件.
五.安裝AV 資料光碟片
host $ cd ~/dvsdk_1_xx
host $ cp /mnt/cdrom/data.tar.gz . (注: 點.表示目前的目錄)
host $ tar xfz data.tar.gz
六.按NFS (NETWORK FILE SYYSTEM)
1.以USER 進入
host $ cd ~
host $ mkdir -p workdir/filesys
host $ cd workdir/filesys
2.切換到root
host $ su root
3.進入之前安裝目錄 (useracct: user account,使用者帳號名稱)
host $ cp -a
/opt/mv_pro_4.U0.1/montavista/pro/devkit/arm/v5t_le/target/* .
host $ chown -R <useracct> opt (改變屬性)
4.編輯/etc/exports輸出檔案,在檔案系統地區加入以下行:(不要用~,用全路徑)
/home/<useracct>/workdir/filesys *(rw,no_root_squash,no_all_squash,sync)
5.仍然是ROOT ,用下命令讓NFS SERVER知道配置的改變及啟動一NFS restart.
host $ /usr/sbin/exportfs -a
host $ /sbin/service nfs restart
註:可以用-ra 重新輸出所有目錄。
七.測試NFS SETUP
1.取得主機IP地址
host $ /sbin/ifconfig
2.開啟一個RS232終端視窗(WINDOW 下用HyperTerminal,LINUX下用Minicom)
3.開啟EVM電源,不要自動引導,設定以下變數:
EVM # setenv nfshost <ip address of nfs host>
EVM # setenv rootpath <directory to mount>
EVM # setenv bootargs console=ttyS0,115200n8 \
noinitrd rw ip=dhcp root=/dev/nfs \
nfsroot=$(nfshost):$(rootpath),nolock mem=116M
此directory to
mount必須是以上步驟六.4中的目錄,如/home/<useracct>/workdir/filesys
4.儲存變數,就不用每次EVM上電時重新設定
EVM # saveenv
5.用NFS 來BOOT EVM
EVM # boot
6.設定BOOT時的視頻制式PAL/NTSC
設定J1跳線,即設定U-BOOT下的Videostd 環境變數
八.設定bootargs,bootcmd給核心,以及VPBE用
bootargs=`console=ttyS0,115200n8 ip=dhcp \
root=/dev/mtdblock3 rw rootfstype=yaffs2 mem=116M`
bootcmd=`setenv setboot setenv bootargs \$(bootargs) \
video=dm64xxfb:output=\$(videostd);run setboot;bootm \
0x80700000`
以上為NTSC,PAL需修改
九.安裝DM355
DVSDK時會有以下附件,但只是DEMO版,若要正式產品可到http://www.ti.com/dvevmupdates
下式帶正版授權的版本
❏ Sequential JPEG Decoder
❏ JPEG Sequential Encoder
❏ MPEG4 Restricted Simple Profile Decoder
❏ MPEG4 Simple Profile Encoder
十.設定BUILD及開發環境
以USER帳號進入NFS 檔案系統,設定PATH變數,以便MontaVista tool chain host
tools and cross
compiler (arm_v5t_le-gcc)可以找到,比如對於MontaVista
LSP,如是安裝在上面的/opt/mv_pro_4.0.1下(預設)則需在SHELL RESOURCE
FILE下(如~/.bashrc)增加一定義就可,如不在預設目錄,則~/.bashrc中修改:
PATH="/opt/mv_pro_4.0.1/montavista/pro/devkit/arm/v5t_le/bin:
/opt/mv_pro_4.0.1/montavista/pro/bin:
/opt/mv_pro_4.0.1/montavista/common/bin:$PATH"
修改後用以下命令使其在當前環境下即時起作用
host $ source .bashrc
十一.當有輸出NFS檔案系統及建立以下環境後,就可以實現一簡單例子了
以USER進入NFS主機系統,執行以下
1) host $ mkdir ~/workdir/filesys/opt/hello
2) host $ cd ~/workdir/filesys/opt/hello
3)建立hello.c檔案
#include <stdio.h>
int main() {
printf("Buongiorno DaVinci!\n");
return 0;
}
4)host $ arm_v5t_le-gcc hello.c -o hello
進入目標板系統(如上面建立的串口通訊),執行以下
1) target $ cd /opt/hello
2) Run ./hello. The output should be:
Buongiorno DaVinci!
十二. BUILD構建一新的LINUX核心
如果有修改LINUX核心源碼,則需重新BUILD核心,而後再啟動,可以直接覆蓋原來NAND
FLASH中的,或以U-BOOT方式,用TFTP串連到網路來啟動.
需確保在你的路徑中有以下工具
PATH="/opt/mv_pro_4.0.1/montavista/pro/devkit/arm/v5t_le/bin:
/opt/mv_pro_4.0.1/montavista/pro/bin:$PATH"
REBUILD LINUX核心
1.user進入
2.在家目錄下建一MontaVista Linux Support Package (LSP)工作目錄,COPY
embedded Linux 2.6.10 kernel及DaVinci drivers到此目錄
host $ cd ~
host $ mkdir -p workdir/lsp
host $ cd workdir/lsp
host $ cp -R /opt/mv_pro_4.0.1/montavista/pro/devkit/lsp/ti-davinci .
3.配置核心
host $ cd ti-davinci
host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le-
davinci_dm355_evm_defconfig
變數CROSS_COMPLIE用來定義一可執行檔首碼(在編譯期間)
修改核心時,可能要用到make menuconfig'命令,可參考MontaVista文檔。
4.能動核心預設選項:
host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- checksetconfig
5.編繹核心:
host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- uImage
6。COPY UIMAGE-DM355到一目錄,此目錄可以U-Boot can use TFTP to download
it to the EVM.
host $ cp ~/workdir/lsp/ti_davinci/arch/arm/boot/uImage
/tftpboot/uImage-dm355
host $ chmod a+r /tftpboot/uImage-dm355
十三。重建DVEVM軟體。
1.CD ~/dvsdk_#_##.
2.EDIT ~/dvsdk_#_##/Rules.make file
DVSDK_INSTALL_DIR=/home/<useracct>/dvsdk_#_##
EXEC_DIR=/home/<useracct>/workdir/filesys/opt/dvsdk
LINUXKERNEL_INSTALL_DIR=/home/<useracct>/workdir/lsp/ti-davinci
3.host $ make
host $ make install
十四。啟動新的核心
1.開啟EVM電源,不要自動BOOT
EVM # setenv bootcmd 'dhcp;bootm'
EVM # setenv serverip <tftp server ip address>
EVM # setenv bootfile uImage-dm355
EVM # setenv bootargs 'mem=116M console=ttyS0,115200n8
root=/dev/mtdblock3 rw rootfstype=yaffs2 ip=dhcp'
測試TFTP server有否安裝
host $ rpm -q tftp-server
如沒有,則安裝TFTP
host $ rpm -ivh /db/ztree/useracct/tftp-server-#.##-#.rpm
測試TFTP安裝否,用以下命令
host $ /sbin/chkconfig --list | grep tftp
開啟TFTP
/sbin/chkconfig tftp on
註:The default root location for servicing TFTP files is /tftpboot
載入CMEM and accelerator kernel modules.
Target $ ./loadmodules.sh
運行:
Target $ ./encodedecode [options]
Options:
❏ -r | --resolution
Resolution of demo. Specify width x height. For example: -r 720x480
❏ -t | --time
Number of seconds to run the demo. By default, there is no time limit.
❏ -i | --interface
If used, causes the main demo interface to launch when this demo
exits. By default, this is off.
❏ -b | --bitrate
Specify the bit rate at which video should be encoded.
❏ -x
Select S-Video input format.
❏ -h | --help
Print this help message.
附錄 A
**啟動方式:
❏ TFTP boot with NAND flash file system (Section A.3.2)
❏ Flash boot with NFS file system (Section A.3.3)
❏ TFTP boot with NFS file system (Section A.3.4)
1.不以自動BOOT方式進入
2.按下列方式設定以下變數
3.儲存 EVM # saveenv
4.啟動 EVM # boot
* Booting from Flash Using Board's NAND Flash File System
EVM # setenv bootcmd 'nboot 0x80700000 0 0x400000;bootm'
EVM # setenv bootargs 'console=ttyS0,115200n8 ip=dhcp
root=/dev/mtdblock3 rw rootfstype=yaffs2 mem=116M'
* Booting via TFTP Using Board's NAND Flash File System
EVM # setenv bootcmd 'dhcp;bootm'
EVM # setenv bootargs 'mem=116M console=ttyS0,115200n8
root=/dev/mtdblock3 rw rootfstype=yaffs2 ip=dhcp'
EVM # setenv serverip <tftp server ip address>
EVM # setenv bootfile uImage-dm355
* Booting from Flash Using NFS File System
EVM # setenv bootcmd 'nboot 0x80700000 0 0x400000;bootm'
EVM # setenv nfshost <ip addr of nfs host>
EVM # setenv rootpath <directory to mount>
EVM # setenv bootargs 'console=ttyS0,115200n8 noinitrd rw
ip=dhcp root=/dev/nfs
nfsroot=$(nfshost):$(rootpath),nolock mem=116M'
* Booting via TFTP Using NFS File System
EVM # setenv bootcmd 'dhcp;bootm'
EVM # setenv serverip <ip addr of tftp server>
EVM # setenv bootfile <name of kernel image>
EVM # setenv rootpath <root directory to mount>
EVM # setenv nfshost <ip addr of nfs host>
EVM # setenv bootargs 'console=ttyS0,115200n8 noinitrd rw
ip=dhcp root=/dev/nfs nfsroot=$(nfshost):$(rootpath),nolock
mem=116M'
**Updating/Restoring the Bootloaders
BOOT過程
EVM board RESET後 ROM bootloader (RBL)運行,初始化板及從NAND flash
memory載入UBL (User Bootloader)到記憶體,接著UBL從NAND flash
memory載入U-Boot bootloader,U-Boot bootloader負責載入及啟動LINUX 核心。
因此有兩個IMGAE(映像)儲存在NAND FLASH:UBL and U-Boot
如果U-BOOT在FLASH中未動過,可用它自已更新,如工作的U-Boot (or UBL)
images不在FLASH,可用CCSUDIO及emulator.恢複。
在DVSDK的安裝目錄下有UBL, U-Boot, and the NAND
programmer,典型位置是/home/<useracct>/dvsdk_#_##/PSP_#_#_#_#/board_utilities.
升級Updating U-Boot Using U-Boot
1.分配靜態IP 給EVM BOARD :EVM # setenv ipaddr <static IP address>
分配動態IP :EVM # dhcp
EVM # setenv ipaddr <IP address returned by
dhcp>
2.TFTP SERVER IP :EVM # setenv serverip <TFTP server IP address>
3.儲存EVM # saveenv
4.Load
U-Boot。需指定核心檔案名稱(通常在/TFTP下)及目的地址(DDR),可任意選擇
EVM # tftp 80800000 <u-boot file name>
如操作成功,有以下資訊
EVM # tftp 80800000 u-boot-1.2.0-dm355_evm.bin
TFTP from server <IP addr>; our IP address is <IP addr>
Filename 'u-boot-1.2.0-dm355_evm.bin'.
Load address: 0x80800000
Loading: #########################
done
Bytes transferred = 127340 (1f16c hex)
5.攛除以前的U-BOOT(位於0x00200000)
EVM # nand erase 180000 20000
6.寫新U-BOOT
EVM # nand write 80800000 180000 20000
7.EVM RESET後,可以通過串口終端顯示U-BOOT是否成功工作。
** Updating UBL and U-Boot Bootloaders Using an Emulator and CCStudio
如UBL and U-Boot 不在FLASH中,則需用CCSUDIO及模擬器載入
1.提取NAND programmer
utilities,在DVSDK安裝目錄下,一般為/home/<useracct>/dvsdk_#_##/PSP_#_#_#_#/board_utilities.放到PC上,此PC要裝有CCSUDIO3.3以上及
XDS560 or XDS510 emulator.
2.設定 CCStudio以串連到板上,用CCStudio Setup and the DM355 GEL files設定
3.串連emulator到板上,開EVM電源
4.開啟CCStudio and connect to the device (Alt+C).
5.program NAND_programmer.out and run it (F5).
6. Enter the UBL path name and file name (ublDM355-nand.bin) in the
dialog box.
7.Enter the U-Boot path name and file name (uboot-1.2.0-dm355.bin)
in the dialog box.
8.Cycle power on the EVM board and press any key on the EVM's
monitor window to get the U-Boot prompt
**Restoring the NAND Flash Using NFS
恢複DVSDK NAND flash memory內容,包括核心及檔案系統各demo application
software.
DVSDK NAND image檔案在DVSDK CD中有,為"dm355_flash_image_#_##_##_##.tar"
Linux kernel (uImage-dm355)通常在/tftp下,通過TFTP載入
1.分配靜態IP 給EVM BOARD :EVM # setenv ipaddr <static IP address>
分配動態IP :EVM # dhcp
EVM # setenv ipaddr <IP address returned by
dhcp>
2.載入核心IMAGE
EVM # tftp 80700000 uImage-dm355
EVM # nand erase 400000 200000
EVM # nand write 0x80700000 0x400000 0x200000
3.用NFS移值YAFFS2 image(dm355_flash_image_#_##_##_##.tar), YAFFS2
image在NFS Server root directory旁邊
1)COPY dm355_flash_image_#_##_##_##.tar到NFS mounted root
directory(通常為/home/<useracct>/workdir/filesys)
2)EVM # setenv bootcmd 'nboot 0x80700000 0 0x400000; bootm'
EVM # setenv bootargs 'console=ttyS0,115200n8 noinitrd
ip=dhcp root=/dev/nfs rw nfsroot=<nfs_host_ip>:<nfs_root_path> mem=116M'
注:以上變數不需儲存,因為NFS只是一個臨時檔案系統
3)用BOOT啟動核心
4)EVM # mkdir /mnt/nand
EVM # flash_eraseall /dev/mtd3
EVM # mount -t yaffs2 /dev/mtdblock3 /mnt/nand/
EVM # cd /mnt/nand
EVM # tar xf /dm355_flash_image_#_##_##_##.tar
EVM # cd
EVM # umount /mnt/nand
EVM # reboot

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.