wok annotate linux-source/stuff/get-linux-source @ rev 11716
added tintin.desktop and icon
author | Samuel Trassare <samuel_trassare@yahoo.com> |
---|---|
date | Sun Feb 19 14:12:04 2012 -0800 (2012-02-19) |
parents | 14a02389406d |
children | 181077a51c57 |
rev | line source |
---|---|
slaxemulator@6975 | 1 #!/bin/sh |
slaxemulator@6975 | 2 |
gokhlayeh@9232 | 3 |
gokhlayeh@9232 | 4 source /etc/slitaz/slitaz.conf |
gokhlayeh@9232 | 5 SOURCES_REPOSITORY=$SLITAZ_DIR/$SLITAZ_VERSION/src |
slaxemulator@6975 | 6 VERSION=XXX |
slaxemulator@6975 | 7 |
slaxemulator@7111 | 8 url=$(cat /usr/src/kernel-patches/slitaz/url) |
pascal@11281 | 9 for i in http://linux-kernel.uio.no/pub http://www.gtlib.gatech.edu/pub/kernel.org http://www.kernel.org/pub ; do |
pascal@11281 | 10 busybox wget -s $url && break |
pascal@11281 | 11 url=$(echo $url | sed "s|.*/linux/kernel|$i/linux/kernel|") |
pascal@11281 | 12 done |
slaxemulator@6975 | 13 |
slaxemulator@7110 | 14 if [ ! -d $SOURCES_REPOSITORY ]; then |
slaxemulator@7110 | 15 mkdir -p $SOURCES_REPOSITORY |
slaxemulator@7110 | 16 fi |
slaxemulator@7110 | 17 |
gokhlayeh@9232 | 18 cd /usr/src/ |
gokhlayeh@9232 | 19 if [ -f $SOURCE_REPOSITORY/$(basename ${url//bz2/lzma}) ]; then |
gokhlayeh@9232 | 20 unlzma -c $SOURCES_REPOSITORY/$(basename ${url//bz2/lzma}) | tar xf - -C $PWD |
gokhlayeh@9232 | 21 elif [ -f $SOURCES_REPOSITORY/$(basename $url) ]; then |
slaxemulator@7131 | 22 tar xjf $SOURCES_REPOSITORY/$(basename $url) |
slaxemulator@6975 | 23 else |
slaxemulator@7110 | 24 wget -O $SOURCES_REPOSITORY/$(basename $url) -c $url |
slaxemulator@7131 | 25 tar xjf $SOURCES_REPOSITORY/$(basename $url) |
slaxemulator@6975 | 26 fi |
slaxemulator@6975 | 27 |
slaxemulator@6975 | 28 cp -a /usr/src/kernel-patches/slitaz /usr/src/linux-$VERSION |
slaxemulator@7206 | 29 if [ -d /usr/src/linux-$VERSION/slitaz/aufs2 ]; then |
slaxemulator@7111 | 30 cp -pa /usr/src/linux-$VERSION/slitaz/aufs2/* /usr/src/linux-$VERSION |
slaxemulator@7111 | 31 fi |
slaxemulator@6975 | 32 |
slaxemulator@6975 | 33 # Add tazpkg support |
slaxemulator@6975 | 34 if [ -d "/usr/src/linux-$VERSION/scripts/package" ]; then |
slaxemulator@6975 | 35 cp -pa /usr/src/linux-$VERSION/slitaz/buildtaz /usr/src/linux-$VERSION/scripts/package |
slaxemulator@6975 | 36 cd /usr/src/linux-$VERSION |
slaxemulator@6975 | 37 patch -p1 -i slitaz/make-tazpkg.u |
slaxemulator@6975 | 38 fi |
slaxemulator@6975 | 39 |
slaxemulator@6975 | 40 cd /usr/src/linux-$VERSION |
slaxemulator@6975 | 41 while read patch_file; do |
slaxemulator@6975 | 42 echo "Apply $patch_file" |
slaxemulator@6975 | 43 patch -p1 < slitaz/$patch_file |
slaxemulator@6975 | 44 done < slitaz/patches |
slaxemulator@6975 | 45 [ ! -f System.map ] && cp slitaz/config .config && |
slaxemulator@6975 | 46 make oldconfig && make modules_prepare |
pascal@10950 | 47 ln -s /usr/src/linux-$VERSION /lib/modules/$VERSION-slitaz/build |
pascal@10950 | 48 ln -s linux-$VERSION /usr/src/linux |
slaxemulator@6975 | 49 |
slaxemulator@6975 | 50 cat <<EOT |
slaxemulator@6975 | 51 ---- |
slaxemulator@6975 | 52 To modify the kernel configuration: |
slaxemulator@6975 | 53 $ cd /usr/src/linux-$VERSION |
slaxemulator@6975 | 54 $ make menuconfig |
slaxemulator@6975 | 55 |
slaxemulator@6975 | 56 To build the kernel and the modules: |
slaxemulator@6975 | 57 $ cd /usr/src/linux-$VERSION |
slaxemulator@6975 | 58 $ make bzImage && make modules |
slaxemulator@6975 | 59 |
slaxemulator@6975 | 60 To install the new kernel and the modules: |
slaxemulator@6975 | 61 $ make modules_install |
slaxemulator@6975 | 62 $ cp -a arch/x86/boot/bzImage /boot/vmlinuz-$VERSION-slitaz |
slaxemulator@6975 | 63 |
slaxemulator@6975 | 64 To make a Slitaz package with the new kernel and the modules: |
slaxemulator@6975 | 65 $ make tazpkg |
slaxemulator@6975 | 66 |
slaxemulator@6977 | 67 See /usr/src/linux-$VERSION/README |
slaxemulator@6975 | 68 ---- |
gokhlayeh@9232 | 69 EOT |