GST cookbook/gNewSense: Difference between revisions

From XiphWiki
Jump to navigation Jump to search
(add gNewSense build instructions. traces of nuts, but a good set overall)
 
m (Fixed external link)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
gNewSense GStreamer 0.10 Build Instructions<br />
Migrated to: https://gitorious.org/openvideo_reference_build.
Tested on 18-March-2013 by GChriss<br />
 
<br />
[https://wiki.xiph.org/index.php?title=GST_cookbook/gNewSense&oldid=14073 View the archived gNewSense build instructions].
Prepare live USB key as documented, double-check boot flag<br />
<br />
Boot USB key in BIOS -> Install to disk -> Manual partition<br />
Use a smaller '/' partition (~20GB), ~20GB swap space, the remainder as '/home'<br />
<br />
reboot<br />
<br />
apt-get update<br />
<br />
apt-get dist-upgrade<br />
<br />
apt-get install fakeroot kernel-package libncurses5-dev libqt3-mt-dev bzip2 wget build-essential autoconf libtool libglib2.0-dev bison flex libxml2-dev alsa-tools libasound2-dev vim mlocate libxmu-dev libxi-dev libsamplerate0-dev libsndfile1-dev git-core curl lm-sensors sensors-applet openssh-server flex bison iasl automake libsdl1.2-dev libgtk2.0-dev libglib2.0-dev libglade2-dev libffi4-dev pciutils-dev cu sysfsutils mkvtoolnix mkvtoolnix-gui subversion cpuburn<br />
<br />
[For realtime GNUSense kernel, optional but helpful for audio quality]<br />
http://www.gnewsense.org/Documentation/BuildKernel<br />
+apply patch: http://twobit.us/blog/2010/06/debian-lenny-make-kpkg-broken-with-new-kernel/<br />
sudo su<br />
cd /usr/src<br />
wget "http://linux-libre.fsfla.org/pub/linux-libre/releases/LATEST-3.8.N/linux-libre-3.8.1-gnu.tar.bz2"<br />
tar xvjf linux-libre-3.8.1-gnu.tar.bz2 <br />
cd linux-3.8.1/<br />
cp /boot/config-2.6.24-32-generic ./.config<br />
make oldconfig<br />
make gconfig<br />
[See attached .config.  'CONFIG_PREEMPT=y' + ALSA built as modules, 'CONFIG_HZ_100=y']<br />
CONCURRENCY_LEVEL=4 fakeroot make-kpkg --initrd  kernel_image kernel_headers<br />
[See http://www.debian-administration.org/articles/90 ]<br />
cd /usr/src/<br />
dpkg -i linux-headers-3.8.1-gnu_3.8.1-gnu-10.00.Custom_i386.deb linux-image-3.8.1-gnu_3.8.1-gnu-10.00.Custom_i386.deb<br />
chmod 4755 /usr/bin/cpufreq-selector<br />
reboot<br />
Test GNOME CPU freq applet<br />
<br />
gsc@host:~$ uname -a<br />
Linux host 3.8.1-gnu #1 SMP PREEMPT Sun Mar 3 16:40:14 EST 2013 i686 GNU/Linux<br />
<br />
sudo su<br />
mkdir -p /packages/openvideopro && mkdir -p /packages/openvideopro/lib && mkdir -p /packages/openvideopro/bin<br />
mkdir -p /packages/openvideopro/lib/pkgconfig<br />
chown -R gchriss:users /packages/openvideopro<br />
exit<br />
rm -Rf ~/.gstreamer-0.10<br />
vi ~/.bashrc, add the following:<br />
export GST_PLUGIN_SYSTEM_PATH="/packages/openvideopro/lib"<br />
export GST_PLUGIN_PATH="/packages/openvideopro/lib"<br />
export PKG_CONFIG_PATH=/packages/openvideopro/lib/pkgconfig<br />
export PATH=/packages/openvideopro/bin:$PATH<br />
<br />
<br />
cd /packages<br />
git clone git://repo.or.cz/nasm.git nasm_3march2013<br />
cd nasm_3march2013<br />
./autogen.sh --no-configure &>gsc_autogen.log<br />
./configure --prefix=/packages/openvideopro &>gsc_config.log<br />
make V=1 &>gsc_make.log<br />
make install &>gsc_install.log<br />
<br />
[Optional]<br />
cd /packages<br />
git clone git://github.com/yasm/yasm.git && cd yasm<br />
./configure --prefix=/packages/openvideopro &>gsc_config.log<br />
make V=1 &>gsc_make.log<br />
make install &>gsc_install.log<br />
<br />
git clone git://code.entropywave.com/git/orc.git && cd orc<br />
./autogen.sh  &>gsc_autogen.log<br />
./configure --prefix=/packages/openvideopro &>gsc_config.log <br />
make V=1 &>gsc_make.log<br />
make install &>gsc_install.log<br />
<br />
cd /packages && wget "http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz"<br />
tar -xvzf libogg-1.3.0.tar.gz && cd libogg-1.3.0<br />
./configure --prefix=/packages/openvideopro &>gsc_config.log<br />
make V=1 &>gsc_make.log<br />
make install &>gsc_install.log<br />
<br />
cd /packages && wget "http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz"<br />
tar -xvzf libvorbis-1.3.3.tar.gz && cd libvorbis-1.3.3/<br />
./configure --prefix=/packages/openvideopro &>gsc_config.log<br />
make V=1 &>gsc_make.log<br />
export PKG_CONFIG_PATH=/packages/openvideopro/lib/pkgconfig<br />
make V=1 &>gsc_config.log<br />
make install &>gsc_install.log<br />
<br />
cd /packages && wget "http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2"<br />
tar -xvjf libtheora-1.1.1.tar  && cd libtheora-1.1.1<br />
./configure --prefix=/packages/openvideopro &>gsc_config.log<br />
make V=1 &>gsc_config.log<br />
make install &>gsc_install.log<br />
<br />
Open browser, download:<br />
http://sourceforge.net/projects/libjpeg-turbo/files/1.2.90%20%281.3beta1%29/libjpeg-turbo-1.2.90.tar.gz/download<br />
cd /packages && tar -xvzf libjpeg-turbo-1.2.90.tar.gz && cd libjpeg-turbo-1.2.90<br />
./configure --prefix=/packages/openvideopro &>gsc_config.log<br />
make V=1 &>gsc_make.log<br />
make install &>gsc_install.log<br />
<br />
wget "http://dl.matroska.org/downloads/libebml/libebml-1.2.2.tar.bz2"<br />
tar -xvjf libebml-1.2.2.tar.bz2 & cd libebml-1.2.2<br />
make -C make/linux install_staticlib install_headers prefix=/packages/openvideopro &>gsc_make.log<br />
make install &>gsc_install.log<br />
<br />
wget "http://dl.matroska.org/downloads/libmatroska/libmatroska-1.3.0.tar.bz2"<br />
tar -xvjf libmatroska-1.3.0.tar.bz2 && cd libmatroska-1.3.0/<br />
CXXFLAGS='-I/packages/openvideopro/include' make -C make/linux install_staticlib install_headers prefix=/packages/openvideopro &>gsc_make.log<br />
make install &>gsc_install.log<br />
<br />
wget "http://downloads.xiph.org/releases/libshout/libshout-2.3.1.tar.gz" && tar -xvzf libshout-2.3.1.tar.gz && cd libshout-2.3.1<br />
./configure --prefix=/packages/openvideopro &>gsc_config.log<br />
make V=1 &>gsc_make.log<br />
make install &>gsc_install.log<br />
<br />
wget "http://ftp.acc.umu.se/pub/gnome/sources/glib/2.28/glib-2.28.8.tar.bz2"<br />
tar -xvjf glib-2.28.8.tar.bz2  && cd glib-2.28.8<br />
./configure  --prefix=/packages/openvideopro &>gsc_config.log<br />
make V=1 &>gsc_make.log<br />
['make check' failures are "OK"]<br />
make install &>gsc_install.log<br />
<br />
cd /packages && wget "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.26.tar.bz2"<br />
tar -xvjf alsa-lib-1.0.26.tar.bz2 && cd alsa-lib-1.0.26<br />
./configure --prefix=/packages/openvideopro &>gsc_config.log<br />
make V=1 &>gsc_make.log<br />
make install &>gsc_install.log<br />
<br />
wget "http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-0.10.36.tar.gz"<br />
tar -xvzf gstreamer-0.10.36.tar.gz && cd gstreamer-0.10.36<br />
./configure --enable-failing-tests --prefix=/packages/openvideopro &>gsc_config.log<br />
make V=1 &>gsc_make.log<br />
make install &>gsc_install.log<br />
<br />
wget "http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-0.10.36.tar.gz"<br />
tar -xvzf gst-plugins-base-0.10.36.tar.gz && cd gst-plugins-base-0.10.36<br />
export CFLAGS='-msse -mmmx -msse2' && export CXXFLAGS='-msse -mmmx -msse2'<br />
./configure --enable-orc --prefix=/packages/openvideopro &>gsc_config.log<br />
make V=1 &>gsc_config.log<br />
make install &>gsc_install.log <br />
<br />
wget "http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-0.10.31.tar.gz"<br />
export CFLAGS='-msse -mmmx -msse2' && export CXXFLAGS='-msse -mmmx -msse2'<br />
tar -xvzf gst-plugins-good-0.10.31.tar.gz && cd gst-plugins-good-0.10.31<br />
./configure --enable-experimental --enable-orc --prefix=/packages/openvideopro &>gsc_configure.log<br />
make V=1 &>gsc_make.log<br />
make install &>gsc_install.log<br />
<br />
cd /packages<br />
svn checkout http://gst-plugins-elphel.googlecode.com/svn/trunk/ gst-plugins-elphel <br />
cd gst-plugins-elphel/jp462bayer<br />
./autogen &>gsc_autogen.log<br />
./configure --enable-debug --prefix=/packages/openvideopro &>gsc_config.log<br />
make V=1 &>gsc_make.log<br />
make install &>gsc_install.log<br />
cd ../bayer2rgb2/<br />
<br />
cd /packages<br />
wget "http://jackaudio.org/downloads/jack-audio-connection-kit-0.121.3.tar.gz"<br />
tar -xvzf jack-audio-connection-kit-0.121.3.tar.gz && cd jack-audio-connection-kit-0.121.3<br />
vi tools/alsa_in.c, change:<br />
delay = snd_pcm_avail( alsa_handle );  ==to==<br />
delay = snd_pcm_avail_update( alsa_handle );<br />
vi tools/alsa_out.c, change:<br />
delay = (num_periods*period_size)-snd_pcm_avail( alsa_handle ) ; ==to==<br />
delay = (num_periods*period_size)-snd_pcm_avail_update( alsa_handle ) ;<br />
[Breaks alsa_in, alsa_out playback/recording but enables compilation...]<br />
./configure --enable-optimize --prefix=/packages/openvideopro &>gsc_config.log<br />
make V=1 &>gsc_make.log<br />
make install &>gsc_install.log<br />
<br />
updatedb<br />
<br />
Close any extra windows, file caching services, ''etc.''<br />
<br />
Set CPU cores to >= 3.2GHz<br />
<br />
Stress-test CPU temperature stability (necessary, but proceed at own risk):<br />
burnMMX & burnMMX & burnMMX & burnMMX<br />
<br />
Disable screensaver, start JACK, launch GStreamer pipeline, renice pipeline to -18, set color controls via Elphel web interface (adjust brightness to achieve 18FPS, most other controls work).<br />
<br />
<br />
To use Totem from the command line:<br />
unset GST_PLUGIN_SYSTEM_PATH && unset GST_PLUGIN_PATH<br />
totem <br />
rm -Rf ~/.gstreamer-0.10<br />
exit

Latest revision as of 12:14, 11 October 2013