Difference between revisions of "2253 Toradex"
Line 1: | Line 1: | ||
− | This page will guide you in using the [http://sensoray.com/2253 Sensoray Model 2253] with the [http://developer.toradex.com/ Toradex | + | This page will guide you in using the [http://sensoray.com/2253 Sensoray Model 2253] with the [http://developer.toradex.com/ Toradex iMX6 development] boards. |
You will need a Linux host to cross-compile the driver and demo applications. You will need version 1.2.11 or later of the 2253 Linux SDK. After extracting the SDK, create another directory beside it called "toradex". In the "toradex" directory, create a file called "build.sh" containing the following script: | You will need a Linux host to cross-compile the driver and demo applications. You will need version 1.2.11 or later of the 2253 Linux SDK. After extracting the SDK, create another directory beside it called "toradex". In the "toradex" directory, create a file called "build.sh" containing the following script: | ||
− | <pre>#!/bin/sh | + | <pre style="white-space: pre-wrap;"> |
+ | #!/bin/sh | ||
set -x | set -x | ||
Line 48: | Line 49: | ||
You'll also need "Module.symvers.apalis-imx6" or "Module.symvers.colibri-imx6" from Toradex support. | You'll also need "Module.symvers.apalis-imx6" or "Module.symvers.colibri-imx6" from Toradex support. | ||
− | Now run the script using "sh build.sh" from a terminal in the "toradex" directory. | + | Now run the script using "<code>sh build.sh</code>" from a terminal in the "toradex" directory. |
− | Now run "make demo_armhf" from a terminal in the "sdk_x53_linux_1.2.11" directory. | + | Now run "<code>make demo_armhf</code>" from a terminal in the "sdk_x53_linux_1.2.11" directory. |
Now copy the whole "sdk_x53_linux_1.2.11" directory to the Toradex board, and run the following commands in the terminal (as root) | Now copy the whole "sdk_x53_linux_1.2.11" directory to the Toradex board, and run the following commands in the terminal (as root) | ||
Line 63: | Line 64: | ||
</pre> | </pre> | ||
− | The driver is now loaded on the board, and should load automatically whenever the 2253 device is plugged in. You can check "dmesg|tail" to verify the driver is loaded and 3 V4L2 "/dev/video" nodes are created. | + | The driver is now loaded on the board, and should load automatically whenever the 2253 device is plugged in. You can check "<code>dmesg|tail</code>" to verify the driver is loaded and 3 V4L2 "<code>/dev/video</code>" nodes are created. |
To run the "demo.py" demonstration program, you will need to install these python packages first: | To run the "demo.py" demonstration program, you will need to install these python packages first: | ||
Line 77: | Line 78: | ||
</pre> | </pre> | ||
− | There is no "mplayer2" package, so the "preview" button in the demo will not work. | + | There is no "mplayer2" package, so the "preview" button in the demo will not work. Instead, preview can be done using gstreamer using this command: |
− | To record from the terminal, use "./capture" (use -h to see options) or read "README.txt" for examples. | + | <pre style="white-space: pre-wrap;">gst-launch-0.10 v4l2src device=/dev/video0 ! 'video/x-raw-yuv,width=720,height=480,framerate=30000/1001' ! ffmpegcolorspace ! ximagesink |
+ | </pre> | ||
+ | |||
+ | To record from the terminal, use "<code>./capture</code>" (use -h to see options) or read "README.txt" for examples. |
Revision as of 12:12, 3 December 2015
This page will guide you in using the Sensoray Model 2253 with the Toradex iMX6 development boards.
You will need a Linux host to cross-compile the driver and demo applications. You will need version 1.2.11 or later of the 2253 Linux SDK. After extracting the SDK, create another directory beside it called "toradex". In the "toradex" directory, create a file called "build.sh" containing the following script:
#!/bin/sh set -x DRIVER=`pwd`/../sdk_x53_linux_1.2.11/driver if [ ! -d linux-toradex ]; then git clone -b toradex_imx_3.10.17_1.0.0_ga-next --single-branch git://git.toradex.com/linux-toradex.git fi if [ ! -d gcc-linaro ]; then FILE=gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf.tar.xz if [ ! -f $FILE ]; then wget http://releases.linaro.org/14.11/components/toolchain/binaries/arm-linux-gnueabihf/$FILE fi tar xf $FILE ln -s gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf gcc-linaro fi export PATH=${PATH}:`pwd`/gcc-linaro/bin export CROSS_COMPILE=arm-linux-gnueabihf- export ARCH=arm cd linux-toradex if [ x$1 = xclean ]; then git clean -d -f -x -q fi gunzip -c ../config.gz > .config make oldconfig make prepare make scripts #cp ../Module.symvers.colibri-imx6 Module.symvers cp ../Module.symvers.apalis-imx6 Module.symvers KDIR=`pwd` make -C $KDIR SUBDIRS=$DRIVER clean make -C $KDIR SUBDIRS=$DRIVER modules
You'll also need to copy a file from the board "/proc/config.gz" to the "toradex" directory. You'll also need "Module.symvers.apalis-imx6" or "Module.symvers.colibri-imx6" from Toradex support.
Now run the script using "sh build.sh
" from a terminal in the "toradex" directory.
Now run "make demo_armhf
" from a terminal in the "sdk_x53_linux_1.2.11" directory.
Now copy the whole "sdk_x53_linux_1.2.11" directory to the Toradex board, and run the following commands in the terminal (as root)
cd sdk_x53_linux_1.2.11/driver cp s2253.fw /lib/firmware/ mkdir -p /lib/modules/`uname -r`/extra cp s2253.ko /lib/modules/`uname -r`/extra/ depmod -a modprobe s2253
The driver is now loaded on the board, and should load automatically whenever the 2253 device is plugged in. You can check "dmesg|tail
" to verify the driver is loaded and 3 V4L2 "/dev/video
" nodes are created.
To run the "demo.py" demonstration program, you will need to install these python packages first:
opkg install \ python \ python-pygtk \ python-ctypes \ python-threading \ python-subprocess \ python-mmap
There is no "mplayer2" package, so the "preview" button in the demo will not work. Instead, preview can be done using gstreamer using this command:
gst-launch-0.10 v4l2src device=/dev/video0 ! 'video/x-raw-yuv,width=720,height=480,framerate=30000/1001' ! ffmpegcolorspace ! ximagesink
To record from the terminal, use "./capture
" (use -h to see options) or read "README.txt" for examples.