wok-6.x annotate 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
rev   line source
slaxemulator@6975 1 #!/bin/sh
slaxemulator@6975 2
slaxemulator@6975 3 source /etc/tazwok.conf
slaxemulator@6975 4 VERSION=XXX
slaxemulator@6975 5
slaxemulator@6975 6 url=$(cat /usr/src/linux-$VERSION-slitaz/url)
slaxemulator@6975 7
slaxemulator@6975 8 if [ -f $SOURCES_REPOSITORY/$(basename $url) ]; then
slaxemulator@6975 9 cd /usr/src/
slaxemulator@6975 10 tar xjf $(basename $url)
slaxemulator@6975 11 else
slaxemulator@6975 12 wget -O $SOURCES_REPOSITORY/$(basename $url)
slaxemulator@6975 13 cd /usr/src/
slaxemulator@6975 14 tar xjf $(basename $url)
slaxemulator@6975 15 fi
slaxemulator@6975 16
slaxemulator@6975 17 cp -a /usr/src/kernel-patches/slitaz /usr/src/linux-$VERSION
slaxemulator@6975 18
slaxemulator@6975 19 cp -pa /usr/src/linux-$VERSION/slitaz/aufs2/* /usr/src/linux-$VERSION
slaxemulator@6975 20 # Add tazpkg support
slaxemulator@6975 21 if [ -d "/usr/src/linux-$VERSION/scripts/package" ]; then
slaxemulator@6975 22 cp -pa /usr/src/linux-$VERSION/slitaz/buildtaz /usr/src/linux-$VERSION/scripts/package
slaxemulator@6975 23 cd /usr/src/linux-$VERSION
slaxemulator@6975 24 patch -p1 -i slitaz/make-tazpkg.u
slaxemulator@6975 25 fi
slaxemulator@6975 26
slaxemulator@6975 27 cd /usr/src/linux-$VERSION
slaxemulator@6975 28 while read patch_file; do
slaxemulator@6975 29 echo "Apply $patch_file"
slaxemulator@6975 30 patch -p1 < slitaz/$patch_file
slaxemulator@6975 31 done < slitaz/patches
slaxemulator@6975 32 [ ! -f System.map ] && cp slitaz/config .config &&
slaxemulator@6975 33 make oldconfig && make modules_prepare
slaxemulator@6975 34
slaxemulator@6975 35 cat <<EOT
slaxemulator@6975 36 ----
slaxemulator@6975 37 To modify the kernel configuration:
slaxemulator@6975 38 $ cd /usr/src/linux-$VERSION
slaxemulator@6975 39 $ make menuconfig
slaxemulator@6975 40
slaxemulator@6975 41 To build the kernel and the modules:
slaxemulator@6975 42 $ cd /usr/src/linux-$VERSION
slaxemulator@6975 43 $ make bzImage && make modules
slaxemulator@6975 44
slaxemulator@6975 45 To install the new kernel and the modules:
slaxemulator@6975 46 $ make modules_install
slaxemulator@6975 47 $ cp -a arch/x86/boot/bzImage /boot/vmlinuz-$VERSION-slitaz
slaxemulator@6975 48
slaxemulator@6975 49 To make a Slitaz package with the new kernel and the modules:
slaxemulator@6975 50 $ make tazpkg
slaxemulator@6975 51
slaxemulator@6975 52 See /usr/src/linux-$VERSION-slitaz/README
slaxemulator@6975 53 ----
slaxemulator@6975 54 EOT