wok annotate linux-libre-source/stuff/get-linux-source @ rev 22595

updated childsplay (3.3 -> 3.4)
author Hans-G?nter Theisgen
date Tue Jan 07 17:19:08 2020 +0100 (2020-01-07)
parents 903c03d31ebf
children
rev   line source
gokhlayeh@9257 1 #!/bin/sh
gokhlayeh@9257 2
gokhlayeh@9257 3
gokhlayeh@9257 4 source /etc/slitaz/slitaz.conf
gokhlayeh@9257 5 SOURCES_REPOSITORY=$SLITAZ_DIR/$SLITAZ_VERSION/src
gokhlayeh@9257 6 VERSION=XXX
gokhlayeh@9257 7
gokhlayeh@9257 8 url=$(cat /usr/src/kernel-patches/slitaz/url)
gokhlayeh@11396 9 for i in http://linux-kernel.uio.no/pub http://www.gtlib.gatech.edu/pub/kernel.org http://www.kernel.org/pub ; do
gokhlayeh@11396 10 busybox wget -s $url && break
gokhlayeh@11396 11 url=$(echo $url | sed "s|.*/linux/kernel|$i/linux/kernel|")
gokhlayeh@11396 12 done
gokhlayeh@9257 13
gokhlayeh@9257 14 if [ ! -d $SOURCES_REPOSITORY ]; then
gokhlayeh@9257 15 mkdir -p $SOURCES_REPOSITORY
gokhlayeh@9257 16 fi
gokhlayeh@9257 17
gokhlayeh@9257 18 cd /usr/src/
gokhlayeh@9257 19 if [ -f $SOURCE_REPOSITORY/$(basename ${url//bz2/lzma}) ]; then
gokhlayeh@9257 20 unlzma -c $SOURCES_REPOSITORY/$(basename ${url//bz2/lzma}) | tar xf - -C $PWD
gokhlayeh@9257 21 elif [ -f $SOURCES_REPOSITORY/$(basename $url) ]; then
gokhlayeh@9257 22 tar xjf $SOURCES_REPOSITORY/$(basename $url)
gokhlayeh@9257 23 else
gokhlayeh@9257 24 wget -O $SOURCES_REPOSITORY/$(basename $url) -c $url
gokhlayeh@9257 25 tar xjf $SOURCES_REPOSITORY/$(basename $url)
gokhlayeh@9257 26 fi
gokhlayeh@9257 27
gokhlayeh@9257 28 cp -a /usr/src/kernel-patches/slitaz /usr/src/linux-$VERSION
gokhlayeh@9257 29
gokhlayeh@9257 30 # Add tazpkg support
gokhlayeh@9257 31 if [ -d "/usr/src/linux-$VERSION/scripts/package" ]; then
gokhlayeh@9257 32 cp -pa /usr/src/linux-$VERSION/slitaz/buildtaz /usr/src/linux-$VERSION/scripts/package
gokhlayeh@9257 33 cd /usr/src/linux-$VERSION
gokhlayeh@9257 34 patch -p1 -i slitaz/make-tazpkg.u
gokhlayeh@9257 35 fi
gokhlayeh@9257 36
gokhlayeh@9257 37 cd /usr/src/linux-$VERSION
gokhlayeh@9257 38 while read patch_file; do
gokhlayeh@9257 39 echo "Apply $patch_file"
gokhlayeh@9257 40 patch -p1 < slitaz/$patch_file
gokhlayeh@9257 41 done < slitaz/patches
gokhlayeh@9257 42 [ ! -f System.map ] && cp slitaz/config .config &&
gokhlayeh@9257 43 make oldconfig && make modules_prepare
gokhlayeh@11396 44 ln -s /usr/src/linux-$VERSION /lib/modules/$VERSION-slitaz/build
gokhlayeh@11396 45 ln -s linux-$VERSION /usr/src/linux
gokhlayeh@9257 46
gokhlayeh@9257 47 cat <<EOT
gokhlayeh@9257 48 ----
gokhlayeh@9257 49 To modify the kernel configuration:
gokhlayeh@9257 50 $ cd /usr/src/linux-$VERSION
gokhlayeh@9257 51 $ make menuconfig
gokhlayeh@9257 52
gokhlayeh@9257 53 To build the kernel and the modules:
gokhlayeh@9257 54 $ cd /usr/src/linux-$VERSION
gokhlayeh@9257 55 $ make bzImage && make modules
gokhlayeh@9257 56
gokhlayeh@9257 57 To install the new kernel and the modules:
gokhlayeh@9257 58 $ make modules_install
gokhlayeh@9257 59 $ cp -a arch/x86/boot/bzImage /boot/vmlinuz-$VERSION-slitaz
gokhlayeh@9257 60
gokhlayeh@9257 61 To make a Slitaz package with the new kernel and the modules:
gokhlayeh@9257 62 $ make tazpkg
gokhlayeh@9257 63
gokhlayeh@9257 64 See /usr/src/linux-$VERSION/README
gokhlayeh@9257 65 ----
gokhlayeh@9257 66 EOT