最近在做的项目需要在TDA2X平台上面运行深度学习代码,所以需要给板子做一个linux系统。官方参考文档VisionSDK_Linux_UserGuide.pdf。
安装PROCESSOR SDK并导入环境变量
$> ./PROCESSOR_SDK_VISION_03_08_00_00_setuplinux.bin
$> export INSTALL_DIR=
我的安装目录是 ~/WorkSpaces/TI/PROCESSOR_SDK_VISION_03_08_00_00/。
TDA2X的官方文档用的git的方式下载的,我首先尝试的git,发现资源的链接非常不稳定,几十k的下载速度,还经常中断,基本没有成功的可能。所以强烈建议 kernel、uboot的下载不要使用git,使用wget的持续断点续传下载;sgx不要使用wget下载,必须用git下载,sgx的网站链接的资源和git不一致,这里要特别注意,否则编译会error
2.1 下载kernel
$> wget -t 0 -c https://git.ti.com/cgit/glsdk/psdkla-kernel/snapshot/psdkla-kernel-REL_VISION_SDK_03_08_00_00.tar.gz
或
$> wget -t 0 -c https://git.ti.com/cgit/glsdk/psdkla-kernel/snapshot/psdkla-kernel-REL_VISION_SDK_03_08_00_00.tar.xz
哪个先下载完用哪个就行,不要手动干预,中断后会自己重新连接,耐心等就行。将下载的文件解压并拷贝到**$INSTALL_DIR/ti_components/os_tools/linux/kernel** 目录下,重命名为omap。
$> tar zxvf psdkla-kernel-REL_VISION_SDK_03_08_00_00.tar.gz
$> cp -r psdkla-kernel-REL_VISION_SDK_03_08_00_00 $INSTALL_DIR/ti_components/os_tools/linux/kernel
$> cd $INSTALL_DIR/ti_components/os_tools/linux/kernel
$> mv psdkla-kernel-REL_VISION_SDK_03_08_00_00 omap
2.2 下载ludev
$> cd
$> wget -t 0 -c https://git.ti.com/cgit/ipc/ludev/snapshot/ludev-4.16.00.00.tar.gz
$> tar zxvf ludev-4.16.00.00.tar.gz
$> cp -r ludev-4.16.00.00 $INSTALL_DIR/ti_components/os_tools/linux/kernel/cmem
$> cd $INSTALL_DIR/ti_components/os_tools/linux/kernel/cmem
$> mv ludev-4.16.00.00 ludev
2.3 下载u-boot
$> cd
$> wget -t 0 -c https://git.ti.com/cgit/glsdk/psdkla-u-boot/snapshot/psdkla-u-boot-REL_VISION_SDK_03_08_00_00.tar.gz
或
$> wget -t 0 -c https://git.ti.com/cgit/glsdk/psdkla-u-boot/snapshot/psdkla-u-boot-REL_VISION_SDK_03_08_00_00.tar.xz
我用的是xz文件
$> tar xf psdkla-u-boot-REL_VISION_SDK_03_08_00_00.tar.xz
$> cp -r psdkla-u-boot-REL_VISION_SDK_03_08_00_00 $INSTALL_DIR/ti_components/os_tools/linux/u-boot
$> cd $INSTALL_DIR/ti_components/os_tools/linux/u-boot
$> mv psdkla-u-boot-REL_VISION_SDK_03_08_00_00 u-boot
2.4 下载sgx
sgx的网站资源git.ti.com/graphics/omap5-sgx-ddk-linux和git clone的资源不一致,我用wget下载sgx发现编译的时候缺少文件,改用git下载后编译没问题。
根据官方文档配置git
先编辑.gitconfig
$>gedit /home//.gitconfig
[core]
gitproxy = none for ti.com
gitproxy = /home//git-proxy.sh
创建git-proxy.sh
$>gedit /home//git-proxy.sh
exec /usr/bin/corkscrew proxyle01.ext.ti.com 80 $*
检验是否配置成功
$> git config --list
core.gitproxy=none for ti.com
core.gitproxy=/home//git–proxy.sh
下载sgx
$> cd $INSTALL_DIR/ti_components/os_tools/linux/sgx
$> git clone git://git.ti.com/graphics/omap5-sgx-ddk-linux.git
$> cd omap5-sgx-ddk-linux/
$> git checkout -b sgx_dev 4519ed3
2.5 下载并解压文件系统
tisdk-rootfs-image-dra7xx-evm_vsdk_3_8.tar.xz
$> cd $INSTALL_DIR/ti_components/os_tools/linux/targetfs
$> chmod 777 ../targetfs
$> tar xf tisdk-rootfs-image-dra7xx-evm_vsdk_3_8.tar.xz
2.6 下载A15 Compiler and linker
gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz
$> cd $INSTALL_DIR/ti_components/os_tools/linux/arm
$> tar –xvf gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz
Ssh, corkscrew, gawk, uname, sed, u-boot-tools, dos2unix, dtrx, git, lib32z1
lib32ncurses5
lib32bz2-1.0
libc6:i386
libc6-i386
libstdc++6:i386
libncurses5:i386 libz1:i386 libc6-dev-i386 device-tree-compiler mono-
complete lzop
$>sudo apt-get install
$> cd $INSTALL_DIR/vision_sdk/build
$> sudo gedit Rules.make
MAKECONFIG=tda2xx_evm_linux_all
$> cd $INSTALL_DIR/vision_sdk/build
$> make linux
$> make linux_install
$> cd $INSTALL_DIR/vision_sdk/build
$> make –s –j depend
$> make –s –j
$>cd $INSTALL_DIR/ti_components/os_tools/linux/targetfs
$>tar cvf tisdk-rootfs-image-dra7xx-evm.tar.xz ./*
$>mv ./tisdk-rootfs-image-dra7xx-evm.tar.xz
$INSTALL_DIR/vision_sdk/binaries/apps/tda2xx_evm_linux_all/hl
os/linux/boot
$> cd $INSTALL_DIR/vision_sdk/build
$> make clean
$> cd $INSTALL_DIR/vision_sdk/binaries/
$> rm -rf *
然后重新2到3 step。
在编译过程中,碰到了缺少某几个包的问题,bison等(忘了),手动apt install就可以了。
我选择的是SD卡only boot
首先确保$INSTALL_DIR/vision_sdk/binaries/apps/tda2xx_evm_linux_all/hl
os/linux/boot是否如下四个文件:
没有问题的话,执行如下命令,制作SD卡启动盘。
$> cd $INSTALL_DIR/vision_sdk/build
$> sudo ./hlos/scripts/linux/mksdboot.sh --device /dev/ --appname apps
--makeconfig tda2xx_evm_linux_all
附一张主板接线图