Skip to content
Snippets Groups Projects
Commit bf845f5c authored by Lior Spach's avatar Lior Spach
Browse files

le-pregao-712010: Refs #1280, Better performance of building and installing


Signed-off-by: default avatarLior Spach <ls12@inf.ufpr.br>
parent e3f5b4cf
No related branches found
No related tags found
No related merge requests found
...@@ -23,11 +23,16 @@ ...@@ -23,11 +23,16 @@
PACKAGE_NAME="lepregao712010" PACKAGE_NAME="lepregao712010"
PACKAGE_VERSION="2.3.0.0-Alpha-v2" PACKAGE_VERSION="2.3.0.0-Alpha-v2"
KERNEL_VERSION="$(uname -r)" KERNEL_VERSION="$(uname -r)"
ALL_KERNEL_VERSION="$(dpkg --get-selections | egrep '^linux-image.*generic-pae.*install$' | awk '{print $1}' | cut --bytes=13-)"
# Put conflicting modules at /etc/modprobe.d/blacklist.conf # Put conflicting modules at /etc/modprobe.d/blacklist.conf
echo "# replaced by rt3562sta" >> /etc/modprobe.d/blacklist.conf echo "# replaced by rt3562sta" >> /etc/modprobe.d/blacklist.conf
echo "blacklist rt2800pci" >> /etc/modprobe.d/blacklist.conf echo "blacklist rt2800pci" >> /etc/modprobe.d/blacklist.conf
# Put conflicting modules at /etc/modprobe.d/blacklist.conf
echo "# enable wireless for pregao 71/2010" >> /etc/modules
echo "rt3562sta" >> /etc/modules
# Function to set selections # Function to set selections
setselections() { setselections() {
selfile=$1 selfile=$1
...@@ -41,14 +46,19 @@ setselections() { ...@@ -41,14 +46,19 @@ setselections() {
# Hold Kernel # Hold Kernel
sels=$(mktemp) sels=$(mktemp)
auxfile=$(mktemp) auxfile=$(mktemp)
dpkg --get-selections \* > ${sels} dpkg --get-selections > ${sels}
awk '{if (($1 ~ /^linux-image-generic-pae/) || ($1 ~ /^linux-headers-generic-pae/)) {print $1"\thold"} else { print $0} }' ${sels} >\ awk '{if (($1 ~ /^linux-image-generic-pae/) || ($1 ~ /^linux-headers-generic-pae/)) {print $1"\thold"} else { print $0} }' ${sels} >\
${auxfile} ${auxfile}
rm -f ${sels} rm -f ${sels}
setselections ${auxfile} & disown setselections ${auxfile} & disown
echo "Building module for all installed kernels using dkms..." echo "Building and Installing module for each installed kernel using dkms..."
/usr/lib/dkms/common.postinst $PACKAGE_NAME $PACKAGE_VERSION dkms add -m $PACKAGE_NAME -v $PACKAGE_VERSION
for EACH_KERNEL in $ALL_KERNEL_VERSION
do
dkms build -m $PACKAGE_NAME -v $PACKAGE_VERSION -k $EACH_KERNEL
dkms install -m $PACKAGE_NAME -v $PACKAGE_VERSION -k $EACH_KERNEL
done
echo "Loading module rt3562sta" echo "Loading module rt3562sta"
modprobe rt3562sta || true modprobe rt3562sta || true
......
...@@ -20,12 +20,21 @@ ...@@ -20,12 +20,21 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA. # USA.
if [[ "$1" = "upgrade" ]]; then
exit 0
fi
# TODO: remove lines instead of changing them to "blank"
# removing conflicting modules from blacklist # removing conflicting modules from blacklist
sed -i s/'# replaced by rt3562sta'/''/ /etc/modprobe.d/blacklist.conf sed -i s/'# replaced by rt3562sta'/''/ /etc/modprobe.d/blacklist.conf
sed -i s/'blacklist rt2800pci'/''/ /etc/modprobe.d/blacklist.conf sed -i s/'blacklist rt2800pci'/''/ /etc/modprobe.d/blacklist.conf
echo "Running depmod..." # removing wireless entries from modules file
/sbin/depmod -a 2.6.32-29-generic-pae sed -i s/'# enable wireless for pregao 71/2010'/''/ /etc/modules
sed -i s/'rt3562sta'/''/ /etc/modules
echo "Removing wireless module from dkms tree..."
dkms remove -m lepregao712010 -v 2.3.0.0-Alpha-v2 --all
echo "Restarting network interfaces" echo "Restarting network interfaces"
/etc/init.d/networking restart || true /etc/init.d/networking restart || true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment