wok-next diff linux/receipt @ rev 19583

Up: cookutils, tazpkg, aufs, kmod, lguest, linux, linux64.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Jan 02 07:42:47 2017 +0200 (2017-01-02)
parents c76d35a1ca0b
children 5528876d95a1
line diff
     1.1 --- a/linux/receipt	Fri Oct 21 17:33:56 2016 +0200
     1.2 +++ b/linux/receipt	Mon Jan 02 07:42:47 2017 +0200
     1.3 @@ -1,30 +1,59 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="linux"
     1.7 -VERSION="3.2.71"
     1.8 +VERSION="4.9.0"
     1.9  CATEGORY="base-system"
    1.10 -SHORT_DESC="The Linux kernel and modules."
    1.11 +SHORT_DESC="The Linux Kernel and modules"
    1.12  MAINTAINER="devel@slitaz.org"
    1.13  LICENSE="GPL2"
    1.14 -TARBALL="$PACKAGE-$VERSION.tar.xz"
    1.15 -WEB_SITE="http://www.kernel.org/"
    1.16 -WGET_URL="http://www.kernel.org/pub/linux/kernel/v3.0/$TARBALL"
    1.17 +WEB_SITE="https://www.kernel.org/"
    1.18  HOST_ARCH="i486 arm x86_64"
    1.19  
    1.20 +TARBALL="$PACKAGE-${VERSION%.0}.tar.xz"
    1.21 +WGET_URL="https://www.kernel.org/pub/linux/kernel/v4.x/$TARBALL"
    1.22 +
    1.23  DEPENDS="kmod"
    1.24 -BUILD_DEPENDS="slitaz-toolchain perl git xz lzma patch kmod \
    1.25 +BUILD_DEPENDS="slitaz-toolchain perl git xz lzma patch kmod bc \
    1.26  uclibc-cross-compiler-x86_64"
    1.27 +SPLIT="lguest linux-acpi linux-agp linux-aoe linux-appletalk linux-arcnet \
    1.28 +linux-autofs linux-bluetooth linux-bridge linux-cifs linux-coda linux-configfs \
    1.29 +linux-cpufreq linux-cramfs linux-crypto linux-cryptoloop linux-dialup \
    1.30 +linux-dlm linux-drm linux-exofs linux-firewire linux-firmware linux-gfs2 \
    1.31 +linux-hfs linux-hfsplus linux-hwmon linux-input-misc linux-input-tablet \
    1.32 +linux-input-touchscreen linux-ipv6 linux-irda linux-isdn linux-jfs \
    1.33 +linux-joystick linux-kvm linux-logfs linux-md linux-media linux-memstick \
    1.34 +linux-minix linux-mmc linux-module-headers linux-mwave linux-nbd linux-ncpfs \
    1.35 +linux-netfilter linux-nfsd linux-ocfs2 linux-radio linux-reiserfs linux-romfs \
    1.36 +linux-sched linux-scsi linux-sound linux-source linux-speakup linux-squashfs \
    1.37 +linux-staging linux-toshiba linux-usb-misc linux-usbdsl linux-usbip linux-uwb \
    1.38 +linux-video linux-wan linux-wimax linux-wireless linux-without-modules \
    1.39 +linux-zram linux64 linux64-acpi linux64-agp linux64-aoe linux64-appletalk \
    1.40 +linux64-arcnet linux64-autofs linux64-bluetooth linux64-bridge linux64-btrfs \
    1.41 +linux64-cifs linux64-coda linux64-configfs linux64-cpufreq linux64-cramfs \
    1.42 +linux64-crypto linux64-cryptoloop linux64-dialup linux64-dlm linux64-drm \
    1.43 +linux64-exofs linux64-firewire linux64-gfs2 linux64-hfs linux64-hfsplus \
    1.44 +linux64-hwmon linux64-input-misc linux64-input-tablet \
    1.45 +linux64-input-touchscreen linux64-ipv6 linux64-irda linux64-isdn linux64-jfs \
    1.46 +linux64-joystick linux64-kvm linux64-logfs linux64-md linux64-media \
    1.47 +linux64-memstick linux64-minix linux64-mmc linux64-module-headers \
    1.48 +linux64-mwave linux64-nbd linux64-ncpfs linux64-netfilter linux64-nfsd \
    1.49 +linux64-ocfs2 linux64-radio linux64-reiserfs linux64-romfs linux64-sched \
    1.50 +linux64-scsi linux64-sound linux64-speakup linux64-squashfs linux64-staging \
    1.51 +linux64-usb-misc linux64-usbdsl linux64-usbip linux64-uwb linux64-video \
    1.52 +linux64-wan linux64-wimax linux64-wireless linux64-without-modules \
    1.53 +linux64-zram"
    1.54  
    1.55  #
    1.56  # The Linux receipt handle cross compilation. For x86_64 we actually use
    1.57  # the uclibc-cross-compiler-x86_64 and for ARM we use a real cross env.
    1.58 -# Please discuss any change and keep it simple, dont play with VERSION
    1.59 -# string or Kernel SUBLEVEL because depmod and Pankso dont like that!
    1.60 +# Please discuss any change and keep it simple, don't play with VERSION
    1.61 +# string or Kernel SUBLEVEL because depmod and Pankso don't like that!
    1.62  #
    1.63 -# The receipt also handle some cook options for faster build: 
    1.64 +# The receipt also handle some cook options for faster build:
    1.65  # --nox64    : Skip the x86_64 cross compilation
    1.66  # --nonomods : Skip bzImage without modules build
    1.67  #
    1.68 +nox64='yes' # hardcoded now
    1.69  
    1.70  # Aufs enable chroot
    1.71  AUFS_NOT_RAMFS="uclibc-cross-compiler-x86_64 is not compatible with aufs+tmpfs 8("
    1.72 @@ -44,104 +73,118 @@
    1.73  	esac
    1.74  fi
    1.75  
    1.76 +add_headers_for_type()
    1.77 +{
    1.78 +	# $1: type, for example "VIDEO_"
    1.79 +	# $2: where to search, for example "drivers/media"
    1.80 +	echo -e "\n\nAdding headers for $1..."
    1.81 +	for i in $(cd $src/$2; find -name Kconfig | sed 's|^\./||'); do
    1.82 +		if fgrep -q "config $1" $src/$2/$i; then
    1.83 +			echo "  * $2/$j/*.h"
    1.84 +			j=$(dirname $i)
    1.85 +			mkdir -p $1/$path/$2/$j
    1.86 +			cp -a $src/$2/$j/*.h $1/$path/$2/$j
    1.87 +		fi
    1.88 +	done
    1.89 +}
    1.90 +
    1.91  install_module_headers()
    1.92  {
    1.93 -	local path
    1.94 -	path=usr/src/linux-$KVERSION
    1.95 -	mkdir -p $1/lib/modules/$KVERSION
    1.96 +	local path="usr/src/linux-$KVERSION"
    1.97 +	mkdir -p      $1/lib/modules/$KVERSION
    1.98  	ln -sf /$path $1/lib/modules/$KVERSION/build
    1.99 -	install -D -m644 $src/Makefile \
   1.100 -		$1/$path/Makefile
   1.101 -	install -D -m644 $src/kernel/Makefile \
   1.102 -		$1/$path/kernel/Makefile
   1.103 -	install -D -m644 $src/.config \
   1.104 -		$1/$path/.config
   1.105 -	mkdir -p $1/$path/include
   1.106 +	install -D -m644 $src/Makefile        $1/$path/Makefile
   1.107 +	install -D -m644 $src/kernel/Makefile $1/$path/kernel/Makefile
   1.108 +	install -D -m644 $src/.config         $1/$path/.config
   1.109 +	mkdir -p                              $1/$path/include
   1.110  
   1.111 -	for i in acpi asm-generic config crypto drm generated linux math-emu \
   1.112 -		media net pcmcia scsi sound trace video xen; do
   1.113 -		cp -a $src/include/$i $1/$path/include/
   1.114 -	done
   1.115 +	cp -a $src/include/* $1/$path/include/
   1.116  
   1.117  	# copy arch includes for external modules
   1.118  	mkdir -p $1/$path/arch/x86
   1.119  	cp -a $src/arch/x86/include $1/$path/arch/x86/
   1.120  
   1.121  	# copy files necessary for later builds, like nvidia and vmware
   1.122 -  	cp -a $src/Module.symvers $1/$path/Module.symvers
   1.123 -  	cp -a $src/scripts $1/$path
   1.124 -  	# fix permissions on scripts dir
   1.125 -  	chmod og-w -R $1/$path/scripts
   1.126 -  	mkdir -p $1/$path/.tmp_versions
   1.127 +	cp -a $src/Module.symvers $1/$path
   1.128 +	cp -a $src/scripts        $1/$path
   1.129 +	# fix permissions on scripts dir
   1.130 +	chmod og-w -R             $1/$path/scripts
   1.131 +	mkdir -p                  $1/$path/.tmp_versions
   1.132  
   1.133  	mkdir -p $1/$path/arch/x86/kernel
   1.134 -	cp -a $src/arch/x86/Makefile $1/$path/arch/x86/
   1.135 -	cp -a $src/arch/x86/Makefile_32.cpu $1/$path/arch/x86/
   1.136 +	cp -a $src/arch/x86/Makefile             $1/$path/arch/x86/
   1.137 +	cp -a $src/arch/x86/Makefile_32.cpu      $1/$path/arch/x86/
   1.138  	cp -a $src/arch/x86/kernel/asm-offsets.s $1/$path/arch/x86/kernel/
   1.139  
   1.140  	# add headers for lirc package
   1.141 -	mkdir -p $1/$path/drivers/media/video
   1.142 -	cp -a $src/drivers/media/video/*.h  $1/$path/drivers/media/video/
   1.143 +#	mkdir -p $1/$path/drivers/media/video
   1.144 +#	cp -a $src/drivers/media/video/*.h  $1/$path/drivers/media/video/
   1.145 +#
   1.146 +#	for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 ; do
   1.147 +#		mkdir -p $1/$path/drivers/media/video/$i
   1.148 +#		cp -a $src/drivers/media/video/$i/*.h $1/$path/drivers/media/video/$i
   1.149 +#	done
   1.150  
   1.151 -	for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 ; do
   1.152 -   		mkdir -p $1/$path/drivers/media/video/$i
   1.153 -   		cp -a $src/drivers/media/video/$i/*.h $1/$path/drivers/media/video/$i
   1.154 -	done
   1.155 +	add_headers_for_type 'VIDEO_' 'drivers/media'
   1.156  
   1.157  	# add docbook makefile
   1.158  	install -D -m644 $src/Documentation/DocBook/Makefile \
   1.159 -    		$1/$path/Documentation/DocBook/Makefile
   1.160 +		$1/$path/Documentation/DocBook/Makefile
   1.161  
   1.162 -	# add dm headers
   1.163 -	mkdir -p $1/$path/drivers/md
   1.164 -	cp -a $src/drivers/md/*.h  $1/$path/drivers/md
   1.165 +	# add md headers
   1.166 +#	mkdir -p $1/$path/drivers/md
   1.167 +#	cp -a $src/drivers/md/*.h  $1/$path/drivers/md
   1.168 +	add_headers_for_type 'MD_' 'drivers'
   1.169  
   1.170  	# add inotify.h
   1.171  	mkdir -p $1/$path/include/linux
   1.172  	cp -a $src/include/linux/inotify.h $1/$path/include/linux/
   1.173  
   1.174  	# add wireless headers
   1.175 -	mkdir -p $1/$path/net/mac80211/
   1.176 -	cp -a $src/net/mac80211/*.h $1/$path/net/mac80211/
   1.177 +#	mkdir -p $1/$path/net/mac80211/
   1.178 +#	cp -a $src/net/mac80211/*.h $1/$path/net/mac80211/
   1.179 +	add_headers_for_type 'MAC80211' 'net'
   1.180  
   1.181  	# add dvb headers for external modules
   1.182  	# in reference to:
   1.183  	# http://bugs.archlinux.org/task/9912
   1.184 -	mkdir -p $1/$path/drivers/media/dvb/dvb-core
   1.185 -	cp -a $src/drivers/media/dvb/dvb-core/*.h $1/$path/drivers/media/dvb/dvb-core/
   1.186 +#	mkdir -p $1/$path/drivers/media/dvb/dvb-core
   1.187 +#	cp -a $src/drivers/media/dvb/dvb-core/*.h $1/$path/drivers/media/dvb/dvb-core/
   1.188 +	add_headers_for_type 'DVB_' 'drivers/media'
   1.189  
   1.190  	# add dvb headers for external modules
   1.191  	# in reference to:
   1.192  	# http://bugs.archlinux.org/task/11194
   1.193 -	if [ -d $src/include/config/dvb/ ]; then
   1.194 -		mkdir -p $1/$path/include/config/dvb/
   1.195 -		cp $src/include/config/dvb/*.h $1/$path/include/config/dvb/
   1.196 -	fi
   1.197 +#	if [ -d $src/include/config/dvb/ ]; then
   1.198 +#		mkdir -p $1/$path/include/config/dvb/
   1.199 +#		cp $src/include/config/dvb/*.h $1/$path/include/config/dvb/
   1.200 +#	fi
   1.201 +#
   1.202  
   1.203  	# add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
   1.204  	# in reference to:
   1.205  	# http://bugs.archlinux.org/task/13146
   1.206 -	mkdir -p $1/$path/drivers/media/dvb/frontends/
   1.207 -	cp -a $src/drivers/media/dvb/frontends/lgdt330x.h $1/$path/drivers/media/dvb/frontends/
   1.208 -	cp -a $src/drivers/media/video/msp3400-driver.h $1/$path/drivers/media/dvb/frontends/
   1.209 +#	mkdir -p $1/$path/drivers/media/dvb/frontends/
   1.210 +#	cp -a $src/drivers/media/dvb/frontends/lgdt330x.h $1/$path/drivers/media/dvb/frontends/
   1.211 +#	cp -a $src/drivers/media/video/msp3400-driver.h $1/$path/drivers/media/dvb/frontends/
   1.212  
   1.213 -	# add dvb headers  
   1.214 +	# add dvb headers
   1.215  	# in reference to:
   1.216  	# http://bugs.archlinux.org/task/20402
   1.217 -	mkdir -p $1/$path/drivers/media/dvb/dvb-usb
   1.218 -	cp -a $src/drivers/media/dvb/dvb-usb/*.h $1/$path/drivers/media/dvb/dvb-usb/
   1.219 -	mkdir -p $1/$path/drivers/media/dvb/frontends
   1.220 -	cp -a $src/drivers/media/dvb/frontends/*.h $1/$path/drivers/media/dvb/frontends/
   1.221 -	mkdir -p $1/$path/drivers/media/common/tuners
   1.222 -	cp -a $src/drivers/media/common/tuners/*.h $1/$path/drivers/media/common/tuners/
   1.223 +#	mkdir -p $1/$path/drivers/media/dvb/dvb-usb
   1.224 +#	cp -a $src/drivers/media/dvb/dvb-usb/*.h $1/$path/drivers/media/dvb/dvb-usb/
   1.225 +#	mkdir -p $1/$path/drivers/media/dvb/frontends
   1.226 +#	cp -a $src/drivers/media/dvb/frontends/*.h $1/$path/drivers/media/dvb/frontends/
   1.227 +#	mkdir -p $1/$path/drivers/media/common/tuners
   1.228 +#	cp -a $src/drivers/media/common/tuners/*.h $1/$path/drivers/media/common/tuners/
   1.229  
   1.230  	# add xfs and shmem for aufs building
   1.231  	mkdir -p $1/$path/fs/xfs
   1.232  	mkdir -p $1/$path/mm
   1.233  	cp -a $src/fs/xfs/xfs_sb.h $1/$path/fs/xfs/xfs_sb.h
   1.234 -	
   1.235 +
   1.236  	# copy in Kconfig files
   1.237 -	for i in $(find . -name "Kconfig*"); do 
   1.238 +	for i in $(find . -name "Kconfig*"); do
   1.239  		mkdir -p $1/$path/$(echo $i | sed 's|/Kconfig.*||')
   1.240  		cp -a $src/$i $1/$path/$i
   1.241  	done
   1.242 @@ -150,7 +193,8 @@
   1.243  	find $1/$path -type d -exec chmod 755 {} \;
   1.244  	# remove unneeded architectures
   1.245  	rm -rf $1/$path/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa}
   1.246 -}	
   1.247 +}
   1.248 +
   1.249  
   1.250  # Rules to configure and make the package.
   1.251  compile_rules()
   1.252 @@ -177,7 +221,7 @@
   1.253  			#$stuff/gztazmod.sh $DESTDIR/lib/modules/$VERSION-slitaz
   1.254  			return 0 ;;
   1.255  		x86_64)
   1.256 -			echo "TODO: Maybe use default ? But cross compile in x86_64 chroot"
   1.257 +			echo "TODO: Maybe use default? But cross compile in x86_64 chroot"
   1.258  			echo "so we can remove the 64 build by uclibc-cross-compiler-x86_64"
   1.259  			return 0 ;;
   1.260  	esac
   1.261 @@ -192,12 +236,12 @@
   1.262  		echo "Extracting: aufs-${AUFSVER}.tar.bz2"
   1.263  		tar xjf $SRC/aufs-${AUFSVER}.tar.bz2 -C $WOK/aufs/source/
   1.264  	fi
   1.265 -	
   1.266 +
   1.267  	echo "cook:linux" > $command
   1.268  
   1.269  	echo "Copying Aufs files and patches..."
   1.270  	cp -a $AUFSDIR/Documentation $AUFSDIR/fs $AUFSDIR/include $src
   1.271 -	cp -a $AUFSDIR/aufs3-*.patch $stuff
   1.272 +	cp -a $AUFSDIR/aufs4-*.patch $stuff
   1.273  
   1.274  	# SliTaz db stuff
   1.275  	[ -d $WOK/$PACKAGE/source/slitaz ] && rm -rf $WOK/$PACKAGE/source/slitaz
   1.276 @@ -212,69 +256,66 @@
   1.277  		echo "$patch_file" >> $WOK/$PACKAGE/source/slitaz/patches
   1.278  		cp $stuff/$patch_file $WOK/$PACKAGE/source/slitaz
   1.279  		if [ -f done.$patch_file ]; then
   1.280 -			echo "Skipping $patch_file" && continue
   1.281 +			echo "Skipping $patch_file"; continue
   1.282  		fi
   1.283 -		echo "Apply $patch_file"
   1.284 +		echo -e "\nApply $patch_file"
   1.285  		patch -p1 < $WOK/$PACKAGE/source/slitaz/$patch_file || return 1
   1.286  		touch done.$patch_file
   1.287  	done <<EOT
   1.288 -$PACKAGE-diff.u
   1.289 -$PACKAGE-header.u
   1.290 -$PACKAGE-freeinitrd.u
   1.291 -$PACKAGE-subroot.u
   1.292 -$PACKAGE-romfs.u
   1.293 -$PACKAGE-CVE-2016-5696.u
   1.294 -aufs3-base.patch
   1.295 -aufs3-standalone.patch
   1.296 -aufs3-loopback.patch
   1.297 -aufs3-mmap.patch
   1.298 -channel-negative-one-maxim.patch
   1.299 -mac80211.compat08082009.wl_frag+ack_v1.patch
   1.300 -$PACKAGE-CVE-2016-5195.u
   1.301 +aufs4-base.patch
   1.302 +aufs4-standalone.patch
   1.303 +aufs4-loopback.patch
   1.304 +aufs4-mmap.patch
   1.305  EOT
   1.306 -	
   1.307 +
   1.308  	# Mrproper and lguest
   1.309 -	echo "Make kernel proper and then build lguest..."
   1.310 +	echo "Making kernel proper and then build lguest..."
   1.311  	make mrproper
   1.312 -	cd Documentation/virtual/lguest
   1.313 +	cd tools/lguest
   1.314  	make lguest || return 1
   1.315  	cd $src
   1.316 -	
   1.317 +
   1.318  	#
   1.319  	# Arch x86_64: TODO have a real cross environment
   1.320  	#
   1.321 -	if [ ! "$nox64" ]; then
   1.322 -		echo "Compiling: x86_64 Kernel"
   1.323 -		
   1.324 +	if [ -z "$nox64" ]; then
   1.325 +		echo "Making x86_64 Kernel"
   1.326 +
   1.327  		# Build bzImage64 without modules first
   1.328 -		if [ ! "$nonomods" ]; then
   1.329 +		if [ -z "$nonomods" ]; then
   1.330  			cp -f $stuff/$PACKAGE-slitaz.config64 .config
   1.331  			sed -i 's/CONFIG_MODULES=y/# CONFIG_MODULES is not set/' .config
   1.332 -			# We can't keep every driver in staging ???
   1.333 +			# We can't keep every driver in staging???
   1.334  			sed -i -e 's/^CONFIG_RTL8192/#&/' \
   1.335  				-e 's/^CONFIG_R8187SE/#&/' \
   1.336  				-e 's/^CONFIG_RT2870/#&/' .config
   1.337 +
   1.338  			echo -e "\n* Configure bzImage64 without modules...\n"
   1.339  			yes '' | make ARCH=x86_64 oldconfig
   1.340 +
   1.341  			echo -e "\n* Building bzImage64 without modules...\n"
   1.342  			make -j 4 ARCH=x86_64 CROSS_COMPILE=uclibc-x86_64- bzImage || exit 1
   1.343 +
   1.344  			[ -d $DESTDIR ] || mkdir -p $DESTDIR/linux64
   1.345  			mv arch/x86/boot/bzImage $DESTDIR/linux64
   1.346  			mv System.map System.map-without-modules64
   1.347  		fi
   1.348 -		
   1.349 +
   1.350  		# Build bzImage64 with modules
   1.351  		cp -f $stuff/$PACKAGE-slitaz.config64 .config
   1.352 +
   1.353  		echo -e "\n* Configure bzImage64 with modules...\n"
   1.354  		yes '' | make ARCH=x86_64 oldconfig
   1.355 +
   1.356  		echo -e "\n* Building bzImage64 with modules...\n"
   1.357  		make -j 4 ARCH=x86_64 CROSS_COMPILE=uclibc-x86_64- bzImage &&
   1.358  		make -j 4 ARCH=x86_64 CROSS_COMPILE=uclibc-x86_64- modules &&
   1.359  		make ARCH=x86_64 INSTALL_MOD_PATH=$DESTDIR/linux64 modules_install &&
   1.360  		make ARCH=x86_64 INSTALL_HDR_PATH=$DESTDIR/linux64/usr headers_install &&
   1.361 +
   1.362  		ln .config $WOK/$PACKAGE/source/slitaz/config64
   1.363  		[ -s arch/x86/boot/bzImage ] || return 1
   1.364 -		mkdir -p $DESTDIR/linux64/boot 2> /dev/null
   1.365 +		mkdir -p $DESTDIR/linux64/boot 2>/dev/null
   1.366  		mv arch/x86/boot/bzImage $DESTDIR/linux64/boot/vmlinuz-$VERSION-slitaz64
   1.367  		KVERSION=$VERSION-slitaz64
   1.368  		install_module_headers $DESTDIR/linux64
   1.369 @@ -283,45 +324,53 @@
   1.370  	else
   1.371  		echo "* Skipping: x86_64 Kernel..."
   1.372  	fi
   1.373 -	
   1.374 +
   1.375  	#
   1.376  	# Linux Arch i386 - GCC arch i486
   1.377  	#
   1.378 -	echo "Compiling: i386 Kernel..."
   1.379 +	echo "Making x86 Kernel..."
   1.380  
   1.381  	# Build bzImage without modules first
   1.382 -	if [ ! "$nonomods" ]; then
   1.383 +	if [ -z "$nonomods" ]; then
   1.384  		cp -f $stuff/$PACKAGE-slitaz.config .config
   1.385  		sed -i 's/CONFIG_MODULES=y/# CONFIG_MODULES is not set/' .config
   1.386 -		# We can't keep every driver in staging ???
   1.387 +		# We can't keep every driver in staging???
   1.388  		sed -i -e 's/^CONFIG_RTL8192/#&/' \
   1.389  			-e 's/^CONFIG_R8187SE/#&/' \
   1.390  			-e 's/^CONFIG_RT2870/#&/' .config
   1.391 +
   1.392  		echo -e "\n* Configure bzImage without modules...\n"
   1.393  		yes '' | make ARCH=i386 oldconfig
   1.394 +
   1.395  		echo -e "\n* Building bzImage without modules...\n"
   1.396  		make ARCH=i386 -j 4 bzImage || exit 1
   1.397 +
   1.398  		[ -d $DESTDIR ] || mkdir -p $DESTDIR
   1.399  		mv arch/x86/boot/bzImage $DESTDIR
   1.400  		mv System.map System.map-without-modules
   1.401  	fi
   1.402 -	
   1.403 +
   1.404  	# Build bzImage with modules
   1.405  	cp -f $stuff/$PACKAGE-slitaz.config .config
   1.406 +
   1.407  	echo -e "\n* Configure bzImage with modules...\n"
   1.408  	yes '' | make ARCH=i386 oldconfig
   1.409 +
   1.410  	ln .config $WOK/$PACKAGE/source/slitaz/config
   1.411 +
   1.412  	echo -e "\n* Building bzImage with modules...\n"
   1.413  	make ARCH=i386 -j 4 bzImage &&
   1.414  	make ARCH=i386 -j 4 modules &&
   1.415  	make ARCH=i386 INSTALL_MOD_PATH=$DESTDIR modules_install &&
   1.416  	make ARCH=i386 INSTALL_HDR_PATH=$DESTDIR/usr headers_install &&
   1.417 +
   1.418  	[ -s arch/x86/boot/bzImage ] || return 1
   1.419  	mkdir -p $DESTDIR/boot 2> /dev/null
   1.420  	mv arch/x86/boot/bzImage $DESTDIR/boot/vmlinuz-$VERSION-slitaz
   1.421  	KVERSION=$VERSION-slitaz
   1.422 +
   1.423  	install_module_headers $DESTDIR
   1.424 -	
   1.425 +
   1.426  	# Compress all modules.
   1.427  	if [ -d "$DESTDIR/lib/modules/$VERSION-slitaz" ]; then
   1.428  		$stuff/gztazmod.sh $DESTDIR/lib/modules/$VERSION-slitaz
   1.429 @@ -360,9 +409,11 @@
   1.430  	# Get the base modules
   1.431  	export src install
   1.432  	mkdir -p $WOK/$PACKAGE/source/tmp
   1.433 -	# Warning stuff/list_modules.sh must find the generated modules.list
   1.434 +
   1.435 +	# Warning: stuff/list_modules.sh must find the generated modules.list
   1.436  	$stuff/list_modules.sh \
   1.437  		$(cat $stuff/modules.list) > $WOK/$PACKAGE/source/tmp/modules.list
   1.438 +
   1.439  	while read module; do
   1.440  		dir=$(dirname $module)
   1.441  		[ -d $path/$dir ] || mkdir -p $path/$dir
   1.442 @@ -379,16 +430,16 @@
   1.443  		$install/lib/modules/$VERSION-slitaz/modules.builtin \
   1.444  		$fs/lib/modules/$VERSION-slitaz
   1.445  
   1.446 -	# Pack all packages with a kernel module
   1.447 -	for i in $(cd $WOK; grep -l '^WANTED="linux"' */receipt); do
   1.448 -		[ ! -d "$install/lib/modules/$VERSION-slitaz" ] && return 1
   1.449 -		cook ${i%/receipt}
   1.450 +	# Pack all packages with a Kernel module
   1.451 +	[ ! -d "$install/lib/modules/$VERSION-slitaz" ] && return 1
   1.452 +	for i in $SPLIT; do
   1.453 +		cook $i
   1.454  	done
   1.455  
   1.456 -	# Check any module in kernel .config that's not added to a linux-* pkgs
   1.457 -	# and remove aufs patches: we dont need them in HG wok.
   1.458 +	# Check any module in Kernel .config that's not added to a linux-* pkgs
   1.459 +	# and remove aufs patches: we don't need them in HG wok.
   1.460  	$stuff/check_modules.sh
   1.461 -	rm -f $stuff/aufs3-*
   1.462 +	rm -f $stuff/aufs4-*
   1.463  }
   1.464  
   1.465  # Pre and post install commands for Tazpkg.
   1.466 @@ -411,9 +462,9 @@
   1.467  		grub_part="$(( $(echo $root_dev | grep -o '[0-9]*$')-1 ))"
   1.468  		# Use device.map to find grub device number
   1.469  		grub_dev="$(grep $(echo $root_dev | grep -o  '^/dev/.d.' ) \
   1.470 -			"$1/boot/grub/device.map" | cut -f1 | sed "s/)$/.$grub_part)/g")" 
   1.471 +			"$1/boot/grub/device.map" | cut -f1 | sed "s/)$/.$grub_part)/g")"
   1.472  
   1.473 -		# Add and clean kernel entries in case of upgrade for installed system.
   1.474 +		# Add and clean Kernel entries in case of upgrade for installed system.
   1.475  		if ! grep -q vmlinuz-$VERSION-slitaz "$1/boot/grub/menu.lst"; then
   1.476  
   1.477  			# Clean the old entry
   1.478 @@ -421,7 +472,7 @@
   1.479  			# So grub error:15 when selected: http://bugs.slitaz.org/?id=74
   1.480  
   1.481  			# Add the new entry
   1.482 -			cat >> "$1/boot/grub/menu.lst" << EOT
   1.483 +			cat >> "$1/boot/grub/menu.lst" <<EOT
   1.484  
   1.485  title SliTaz GNU/Linux (Kernel $VERSION-slitaz)
   1.486  $grub_dev 
   1.487 @@ -436,7 +487,7 @@
   1.488  		cat <<EOT
   1.489  
   1.490  ----
   1.491 -GRUB is installed, these tree lines must be in your /boot/grub/menu.lst:
   1.492 +GRUB is installed, these three lines must be in your /boot/grub/menu.lst:
   1.493  
   1.494  title  SliTaz GNU/Linux (Kernel $VERSION-slitaz)
   1.495  $grub_dev