DM365IPNC开发环境搭建

DM36xIPNC  ubuntu12.04环境搭建整理(rev.B)(原创,转载请注明作者) 

环境:ubuntu12.04LTS

目标板卡:TMS320DM36x IPNC 或者DVR

  • tftp服务器

1. 安装相关的软件包:

sudo apt-get install tftpd-hpa tftp-hpa 

2. 修改配置

配置文件在 /etc/default/tftpd-hpa,内容如下:

    # /etc/default/tftpd-hpa

    TFTP_USERNAME=”tftp”
    TFTP_DIRECTORY=”/tftpboot
    TFTP_ADDRESS=”0.0.0.0:69″
    TFTP_OPTIONS=”-l -c -s”

    /tftpboottftp服务的目录,如果事先不存在的话我们需要创建它

    sudo mkdir /tftpboot

    chown user /tftpboot

    这里的user需换成你开发时所用的用户

    3. 重新启动TFTP服务:

    sudo service tftpd-hpa restart

    4. 测试

    $ cd /tftpboot

    $ echo “hello tftp service”>>a.txt

    tftp localhost

    tftp> get a.txt

    如果这一步执行成功的话说明从tftp服务器下载东西已经成功!

    • nfs服务器 1、安装Ubuntu nfs

    Ubuntu上默认是没有安装Ubuntu nfs服务器的,因此我们首先安装Ubuntu nfs服务器端:

    $sudo apt-get install nfs-kernel-server

    2。配置/etc/exports

    Ubuntu nfs允许挂载的目录及权限在文件/etc/exports中进行了定义例如,我们要将根目录下的rootfs目录共享出来,那么我们需要在/etc /exports文件末尾添加如下一行:/rootfs *(rw,sync,no_root_squash)

    其中:/rootfs是要共享的目录,*代表允许所有的网络段访问,rw是可读写权 限,sync是资料同步写入内存和硬盘,no_root_squashUbuntu nfs客户端分享目录使用者的权限,如果客户端使用的是root用户,那么对于该共享目录而言,该客户端就具有root权限

    本人的配置如下:

    /rootfs *(rw,sync,no_subtree_check)

    注意:在使用之前请将挂载的目录权限全部设置成777即执行sudo chmod 777 /rootfs。另外请把/rootfs替换成你希望挂载的目录

    注意:rw sync等之间是不能有空格的,否则报exportfs: /etc/exports:1: syntax error: bad option list

    3Ubuntu nfs重启服务

    $sudo service portmap restart

    $sudo service nfs-kernel-server restart

    如果出现如下错误:

    mount: wrong fs type, bad option, bad superblock on xxxxxx,

    missing codepage or helper program, or other error

    (for several filesystems (e.g. nfs, cifs) you might

    need a /sbin/mount. helper program)

    In some cases useful info is found in syslog – try

    dmesg | tail or so

    解决方法:sudo apt-get install nfs-common

    4、测试Ubuntu nfs

    此时可以运行以下命令来显示一下共享出来的目录:
    $showmount -e
    或者可以使用以下命令把它挂载在本地磁盘上,例如将/rootfs挂载到/mnt下:
    $ sudo mount -t nfs localhost:/rootfs /mnt
    可以运行df命令查看是否挂载成功。查看后可以使用以下命令卸载:
    $ sudo umount /mnt

    • 下面是开发软件建立

    5,板子烧写测试(请参照官方说明文档)

    我的总结见txt

    6.编译环境搭建(原版见User_guide_IPNC_dm36x.pdf

    0).首先安装交叉编译链:(1.1G)解压后,接着解压缩到/opt/mv_pro_5.0

    添加环境变量(三种方法,这里只说修改全部用户的方法)

    export PATH=/opt/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le/bin:/opt/mv_pro_5.0/montavista/common:$PATH

    然后重启,或者source /etc/profile

    成功后可以使用arm_v5t_le_*命令

    1) Copy the file “dvsdk_2_10_01_18_ipnc_dm36x_xxx.tar.gz” from

    <install dir>/Application/src/ to <installDir>/ directory in your Linux

    desktop.

    2) Extract DVSDK using following command.

    tar -zxvf dvsdk_2_10_01_18_ipnc_dm36x_xxx.tar.gz

    This will install the standard DVSDK package needed for IPNC

    application under directory dvsdk_2_10_01_18

    3) Make an IPNC code application folder for convenience of code

    arrangement

    mkdir ipnc

    cd ipnc

    4) Copy following files from <install dir>/Application/src/ to

    <installDir>/ipnc directory in your Linux desktop.

    This should copy following files to your Linux Directory:

    ipnc_app_dm36x_priv_xxx.tgz

    ipnc_app_dm36x_open_xxx.tgz

    ipnc_app_dm36x_appro_xxx.tgz

    lsp_ipnc_dm36x_xxx.tgz

    5) Extract linux kernel tar file using the following command.

    tar -zxvf lsp_ipnc_dm36x_xxx.tgz

    This will install the standard Linux package needed for IPNC

    application under directory ti-davinci

    6) Extract the ipnc application using the following command:

    tar -zxvf ipnc_app_dm36x_priv_xxx.tgz

    This will install ipnc_app, av_server directory, Makefile and

    Rules.make file.

    7) Extract all the open source components file using the following

    command:

    tar -zxvf ipnc_app_dm36x_open_xxx.tgz

    This will install all the open source components to ipnc_app folder.

    8) Extract the 2A component file using the following command:

    tar -zxvf ipnc_app_dm36x_appro_xxx.tgz

    This will install all 2A related files to av_server directory.

    9) Create a TFTP directory for generating file system and linux kernel.

    mkdir tftp

    mkdir ./target

    10)安装cramfs工具:

    http://sourceforge.net/projects/cramfs/下载cramfs-1.1.tar.gz。然后执行

    tar zxvf cramfs-1.1.tar.gz

    进入解包之后生成cramfs-1.1目录,执行编译命令:

    make

    编译完成之后,会生成mkcramfscramfsck两个可执行文件,其中mkcramfs工具是用来创建cramfs文件系统的,而cramfsck工具则用来进行cramfs文件系统的释放以及检查。将这两个文件拷贝到/usr/local/bin目录下,方便使用.

    11sudo cramfsck -x /home/guo/dm365ipnc/ipnc/target/filesys cramfsImage_ipnc_dm365_2.6.0

    这条指令将官方的文件系统解压到开发目录

    7.开始编译

    编译前需要对makefilerules进行更改

    1)修改根目录下的/ipnc/Rules.make,根据实际调整以下选项

    MVTOOL_DIR :=

    /opt/dm36x/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le

    IPNC_INSTALL_DIR := /home/<user>/DM36x/

    HOME := $(IPNC_INSTALL_DIR)/ipnc

    DVSDK_BASE_DIR := $(IPNC_INSTALL_DIR)/dvsdk_2_10_01_18

    TFTP_HOME :=

    TARGET_FS :=

    KERNELDIR :=

    AVSERVER_DIR

    $(HOME)/tftp

    $(HOME)/target/filesys

    $(HOME)/ti-davinci

    := $(HOME)/av_capture/build

    SYSTEM := IPNC

    HARDWARE := DM368

    2)进入./ipnc目录make sysall进行编译(这里有官方文档不会提到的错误及解决方案)

    编译时的错误:

    cp: 无法获取"/home/guo/dm365ipnc/ipnc/ti-davinci/arch/arm/boot/uImage" 的文件状态(stat): 没有那个文件或目录

    解决办法:使用make uImage编译生成的内核能由uboot引导,编译时会用到mkimage工具

    sudo apt-get install u-boot-tools

    make menuconfig 出错:scripts/kconfig/lxdialog/dialog.h:31:20: 致命错误: curses.h:没有那个文件或目录编译中断。

    解决办法:ubuntu系统中缺少一个套件ncurses devel ,把此套件安装下即可

    $ sudo apt-get install libncurses5-dev



    • 0
      点赞
    • 0
      收藏
      觉得还不错? 一键收藏
    • 0
      评论

    “相关推荐”对你有帮助么?

    • 非常没帮助
    • 没帮助
    • 一般
    • 有帮助
    • 非常有帮助
    提交
    评论
    添加红包

    请填写红包祝福语或标题

    红包个数最小为10个

    红包金额最低5元

    当前余额3.43前往充值 >
    需支付:10.00
    成就一亿技术人!
    领取后你会自动成为博主和红包主的粉丝 规则
    hope_wisdom
    发出的红包
    实付
    使用余额支付
    点击重新获取
    扫码支付
    钱包余额 0

    抵扣说明:

    1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
    2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

    余额充值