diff options
-rwxr-xr-x | tools/XBMCLive/SDK/build.sh | 22 | ||||
-rwxr-xr-x | tools/XBMCLive/SDK/buildBinaryDrivers/build.sh | 25 | ||||
-rw-r--r-- | tools/XBMCLive/SDK/buildNvidiaOnly.sh | 8 | ||||
-rw-r--r-- | tools/XBMCLive/SDK/buildWithXbmcSvn.sh | 7 | ||||
-rw-r--r-- | tools/XBMCLive/SDK/nvidiaOnlyHook.sh | 68 |
5 files changed, 115 insertions, 15 deletions
diff --git a/tools/XBMCLive/SDK/build.sh b/tools/XBMCLive/SDK/build.sh index 5231ecb3d2..c030566758 100755 --- a/tools/XBMCLive/SDK/build.sh +++ b/tools/XBMCLive/SDK/build.sh @@ -63,6 +63,14 @@ if ! which lh > /dev/null ; then cd $THISDIR fi + +# Execute hook if env variable is defined +if [ -n "$SDK_BUILDHOOK" ]; then + if [ -f $SDK_BUILDHOOK ]; then + $SDK_BUILDHOOK + fi +fi + # # Build needed packages # @@ -88,7 +96,6 @@ cd $THISDIR # mkdir -p $WORKPATH/buildLive/Files/chroot_local-packages &> /dev/null mkdir -p $WORKPATH/buildLive/Files/binary_local-udebs &> /dev/null -mkdir -p $WORKPATH/buildLive/Files/binary_local-includes/live/restrictedDrivers &> /dev/null mkdir -p $WORKPATH/buildLive/Files/chroot_local-includes/root &> /dev/null if ! ls $WORKPATH/buildDEBs/live-initramfs*.* > /dev/null 2>&1; then @@ -115,11 +122,16 @@ if ! ls $WORKPATH/buildDEBs/xbmclive-installhelpers*.* > /dev/null 2>&1; then fi cp $WORKPATH/buildDEBs/xbmclive-installhelpers*.* $WORKPATH/buildLive/Files/binary_local-udebs -if ! ls $WORKPATH/buildBinaryDrivers/*.ext3 > /dev/null 2>&1; then - echo "Files missing (5), exiting..." - exit 1 + +if [ -z "$DONOTBUILDRESTRICTEDDRIVERS" ]; then + mkdir -p $WORKPATH/buildLive/Files/binary_local-includes/live/restrictedDrivers &> /dev/null + + if ! ls $WORKPATH/buildBinaryDrivers/*.ext3 > /dev/null 2>&1; then + echo "Files missing (5), exiting..." + exit 1 + fi + cp $WORKPATH/buildBinaryDrivers/*.ext3 $WORKPATH/buildLive/Files/binary_local-includes/live/restrictedDrivers fi -cp $WORKPATH/buildBinaryDrivers/*.ext3 $WORKPATH/buildLive/Files/binary_local-includes/live/restrictedDrivers if ! ls $WORKPATH/buildBinaryDrivers/crystalhd.tar > /dev/null 2>&1; then echo "Files missing (6), exiting..." diff --git a/tools/XBMCLive/SDK/buildBinaryDrivers/build.sh b/tools/XBMCLive/SDK/buildBinaryDrivers/build.sh index 26c06f9eb2..17a85c3bb8 100755 --- a/tools/XBMCLive/SDK/buildBinaryDrivers/build.sh +++ b/tools/XBMCLive/SDK/buildBinaryDrivers/build.sh @@ -43,16 +43,21 @@ else mv crystalhd-HEAD.tar.gz Files/chroot_local-includes/root fi -if [ -z "$(ls NVIDIA*.run)" ]; then - getNVIDIAInstaller +if [ -z "$DONOTBUILDRESTRICTEDDRIVERS" ]; then + if ! ls NVIDIA*.run > /dev/null 2>&1 ; then + getNVIDIAInstaller + else + mv NVIDIA*.run Files/chroot_local-includes/root + fi + + if ! ls ati*.run > /dev/null 2>&1 ; then + getAMDInstaller + else + mv ati*.run Files/chroot_local-includes/root + fi else - mv NVIDIA*.run Files/chroot_local-includes/root -fi - -if [ -z "$(ls ati*.run)" ]; then - getAMDInstaller -else - mv ati*.run Files/chroot_local-includes/root + rm Files/chroot_local-hooks/20-buildAMD.sh + rm Files/chroot_local-hooks/30-buildNVIDIA.sh fi @@ -70,5 +75,5 @@ makeConfig build # Get files from chroot -cp $WORKDIR/chroot/tmp/*.ext3 . +cp $WORKDIR/chroot/tmp/*.ext3 . &> /dev/null cp $WORKDIR/chroot/tmp/crystalhd.tar . diff --git a/tools/XBMCLive/SDK/buildNvidiaOnly.sh b/tools/XBMCLive/SDK/buildNvidiaOnly.sh new file mode 100644 index 0000000000..0bb91af34e --- /dev/null +++ b/tools/XBMCLive/SDK/buildNvidiaOnly.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +export SDK_BUILDHOOK=nvidiaOnlyHook.sh +export DONOTBUILDRESTRICTEDDRIVERS=1 + +# Use one of these two +# ./buildWithProxy.sh +./build.sh diff --git a/tools/XBMCLive/SDK/buildWithXbmcSvn.sh b/tools/XBMCLive/SDK/buildWithXbmcSvn.sh new file mode 100644 index 0000000000..29237ea897 --- /dev/null +++ b/tools/XBMCLive/SDK/buildWithXbmcSvn.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +export SDK_BUILDHOOK=xbmcSvnHook.sh + +# Use one of these two +# ./buildWithProxy.sh +./build.sh diff --git a/tools/XBMCLive/SDK/nvidiaOnlyHook.sh b/tools/XBMCLive/SDK/nvidiaOnlyHook.sh new file mode 100644 index 0000000000..a42d2b7dd8 --- /dev/null +++ b/tools/XBMCLive/SDK/nvidiaOnlyHook.sh @@ -0,0 +1,68 @@ +#!/bin/sh + +# Add NVIDIA PPA to sources + +echo "deb http://ppa.launchpad.net/nvidia-vdpau/ppa/ubuntu karmic main" > buildLive/Files/chroot_sources/nvidia-vdpau.list.chroot +echo "deb http://ppa.launchpad.net/nvidia-vdpau/ppa/ubuntu karmic main" > buildLive/Files/chroot_sources/nvidia-vdpau.list.binary + +# Add PPA key +if [ ! -f nvidia-vdpau.key ]; then + # get key from launchpad + +fi +cp nvidia-vdpau.key buildLive/Files/chroot_sources/nvidia-vdpau.chroot.gpg +cp nvidia-vdpau.key buildLive/Files/chroot_sources/nvidia-vdpau.binary.gpg + +# Add packages + +echo "nvidia-glx-190" > buildLive/Files/chroot_local-packageslists/nvidia-vdpau.list +echo "linux-headers-generic dkms" >> buildLive/Files/chroot_local-packageslists/nvidia-vdpau.list +echo 'fakeroot' >> buildLive/Files/chroot_local-packageslists/nvidia-vdpau.list + +# Remove copy restricted from installer helper +rm buildDEBs/xbmclive-installhelpers/finish-install.d/07copyRestricted + +# Modify menu.lst +# TODO mangle the existing one instead of creating a new one +# +cat > buildLive/Files/binary_grub/menu.lst << 'EOF' +default 0 +timeout 10 + +foreground eeeeee +background 333333 + +splashimage=/boot/grub/splash.xpm.gz + + +title XBMCLive +kernel /live/vmlinuz boot=live vga=788 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 +quiet +boot + +title XBMCLive - SAFE MODE +kernel /live/vmlinuz boot=live vga=788 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 +quiet +boot + +title --- +root + +title Boot Operating System on Hard Disk +root (hd0) +savedefault +makeactive +chainloader +1 +quiet +boot + +title Memory test (memtest86+) +kernel /live/memtest +quiet +boot +EOF + +# Remove unneeded files +rm buildLive/Files/binary_local-includes/live/*.module |