wok-next view linux-libre-source/stuff/get-linux-source @ rev 9391

Add: e3 (2.8)
author Alexander Medvedev <devl547@gmail.com>
date Sat Mar 26 14:24:54 2011 +0000 (2011-03-26)
parents
children 903c03d31ebf
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)
10 if [ ! -d $SOURCES_REPOSITORY ]; then
11 mkdir -p $SOURCES_REPOSITORY
12 fi
14 cd /usr/src/
15 if [ -f $SOURCE_REPOSITORY/$(basename ${url//bz2/lzma}) ]; then
16 unlzma -c $SOURCES_REPOSITORY/$(basename ${url//bz2/lzma}) | tar xf - -C $PWD
17 elif [ -f $SOURCES_REPOSITORY/$(basename $url) ]; then
18 tar xjf $SOURCES_REPOSITORY/$(basename $url)
19 else
20 wget -O $SOURCES_REPOSITORY/$(basename $url) -c $url
21 tar xjf $SOURCES_REPOSITORY/$(basename $url)
22 fi
24 cp -a /usr/src/kernel-patches/slitaz /usr/src/linux-$VERSION
25 if [ -d /usr/src/linux-$VERSION/slitaz/aufs2 ]; then
26 cp -pa /usr/src/linux-$VERSION/slitaz/aufs2/* /usr/src/linux-$VERSION
27 fi
29 # Add tazpkg support
30 if [ -d "/usr/src/linux-$VERSION/scripts/package" ]; then
31 cp -pa /usr/src/linux-$VERSION/slitaz/buildtaz /usr/src/linux-$VERSION/scripts/package
32 cd /usr/src/linux-$VERSION
33 patch -p1 -i slitaz/make-tazpkg.u
34 fi
36 cd /usr/src/linux-$VERSION
37 while read patch_file; do
38 echo "Apply $patch_file"
39 patch -p1 < slitaz/$patch_file
40 done < slitaz/patches
41 [ ! -f System.map ] && cp slitaz/config .config &&
42 make oldconfig && make modules_prepare
44 cat <<EOT
45 ----
46 To modify the kernel configuration:
47 $ cd /usr/src/linux-$VERSION
48 $ make menuconfig
50 To build the kernel and the modules:
51 $ cd /usr/src/linux-$VERSION
52 $ make bzImage && make modules
54 To install the new kernel and the modules:
55 $ make modules_install
56 $ cp -a arch/x86/boot/bzImage /boot/vmlinuz-$VERSION-slitaz
58 To make a Slitaz package with the new kernel and the modules:
59 $ make tazpkg
61 See /usr/src/linux-$VERSION/README
62 ----
63 EOT