wok annotate linux-source/stuff/get-linux-source @ rev 7131
Up: linux to 2.6.36. Added fixes for aufs to compile.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Fri Nov 05 15:48:33 2010 +0000 (2010-11-05) |
parents | ece2283751f8 |
children | 7170691b1d0e |
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@7111 | 6 url=$(cat /usr/src/kernel-patches/slitaz/url) |
slaxemulator@6975 | 7 |
slaxemulator@7110 | 8 if [ ! -d $SOURCES_REPOSITORY ]; then |
slaxemulator@7110 | 9 mkdir -p $SOURCES_REPOSITORY |
slaxemulator@7110 | 10 fi |
slaxemulator@7110 | 11 |
slaxemulator@6975 | 12 if [ -f $SOURCES_REPOSITORY/$(basename $url) ]; then |
slaxemulator@6975 | 13 cd /usr/src/ |
slaxemulator@7131 | 14 tar xjf $SOURCES_REPOSITORY/$(basename $url) |
slaxemulator@6975 | 15 else |
slaxemulator@7110 | 16 wget -O $SOURCES_REPOSITORY/$(basename $url) -c $url |
slaxemulator@6975 | 17 cd /usr/src/ |
slaxemulator@7131 | 18 tar xjf $SOURCES_REPOSITORY/$(basename $url) |
slaxemulator@6975 | 19 fi |
slaxemulator@6975 | 20 |
slaxemulator@6975 | 21 cp -a /usr/src/kernel-patches/slitaz /usr/src/linux-$VERSION |
slaxemulator@7111 | 22 if [ -d /usr/src/linux-$VERSION/sltiaz/aufs2 ]; then |
slaxemulator@7111 | 23 cp -pa /usr/src/linux-$VERSION/slitaz/aufs2/* /usr/src/linux-$VERSION |
slaxemulator@7111 | 24 fi |
slaxemulator@6975 | 25 |
slaxemulator@6975 | 26 # Add tazpkg support |
slaxemulator@6975 | 27 if [ -d "/usr/src/linux-$VERSION/scripts/package" ]; then |
slaxemulator@6975 | 28 cp -pa /usr/src/linux-$VERSION/slitaz/buildtaz /usr/src/linux-$VERSION/scripts/package |
slaxemulator@6975 | 29 cd /usr/src/linux-$VERSION |
slaxemulator@6975 | 30 patch -p1 -i slitaz/make-tazpkg.u |
slaxemulator@6975 | 31 fi |
slaxemulator@6975 | 32 |
slaxemulator@6975 | 33 cd /usr/src/linux-$VERSION |
slaxemulator@6975 | 34 while read patch_file; do |
slaxemulator@6975 | 35 echo "Apply $patch_file" |
slaxemulator@6975 | 36 patch -p1 < slitaz/$patch_file |
slaxemulator@6975 | 37 done < slitaz/patches |
slaxemulator@6975 | 38 [ ! -f System.map ] && cp slitaz/config .config && |
slaxemulator@6975 | 39 make oldconfig && make modules_prepare |
slaxemulator@6975 | 40 |
slaxemulator@6975 | 41 cat <<EOT |
slaxemulator@6975 | 42 ---- |
slaxemulator@6975 | 43 To modify the kernel configuration: |
slaxemulator@6975 | 44 $ cd /usr/src/linux-$VERSION |
slaxemulator@6975 | 45 $ make menuconfig |
slaxemulator@6975 | 46 |
slaxemulator@6975 | 47 To build the kernel and the modules: |
slaxemulator@6975 | 48 $ cd /usr/src/linux-$VERSION |
slaxemulator@6975 | 49 $ make bzImage && make modules |
slaxemulator@6975 | 50 |
slaxemulator@6975 | 51 To install the new kernel and the modules: |
slaxemulator@6975 | 52 $ make modules_install |
slaxemulator@6975 | 53 $ cp -a arch/x86/boot/bzImage /boot/vmlinuz-$VERSION-slitaz |
slaxemulator@6975 | 54 |
slaxemulator@6975 | 55 To make a Slitaz package with the new kernel and the modules: |
slaxemulator@6975 | 56 $ make tazpkg |
slaxemulator@6975 | 57 |
slaxemulator@6977 | 58 See /usr/src/linux-$VERSION/README |
slaxemulator@6975 | 59 ---- |
slaxemulator@6975 | 60 EOT |