wok annotate linux-source/stuff/get-linux-source @ rev 21749
updated quilt (0.64 -> 0.66)
author | Hans-G?nter Theisgen |
---|---|
date | Fri Jun 14 17:38:01 2019 +0100 (2019-06-14) |
parents | db5b03f42dd9 |
children |
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 |
pascal@14244 | 8 url=$(cat /usr/src/kernel-patches/slitaz/url | sed "s/-${VERSION:0:3}.tar/-$VERSION.tar/") |
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 |
mojo@19647 | 10 busybox wget --spider $url && break |
pascal@11281 | 11 url=$(echo $url | sed "s|.*/linux/kernel|$i/linux/kernel|") |
pascal@11281 | 12 done |
slaxemulator@6975 | 13 |
pascal@15185 | 14 mirror_src=http://mirror.slitaz.org/sources/packages-$(cat /etc/slitaz-release) |
mojo@19647 | 15 busybox wget --spider $url || url=$mirror_src/l/$(basename $url) |
pascal@15185 | 16 |
slaxemulator@7110 | 17 if [ ! -d $SOURCES_REPOSITORY ]; then |
slaxemulator@7110 | 18 mkdir -p $SOURCES_REPOSITORY |
slaxemulator@7110 | 19 fi |
slaxemulator@7110 | 20 |
gokhlayeh@9232 | 21 cd /usr/src/ |
gokhlayeh@9232 | 22 if [ -f $SOURCE_REPOSITORY/$(basename ${url//bz2/lzma}) ]; then |
gokhlayeh@9232 | 23 unlzma -c $SOURCES_REPOSITORY/$(basename ${url//bz2/lzma}) | tar xf - -C $PWD |
gokhlayeh@9232 | 24 elif [ -f $SOURCES_REPOSITORY/$(basename $url) ]; then |
admin@13676 | 25 tar xf $SOURCES_REPOSITORY/$(basename $url) |
slaxemulator@6975 | 26 else |
slaxemulator@7110 | 27 wget -O $SOURCES_REPOSITORY/$(basename $url) -c $url |
pascal@14566 | 28 tar xf $SOURCES_REPOSITORY/$(basename $url) |
slaxemulator@6975 | 29 fi |
slaxemulator@6975 | 30 |
slaxemulator@6975 | 31 cp -a /usr/src/kernel-patches/slitaz /usr/src/linux-$VERSION |
slaxemulator@7206 | 32 if [ -d /usr/src/linux-$VERSION/slitaz/aufs2 ]; then |
slaxemulator@7111 | 33 cp -pa /usr/src/linux-$VERSION/slitaz/aufs2/* /usr/src/linux-$VERSION |
slaxemulator@7111 | 34 fi |
slaxemulator@6975 | 35 |
slaxemulator@6975 | 36 # Add tazpkg support |
slaxemulator@6975 | 37 if [ -d "/usr/src/linux-$VERSION/scripts/package" ]; then |
slaxemulator@6975 | 38 cp -pa /usr/src/linux-$VERSION/slitaz/buildtaz /usr/src/linux-$VERSION/scripts/package |
slaxemulator@6975 | 39 cd /usr/src/linux-$VERSION |
slaxemulator@6975 | 40 patch -p1 -i slitaz/make-tazpkg.u |
slaxemulator@6975 | 41 fi |
slaxemulator@6975 | 42 |
slaxemulator@6975 | 43 cd /usr/src/linux-$VERSION |
slaxemulator@6975 | 44 while read patch_file; do |
slaxemulator@6975 | 45 echo "Apply $patch_file" |
slaxemulator@6975 | 46 patch -p1 < slitaz/$patch_file |
slaxemulator@6975 | 47 done < slitaz/patches |
slaxemulator@6975 | 48 [ ! -f System.map ] && cp slitaz/config .config && |
slaxemulator@6975 | 49 make oldconfig && make modules_prepare |
pascal@10950 | 50 ln -s /usr/src/linux-$VERSION /lib/modules/$VERSION-slitaz/build |
pascal@10950 | 51 ln -s linux-$VERSION /usr/src/linux |
slaxemulator@6975 | 52 |
slaxemulator@6975 | 53 cat <<EOT |
slaxemulator@6975 | 54 ---- |
slaxemulator@6975 | 55 To modify the kernel configuration: |
slaxemulator@6975 | 56 $ cd /usr/src/linux-$VERSION |
slaxemulator@6975 | 57 $ make menuconfig |
slaxemulator@6975 | 58 |
slaxemulator@6975 | 59 To build the kernel and the modules: |
slaxemulator@6975 | 60 $ cd /usr/src/linux-$VERSION |
slaxemulator@6975 | 61 $ make bzImage && make modules |
slaxemulator@6975 | 62 |
slaxemulator@6975 | 63 To install the new kernel and the modules: |
slaxemulator@6975 | 64 $ make modules_install |
slaxemulator@6975 | 65 $ cp -a arch/x86/boot/bzImage /boot/vmlinuz-$VERSION-slitaz |
slaxemulator@6975 | 66 |
slaxemulator@6975 | 67 To make a Slitaz package with the new kernel and the modules: |
slaxemulator@6975 | 68 $ make tazpkg |
slaxemulator@6975 | 69 |
slaxemulator@6977 | 70 See /usr/src/linux-$VERSION/README |
slaxemulator@6975 | 71 ---- |
gokhlayeh@9232 | 72 EOT |