Community Workspace/Tegra3

= Mer on Tegra3 =

DISCLAIMER: This project is not endorsed or supported by any company. This is purely a community based effort.

This page describes the Tegra3 common parts. For the device specific notes, check the Tegra3 section in Community_Workspace.

The hardware adaptation is maintained in the project nemo:devel:hw:nv:tegra3:common

Working

 * X.Org with HW accelerated 2D
 * OpenGL ES 1 & 2 (including X.Org support)
 * Gstreamer with HW accelerated video and audio encode/decode/render
 * At least H.264/MPEG4 and AAC are supported
 * For XV sink one must use nvxvimagesink when using a HW decoder.
 * Using nvxvimagesink instead of the de-facto xvimagesink needs patched Qt

Target Platform Development Using SB2
(Adapted from Community_Workspace/RaspberryPi)

Cross-compiling on the host SDK (as opposed to compiling natively on device) is possible by creating a target (an unpacked rootfs) and using sb2 to "emulate" the ARM device.

Install proper SB2 related tools: sudo zypper in -t pattern Mer-SB2-armv7hl

Step-by-step Setup
Step one is to create the target rootfs. This can be done with mic using the same kickstart file used to create the image:

sudo mic create fs tegra3-image.ks -o /path/to/target --arch=armv7hl

This will create a /path/to/target/tegra3-image directory with a rootfs that contains all the default packages from that ks.

Step two is changing the permissions so we can write anywhere on the rootfs:

sudo chown -R $USER.mer tegra3-image

Step three is initializing the sb2 target (yes, a lot of options there):

cd tegra3-image sb2-init -A armv7hl -M armv7hl -d -L --sysroot=/ -C --sysroot=/ -c /usr/bin/qemu-arm-dynamic -m sdk-build -n -N -t / tegra3 /opt/cross/bin/armv7hl-meego-linux-gnueabi-gcc

There will be errors from sb2-init (concerning ld and host-gcc), but it should be safe to ignore them.

Step four is to fix a quirk about /var/run in the target being a symlink, sb2 doesn't like this:

rm var/run mkdir var/run

And another quirk:

echo -n 'armv7hl-meego-linux' > etc/rpm/platform echo 'arch = armv7hl' >> etc/zypp/zypp.conf

Step five is to rebuild and refresh the packaging system so we can install devel packages:

sb2 -t tegra3 -m sdk-install -R rpm --rebuilddb sb2 -t tegra3 -m sdk-install -R zypper ref

Building with SB2
Install some build tools and dependencies inside the new SB2 target:

sb2 -m sdk-install -R zypper install gcc make gst-plugins-base-devel gstreamer-devel qt-qmake libqt-devel libqtopengl-devel graphics-adaptation-tegra3-devel graphics-adaptation-tegra3-libEGL-devel graphics-adaptation-tegra3-libGLESv1-devel graphics-adaptation-tegra3-libGLESv2-devel graphics-adaptation-tegra3-libOMX-devel

NOTE: sometimes it's necessary to be on the top directory of the target to successfully run commands in the sdk-install mode. If a command fails mysteriously, try that first.

Build the project:

cd project sb2 -t tegra3 qmake -recursive sb2 -t tegra3 make