Ich habe ein Script gefunden, das ivtv automatisch downloaded und installiert.
Ursprünglich für Ubuntu hab ich es angepasst, dass es auch für SUSE geht.
Die Installation klappt reibungslos... wobei ich mich immernoch mit der Einrichtung von IVTV rumschlage.. aber das ist eine andere Baustelle.
Hier erstmal das Script:
Ursprünglich für Ubuntu hab ich es angepasst, dass es auch für SUSE geht.
Die Installation klappt reibungslos... wobei ich mich immernoch mit der Einrichtung von IVTV rumschlage.. aber das ist eine andere Baustelle.
Hier erstmal das Script:
Code:
#!/usr/bin/perl
# ======================================================================
#
# ivtv-install.pl
#
# ----------------------------------------------------------------------
#
# This perl-script will build and install the ivtv-kernel-module. It
# downloads the source-code from the version 0.4.6 and the
# firmware. It is developed for Ubuntu but may work also on
# Debian-Systems.
#
# Requirements:
#
# You need to install all necessary packets for building software
# (like gcc, make, ...), also the commandline-tools tar, modprobe,
# rmmod, wegt.
#
# Please run this script as root.
#
# ----------------------------------------------------------------------
#
# (c) 2006 Tobias Hoelterhof, http://www.hoelterhof.name
# License: GPL
#
# Optimized for SUSE-Linux by Samuel Suther , http://www.suther.de
#
# ======================================================================
use Shell qw(tar make uname modprobe rmmod wget rm);
use File::Basename;
# ----------------------------------------------------------------------
# Set some variables - please take a look and validate for your system.
my $build_dir= "/usr/src/packages/SOURCES";
my $tmp_dir= "/tmp";
my $uname= uname('-r');
chomp($uname);
#my $firmware_dir= "/lib/firmware/".$uname;
my $firmware_dir= "/lib/firmware/";
my $url_ivtv= "http://dl.ivtvdriver.org/ivtv/stable/ivtv-0.10.5.tar.gz";
my $url_firmware= "http://dl.ivtvdriver.org/ivtv/firmware/firmware.tar.gz";
# ----------------------------------------------------------------------
my $VERSION= '0.0.1';
# download
mkdir ($tmp_dir."/ivtv-install.pl");
my $ivtv_source= $tmp_dir."/ivtv-install.pl/ivtv-source.tar.gz";
my $firmware_source= $tmp_dir."/ivtv-install.pl/firmware.tar.gz";
wget('-O' => $ivtv_source, $url_ivtv);
wget('-O' => $firmware_source, $url_firmware);
# extract
print "Extracting archive... ";
my ($f)= tar('-tzf', $ivtv_source);
my ($foo, $path)= fileparse($f);
#$build_dir.= '/'.$path;
print $build_dir;
tar('-xzf', $ivtv_source, '-C' => $build_dir);
print "finished.\n";
# build
print "Building... ";
$build_dir.= '/'.$path;
chdir($build_dir);
my @out= make;
if ($?)
{
print "error (code: $?)!\n".join('', @out);
die;
};
print "finished.\n";
# install
print "Installing... ";
my @out= make('install');
if ($?)
{
print "error (code: $?)!\n".join('', @out);
die;
};
print "finished.\n";
# firmware
print "Installing firmware... ";
unless (-d $firmware_dir)
{
print "error ($firmware_dir doesn't exists)!\n";
die;
};
tar('-xzf', $firmware_source, '-C' => $firmware_dir);
print "finished.\n";
# load module
print "Removing old modules... (please ignore error messages) \n";
#modprobe -r ivtv cx25840 tuner tveeprom msp3400 wm8775 tda9887 saa7115 saa7127;
rmmod('ivtv', 'cx25840', 'tuner', 'tveeprom', 'msp3400',
'wm8775', 'tda9887', 'saa7115', 'saa7127');
print "Loading ivtv module... ";
my @out= modprobe('ivtv');
if ($?)
{
print "error (code: $?)!\n ".join('', @out);
die;
};
print "finished.\n";
# remove tmp-files
rm('-rf', $tmp_dir."/ivtv-install.pl");
# a little test
if (-r '/dev/video0')
{
print "\nLooks good: /dev/video0 is readable.\n";
} else {
print
"\nSorry, something went wrong while loading the module. Please\n".
"take a look at your syslog-file.\n";
die;
};