wok-6.x rev 6975
Fixed linux-source. Instead of auto downloading kernel source in post_install i added that code into a script called get-linux-source. All patches are also in /usr/src/kernel-patches now.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Thu Oct 28 04:58:29 2010 +0000 (2010-10-28) |
parents | 18ac2ae96705 |
children | 99e3675b8ff1 |
files | linux-source/receipt linux-source/stuff/get-linux-source |
line diff
1.1 --- a/linux-source/receipt Wed Oct 27 20:56:33 2010 +0000 1.2 +++ b/linux-source/receipt Thu Oct 28 04:58:29 2010 +0000 1.3 @@ -12,82 +12,19 @@ 1.4 # Rules to gen a SliTaz package suitable for Tazpkg. 1.5 genpkg_rules() 1.6 { 1.7 - mkdir -p $fs/usr/src/linux-$VERSION-slitaz \ 1.8 - $fs/lib/modules/$VERSION-slitaz/ 1.9 - ln -s linux-$VERSION-slitaz $fs/usr/src/linux 1.10 - cp -a $src/Module.symvers $fs/usr/src/linux-$VERSION-slitaz 1.11 - cp -a $src/slitaz $fs/usr/src/linux-$VERSION-slitaz 1.12 - cp -a stuff/buildtaz $fs/usr/src/linux-$VERSION-slitaz/slitaz 1.13 - cp -a stuff/make-tazpkg.u $fs/usr/src/linux-$VERSION-slitaz/slitaz 1.14 + mkdir -p $fs/usr/src/kernel-patches 1.15 + cp -a $src/slitaz $fs/usr/src/kernel-patches 1.16 + cp -a stuff/buildtaz $fs/usr/src/kernel-patches/slitaz 1.17 + cp -a stuff/make-tazpkg.u $fs/usr/src/kernel-patches/slitaz 1.18 + cp -a stuff/get-linux-source $fs/usr/bin 1.19 + sed -i "s|=XXX|=$VERSION|g" $fs/usr/bin/get-linux-source 1.20 # Copy Aufs2 source files 1.21 if [ -d $WOK/$WANTED/aufs2 ]; then 1.22 - mkdir $fs/usr/src/linux-$VERSION-slitaz/slitaz/aufs2 1.23 + mkdir $fs/usr/src/kernel-patches/slitaz/aufs2 1.24 cp -a $WOK/$WANTED/aufs2/Documentation \ 1.25 $WOK/$WANTED/aufs2/fs $WOK/$WANTED/aufs2/include \ 1.26 - $fs/usr/src/linux-$VERSION-slitaz/slitaz/aufs2 1.27 + $fs/usr/src/kernel-patches/slitaz/aufs2 1.28 fi 1.29 ln -s /usr/src/linux-$VERSION-slitaz \ 1.30 $fs/lib/modules/$VERSION-slitaz/source 1.31 - ln -s /usr/src/linux-$VERSION-slitaz \ 1.32 - $fs/lib/modules/$VERSION-slitaz/build 1.33 } 1.34 - 1.35 -# Post install/remove commands for Tazpkg. 1.36 -post_install() 1.37 -{ 1.38 - local url 1.39 - local patch_file 1.40 - cd $1/usr/src/ 1.41 - url=$(cat linux-$VERSION-slitaz/slitaz/url) 1.42 - wget -c $url 1.43 - tar xjf $(basename $url) 1.44 - mv linux-$VERSION-slitaz/slitaz linux-$VERSION 1.45 - rm -rf linux-$VERSION-slitaz 1.46 - mv linux-$VERSION linux-$VERSION-slitaz 1.47 - cd linux-$VERSION-slitaz 1.48 - cp -pa slitaz/aufs2/* . 1.49 - # Add tazpkg support 1.50 - if [ -d "scripts/package" ]; then 1.51 - cp -pa slitaz/buildtaz scripts/package 1.52 - patch -p1 -i slitaz/make-tazpkg.u 1.53 - fi 1.54 - 1.55 - while read patch_file; do 1.56 - echo "Apply $patch_file" 1.57 - patch -p1 < slitaz/$patch_file 1.58 - done < slitaz/patches 1.59 - [ ! -f System.map ] && cp slitaz/config .config && 1.60 - make oldconfig && make modules_prepare 1.61 - cat <<EOT 1.62 ----- 1.63 -To modify the kernel configuration: 1.64 -$ cd /usr/src/linux-$VERSION-slitaz 1.65 -$ make menuconfig 1.66 - 1.67 -To build the kernel and the modules: 1.68 -$ cd /usr/src/linux-$VERSION-slitaz 1.69 -$ make bzImage && make modules 1.70 - 1.71 -To install the new kernel and the modules: 1.72 -$ make modules_install 1.73 -$ cp -a arch/x86/boot/bzImage /boot/vmlinuz-$VERSION-slitaz 1.74 - 1.75 -To make a Slitaz package with the new kernel and the modules: 1.76 -$ make tazpkg 1.77 - 1.78 -See /usr/src/linux-$VERSION-slitaz/README 1.79 ----- 1.80 -EOT 1.81 -} 1.82 - 1.83 -pre_remove() 1.84 -{ 1.85 - rm $(basename $(cat /usr/src/linux-$VERSION-slitaz/slitaz/url)) 2> /dev/null || true 1.86 -} 1.87 - 1.88 -post_remove() 1.89 -{ 1.90 - rm -rf /usr/src/linux-$VERSION-slitaz 1.91 -} 1.92 - 1.93 -
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/linux-source/stuff/get-linux-source Thu Oct 28 04:58:29 2010 +0000 2.3 @@ -0,0 +1,54 @@ 2.4 +#!/bin/sh 2.5 + 2.6 +source /etc/tazwok.conf 2.7 +VERSION=XXX 2.8 + 2.9 +url=$(cat /usr/src/linux-$VERSION-slitaz/url) 2.10 + 2.11 +if [ -f $SOURCES_REPOSITORY/$(basename $url) ]; then 2.12 + cd /usr/src/ 2.13 + tar xjf $(basename $url) 2.14 +else 2.15 + wget -O $SOURCES_REPOSITORY/$(basename $url) 2.16 + cd /usr/src/ 2.17 + tar xjf $(basename $url) 2.18 +fi 2.19 + 2.20 +cp -a /usr/src/kernel-patches/slitaz /usr/src/linux-$VERSION 2.21 + 2.22 +cp -pa /usr/src/linux-$VERSION/slitaz/aufs2/* /usr/src/linux-$VERSION 2.23 +# Add tazpkg support 2.24 +if [ -d "/usr/src/linux-$VERSION/scripts/package" ]; then 2.25 + cp -pa /usr/src/linux-$VERSION/slitaz/buildtaz /usr/src/linux-$VERSION/scripts/package 2.26 + cd /usr/src/linux-$VERSION 2.27 + patch -p1 -i slitaz/make-tazpkg.u 2.28 +fi 2.29 + 2.30 +cd /usr/src/linux-$VERSION 2.31 +while read patch_file; do 2.32 + echo "Apply $patch_file" 2.33 + patch -p1 < slitaz/$patch_file 2.34 +done < slitaz/patches 2.35 +[ ! -f System.map ] && cp slitaz/config .config && 2.36 +make oldconfig && make modules_prepare 2.37 + 2.38 + cat <<EOT 2.39 +---- 2.40 +To modify the kernel configuration: 2.41 +$ cd /usr/src/linux-$VERSION 2.42 +$ make menuconfig 2.43 + 2.44 +To build the kernel and the modules: 2.45 +$ cd /usr/src/linux-$VERSION 2.46 +$ make bzImage && make modules 2.47 + 2.48 +To install the new kernel and the modules: 2.49 +$ make modules_install 2.50 +$ cp -a arch/x86/boot/bzImage /boot/vmlinuz-$VERSION-slitaz 2.51 + 2.52 +To make a Slitaz package with the new kernel and the modules: 2.53 +$ make tazpkg 2.54 + 2.55 +See /usr/src/linux-$VERSION-slitaz/README 2.56 +---- 2.57 +EOT 2.58 \ No newline at end of file