wok diff linux-source/stuff/get-linux-source @ rev 6975

Fixed linux-source. Instead of auto downloading kernel source in post_install i added that code into a script called get-linux-source. All patches are also in /usr/src/kernel-patches now.
author Christopher Rogers <slaxemulator@gmail.com>
date Thu Oct 28 04:58:29 2010 +0000 (2010-10-28)
parents
children 897eb75a6923
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/linux-source/stuff/get-linux-source	Thu Oct 28 04:58:29 2010 +0000
     1.3 @@ -0,0 +1,54 @@
     1.4 +#!/bin/sh
     1.5 +
     1.6 +source /etc/tazwok.conf
     1.7 +VERSION=XXX
     1.8 +
     1.9 +url=$(cat /usr/src/linux-$VERSION-slitaz/url)
    1.10 +
    1.11 +if [ -f $SOURCES_REPOSITORY/$(basename $url) ]; then
    1.12 +	cd /usr/src/
    1.13 +	tar xjf $(basename $url)
    1.14 +else
    1.15 +	wget -O $SOURCES_REPOSITORY/$(basename $url) 
    1.16 +	cd /usr/src/
    1.17 +	tar xjf $(basename $url)
    1.18 +fi
    1.19 +
    1.20 +cp -a /usr/src/kernel-patches/slitaz /usr/src/linux-$VERSION
    1.21 +
    1.22 +cp -pa /usr/src/linux-$VERSION/slitaz/aufs2/* /usr/src/linux-$VERSION
    1.23 +# Add tazpkg support
    1.24 +if [ -d "/usr/src/linux-$VERSION/scripts/package" ]; then
    1.25 +	cp -pa /usr/src/linux-$VERSION/slitaz/buildtaz /usr/src/linux-$VERSION/scripts/package
    1.26 +	cd /usr/src/linux-$VERSION
    1.27 +	patch -p1 -i slitaz/make-tazpkg.u
    1.28 +fi
    1.29 +
    1.30 +cd /usr/src/linux-$VERSION
    1.31 +while read patch_file; do
    1.32 +	echo "Apply $patch_file"
    1.33 +	patch -p1 < slitaz/$patch_file
    1.34 +done < slitaz/patches
    1.35 +[ ! -f System.map ] && cp slitaz/config .config &&
    1.36 +make oldconfig && make modules_prepare
    1.37 +
    1.38 +	cat <<EOT
    1.39 +----
    1.40 +To modify the kernel configuration:
    1.41 +$ cd /usr/src/linux-$VERSION
    1.42 +$ make menuconfig
    1.43 +
    1.44 +To build the kernel and the modules:
    1.45 +$ cd /usr/src/linux-$VERSION
    1.46 +$ make bzImage && make modules
    1.47 +
    1.48 +To install the new kernel and the modules:
    1.49 +$ make modules_install
    1.50 +$ cp -a arch/x86/boot/bzImage /boot/vmlinuz-$VERSION-slitaz
    1.51 +
    1.52 +To make a Slitaz package with the new kernel and the modules:
    1.53 +$ make tazpkg
    1.54 +
    1.55 +See /usr/src/linux-$VERSION-slitaz/README
    1.56 +----
    1.57 +EOT
    1.58 \ No newline at end of file