wok-tiny diff linux/receipt @ rev 167
linux: build pentium optimized kernel too
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Feb 18 11:46:30 2021 +0000 (2021-02-18) |
parents | 14cd26e5e302 |
children | eb617e43dc08 |
line diff
1.1 --- a/linux/receipt Thu Feb 18 09:03:39 2021 +0000 1.2 +++ b/linux/receipt Thu Feb 18 11:46:30 2021 +0000 1.3 @@ -15,8 +15,7 @@ 1.4 AUTO_SELECTION="always" 1.5 1.6 DEPENDS="" 1.7 -BUILD_DEPENDS="slitaz-toolchain perl git lzma wget gcc2 upx" 1.8 -BUILD_SUGGESTED="advancecomp" 1.9 +BUILD_DEPENDS="slitaz-toolchain perl git lzma wget gcc2 upx advancecomp" 1.10 INSTALL_DEPENDS="lz4 grep" 1.11 1.12 case "$TARGET" in 1.13 @@ -70,9 +69,13 @@ 1.14 cp $stuff/bundle . 1.15 sh ./bundle 1.16 S2bin cmdline 1.17 - which upx 2> /dev/null && 1.18 - cp arch/i386/boot/bzImage arch/i386/boot/bzImage.noupx && 1.19 - upx --ultra-brute arch/i386/boot/bzImage 1.20 + cp arch/i386/boot/bzImage arch/i386/boot/bzImage.386 1.21 + cp .config .config.386 1.22 + cp System.map System.map.386 1.23 + cp $stuff/linux-$VERSION-slitaz.config.586 .config 1.24 + yes '' | make ARCH=i386 HOSTCC=gcc-2 config 1.25 + make ARCH=i386 CC=gcc-2 HOSTCC=gcc-2 -j 4 bzImage 1.26 + which upx 2> /dev/null && upx --ultra-brute arch/i386/boot/bzImage 1.27 } 1.28 1.29 # Rules to gen a SliTaz package suitable for Tazpkg. 1.30 @@ -83,14 +86,32 @@ 1.31 dd if=$src/bootloader.bin of=$fs/boot/bzImage conv=notrunc 1.32 dd if=$src/cmdline.bin bs=1 seek=560 of=$fs/boot/bzImage conv=notrunc 1.33 cp -a $src/pack $fs/boot/ 1.34 - cp -a $src/System.map $fs/boot/ 1.35 + cp -a $src/System.map* $fs/boot/ 1.36 cp -a $src/.config $fs/boot/config 1.37 + [ -s $src/.config.386 ] && cp -a $src/.config.386 $fs/boot/config.386 1.38 cp -a $src/bundle.sh $fs/boot/bundle 1.39 } 1.40 1.41 +config_form() 1.42 +{ 1.43 + cat <<EOT 1.44 +<table> 1.45 +<td>Tune the kernel according to the CPU type<td> 1.46 +<td> 1.47 +<input type="radio" name="CPU586" $([ "$CPU586" = "no" ] && echo "checked=checked ")value="no"> for any CPU starting from 386sx 1.48 +<input type="radio" name="CPU586" $([ "$CPU586" != "no" ] && echo "checked=checked ")value="yes"> optimized for pentium or newer CPU 1.49 +</td> 1.50 +</tr> 1.51 +</table> 1.52 +EOT 1.53 +} 1.54 + 1.55 # Pre and post install commands for Tazpkg. 1.56 post_install() 1.57 { 1.58 + for i in $1/boot/*.386 ; do 1.59 + [ "$CPU586" = "yes" ] && rm -f $i || mv -f $i ${i%.386} 1.60 + done 2> /dev/null 1.61 rm -f $1/boot/bzImage.noupx 1.62 [ -s $1/boot/cmdline ] && cat $1/boot/cmdline | sed 's/^ *//' | \ 1.63 dd of=$1/boot/bzImage conv=notrunc bs=1 seek=768 count=3072