wok view linux-libre-source/stuff/get-linux-source @ rev 21168

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