This is a touched up version of the prepare-kernel-sources script included in BT5. The version included in the R0 release doesn't use the proper kernel version and is effectively broken; most users end up doing it manually. Here is my humble contribution to a fix:
Code:#!/bin/bash # Modified by Hobz/Hobbes 16/08/11 function get-version { for f in /usr/src/linux-source-"$(uname -r)"*.tar.bz2 do if [[ -f $f ]] then f="${f#*/usr/src/linux-source-}" VER="${f%*.tar.bz2}" fi done } echo "[*] apt-getting linux-source..." apt-get install linux-source cd /usr/src/ get-version echo "[*] extracting sources (version "$VER"), please wait" tar jxpf linux-source-$VER.tar.bz2 echo "[*] doing stuff..." rm -rf linux ln -s linux-source-$VER linux cd linux zcat /proc/config.gz > .config echo "[*] making stuff..." make scripts make prepare ln -s /usr/src/linux /lib/modules/$VER/build echo "[*] tada!" # Uncomment next two lines to automatically complete the process #cd /usr/src/linux #cp -rf include/generated/* include/linux/



