VisionSDK Linux UserGuide
VisionSDK Linux UserGuide
(v03.08.00)
Information in this document is subject to change without notice. Texas Instruments may have pending
patent applications, trademarks, copyrights, or other intellectual property rights covering matter in this
document. The furnishing of this documents is given for usage with Texas Instruments products only and
does not give you any license to the intellectual property that might be contained within this document.
Texas Instruments makes no implied or expressed warranties in this document and is not responsible for
the products based from this document.
Page 1 of 26
IMPORTANT NOTICE
Texas Instruments and its subsidiaries (TI) reserve the right to make changes to their products or to
discontinue any product or service without notice, and advise customers to obtain the latest version of relevant
information to verify, before placing orders, that information being relied on is current and complete. All
products are sold subject to the terms and conditions of sale supplied at the time of order acknowledgment,
including those pertaining to warranty, patent infringement, and limitation of liability.
TI warrants performance of its products to the specifications applicable at the time of sale in accordance with
TI’s standard warranty. Testing and other quality control techniques are utilized to the extent TI deems
necessary to support this warranty. Specific testing of all parameters of each device is not necessarily
performed, except those mandated by government requirements.
Customers are responsible for their applications using TI components.
In order to minimize risks associated with the customer’s applications, adequate design and operating
safeguards ought to be provided by the customer so as to minimize inherent or procedural hazards.
TI assumes no liability for applications assistance or customer product design. TI does not warrant or represent
that any license, either express or implied, is granted under any patent right, copyright, mask work right, or
other intellectual property right of TI covering or relating to any combination, machine, or process in which such
products or services might be or are used. TI’s publication of information regarding any third party’s products or
services does not constitute TI’s approval, license, warranty or endorsement thereof.
Reproduction of information in TI data books or data sheets is permissible only if reproduction is without
alteration and is accompanied by all associated warranties, conditions, limitations and notices. Representation
or reproduction of this information with alteration voids all warranties provided for an associated TI product or
service, is an unfair and deceptive business practice, and TI is neither responsible nor liable for any such use.
Resale of TI’s products or services with statements different from or beyond the parameters stated by TI for
that product or service voids all express and any implied warranties for the associated TI product or service, is
an unfair and deceptive business practice, and TI is not responsible nor liable for any such use.
Also see: Standard Terms and Conditions of Sale for Semiconductor Products.
www.ti.com/sc/docs/stdterms.htm
Mailing Address:
Texas Instruments
Post Office Box 655303
Dallas, Texas 75265
Page 2 of 26
TABLE OF CONTENTS
1 Introduction ................................................................................................. 4
1.1 References ...................................................................................................... 4
2 Installation Overview ................................................................................... 4
2.1 PC Requirements .............................................................................................. 4
2.2 Software Requirements ..................................................................................... 4
2.3 Hardware Requirements .................................................................................... 5
2.4 Software Installation & Setup ............................................................................ 5
3 Build ............................................................................................................. 8
3.1 Build Linux Vision SDK for Video Capture and Display use-cases ............................ 9
3.2 Build Linux Vision SDK for AVB Capture, Decode and Display UCs ........................ 11
3.3 Build Linux Vision SDK for LCD display (M4 Display) ........................................... 11
3.4 Build Linux Vision SDK for fast boot (Early boot and late attach of remote
cores) ........................................................................................................... 12
3.5 Early M4 based chains for VSDK-Linux builds ..................................................... 14
3.6 Build Linux Vision SDK for Autosar ................................................................... 16
3.7 Build Linux Vision SDK file-system.................................................................... 16
4 Run ............................................................................................................ 17
4.1 Board Setup .................................................................................................. 17
4.2 Preparing SD card & Boot ................................................................................ 17
4.3 Run demos .................................................................................................... 19
4.4 IPUMM based decode use-case using GStreamer ................................................ 22
5 Revision History ......................................................................................... 24
1 Introduction
Vision Software Development Kit (Vision SDK) is a multiprocessor software
development package for TI’s family of ADAS SoCs. The software framework allows
users to create different ADAS application data flows involving video capture, video
pre-processing, video analytics algorithms, and video display. The framework has
sample ADAS data flows which exercises different CPUs and HW accelerators in the
ADAS SoC and shows customer how to effectively use different sub-systems in the
SoC. Frame work is generic enough to plug in application specific algorithms in the
system.
Vision SDK is currently targeted for the TDA2xx family of SoCs
This document particularly explains Linux part of vision SDK where A15 is supposed
to run Linux as target OS while other cores in the SOC run SYSBIOS. Build
environment is also assumed to be Linux and user should be familiar with basics of
Linux to follow this document.
1.1 References
Refer additional documents for more information about Vision SDK.
Refer Index.html under <INSTALL_DIR> folder, this file helps navigating through
Vision SDK documentations effectively
2 Installation Overview
This chapter provides a brief description on the system requirements (hardware and
software) and instructions for installing Vision SDK.
2.1 PC Requirements
Installation of this release needs a Linux Ubuntu 14.04 machine.
IMPORTANT NOTE: If you are installing Ubuntu on a virtual machine, ensure it’s a
64 bit Ubuntu.
2.2.2 Linux kernel, uboot, sgx driver and target file system
In this vision sdk release kernel, uboot, sgx & target filesystem downloaded/cloned.
Links to download/clone are mentioned in software installation section 2.4
2.4.2.2.2 Codec_Engine
$> Install codec engine ver codec_engine_3_24_00_08 in the following folder
<INSTALL_DIR>/ti_components/codecs/
Package can be downloaded from
http://software-
dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/ce/3_24_00_08/index_FDS.html
2.4.2.2.3 Framework Components
Download FC version x_xx_xx_xx from below link and use when set IPUMM=yes in
the build configuration. The FC version packaged along with VSDK is a patched
version for IVA-HD profiling and that patched version will not work with IPUMM.
Note: FC Path and version supported in release can be refer from tools_path.mk in
<INSTALL_DIR>/vision_sdk/build
http://software-
dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/fc/3_40_02_07/index_FDS.html
2.4.3 Un-installation
$> rm -rf $INSTALL_DIR
3 Build
Important Note: In this release reference to variations in platform names would be
found, basically they resemble same platform for informational-adas
Tda2xx as dra7x or vice versa
Tda2ex as dra72 or vice versa
Tda2ex 17x17 as dra71 or vice versa
Tda2px as dra76 or vice versa
For building binaries follow these steps
3.1 Build Linux Vision SDK for Video Capture and Display use-cases
Note: If you are trying this after 3.2 ensure you do a ‘make clean’ and manually
delete $INSTALL_DIR/vision_sdk/binaries/$(MAKEAPPNAME)/$(MAKECONFIG) folder
and then proceed
1. You must have followed all the steps in software installation and setup section
2.4 before you proceed
2. Select make config in Rules.make
TDA2XX
MAKECONFIG=tda2xx_evm_linux_all
TDA2EX
MAKECONFIG=tda2ex_evm_linux_all
TDA2EX 17x17
MAKECONFIG= tda2ex_17x17_evm_linux_all
TDA2PX
MAKECONFIG=tda2px_evm_linux_all
3. Select the Lens Module used for the camera:
For TDA2xx, copy the binary files CALMAT.bin and CHARTPOS_RUBICON.BIN to
SD Card from vision_sdk/apps/tools/surround_vision_tools/Srv_LUTs/TDA2X/
For TDA2PX, copy vision_sdk/apps/tools/Lens_params/LENS_imi.BIN,
vision_sdk/apps/tools/surround_vision_tools/Srv_LUTs/TDA2X/CALMAT.bin and
vision_sdk/apps/tools/surround_vision_tools/Srv_LUTs/TDA2X/
CHARTPOS_RUBICON.BIN to SD Card.
4. Build the Linux dependencies, this will build kernel, u-boot and sgx drivers &
memcache.ko
NOTE: This step is needed only first time you build or if you make any changes to
u-boot/kernel/sgx drivers, otherwise this can be skipped.
$> cd $INSTALL_DIR/vision_sdk/build
$> make linux
$> make linux_install
5. Build the sdk
$>make –s –j depend
$>make –s –j
Executing “make –s –j depend “will build all the necessary components (PDK drivers, EDMA
drivers) and “make –s –j” will build the Vision SDK framework and examples.
6. Step 5 will ensure your firmware binaries and linux application’s .out are copied
into your targetfs i.e.
$INSTALL_DIR/ti_components/os_tools/linux/targetfs/lib/firmware and
$INSTALL_DIR/ti_components/os_tools/linux/targetfs/opt/vision_sdk
respectively.
It will also execute make linux_install to copy all binaries needed to boot into
$INSTALL_DIR/vision_sdk/binaries/$(MAKEAPPNAME)/<MAKECONFIG>/hlos/linu
x/boot and $INSTALL_DIR/ti_components/os_tools/linux/targetfs/boot
7. The file system under $INSTALL_DIR/ti_components/os_tools/linux/targetfs now
can be used as either NFS or rootfs on sd card.
a. Tar the file system and keep it in
$INSTALL_DIR/vision_sdk/binaries/$(MAKEAPPNAME)/<MAKECONFIG>/hl
os/linux/boot folder.
Important Note: With 4.19 kernel filesystem 4GB and above card is
required.
$>export INSTALL_DIR=<installation_directory_absolute_path>
$>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/$(MAKEAPPNAME)/<MAKECONFIG>/hl
os/linux/boot
$>exit
3.2 Build Linux Vision SDK for AVB Capture, Decode and Display UCs
Note: if you are trying this after 3.1, ensure you do a ‘make clean’ and manually
delete $INSTALL_DIR/vision_sdk/binaries/$(MAKECONFIG) folder and then proceed
NOTE: AVB is not supported on tda2px in this release
You must have followed all the steps in software installation and setup section
2.4
Ensure that A15_TARGET_OS := Linux and NDK_PROC_TO_USE=ipu2 in
\vision_sdk\$(MAKEAPPNAME)\configs\$(MAKECONFIG)\cfg.mk
IMP: Patch the dra7-evm.dts (or dra72-evm-common.dtsi for TDA2ex/TDA2ex
17x17) from kernel
(ti_components/os_tools/linux/kernel/omap/arch/arm/boot/dts)as shown below
Change below
&mac {
status = "okay";
to
&mac {
status = "disabled";
Basically you need to disable mac from Kernel so VSDK can use it exclusively.
Build the linux dependencies, this will build kernel, u-boot and sgx drivers
NOTE: This step is needed only first time you build or if you make any changes to
u-boot/kernel/sgx drivers, otherwise this can be skipped.
$> cd $INSTALL_DIR/vision_sdk/build
$> make linux -j
$> make linux_install -j
$> make -s -j depend
$> make -s -j
Disable all cores in \vision_sdk\$(MAKEAPPNAME)\configs\$(MAKECONFIG)\cfg.mk
except IPU1_0, IPU2 and A15 using PROC_<CORE_NAME>_INCLUDE
Refer steps 4 to 7 in section 3.1
3.3 Build Linux Vision SDK for LCD display (M4 Display)
Note: Only TDA2xx and TDA2ex support 10.1” LG LCD.
You must follow all the steps in software installation and build.
Change the dtb picked in the uenv.txt from
fdtfile=dra7-evm-infoadas.dtb fdtfile= dra7-evm-infoadas-lcd-lg.dtb for tda2xx
fdtfile=dra72-evm-infoadas.dtb fdtfile=dra72-evm-infoadas-lcd-lg.dtb for
tda2ex
3.4 Build Linux Vision SDK for fast boot (Early boot and late attach of remote
cores)
Apply the earlyboot-lateattach-patches for kernel and u-boot
cd $INSTALL_DIR/ti_components/os_tools/linux/kernel/omap
git am ../linux-kernel-addon/ earlyboot-lateattach-patches/kernel/*
cd $INSTALL_DIR/ti_components/os_tools/linux/u-boot/u-boot
git am ../linux-kernel-addon/ earlyboot-lateattach-patches/u-boot/*
1. You must have followed all the steps in software installation and setup section
2.4 before you proceed
2. Select make config in Rules.make
TDA2XX
MAKECONFIG=tda2xx_evm_linux_all
3. Select the Lens Module used for the camera:
For TDA2xx, copy the binary files CALMAT.bin and CHARTPOS_RUBICON.BIN to
SD Card from vision_sdk/apps/tools/surround_vision_tools/Srv_LUTs/TDA2X/
For TDA2PX, copy vision_sdk/apps/tools/Lens_params/LENS_imi.BIN,
vision_sdk/apps/tools/surround_vision_tools/Srv_LUTs/TDA2X/CALMAT.bin and
vision_sdk/apps/tools/surround_vision_tools/Srv_LUTs/TDA2X/
CHARTPOS_RUBICON.BIN to SD Card.
4. Build the Linux dependencies, this will build kernel, u-boot and sgx drivers &
memcache.ko
NOTE: This step is needed only first time you build or if you make any changes to
u-boot/kernel/sgx drivers, otherwise this can be skipped.
$> cd $INSTALL_DIR/vision_sdk/build
$> make linux
$> make linux_install
5. Build the sdk
$>make –s –j depend
$>make –s –j
Executing “make –s –j depend “will build all the necessary components (PDK drivers, EDMA
drivers) and “make –s –j” will build the Vision SDK framework and examples.
6. Step 5 will ensure your firmware binaries and linux application’s .out are copied
into your targetfs i.e.
$INSTALL_DIR/ti_components/os_tools/linux/targetfs/lib/firmware and
$INSTALL_DIR/ti_components/os_tools/linux/targetfs/opt/vision_sdk
respectively.
It will also execute make linux_install to copy all binaries needed to boot into
$INSTALL_DIR/vision_sdk/binaries/$(MAKEAPPNAME)/<MAKECONFIG>/hlos/linu
x/boot and $INSTALL_DIR/ti_components/os_tools/linux/targetfs/boot
7. The file system under $INSTALL_DIR/ti_components/os_tools/linux/targetfs now
can be used as either NFS or rootfs on sd card.
a. Tar the file system and keep it in
$INSTALL_DIR/vision_sdk/binaries/$(MAKEAPPNAME)/<MAKECONFIG>/hl
os/linux/boot folder.
Important Note: With 4.19 kernel filesystem 4GB and above card is
required.
$>export INSTALL_DIR=<installation_directory_absolute_path>
$>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/$(MAKEAPPNAME)/<MAKECONFIG>/hl
os/linux/boot
$>exit
Only when the above steps are completed run the early-boot-update.sh utility, or
else the system boot will fail due to missing dependencies. If you intend to
boot from QSPI, skip running the early-boot-update script and jump to
Section 3.4.1 of this file.
This command will delete existing uImage, zImage, uenv.txt, dtb and remote-
core firmware present in the boot partition and update it with the necessary files.
Argument 1 is mandatory and indicates the current configuration being built. The
list of valid arguments inlcude "tda2xx_evm_linux_all"
Argument 2 is mandatory and indicates path where the Linux target file-system
is present
Argument 3 is mandatory and indicates the path to the target boot
partition. Usually this is /media/<username>/boot
&ipu2 {
/delete-property/ watchdog-timers;
timers= <&timer9> , <&timer11>;
};
To
&ipu1 {
status= "okay";
/delete-property/ watchdog-timers;
timers= <&timer9> , <&timer11>;
};
DISABLE_COMPLETE(ipu2);
4. Open vision_sdk\apps\configs\tda2xx_evm_linux_all\cfg.mk and set
PROC_IPU1_0_INCLUDE = yes
PROC_IPU2_INCLUDE = no
AUTOSAR_APP = yes
IPU_PRIMARY_CORE = ipu1_0
IPU_SECONDARY_CORE = ipu2
5. Apply the IPC Lib patch.
$> cd $INSTALL_DIR/vision_sdk/
$> cp docs/Patches/IPClib_Autosar_with_Bios.patch
../ti_components/drivers/pdk/packages/ti/drv/ipc_lite/
$> cd ../ti_components/drivers/pdk/packages/ti/drv/ipc_lite/
$> git apply IPClib_Autosar_with_Bios.patch
6. Follow step 1 to 5 in section 3.4
It will build all cores except IPU2.
7. Build only IPU2 by disabling all cores except IPU2.
8. Install Autosar.
$> cd $INSTALL_DIR/vision_sdk/build
$> make autosar_install
9. Follow step 7 in section 3.4
10. Run early-boot-update.sh utility with as described in section 3.4 with makeconfig as
tda2xx_evm_linux_autosar.
5. Disconnect SD card from installation machine and insert it into EVM micro SD
slot.
6. Set hardware pin settings for SD Boot
Make sure the Boot Mode Select Switch is set for the SD boot mode on TDA2xx
Base EVM. This is done by setting the pins SYSBOOT (SW2+SW3) [0:15] to the
below shown position
SYSBOOT 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
SW2 SW3
SW Pin 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8
SW ON ON ON OFF OFF OFF OFF OFF ON OFF OFF OFF OFF OFF OFF ON
Position
IMPORTANT NOTE: Pin setting for J6 Rev G 2.0 Silicon is as mentioned below
SYSBOOT 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
SW2 SW3
SW Pin 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8
SW ON ON ON OFF OFF OFF OFF OFF ON OFF OFF OFF OFF OFF OFF OFF
Position
7. Power on the EVM, press power reset
4.3 Run demos
1. Log in as root on the UART console
$> dra7xx-evm login: root
root@dra7xx-evm:~#
Following errors may be seen on display and the message can be ignored.
Trying to boot from MMC1
reading dra7-ipu2-fw.lzop
spl_load_file_fat: error reading file dra7-ipu2-fw.lzop, err - -1
spl: error reading image dra7-ipu2-fw.lzop, err - -1
Failed to load module: /usr/lib/gbm/gbm_dri.so: cannot open shared object file: No such file
or directory
failed to load module: /usr/lib/gbm/gbm_gallium_drm.so: cannot open shared object file: No
such file or directory
2. Proceed on UART console & execute
(TDA2XX/TDA2EX/TDA2EX 17x17)
$> cd /opt/vision_sdk
$> ./load_ocl_kos.sh (needed only for opencl usecases)
$> source ./opencl_env.sh (needed only for opencl usecases)
$> source ./vision_sdk_load.sh
$> ./$(MAKEAPPNAME).out
Select the demo to run
(TDA2XX – TIDA00455/OV490 multi-channel use-case)
$> cd /opt/vision_sdk
$> ./load_ocl_kos.sh (needed only for opencl usecases)
$> source ./opencl_env.sh (needed only for opencl usecases)
$> source ./vision_sdk_load.sh
$>./vision_sdk_ov490_pinmux.sh
$> ./$(MAKEAPPNAME).out
Select the demo to run
(TDA2PX – ISS single/multi-channel use-case)
$> cd /opt/vision_sdk
$> source ./vision_sdk_load.sh
$> ./$(MAKEAPPNAME).out
Select the demo to run
(TDA2XX/TDA2EX – OpenVX use-case)
$> cd /opt/vision_sdk
$> source ./vision_sdk_load.sh
$>Copy test_data folder from the
ti_components/open_compute/tiovx_01_00_01_00/conformance_tests/ to
/opt/openvx/test_data
$> export VX_TEST_DATA_PATH=/opt/openvx/test_data
$> ./$(MAKEAPPNAME).out
Select the OPenVX demo to run
IMPORTANT NOTE: After copying all required files, please make sure all folder and
files should have same user and group id. If it is root then please change it using
chown command.
Option 2:
Follow below commands to run the demo
cd /opt/vision_sdk
source ./vision_sdk_load.sh
./$(MAKEAPPNAME).out &
sleep 10
./pvrscope -f 0 &
fg
Enter demo option
IMPORTANT NOTE: Some kernel logs and errors failure message will appear while
running “source ./vision_sdk_load.sh”, this is caused when DSS interrupts are
disabled on A15 using omapconf write, and these errors need be ignored as it would
not harm the execution
If the above two dependencies are met, run decode_ipumm.sh and the video will be
displayed on the screen
1. Remove the IPU-2 entries from the kernel device-tree and enable IPU-1
- &ipu2_cma_pool {
- reg = <0x0 0x99000000 0x0 0x5000000>;
- };
- &ipu2 {
- /delete-property/ watchdog-timers;
- timers= <&timer9> , <&timer11>;
- };
&ipu1 {
- status= "disabled";
/delete-property/ watchdog-timers;
};
2. Remove late-attach properties (if any) from the device tree for the the IPU-
2 core / MMU
3. Make the following changes in the
apps/configs/<evm_id>_linux_all/cfg.mk file
PROC_IPU1_0_INCLUDE=yes
PROC_IPU1_1_INCLUDE=no
PROC_IPU2_INCLUDE=no
IPU_PRIMARY_CORE=ipu1_0
IPU_SECONDARY_CORE=ipu2
IPUMM_INCLUDE=no
IVAHD_INCLUDE=no
Once these changes are made, perform a clean build. Ensure that the file
/lib/firmware/dra7-ipu2-fw.xem4 is the IPUMM firmware which is built as part of the
Processor-SDK Linux release. With this configuration, IPU-1 runs the Vision-SDK
firmware while IPU-2 runs IPUMM which performs decode operations. Refer to
section 4.4.1 on how to run decode use-cases.
NOTE: Gstreamer has been modified to support buffer allocation using OMAPDRM
even when the display is running on a different DRM card, which in the VSDK-Linux
scenario is VDRM. Only Wayland sink is supported in this configuration, KMS sink
isn’t supported. Changes made to the GSTDucati plugin is available in linux-kernel-
addon/fs-patches/0001-gstducati-Enable-encode-decode-for-vDRM-setup.patch
If other video playback applications need support with VDRM, make sure buffers targeted for IPUMM are
allocated from OMAPDRM and imported to VDRM before display.
5 Revision History
Version Date Revision History
1.0 30th June 2014 Initial Version
««« § »»»