# HG changeset patch # User Eric Joseph-Alexandre # Date 1261821756 -3600 # Node ID 30b01dd8b4b384daf7f55fac48192f38e0a11145 # Parent 116984a54f50ba33d4404fb119ca0670d3d2a18e linux-source: add missing files. diff -r 116984a54f50 -r 30b01dd8b4b3 linux-source/stuff/buildtaz --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/linux-source/stuff/buildtaz Sat Dec 26 11:02:36 2009 +0100 @@ -0,0 +1,80 @@ +#!/bin/sh +# +# buildtaz 1.0 +# This script generate a SliTaz package for linux kernel and modules. +# Inspired from builddeb script. +# +# (C) 2009 SliTaz - GNU General Public License v3. +# +# Author: Eric Joseph-Alexandre + +set -e + +LOCALVERSION=$(grep ^CONFIG_LOCALVERSION $objtree/.config | sed -e "s/CONFIG_LOCALVERSION=\"\(.*\)\"/\1/") +PACKAGE="linux${LOCALVERSION}" +VERSION=${KERNELVERSION} +V=$KERNELRELEASE +DIR="$objtree/taz/$PACKAGE-$VERSION" +fs="$DIR/fs" + +# Setup directories +rm -rf "$objtree/taz" +mkdir -p "$fs/lib" "$fs/boot" + +# Build and install kernel +cp System.map "$fs/boot/System.map-$KERNELRELEASE" +cp $KBUILD_IMAGE "$fs/boot/vmlinuz-$KERNELRELEASE" + +# Build and compress modules if needed +if grep -q '^CONFIG_MODULES=y' .config ; then + INSTALL_MOD_PATH="$fs" make KBUILD_SRC= modules_install + $objtree/slitaz/gztazmod.sh $fs/lib/modules/${VERSION}${LOCALVERSION} +fi + +# Create Slitaz package +cat > $DIR/receipt <> \$1/boot/grub/menu.lst + fi + + # Display information message. + echo " +---- +GRUB is installed, these tree lines must be in your /boot/grub/menu.lst: + +title SliTaz GNU/Linux (Kernel $V) +\$grub_dev +kernel /boot/vmlinuz-$V root=\$root_dev +---- +" + fi +} +EOT + +# Pack +cd $objtree/taz +tazpkg pack $PACKAGE-$VERSION +mv *.tazpkg $objtree +cd - +exit 0 diff -r 116984a54f50 -r 30b01dd8b4b3 linux-source/stuff/make-tazpkg.u --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/linux-source/stuff/make-tazpkg.u Sat Dec 26 11:02:36 2009 +0100 @@ -0,0 +1,24 @@ +--- linux-2.6.30.6-slitaz.ori/scripts/package/Makefile Wed Sep 9 05:39:34 2009 ++++ linux-2.6.30.6-slitaz/scripts/package/Makefile Fri Dec 25 22:03:55 2009 +@@ -83,7 +83,15 @@ + + clean-dirs += $(objtree)/tar-install/ + ++# tazpkg target ++# --------------------------------------------------------------------------- ++tazpkg: FORCE ++ $(MAKE) KBUILD_SRC= ++ $(CONFIG_SHELL) $(srctree)/scripts/package/buildtaz + ++clean-dirs += $(objtree)/taz/ ++ ++ + # Help text displayed when executing 'make help' + # --------------------------------------------------------------------------- + help: FORCE +@@ -93,4 +101,5 @@ + @echo ' tar-pkg - Build the kernel as an uncompressed tarball' + @echo ' targz-pkg - Build the kernel as a gzip compressed tarball' + @echo ' tarbz2-pkg - Build the kernel as a bzip2 compressed tarball' ++ @echo ' tazpkg - Build the kernel as a SliTaz package' +