2011-07-14 22:05:05 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# PLEASE READ:
|
|
|
|
# This script recompiles all the kernel-dependent video drivers for
|
|
|
|
# every currently supported kernel. You can use this script when
|
|
|
|
# you bump kernels or xorg-server.
|
|
|
|
|
2011-10-25 15:32:44 +02:00
|
|
|
. /sabayon/bin/kernels.inc
|
|
|
|
|
2014-11-02 09:42:47 +01:00
|
|
|
packages="=x11-drivers/nvidia-drivers-173* =x11-drivers/nvidia-drivers-304* =x11-drivers/nvidia-drivers-313*"
|
2011-08-25 12:35:27 +02:00
|
|
|
non_injected_packages="x11-drivers/nvidia-drivers x11-drivers/ati-drivers x11-drivers/xf86-video-virtualbox"
|
2011-07-14 22:05:05 +02:00
|
|
|
general_purpose_packages="media-video/amdcccle"
|
|
|
|
ETP_REPO="${ETP_REPO:-sabayon-limbo}"
|
|
|
|
|
|
|
|
for kernel in $kernels; do
|
|
|
|
mypackages="${packages}"
|
|
|
|
if [ "${kernel}" != "${running_kernel}" ]; then
|
|
|
|
mypackages="${mypackages} ${non_injected_packages}"
|
|
|
|
fi
|
|
|
|
# build for latest kernel
|
|
|
|
rm -rf /usr/portage/packages/x11-drivers/*
|
|
|
|
KERNEL_DIR="/usr/src/linux-${kernel}" emerge -B ${mypackages} || exit 1
|
2011-10-20 17:06:17 +02:00
|
|
|
eit inject --to ${ETP_REPO} /usr/portage/packages/x11-drivers/*
|
2011-07-14 22:05:05 +02:00
|
|
|
echo
|
|
|
|
done
|
|
|
|
|
|
|
|
# Workout drivers for the running kernel, those non injected
|
|
|
|
eselect kernel set "linux-${running_kernel}" || exit 1
|
|
|
|
emerge ${non_injected_packages} ${general_purpose_packages} || exit 1
|
|
|
|
echo -5 | etc-update
|
2011-08-25 12:35:27 +02:00
|
|
|
eit add ${non_injected_packages} ${general_purpose_packages} || exit 1
|
2011-07-14 22:05:05 +02:00
|
|
|
|
|
|
|
echo "Now you should remove old packages, if you want of course"
|