aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorlcapriotti <lcapriotti@svn>2010-04-09 14:20:38 +0000
committerlcapriotti <lcapriotti@svn>2010-04-09 14:20:38 +0000
commit766214ce0115bead0609963bee5756c1095b9842 (patch)
treef3dfc2f1ba25607bedac085835be370657fa9aa8 /tools
parent65fdc577cd5ad403b9cb1d253c4b1fab83f31736 (diff)
Initial Lucid support
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@29145 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'tools')
-rwxr-xr-xtools/XBMCLive/SDK/buildHook-intelOnly.sh.lucid-variant25
-rwxr-xr-xtools/XBMCLive/SDK/buildHook-nvidiaOnly.sh.lucid-variant80
-rw-r--r--tools/XBMCLive/SDK/buildLive/Files/binary_grub/grub.cfg.lucid-variant77
-rw-r--r--tools/XBMCLive/SDK/buildLive/Files/chroot_local-hooks/02-setGLDrivers.lucid-variant36
-rw-r--r--tools/XBMCLive/SDK/buildLive/Files/chroot_local-packageslists/packages.list.lucid-variant20
-rwxr-xr-xtools/XBMCLive/SDK/buildLive/mkConfig.sh.lucid-variant2
-rw-r--r--tools/XBMCLive/xbmc-live.conf46
7 files changed, 209 insertions, 77 deletions
diff --git a/tools/XBMCLive/SDK/buildHook-intelOnly.sh.lucid-variant b/tools/XBMCLive/SDK/buildHook-intelOnly.sh.lucid-variant
new file mode 100755
index 0000000000..e8fe0426c1
--- /dev/null
+++ b/tools/XBMCLive/SDK/buildHook-intelOnly.sh.lucid-variant
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# Copyright (C) 2005-2008 Team XBMC
+# http://www.xbmc.org
+#
+# This Program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This Program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with XBMC; see the file COPYING. If not, write to
+# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+# http://www.gnu.org/copyleft/gpl.html
+
+rm $WORKPATH/buildLive/Files/chroot_local-hooks/00-installCrystalHD
+
+cat $WORKPATH/buildLive/Files/chroot_local-packageslists/packages.list | grep -v fglrx | grep -v nvidia-common > $WORKPATH/buildLive/Files/chroot_local-packageslists/packages.list.tmp
+rm $WORKPATH/buildLive/Files/chroot_local-packageslists/packages.list
+mv $WORKPATH/buildLive/Files/chroot_local-packageslists/packages.list.tmp $WORKPATH/buildLive/Files/chroot_local-packageslists/packages.list
diff --git a/tools/XBMCLive/SDK/buildHook-nvidiaOnly.sh.lucid-variant b/tools/XBMCLive/SDK/buildHook-nvidiaOnly.sh.lucid-variant
index a137d82668..017200494f 100755
--- a/tools/XBMCLive/SDK/buildHook-nvidiaOnly.sh.lucid-variant
+++ b/tools/XBMCLive/SDK/buildHook-nvidiaOnly.sh.lucid-variant
@@ -1,59 +1,25 @@
#!/bin/sh
-# Add NVIDIA PPA to sources
-
-echo "deb http://ppa.launchpad.net/nvidia-vdpau/ppa/ubuntu lucid main" > $WORKPATH/buildLive/Files/chroot_sources/nvidia-vdpau.list.chroot
-echo "deb http://ppa.launchpad.net/nvidia-vdpau/ppa/ubuntu lucid main" > $WORKPATH/buildLive/Files/chroot_sources/nvidia-vdpau.list.binary
-
-# Add PPA key
-# Download if not already available
-if [ ! -f $WORKPATH/nvidia-vdpau.gpg ]; then
- wget "http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0x1DABDBB4CEC06767" -O $WORKPATH/nvidia-vdpau.key
- cat $WORKPATH/nvidia-vdpau.key | grep -v "<" > $WORKPATH/nvidia-vdpau.gpg
- rm $WORKPATH/nvidia-vdpau.key
-
- # gpg --keyserver keyserver.ubuntu.com -n --recv-keys 1DABDBB4CEC06767
- # gpg --export --armor 1DABDBB4CEC06767 > $WORKPATH/nvidia-vdpau.gpg
-fi
-
-cp $WORKPATH/nvidia-vdpau.gpg $WORKPATH/buildLive/Files/chroot_sources/nvidia-vdpau.binary.gpg
-cp $WORKPATH/nvidia-vdpau.gpg $WORKPATH/buildLive/Files/chroot_sources/nvidia-vdpau.chroot.gpg
-
-# Add packages
-
-echo "nvidia-glx-190 libvdpau1" > $WORKPATH/buildLive/Files/chroot_local-packageslists/nvidia-vdpau.list
-echo "linux-headers-generic dkms" >> $WORKPATH/buildLive/Files/chroot_local-packageslists/nvidia-vdpau.list
-echo "fakeroot" >> $WORKPATH/buildLive/Files/chroot_local-packageslists/nvidia-vdpau.list
-
-# Remove copy restricted from installer helper
-rm $WORKPATH/buildDEBs/xbmclive-installhelpers/finish-install.d/07copyRestricted
-
-# Remove holding on the kernel
-rm $WORKPATH/buildLive/Files/chroot_local-hooks/01-holdKernel
-
-# Remove unneeded files
-rm $WORKPATH/buildLive/Files/binary_local-includes/live/*.module
-
-# Remove unneeded files
-rm $WORKPATH/buildBinaryDrivers/build-NVIDIA.sh
-rm $WORKPATH/buildBinaryDrivers/build-AMD.sh
-
-rm $WORKPATH/copyFiles-restricted.sh
-
-# Modify menu.lst
-if [ -f $WORKPATH/buildLive/Files/binary_grub/menu.lst ]; then
- sed -i '/## BEGIN AMD ##/,/## END AMD ##/d' $WORKPATH/buildLive/Files/binary_grub/menu.lst
- sed -i '/## BEGIN INTEL ##/,/## END INTEL ##/d' $WORKPATH/buildLive/Files/binary_grub/menu.lst
-fi
-
-# Modify grub.cfg
-if [ -f $WORKPATH/buildLive/Files/binary_grub/menu.lst ]; then
- sed -i '/## BEGIN AMD ##/,/## END AMD ##/d' $WORKPATH/buildLive/Files/binary_grub/menu.lst
- sed -i '/## BEGIN INTEL ##/,/## END INTEL ##/d' $WORKPATH/buildLive/Files/binary_grub/menu.lst
-fi
-
-# Modify syslinux menu
-if [ -f $WORKPATH/buildLive/Files/binary_syslinux/live.cfg ]; then
- sed -i '/## BEGIN AMD ##/,/## END AMD ##/d' $WORKPATH/buildLive/Files/binary_syslinux/live.cfg
- sed -i '/## BEGIN INTEL ##/,/## END INTEL ##/d' $WORKPATH/buildLive/Files/binary_syslinux/live.cfg
-fi
+# Copyright (C) 2005-2008 Team XBMC
+# http://www.xbmc.org
+#
+# This Program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This Program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with XBMC; see the file COPYING. If not, write to
+# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+# http://www.gnu.org/copyleft/gpl.html
+
+rm $WORKPATH/buildLive/Files/chroot_local-hooks/00-installCrystalHD
+
+cat $WORKPATH/buildLive/Files/chroot_local-packageslists/packages.list | grep -v fglrx > $WORKPATH/buildLive/Files/chroot_local-packageslists/packages.list.tmp
+rm $WORKPATH/buildLive/Files/chroot_local-packageslists/packages.list
+mv $WORKPATH/buildLive/Files/chroot_local-packageslists/packages.list.tmp $WORKPATH/buildLive/Files/chroot_local-packageslists/packages.list
diff --git a/tools/XBMCLive/SDK/buildLive/Files/binary_grub/grub.cfg.lucid-variant b/tools/XBMCLive/SDK/buildLive/Files/binary_grub/grub.cfg.lucid-variant
new file mode 100644
index 0000000000..3725d16fb4
--- /dev/null
+++ b/tools/XBMCLive/SDK/buildLive/Files/binary_grub/grub.cfg.lucid-variant
@@ -0,0 +1,77 @@
+set default=0
+set timeout=10
+
+insmod video
+insmod vbe
+insmod font
+insmod gfxterm
+set gfxmode="1280x1024x32;1270x768x32;1270x720x32;1024x768x32;800x600x32;640x480x32;1280x1024;1270x768;1270x720;1024x768;800x600;640x480"
+if loadfont ($root)/boot/grub/unicode.pf2 ; then
+ # set gfxpayload=keep
+ if terminal_output gfxterm ; then true ; else
+ # For backward compatibility with versions of terminal.mod that don't
+ # understand terminal_output
+ terminal gfxterm
+ fi
+fi
+
+insmod tga
+if background_image ($root)/boot/grub/splash.tga ; then
+ set color_normal=white/black
+ set color_highlight=cyan/black
+else
+ set menu_color_normal=cyan/blue
+ set menu_color_highlight=white/blue
+fi
+
+#echo -n "Press ESC to enter the menu... "
+#if sleep --verbose --interruptible 5 ; then
+# set timeout=0
+#else
+# set timeout=-1
+#fi
+
+menuentry "XBMCLive" {
+ set quiet=1
+ linux /live/vmlinuz boot=live xbmc=autostart,tempfs,nodiskmount,setvolume splash quiet loglevel=0 persistent quickreboot quickusbmodules notimezone noaccessibility noapparmor noaptcdrom noautologin noxautologin noconsolekeyboard nofastboot nognomepanel nohosts nokpersonalizer nolanguageselector nolocales nonetworking nopowermanagement noprogramcrashes nojockey nosudo noupdatenotifier nouser nopolkitconf noxautoconfig noxscreensaver nopreseed union=aufs
+ initrd /live/initrd.img
+}
+
+menuentry "XBMCLive, SAFE MODE" {
+ set quiet=1
+ linux /live/vmlinuz boot=live xbmc=tempfs,nodiskmount,setvolume quiet loglevel=0 persistent quickreboot quickusbmodules notimezone noaccessibility noapparmor noaptcdrom noautologin noxautologin noconsolekeyboard nofastboot nognomepanel nohosts nokpersonalizer nolanguageselector nolocales nonetworking nopowermanagement noprogramcrashes nojockey nosudo noupdatenotifier nouser nopolkitconf noxautoconfig noxscreensaver nopreseed union=aufs
+ initrd /live/initrd.img
+}
+
+menuentry " " {
+ set quiet=1
+}
+
+
+## BEGIN INSTALLER ##
+
+menuentry "Install XBMCLive" {
+ set quiet=1
+ set gfxpayload=keep
+ linux /install/vmlinuz vga=normal quiet preseed/file=/cdrom/install/preseed.cfg cdrom-detect/try-usb=true priority=critical --
+ initrd /install/initrd.gz
+}
+
+menuentry " ------ " {
+ set quiet=1
+}
+
+## END INSTALLER ##
+
+menuentry "Boot Operating System on Hard Disk" {
+ insmod ntfs
+ insmod chain
+ insmod drivemap
+ set root=(hd1)
+ drivemap -s (hd1) (hd0)
+ chainloader +1
+}
+
+menuentry "Memory test (memtest86+)" {
+ linux16 /live/memtest
+}
diff --git a/tools/XBMCLive/SDK/buildLive/Files/chroot_local-hooks/02-setGLDrivers.lucid-variant b/tools/XBMCLive/SDK/buildLive/Files/chroot_local-hooks/02-setGLDrivers.lucid-variant
new file mode 100644
index 0000000000..daa08ebe57
--- /dev/null
+++ b/tools/XBMCLive/SDK/buildLive/Files/chroot_local-hooks/02-setGLDrivers.lucid-variant
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+# Copyright (C) 2005-2008 Team XBMC
+# http://www.xbmc.org
+#
+# This Program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This Program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with XBMC; see the file COPYING. If not, write to
+# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+# http://www.gnu.org/copyleft/gpl.html
+
+#
+
+# Set Intel by default
+update-alternatives --set gl_conf /usr/lib/mesa/ld.so.conf
+ldconfig
+
+# let's make plymouth happy
+echo "blacklist radeon" > /etc/modprobe.d/blacklist-amd.conf
+
+echo "blacklist nouveau" > /etc/modprobe.d/blacklist-nvidia.conf
+echo "blacklist lbm-nouveau" >> /etc/modprobe.d/blacklist-nvidia.conf
+echo "blacklist nvidia-96" >> /etc/modprobe.d/blacklist-nvidia.conf
+echo "blacklist nvidia-173" >> /etc/modprobe.d/blacklist-nvidia.conf
+echo "alias nvidia nvidia-current" >> /etc/modprobe.d/blacklist-nvidia.conf
+
+update-initramfs -u
diff --git a/tools/XBMCLive/SDK/buildLive/Files/chroot_local-packageslists/packages.list.lucid-variant b/tools/XBMCLive/SDK/buildLive/Files/chroot_local-packageslists/packages.list.lucid-variant
index bd94bbfd23..ca086f5f87 100644
--- a/tools/XBMCLive/SDK/buildLive/Files/chroot_local-packageslists/packages.list.lucid-variant
+++ b/tools/XBMCLive/SDK/buildLive/Files/chroot_local-packageslists/packages.list.lucid-variant
@@ -5,20 +5,24 @@ bzip2 locales ntfs-3g dosfstools unzip curl
acpi acpi-support
alsa-utils hal lirc pm-utils psmisc
fakeroot
-grub
+grub-pc
xorg xinit fluxbox
mesa-utils libgl1-mesa-dri xlibmesa-glu
genext2fs
cpufrequtils
hts-tvheadend
+policykit-1
+upower
+udisks
+python-software-properties
+plymouth
+plymouth-theme-ubuntu-text
+plymouth-theme-ubuntu-logo
+parted
xbmc-ppa-keyring
python-apt
-parted
xbmc-live
xbmc
-libgtk2.0-0
-policykit-1
-devicekit-power
-devicekit-disks
-python-software-properties
-plymouth
+g++ autoconf
+fglrx fglrx-amdcccle xorg-driver-fglrx
+nvidia-current libvdpau1
diff --git a/tools/XBMCLive/SDK/buildLive/mkConfig.sh.lucid-variant b/tools/XBMCLive/SDK/buildLive/mkConfig.sh.lucid-variant
index e00f680c55..3db366ed69 100755
--- a/tools/XBMCLive/SDK/buildLive/mkConfig.sh.lucid-variant
+++ b/tools/XBMCLive/SDK/buildLive/mkConfig.sh.lucid-variant
@@ -33,7 +33,7 @@ makeConfig()
configString="$configString --iso-volume XBMC_Live"
configString="$configString --iso-publisher http://xbmc.org"
- configString="$configString --bootloader grub"
+ configString="$configString --bootloader grub2"
configString="$configString --debian-installer live"
configString="$configString --debian-installer-preseedfile preseed.cfg"
diff --git a/tools/XBMCLive/xbmc-live.conf b/tools/XBMCLive/xbmc-live.conf
index 83e535d719..390cc0e1ff 100644
--- a/tools/XBMCLive/xbmc-live.conf
+++ b/tools/XBMCLive/xbmc-live.conf
@@ -23,8 +23,7 @@
description "XBMCLive"
author "Luigi Capriotti"
-start on (filesystem and started hal)
-# and stopped udevtrigger)
+start on (filesystem and stopped udevtrigger)
stop on runlevel [06]
@@ -63,24 +62,49 @@ pre-start script
sh $hook
done
+
+ # Identify Ubuntu release
+ LSBRELEASE="$(lsb_release -r | cut -f2 | sed 's/\.//')"
+
+ # Identify GPU, Intel by default
+ GPUTYPE="INTEL"
+
+ GPU=$(lspci -nn | grep 0300)
+ # 10de == NVIDIA
+ if [ "$(echo $GPU | grep 10de)" ]; then
+ GPUTYPE="NVIDIA"
+ else
+ # 1002 == AMD
+ if [ "$(echo $GPU | grep 1002)" ]; then
+ GPUTYPE="AMD"
+ fi
+ fi
+
# Generates valid xorg.conf for proprietary drivers if missing
if [ ! -e /etc/X11/xorg.conf ] && ! grep -q -i nogenxconf /tmp/xbmcliveParams ; then
- GPU=$(lspci -nn | grep 0300)
-
- # 10de == NVIDIA
- if [ ! "$(echo $GPU | grep 10de)" ]; then
- # 1002 == AMD
- if [ "$(echo $GPU | grep 1002)" ]; then
- # run aticonfig
- /usr/bin/aticonfig --initial --sync-vsync=on -f
+ if [ "$GPUTYPE" = "NVIDIA" ]; then
+ if [ $LSBRELEASE -gt 910 ]; then
+ # only on lucid!
+ update-alternatives --set gl_conf /usr/lib/nvidia-current/ld.so.conf
+ ldconfig
fi
- else
+
# run nvidia-xconfig
/usr/bin/nvidia-xconfig -s --no-logo --no-composite --no-dynamic-twinview --force-generate
# Disable scaling to make sure the gpu does not loose performance
sed -i -e 's%Section \"Screen\"%&\n Option \"FlatPanelProperties\" \"Scaling = Native\"\n Option \"HWCursor\" \"Off\"%' /etc/X11/xorg.conf
fi
+ if [ "$GPUTYPE" = "AMD" ]; then
+ if [ $LSBRELEASE -gt 910 ]; then
+ # only on lucid!
+ update-alternatives --set gl_conf /usr/lib/fglrx/ld.so.conf
+ ldconfig
+ fi
+
+ # run aticonfig
+ /usr/bin/aticonfig --initial --sync-vsync=on -f
+ fi
fi
# Write fstab entries for ramdisks