wok view linux-source/stuff/get-linux-source @ rev 8418
Up: xorg-xf86driproto to 2.1.1.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sat Feb 05 17:42:26 2011 +0000 (2011-02-05) |
parents | 5355ffc461cf |
children | ff2fcdc165fc |
line source
1 #!/bin/sh
3 source /etc/tazwok.conf
4 VERSION=XXX
6 url=$(cat /usr/src/kernel-patches/slitaz/url)
8 if [ ! -d $SOURCES_REPOSITORY ]; then
9 mkdir -p $SOURCES_REPOSITORY
10 fi
12 if [ -f $SOURCES_REPOSITORY/$(basename $url) ]; then
13 cd /usr/src/
14 tar xjf $SOURCES_REPOSITORY/$(basename $url)
15 else
16 wget -O $SOURCES_REPOSITORY/$(basename $url) -c $url
17 cd /usr/src/
18 tar xjf $SOURCES_REPOSITORY/$(basename $url)
19 fi
21 cp -a /usr/src/kernel-patches/slitaz /usr/src/linux-$VERSION
22 if [ -d /usr/src/linux-$VERSION/slitaz/aufs2 ]; then
23 cp -pa /usr/src/linux-$VERSION/slitaz/aufs2/* /usr/src/linux-$VERSION
24 fi
26 # Add tazpkg support
27 if [ -d "/usr/src/linux-$VERSION/scripts/package" ]; then
28 cp -pa /usr/src/linux-$VERSION/slitaz/buildtaz /usr/src/linux-$VERSION/scripts/package
29 cd /usr/src/linux-$VERSION
30 patch -p1 -i slitaz/make-tazpkg.u
31 fi
33 cd /usr/src/linux-$VERSION
34 while read patch_file; do
35 echo "Apply $patch_file"
36 patch -p1 < slitaz/$patch_file
37 done < slitaz/patches
38 [ ! -f System.map ] && cp slitaz/config .config &&
39 make oldconfig && make modules_prepare
41 cat <<EOT
42 ----
43 To modify the kernel configuration:
44 $ cd /usr/src/linux-$VERSION
45 $ make menuconfig
47 To build the kernel and the modules:
48 $ cd /usr/src/linux-$VERSION
49 $ make bzImage && make modules
51 To install the new kernel and the modules:
52 $ make modules_install
53 $ cp -a arch/x86/boot/bzImage /boot/vmlinuz-$VERSION-slitaz
55 To make a Slitaz package with the new kernel and the modules:
56 $ make tazpkg
58 See /usr/src/linux-$VERSION/README
59 ----
60 EOT