<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>SlackWiki - User contributions [en]</title>
		<link>https://www.slackwiki.com/Special:Contributions/Dive</link>
		<description>User contributions</description>
		<language>en</language>
		<generator>MediaWiki 1.40.0</generator>
		<lastBuildDate>Sat, 02 May 2026 10:20:58 GMT</lastBuildDate>
		<item>
			<title>Utf-8 linux console</title>
			<link>https://www.slackwiki.com/index.php?title=Utf-8_linux_console&amp;diff=907</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Utf-8_linux_console&amp;diff=907</guid>
			<description>&lt;p&gt;Dive: /* A Quick Look at Using UTF-8 in the Linux Console (without X) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Tutorials]]&lt;br /&gt;
''by Dive''&lt;br /&gt;
&lt;br /&gt;
== A Quick Look at Using UTF-8 in the Linux Console (without X) ==&lt;br /&gt;
&lt;br /&gt;
	A few people have asked about this in ##slackware lately so I though I'd put down a few notes on how I got utf-8 up and running. Feel free to add any further info. &lt;br /&gt;
&lt;br /&gt;
	In these days of high powered X desktop environments with all their flashy composite bells and whistles it may seem strange to worry about how the plain Linux console behaves, but we need to remember that there are some very nice applications that live in the console and can be just as (or even more) productive than the X Windows counterparts. I'm thinking of screen, irssi, mutt, elinks, vim/vi, mplayer (using svga), links, zgv and slrn to name but a few. And of course we have to mention Slackware tools like pgktool, slackpkg and sbopkg. Once you get hooked on using the console it is hard to go back.&lt;br /&gt;
	Anyway here we go ...&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	The first thing to do is configure the console. There is a kernel parameter we can add to &lt;br /&gt;
/etc/lilo.conf to do this:&lt;br /&gt;
&lt;br /&gt;
append=&amp;quot;vt.default_utf8=1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Here's an example from mine:&lt;br /&gt;
&lt;br /&gt;
  # Linux bootable partition config begins&lt;br /&gt;
  image = /boot/vmlinuz-2.6.27.7-custom&lt;br /&gt;
  root = /dev/hda1&lt;br /&gt;
  label = Linux-custom&lt;br /&gt;
  append=&amp;quot;resume=/dev/hda2 vt.default_utf8=1&amp;quot;&lt;br /&gt;
  read-only&lt;br /&gt;
  # Linux bootable partition config ends&lt;br /&gt;
&lt;br /&gt;
Once you have saved lilo.conf and run '''lilo''' a quick reboot is needed.&lt;br /&gt;
&lt;br /&gt;
== LANG environment variable ==&lt;br /&gt;
&lt;br /&gt;
I find that typing multibyte characters like &amp;quot;ä&amp;quot; and erasing them with backspace, I can erase much more than what I wrote. It helps to set the LANG variable, preferably by editing /etc/profile.d/lang.sh (or lang.csh) to set it to en_US.UTF-8 or similar.&lt;br /&gt;
&lt;br /&gt;
== Fonts ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	After that we need to find a font that actually contains the characters you want to see. My 'font of the moment' is lat9w-16. This contains the British £ (pound) and € (euro) symbols that I need, plus a lot of useful accented characters. But what is just as important are the correct drawing characters so that curses programs like pkgtool and sbopkg are printed on the screen correctly. If you experiment with the '''setconsolefont''' command you will find that some fonts draw curses box borders as squares or question marks, so check out some fonts and see which ones work and which don't.&lt;br /&gt;
	The '''setconsolefont''' command will put your chosen font into /etc/rc.d/rc.font so it will load at bootup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Keyboard ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	Ok, great you can now read characters correctly, but you need the correct keymap to be able to type them. That's a little harder. If you can find a utf-8 keymap for your locale/hardware then that's fine. Personally I didn't find any of the installed keymaps suitable so I looked around for an alternative. I found a uk-utf8 keymap on the intertubes, but this was unfortunately missing all the Ctrl+[a-z] keys so I edited it and added my own. I also added some AltGr+[a-z] (well not all of those) for accented characters. You may find this keymap useful as a starting point to create your own if you cannot find a more suitable one. Have a look through the comments and the codes and you should pick up the method.&lt;br /&gt;
	To add your own combinations you will need to know the correct codes for the characters you need. You can find a table of utf-8 characters here:&lt;br /&gt;
&lt;br /&gt;
[http://home.tiscali.nl/t876506/utf8tbl.html]http://home.tiscali.nl/t876506/utf8tbl.html&lt;br /&gt;
&lt;br /&gt;
Look up the code in that table and convert it to hex. E.G.&lt;br /&gt;
è is 232 in decimal, E8 in hex; é is code 233 in decimal, E9 in hex, so the entry in your keymap should be:&lt;br /&gt;
&lt;br /&gt;
  # key      = normal   shifted   AltGr+e   AltGr+shift+e&lt;br /&gt;
  keycode 18 = e        E         U+00E8    U+00E9&lt;br /&gt;
  # prints:    e        E         è         é  &lt;br /&gt;
&lt;br /&gt;
You can find the keycodes with the '''showkey''' program. Once edited you can load the map with the '''loadkeys''' program. Loadkeys will update /etc/rc.d/rc.keymap but you will need to copy the keymap to /usr/share/kbd/keymaps/i386/qwerty/ so it is found on bootup. Here is a link to my updated uk-utf8 map:&lt;br /&gt;
&lt;br /&gt;
[http://www.unrealize.co.uk/source/uk-utf.map.gz]http://www.unrealize.co.uk/source/uk-utf.map.gz&lt;br /&gt;
&lt;br /&gt;
You can load this ungzipped but it's better to gzip it back after editing to keep things consistent.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	By now you should have a fully usable keyboard/console correctly printing unicode characters. You will probably need to tell some programs like mutt and irrsi that you are using a utf-8 system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: There exists two shell scripts - '''unicode_start''' and '''unicode_stop'''. Typing '''unicode_start [font]''' will load the required font and set up keyboard correctly for unicode input.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bye for now,&lt;br /&gt;
&lt;br /&gt;
[[User:Dive|Dive]] 02:33, 20 March 2009 (UTC)&lt;/div&gt;</description>
			<pubDate>Fri, 09 May 2014 17:36:30 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Utf-8_linux_console</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=564</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=564</guid>
			<description>&lt;p&gt;Dive: /* Creating a Custom Package of Kernel and Modules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.com/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.com/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.com/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does almost the same thing, although the output might not be exactly what you expect. I will not be using that option here, but see the discussion page about that.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy your .config into the source directory and do &lt;br /&gt;
   &lt;br /&gt;
   make menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
You '''may''' need to do 'make mrproper' first, and perhaps 'make oldconfig'.&lt;br /&gt;
&lt;br /&gt;
   make&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' or 'make modules_install', even with '''O''' switch, as this *will* install to /boot and /lib/modules.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the source directory. The file '''modules.order''' lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(sed &amp;quot;s#^kernel/##&amp;quot; modules.order)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/install&lt;br /&gt;
&lt;br /&gt;
doinst.sh:&lt;br /&gt;
&lt;br /&gt;
   ## Taken from stock modules package&lt;br /&gt;
   if [ -x sbin/depmod ]; then&lt;br /&gt;
   chroot . /sbin/depmod -a 2.6.29.6-jabberwok &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
   fi&lt;br /&gt;
   &lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf source )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok source )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6-i686-1_tag.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using (run make menuconfig first):&lt;br /&gt;
&lt;br /&gt;
    #!/bin/sh&lt;br /&gt;
    # Slackware build script for kernel and modules&lt;br /&gt;
    #&lt;br /&gt;
    # Copyright 2009-2010  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
    # All rights reserved.&lt;br /&gt;
    #&lt;br /&gt;
    # Redistribution and use of this script, with or without modification, is&lt;br /&gt;
    # permitted provided that the following conditions are met:&lt;br /&gt;
    #&lt;br /&gt;
    # 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
    #    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
    #&lt;br /&gt;
    # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
    # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
    # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
    # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
    # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
    # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
    # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
    # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
    # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
    # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
    # &lt;br /&gt;
    # Notes: &lt;br /&gt;
    # You should have a /usr/src/linux-$VERSION-$LOCALNAME of source or you will &lt;br /&gt;
    # have problems.&lt;br /&gt;
    # Do not omit setting localname in .config.&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    source ./.config&lt;br /&gt;
    LOCALNAME=${LOCALNAME:-${CONFIG_LOCALVERSION/-/}}&lt;br /&gt;
    if [ -z &amp;quot;$ARCH&amp;quot; ]; then&lt;br /&gt;
      case &amp;quot;$( uname -m )&amp;quot; in&lt;br /&gt;
        i?86) ARCH=i486 ;;                      &lt;br /&gt;
        arm*) ARCH=arm ;;                       &lt;br /&gt;
           *) ARCH=$( uname -m ) ;;&lt;br /&gt;
      esac&lt;br /&gt;
    fi&lt;br /&gt;
    KARCH=$ARCH&lt;br /&gt;
    ARCH=x86&lt;br /&gt;
    MODULELIST=modules.order&lt;br /&gt;
    PRGNAM=kernel&lt;br /&gt;
    VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
    BUILD=${BUILD:-1}&lt;br /&gt;
    TAG=${TAG:-_daw}&lt;br /&gt;
    OUTPUT=${TMP:-/tmp}&lt;br /&gt;
    PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
    MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
    &lt;br /&gt;
    set -e&lt;br /&gt;
    &lt;br /&gt;
    rm -rf $PKG &lt;br /&gt;
    &lt;br /&gt;
    make&lt;br /&gt;
    &lt;br /&gt;
    for i in $(sed &amp;quot;s#^kernel/##&amp;quot; $MODULELIST)&lt;br /&gt;
    do&lt;br /&gt;
        mkdir -p $MODDIR/$(dirname $i)&lt;br /&gt;
        install -m 644 -v $i $MODDIR/$(dirname $i)&lt;br /&gt;
        let nummods=$nummods+1&lt;br /&gt;
    done&lt;br /&gt;
    &lt;br /&gt;
    mkdir -p $PKG/install&lt;br /&gt;
    &lt;br /&gt;
    cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
    ## Taken from stock modules package&lt;br /&gt;
    if [ -x sbin/depmod ]; then&lt;br /&gt;
    chroot . /sbin/depmod -a $VERSION-$LOCALNAME &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
    fi&lt;br /&gt;
    &lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; rm -rf build )&lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; ln -sf /usr/src/linux-$VERSION-$LOCALNAME build )&lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; rm -rf source )&lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; ln -sf /usr/src/linux-$VERSION-$LOCALNAME source )&lt;br /&gt;
    EOF&lt;br /&gt;
    &lt;br /&gt;
    cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
    # HOW TO EDIT THIS FILE:&lt;br /&gt;
    # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
    # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
    # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
    # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
    # customary to leave one space after the ':'.&lt;br /&gt;
    &lt;br /&gt;
    $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
    $PRGNAM-$LOCALNAME: kernel and modules for $LOCALNAME-$VERSION&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    EOF&lt;br /&gt;
    &lt;br /&gt;
    mkdir -p $PKG/boot&lt;br /&gt;
    &lt;br /&gt;
    cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
    cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
    cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
    &lt;br /&gt;
    ksize=$(ls -l arch/x86/boot/bzImage | awk '{print $5}')&lt;br /&gt;
    &lt;br /&gt;
    cd $PKG&lt;br /&gt;
    &lt;br /&gt;
    PACKAGE=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION-$KARCH-$BUILD-$TAG.${PKGTYPE:-tgz}&lt;br /&gt;
    &lt;br /&gt;
    /sbin/makepkg -l y -c n $PACKAGE&lt;br /&gt;
    &lt;br /&gt;
    echo -ne '\e[01;34m'&lt;br /&gt;
    printf &amp;quot;$nummods Modules Built\n&amp;quot;&lt;br /&gt;
    printf &amp;quot;Kernel Size: $ksize\n&amp;quot;&lt;br /&gt;
    printf &amp;quot;Package Size: $(ls -l $PACKAGE | awk '{print $5}')\n\n&amp;quot;&lt;br /&gt;
    echo -ne '\e[m\017'&lt;br /&gt;
&lt;br /&gt;
Downloadable version: http://www.dawoodfall.net/slackbuilds/noversion/kernel/&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Fri, 09 Dec 2011 12:15:20 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=563</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=563</guid>
			<description>&lt;p&gt;Dive: /* Creating a Custom Package of Kernel and Modules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does almost the same thing, although the output might not be exactly what you expect. I will not be using that option here, but see the discussion page about that.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy your .config into the source directory and do &lt;br /&gt;
   &lt;br /&gt;
   make menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
You '''may''' need to do 'make mrproper' first, and perhaps 'make oldconfig'.&lt;br /&gt;
&lt;br /&gt;
   make&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' or 'make modules_install', even with '''O''' switch, as this *will* install to /boot and /lib/modules.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the source directory. The file '''modules.order''' lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(sed &amp;quot;s#^kernel/##&amp;quot; modules.order)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/install&lt;br /&gt;
&lt;br /&gt;
doinst.sh:&lt;br /&gt;
&lt;br /&gt;
   ## Taken from stock modules package&lt;br /&gt;
   if [ -x sbin/depmod ]; then&lt;br /&gt;
   chroot . /sbin/depmod -a 2.6.29.6-jabberwok &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
   fi&lt;br /&gt;
   &lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf source )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok source )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6-i686-1_tag.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using (run make menuconfig first):&lt;br /&gt;
&lt;br /&gt;
    #!/bin/sh&lt;br /&gt;
    # Slackware build script for kernel and modules&lt;br /&gt;
    #&lt;br /&gt;
    # Copyright 2009-2010  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
    # All rights reserved.&lt;br /&gt;
    #&lt;br /&gt;
    # Redistribution and use of this script, with or without modification, is&lt;br /&gt;
    # permitted provided that the following conditions are met:&lt;br /&gt;
    #&lt;br /&gt;
    # 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
    #    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
    #&lt;br /&gt;
    # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
    # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
    # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
    # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
    # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
    # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
    # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
    # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
    # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
    # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
    # &lt;br /&gt;
    # Notes: &lt;br /&gt;
    # You should have a /usr/src/linux-$VERSION-$LOCALNAME of source or you will &lt;br /&gt;
    # have problems.&lt;br /&gt;
    # Do not omit setting localname in .config.&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    source ./.config&lt;br /&gt;
    LOCALNAME=${LOCALNAME:-${CONFIG_LOCALVERSION/-/}}&lt;br /&gt;
    if [ -z &amp;quot;$ARCH&amp;quot; ]; then&lt;br /&gt;
      case &amp;quot;$( uname -m )&amp;quot; in&lt;br /&gt;
        i?86) ARCH=i486 ;;                      &lt;br /&gt;
        arm*) ARCH=arm ;;                       &lt;br /&gt;
           *) ARCH=$( uname -m ) ;;&lt;br /&gt;
      esac&lt;br /&gt;
    fi&lt;br /&gt;
    KARCH=$ARCH&lt;br /&gt;
    ARCH=x86&lt;br /&gt;
    MODULELIST=modules.order&lt;br /&gt;
    PRGNAM=kernel&lt;br /&gt;
    VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
    BUILD=${BUILD:-1}&lt;br /&gt;
    TAG=${TAG:-_daw}&lt;br /&gt;
    OUTPUT=${TMP:-/tmp}&lt;br /&gt;
    PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
    MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
    &lt;br /&gt;
    set -e&lt;br /&gt;
    &lt;br /&gt;
    rm -rf $PKG &lt;br /&gt;
    &lt;br /&gt;
    make&lt;br /&gt;
    &lt;br /&gt;
    for i in $(sed &amp;quot;s#^kernel/##&amp;quot; $MODULELIST)&lt;br /&gt;
    do&lt;br /&gt;
        mkdir -p $MODDIR/$(dirname $i)&lt;br /&gt;
        install -m 644 -v $i $MODDIR/$(dirname $i)&lt;br /&gt;
        let nummods=$nummods+1&lt;br /&gt;
    done&lt;br /&gt;
    &lt;br /&gt;
    mkdir -p $PKG/install&lt;br /&gt;
    &lt;br /&gt;
    cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
    ## Taken from stock modules package&lt;br /&gt;
    if [ -x sbin/depmod ]; then&lt;br /&gt;
    chroot . /sbin/depmod -a $VERSION-$LOCALNAME &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
    fi&lt;br /&gt;
    &lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; rm -rf build )&lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; ln -sf /usr/src/linux-$VERSION-$LOCALNAME build )&lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; rm -rf source )&lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; ln -sf /usr/src/linux-$VERSION-$LOCALNAME source )&lt;br /&gt;
    EOF&lt;br /&gt;
    &lt;br /&gt;
    cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
    # HOW TO EDIT THIS FILE:&lt;br /&gt;
    # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
    # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
    # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
    # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
    # customary to leave one space after the ':'.&lt;br /&gt;
    &lt;br /&gt;
    $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
    $PRGNAM-$LOCALNAME: kernel and modules for $LOCALNAME-$VERSION&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    EOF&lt;br /&gt;
    &lt;br /&gt;
    mkdir -p $PKG/boot&lt;br /&gt;
    &lt;br /&gt;
    cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
    cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
    cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
    &lt;br /&gt;
    ksize=$(ls -l arch/x86/boot/bzImage | awk '{print $5}')&lt;br /&gt;
    &lt;br /&gt;
    cd $PKG&lt;br /&gt;
    &lt;br /&gt;
    PACKAGE=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION-$KARCH-$BUILD-$TAG.${PKGTYPE:-tgz}&lt;br /&gt;
    &lt;br /&gt;
    /sbin/makepkg -l y -c n $PACKAGE&lt;br /&gt;
    &lt;br /&gt;
    echo -ne '\e[01;34m'&lt;br /&gt;
    printf &amp;quot;$nummods Modules Built\n&amp;quot;&lt;br /&gt;
    printf &amp;quot;Kernel Size: $ksize\n&amp;quot;&lt;br /&gt;
    printf &amp;quot;Package Size: $(ls -l $PACKAGE | awk '{print $5}')\n\n&amp;quot;&lt;br /&gt;
    echo -ne '\e[m\017'&lt;br /&gt;
&lt;br /&gt;
Downloadable version: http://www.dawoodfall.net/slackbuilds/noversion/kernel/&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Fri, 09 Dec 2011 12:14:38 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Dual Booting With FreeBSD 9</title>
			<link>https://www.slackwiki.com/index.php?title=Dual_Booting_With_FreeBSD_9&amp;diff=538</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Dual_Booting_With_FreeBSD_9&amp;diff=538</guid>
			<description>&lt;p&gt;Dive: /* Custom Rule */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
FreeBSD 9+ differs from older releases by using GPT (GUID Partition Table). This means that lilo and grub version 1 will no longer work. Grub version 2 however does work.&lt;br /&gt;
&lt;br /&gt;
There are two way of doings this - either install grub2 in Slackware, or install it in FreeBSD. Grub2 in Slackware does not seem to be able to pick up the FreeBSD partition and Grub2 in FreeBSD doesn't seem to pick up the Linux partitions. You will need to manually add these to /usr/local/etc/grub.d/40_custom.&lt;br /&gt;
&lt;br /&gt;
To pick up all your Slackware kernels it's probably best to install grub2 in Slackware and add the FreeBSD partition manually. I've shown both methods here though, for completeness.&lt;br /&gt;
&lt;br /&gt;
For this howto we'll assume that Slackware / is on /dev/sda2 (with no separate /boot partition), and that FreeBSD is on /dev/sdb2 (/dev/ada1p2 in FreeBSD-speak). These correspond to (hd0,2) and (hd1,2) in Grub2.&lt;br /&gt;
&lt;br /&gt;
=To install Grub2 in Slackware=&lt;br /&gt;
&lt;br /&gt;
To install Grub2 in Slackware, you can use the slackbuild script here:&lt;br /&gt;
http://slackbuilds.org/repository/13.37/system/grub2/ and its dependencies. Once installed, issue:&lt;br /&gt;
&lt;br /&gt;
    # grub-install --modules=part_gpt /dev/sda&lt;br /&gt;
&lt;br /&gt;
Edit /etc/grub.d/40_custom to add your FreeBSD partition (see mine below for an example). Once done:&lt;br /&gt;
&lt;br /&gt;
    # grub-mkconfig -o /boot/grub/grub.cfg&lt;br /&gt;
&lt;br /&gt;
grub-mkconfig will pickup all your Linux partitions and all kernels (hopefully).&lt;br /&gt;
&lt;br /&gt;
=To install in FreeBSD=&lt;br /&gt;
&lt;br /&gt;
To install Grub2 in FreeBSD, you need to use ports.&lt;br /&gt;
&lt;br /&gt;
I won't give an extended howto on using ports but these are the steps:&lt;br /&gt;
&lt;br /&gt;
Fire up your FreeBSD system and navigate your way to /usr/ports/sysutils/grub2 as root&lt;br /&gt;
&lt;br /&gt;
    # make install &amp;amp;&amp;amp; rm -rf work&lt;br /&gt;
    # grub-install --modules=part_gpt /dev/ad0&lt;br /&gt;
&lt;br /&gt;
Edit /usr/local/etc/grub.d/40_custom to add your Slackware partition (see mine below for an example). Once done:&lt;br /&gt;
&lt;br /&gt;
    # grub-mkconfig -o /boot/grub/grub.cfg&lt;br /&gt;
&lt;br /&gt;
grub-mkconfig will pick up FreeBSD automatically.&lt;br /&gt;
/usr/local/etc/grub.d/40_custom will contain the extra OS's and FreeBSD boot loader if req'd.&lt;br /&gt;
&lt;br /&gt;
=Custom Rule=&lt;br /&gt;
This is my 40_custom:&lt;br /&gt;
&lt;br /&gt;
    #!/bin/sh&lt;br /&gt;
      exec tail -n +3 $0&lt;br /&gt;
      # This file provides an easy way to add custom menu entries.  Simply type the&lt;br /&gt;
      # menu entries you want to add after this comment.  Be careful not to change&lt;br /&gt;
      # the 'exec tail' line above.&lt;br /&gt;
    &lt;br /&gt;
      menuentry 'Slackware' --class slackware --class gnu-linux --class os {&lt;br /&gt;
          insmod gzio&lt;br /&gt;
          insmod part_msdos&lt;br /&gt;
          insmod ext2&lt;br /&gt;
          set root='(hd0,2)'&lt;br /&gt;
          linux   /boot/vmlinuz root=/dev/sdb2 ro&lt;br /&gt;
      }&lt;br /&gt;
    &lt;br /&gt;
      menuentry &amp;quot;FreeBSD&amp;quot; --class freebsd --class bsd --class os {&lt;br /&gt;
          insmod ufs2&lt;br /&gt;
          set root='(hd1,2)'&lt;br /&gt;
          kfreebsd                /boot/loader&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
(You choose which section you want to add - FreeBSD or Slackware - depending on where you installed Grub2.)&lt;br /&gt;
&lt;br /&gt;
That's pretty much it.&lt;br /&gt;
&lt;br /&gt;
=Notes=&lt;br /&gt;
&lt;br /&gt;
The Slackware partition uses ext4 and the huge kernel with no initrd. For, say, xfs you should use 'insmod xfs'. For an initrd you need to look up the appropriate docs.&lt;br /&gt;
&lt;br /&gt;
Caveat: This was tested on FreeBSD 9.0Beta3. I can't see that it wouldn't work when release is out but you never know.&lt;br /&gt;
&lt;br /&gt;
[[User:Dive|Dive]]&lt;/div&gt;</description>
			<pubDate>Tue, 25 Oct 2011 11:08:23 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Dual_Booting_With_FreeBSD_9</comments>
		</item>
		<item>
			<title>Dual Booting With FreeBSD 9</title>
			<link>https://www.slackwiki.com/index.php?title=Dual_Booting_With_FreeBSD_9&amp;diff=537</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Dual_Booting_With_FreeBSD_9&amp;diff=537</guid>
			<description>&lt;p&gt;Dive: /* Custom Rule */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
FreeBSD 9+ differs from older releases by using GPT (GUID Partition Table). This means that lilo and grub version 1 will no longer work. Grub version 2 however does work.&lt;br /&gt;
&lt;br /&gt;
There are two way of doings this - either install grub2 in Slackware, or install it in FreeBSD. Grub2 in Slackware does not seem to be able to pick up the FreeBSD partition and Grub2 in FreeBSD doesn't seem to pick up the Linux partitions. You will need to manually add these to /usr/local/etc/grub.d/40_custom.&lt;br /&gt;
&lt;br /&gt;
To pick up all your Slackware kernels it's probably best to install grub2 in Slackware and add the FreeBSD partition manually. I've shown both methods here though, for completeness.&lt;br /&gt;
&lt;br /&gt;
For this howto we'll assume that Slackware / is on /dev/sda2 (with no separate /boot partition), and that FreeBSD is on /dev/sdb2 (/dev/ada1p2 in FreeBSD-speak). These correspond to (hd0,2) and (hd1,2) in Grub2.&lt;br /&gt;
&lt;br /&gt;
=To install Grub2 in Slackware=&lt;br /&gt;
&lt;br /&gt;
To install Grub2 in Slackware, you can use the slackbuild script here:&lt;br /&gt;
http://slackbuilds.org/repository/13.37/system/grub2/ and its dependencies. Once installed, issue:&lt;br /&gt;
&lt;br /&gt;
    # grub-install --modules=part_gpt /dev/sda&lt;br /&gt;
&lt;br /&gt;
Edit /etc/grub.d/40_custom to add your FreeBSD partition (see mine below for an example). Once done:&lt;br /&gt;
&lt;br /&gt;
    # grub-mkconfig -o /boot/grub/grub.cfg&lt;br /&gt;
&lt;br /&gt;
grub-mkconfig will pickup all your Linux partitions and all kernels (hopefully).&lt;br /&gt;
&lt;br /&gt;
=To install in FreeBSD=&lt;br /&gt;
&lt;br /&gt;
To install Grub2 in FreeBSD, you need to use ports.&lt;br /&gt;
&lt;br /&gt;
I won't give an extended howto on using ports but these are the steps:&lt;br /&gt;
&lt;br /&gt;
Fire up your FreeBSD system and navigate your way to /usr/ports/sysutils/grub2 as root&lt;br /&gt;
&lt;br /&gt;
    # make install &amp;amp;&amp;amp; rm -rf work&lt;br /&gt;
    # grub-install --modules=part_gpt /dev/ad0&lt;br /&gt;
&lt;br /&gt;
Edit /usr/local/etc/grub.d/40_custom to add your Slackware partition (see mine below for an example). Once done:&lt;br /&gt;
&lt;br /&gt;
    # grub-mkconfig -o /boot/grub/grub.cfg&lt;br /&gt;
&lt;br /&gt;
grub-mkconfig will pick up FreeBSD automatically.&lt;br /&gt;
/usr/local/etc/grub.d/40_custom will contain the extra OS's and FreeBSD boot loader if req'd.&lt;br /&gt;
&lt;br /&gt;
=Custom Rule=&lt;br /&gt;
This is my 40_custom:&lt;br /&gt;
&lt;br /&gt;
    #!/bin/sh&lt;br /&gt;
      exec tail -n +3 $0&lt;br /&gt;
      # This file provides an easy way to add custom menu entries.  Simply type the&lt;br /&gt;
      # menu entries you want to add after this comment.  Be careful not to change&lt;br /&gt;
      # the 'exec tail' line above.&lt;br /&gt;
    &lt;br /&gt;
      menuentry 'Slackware' --class slackware --class gnu-linux --class os {&lt;br /&gt;
          insmod gzio&lt;br /&gt;
          insmod part_msdos&lt;br /&gt;
          insmod ext2&lt;br /&gt;
          set root='(hd0,2)'&lt;br /&gt;
          linux   /boot/vmlinuz root=/dev/sdb2 ro&lt;br /&gt;
      }&lt;br /&gt;
    &lt;br /&gt;
      menuentry &amp;quot;FreeBSD --class freebsd --class bsd --class os {&lt;br /&gt;
          insmod ufs2&lt;br /&gt;
          set root='(hd1,2)'&lt;br /&gt;
          kfreebsd                /boot/loader&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
(You choose which section you want to add - FreeBSD or Slackware - depending on where you installed Grub2.)&lt;br /&gt;
&lt;br /&gt;
That's pretty much it.&lt;br /&gt;
&lt;br /&gt;
=Notes=&lt;br /&gt;
&lt;br /&gt;
The Slackware partition uses ext4 and the huge kernel with no initrd. For, say, xfs you should use 'insmod xfs'. For an initrd you need to look up the appropriate docs.&lt;br /&gt;
&lt;br /&gt;
Caveat: This was tested on FreeBSD 9.0Beta3. I can't see that it wouldn't work when release is out but you never know.&lt;br /&gt;
&lt;br /&gt;
[[User:Dive|Dive]]&lt;/div&gt;</description>
			<pubDate>Tue, 25 Oct 2011 11:07:51 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Dual_Booting_With_FreeBSD_9</comments>
		</item>
		<item>
			<title>Dual Booting With FreeBSD 9</title>
			<link>https://www.slackwiki.com/index.php?title=Dual_Booting_With_FreeBSD_9&amp;diff=536</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Dual_Booting_With_FreeBSD_9&amp;diff=536</guid>
			<description>&lt;p&gt;Dive: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
FreeBSD 9+ differs from older releases by using GPT (GUID Partition Table). This means that lilo and grub version 1 will no longer work. Grub version 2 however does work.&lt;br /&gt;
&lt;br /&gt;
There are two way of doings this - either install grub2 in Slackware, or install it in FreeBSD. Grub2 in Slackware does not seem to be able to pick up the FreeBSD partition and Grub2 in FreeBSD doesn't seem to pick up the Linux partitions. You will need to manually add these to /usr/local/etc/grub.d/40_custom.&lt;br /&gt;
&lt;br /&gt;
To pick up all your Slackware kernels it's probably best to install grub2 in Slackware and add the FreeBSD partition manually. I've shown both methods here though, for completeness.&lt;br /&gt;
&lt;br /&gt;
For this howto we'll assume that Slackware / is on /dev/sda2 (with no separate /boot partition), and that FreeBSD is on /dev/sdb2 (/dev/ada1p2 in FreeBSD-speak). These correspond to (hd0,2) and (hd1,2) in Grub2.&lt;br /&gt;
&lt;br /&gt;
=To install Grub2 in Slackware=&lt;br /&gt;
&lt;br /&gt;
To install Grub2 in Slackware, you can use the slackbuild script here:&lt;br /&gt;
http://slackbuilds.org/repository/13.37/system/grub2/ and its dependencies. Once installed, issue:&lt;br /&gt;
&lt;br /&gt;
    # grub-install --modules=part_gpt /dev/sda&lt;br /&gt;
&lt;br /&gt;
Edit /etc/grub.d/40_custom to add your FreeBSD partition (see mine below for an example). Once done:&lt;br /&gt;
&lt;br /&gt;
    # grub-mkconfig -o /boot/grub/grub.cfg&lt;br /&gt;
&lt;br /&gt;
grub-mkconfig will pickup all your Linux partitions and all kernels (hopefully).&lt;br /&gt;
&lt;br /&gt;
=To install in FreeBSD=&lt;br /&gt;
&lt;br /&gt;
To install Grub2 in FreeBSD, you need to use ports.&lt;br /&gt;
&lt;br /&gt;
I won't give an extended howto on using ports but these are the steps:&lt;br /&gt;
&lt;br /&gt;
Fire up your FreeBSD system and navigate your way to /usr/ports/sysutils/grub2 as root&lt;br /&gt;
&lt;br /&gt;
    # make install &amp;amp;&amp;amp; rm -rf work&lt;br /&gt;
    # grub-install --modules=part_gpt /dev/ad0&lt;br /&gt;
&lt;br /&gt;
Edit /usr/local/etc/grub.d/40_custom to add your Slackware partition (see mine below for an example). Once done:&lt;br /&gt;
&lt;br /&gt;
    # grub-mkconfig -o /boot/grub/grub.cfg&lt;br /&gt;
&lt;br /&gt;
grub-mkconfig will pick up FreeBSD automatically.&lt;br /&gt;
/usr/local/etc/grub.d/40_custom will contain the extra OS's and FreeBSD boot loader if req'd.&lt;br /&gt;
&lt;br /&gt;
=Custom Rule=&lt;br /&gt;
This is my 40_custom:&lt;br /&gt;
&lt;br /&gt;
    #!/bin/sh&lt;br /&gt;
      exec tail -n +3 $0&lt;br /&gt;
      # This file provides an easy way to add custom menu entries.  Simply type the&lt;br /&gt;
      # menu entries you want to add after this comment.  Be careful not to change&lt;br /&gt;
      # the 'exec tail' line above.&lt;br /&gt;
    &lt;br /&gt;
      menuentry 'Slackware' --class slackware --class gnu-linux --class os {&lt;br /&gt;
          insmod gzio&lt;br /&gt;
          insmod part_msdos&lt;br /&gt;
          insmod ext2&lt;br /&gt;
          set root='(hd0,2)'&lt;br /&gt;
          linux   /boot/vmlinuz root=/dev/sdb2 ro&lt;br /&gt;
      }&lt;br /&gt;
    &lt;br /&gt;
      menuentry &amp;quot;FreeBSD /boot/loader&amp;quot; --class freebsd --class bsd --class os {&lt;br /&gt;
              insmod ufs2&lt;br /&gt;
              set root='(hd1,2)'&lt;br /&gt;
              kfreebsd                /boot/loader&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
(You choose which section you want to add - FreeBSD or Slackware - depending on where you installed Grub2.)&lt;br /&gt;
&lt;br /&gt;
That's pretty much it.&lt;br /&gt;
&lt;br /&gt;
=Notes=&lt;br /&gt;
&lt;br /&gt;
The Slackware partition uses ext4 and the huge kernel with no initrd. For, say, xfs you should use 'insmod xfs'. For an initrd you need to look up the appropriate docs.&lt;br /&gt;
&lt;br /&gt;
Caveat: This was tested on FreeBSD 9.0Beta3. I can't see that it wouldn't work when release is out but you never know.&lt;br /&gt;
&lt;br /&gt;
[[User:Dive|Dive]]&lt;/div&gt;</description>
			<pubDate>Tue, 25 Oct 2011 10:55:53 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Dual_Booting_With_FreeBSD_9</comments>
		</item>
		<item>
			<title>Dual Booting With FreeBSD 9+</title>
			<link>https://www.slackwiki.com/index.php?title=Dual_Booting_With_FreeBSD_9%2B&amp;diff=535</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Dual_Booting_With_FreeBSD_9%2B&amp;diff=535</guid>
			<description>&lt;p&gt;Dive: moved Dual Booting With FreeBSD 9+ to Dual Booting With FreeBSD 9: + messes up the link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Dual Booting With FreeBSD 9]]&lt;/div&gt;</description>
			<pubDate>Tue, 25 Oct 2011 09:59:02 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Dual_Booting_With_FreeBSD_9%2B</comments>
		</item>
		<item>
			<title>Dual Booting With FreeBSD 9</title>
			<link>https://www.slackwiki.com/index.php?title=Dual_Booting_With_FreeBSD_9&amp;diff=534</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Dual_Booting_With_FreeBSD_9&amp;diff=534</guid>
			<description>&lt;p&gt;Dive: moved Dual Booting With FreeBSD 9+ to Dual Booting With FreeBSD 9: + messes up the link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
FreeBSD 9+ differs from older releases by using GPT (GUID Partition Table). This means that lilo and grub version 1 will no longer work. Grub version 2 however does work.&lt;br /&gt;
&lt;br /&gt;
There are two way of doings this - either install grub2 in Slackware, or install it in FreeBSD. Grub2 in Slackware does not seem to be able to pick up the FreeBSD partition and Grub2 in FreeBSD doesn't seem to pick up the Linux partitions. You will need to manually add these to /usr/local/etc/grub.d/40_custom.&lt;br /&gt;
&lt;br /&gt;
To pick up all your Slackware kernels it's probably best to install grub2 in Slackware and add the FreeBSD partition manually. I've shown both methods here though, for completeness.&lt;br /&gt;
&lt;br /&gt;
For this howto we'll assume that Slackware / is on /dev/sda2 (with no separate /boot partition), and that FreeBSD is on /dev/sdb2 (/dev/ada1p2 in FreeBSD-speak). These correspond to (hd0,2) and (hd1,2) in Grub2.&lt;br /&gt;
&lt;br /&gt;
=To install Grub2 in Slackware=&lt;br /&gt;
&lt;br /&gt;
To install Grub2 in Slackware, you can use the slackbuild script here:&lt;br /&gt;
http://slackbuilds.org/repository/13.37/system/grub2/ and its dependencies. Once installed, issue:&lt;br /&gt;
&lt;br /&gt;
    # grub-install --modules=part_gpt /dev/sda&lt;br /&gt;
&lt;br /&gt;
Edit /etc/grub.d/40_custom to add your FreeBSD partition (see mine below for an example). Once done:&lt;br /&gt;
&lt;br /&gt;
    # grub-mkconfig -o /boot/grub/grub.cfg&lt;br /&gt;
&lt;br /&gt;
grub-mkconfig will pickup all your Linux partitions and all kernels (hopefully).&lt;br /&gt;
&lt;br /&gt;
=To install in FreeBSD=&lt;br /&gt;
&lt;br /&gt;
To install Grub2 in FreeBSD, you need to use ports.&lt;br /&gt;
&lt;br /&gt;
I won't give an extended howto on using ports but these are the steps:&lt;br /&gt;
&lt;br /&gt;
Fire up your FreeBSD system and navigate your way to /usr/ports/sysutils/grub2 as root&lt;br /&gt;
&lt;br /&gt;
    # make install &amp;amp;&amp;amp; rm -rf work&lt;br /&gt;
    # grub-install --modules=part_gpt /dev/ad0&lt;br /&gt;
&lt;br /&gt;
Edit /usr/local/etc/grub.d/40_custom to add your Slackware partition (see mine below for an example). Once done:&lt;br /&gt;
&lt;br /&gt;
    # grub-mkconfig -o /boot/grub/grub.cfg&lt;br /&gt;
&lt;br /&gt;
grub-mkconfig will pick up FreeBSD automatically.&lt;br /&gt;
/usr/local/etc/grub.d/40_custom will contain the extra OS's and FreeBSD boot loader if req'd.&lt;br /&gt;
&lt;br /&gt;
=Custom Rule=&lt;br /&gt;
This is my 40_custom:&lt;br /&gt;
&lt;br /&gt;
    #!/bin/sh&lt;br /&gt;
      exec tail -n +3 $0&lt;br /&gt;
      # This file provides an easy way to add custom menu entries.  Simply type the&lt;br /&gt;
      # menu entries you want to add after this comment.  Be careful not to change&lt;br /&gt;
      # the 'exec tail' line above.&lt;br /&gt;
    &lt;br /&gt;
      menuentry 'Slackware' --class slackware --class gnu-linux --class os {&lt;br /&gt;
          insmod gzio&lt;br /&gt;
          insmod part_msdos&lt;br /&gt;
          insmod ext2&lt;br /&gt;
          set root='(hd0,2)'&lt;br /&gt;
          linux   /boot/vmlinuz root=/dev/sdb2 ro&lt;br /&gt;
      }&lt;br /&gt;
    &lt;br /&gt;
      menuentry &amp;quot;FreeBSD /boot/loader&amp;quot; --class freebsd --class bsd --class os {&lt;br /&gt;
              insmod ufs2&lt;br /&gt;
              set root='(hd1,2)'&lt;br /&gt;
              kfreebsd                /boot/loader&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
(You choose which section you want to add - FreeBSD or Slackware - depending on where you installed Grub2.)&lt;br /&gt;
&lt;br /&gt;
That's pretty much it.&lt;br /&gt;
&lt;br /&gt;
=Notes=&lt;br /&gt;
&lt;br /&gt;
My Slackware uses ext4 and a custom kernel with no initrd. For, say, xfs you should use 'insmod xfs'.&lt;br /&gt;
&lt;br /&gt;
Caveat: This was tested on FreeBSD 9.0Beta3. I can't see that it wouldn't work when release is out but you never know.&lt;br /&gt;
&lt;br /&gt;
[[User:Dive|Dive]]&lt;/div&gt;</description>
			<pubDate>Tue, 25 Oct 2011 09:59:02 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Dual_Booting_With_FreeBSD_9</comments>
		</item>
		<item>
			<title>Dual Booting With FreeBSD 9</title>
			<link>https://www.slackwiki.com/index.php?title=Dual_Booting_With_FreeBSD_9&amp;diff=533</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Dual_Booting_With_FreeBSD_9&amp;diff=533</guid>
			<description>&lt;p&gt;Dive: Created page with &amp;quot;=Introduction=  FreeBSD 9+ differs from older releases by using GPT (GUID Partition Table). This means that lilo and grub version 1 will no longer work. Grub version 2 however do...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
FreeBSD 9+ differs from older releases by using GPT (GUID Partition Table). This means that lilo and grub version 1 will no longer work. Grub version 2 however does work.&lt;br /&gt;
&lt;br /&gt;
There are two way of doings this - either install grub2 in Slackware, or install it in FreeBSD. Grub2 in Slackware does not seem to be able to pick up the FreeBSD partition and Grub2 in FreeBSD doesn't seem to pick up the Linux partitions. You will need to manually add these to /usr/local/etc/grub.d/40_custom.&lt;br /&gt;
&lt;br /&gt;
To pick up all your Slackware kernels it's probably best to install grub2 in Slackware and add the FreeBSD partition manually. I've shown both methods here though, for completeness.&lt;br /&gt;
&lt;br /&gt;
For this howto we'll assume that Slackware / is on /dev/sda2 (with no separate /boot partition), and that FreeBSD is on /dev/sdb2 (/dev/ada1p2 in FreeBSD-speak). These correspond to (hd0,2) and (hd1,2) in Grub2.&lt;br /&gt;
&lt;br /&gt;
=To install Grub2 in Slackware=&lt;br /&gt;
&lt;br /&gt;
To install Grub2 in Slackware, you can use the slackbuild script here:&lt;br /&gt;
http://slackbuilds.org/repository/13.37/system/grub2/ and its dependencies. Once installed, issue:&lt;br /&gt;
&lt;br /&gt;
    # grub-install --modules=part_gpt /dev/sda&lt;br /&gt;
&lt;br /&gt;
Edit /etc/grub.d/40_custom to add your FreeBSD partition (see mine below for an example). Once done:&lt;br /&gt;
&lt;br /&gt;
    # grub-mkconfig -o /boot/grub/grub.cfg&lt;br /&gt;
&lt;br /&gt;
grub-mkconfig will pickup all your Linux partitions and all kernels (hopefully).&lt;br /&gt;
&lt;br /&gt;
=To install in FreeBSD=&lt;br /&gt;
&lt;br /&gt;
To install Grub2 in FreeBSD, you need to use ports.&lt;br /&gt;
&lt;br /&gt;
I won't give an extended howto on using ports but these are the steps:&lt;br /&gt;
&lt;br /&gt;
Fire up your FreeBSD system and navigate your way to /usr/ports/sysutils/grub2 as root&lt;br /&gt;
&lt;br /&gt;
    # make install &amp;amp;&amp;amp; rm -rf work&lt;br /&gt;
    # grub-install --modules=part_gpt /dev/ad0&lt;br /&gt;
&lt;br /&gt;
Edit /usr/local/etc/grub.d/40_custom to add your Slackware partition (see mine below for an example). Once done:&lt;br /&gt;
&lt;br /&gt;
    # grub-mkconfig -o /boot/grub/grub.cfg&lt;br /&gt;
&lt;br /&gt;
grub-mkconfig will pick up FreeBSD automatically.&lt;br /&gt;
/usr/local/etc/grub.d/40_custom will contain the extra OS's and FreeBSD boot loader if req'd.&lt;br /&gt;
&lt;br /&gt;
=Custom Rule=&lt;br /&gt;
This is my 40_custom:&lt;br /&gt;
&lt;br /&gt;
    #!/bin/sh&lt;br /&gt;
      exec tail -n +3 $0&lt;br /&gt;
      # This file provides an easy way to add custom menu entries.  Simply type the&lt;br /&gt;
      # menu entries you want to add after this comment.  Be careful not to change&lt;br /&gt;
      # the 'exec tail' line above.&lt;br /&gt;
    &lt;br /&gt;
      menuentry 'Slackware' --class slackware --class gnu-linux --class os {&lt;br /&gt;
          insmod gzio&lt;br /&gt;
          insmod part_msdos&lt;br /&gt;
          insmod ext2&lt;br /&gt;
          set root='(hd0,2)'&lt;br /&gt;
          linux   /boot/vmlinuz root=/dev/sdb2 ro&lt;br /&gt;
      }&lt;br /&gt;
    &lt;br /&gt;
      menuentry &amp;quot;FreeBSD /boot/loader&amp;quot; --class freebsd --class bsd --class os {&lt;br /&gt;
              insmod ufs2&lt;br /&gt;
              set root='(hd1,2)'&lt;br /&gt;
              kfreebsd                /boot/loader&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
(You choose which section you want to add - FreeBSD or Slackware - depending on where you installed Grub2.)&lt;br /&gt;
&lt;br /&gt;
That's pretty much it.&lt;br /&gt;
&lt;br /&gt;
=Notes=&lt;br /&gt;
&lt;br /&gt;
My Slackware uses ext4 and a custom kernel with no initrd. For, say, xfs you should use 'insmod xfs'.&lt;br /&gt;
&lt;br /&gt;
Caveat: This was tested on FreeBSD 9.0Beta3. I can't see that it wouldn't work when release is out but you never know.&lt;br /&gt;
&lt;br /&gt;
[[User:Dive|Dive]]&lt;/div&gt;</description>
			<pubDate>Tue, 25 Oct 2011 09:57:59 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Dual_Booting_With_FreeBSD_9</comments>
		</item>
		<item>
			<title>User:Dive</title>
			<link>https://www.slackwiki.com/index.php?title=User:Dive&amp;diff=416</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=User:Dive&amp;diff=416</guid>
			<description>&lt;p&gt;Dive: Created page with 'Homepage: http://dawoodfall.net Email: dave@dawoodfall.net'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Homepage: http://dawoodfall.net&lt;br /&gt;
Email: dave@dawoodfall.net&lt;/div&gt;</description>
			<pubDate>Mon, 04 Oct 2010 14:36:47 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/User_talk:Dive</comments>
		</item>
		<item>
			<title>Utf-8 linux console</title>
			<link>https://www.slackwiki.com/index.php?title=Utf-8_linux_console&amp;diff=415</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Utf-8_linux_console&amp;diff=415</guid>
			<description>&lt;p&gt;Dive: /* Keyboard */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Tutorials]]&lt;br /&gt;
''by Dive''&lt;br /&gt;
&lt;br /&gt;
== A Quick Look at Using UTF-8 in the Linux Console (without X) ==&lt;br /&gt;
&lt;br /&gt;
	A few people have asked about this in #slackware lately so I though I'd put down a few notes on how I got utf-8 up and running. Feel free to add any further info. &lt;br /&gt;
&lt;br /&gt;
	In these days of high powered X desktop environments with all their flashy composite bells and whistles it may seem strange to worry about how the plain Linux console behaves, but we need to remember that there are some very nice applications that live in the console and can be just as (or even more) productive than the X Windows counterparts. I'm thinking of screen, irssi, mutt, elinks, vim/vi, mplayer (using svga), links, zgv and slrn to name but a few. And of course we have to mention Slackware tools like pgktool, slackpkg and sbopkg. Once you get hooked on using the console it is hard to go back.&lt;br /&gt;
	Anyway here we go ...&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	The first thing to do is configure the console. There is a kernel parameter we can add to &lt;br /&gt;
/etc/lilo.conf to do this:&lt;br /&gt;
&lt;br /&gt;
append=&amp;quot;vt.default_utf8=1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Here's an example from mine:&lt;br /&gt;
&lt;br /&gt;
  # Linux bootable partition config begins&lt;br /&gt;
  image = /boot/vmlinuz-2.6.27.7-custom&lt;br /&gt;
  root = /dev/hda1&lt;br /&gt;
  label = Linux-custom&lt;br /&gt;
  append=&amp;quot;resume=/dev/hda2 vt.default_utf8=1&amp;quot;&lt;br /&gt;
  read-only&lt;br /&gt;
  # Linux bootable partition config ends&lt;br /&gt;
&lt;br /&gt;
Once you have saved lilo.conf and run '''lilo''' a quick reboot is needed.&lt;br /&gt;
&lt;br /&gt;
== LANG environment variable ==&lt;br /&gt;
&lt;br /&gt;
I find that typing multibyte characters like &amp;quot;ä&amp;quot; and erasing them with backspace, I can erase much more than what I wrote. It helps to set the LANG variable, preferably by editing /etc/profile.d/lang.sh (or lang.csh) to set it to en_US.UTF-8 or similar.&lt;br /&gt;
&lt;br /&gt;
== Fonts ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	After that we need to find a font that actually contains the characters you want to see. My 'font of the moment' is lat9w-16. This contains the British £ (pound) and € (euro) symbols that I need, plus a lot of useful accented characters. But what is just as important are the correct drawing characters so that curses programs like pkgtool and sbopkg are printed on the screen correctly. If you experiment with the '''setconsolefont''' command you will find that some fonts draw curses box borders as squares or question marks, so check out some fonts and see which ones work and which don't.&lt;br /&gt;
	The '''setconsolefont''' command will put your chosen font into /etc/rc.d/rc.font so it will load at bootup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Keyboard ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	Ok, great you can now read characters correctly, but you need the correct keymap to be able to type them. That's a little harder. If you can find a utf-8 keymap for your locale/hardware then that's fine. Personally I didn't find any of the installed keymaps suitable so I looked around for an alternative. I found a uk-utf8 keymap on the intertubes, but this was unfortunately missing all the Ctrl+[a-z] keys so I edited it and added my own. I also added some AltGr+[a-z] (well not all of those) for accented characters. You may find this keymap useful as a starting point to create your own if you cannot find a more suitable one. Have a look through the comments and the codes and you should pick up the method.&lt;br /&gt;
	To add your own combinations you will need to know the correct codes for the characters you need. You can find a table of utf-8 characters here:&lt;br /&gt;
&lt;br /&gt;
[http://home.tiscali.nl/t876506/utf8tbl.html]http://home.tiscali.nl/t876506/utf8tbl.html&lt;br /&gt;
&lt;br /&gt;
Look up the code in that table and convert it to hex. E.G.&lt;br /&gt;
è is 232 in decimal, E8 in hex; é is code 233 in decimal, E9 in hex, so the entry in your keymap should be:&lt;br /&gt;
&lt;br /&gt;
  # key      = normal   shifted   AltGr+e   AltGr+shift+e&lt;br /&gt;
  keycode 18 = e        E         U+00E8    U+00E9&lt;br /&gt;
  # prints:    e        E         è         é  &lt;br /&gt;
&lt;br /&gt;
You can find the keycodes with the '''showkey''' program. Once edited you can load the map with the '''loadkeys''' program. Loadkeys will update /etc/rc.d/rc.keymap but you will need to copy the keymap to /usr/share/kbd/keymaps/i386/qwerty/ so it is found on bootup. Here is a link to my updated uk-utf8 map:&lt;br /&gt;
&lt;br /&gt;
[http://www.unrealize.co.uk/source/uk-utf.map.gz]http://www.unrealize.co.uk/source/uk-utf.map.gz&lt;br /&gt;
&lt;br /&gt;
You can load this ungzipped but it's better to gzip it back after editing to keep things consistent.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	By now you should have a fully usable keyboard/console correctly printing unicode characters. You will probably need to tell some programs like mutt and irrsi that you are using a utf-8 system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: There exists two shell scripts - '''unicode_start''' and '''unicode_stop'''. Typing '''unicode_start [font]''' will load the required font and set up keyboard correctly for unicode input.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bye for now,&lt;br /&gt;
&lt;br /&gt;
[[User:Dive|Dive]] 02:33, 20 March 2009 (UTC)&lt;/div&gt;</description>
			<pubDate>Mon, 27 Sep 2010 10:20:05 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Utf-8_linux_console</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=400</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=400</guid>
			<description>&lt;p&gt;Dive: /* A Little Automation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does almost the same thing, although the output might not be exactly what you expect. I will not be using that option here, but see the discussion page about that.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy your .config into the source directory and do &lt;br /&gt;
   &lt;br /&gt;
   make menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
You '''may''' need to do 'make mrproper' first, and perhaps 'make oldconfig'.&lt;br /&gt;
&lt;br /&gt;
   make&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' or 'make modules_install', even with '''O''' switch, as this *will* install to /boot and /lib/modules.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the source directory. The file '''modules.order''' lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(sed &amp;quot;s#^kernel/##&amp;quot; modules.order)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/install&lt;br /&gt;
&lt;br /&gt;
doinst.sh:&lt;br /&gt;
&lt;br /&gt;
   ## Taken from stock modules package&lt;br /&gt;
   if [ -x sbin/depmod ]; then&lt;br /&gt;
   chroot . /sbin/depmod -a 2.6.29.6-jabberwok &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
   fi&lt;br /&gt;
   &lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf source )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok source )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6-i686-1_tag.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using (run make menuconfig first):&lt;br /&gt;
&lt;br /&gt;
    #!/bin/sh&lt;br /&gt;
    # Slackware build script for kernel and modules&lt;br /&gt;
    #&lt;br /&gt;
    # Copyright 2009-2010  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
    # All rights reserved.&lt;br /&gt;
    #&lt;br /&gt;
    # Redistribution and use of this script, with or without modification, is&lt;br /&gt;
    # permitted provided that the following conditions are met:&lt;br /&gt;
    #&lt;br /&gt;
    # 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
    #    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
    #&lt;br /&gt;
    # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
    # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
    # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
    # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
    # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
    # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
    # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
    # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
    # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
    # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
    # &lt;br /&gt;
    # Notes: &lt;br /&gt;
    # You should have a /usr/src/linux-$VERSION-$LOCALNAME of source or you will &lt;br /&gt;
    # have problems.&lt;br /&gt;
    # Do not omit setting localname in .config.&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    source ./.config&lt;br /&gt;
    LOCALNAME=${LOCALNAME:-${CONFIG_LOCALVERSION/-/}}&lt;br /&gt;
    if [ -z &amp;quot;$ARCH&amp;quot; ]; then&lt;br /&gt;
      case &amp;quot;$( uname -m )&amp;quot; in&lt;br /&gt;
        i?86) ARCH=i486 ;;                      &lt;br /&gt;
        arm*) ARCH=arm ;;                       &lt;br /&gt;
           *) ARCH=$( uname -m ) ;;&lt;br /&gt;
      esac&lt;br /&gt;
    fi&lt;br /&gt;
    KARCH=$ARCH&lt;br /&gt;
    ARCH=x86&lt;br /&gt;
    MODULELIST=modules.order&lt;br /&gt;
    PRGNAM=kernel&lt;br /&gt;
    VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
    BUILD=${BUILD:-1}&lt;br /&gt;
    TAG=${TAG:-_daw}&lt;br /&gt;
    OUTPUT=${TMP:-/tmp}&lt;br /&gt;
    PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
    MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
    &lt;br /&gt;
    set -e&lt;br /&gt;
    &lt;br /&gt;
    rm -rf $PKG &lt;br /&gt;
    &lt;br /&gt;
    make&lt;br /&gt;
    &lt;br /&gt;
    for i in $(sed &amp;quot;s#^kernel/##&amp;quot; $MODULELIST)&lt;br /&gt;
    do&lt;br /&gt;
        mkdir -p $MODDIR/$(dirname $i)&lt;br /&gt;
        install -m 644 -v $i $MODDIR/$(dirname $i)&lt;br /&gt;
        let nummods=$nummods+1&lt;br /&gt;
    done&lt;br /&gt;
    &lt;br /&gt;
    mkdir -p $PKG/install&lt;br /&gt;
    &lt;br /&gt;
    cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
    ## Taken from stock modules package&lt;br /&gt;
    if [ -x sbin/depmod ]; then&lt;br /&gt;
    chroot . /sbin/depmod -a $VERSION-$LOCALNAME &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
    fi&lt;br /&gt;
    &lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; rm -rf build )&lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; ln -sf /usr/src/linux-$VERSION-$LOCALNAME build )&lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; rm -rf source )&lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; ln -sf /usr/src/linux-$VERSION-$LOCALNAME source )&lt;br /&gt;
    EOF&lt;br /&gt;
    &lt;br /&gt;
    cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
    # HOW TO EDIT THIS FILE:&lt;br /&gt;
    # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
    # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
    # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
    # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
    # customary to leave one space after the ':'.&lt;br /&gt;
    &lt;br /&gt;
    $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
    $PRGNAM-$LOCALNAME: kernel and modules for $LOCALNAME-$VERSION&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    EOF&lt;br /&gt;
    &lt;br /&gt;
    mkdir -p $PKG/boot&lt;br /&gt;
    &lt;br /&gt;
    cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
    cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
    cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
    &lt;br /&gt;
    ksize=$(ls -l arch/x86/boot/bzImage | awk '{print $5}')&lt;br /&gt;
    &lt;br /&gt;
    cd $PKG&lt;br /&gt;
    &lt;br /&gt;
    PACKAGE=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION-$KARCH-$BUILD-$TAG.${PKGTYPE:-tgz}&lt;br /&gt;
    &lt;br /&gt;
    /sbin/makepkg -l y -c n $PACKAGE&lt;br /&gt;
    &lt;br /&gt;
    echo -ne '\e[01;34m'&lt;br /&gt;
    printf &amp;quot;$nummods Modules Built\n&amp;quot;&lt;br /&gt;
    printf &amp;quot;Kernel Size: $ksize\n&amp;quot;&lt;br /&gt;
    printf &amp;quot;Package Size: $(ls -l $PACKAGE | awk '{print $5}')\n\n&amp;quot;&lt;br /&gt;
    echo -ne '\e[m\017'&lt;br /&gt;
&lt;br /&gt;
Downloadable version: http://www.dawoodfall.net/slackbuilds/noversion/kernel/&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Mon, 16 Aug 2010 22:04:03 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=399</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=399</guid>
			<description>&lt;p&gt;Dive: /* Installing Modules and Kernel to our Package Directory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does almost the same thing, although the output might not be exactly what you expect. I will not be using that option here, but see the discussion page about that.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy your .config into the source directory and do &lt;br /&gt;
   &lt;br /&gt;
   make menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
You '''may''' need to do 'make mrproper' first, and perhaps 'make oldconfig'.&lt;br /&gt;
&lt;br /&gt;
   make&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' or 'make modules_install', even with '''O''' switch, as this *will* install to /boot and /lib/modules.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the source directory. The file '''modules.order''' lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(sed &amp;quot;s#^kernel/##&amp;quot; modules.order)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/install&lt;br /&gt;
&lt;br /&gt;
doinst.sh:&lt;br /&gt;
&lt;br /&gt;
   ## Taken from stock modules package&lt;br /&gt;
   if [ -x sbin/depmod ]; then&lt;br /&gt;
   chroot . /sbin/depmod -a 2.6.29.6-jabberwok &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
   fi&lt;br /&gt;
   &lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf source )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok source )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6-i686-1_tag.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using (run make menuconfig first):&lt;br /&gt;
&lt;br /&gt;
    #!/bin/sh&lt;br /&gt;
    # Slackware build script for kernel and modules&lt;br /&gt;
    #&lt;br /&gt;
    # Copyright 2009-2010  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
    # All rights reserved.&lt;br /&gt;
    #&lt;br /&gt;
    # Redistribution and use of this script, with or without modification, is&lt;br /&gt;
    # permitted provided that the following conditions are met:&lt;br /&gt;
    #&lt;br /&gt;
    # 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
    #    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
    #&lt;br /&gt;
    # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
    # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
    # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
    # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
    # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
    # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
    # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
    # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
    # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
    # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
    # &lt;br /&gt;
    # Notes: &lt;br /&gt;
    # You should have a /usr/src/linux-$VERSION-$LOCALNAME of source or you will &lt;br /&gt;
    # have problems.&lt;br /&gt;
    # Do not omit setting localname in .config.&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    source ./.config&lt;br /&gt;
    LOCALNAME=${LOCALNAME:-${CONFIG_LOCALVERSION/-/}}&lt;br /&gt;
    if [ -z &amp;quot;$ARCH&amp;quot; ]; then&lt;br /&gt;
      case &amp;quot;$( uname -m )&amp;quot; in&lt;br /&gt;
        i?86) ARCH=i486 ;;                      &lt;br /&gt;
        arm*) ARCH=arm ;;                       &lt;br /&gt;
           *) ARCH=$( uname -m ) ;;&lt;br /&gt;
      esac&lt;br /&gt;
    fi&lt;br /&gt;
    KARCH=$ARCH&lt;br /&gt;
    ARCH=x86&lt;br /&gt;
    MODULELIST=modules.order&lt;br /&gt;
    PRGNAM=kernel&lt;br /&gt;
    VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
    BUILD=${BUILD:-1}&lt;br /&gt;
    TAG=${TAG:-_daw}&lt;br /&gt;
    OUTPUT=${TMP:-/tmp}&lt;br /&gt;
    PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
    MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
    &lt;br /&gt;
    set -e&lt;br /&gt;
    &lt;br /&gt;
    rm -rf $PKG &lt;br /&gt;
    &lt;br /&gt;
    make&lt;br /&gt;
    &lt;br /&gt;
    for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot; )&lt;br /&gt;
    do&lt;br /&gt;
        mkdir -p $MODDIR/$(dirname $i)&lt;br /&gt;
        install -m 644 -v $i $MODDIR/$(dirname $i)&lt;br /&gt;
        let nummods=$nummods+1&lt;br /&gt;
    done&lt;br /&gt;
    &lt;br /&gt;
    mkdir -p $PKG/install&lt;br /&gt;
    &lt;br /&gt;
    cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
    ## Taken from stock modules package&lt;br /&gt;
    if [ -x sbin/depmod ]; then&lt;br /&gt;
    chroot . /sbin/depmod -a $VERSION-$LOCALNAME &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
    fi&lt;br /&gt;
    &lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; rm -rf build )&lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; ln -sf /usr/src/linux-$VERSION-$LOCALNAME build )&lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; rm -rf source )&lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; ln -sf /usr/src/linux-$VERSION-$LOCALNAME source )&lt;br /&gt;
    EOF&lt;br /&gt;
    &lt;br /&gt;
    cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
    # HOW TO EDIT THIS FILE:&lt;br /&gt;
    # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
    # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
    # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
    # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
    # customary to leave one space after the ':'.&lt;br /&gt;
    &lt;br /&gt;
    $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
    $PRGNAM-$LOCALNAME: kernel and modules for $LOCALNAME-$VERSION&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    EOF&lt;br /&gt;
    &lt;br /&gt;
    mkdir -p $PKG/boot&lt;br /&gt;
    &lt;br /&gt;
    cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
    cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
    cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
    &lt;br /&gt;
    ksize=$(ls -l arch/x86/boot/bzImage | awk '{print $5}')&lt;br /&gt;
    &lt;br /&gt;
    cd $PKG&lt;br /&gt;
    &lt;br /&gt;
    PACKAGE=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION-$KARCH-$BUILD-$TAG.${PKGTYPE:-tgz}&lt;br /&gt;
    &lt;br /&gt;
    /sbin/makepkg -l y -c n $PACKAGE&lt;br /&gt;
    &lt;br /&gt;
    echo -ne '\e[01;34m'&lt;br /&gt;
    printf &amp;quot;$nummods Modules Built\n&amp;quot;&lt;br /&gt;
    printf &amp;quot;Kernel Size: $ksize\n&amp;quot;&lt;br /&gt;
    printf &amp;quot;Package Size: $(ls -l $PACKAGE | awk '{print $5}')\n\n&amp;quot;&lt;br /&gt;
    echo -ne '\e[m\017'&lt;br /&gt;
&lt;br /&gt;
Downloadable version: http://www.dawoodfall.net/slackbuilds/noversion/kernel/&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Mon, 16 Aug 2010 22:01:10 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=391</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=391</guid>
			<description>&lt;p&gt;Dive: /* A Little Automation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does almost the same thing, although the output might not be exactly what you expect. I will not be using that option here, but see the discussion page about that.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy your .config into the source directory and do &lt;br /&gt;
   &lt;br /&gt;
   make menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
You '''may''' need to do 'make mrproper' first, and perhaps 'make oldconfig'.&lt;br /&gt;
&lt;br /&gt;
   make&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' or 'make modules_install', even with '''O''' switch, as this *will* install to /boot and /lib/modules.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the source directory. The file '''modules.order''' lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/install&lt;br /&gt;
&lt;br /&gt;
doinst.sh:&lt;br /&gt;
&lt;br /&gt;
   ## Taken from stock modules package&lt;br /&gt;
   if [ -x sbin/depmod ]; then&lt;br /&gt;
   chroot . /sbin/depmod -a 2.6.29.6-jabberwok &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
   fi&lt;br /&gt;
   &lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf source )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok source )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6-i686-1_tag.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using (run make menuconfig first):&lt;br /&gt;
&lt;br /&gt;
    #!/bin/sh&lt;br /&gt;
    # Slackware build script for kernel and modules&lt;br /&gt;
    #&lt;br /&gt;
    # Copyright 2009-2010  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
    # All rights reserved.&lt;br /&gt;
    #&lt;br /&gt;
    # Redistribution and use of this script, with or without modification, is&lt;br /&gt;
    # permitted provided that the following conditions are met:&lt;br /&gt;
    #&lt;br /&gt;
    # 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
    #    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
    #&lt;br /&gt;
    # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
    # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
    # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
    # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
    # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
    # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
    # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
    # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
    # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
    # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
    # &lt;br /&gt;
    # Notes: &lt;br /&gt;
    # You should have a /usr/src/linux-$VERSION-$LOCALNAME of source or you will &lt;br /&gt;
    # have problems.&lt;br /&gt;
    # Do not omit setting localname in .config.&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    source ./.config&lt;br /&gt;
    LOCALNAME=${LOCALNAME:-${CONFIG_LOCALVERSION/-/}}&lt;br /&gt;
    if [ -z &amp;quot;$ARCH&amp;quot; ]; then&lt;br /&gt;
      case &amp;quot;$( uname -m )&amp;quot; in&lt;br /&gt;
        i?86) ARCH=i486 ;;                      &lt;br /&gt;
        arm*) ARCH=arm ;;                       &lt;br /&gt;
           *) ARCH=$( uname -m ) ;;&lt;br /&gt;
      esac&lt;br /&gt;
    fi&lt;br /&gt;
    KARCH=$ARCH&lt;br /&gt;
    ARCH=x86&lt;br /&gt;
    MODULELIST=modules.order&lt;br /&gt;
    PRGNAM=kernel&lt;br /&gt;
    VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
    BUILD=${BUILD:-1}&lt;br /&gt;
    TAG=${TAG:-_daw}&lt;br /&gt;
    OUTPUT=${TMP:-/tmp}&lt;br /&gt;
    PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
    MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
    &lt;br /&gt;
    set -e&lt;br /&gt;
    &lt;br /&gt;
    rm -rf $PKG &lt;br /&gt;
    &lt;br /&gt;
    make&lt;br /&gt;
    &lt;br /&gt;
    for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot; )&lt;br /&gt;
    do&lt;br /&gt;
        mkdir -p $MODDIR/$(dirname $i)&lt;br /&gt;
        install -m 644 -v $i $MODDIR/$(dirname $i)&lt;br /&gt;
        let nummods=$nummods+1&lt;br /&gt;
    done&lt;br /&gt;
    &lt;br /&gt;
    mkdir -p $PKG/install&lt;br /&gt;
    &lt;br /&gt;
    cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
    ## Taken from stock modules package&lt;br /&gt;
    if [ -x sbin/depmod ]; then&lt;br /&gt;
    chroot . /sbin/depmod -a $VERSION-$LOCALNAME &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
    fi&lt;br /&gt;
    &lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; rm -rf build )&lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; ln -sf /usr/src/linux-$VERSION-$LOCALNAME build )&lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; rm -rf source )&lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; ln -sf /usr/src/linux-$VERSION-$LOCALNAME source )&lt;br /&gt;
    EOF&lt;br /&gt;
    &lt;br /&gt;
    cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
    # HOW TO EDIT THIS FILE:&lt;br /&gt;
    # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
    # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
    # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
    # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
    # customary to leave one space after the ':'.&lt;br /&gt;
    &lt;br /&gt;
    $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
    $PRGNAM-$LOCALNAME: kernel and modules for $LOCALNAME-$VERSION&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    EOF&lt;br /&gt;
    &lt;br /&gt;
    mkdir -p $PKG/boot&lt;br /&gt;
    &lt;br /&gt;
    cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
    cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
    cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
    &lt;br /&gt;
    ksize=$(ls -l arch/x86/boot/bzImage | awk '{print $5}')&lt;br /&gt;
    &lt;br /&gt;
    cd $PKG&lt;br /&gt;
    &lt;br /&gt;
    PACKAGE=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION-$KARCH-$BUILD-$TAG.${PKGTYPE:-tgz}&lt;br /&gt;
    &lt;br /&gt;
    /sbin/makepkg -l y -c n $PACKAGE&lt;br /&gt;
    &lt;br /&gt;
    echo -ne '\e[01;34m'&lt;br /&gt;
    printf &amp;quot;$nummods Modules Built\n&amp;quot;&lt;br /&gt;
    printf &amp;quot;Kernel Size: $ksize\n&amp;quot;&lt;br /&gt;
    printf &amp;quot;Package Size: $(ls -l $PACKAGE | awk '{print $5}')\n\n&amp;quot;&lt;br /&gt;
    echo -ne '\e[m\017'&lt;br /&gt;
&lt;br /&gt;
Downloadable version: http://www.dawoodfall.net/slackbuilds/noversion/kernel/&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Sun, 25 Jul 2010 20:08:30 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=390</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=390</guid>
			<description>&lt;p&gt;Dive: /* Creating a Custom Package of Kernel and Modules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does almost the same thing, although the output might not be exactly what you expect. I will not be using that option here, but see the discussion page about that.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy your .config into the source directory and do &lt;br /&gt;
   &lt;br /&gt;
   make menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
You '''may''' need to do 'make mrproper' first, and perhaps 'make oldconfig'.&lt;br /&gt;
&lt;br /&gt;
   make&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' or 'make modules_install', even with '''O''' switch, as this *will* install to /boot and /lib/modules.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the source directory. The file '''modules.order''' lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/install&lt;br /&gt;
&lt;br /&gt;
doinst.sh:&lt;br /&gt;
&lt;br /&gt;
   ## Taken from stock modules package&lt;br /&gt;
   if [ -x sbin/depmod ]; then&lt;br /&gt;
   chroot . /sbin/depmod -a 2.6.29.6-jabberwok &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
   fi&lt;br /&gt;
   &lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf source )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok source )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6-i686-1_tag.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using (run make menuconfig first):&lt;br /&gt;
&lt;br /&gt;
    #!/bin/sh&lt;br /&gt;
    # Slackware build script for kernel and modules&lt;br /&gt;
    #&lt;br /&gt;
    # Copyright 2009-2010  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
    # All rights reserved.&lt;br /&gt;
    #&lt;br /&gt;
    # Redistribution and use of this script, with or without modification, is&lt;br /&gt;
    # permitted provided that the following conditions are met:&lt;br /&gt;
    #&lt;br /&gt;
    # 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
    #    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
    #&lt;br /&gt;
    # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
    # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
    # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
    # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
    # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
    # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
    # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
    # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
    # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
    # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
    # &lt;br /&gt;
    # Notes: &lt;br /&gt;
    # You should have a /usr/src/linux-$VERSION-$LOCALNAME of source or you will &lt;br /&gt;
    # have problems.&lt;br /&gt;
    # Do not omit setting localname in .config.&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    source ./.config&lt;br /&gt;
    LOCALNAME=${LOCALNAME:-${CONFIG_LOCALVERSION/-/}}&lt;br /&gt;
    if [ -z &amp;quot;$ARCH&amp;quot; ]; then&lt;br /&gt;
      case &amp;quot;$( uname -m )&amp;quot; in&lt;br /&gt;
        i?86) ARCH=i486 ;;                      &lt;br /&gt;
        arm*) ARCH=arm ;;                       &lt;br /&gt;
           *) ARCH=$( uname -m ) ;;&lt;br /&gt;
      esac&lt;br /&gt;
    fi&lt;br /&gt;
    KARCH=$ARCH&lt;br /&gt;
    ARCH=x86&lt;br /&gt;
    MODULELIST=modules.order&lt;br /&gt;
    PRGNAM=kernel&lt;br /&gt;
    VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
    BUILD=${BUILD:-1}&lt;br /&gt;
    TAG=${TAG:-_daw}&lt;br /&gt;
    OUTPUT=${TMP:-/tmp}&lt;br /&gt;
    PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
    MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
    &lt;br /&gt;
    set -e&lt;br /&gt;
    &lt;br /&gt;
    rm -rf $PKG &lt;br /&gt;
    &lt;br /&gt;
    make&lt;br /&gt;
    &lt;br /&gt;
    for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot; )&lt;br /&gt;
    do&lt;br /&gt;
        mkdir -p $MODDIR/$(dirname $i)&lt;br /&gt;
        install -m 644 -v $i $MODDIR/$(dirname $i)&lt;br /&gt;
        let nummods=$nummods+1&lt;br /&gt;
    done&lt;br /&gt;
    &lt;br /&gt;
    mkdir -p $PKG/install&lt;br /&gt;
    &lt;br /&gt;
    cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
    ## Taken from stock modules package&lt;br /&gt;
    if [ -x sbin/depmod ]; then&lt;br /&gt;
    chroot . /sbin/depmod -a $VERSION-$LOCALNAME &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
    fi&lt;br /&gt;
    &lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; rm -rf build )&lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; ln -sf /usr/src/linux-$VERSION-$LOCALNAME build )&lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; rm -rf source )&lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; ln -sf /usr/src/linux-$VERSION-$LOCALNAME source )&lt;br /&gt;
    EOF&lt;br /&gt;
    &lt;br /&gt;
    cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
    # HOW TO EDIT THIS FILE:&lt;br /&gt;
    # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
    # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
    # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
    # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
    # customary to leave one space after the ':'.&lt;br /&gt;
    &lt;br /&gt;
    $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
    $PRGNAM-$LOCALNAME: kernel and modules for $LOCALNAME-$VERSION&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    EOF&lt;br /&gt;
    &lt;br /&gt;
    mkdir -p $PKG/boot&lt;br /&gt;
    &lt;br /&gt;
    cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
    cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
    cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
    &lt;br /&gt;
    ksize=$(ls -l arch/x86/boot/bzImage | awk '{print $5}')&lt;br /&gt;
    &lt;br /&gt;
    cd $PKG&lt;br /&gt;
    &lt;br /&gt;
    PACKAGE=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION-$KARCH-$BUILD-$TAG.${PKGTYPE:-tgz}&lt;br /&gt;
    &lt;br /&gt;
    /sbin/makepkg -l y -c n $PACKAGE&lt;br /&gt;
    &lt;br /&gt;
    echo -ne '\e[01;34m'&lt;br /&gt;
    printf &amp;quot;$nummods Modules Built\n&amp;quot;&lt;br /&gt;
    printf &amp;quot;Kernel Size: $ksize\n&amp;quot;&lt;br /&gt;
    printf &amp;quot;Package Size: $(ls -l $PACKAGE | awk '{print $5}')\n\n&amp;quot;&lt;br /&gt;
    echo -ne '\e[m\017'&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Sun, 25 Jul 2010 20:07:37 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=389</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=389</guid>
			<description>&lt;p&gt;Dive: /* A Little Automation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
*Note2: I will be assuming x86 here, but if anyone wants to contribute some notes on x86_64 until I can get a machine setup, please do.&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does almost the same thing, although the output might not be exactly what you expect. I will not be using that option here, but see the discussion page about that.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy your .config into the source directory and do &lt;br /&gt;
   &lt;br /&gt;
   make menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
You '''may''' need to do 'make mrproper' first, and perhaps 'make oldconfig'.&lt;br /&gt;
&lt;br /&gt;
   make&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' or 'make modules_install', even with '''O''' switch, as this *will* install to /boot and /lib/modules.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the source directory. The file '''modules.order''' lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/install&lt;br /&gt;
&lt;br /&gt;
doinst.sh:&lt;br /&gt;
&lt;br /&gt;
   ## Taken from stock modules package&lt;br /&gt;
   if [ -x sbin/depmod ]; then&lt;br /&gt;
   chroot . /sbin/depmod -a 2.6.29.6-jabberwok &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
   fi&lt;br /&gt;
   &lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf source )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok source )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6-i686-1_tag.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using (run make menuconfig first):&lt;br /&gt;
&lt;br /&gt;
    #!/bin/sh&lt;br /&gt;
    # Slackware build script for kernel and modules&lt;br /&gt;
    #&lt;br /&gt;
    # Copyright 2009-2010  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
    # All rights reserved.&lt;br /&gt;
    #&lt;br /&gt;
    # Redistribution and use of this script, with or without modification, is&lt;br /&gt;
    # permitted provided that the following conditions are met:&lt;br /&gt;
    #&lt;br /&gt;
    # 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
    #    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
    #&lt;br /&gt;
    # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
    # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
    # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
    # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
    # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
    # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
    # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
    # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
    # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
    # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
    # &lt;br /&gt;
    # Notes: &lt;br /&gt;
    # You should have a /usr/src/linux-$VERSION-$LOCALNAME of source or you will &lt;br /&gt;
    # have problems.&lt;br /&gt;
    # Do not omit setting localname in .config.&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    source ./.config&lt;br /&gt;
    LOCALNAME=${LOCALNAME:-${CONFIG_LOCALVERSION/-/}}&lt;br /&gt;
    if [ -z &amp;quot;$ARCH&amp;quot; ]; then&lt;br /&gt;
      case &amp;quot;$( uname -m )&amp;quot; in&lt;br /&gt;
        i?86) ARCH=i486 ;;                      &lt;br /&gt;
        arm*) ARCH=arm ;;                       &lt;br /&gt;
           *) ARCH=$( uname -m ) ;;&lt;br /&gt;
      esac&lt;br /&gt;
    fi&lt;br /&gt;
    KARCH=$ARCH&lt;br /&gt;
    ARCH=x86&lt;br /&gt;
    MODULELIST=modules.order&lt;br /&gt;
    PRGNAM=kernel&lt;br /&gt;
    VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
    BUILD=${BUILD:-1}&lt;br /&gt;
    TAG=${TAG:-_daw}&lt;br /&gt;
    OUTPUT=${TMP:-/tmp}&lt;br /&gt;
    PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
    MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
    &lt;br /&gt;
    set -e&lt;br /&gt;
    &lt;br /&gt;
    rm -rf $PKG &lt;br /&gt;
    &lt;br /&gt;
    make&lt;br /&gt;
    &lt;br /&gt;
    for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot; )&lt;br /&gt;
    do&lt;br /&gt;
        mkdir -p $MODDIR/$(dirname $i)&lt;br /&gt;
        install -m 644 -v $i $MODDIR/$(dirname $i)&lt;br /&gt;
        let nummods=$nummods+1&lt;br /&gt;
    done&lt;br /&gt;
    &lt;br /&gt;
    mkdir -p $PKG/install&lt;br /&gt;
    &lt;br /&gt;
    cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
    ## Taken from stock modules package&lt;br /&gt;
    if [ -x sbin/depmod ]; then&lt;br /&gt;
    chroot . /sbin/depmod -a $VERSION-$LOCALNAME &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
    fi&lt;br /&gt;
    &lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; rm -rf build )&lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; ln -sf /usr/src/linux-$VERSION-$LOCALNAME build )&lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; rm -rf source )&lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; ln -sf /usr/src/linux-$VERSION-$LOCALNAME source )&lt;br /&gt;
    EOF&lt;br /&gt;
    &lt;br /&gt;
    cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
    # HOW TO EDIT THIS FILE:&lt;br /&gt;
    # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
    # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
    # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
    # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
    # customary to leave one space after the ':'.&lt;br /&gt;
    &lt;br /&gt;
    $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
    $PRGNAM-$LOCALNAME: kernel and modules for $LOCALNAME-$VERSION&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    EOF&lt;br /&gt;
    &lt;br /&gt;
    mkdir -p $PKG/boot&lt;br /&gt;
    &lt;br /&gt;
    cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
    cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
    cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
    &lt;br /&gt;
    ksize=$(ls -l arch/x86/boot/bzImage | awk '{print $5}')&lt;br /&gt;
    &lt;br /&gt;
    cd $PKG&lt;br /&gt;
    &lt;br /&gt;
    PACKAGE=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION-$KARCH-$BUILD-$TAG.${PKGTYPE:-tgz}&lt;br /&gt;
    &lt;br /&gt;
    /sbin/makepkg -l y -c n $PACKAGE&lt;br /&gt;
    &lt;br /&gt;
    echo -ne '\e[01;34m'&lt;br /&gt;
    printf &amp;quot;$nummods Modules Built\n&amp;quot;&lt;br /&gt;
    printf &amp;quot;Kernel Size: $ksize\n&amp;quot;&lt;br /&gt;
    printf &amp;quot;Package Size: $(ls -l $PACKAGE | awk '{print $5}')\n\n&amp;quot;&lt;br /&gt;
    echo -ne '\e[m\017'&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Sun, 25 Jul 2010 20:03:57 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=388</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=388</guid>
			<description>&lt;p&gt;Dive: /* A Little Automation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
*Note2: I will be assuming x86 here, but if anyone wants to contribute some notes on x86_64 until I can get a machine setup, please do.&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does almost the same thing, although the output might not be exactly what you expect. I will not be using that option here, but see the discussion page about that.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy your .config into the source directory and do &lt;br /&gt;
   &lt;br /&gt;
   make menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
You '''may''' need to do 'make mrproper' first, and perhaps 'make oldconfig'.&lt;br /&gt;
&lt;br /&gt;
   make&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' or 'make modules_install', even with '''O''' switch, as this *will* install to /boot and /lib/modules.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the source directory. The file '''modules.order''' lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/install&lt;br /&gt;
&lt;br /&gt;
doinst.sh:&lt;br /&gt;
&lt;br /&gt;
   ## Taken from stock modules package&lt;br /&gt;
   if [ -x sbin/depmod ]; then&lt;br /&gt;
   chroot . /sbin/depmod -a 2.6.29.6-jabberwok &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
   fi&lt;br /&gt;
   &lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf source )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok source )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6-i686-1_tag.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using (run make menuconfig first):&lt;br /&gt;
&lt;br /&gt;
    #!/bin/sh&lt;br /&gt;
    # Slackware build script for kernel and modules&lt;br /&gt;
    #&lt;br /&gt;
    # Copyright 2009-2010  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
    # All rights reserved.&lt;br /&gt;
    #&lt;br /&gt;
    # Redistribution and use of this script, with or without modification, is&lt;br /&gt;
    # permitted provided that the following conditions are met:&lt;br /&gt;
    #&lt;br /&gt;
    # 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
    #    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
    #&lt;br /&gt;
    # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
    # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
    # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
    # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
    # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
    # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
    # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
    # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
    # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
    # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
    # &lt;br /&gt;
    # Notes: &lt;br /&gt;
    # You should have a /usr/src/linux-$VERSION-$LOCALNAME of source or you will &lt;br /&gt;
    # have problems.&lt;br /&gt;
    # Do not omit setting localname in .config.&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    source ./.config&lt;br /&gt;
    LOCALNAME=${LOCALNAME:-${CONFIG_LOCALVERSION/-/}}&lt;br /&gt;
    KARCH=${ARCH:-i486}&lt;br /&gt;
    ARCH=x86&lt;br /&gt;
    MODULELIST=modules.order&lt;br /&gt;
    PRGNAM=kernel&lt;br /&gt;
    VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
    BUILD=${BUILD:-1}&lt;br /&gt;
    TAG=${TAG:-_daw}&lt;br /&gt;
    OUTPUT=${TMP:-/tmp}&lt;br /&gt;
    PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
    MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
    &lt;br /&gt;
    set -e&lt;br /&gt;
    &lt;br /&gt;
    rm -rf $PKG &lt;br /&gt;
    &lt;br /&gt;
    make&lt;br /&gt;
    &lt;br /&gt;
    for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot; )&lt;br /&gt;
    do&lt;br /&gt;
        mkdir -p $MODDIR/$(dirname $i)&lt;br /&gt;
        install -m 644 -v $i $MODDIR/$(dirname $i)&lt;br /&gt;
        let nummods=$nummods+1&lt;br /&gt;
    done&lt;br /&gt;
    &lt;br /&gt;
    mkdir -p $PKG/install&lt;br /&gt;
    &lt;br /&gt;
    cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
    ## Taken from stock modules package&lt;br /&gt;
    if [ -x sbin/depmod ]; then&lt;br /&gt;
    chroot . /sbin/depmod -a $VERSION-$LOCALNAME &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
    fi&lt;br /&gt;
    &lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; rm -rf build )&lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; ln -sf /usr/src/linux-$VERSION-$LOCALNAME build )&lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; rm -rf source )&lt;br /&gt;
    ( cd lib/modules/$VERSION-$LOCALNAME ; ln -sf /usr/src/linux-$VERSION-$LOCALNAME source )&lt;br /&gt;
    EOF&lt;br /&gt;
    &lt;br /&gt;
    cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
    # HOW TO EDIT THIS FILE:&lt;br /&gt;
    # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
    # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
    # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
    # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
    # customary to leave one space after the ':'.&lt;br /&gt;
    &lt;br /&gt;
    $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
    $PRGNAM-$LOCALNAME: kernel and modules for $LOCALNAME-$VERSION&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    $PRGNAM-$LOCALNAME:&lt;br /&gt;
    EOF&lt;br /&gt;
    &lt;br /&gt;
    mkdir -p $PKG/boot&lt;br /&gt;
    &lt;br /&gt;
    cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
    cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
    cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
    &lt;br /&gt;
    ksize=$(ls -l arch/x86/boot/bzImage | awk '{print $5}')&lt;br /&gt;
    &lt;br /&gt;
    cd $PKG&lt;br /&gt;
    &lt;br /&gt;
    PACKAGE=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION-$KARCH-$BUILD-$TAG.${PKGTYPE:-tgz}&lt;br /&gt;
    &lt;br /&gt;
    /sbin/makepkg -l y -c n $PACKAGE&lt;br /&gt;
    &lt;br /&gt;
    echo -ne '\e[01;34m'&lt;br /&gt;
    printf &amp;quot;$nummods Modules Built\n&amp;quot;&lt;br /&gt;
    printf &amp;quot;Kernel Size: $ksize\n&amp;quot;&lt;br /&gt;
    printf &amp;quot;Package Size: $(ls -l $PACKAGE | awk '{print $5}')\n\n&amp;quot;&lt;br /&gt;
    echo -ne '\e[m\017'&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Sun, 25 Jul 2010 19:52:39 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=387</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=387</guid>
			<description>&lt;p&gt;Dive: /* A Little Automation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
*Note2: I will be assuming x86 here, but if anyone wants to contribute some notes on x86_64 until I can get a machine setup, please do.&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does almost the same thing, although the output might not be exactly what you expect. I will not be using that option here, but see the discussion page about that.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy your .config into the source directory and do &lt;br /&gt;
   &lt;br /&gt;
   make menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
You '''may''' need to do 'make mrproper' first, and perhaps 'make oldconfig'.&lt;br /&gt;
&lt;br /&gt;
   make&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' or 'make modules_install', even with '''O''' switch, as this *will* install to /boot and /lib/modules.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the source directory. The file '''modules.order''' lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/install&lt;br /&gt;
&lt;br /&gt;
doinst.sh:&lt;br /&gt;
&lt;br /&gt;
   ## Taken from stock modules package&lt;br /&gt;
   if [ -x sbin/depmod ]; then&lt;br /&gt;
   chroot . /sbin/depmod -a 2.6.29.6-jabberwok &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
   fi&lt;br /&gt;
   &lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf source )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok source )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6-i686-1_tag.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using (run make menuconfig first):&lt;br /&gt;
&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# Slackware build script for kernel and modules&lt;br /&gt;
#&lt;br /&gt;
# Copyright 2009  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
# All rights reserved.&lt;br /&gt;
#&lt;br /&gt;
# Redistribution and use of this script, with or without modification, is&lt;br /&gt;
# permitted provided that the following conditions are met:&lt;br /&gt;
#&lt;br /&gt;
# 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
#    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
#&lt;br /&gt;
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
# &lt;br /&gt;
# Notes: &lt;br /&gt;
# You should have a /usr/src/linux-$VERSION-$LOCALNAME of source or you will &lt;br /&gt;
# have problems.&lt;br /&gt;
# Do not omit setting localname in .config.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
source ./.config&lt;br /&gt;
LOCALNAME=${LOCALNAME:-${CONFIG_LOCALVERSION/-/}}&lt;br /&gt;
KARCH=${ARCH:-i486}&lt;br /&gt;
ARCH=x86&lt;br /&gt;
MODULELIST=modules.order&lt;br /&gt;
PRGNAM=kernel&lt;br /&gt;
VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
BUILD=${BUILD:-1}&lt;br /&gt;
TAG=${TAG:-_daw}&lt;br /&gt;
OUTPUT=${TMP:-/tmp}&lt;br /&gt;
PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
&lt;br /&gt;
set -e&lt;br /&gt;
&lt;br /&gt;
rm -rf $PKG &lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
&lt;br /&gt;
for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot; )&lt;br /&gt;
do&lt;br /&gt;
	mkdir -p $MODDIR/$(dirname $i)&lt;br /&gt;
	install -m 644 -v $i $MODDIR/$(dirname $i)&lt;br /&gt;
	let nummods=$nummods+1&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
mkdir -p $PKG/install&lt;br /&gt;
&lt;br /&gt;
cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
## Taken from stock modules package&lt;br /&gt;
if [ -x sbin/depmod ]; then&lt;br /&gt;
  chroot . /sbin/depmod -a $VERSION-$LOCALNAME &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
( cd lib/modules/$VERSION-$LOCALNAME ; rm -rf build )&lt;br /&gt;
( cd lib/modules/$VERSION-$LOCALNAME ; ln -sf /usr/src/linux-$VERSION-$LOCALNAME build )&lt;br /&gt;
( cd lib/modules/$VERSION-$LOCALNAME ; rm -rf source )&lt;br /&gt;
( cd lib/modules/$VERSION-$LOCALNAME ; ln -sf /usr/src/linux-$VERSION-$LOCALNAME source )&lt;br /&gt;
EOF&lt;br /&gt;
&lt;br /&gt;
cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
# HOW TO EDIT THIS FILE:&lt;br /&gt;
# The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
# up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
# on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
# make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
# customary to leave one space after the ':'.&lt;br /&gt;
&lt;br /&gt;
$PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
$PRGNAM-$LOCALNAME: kernel and modules for $LOCALNAME-$VERSION&lt;br /&gt;
$PRGNAM-$LOCALNAME:&lt;br /&gt;
$PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
$PRGNAM-$LOCALNAME:&lt;br /&gt;
$PRGNAM-$LOCALNAME:&lt;br /&gt;
$PRGNAM-$LOCALNAME:&lt;br /&gt;
$PRGNAM-$LOCALNAME:&lt;br /&gt;
$PRGNAM-$LOCALNAME:&lt;br /&gt;
$PRGNAM-$LOCALNAME:&lt;br /&gt;
$PRGNAM-$LOCALNAME:&lt;br /&gt;
$PRGNAM-$LOCALNAME:&lt;br /&gt;
EOF&lt;br /&gt;
&lt;br /&gt;
mkdir -p $PKG/boot&lt;br /&gt;
&lt;br /&gt;
cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
&lt;br /&gt;
ksize=$(ls -l arch/x86/boot/bzImage | awk '{print $5}')&lt;br /&gt;
&lt;br /&gt;
cd $PKG&lt;br /&gt;
&lt;br /&gt;
PACKAGE=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION-$KARCH-$BUILD-$TAG.${PKGTYPE:-tgz}&lt;br /&gt;
&lt;br /&gt;
/sbin/makepkg -l y -c n $PACKAGE&lt;br /&gt;
&lt;br /&gt;
echo -ne '\e[01;34m'&lt;br /&gt;
printf &amp;quot;$nummods Modules Built\n&amp;quot;&lt;br /&gt;
printf &amp;quot;Kernel Size: $ksize\n&amp;quot;&lt;br /&gt;
printf &amp;quot;Package Size: $(ls -l $PACKAGE | awk '{print $5}')\n\n&amp;quot;&lt;br /&gt;
echo -ne '\e[m\017'&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Sun, 25 Jul 2010 19:44:11 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=386</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=386</guid>
			<description>&lt;p&gt;Dive: /* Making the Package */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
*Note2: I will be assuming x86 here, but if anyone wants to contribute some notes on x86_64 until I can get a machine setup, please do.&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does almost the same thing, although the output might not be exactly what you expect. I will not be using that option here, but see the discussion page about that.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy your .config into the source directory and do &lt;br /&gt;
   &lt;br /&gt;
   make menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
You '''may''' need to do 'make mrproper' first, and perhaps 'make oldconfig'.&lt;br /&gt;
&lt;br /&gt;
   make&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' or 'make modules_install', even with '''O''' switch, as this *will* install to /boot and /lib/modules.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the source directory. The file '''modules.order''' lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/install&lt;br /&gt;
&lt;br /&gt;
doinst.sh:&lt;br /&gt;
&lt;br /&gt;
   ## Taken from stock modules package&lt;br /&gt;
   if [ -x sbin/depmod ]; then&lt;br /&gt;
   chroot . /sbin/depmod -a 2.6.29.6-jabberwok &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
   fi&lt;br /&gt;
   &lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf source )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok source )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6-i686-1_tag.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using (run make menuconfig first):&lt;br /&gt;
&lt;br /&gt;
   #!/bin/sh&lt;br /&gt;
   # Slackware build script for kernel and modules&lt;br /&gt;
   #&lt;br /&gt;
   # Copyright 2009  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
   # All rights reserved.&lt;br /&gt;
   #&lt;br /&gt;
   # Redistribution and use of this script, with or without modification, is&lt;br /&gt;
   # permitted provided that the following conditions are met:&lt;br /&gt;
   #&lt;br /&gt;
   # 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
   #    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
   #&lt;br /&gt;
   # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
   # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
   # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
   # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
   # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
   # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
   # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
   # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
   # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
   # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
   # &lt;br /&gt;
   # Notes:&lt;br /&gt;
   # You should have a /usr/src/linux-$VERSION-$LOCALNAME of source or you will &lt;br /&gt;
   # have problems.&lt;br /&gt;
   # Do not omit setting localname in .config.&lt;br /&gt;
   &lt;br /&gt;
   source .config&lt;br /&gt;
   LOCALNAME=${LOCALNAME:-${CONFIG_LOCALVERSION/-/}}&lt;br /&gt;
   KARCH=${ARCH:-i486}&lt;br /&gt;
   ARCH=x86&lt;br /&gt;
   MODULELIST=modules.order&lt;br /&gt;
   PRGNAM=kernel&lt;br /&gt;
   VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
   BUILD=${BUILD:-1}&lt;br /&gt;
   TAG=${TAG:-_daw}&lt;br /&gt;
   OUTPUT=${TMP:-/tmp}&lt;br /&gt;
   PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
   MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
   &lt;br /&gt;
   set -e&lt;br /&gt;
 &lt;br /&gt;
   rm -rf $PKG &lt;br /&gt;
   &lt;br /&gt;
   make&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
      mkdir -p $MODDDIR/$(dirname $i)&lt;br /&gt;
      install -m 644 -v $i $MODDDIR/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
   &lt;br /&gt;
   mkdir -p $PKG/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
   cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
   cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
   &lt;br /&gt;
   mkdir $PKG/install&lt;br /&gt;
   &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
   ## Taken from stock modules package&lt;br /&gt;
   if [ -x sbin/depmod ]; then&lt;br /&gt;
   chroot . /sbin/depmod -a $VERSION-$LOCALNAME &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
   fi&lt;br /&gt;
    &lt;br /&gt;
   ( cd lib/modules/$VERSION-$LOCALNAME ; rm -rf build )&lt;br /&gt;
   ( cd lib/modules/$VERSION-$LOCALNAME ; ln -sf /usr/src/linux-$VERSION-$LOCALNAME build )&lt;br /&gt;
   ( cd lib/modules/$VERSION-$LOCALNAME ; rm -rf source )&lt;br /&gt;
   ( cd lib/modules/$VERSION-$LOCALNAME ; ln -sf /usr/src/linux-$VERSION-$LOCALNAME source )&lt;br /&gt;
   EOF&lt;br /&gt;
   &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
   # HOW TO EDIT THIS FILE:&lt;br /&gt;
   # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
   # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
   # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
   # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
   # customary to leave one space after the ':'.&lt;br /&gt;
 &lt;br /&gt;
   $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
   $PRGNAM-$LOCALNAME: kernel and modules 2.6.29.6-jabberwok&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   EOF&lt;br /&gt;
 &lt;br /&gt;
   cd $PKG&lt;br /&gt;
   /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$LOCALNAME-$VERSION$TAG-$KARCH-$BUILD.${PKGTYPE:-tgz}&lt;br /&gt;
&lt;br /&gt;
And here's a downloadable version: http://www.dawoodfall.net/slackbuilds/13.0/kernel/kernel-jabberwok.SlackBuild&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Sun, 25 Jul 2010 19:42:37 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=342</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=342</guid>
			<description>&lt;p&gt;Dive: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
*Note2: I will be assuming x86 here, but if anyone wants to contribute some notes on x86_64 until I can get a machine setup, please do.&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does almost the same thing, although the output might not be exactly what you expect. I will not be using that option here, but see the discussion page about that.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy your .config into the source directory and do &lt;br /&gt;
   &lt;br /&gt;
   make menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
You '''may''' need to do 'make mrproper' first, and perhaps 'make oldconfig'.&lt;br /&gt;
&lt;br /&gt;
   make&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' or 'make modules_install', even with '''O''' switch, as this *will* install to /boot and /lib/modules.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the source directory. The file '''modules.order''' lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/install&lt;br /&gt;
&lt;br /&gt;
doinst.sh:&lt;br /&gt;
&lt;br /&gt;
   ## Taken from stock modules package&lt;br /&gt;
   if [ -x sbin/depmod ]; then&lt;br /&gt;
   chroot . /sbin/depmod -a 2.6.29.6-jabberwok &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
   fi&lt;br /&gt;
   &lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf source )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok source )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6_tag-i686-1.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using (run make menuconfig first):&lt;br /&gt;
&lt;br /&gt;
   #!/bin/sh&lt;br /&gt;
   # Slackware build script for kernel and modules&lt;br /&gt;
   #&lt;br /&gt;
   # Copyright 2009  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
   # All rights reserved.&lt;br /&gt;
   #&lt;br /&gt;
   # Redistribution and use of this script, with or without modification, is&lt;br /&gt;
   # permitted provided that the following conditions are met:&lt;br /&gt;
   #&lt;br /&gt;
   # 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
   #    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
   #&lt;br /&gt;
   # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
   # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
   # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
   # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
   # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
   # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
   # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
   # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
   # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
   # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
   # &lt;br /&gt;
   # Notes:&lt;br /&gt;
   # You should have a /usr/src/linux-$VERSION-$LOCALNAME of source or you will &lt;br /&gt;
   # have problems.&lt;br /&gt;
   # Do not omit setting localname in .config.&lt;br /&gt;
   &lt;br /&gt;
   source .config&lt;br /&gt;
   LOCALNAME=${LOCALNAME:-${CONFIG_LOCALVERSION/-/}}&lt;br /&gt;
   KARCH=${ARCH:-i486}&lt;br /&gt;
   ARCH=x86&lt;br /&gt;
   MODULELIST=modules.order&lt;br /&gt;
   PRGNAM=kernel&lt;br /&gt;
   VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
   BUILD=${BUILD:-1}&lt;br /&gt;
   TAG=${TAG:-_daw}&lt;br /&gt;
   OUTPUT=${TMP:-/tmp}&lt;br /&gt;
   PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
   MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
   &lt;br /&gt;
   set -e&lt;br /&gt;
 &lt;br /&gt;
   rm -rf $PKG &lt;br /&gt;
   &lt;br /&gt;
   make&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
      mkdir -p $MODDDIR/$(dirname $i)&lt;br /&gt;
      install -m 644 -v $i $MODDDIR/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
   &lt;br /&gt;
   mkdir -p $PKG/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
   cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
   cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
   &lt;br /&gt;
   mkdir $PKG/install&lt;br /&gt;
   &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
   ## Taken from stock modules package&lt;br /&gt;
   if [ -x sbin/depmod ]; then&lt;br /&gt;
   chroot . /sbin/depmod -a $VERSION-$LOCALNAME &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
   fi&lt;br /&gt;
    &lt;br /&gt;
   ( cd lib/modules/$VERSION-$LOCALNAME ; rm -rf build )&lt;br /&gt;
   ( cd lib/modules/$VERSION-$LOCALNAME ; ln -sf /usr/src/linux-$VERSION-$LOCALNAME build )&lt;br /&gt;
   ( cd lib/modules/$VERSION-$LOCALNAME ; rm -rf source )&lt;br /&gt;
   ( cd lib/modules/$VERSION-$LOCALNAME ; ln -sf /usr/src/linux-$VERSION-$LOCALNAME source )&lt;br /&gt;
   EOF&lt;br /&gt;
   &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
   # HOW TO EDIT THIS FILE:&lt;br /&gt;
   # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
   # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
   # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
   # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
   # customary to leave one space after the ':'.&lt;br /&gt;
 &lt;br /&gt;
   $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
   $PRGNAM-$LOCALNAME: kernel and modules 2.6.29.6-jabberwok&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   EOF&lt;br /&gt;
 &lt;br /&gt;
   cd $PKG&lt;br /&gt;
   /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$LOCALNAME-$VERSION$TAG-$KARCH-$BUILD.${PKGTYPE:-tgz}&lt;br /&gt;
&lt;br /&gt;
And here's a downloadable version: http://www.dawoodfall.net/slackbuilds/13.0/kernel/kernel-jabberwok.SlackBuild&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Sun, 14 Mar 2010 16:22:55 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=341</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=341</guid>
			<description>&lt;p&gt;Dive: /* A Little Automation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
*Note2: I will be assuming x86 here, but if anyone wants to contribute some notes on x86_64 until I can get a machine setup, please do.&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does almost the same thing, although the output might not be exactly what you expect. I will not be using that option here, but see the discussion page about that.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy your .config into the source directory and do &lt;br /&gt;
   &lt;br /&gt;
   make menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
You '''may''' need to do 'make mrproper' first, and perhaps 'make oldconfig'.&lt;br /&gt;
&lt;br /&gt;
   make&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' or 'make modules_install', even with '''O''' switch, as this *will* install to /boot and /lib/modules.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the source directory. The file '''modules.order''' lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/install&lt;br /&gt;
&lt;br /&gt;
doinst.sh:&lt;br /&gt;
&lt;br /&gt;
   ## Taken from stock modules package&lt;br /&gt;
   if [ -x sbin/depmod ]; then&lt;br /&gt;
   chroot . /sbin/depmod -a 2.6.29.6-jabberwok &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
   fi&lt;br /&gt;
   &lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf source )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok source )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6_tag-i686-1.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using (run make menuconfig first):&lt;br /&gt;
&lt;br /&gt;
   #!/bin/sh&lt;br /&gt;
   # Slackware build script for kernel and modules&lt;br /&gt;
   #&lt;br /&gt;
   # Copyright 2009  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
   # All rights reserved.&lt;br /&gt;
   #&lt;br /&gt;
   # Redistribution and use of this script, with or without modification, is&lt;br /&gt;
   # permitted provided that the following conditions are met:&lt;br /&gt;
   #&lt;br /&gt;
   # 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
   #    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
   #&lt;br /&gt;
   # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
   # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
   # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
   # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
   # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
   # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
   # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
   # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
   # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
   # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
   # &lt;br /&gt;
   # Notes:&lt;br /&gt;
   # You should have a /usr/src/linux-$VERSION-$LOCALNAME of source or you will &lt;br /&gt;
   # have problems.&lt;br /&gt;
   # Do not omit setting localname in .config.&lt;br /&gt;
   &lt;br /&gt;
   source .config&lt;br /&gt;
   LOCALNAME=${LOCALNAME:-${CONFIG_LOCALVERSION/-/}}&lt;br /&gt;
   KARCH=${ARCH:-i486}&lt;br /&gt;
   ARCH=x86&lt;br /&gt;
   MODULELIST=modules.order&lt;br /&gt;
   PRGNAM=kernel&lt;br /&gt;
   VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
   BUILD=${BUILD:-1}&lt;br /&gt;
   TAG=${TAG:-_daw}&lt;br /&gt;
   OUTPUT=${TMP:-/tmp}&lt;br /&gt;
   PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
   MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
   &lt;br /&gt;
   set -e&lt;br /&gt;
 &lt;br /&gt;
   rm -rf $PKG &lt;br /&gt;
   &lt;br /&gt;
   make&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
      mkdir -p $MODDDIR/$(dirname $i)&lt;br /&gt;
      install -m 644 -v $i $MODDDIR/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
   &lt;br /&gt;
   mkdir -p $PKG/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
   cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
   cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
   &lt;br /&gt;
   mkdir $PKG/install&lt;br /&gt;
   &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
   ## Taken from stock modules package&lt;br /&gt;
   if [ -x sbin/depmod ]; then&lt;br /&gt;
   chroot . /sbin/depmod -a $VERSION-$LOCALNAME &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
   fi&lt;br /&gt;
    &lt;br /&gt;
   ( cd lib/modules/$VERSION-$LOCALNAME ; rm -rf build )&lt;br /&gt;
   ( cd lib/modules/$VERSION-$LOCALNAME ; ln -sf /usr/src/linux-$VERSION-$LOCALNAME build )&lt;br /&gt;
   ( cd lib/modules/$VERSION-$LOCALNAME ; rm -rf source )&lt;br /&gt;
   ( cd lib/modules/$VERSION-$LOCALNAME ; ln -sf /usr/src/linux-$VERSION-$LOCALNAME source )&lt;br /&gt;
   EOF&lt;br /&gt;
   &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
   # HOW TO EDIT THIS FILE:&lt;br /&gt;
   # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
   # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
   # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
   # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
   # customary to leave one space after the ':'.&lt;br /&gt;
 &lt;br /&gt;
   $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
   $PRGNAM-$LOCALNAME: kernel and modules 2.6.29.6-jabberwok&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   EOF&lt;br /&gt;
 &lt;br /&gt;
   cd $PKG&lt;br /&gt;
   /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$LOCALNAME-$VERSION$TAG-$KARCH-$BUILD.${PKGTYPE:-tgz}&lt;br /&gt;
&lt;br /&gt;
And here's a downloadable version: http://www.dawoodfall.net/slackbuilds/13.0/kernel/kernel-jabberwok.SlackBuild&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details. Note that this does not include the firmware so you should keep the relevant kernel-firmware package installed.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Sun, 14 Mar 2010 16:21:47 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=340</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=340</guid>
			<description>&lt;p&gt;Dive: /* Installing Modules and Kernel to our Package Directory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
*Note2: I will be assuming x86 here, but if anyone wants to contribute some notes on x86_64 until I can get a machine setup, please do.&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does almost the same thing, although the output might not be exactly what you expect. I will not be using that option here, but see the discussion page about that.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy your .config into the source directory and do &lt;br /&gt;
   &lt;br /&gt;
   make menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
You '''may''' need to do 'make mrproper' first, and perhaps 'make oldconfig'.&lt;br /&gt;
&lt;br /&gt;
   make&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' or 'make modules_install', even with '''O''' switch, as this *will* install to /boot and /lib/modules.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the source directory. The file '''modules.order''' lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/install&lt;br /&gt;
&lt;br /&gt;
doinst.sh:&lt;br /&gt;
&lt;br /&gt;
   ## Taken from stock modules package&lt;br /&gt;
   if [ -x sbin/depmod ]; then&lt;br /&gt;
   chroot . /sbin/depmod -a 2.6.29.6-jabberwok &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
   fi&lt;br /&gt;
   &lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf source )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok source )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6_tag-i686-1.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using (run make menuconfig first):&lt;br /&gt;
&lt;br /&gt;
   #!/bin/sh&lt;br /&gt;
   # Slackware build script for kernel and modules&lt;br /&gt;
   #&lt;br /&gt;
   # Copyright 2009  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
   # All rights reserved.&lt;br /&gt;
   #&lt;br /&gt;
   # Redistribution and use of this script, with or without modification, is&lt;br /&gt;
   # permitted provided that the following conditions are met:&lt;br /&gt;
   #&lt;br /&gt;
   # 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
   #    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
   #&lt;br /&gt;
   # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
   # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
   # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
   # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
   # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
   # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
   # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
   # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
   # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
   # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
   # &lt;br /&gt;
   # Notes:&lt;br /&gt;
   # You should have a /usr/src/linux-$VERSION-$LOCALNAME of source or you will &lt;br /&gt;
   # have problems.&lt;br /&gt;
   # Do not omit setting localname in .config.&lt;br /&gt;
   &lt;br /&gt;
   source .config&lt;br /&gt;
   LOCALNAME=${LOCALNAME:-${CONFIG_LOCALVERSION/-/}}&lt;br /&gt;
   KARCH=${ARCH:-i486}&lt;br /&gt;
   ARCH=x86&lt;br /&gt;
   MODULELIST=modules.order&lt;br /&gt;
   PRGNAM=kernel&lt;br /&gt;
   VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
   BUILD=${BUILD:-1}&lt;br /&gt;
   TAG=${TAG:-_daw}&lt;br /&gt;
   OUTPUT=${TMP:-/tmp}&lt;br /&gt;
   PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
   MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
   &lt;br /&gt;
   set -e&lt;br /&gt;
 &lt;br /&gt;
   rm -rf $PKG &lt;br /&gt;
   &lt;br /&gt;
   make&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
      mkdir -p $MODDDIR/$(dirname $i)&lt;br /&gt;
      install -m 644 -v $i $MODDDIR/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
   &lt;br /&gt;
   mkdir -p $PKG/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
   cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
   cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
   &lt;br /&gt;
   mkdir $PKG/install&lt;br /&gt;
   &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
   ## Taken from stock modules package&lt;br /&gt;
   if [ -x sbin/depmod ]; then&lt;br /&gt;
   chroot . /sbin/depmod -a $VERSION-$LOCALNAME &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
   fi&lt;br /&gt;
   &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
   # HOW TO EDIT THIS FILE:&lt;br /&gt;
   # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
   # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
   # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
   # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
   # customary to leave one space after the ':'.&lt;br /&gt;
 &lt;br /&gt;
   $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
   $PRGNAM-$LOCALNAME: kernel and modules 2.6.29.6-jabberwok&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   EOF&lt;br /&gt;
 &lt;br /&gt;
   cd $PKG&lt;br /&gt;
   /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$LOCALNAME-$VERSION$TAG-$KARCH-$BUILD.${PKGTYPE:-tgz}&lt;br /&gt;
&lt;br /&gt;
And here's a downloadable version: http://www.dawoodfall.net/slackbuilds/13.0/kernel/kernel-jabberwok.SlackBuild&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details. Note that this does not include the firmware so you should keep the relevant kernel-firmware package installed.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Sun, 14 Mar 2010 16:19:48 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=339</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=339</guid>
			<description>&lt;p&gt;Dive: /* Installing Modules and Kernel to our Package Directory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
*Note2: I will be assuming x86 here, but if anyone wants to contribute some notes on x86_64 until I can get a machine setup, please do.&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does almost the same thing, although the output might not be exactly what you expect. I will not be using that option here, but see the discussion page about that.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy your .config into the source directory and do &lt;br /&gt;
   &lt;br /&gt;
   make menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
You '''may''' need to do 'make mrproper' first, and perhaps 'make oldconfig'.&lt;br /&gt;
&lt;br /&gt;
   make&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' or 'make modules_install', even with '''O''' switch, as this *will* install to /boot and /lib/modules.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the source directory. The file '''modules.order''' lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir -p /tmp/kernel-package/install&lt;br /&gt;
&lt;br /&gt;
doinst.sh:&lt;br /&gt;
&lt;br /&gt;
   ## Taken from stock modules package&lt;br /&gt;
   if [ -x sbin/depmod ]; then&lt;br /&gt;
   chroot . /sbin/depmod -a 2.6.29.6-jabberwok &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
   fi&lt;br /&gt;
   &lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf source )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok source )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6_tag-i686-1.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using (run make menuconfig first):&lt;br /&gt;
&lt;br /&gt;
   #!/bin/sh&lt;br /&gt;
   # Slackware build script for kernel and modules&lt;br /&gt;
   #&lt;br /&gt;
   # Copyright 2009  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
   # All rights reserved.&lt;br /&gt;
   #&lt;br /&gt;
   # Redistribution and use of this script, with or without modification, is&lt;br /&gt;
   # permitted provided that the following conditions are met:&lt;br /&gt;
   #&lt;br /&gt;
   # 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
   #    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
   #&lt;br /&gt;
   # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
   # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
   # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
   # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
   # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
   # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
   # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
   # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
   # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
   # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
   # &lt;br /&gt;
   # Notes:&lt;br /&gt;
   # You should have a /usr/src/linux-$VERSION-$LOCALNAME of source or you will &lt;br /&gt;
   # have problems.&lt;br /&gt;
   # Do not omit setting localname in .config.&lt;br /&gt;
   &lt;br /&gt;
   source .config&lt;br /&gt;
   LOCALNAME=${LOCALNAME:-${CONFIG_LOCALVERSION/-/}}&lt;br /&gt;
   KARCH=${ARCH:-i486}&lt;br /&gt;
   ARCH=x86&lt;br /&gt;
   MODULELIST=modules.order&lt;br /&gt;
   PRGNAM=kernel&lt;br /&gt;
   VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
   BUILD=${BUILD:-1}&lt;br /&gt;
   TAG=${TAG:-_daw}&lt;br /&gt;
   OUTPUT=${TMP:-/tmp}&lt;br /&gt;
   PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
   MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
   &lt;br /&gt;
   set -e&lt;br /&gt;
 &lt;br /&gt;
   rm -rf $PKG &lt;br /&gt;
   &lt;br /&gt;
   make&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
      mkdir -p $MODDDIR/$(dirname $i)&lt;br /&gt;
      install -m 644 -v $i $MODDDIR/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
   &lt;br /&gt;
   mkdir -p $PKG/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
   cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
   cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
   &lt;br /&gt;
   mkdir $PKG/install&lt;br /&gt;
   &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
   ## Taken from stock modules package&lt;br /&gt;
   if [ -x sbin/depmod ]; then&lt;br /&gt;
   chroot . /sbin/depmod -a $VERSION-$LOCALNAME &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
   fi&lt;br /&gt;
   &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
   # HOW TO EDIT THIS FILE:&lt;br /&gt;
   # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
   # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
   # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
   # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
   # customary to leave one space after the ':'.&lt;br /&gt;
 &lt;br /&gt;
   $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
   $PRGNAM-$LOCALNAME: kernel and modules 2.6.29.6-jabberwok&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   EOF&lt;br /&gt;
 &lt;br /&gt;
   cd $PKG&lt;br /&gt;
   /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$LOCALNAME-$VERSION$TAG-$KARCH-$BUILD.${PKGTYPE:-tgz}&lt;br /&gt;
&lt;br /&gt;
And here's a downloadable version: http://www.dawoodfall.net/slackbuilds/13.0/kernel/kernel-jabberwok.SlackBuild&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details. Note that this does not include the firmware so you should keep the relevant kernel-firmware package installed.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Sun, 14 Mar 2010 16:19:26 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=338</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=338</guid>
			<description>&lt;p&gt;Dive: /* Installing Modules and Kernel to our Package Directory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
*Note2: I will be assuming x86 here, but if anyone wants to contribute some notes on x86_64 until I can get a machine setup, please do.&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does almost the same thing, although the output might not be exactly what you expect. I will not be using that option here, but see the discussion page about that.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy your .config into the source directory and do &lt;br /&gt;
   &lt;br /&gt;
   make menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
You '''may''' need to do 'make mrproper' first, and perhaps 'make oldconfig'.&lt;br /&gt;
&lt;br /&gt;
   make&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' or 'make modules_install', even with '''O''' switch, as this *will* install to /boot and /lib/modules.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the source directory. The file '''modules.order''' lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir $PKG/install&lt;br /&gt;
&lt;br /&gt;
doinst.sh:&lt;br /&gt;
&lt;br /&gt;
   ## Taken from stock modules package&lt;br /&gt;
   if [ -x sbin/depmod ]; then&lt;br /&gt;
   chroot . /sbin/depmod -a 2.6.29.6-jabberwok &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
   fi&lt;br /&gt;
   &lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf source )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok source )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6_tag-i686-1.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using (run make menuconfig first):&lt;br /&gt;
&lt;br /&gt;
   #!/bin/sh&lt;br /&gt;
   # Slackware build script for kernel and modules&lt;br /&gt;
   #&lt;br /&gt;
   # Copyright 2009  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
   # All rights reserved.&lt;br /&gt;
   #&lt;br /&gt;
   # Redistribution and use of this script, with or without modification, is&lt;br /&gt;
   # permitted provided that the following conditions are met:&lt;br /&gt;
   #&lt;br /&gt;
   # 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
   #    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
   #&lt;br /&gt;
   # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
   # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
   # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
   # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
   # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
   # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
   # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
   # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
   # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
   # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
   # &lt;br /&gt;
   # Notes:&lt;br /&gt;
   # You should have a /usr/src/linux-$VERSION-$LOCALNAME of source or you will &lt;br /&gt;
   # have problems.&lt;br /&gt;
   # Do not omit setting localname in .config.&lt;br /&gt;
   &lt;br /&gt;
   source .config&lt;br /&gt;
   LOCALNAME=${LOCALNAME:-${CONFIG_LOCALVERSION/-/}}&lt;br /&gt;
   KARCH=${ARCH:-i486}&lt;br /&gt;
   ARCH=x86&lt;br /&gt;
   MODULELIST=modules.order&lt;br /&gt;
   PRGNAM=kernel&lt;br /&gt;
   VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
   BUILD=${BUILD:-1}&lt;br /&gt;
   TAG=${TAG:-_daw}&lt;br /&gt;
   OUTPUT=${TMP:-/tmp}&lt;br /&gt;
   PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
   MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
   &lt;br /&gt;
   set -e&lt;br /&gt;
 &lt;br /&gt;
   rm -rf $PKG &lt;br /&gt;
   &lt;br /&gt;
   make&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
      mkdir -p $MODDDIR/$(dirname $i)&lt;br /&gt;
      install -m 644 -v $i $MODDDIR/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
   &lt;br /&gt;
   mkdir -p $PKG/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
   cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
   cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
   &lt;br /&gt;
   mkdir $PKG/install&lt;br /&gt;
   &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
   ## Taken from stock modules package&lt;br /&gt;
   if [ -x sbin/depmod ]; then&lt;br /&gt;
   chroot . /sbin/depmod -a $VERSION-$LOCALNAME &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
   fi&lt;br /&gt;
   &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
   # HOW TO EDIT THIS FILE:&lt;br /&gt;
   # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
   # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
   # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
   # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
   # customary to leave one space after the ':'.&lt;br /&gt;
 &lt;br /&gt;
   $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
   $PRGNAM-$LOCALNAME: kernel and modules 2.6.29.6-jabberwok&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   EOF&lt;br /&gt;
 &lt;br /&gt;
   cd $PKG&lt;br /&gt;
   /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$LOCALNAME-$VERSION$TAG-$KARCH-$BUILD.${PKGTYPE:-tgz}&lt;br /&gt;
&lt;br /&gt;
And here's a downloadable version: http://www.dawoodfall.net/slackbuilds/13.0/kernel/kernel-jabberwok.SlackBuild&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details. Note that this does not include the firmware so you should keep the relevant kernel-firmware package installed.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Sun, 14 Mar 2010 16:16:58 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=337</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=337</guid>
			<description>&lt;p&gt;Dive: /* Installing Modules and Kernel to our Package Directory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
*Note2: I will be assuming x86 here, but if anyone wants to contribute some notes on x86_64 until I can get a machine setup, please do.&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does almost the same thing, although the output might not be exactly what you expect. I will not be using that option here, but see the discussion page about that.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy your .config into the source directory and do &lt;br /&gt;
   &lt;br /&gt;
   make menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
You '''may''' need to do 'make mrproper' first, and perhaps 'make oldconfig'.&lt;br /&gt;
&lt;br /&gt;
   make&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' or 'make modules_install', even with '''O''' switch, as this *will* install to /boot and /lib/modules.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the source directory. The file '''modules.order''' lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir $PKG/install&lt;br /&gt;
&lt;br /&gt;
   doinst.sh:&lt;br /&gt;
   &lt;br /&gt;
   ## Taken from stock modules package&lt;br /&gt;
   if [ -x sbin/depmod ]; then&lt;br /&gt;
   chroot . /sbin/depmod -a 2.6.29.6-jabberwok &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
   fi&lt;br /&gt;
   &lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf source )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok source )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6_tag-i686-1.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using (run make menuconfig first):&lt;br /&gt;
&lt;br /&gt;
   #!/bin/sh&lt;br /&gt;
   # Slackware build script for kernel and modules&lt;br /&gt;
   #&lt;br /&gt;
   # Copyright 2009  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
   # All rights reserved.&lt;br /&gt;
   #&lt;br /&gt;
   # Redistribution and use of this script, with or without modification, is&lt;br /&gt;
   # permitted provided that the following conditions are met:&lt;br /&gt;
   #&lt;br /&gt;
   # 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
   #    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
   #&lt;br /&gt;
   # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
   # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
   # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
   # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
   # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
   # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
   # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
   # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
   # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
   # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
   # &lt;br /&gt;
   # Notes:&lt;br /&gt;
   # You should have a /usr/src/linux-$VERSION-$LOCALNAME of source or you will &lt;br /&gt;
   # have problems.&lt;br /&gt;
   # Do not omit setting localname in .config.&lt;br /&gt;
   &lt;br /&gt;
   source .config&lt;br /&gt;
   LOCALNAME=${LOCALNAME:-${CONFIG_LOCALVERSION/-/}}&lt;br /&gt;
   KARCH=${ARCH:-i486}&lt;br /&gt;
   ARCH=x86&lt;br /&gt;
   MODULELIST=modules.order&lt;br /&gt;
   PRGNAM=kernel&lt;br /&gt;
   VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
   BUILD=${BUILD:-1}&lt;br /&gt;
   TAG=${TAG:-_daw}&lt;br /&gt;
   OUTPUT=${TMP:-/tmp}&lt;br /&gt;
   PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
   MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
   &lt;br /&gt;
   set -e&lt;br /&gt;
 &lt;br /&gt;
   rm -rf $PKG &lt;br /&gt;
   &lt;br /&gt;
   make&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
      mkdir -p $MODDDIR/$(dirname $i)&lt;br /&gt;
      install -m 644 -v $i $MODDDIR/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
   &lt;br /&gt;
   mkdir -p $PKG/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
   cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
   cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
   &lt;br /&gt;
   mkdir $PKG/install&lt;br /&gt;
   &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
   ## Taken from stock modules package&lt;br /&gt;
   if [ -x sbin/depmod ]; then&lt;br /&gt;
   chroot . /sbin/depmod -a $VERSION-$LOCALNAME &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
   fi&lt;br /&gt;
   &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
   # HOW TO EDIT THIS FILE:&lt;br /&gt;
   # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
   # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
   # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
   # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
   # customary to leave one space after the ':'.&lt;br /&gt;
 &lt;br /&gt;
   $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
   $PRGNAM-$LOCALNAME: kernel and modules 2.6.29.6-jabberwok&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   EOF&lt;br /&gt;
 &lt;br /&gt;
   cd $PKG&lt;br /&gt;
   /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$LOCALNAME-$VERSION$TAG-$KARCH-$BUILD.${PKGTYPE:-tgz}&lt;br /&gt;
&lt;br /&gt;
And here's a downloadable version: http://www.dawoodfall.net/slackbuilds/13.0/kernel/kernel-jabberwok.SlackBuild&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details. Note that this does not include the firmware so you should keep the relevant kernel-firmware package installed.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Sun, 14 Mar 2010 16:16:27 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=336</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=336</guid>
			<description>&lt;p&gt;Dive: /* A Little Automation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
*Note2: I will be assuming x86 here, but if anyone wants to contribute some notes on x86_64 until I can get a machine setup, please do.&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does almost the same thing, although the output might not be exactly what you expect. I will not be using that option here, but see the discussion page about that.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy your .config into the source directory and do &lt;br /&gt;
   &lt;br /&gt;
   make menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
You '''may''' need to do 'make mrproper' first, and perhaps 'make oldconfig'.&lt;br /&gt;
&lt;br /&gt;
   make&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' or 'make modules_install', even with '''O''' switch, as this *will* install to /boot and /lib/modules.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the source directory. The file '''modules.order''' lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   doinst.sh:&lt;br /&gt;
   &lt;br /&gt;
   ## Taken from stock modules package&lt;br /&gt;
   if [ -x sbin/depmod ]; then&lt;br /&gt;
   chroot . /sbin/depmod -a 2.6.29.6-jabberwok &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
   fi&lt;br /&gt;
   &lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf source )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok source )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6_tag-i686-1.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using (run make menuconfig first):&lt;br /&gt;
&lt;br /&gt;
   #!/bin/sh&lt;br /&gt;
   # Slackware build script for kernel and modules&lt;br /&gt;
   #&lt;br /&gt;
   # Copyright 2009  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
   # All rights reserved.&lt;br /&gt;
   #&lt;br /&gt;
   # Redistribution and use of this script, with or without modification, is&lt;br /&gt;
   # permitted provided that the following conditions are met:&lt;br /&gt;
   #&lt;br /&gt;
   # 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
   #    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
   #&lt;br /&gt;
   # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
   # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
   # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
   # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
   # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
   # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
   # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
   # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
   # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
   # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
   # &lt;br /&gt;
   # Notes:&lt;br /&gt;
   # You should have a /usr/src/linux-$VERSION-$LOCALNAME of source or you will &lt;br /&gt;
   # have problems.&lt;br /&gt;
   # Do not omit setting localname in .config.&lt;br /&gt;
   &lt;br /&gt;
   source .config&lt;br /&gt;
   LOCALNAME=${LOCALNAME:-${CONFIG_LOCALVERSION/-/}}&lt;br /&gt;
   KARCH=${ARCH:-i486}&lt;br /&gt;
   ARCH=x86&lt;br /&gt;
   MODULELIST=modules.order&lt;br /&gt;
   PRGNAM=kernel&lt;br /&gt;
   VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
   BUILD=${BUILD:-1}&lt;br /&gt;
   TAG=${TAG:-_daw}&lt;br /&gt;
   OUTPUT=${TMP:-/tmp}&lt;br /&gt;
   PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
   MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
   &lt;br /&gt;
   set -e&lt;br /&gt;
 &lt;br /&gt;
   rm -rf $PKG &lt;br /&gt;
   &lt;br /&gt;
   make&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
      mkdir -p $MODDDIR/$(dirname $i)&lt;br /&gt;
      install -m 644 -v $i $MODDDIR/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
   &lt;br /&gt;
   mkdir -p $PKG/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
   cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
   cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
   &lt;br /&gt;
   mkdir $PKG/install&lt;br /&gt;
   &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
   ## Taken from stock modules package&lt;br /&gt;
   if [ -x sbin/depmod ]; then&lt;br /&gt;
   chroot . /sbin/depmod -a $VERSION-$LOCALNAME &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
   fi&lt;br /&gt;
   &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
   # HOW TO EDIT THIS FILE:&lt;br /&gt;
   # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
   # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
   # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
   # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
   # customary to leave one space after the ':'.&lt;br /&gt;
 &lt;br /&gt;
   $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
   $PRGNAM-$LOCALNAME: kernel and modules 2.6.29.6-jabberwok&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   EOF&lt;br /&gt;
 &lt;br /&gt;
   cd $PKG&lt;br /&gt;
   /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$LOCALNAME-$VERSION$TAG-$KARCH-$BUILD.${PKGTYPE:-tgz}&lt;br /&gt;
&lt;br /&gt;
And here's a downloadable version: http://www.dawoodfall.net/slackbuilds/13.0/kernel/kernel-jabberwok.SlackBuild&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details. Note that this does not include the firmware so you should keep the relevant kernel-firmware package installed.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Sun, 14 Mar 2010 16:15:43 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=335</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=335</guid>
			<description>&lt;p&gt;Dive: /* Installing Modules and Kernel to our Package Directory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
*Note2: I will be assuming x86 here, but if anyone wants to contribute some notes on x86_64 until I can get a machine setup, please do.&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does almost the same thing, although the output might not be exactly what you expect. I will not be using that option here, but see the discussion page about that.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy your .config into the source directory and do &lt;br /&gt;
   &lt;br /&gt;
   make menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
You '''may''' need to do 'make mrproper' first, and perhaps 'make oldconfig'.&lt;br /&gt;
&lt;br /&gt;
   make&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' or 'make modules_install', even with '''O''' switch, as this *will* install to /boot and /lib/modules.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the source directory. The file '''modules.order''' lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   doinst.sh:&lt;br /&gt;
   &lt;br /&gt;
   ## Taken from stock modules package&lt;br /&gt;
   if [ -x sbin/depmod ]; then&lt;br /&gt;
   chroot . /sbin/depmod -a 2.6.29.6-jabberwok &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
   fi&lt;br /&gt;
   &lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok build )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; rm -rf source )&lt;br /&gt;
   ( cd lib/modules/2.6.29.6-jabberwok ; ln -sf /usr/src/linux-2.6.29.6-jabberwok source )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6_tag-i686-1.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using (run make menuconfig first):&lt;br /&gt;
&lt;br /&gt;
   #!/bin/sh&lt;br /&gt;
   # Slackware build script for kernel and modules&lt;br /&gt;
   #&lt;br /&gt;
   # Copyright 2009  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
   # All rights reserved.&lt;br /&gt;
   #&lt;br /&gt;
   # Redistribution and use of this script, with or without modification, is&lt;br /&gt;
   # permitted provided that the following conditions are met:&lt;br /&gt;
   #&lt;br /&gt;
   # 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
   #    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
   #&lt;br /&gt;
   # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
   # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
   # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
   # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
   # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
   # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
   # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
   # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
   # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
   # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
   &lt;br /&gt;
   source .config&lt;br /&gt;
   LOCALNAME=${LOCALNAME:-${CONFIG_LOCALVERSION/-/}}&lt;br /&gt;
   KARCH=${ARCH:-i486}&lt;br /&gt;
   ARCH=x86&lt;br /&gt;
   MODULELIST=modules.order&lt;br /&gt;
   PRGNAM=kernel&lt;br /&gt;
   VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
   BUILD=${BUILD:-1}&lt;br /&gt;
   TAG=${TAG:-_daw}&lt;br /&gt;
   OUTPUT=${TMP:-/tmp}&lt;br /&gt;
   PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
   MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
   &lt;br /&gt;
   set -e&lt;br /&gt;
 &lt;br /&gt;
   rm -rf $PKG &lt;br /&gt;
 &lt;br /&gt;
   make&lt;br /&gt;
 &lt;br /&gt;
   for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
      mkdir -p $MODDDIR/$(dirname $i)&lt;br /&gt;
      install -m 644 -v $i $MODDDIR/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
 &lt;br /&gt;
   mkdir -p $PKG/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
   cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
   cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
 &lt;br /&gt;
   mkdir $PKG/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
 &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
   # HOW TO EDIT THIS FILE:&lt;br /&gt;
   # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
   # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
   # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
   # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
   # customary to leave one space after the ':'.&lt;br /&gt;
 &lt;br /&gt;
   $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
   $PRGNAM-$LOCALNAME: kernel and modules 2.6.29.6-jabberwok&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   EOF&lt;br /&gt;
 &lt;br /&gt;
   cd $PKG&lt;br /&gt;
   /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$LOCALNAME-$VERSION$TAG-$KARCH-$BUILD.${PKGTYPE:-tgz}&lt;br /&gt;
&lt;br /&gt;
And here's a downloadable version: http://www.dawoodfall.net/slackbuilds/13.0/kernel/kernel-jabberwok.SlackBuild&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details. Note that this does not include the firmware so you should keep the relevant kernel-firmware package installed.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Sun, 14 Mar 2010 16:13:25 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=334</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=334</guid>
			<description>&lt;p&gt;Dive: /* Installing Modules and Kernel to our Package Directory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
*Note2: I will be assuming x86 here, but if anyone wants to contribute some notes on x86_64 until I can get a machine setup, please do.&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does almost the same thing, although the output might not be exactly what you expect. I will not be using that option here, but see the discussion page about that.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy your .config into the source directory and do &lt;br /&gt;
   &lt;br /&gt;
   make menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
You '''may''' need to do 'make mrproper' first, and perhaps 'make oldconfig'.&lt;br /&gt;
&lt;br /&gt;
   make&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' or 'make modules_install', even with '''O''' switch, as this *will* install to /boot and /lib/modules.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the source directory. The file '''modules.order''' lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   doinst.sh:&lt;br /&gt;
   &lt;br /&gt;
   ## Taken from stock modules package&lt;br /&gt;
   if [ -x sbin/depmod ]; then&lt;br /&gt;
   chroot . /sbin/depmod -a $VERSION-$LOCALNAME &amp;gt; /dev/null 2&amp;gt; /dev/null&lt;br /&gt;
   fi&lt;br /&gt;
   &lt;br /&gt;
   ( cd lib/modules/$VERSION-$LOCALNAME ; rm -rf build )&lt;br /&gt;
   ( cd lib/modules/$VERSION-$LOCALNAME ; ln -sf /usr/src/linux-$VERSION-$LOCALNAME build )&lt;br /&gt;
   ( cd lib/modules/$VERSION-$LOCALNAME ; rm -rf source )&lt;br /&gt;
   ( cd lib/modules/$VERSION-$LOCALNAME ; ln -sf /usr/src/linux-$VERSION-$LOCALNAME source )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6_tag-i686-1.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using (run make menuconfig first):&lt;br /&gt;
&lt;br /&gt;
   #!/bin/sh&lt;br /&gt;
   # Slackware build script for kernel and modules&lt;br /&gt;
   #&lt;br /&gt;
   # Copyright 2009  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
   # All rights reserved.&lt;br /&gt;
   #&lt;br /&gt;
   # Redistribution and use of this script, with or without modification, is&lt;br /&gt;
   # permitted provided that the following conditions are met:&lt;br /&gt;
   #&lt;br /&gt;
   # 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
   #    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
   #&lt;br /&gt;
   # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
   # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
   # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
   # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
   # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
   # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
   # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
   # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
   # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
   # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
   &lt;br /&gt;
   source .config&lt;br /&gt;
   LOCALNAME=${LOCALNAME:-${CONFIG_LOCALVERSION/-/}}&lt;br /&gt;
   KARCH=${ARCH:-i486}&lt;br /&gt;
   ARCH=x86&lt;br /&gt;
   MODULELIST=modules.order&lt;br /&gt;
   PRGNAM=kernel&lt;br /&gt;
   VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
   BUILD=${BUILD:-1}&lt;br /&gt;
   TAG=${TAG:-_daw}&lt;br /&gt;
   OUTPUT=${TMP:-/tmp}&lt;br /&gt;
   PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
   MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
   &lt;br /&gt;
   set -e&lt;br /&gt;
 &lt;br /&gt;
   rm -rf $PKG &lt;br /&gt;
 &lt;br /&gt;
   make&lt;br /&gt;
 &lt;br /&gt;
   for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
      mkdir -p $MODDDIR/$(dirname $i)&lt;br /&gt;
      install -m 644 -v $i $MODDDIR/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
 &lt;br /&gt;
   mkdir -p $PKG/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
   cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
   cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
 &lt;br /&gt;
   mkdir $PKG/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
 &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
   # HOW TO EDIT THIS FILE:&lt;br /&gt;
   # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
   # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
   # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
   # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
   # customary to leave one space after the ':'.&lt;br /&gt;
 &lt;br /&gt;
   $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
   $PRGNAM-$LOCALNAME: kernel and modules 2.6.29.6-jabberwok&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   EOF&lt;br /&gt;
 &lt;br /&gt;
   cd $PKG&lt;br /&gt;
   /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$LOCALNAME-$VERSION$TAG-$KARCH-$BUILD.${PKGTYPE:-tgz}&lt;br /&gt;
&lt;br /&gt;
And here's a downloadable version: http://www.dawoodfall.net/slackbuilds/13.0/kernel/kernel-jabberwok.SlackBuild&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details. Note that this does not include the firmware so you should keep the relevant kernel-firmware package installed.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Sun, 14 Mar 2010 16:11:56 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=330</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=330</guid>
			<description>&lt;p&gt;Dive: /* A Little Automation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
*Note2: I will be assuming x86 here, but if anyone wants to contribute some notes on x86_64 until I can get a machine setup, please do.&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does almost the same thing, although the output might not be exactly what you expect. I will not be using that option here, but see the discussion page about that.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy your .config into the source directory and do &lt;br /&gt;
   &lt;br /&gt;
   make menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
You '''may''' need to do 'make mrproper' first, and perhaps 'make oldconfig'.&lt;br /&gt;
&lt;br /&gt;
   make&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' or 'make modules_install', even with '''O''' switch, as this *will* install to /boot and /lib/modules.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the source directory. The file '''modules.order''' lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; /tmp/kernel-package/install/doinst.sh&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6_tag-i686-1.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using (run make menuconfig first):&lt;br /&gt;
&lt;br /&gt;
   #!/bin/sh&lt;br /&gt;
   # Slackware build script for kernel and modules&lt;br /&gt;
   #&lt;br /&gt;
   # Copyright 2009  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
   # All rights reserved.&lt;br /&gt;
   #&lt;br /&gt;
   # Redistribution and use of this script, with or without modification, is&lt;br /&gt;
   # permitted provided that the following conditions are met:&lt;br /&gt;
   #&lt;br /&gt;
   # 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
   #    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
   #&lt;br /&gt;
   # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
   # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
   # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
   # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
   # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
   # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
   # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
   # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
   # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
   # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
   &lt;br /&gt;
   source .config&lt;br /&gt;
   LOCALNAME=${LOCALNAME:-${CONFIG_LOCALVERSION/-/}}&lt;br /&gt;
   KARCH=${ARCH:-i486}&lt;br /&gt;
   ARCH=x86&lt;br /&gt;
   MODULELIST=modules.order&lt;br /&gt;
   PRGNAM=kernel&lt;br /&gt;
   VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
   BUILD=${BUILD:-1}&lt;br /&gt;
   TAG=${TAG:-_daw}&lt;br /&gt;
   OUTPUT=${TMP:-/tmp}&lt;br /&gt;
   PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
   MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
   &lt;br /&gt;
   set -e&lt;br /&gt;
 &lt;br /&gt;
   rm -rf $PKG &lt;br /&gt;
 &lt;br /&gt;
   make&lt;br /&gt;
 &lt;br /&gt;
   for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
      mkdir -p $MODDDIR/$(dirname $i)&lt;br /&gt;
      install -m 644 -v $i $MODDDIR/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
 &lt;br /&gt;
   mkdir -p $PKG/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
   cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
   cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
 &lt;br /&gt;
   mkdir $PKG/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
 &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
   # HOW TO EDIT THIS FILE:&lt;br /&gt;
   # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
   # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
   # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
   # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
   # customary to leave one space after the ':'.&lt;br /&gt;
 &lt;br /&gt;
   $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
   $PRGNAM-$LOCALNAME: kernel and modules 2.6.29.6-jabberwok&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   EOF&lt;br /&gt;
 &lt;br /&gt;
   cd $PKG&lt;br /&gt;
   /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$LOCALNAME-$VERSION$TAG-$KARCH-$BUILD.${PKGTYPE:-tgz}&lt;br /&gt;
&lt;br /&gt;
And here's a downloadable version: http://www.dawoodfall.net/slackbuilds/13.0/kernel/kernel-jabberwok.SlackBuild&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details. Note that this does not include the firmware so you should keep the relevant kernel-firmware package installed.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Thu, 11 Mar 2010 19:24:44 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=329</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=329</guid>
			<description>&lt;p&gt;Dive: /* Building */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
*Note2: I will be assuming x86 here, but if anyone wants to contribute some notes on x86_64 until I can get a machine setup, please do.&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does almost the same thing, although the output might not be exactly what you expect. I will not be using that option here, but see the discussion page about that.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy your .config into the source directory and do &lt;br /&gt;
   &lt;br /&gt;
   make menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
You '''may''' need to do 'make mrproper' first, and perhaps 'make oldconfig'.&lt;br /&gt;
&lt;br /&gt;
   make&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' or 'make modules_install', even with '''O''' switch, as this *will* install to /boot and /lib/modules.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the source directory. The file '''modules.order''' lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; /tmp/kernel-package/install/doinst.sh&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6_tag-i686-1.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using (run make menuconfig first):&lt;br /&gt;
&lt;br /&gt;
   #!/bin/sh&lt;br /&gt;
   # Slackware build script for kernel and modules&lt;br /&gt;
   #&lt;br /&gt;
   # Copyright 2009  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
   # All rights reserved.&lt;br /&gt;
   #&lt;br /&gt;
   # Redistribution and use of this script, with or without modification, is&lt;br /&gt;
   # permitted provided that the following conditions are met:&lt;br /&gt;
   #&lt;br /&gt;
   # 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
   #    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
   #&lt;br /&gt;
   # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
   # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
   # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
   # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
   # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
   # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
   # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
   # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
   # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
   # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
   &lt;br /&gt;
   KARCH=${ARCH:-i486}&lt;br /&gt;
   ARCH=x86&lt;br /&gt;
   MODULELIST=modules.order&lt;br /&gt;
   PRGNAM=kernel&lt;br /&gt;
   VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
   BUILD=${BUILD:-1}&lt;br /&gt;
   TAG=${TAG:-_daw}&lt;br /&gt;
   LOCALNAME=${LOCALNAME:-jabberwok}&lt;br /&gt;
   OUTPUT=${TMP:-/tmp}&lt;br /&gt;
   PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
   MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
   &lt;br /&gt;
   set -e&lt;br /&gt;
 &lt;br /&gt;
   rm -rf $PKG &lt;br /&gt;
 &lt;br /&gt;
   make&lt;br /&gt;
 &lt;br /&gt;
   for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
      mkdir -p $MODDDIR/$(dirname $i)&lt;br /&gt;
      install -m 644 -v $i $MODDDIR/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
 &lt;br /&gt;
   mkdir -p $PKG/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
   cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
   cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
 &lt;br /&gt;
   mkdir $PKG/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
 &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
   # HOW TO EDIT THIS FILE:&lt;br /&gt;
   # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
   # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
   # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
   # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
   # customary to leave one space after the ':'.&lt;br /&gt;
 &lt;br /&gt;
   $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
   $PRGNAM-$LOCALNAME: kernel and modules 2.6.29.6-jabberwok&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   EOF&lt;br /&gt;
 &lt;br /&gt;
   cd $PKG&lt;br /&gt;
   /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$LOCALNAME-$VERSION$TAG-$KARCH-$BUILD.${PKGTYPE:-tgz}&lt;br /&gt;
&lt;br /&gt;
And here's a downloadable version: http://www.dawoodfall.net/slackbuilds/13.0/kernel/kernel-jabberwok.SlackBuild&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details. Note that this does not include the firmware so you should keep the relevant kernel-firmware package installed.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Thu, 11 Mar 2010 15:07:11 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=328</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=328</guid>
			<description>&lt;p&gt;Dive: /* A Little Automation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
*Note2: I will be assuming x86 here, but if anyone wants to contribute some notes on x86_64 until I can get a machine setup, please do.&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does almost the same thing, although the output might not be exactly what you expect. I will not be using that option here, but see the discussion page about that.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy your .config into the source directory and do &lt;br /&gt;
   &lt;br /&gt;
   make menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
You '''may''' need to do 'make mrproper' first, and perhaps 'make oldconfig'.&lt;br /&gt;
&lt;br /&gt;
   make&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' or 'make modules_install' as this *will* install to /boot and /lib/modules.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the source directory. The file '''modules.order''' lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; /tmp/kernel-package/install/doinst.sh&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6_tag-i686-1.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using (run make menuconfig first):&lt;br /&gt;
&lt;br /&gt;
   #!/bin/sh&lt;br /&gt;
   # Slackware build script for kernel and modules&lt;br /&gt;
   #&lt;br /&gt;
   # Copyright 2009  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
   # All rights reserved.&lt;br /&gt;
   #&lt;br /&gt;
   # Redistribution and use of this script, with or without modification, is&lt;br /&gt;
   # permitted provided that the following conditions are met:&lt;br /&gt;
   #&lt;br /&gt;
   # 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
   #    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
   #&lt;br /&gt;
   # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
   # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
   # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
   # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
   # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
   # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
   # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
   # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
   # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
   # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
   &lt;br /&gt;
   KARCH=${ARCH:-i486}&lt;br /&gt;
   ARCH=x86&lt;br /&gt;
   MODULELIST=modules.order&lt;br /&gt;
   PRGNAM=kernel&lt;br /&gt;
   VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
   BUILD=${BUILD:-1}&lt;br /&gt;
   TAG=${TAG:-_daw}&lt;br /&gt;
   LOCALNAME=${LOCALNAME:-jabberwok}&lt;br /&gt;
   OUTPUT=${TMP:-/tmp}&lt;br /&gt;
   PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
   MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
   &lt;br /&gt;
   set -e&lt;br /&gt;
 &lt;br /&gt;
   rm -rf $PKG &lt;br /&gt;
 &lt;br /&gt;
   make&lt;br /&gt;
 &lt;br /&gt;
   for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
      mkdir -p $MODDDIR/$(dirname $i)&lt;br /&gt;
      install -m 644 -v $i $MODDDIR/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
 &lt;br /&gt;
   mkdir -p $PKG/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
   cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
   cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
 &lt;br /&gt;
   mkdir $PKG/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
 &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
   # HOW TO EDIT THIS FILE:&lt;br /&gt;
   # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
   # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
   # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
   # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
   # customary to leave one space after the ':'.&lt;br /&gt;
 &lt;br /&gt;
   $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
   $PRGNAM-$LOCALNAME: kernel and modules 2.6.29.6-jabberwok&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   EOF&lt;br /&gt;
 &lt;br /&gt;
   cd $PKG&lt;br /&gt;
   /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$LOCALNAME-$VERSION$TAG-$KARCH-$BUILD.${PKGTYPE:-tgz}&lt;br /&gt;
&lt;br /&gt;
And here's a downloadable version: http://www.dawoodfall.net/slackbuilds/13.0/kernel/kernel-jabberwok.SlackBuild&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details. Note that this does not include the firmware so you should keep the relevant kernel-firmware package installed.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Thu, 11 Mar 2010 14:17:42 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=327</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=327</guid>
			<description>&lt;p&gt;Dive: /* Kernel Output Target Option */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
*Note2: I will be assuming x86 here, but if anyone wants to contribute some notes on x86_64 until I can get a machine setup, please do.&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does almost the same thing, although the output might not be exactly what you expect. I will not be using that option here, but see the discussion page about that.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy your .config into the source directory and do &lt;br /&gt;
   &lt;br /&gt;
   make menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
You '''may''' need to do 'make mrproper' first, and perhaps 'make oldconfig'.&lt;br /&gt;
&lt;br /&gt;
   make&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' or 'make modules_install' as this *will* install to /boot and /lib/modules.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the source directory. The file '''modules.order''' lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; /tmp/kernel-package/install/doinst.sh&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6_tag-i686-1.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using:&lt;br /&gt;
&lt;br /&gt;
   #!/bin/sh&lt;br /&gt;
   # Slackware build script for kernel and modules&lt;br /&gt;
   #&lt;br /&gt;
   # Copyright 2009  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
   # All rights reserved.&lt;br /&gt;
   #&lt;br /&gt;
   # Redistribution and use of this script, with or without modification, is&lt;br /&gt;
   # permitted provided that the following conditions are met:&lt;br /&gt;
   #&lt;br /&gt;
   # 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
   #    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
   #&lt;br /&gt;
   # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
   # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
   # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
   # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
   # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
   # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
   # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
   # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
   # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
   # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
   &lt;br /&gt;
   KARCH=${ARCH:-i486}&lt;br /&gt;
   ARCH=x86&lt;br /&gt;
   MODULELIST=modules.order&lt;br /&gt;
   PRGNAM=kernel&lt;br /&gt;
   VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
   BUILD=${BUILD:-1}&lt;br /&gt;
   TAG=${TAG:-_daw}&lt;br /&gt;
   LOCALNAME=${LOCALNAME:-jabberwok}&lt;br /&gt;
   OUTPUT=${TMP:-/tmp}&lt;br /&gt;
   PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
   MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
   &lt;br /&gt;
   set -e&lt;br /&gt;
 &lt;br /&gt;
   rm -rf $PKG &lt;br /&gt;
 &lt;br /&gt;
   make menuconfig&lt;br /&gt;
   make&lt;br /&gt;
 &lt;br /&gt;
   for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
      mkdir -p $MODDDIR/$(dirname $i)&lt;br /&gt;
      install -m 644 -v $i $MODDDIR/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
 &lt;br /&gt;
   mkdir -p $PKG/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
   cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
   cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
 &lt;br /&gt;
   mkdir $PKG/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
 &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
   # HOW TO EDIT THIS FILE:&lt;br /&gt;
   # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
   # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
   # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
   # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
   # customary to leave one space after the ':'.&lt;br /&gt;
 &lt;br /&gt;
   $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
   $PRGNAM-$LOCALNAME: kernel and modules 2.6.29.6-jabberwok&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   EOF&lt;br /&gt;
 &lt;br /&gt;
   cd $PKG&lt;br /&gt;
   /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$LOCALNAME-$VERSION$TAG-$KARCH-$BUILD.${PKGTYPE:-tgz}&lt;br /&gt;
&lt;br /&gt;
And here's a downloadable version: http://www.dawoodfall.net/slackbuilds/13.0/kernel/kernel-jabberwok.SlackBuild&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details. Note that this does not include the firmware so you should keep the relevant kernel-firmware package installed.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Thu, 11 Mar 2010 13:35:27 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Talk:Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Talk:Kernel-packaging&amp;diff=326</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Talk:Kernel-packaging&amp;diff=326</guid>
			<description>&lt;p&gt;Dive: Created page with 'Originally I used the O= switch to build in a separate build directory. This isn't really necesary, but if you prefer to do this have a look at the README file in top directory a…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Originally I used the O= switch to build in a separate build directory. This isn't really necesary, but if you prefer to do this have a look at the README file in top directory about the O= switch.&lt;/div&gt;</description>
			<pubDate>Thu, 11 Mar 2010 12:52:41 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=325</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=325</guid>
			<description>&lt;p&gt;Dive: /* Building */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
*Note2: I will be assuming x86 here, but if anyone wants to contribute some notes on x86_64 until I can get a machine setup, please do.&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does almost the same thing, although the output might not be exactly what you expect.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy your .config into the source directory and do &lt;br /&gt;
   &lt;br /&gt;
   make menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
You '''may''' need to do 'make mrproper' first, and perhaps 'make oldconfig'.&lt;br /&gt;
&lt;br /&gt;
   make&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' or 'make modules_install' as this *will* install to /boot and /lib/modules.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the source directory. The file '''modules.order''' lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; /tmp/kernel-package/install/doinst.sh&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6_tag-i686-1.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using:&lt;br /&gt;
&lt;br /&gt;
   #!/bin/sh&lt;br /&gt;
   # Slackware build script for kernel and modules&lt;br /&gt;
   #&lt;br /&gt;
   # Copyright 2009  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
   # All rights reserved.&lt;br /&gt;
   #&lt;br /&gt;
   # Redistribution and use of this script, with or without modification, is&lt;br /&gt;
   # permitted provided that the following conditions are met:&lt;br /&gt;
   #&lt;br /&gt;
   # 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
   #    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
   #&lt;br /&gt;
   # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
   # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
   # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
   # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
   # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
   # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
   # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
   # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
   # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
   # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
   &lt;br /&gt;
   KARCH=${ARCH:-i486}&lt;br /&gt;
   ARCH=x86&lt;br /&gt;
   MODULELIST=modules.order&lt;br /&gt;
   PRGNAM=kernel&lt;br /&gt;
   VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
   BUILD=${BUILD:-1}&lt;br /&gt;
   TAG=${TAG:-_daw}&lt;br /&gt;
   LOCALNAME=${LOCALNAME:-jabberwok}&lt;br /&gt;
   OUTPUT=${TMP:-/tmp}&lt;br /&gt;
   PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
   MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
   &lt;br /&gt;
   set -e&lt;br /&gt;
 &lt;br /&gt;
   rm -rf $PKG &lt;br /&gt;
 &lt;br /&gt;
   make menuconfig&lt;br /&gt;
   make&lt;br /&gt;
 &lt;br /&gt;
   for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
      mkdir -p $MODDDIR/$(dirname $i)&lt;br /&gt;
      install -m 644 -v $i $MODDDIR/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
 &lt;br /&gt;
   mkdir -p $PKG/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
   cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
   cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
 &lt;br /&gt;
   mkdir $PKG/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
 &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
   # HOW TO EDIT THIS FILE:&lt;br /&gt;
   # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
   # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
   # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
   # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
   # customary to leave one space after the ':'.&lt;br /&gt;
 &lt;br /&gt;
   $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
   $PRGNAM-$LOCALNAME: kernel and modules 2.6.29.6-jabberwok&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   EOF&lt;br /&gt;
 &lt;br /&gt;
   cd $PKG&lt;br /&gt;
   /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$LOCALNAME-$VERSION$TAG-$KARCH-$BUILD.${PKGTYPE:-tgz}&lt;br /&gt;
&lt;br /&gt;
And here's a downloadable version: http://www.dawoodfall.net/slackbuilds/13.0/kernel/kernel-jabberwok.SlackBuild&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details. Note that this does not include the firmware so you should keep the relevant kernel-firmware package installed.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Thu, 11 Mar 2010 12:49:02 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=324</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=324</guid>
			<description>&lt;p&gt;Dive: /* A Little Automation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
*Note2: I will be assuming x86 here, but if anyone wants to contribute some notes on x86_64 until I can get a machine setup, please do.&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does almost the same thing, although the output might not be exactly what you expect.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From your kernel source directory do &lt;br /&gt;
   &lt;br /&gt;
   make menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
You '''may''' need to do 'make mrproper' first, and perhaps 'make oldconfig'.&lt;br /&gt;
&lt;br /&gt;
   make&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' or 'make modules_install' as this *will* install to /boot and /lib/modules.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the source directory. The file '''modules.order''' lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; /tmp/kernel-package/install/doinst.sh&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6_tag-i686-1.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using:&lt;br /&gt;
&lt;br /&gt;
   #!/bin/sh&lt;br /&gt;
   # Slackware build script for kernel and modules&lt;br /&gt;
   #&lt;br /&gt;
   # Copyright 2009  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
   # All rights reserved.&lt;br /&gt;
   #&lt;br /&gt;
   # Redistribution and use of this script, with or without modification, is&lt;br /&gt;
   # permitted provided that the following conditions are met:&lt;br /&gt;
   #&lt;br /&gt;
   # 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
   #    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
   #&lt;br /&gt;
   # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
   # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
   # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
   # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
   # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
   # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
   # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
   # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
   # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
   # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
   &lt;br /&gt;
   KARCH=${ARCH:-i486}&lt;br /&gt;
   ARCH=x86&lt;br /&gt;
   MODULELIST=modules.order&lt;br /&gt;
   PRGNAM=kernel&lt;br /&gt;
   VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
   BUILD=${BUILD:-1}&lt;br /&gt;
   TAG=${TAG:-_daw}&lt;br /&gt;
   LOCALNAME=${LOCALNAME:-jabberwok}&lt;br /&gt;
   OUTPUT=${TMP:-/tmp}&lt;br /&gt;
   PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
   MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
   &lt;br /&gt;
   set -e&lt;br /&gt;
 &lt;br /&gt;
   rm -rf $PKG &lt;br /&gt;
 &lt;br /&gt;
   make menuconfig&lt;br /&gt;
   make&lt;br /&gt;
 &lt;br /&gt;
   for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
      mkdir -p $MODDDIR/$(dirname $i)&lt;br /&gt;
      install -m 644 -v $i $MODDDIR/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
 &lt;br /&gt;
   mkdir -p $PKG/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
   cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
   cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
 &lt;br /&gt;
   mkdir $PKG/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
 &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
   # HOW TO EDIT THIS FILE:&lt;br /&gt;
   # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
   # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
   # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
   # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
   # customary to leave one space after the ':'.&lt;br /&gt;
 &lt;br /&gt;
   $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
   $PRGNAM-$LOCALNAME: kernel and modules 2.6.29.6-jabberwok&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   EOF&lt;br /&gt;
 &lt;br /&gt;
   cd $PKG&lt;br /&gt;
   /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$LOCALNAME-$VERSION$TAG-$KARCH-$BUILD.${PKGTYPE:-tgz}&lt;br /&gt;
&lt;br /&gt;
And here's a downloadable version: http://www.dawoodfall.net/slackbuilds/13.0/kernel/kernel-jabberwok.SlackBuild&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details. Note that this does not include the firmware so you should keep the relevant kernel-firmware package installed.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Thu, 11 Mar 2010 12:44:12 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=323</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=323</guid>
			<description>&lt;p&gt;Dive: /* Output Into a Build Directory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
*Note2: I will be assuming x86 here, but if anyone wants to contribute some notes on x86_64 until I can get a machine setup, please do.&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does almost the same thing, although the output might not be exactly what you expect.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From your kernel source directory do &lt;br /&gt;
   &lt;br /&gt;
   make menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
You '''may''' need to do 'make mrproper' first, and perhaps 'make oldconfig'.&lt;br /&gt;
&lt;br /&gt;
   make&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' or 'make modules_install' as this *will* install to /boot and /lib/modules.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the source directory. The file '''modules.order''' lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; /tmp/kernel-package/install/doinst.sh&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6_tag-i686-1.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using:&lt;br /&gt;
&lt;br /&gt;
   #!/bin/sh&lt;br /&gt;
   # Slackware build script for kernel and modules&lt;br /&gt;
   # Copyright 2009  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
   # All rights reserved.&lt;br /&gt;
   #&lt;br /&gt;
   # Redistribution and use of this script, with or without modification, is&lt;br /&gt;
   # permitted provided that the following conditions are met:&lt;br /&gt;
   #&lt;br /&gt;
   # 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
   #    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
   #&lt;br /&gt;
   # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
   # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
   # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
   # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
   # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
   # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
   # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
   # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
   # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
   # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
   &lt;br /&gt;
   KARCH=${ARCH:-i486}&lt;br /&gt;
   ARCH=x86&lt;br /&gt;
   MODULELIST=modules.order&lt;br /&gt;
   PRGNAM=kernel&lt;br /&gt;
   VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
   BUILD=${BUILD:-1}&lt;br /&gt;
   TAG=${TAG:-_daw}&lt;br /&gt;
   LOCALNAME=${LOCALNAME:-jabberwok}&lt;br /&gt;
   OUTPUT=${TMP:-/tmp}&lt;br /&gt;
   KOUTPUT=$OUTPUT/$PRGNAM-$LOCALNAME&lt;br /&gt;
   PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
   MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
   set -e&lt;br /&gt;
 &lt;br /&gt;
   rm -rf $KOUTPUT&lt;br /&gt;
   rm -rf $PKG &lt;br /&gt;
   mkdir -p $KOUTPUT&lt;br /&gt;
 &lt;br /&gt;
   cd $SOURCE&lt;br /&gt;
   make O=$KOUTPUT menuconfig&lt;br /&gt;
   make mrproper&lt;br /&gt;
   make O=$KOUTPUT &lt;br /&gt;
   make O=$KOUTPUT modules_install&lt;br /&gt;
 &lt;br /&gt;
   cd $KOUTPUT&lt;br /&gt;
   for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
      mkdir -p $MODDDIR/$(dirname $i)&lt;br /&gt;
      install -m 644 -v $i $MODDDIR/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
 &lt;br /&gt;
   mkdir -p $PKG/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
   cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
   cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
 &lt;br /&gt;
   mkdir $PKG/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
 &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
   # HOW TO EDIT THIS FILE:&lt;br /&gt;
   # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
   # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
   # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
   # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
   # customary to leave one space after the ':'.&lt;br /&gt;
 &lt;br /&gt;
   $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
   $PRGNAM-$LOCALNAME: kernel and modules 2.6.29.6-jabberwok&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   EOF&lt;br /&gt;
 &lt;br /&gt;
   cd $PKG&lt;br /&gt;
   /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$LOCALNAME-$VERSION$TAG-$KARCH-$BUILD.${PKGTYPE:-tgz}&lt;br /&gt;
&lt;br /&gt;
And here's a downloadable version: http://www.dawoodfall.net/slackbuilds/13.0/kernel/kernel-jabberwok.SlackBuild&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details. Note that this does not include the firmware so you should keep the relevant kernel-firmware package installed.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Thu, 11 Mar 2010 12:41:43 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=322</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=322</guid>
			<description>&lt;p&gt;Dive: /* Kernel Output Target Option */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
*Note2: I will be assuming x86 here, but if anyone wants to contribute some notes on x86_64 until I can get a machine setup, please do.&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does almost the same thing, although the output might not be exactly what you expect.&lt;br /&gt;
&lt;br /&gt;
== Output Into a Build Directory ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From your kernel source directory do &lt;br /&gt;
   &lt;br /&gt;
   make O=/tmp/kernel-build menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
   make mrproper&lt;br /&gt;
&lt;br /&gt;
This will delete your .config in the source tree so make sure you have a copy of it somewhere for safe keeping.&lt;br /&gt;
&lt;br /&gt;
Next steps are the same as a normal make and modules_install, but again using the O= switch:&lt;br /&gt;
&lt;br /&gt;
   make O=/tmp/kernel-build&lt;br /&gt;
   make O=/tmp/kernel-build modules_install&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' as this *will* install it in /boot rather than our build directory.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the build directory. However, taking a look inside it shows many more things have been placed there than we need. The kernel is in arch/x86/boot/ as usual and the modules are in various directories. Luckily for us there is a file, '''modules.order''', which lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; /tmp/kernel-package/install/doinst.sh&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6_tag-i686-1.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using:&lt;br /&gt;
&lt;br /&gt;
   #!/bin/sh&lt;br /&gt;
   # Slackware build script for kernel and modules&lt;br /&gt;
   # Copyright 2009  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
   # All rights reserved.&lt;br /&gt;
   #&lt;br /&gt;
   # Redistribution and use of this script, with or without modification, is&lt;br /&gt;
   # permitted provided that the following conditions are met:&lt;br /&gt;
   #&lt;br /&gt;
   # 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
   #    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
   #&lt;br /&gt;
   # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
   # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
   # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
   # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
   # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
   # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
   # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
   # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
   # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
   # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
   &lt;br /&gt;
   KARCH=${ARCH:-i486}&lt;br /&gt;
   ARCH=x86&lt;br /&gt;
   MODULELIST=modules.order&lt;br /&gt;
   PRGNAM=kernel&lt;br /&gt;
   VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
   BUILD=${BUILD:-1}&lt;br /&gt;
   TAG=${TAG:-_daw}&lt;br /&gt;
   LOCALNAME=${LOCALNAME:-jabberwok}&lt;br /&gt;
   OUTPUT=${TMP:-/tmp}&lt;br /&gt;
   KOUTPUT=$OUTPUT/$PRGNAM-$LOCALNAME&lt;br /&gt;
   PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
   MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
   set -e&lt;br /&gt;
 &lt;br /&gt;
   rm -rf $KOUTPUT&lt;br /&gt;
   rm -rf $PKG &lt;br /&gt;
   mkdir -p $KOUTPUT&lt;br /&gt;
 &lt;br /&gt;
   cd $SOURCE&lt;br /&gt;
   make O=$KOUTPUT menuconfig&lt;br /&gt;
   make mrproper&lt;br /&gt;
   make O=$KOUTPUT &lt;br /&gt;
   make O=$KOUTPUT modules_install&lt;br /&gt;
 &lt;br /&gt;
   cd $KOUTPUT&lt;br /&gt;
   for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
      mkdir -p $MODDDIR/$(dirname $i)&lt;br /&gt;
      install -m 644 -v $i $MODDDIR/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
 &lt;br /&gt;
   mkdir -p $PKG/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
   cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
   cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
 &lt;br /&gt;
   mkdir $PKG/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
 &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
   # HOW TO EDIT THIS FILE:&lt;br /&gt;
   # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
   # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
   # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
   # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
   # customary to leave one space after the ':'.&lt;br /&gt;
 &lt;br /&gt;
   $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
   $PRGNAM-$LOCALNAME: kernel and modules 2.6.29.6-jabberwok&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   EOF&lt;br /&gt;
 &lt;br /&gt;
   cd $PKG&lt;br /&gt;
   /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$LOCALNAME-$VERSION$TAG-$KARCH-$BUILD.${PKGTYPE:-tgz}&lt;br /&gt;
&lt;br /&gt;
And here's a downloadable version: http://www.dawoodfall.net/slackbuilds/13.0/kernel/kernel-jabberwok.SlackBuild&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details. Note that this does not include the firmware so you should keep the relevant kernel-firmware package installed.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Thu, 11 Mar 2010 12:37:35 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=321</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=321</guid>
			<description>&lt;p&gt;Dive: /* A Little Automation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
*Note2: I will be assuming x86 here, but if anyone wants to contribute some notes on x86_64 until I can get a machine setup, please do.&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does the same thing, although the output might not be exactly what you expect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first job is to create an output directory. I will be using '''/tmp/kernel-build''' for this so mkdir it now.&lt;br /&gt;
&lt;br /&gt;
== Output Into a Build Directory ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From your kernel source directory do &lt;br /&gt;
   &lt;br /&gt;
   make O=/tmp/kernel-build menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
   make mrproper&lt;br /&gt;
&lt;br /&gt;
This will delete your .config in the source tree so make sure you have a copy of it somewhere for safe keeping.&lt;br /&gt;
&lt;br /&gt;
Next steps are the same as a normal make and modules_install, but again using the O= switch:&lt;br /&gt;
&lt;br /&gt;
   make O=/tmp/kernel-build&lt;br /&gt;
   make O=/tmp/kernel-build modules_install&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' as this *will* install it in /boot rather than our build directory.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the build directory. However, taking a look inside it shows many more things have been placed there than we need. The kernel is in arch/x86/boot/ as usual and the modules are in various directories. Luckily for us there is a file, '''modules.order''', which lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; /tmp/kernel-package/install/doinst.sh&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6_tag-i686-1.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using:&lt;br /&gt;
&lt;br /&gt;
   #!/bin/sh&lt;br /&gt;
   # Slackware build script for kernel and modules&lt;br /&gt;
   # Copyright 2009  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
   # All rights reserved.&lt;br /&gt;
   #&lt;br /&gt;
   # Redistribution and use of this script, with or without modification, is&lt;br /&gt;
   # permitted provided that the following conditions are met:&lt;br /&gt;
   #&lt;br /&gt;
   # 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
   #    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
   #&lt;br /&gt;
   # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
   # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
   # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
   # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
   # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
   # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
   # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
   # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
   # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
   # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
   &lt;br /&gt;
   KARCH=${ARCH:-i486}&lt;br /&gt;
   ARCH=x86&lt;br /&gt;
   MODULELIST=modules.order&lt;br /&gt;
   PRGNAM=kernel&lt;br /&gt;
   VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
   BUILD=${BUILD:-1}&lt;br /&gt;
   TAG=${TAG:-_daw}&lt;br /&gt;
   LOCALNAME=${LOCALNAME:-jabberwok}&lt;br /&gt;
   OUTPUT=${TMP:-/tmp}&lt;br /&gt;
   KOUTPUT=$OUTPUT/$PRGNAM-$LOCALNAME&lt;br /&gt;
   PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
   MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
   set -e&lt;br /&gt;
 &lt;br /&gt;
   rm -rf $KOUTPUT&lt;br /&gt;
   rm -rf $PKG &lt;br /&gt;
   mkdir -p $KOUTPUT&lt;br /&gt;
 &lt;br /&gt;
   cd $SOURCE&lt;br /&gt;
   make O=$KOUTPUT menuconfig&lt;br /&gt;
   make mrproper&lt;br /&gt;
   make O=$KOUTPUT &lt;br /&gt;
   make O=$KOUTPUT modules_install&lt;br /&gt;
 &lt;br /&gt;
   cd $KOUTPUT&lt;br /&gt;
   for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
      mkdir -p $MODDDIR/$(dirname $i)&lt;br /&gt;
      install -m 644 -v $i $MODDDIR/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
 &lt;br /&gt;
   mkdir -p $PKG/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
   cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
   cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
 &lt;br /&gt;
   mkdir $PKG/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
 &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
   # HOW TO EDIT THIS FILE:&lt;br /&gt;
   # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
   # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
   # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
   # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
   # customary to leave one space after the ':'.&lt;br /&gt;
 &lt;br /&gt;
   $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
   $PRGNAM-$LOCALNAME: kernel and modules 2.6.29.6-jabberwok&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   EOF&lt;br /&gt;
 &lt;br /&gt;
   cd $PKG&lt;br /&gt;
   /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$LOCALNAME-$VERSION$TAG-$KARCH-$BUILD.${PKGTYPE:-tgz}&lt;br /&gt;
&lt;br /&gt;
And here's a downloadable version: http://www.dawoodfall.net/slackbuilds/13.0/kernel/kernel-jabberwok.SlackBuild&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details. Note that this does not include the firmware so you should keep the relevant kernel-firmware package installed.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Thu, 11 Mar 2010 08:42:34 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=320</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=320</guid>
			<description>&lt;p&gt;Dive: /* A Little Automation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
*Note2: I will be assuming x86 here, but if anyone wants to contribute some notes on x86_64 until I can get a machine setup, please do.&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does the same thing, although the output might not be exactly what you expect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first job is to create an output directory. I will be using '''/tmp/kernel-build''' for this so mkdir it now.&lt;br /&gt;
&lt;br /&gt;
== Output Into a Build Directory ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From your kernel source directory do &lt;br /&gt;
   &lt;br /&gt;
   make O=/tmp/kernel-build menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
   make mrproper&lt;br /&gt;
&lt;br /&gt;
This will delete your .config in the source tree so make sure you have a copy of it somewhere for safe keeping.&lt;br /&gt;
&lt;br /&gt;
Next steps are the same as a normal make and modules_install, but again using the O= switch:&lt;br /&gt;
&lt;br /&gt;
   make O=/tmp/kernel-build&lt;br /&gt;
   make O=/tmp/kernel-build modules_install&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' as this *will* install it in /boot rather than our build directory.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the build directory. However, taking a look inside it shows many more things have been placed there than we need. The kernel is in arch/x86/boot/ as usual and the modules are in various directories. Luckily for us there is a file, '''modules.order''', which lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; /tmp/kernel-package/install/doinst.sh&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6_tag-i686-1.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using:&lt;br /&gt;
&lt;br /&gt;
   #!/bin/sh&lt;br /&gt;
   # Slackware build script for kernel and modules&lt;br /&gt;
   # Copyright 2009  David Woodfall &amp;lt;dave@dawoodfall.net&amp;gt;&lt;br /&gt;
   # All rights reserved.&lt;br /&gt;
   #&lt;br /&gt;
   # Redistribution and use of this script, with or without modification, is&lt;br /&gt;
   # permitted provided that the following conditions are met:&lt;br /&gt;
   #&lt;br /&gt;
   # 1. Redistributions of this script must retain the above copyright&lt;br /&gt;
   #    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
   #&lt;br /&gt;
   # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED&lt;br /&gt;
   # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF&lt;br /&gt;
   # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO&lt;br /&gt;
   # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,&lt;br /&gt;
   # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;
   # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;&lt;br /&gt;
   # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,&lt;br /&gt;
   # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR&lt;br /&gt;
   # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF&lt;br /&gt;
   # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
&lt;br /&gt;
   KARCH=${ARCH:-i486}&lt;br /&gt;
   ARCH=x86&lt;br /&gt;
   MODULELIST=modules.order&lt;br /&gt;
   PRGNAM=kernel&lt;br /&gt;
   VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
   BUILD=${BUILD:-1}&lt;br /&gt;
   TAG=${TAG:-_daw}&lt;br /&gt;
   LOCALNAME=${LOCALNAME:-jabberwok}&lt;br /&gt;
   OUTPUT=${TMP:-/tmp}&lt;br /&gt;
   KOUTPUT=$OUTPUT/$PRGNAM-$LOCALNAME&lt;br /&gt;
   PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
   MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
   set -e&lt;br /&gt;
 &lt;br /&gt;
   rm -rf $KOUTPUT&lt;br /&gt;
   rm -rf $PKG &lt;br /&gt;
   mkdir -p $KOUTPUT&lt;br /&gt;
 &lt;br /&gt;
   cd $SOURCE&lt;br /&gt;
   make O=$KOUTPUT menuconfig&lt;br /&gt;
   make mrproper&lt;br /&gt;
   make O=$KOUTPUT &lt;br /&gt;
   make O=$KOUTPUT modules_install&lt;br /&gt;
 &lt;br /&gt;
   cd $KOUTPUT&lt;br /&gt;
   for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
      mkdir -p $MODDDIR/$(dirname $i)&lt;br /&gt;
      install -m 644 -v $i $MODDDIR/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
 &lt;br /&gt;
   mkdir -p $PKG/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
   cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
   cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
 &lt;br /&gt;
   mkdir $PKG/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
 &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
   # HOW TO EDIT THIS FILE:&lt;br /&gt;
   # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
   # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
   # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
   # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
   # customary to leave one space after the ':'.&lt;br /&gt;
 &lt;br /&gt;
   $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
   $PRGNAM-$LOCALNAME: kernel and modules 2.6.29.6-jabberwok&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   EOF&lt;br /&gt;
 &lt;br /&gt;
   cd $PKG&lt;br /&gt;
   /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$LOCALNAME-$VERSION$TAG-$KARCH-$BUILD.${PKGTYPE:-tgz}&lt;br /&gt;
&lt;br /&gt;
And here's a downloadable version: http://www.dawoodfall.net/slackbuilds/13.0/kernel/kernel-jabberwok.SlackBuild&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details. Note that this does not include the firmware so you should keep the relevant kernel-firmware package installed.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Thu, 11 Mar 2010 08:42:07 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=319</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=319</guid>
			<description>&lt;p&gt;Dive: /* A Little Automation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
*Note2: I will be assuming x86 here, but if anyone wants to contribute some notes on x86_64 until I can get a machine setup, please do.&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does the same thing, although the output might not be exactly what you expect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first job is to create an output directory. I will be using '''/tmp/kernel-build''' for this so mkdir it now.&lt;br /&gt;
&lt;br /&gt;
== Output Into a Build Directory ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From your kernel source directory do &lt;br /&gt;
   &lt;br /&gt;
   make O=/tmp/kernel-build menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
   make mrproper&lt;br /&gt;
&lt;br /&gt;
This will delete your .config in the source tree so make sure you have a copy of it somewhere for safe keeping.&lt;br /&gt;
&lt;br /&gt;
Next steps are the same as a normal make and modules_install, but again using the O= switch:&lt;br /&gt;
&lt;br /&gt;
   make O=/tmp/kernel-build&lt;br /&gt;
   make O=/tmp/kernel-build modules_install&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' as this *will* install it in /boot rather than our build directory.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the build directory. However, taking a look inside it shows many more things have been placed there than we need. The kernel is in arch/x86/boot/ as usual and the modules are in various directories. Luckily for us there is a file, '''modules.order''', which lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; /tmp/kernel-package/install/doinst.sh&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6_tag-i686-1.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using:&lt;br /&gt;
&lt;br /&gt;
   #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
   KARCH=${ARCH:-i486}&lt;br /&gt;
   ARCH=x86&lt;br /&gt;
   MODULELIST=modules.order&lt;br /&gt;
   PRGNAM=kernel&lt;br /&gt;
   VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
   BUILD=${BUILD:-1}&lt;br /&gt;
   TAG=${TAG:-_daw}&lt;br /&gt;
   LOCALNAME=${LOCALNAME:-jabberwok}&lt;br /&gt;
   OUTPUT=${TMP:-/tmp}&lt;br /&gt;
   KOUTPUT=$OUTPUT/$PRGNAM-$LOCALNAME&lt;br /&gt;
   PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
   MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
   set -e&lt;br /&gt;
 &lt;br /&gt;
   rm -rf $KOUTPUT&lt;br /&gt;
   rm -rf $PKG &lt;br /&gt;
   mkdir -p $KOUTPUT&lt;br /&gt;
 &lt;br /&gt;
   cd $SOURCE&lt;br /&gt;
   make O=$KOUTPUT menuconfig&lt;br /&gt;
   make mrproper&lt;br /&gt;
   make O=$KOUTPUT &lt;br /&gt;
   make O=$KOUTPUT modules_install&lt;br /&gt;
 &lt;br /&gt;
   cd $KOUTPUT&lt;br /&gt;
   for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
      mkdir -p $MODDDIR/$(dirname $i)&lt;br /&gt;
      install -m 644 -v $i $MODDDIR/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
 &lt;br /&gt;
   mkdir -p $PKG/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
   cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
   cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
 &lt;br /&gt;
   mkdir $PKG/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
 &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
   # HOW TO EDIT THIS FILE:&lt;br /&gt;
   # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
   # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
   # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
   # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
   # customary to leave one space after the ':'.&lt;br /&gt;
 &lt;br /&gt;
   $PRGNAM-$LOCALNAME|-----handy-ruler------------------------------------------------------|&lt;br /&gt;
   $PRGNAM-$LOCALNAME: kernel and modules 2.6.29.6-jabberwok&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME: Jabberwokky type kernel!&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   $PRGNAM-$LOCALNAME:&lt;br /&gt;
   EOF&lt;br /&gt;
 &lt;br /&gt;
   cd $PKG&lt;br /&gt;
   /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$LOCALNAME-$VERSION$TAG-$KARCH-$BUILD.${PKGTYPE:-tgz}&lt;br /&gt;
&lt;br /&gt;
And here's a downloadable version: http://www.dawoodfall.net/slackbuilds/13.0/kernel/kernel-jabberwok.SlackBuild&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details. Note that this does not include the firmware so you should keep the relevant kernel-firmware package installed.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Thu, 11 Mar 2010 08:34:43 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=318</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=318</guid>
			<description>&lt;p&gt;Dive: /* A Little Automation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
*Note2: I will be assuming x86 here, but if anyone wants to contribute some notes on x86_64 until I can get a machine setup, please do.&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does the same thing, although the output might not be exactly what you expect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first job is to create an output directory. I will be using '''/tmp/kernel-build''' for this so mkdir it now.&lt;br /&gt;
&lt;br /&gt;
== Output Into a Build Directory ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From your kernel source directory do &lt;br /&gt;
   &lt;br /&gt;
   make O=/tmp/kernel-build menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
   make mrproper&lt;br /&gt;
&lt;br /&gt;
This will delete your .config in the source tree so make sure you have a copy of it somewhere for safe keeping.&lt;br /&gt;
&lt;br /&gt;
Next steps are the same as a normal make and modules_install, but again using the O= switch:&lt;br /&gt;
&lt;br /&gt;
   make O=/tmp/kernel-build&lt;br /&gt;
   make O=/tmp/kernel-build modules_install&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' as this *will* install it in /boot rather than our build directory.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the build directory. However, taking a look inside it shows many more things have been placed there than we need. The kernel is in arch/x86/boot/ as usual and the modules are in various directories. Luckily for us there is a file, '''modules.order''', which lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; /tmp/kernel-package/install/doinst.sh&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6_tag-i686-1.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using:&lt;br /&gt;
&lt;br /&gt;
   #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
   KARCH=${ARCH:-i486}&lt;br /&gt;
   ARCH=x86&lt;br /&gt;
   MODULELIST=modules.order&lt;br /&gt;
   PRGNAM=kernel&lt;br /&gt;
   VERSION=${VERSION:-2.6.29.6}&lt;br /&gt;
   BUILD=${BUILD:-1}&lt;br /&gt;
   TAG=${TAG:-_daw}&lt;br /&gt;
   LOCALNAME=${LOCALNAME:-jabberwok}&lt;br /&gt;
   OUTPUT=${TMP:-/tmp}&lt;br /&gt;
   KOUTPUT=$OUTPUT/$PRGNAM-$LOCALNAME&lt;br /&gt;
   PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
   MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
   set -e&lt;br /&gt;
 &lt;br /&gt;
   rm -rf $KOUTPUT&lt;br /&gt;
   rm -rf $PKG &lt;br /&gt;
   mkdir -p $KOUTPUT&lt;br /&gt;
 &lt;br /&gt;
   cd $SOURCE&lt;br /&gt;
   make O=$KOUTPUT menuconfig&lt;br /&gt;
   make mrproper&lt;br /&gt;
   make O=$KOUTPUT &lt;br /&gt;
   make O=$KOUTPUT modules_install&lt;br /&gt;
 &lt;br /&gt;
   cd $KOUTPUT&lt;br /&gt;
   for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
      mkdir -p $MODDDIR/$(dirname $i)&lt;br /&gt;
      install -m 644 -v $i $MODDDIR/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
 &lt;br /&gt;
   mkdir $PKG/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
   cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
   cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
 &lt;br /&gt;
   mkdir $PKG/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
 &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
   # HOW TO EDIT THIS FILE:&lt;br /&gt;
   # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
   # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
   # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
   # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
   # customary to leave one space after the ':'.&lt;br /&gt;
 &lt;br /&gt;
                   |-----handy-ruler------------------------------------------------------|&lt;br /&gt;
   kernel-jabberwok: kernel and modules 2.6.29.6-jabberwok&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok: Jabberwokky type kernel!&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   EOF&lt;br /&gt;
 &lt;br /&gt;
   cd $PKG&lt;br /&gt;
   /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$LOCALNAME-$VERSION$TAG-$KARCH-$BUILD.${PKGTYPE:-tgz}&lt;br /&gt;
&lt;br /&gt;
And here's a downloadable version: http://www.dawoodfall.net/slackbuilds/13.0/kernel/kernel-jabberwok.SlackBuild&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details. Note that this does not include the firmware so you should keep the relevant kernel-firmware package installed.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Thu, 11 Mar 2010 05:22:44 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=317</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=317</guid>
			<description>&lt;p&gt;Dive: /* A Little Automation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
*Note2: I will be assuming x86 here, but if anyone wants to contribute some notes on x86_64 until I can get a machine setup, please do.&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does the same thing, although the output might not be exactly what you expect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first job is to create an output directory. I will be using '''/tmp/kernel-build''' for this so mkdir it now.&lt;br /&gt;
&lt;br /&gt;
== Output Into a Build Directory ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From your kernel source directory do &lt;br /&gt;
   &lt;br /&gt;
   make O=/tmp/kernel-build menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
   make mrproper&lt;br /&gt;
&lt;br /&gt;
This will delete your .config in the source tree so make sure you have a copy of it somewhere for safe keeping.&lt;br /&gt;
&lt;br /&gt;
Next steps are the same as a normal make and modules_install, but again using the O= switch:&lt;br /&gt;
&lt;br /&gt;
   make O=/tmp/kernel-build&lt;br /&gt;
   make O=/tmp/kernel-build modules_install&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' as this *will* install it in /boot rather than our build directory.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the build directory. However, taking a look inside it shows many more things have been placed there than we need. The kernel is in arch/x86/boot/ as usual and the modules are in various directories. Luckily for us there is a file, '''modules.order''', which lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; /tmp/kernel-package/install/doinst.sh&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6_tag-i686-1.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using:&lt;br /&gt;
&lt;br /&gt;
   #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
   SOURCE=/usr/src/linux-2.6.29.6-jabberwok&lt;br /&gt;
   ARCH=i386&lt;br /&gt;
   KARCH=i686&lt;br /&gt;
   MODULELIST=modules.order&lt;br /&gt;
   PRGNAM=kernel&lt;br /&gt;
   VERSION=2.6.29.6&lt;br /&gt;
   BUILD=1&lt;br /&gt;
   TAG=_daw&lt;br /&gt;
   LOCALNAME=jabberwok&lt;br /&gt;
   OUTPUT=/tmp&lt;br /&gt;
   KOUTPUT=$OUTPUT/$PRGNAM-$LOCALNAME&lt;br /&gt;
   PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
   MODDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
   set -e&lt;br /&gt;
 &lt;br /&gt;
   rm -rf $KOUTPUT&lt;br /&gt;
   rm -rf $PKG &lt;br /&gt;
   mkdir -p $KOUTPUT&lt;br /&gt;
 &lt;br /&gt;
   cd $SOURCE&lt;br /&gt;
   make O=$KOUTPUT menuconfig&lt;br /&gt;
   make mrproper&lt;br /&gt;
   make O=$KOUTPUT &lt;br /&gt;
   make O=$KOUTPUT modules_install&lt;br /&gt;
 &lt;br /&gt;
   cd $KOUTPUT&lt;br /&gt;
   for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
      mkdir -p $MODDDIR/$(dirname $i)&lt;br /&gt;
      install -m 644 -v $i $MODDDIR/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
 &lt;br /&gt;
   mkdir $PKG/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
   cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
   cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
 &lt;br /&gt;
   mkdir $PKG/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
 &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
   # HOW TO EDIT THIS FILE:&lt;br /&gt;
   # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
   # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
   # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
   # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
   # customary to leave one space after the ':'.&lt;br /&gt;
 &lt;br /&gt;
                   |-----handy-ruler------------------------------------------------------|&lt;br /&gt;
   kernel-jabberwok: kernel and modules 2.6.29.6-jabberwok&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok: Jabberwokky type kernel!&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   EOF&lt;br /&gt;
 &lt;br /&gt;
   cd $PKG&lt;br /&gt;
   /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$LOCALNAME-$VERSION$TAG-$KARCH-$BUILD.${PKGTYPE:-tgz}&lt;br /&gt;
&lt;br /&gt;
And here's a downloadable version: http://www.dawoodfall.net/slackbuilds/13.0/kernel/kernel-jabberwok.SlackBuild&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details. Note that this does not include the firmware so you should keep the relevant kernel-firmware package installed.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Thu, 11 Mar 2010 05:02:29 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=316</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=316</guid>
			<description>&lt;p&gt;Dive: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
*Note2: I will be assuming x86 here, but if anyone wants to contribute some notes on x86_64 until I can get a machine setup, please do.&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does the same thing, although the output might not be exactly what you expect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first job is to create an output directory. I will be using '''/tmp/kernel-build''' for this so mkdir it now.&lt;br /&gt;
&lt;br /&gt;
== Output Into a Build Directory ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From your kernel source directory do &lt;br /&gt;
   &lt;br /&gt;
   make O=/tmp/kernel-build menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
   make mrproper&lt;br /&gt;
&lt;br /&gt;
This will delete your .config in the source tree so make sure you have a copy of it somewhere for safe keeping.&lt;br /&gt;
&lt;br /&gt;
Next steps are the same as a normal make and modules_install, but again using the O= switch:&lt;br /&gt;
&lt;br /&gt;
   make O=/tmp/kernel-build&lt;br /&gt;
   make O=/tmp/kernel-build modules_install&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' as this *will* install it in /boot rather than our build directory.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the build directory. However, taking a look inside it shows many more things have been placed there than we need. The kernel is in arch/x86/boot/ as usual and the modules are in various directories. Luckily for us there is a file, '''modules.order''', which lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; /tmp/kernel-package/install/doinst.sh&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6_tag-i686-1.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using:&lt;br /&gt;
&lt;br /&gt;
   #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
   SOURCE=/usr/src/linux-2.6.29.6-jabberwok&lt;br /&gt;
   ARCH=i386&lt;br /&gt;
   KARCH=i686&lt;br /&gt;
   MODULELIST=modules.order&lt;br /&gt;
   PRGNAM=kernel&lt;br /&gt;
   VERSION=2.6.29.6&lt;br /&gt;
   BUILD=1&lt;br /&gt;
   TAG=_daw&lt;br /&gt;
   LOCALNAME=jabberwok&lt;br /&gt;
   OUTPUT=/tmp&lt;br /&gt;
   KOUTPUT=$OUTPUT/$PRGNAM-$LOCALNAME&lt;br /&gt;
   PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
   BUILDDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
   set -e&lt;br /&gt;
 &lt;br /&gt;
   rm -rf $KOUTPUT&lt;br /&gt;
   rm -rf $PKG &lt;br /&gt;
   mkdir -p $BUILDDIR&lt;br /&gt;
   mkdir -p $KOUTPUT&lt;br /&gt;
 &lt;br /&gt;
   cd $SOURCE&lt;br /&gt;
   make O=$KOUTPUT menuconfig&lt;br /&gt;
   make mrproper&lt;br /&gt;
   make O=$KOUTPUT &lt;br /&gt;
   make O=$KOUTPUT modules_install&lt;br /&gt;
 &lt;br /&gt;
   cd $KOUTPUT&lt;br /&gt;
   for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
      mkdir -p $BUILDDIR/$(dirname $i)&lt;br /&gt;
      install -m 644 -v $i $BUILDDIR/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
 &lt;br /&gt;
   mkdir $PKG/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
   cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
   cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
 &lt;br /&gt;
   mkdir $PKG/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
 &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
   # HOW TO EDIT THIS FILE:&lt;br /&gt;
   # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
   # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
   # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
   # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
   # customary to leave one space after the ':'.&lt;br /&gt;
 &lt;br /&gt;
                   |-----handy-ruler------------------------------------------------------|&lt;br /&gt;
   kernel-jabberwok: kernel and modules 2.6.29.6-jabberwok&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok: Jabberwokky type kernel!&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   EOF&lt;br /&gt;
 &lt;br /&gt;
   cd $PKG&lt;br /&gt;
   /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$LOCALNAME-$VERSION$TAG-$KARCH-$BUILD.${PKGTYPE:-tgz}&lt;br /&gt;
&lt;br /&gt;
And here's a downloadable version: http://www.dawoodfall.net/slackbuilds/13.0/kernel/kernel-jabberwok.SlackBuild&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details. Note that this does not include the firmware so you should keep the relevant kernel-firmware package installed.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Thu, 11 Mar 2010 04:32:58 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Kernel-packaging</title>
			<link>https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=315</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Kernel-packaging&amp;diff=315</guid>
			<description>&lt;p&gt;Dive: Created page with '= Creating a Custom Package of Kernel and Modules =  *Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and …'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Creating a Custom Package of Kernel and Modules =&lt;br /&gt;
&lt;br /&gt;
*Note: This tutorial assumes that you know how to compile a kernel already. It only looks at a way of creating a package and doesn't aim to show kernel config options.&lt;br /&gt;
&lt;br /&gt;
For info on compiling please look at these pages:&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Compilation Kernel_Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel26Compilation Kernel26Compilation]&lt;br /&gt;
&lt;br /&gt;
[http://slackwiki.org/Kernel_Checklist Kernel_Checklist]&lt;br /&gt;
&lt;br /&gt;
*Note2: I will be assuming x86 here, but if anyone wants to contribute some notes on x86_64 until I can get a machine setup, please do.&lt;br /&gt;
&lt;br /&gt;
== Kernel Output Target Option ==&lt;br /&gt;
&lt;br /&gt;
The usual way to make any sort of package is via the '''$DESTDIR''' variable. The kernel doesn't use this however, but it does have an '''O''' switch which does the same thing, although the output might not be exactly what you expect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first job is to create an output directory. I will be using '''/tmp/kernel-build''' for this so mkdir it now.&lt;br /&gt;
&lt;br /&gt;
== Output Into a Build Directory ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From your kernel source directory do &lt;br /&gt;
   &lt;br /&gt;
   make O=/tmp/kernel-build menuconfig&lt;br /&gt;
&lt;br /&gt;
(or whichever method you prefer.)&lt;br /&gt;
&lt;br /&gt;
   make mrproper&lt;br /&gt;
&lt;br /&gt;
This will delete your .config in the source tree so make sure you have a copy of it somewhere for safe keeping.&lt;br /&gt;
&lt;br /&gt;
Next steps are the same as a normal make and modules_install, but again using the O= switch:&lt;br /&gt;
&lt;br /&gt;
   make O=/tmp/kernel-build&lt;br /&gt;
   make O=/tmp/kernel-build modules_install&lt;br /&gt;
&lt;br /&gt;
*Note: Do not use 'make install' as this *will* install it in /boot rather than our build directory.&lt;br /&gt;
&lt;br /&gt;
At this point everything we need is in the build directory. However, taking a look inside it shows many more things have been placed there than we need. The kernel is in arch/x86/boot/ as usual and the modules are in various directories. Luckily for us there is a file, '''modules.order''', which lists the modules to be installed and that we can use to help us make a package.&lt;br /&gt;
&lt;br /&gt;
== Installing Modules and Kernel to our Package Directory ==&lt;br /&gt;
&lt;br /&gt;
Ok let's use '''/tmp/kernel-package''' for our package directory. Also let's assume a '''2.6.29.6''' kernel with '''jabberwok''' as local name. A little bash will copy our modules to it:&lt;br /&gt;
   &lt;br /&gt;
   for i in $(cat modules.order | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
     mkdir -p /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
     install -m 644 -v $i /tmp/kernel-package/lib/modules/2.6.29.6-jabberwok/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
&lt;br /&gt;
Now we need the kernel and associated files.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/boot&lt;br /&gt;
&lt;br /&gt;
   cp arch/x86/boot/bzImage /tmp/kernel-package/boot/vmlinuz-2.6.29.6-jabberwok&lt;br /&gt;
   cp System.map /tmp/kernel-package/boot/System.map-2.6.29.6-jabberwok&lt;br /&gt;
   cp .config /tmp/kernel-package/boot/config-2.6.29.6-jabberwok&lt;br /&gt;
&lt;br /&gt;
And then the doinst.sh and slack-desc.&lt;br /&gt;
&lt;br /&gt;
   mkdir /tmp/kernel-package/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; /tmp/kernel-package/install/doinst.sh&lt;br /&gt;
&lt;br /&gt;
I'll leave you to figure out the slack-desc. It should be copied into the install/ directory and appname ought to be (going by this example) '''kernel-jabberwok'''.&lt;br /&gt;
&lt;br /&gt;
== Making the Package ==&lt;br /&gt;
&lt;br /&gt;
   cd /tmp/kernel-package&lt;br /&gt;
   /sbin/makepkg -l y -c n /tmp/kernel-jabberwok-2.6.29.6_tag-i686-1.txz&lt;br /&gt;
&lt;br /&gt;
Change '_tag' to your usual moniker. Hopefully we now have a package in /tmp. Copy it to a temporary directory somewhere, '''explodepkg''' it and check the contents. We don't want to install something with messed up paths etc. If all is well we can installpkg it.&lt;br /&gt;
&lt;br /&gt;
As usual, edit your /etc/lilo.conf and add an option for the new kernel, keeping the old kernel entry in place for safety, then run lilo.&lt;br /&gt;
&lt;br /&gt;
== A Little Automation ==&lt;br /&gt;
&lt;br /&gt;
Of course this would be easier to control with a script rather than typing in these commands manually and trying not to make typos. Here is the script that I've been using:&lt;br /&gt;
&lt;br /&gt;
   #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
   SOURCE=/usr/src/linux-2.6.29.6-jabberwok&lt;br /&gt;
   ARCH=i386&lt;br /&gt;
   KARCH=i686&lt;br /&gt;
   MODULELIST=modules.order&lt;br /&gt;
   PRGNAM=kernel&lt;br /&gt;
   VERSION=2.6.29.6&lt;br /&gt;
   BUILD=1&lt;br /&gt;
   TAG=_daw&lt;br /&gt;
   LOCALNAME=jabberwok&lt;br /&gt;
   OUTPUT=/tmp&lt;br /&gt;
   KOUTPUT=$OUTPUT/$PRGNAM-$LOCALNAME&lt;br /&gt;
   PKG=$OUTPUT/$PRGNAM-$LOCALNAME-$VERSION&lt;br /&gt;
   BUILDDIR=$PKG/lib/modules/$VERSION-$LOCALNAME&lt;br /&gt;
   set -e&lt;br /&gt;
 &lt;br /&gt;
   rm -rf $KOUTPUT&lt;br /&gt;
   rm -rf $PKG &lt;br /&gt;
   mkdir -p $BUILDDIR&lt;br /&gt;
   mkdir -p $KOUTPUT&lt;br /&gt;
 &lt;br /&gt;
   cd $SOURCE&lt;br /&gt;
   make O=$KOUTPUT menuconfig&lt;br /&gt;
   make mrproper&lt;br /&gt;
   make O=$KOUTPUT &lt;br /&gt;
   make O=$KOUTPUT modules_install&lt;br /&gt;
 &lt;br /&gt;
   cd $KOUTPUT&lt;br /&gt;
   for i in $(cat $MODULELIST | sed &amp;quot;s#^kernel/##&amp;quot;)&lt;br /&gt;
   do&lt;br /&gt;
      mkdir -p $BUILDDIR/$(dirname $i)&lt;br /&gt;
      install -m 644 -v $i $BUILDDIR/$(dirname $i)&lt;br /&gt;
   done&lt;br /&gt;
 &lt;br /&gt;
   mkdir $PKG/boot&lt;br /&gt;
   cp arch/x86/boot/bzImage $PKG/boot/vmlinuz-$VERSION-$LOCALNAME&lt;br /&gt;
   cp System.map $PKG/boot/System.map-$VERSION-$LOCALNAME&lt;br /&gt;
   cp .config $PKG/boot/config-$VERSION-$LOCALNAME&lt;br /&gt;
 &lt;br /&gt;
   mkdir $PKG/install&lt;br /&gt;
   echo &amp;quot;/sbin/depmod -a&amp;quot; &amp;gt; $PKG/install/doinst.sh&lt;br /&gt;
 &lt;br /&gt;
   cat &amp;lt;&amp;lt; EOF &amp;gt; $PKG/install/slack-desc&lt;br /&gt;
   # HOW TO EDIT THIS FILE:&lt;br /&gt;
   # The &amp;quot;handy ruler&amp;quot; below makes it easier to edit a package description.  Line&lt;br /&gt;
   # up the first '|' above the ':' following the base package name, and the '|'&lt;br /&gt;
   # on the right side marks the last column you can put a character in.  You must&lt;br /&gt;
   # make exactly 11 lines for the formatting to be correct.  It's also&lt;br /&gt;
   # customary to leave one space after the ':'.&lt;br /&gt;
 &lt;br /&gt;
                   |-----handy-ruler------------------------------------------------------|&lt;br /&gt;
   kernel-jabberwok: kernel and modules 2.6.29.6-jabberwok&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok: Jabberwokky type kernel!&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   kernel-jabberwok:&lt;br /&gt;
   EOF&lt;br /&gt;
 &lt;br /&gt;
   cd $PKG&lt;br /&gt;
   /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$LOCALNAME-$VERSION$TAG-$KARCH-$BUILD.${PKGTYPE:-tgz}&lt;br /&gt;
&lt;br /&gt;
And here's a downloadable version: http://www.dawoodfall.net/slackbuilds/13.0/kernel/kernel-jabberwok.SlackBuild&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
The aim for doing this was to be able to build a kernel for my old T42 on my desktop box using the T42's .config. It could be possible to split up kernel and modules into separate packages but I'll let you figure out the details. Note that this does not include the firmware so you should keep the relevant kernel-firmware package installed.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, this helped me to compile a kernel without my laptop getting even warm, which was the point of the project.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dive|Dive]] 04:31, 11 March 2010 (UTC)&lt;/div&gt;</description>
			<pubDate>Thu, 11 Mar 2010 04:31:55 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Kernel-packaging</comments>
		</item>
		<item>
			<title>Utf-8 linux console</title>
			<link>https://www.slackwiki.com/index.php?title=Utf-8_linux_console&amp;diff=308</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Utf-8_linux_console&amp;diff=308</guid>
			<description>&lt;p&gt;Dive: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Tutorials]]&lt;br /&gt;
''by Dive''&lt;br /&gt;
&lt;br /&gt;
== A Quick Look at Using UTF-8 in the Linux Console (without X) ==&lt;br /&gt;
&lt;br /&gt;
	A few people have asked about this in #slackware lately so I though I'd put down a few notes on how I got utf-8 up and running. Feel free to add any further info. &lt;br /&gt;
&lt;br /&gt;
	In these days of high powered X desktop environments with all their flashy composite bells and whistles it may seem strange to worry about how the plain Linux console behaves, but we need to remember that there are some very nice applications that live in the console and can be just as (or even more) productive than the X Windows counterparts. I'm thinking of screen, irssi, mutt, elinks, vim/vi, mplayer (using svga), links, zgv and slrn to name but a few. And of course we have to mention Slackware tools like pgktool, slackpkg and sbopkg. Once you get hooked on using the console it is hard to go back.&lt;br /&gt;
	Anyway here we go ...&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	The first thing to do is configure the console. There is a kernel parameter we can add to &lt;br /&gt;
/etc/lilo.conf to do this:&lt;br /&gt;
&lt;br /&gt;
append=&amp;quot;vt.default_utf8=1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Here's an example from mine:&lt;br /&gt;
&lt;br /&gt;
  # Linux bootable partition config begins&lt;br /&gt;
  image = /boot/vmlinuz-2.6.27.7-custom&lt;br /&gt;
  root = /dev/hda1&lt;br /&gt;
  label = Linux-custom&lt;br /&gt;
  append=&amp;quot;resume=/dev/hda2 vt.default_utf8=1&amp;quot;&lt;br /&gt;
  read-only&lt;br /&gt;
  # Linux bootable partition config ends&lt;br /&gt;
&lt;br /&gt;
Once you have saved lilo.conf and run '''lilo''' a quick reboot is needed.&lt;br /&gt;
&lt;br /&gt;
== Fonts ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	After that we need to find a font that actually contains the characters you want to see. My 'font of the moment' is lat9w-16. This contains the British £ (pound) and € (euro) symbols that I need, plus a lot of useful accented characters. But what is just as important are the correct drawing characters so that curses programs like pkgtool and sbopkg are printed on the screen correctly. If you experiment with the '''setconsolefont''' command you will find that some fonts draw curses box borders as squares or question marks, so check out some fonts and see which ones work and which don't.&lt;br /&gt;
	The '''setconsolefont''' command will put your chosen font into /etc/rc.d/rc.font so it will load at bootup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Keyboard ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	Ok, great you can now read characters correctly, but you need the correct keymap to be able to type them. That's a little harder. If you can find a utf-8 keymap for your locale/hardware then that's fine. Personally I didn't find any of the installed keymaps suitable so I looked around for an alternative. I found a uk-utf8 keymap on the intertubes, but this was unfortunately missing all the Ctrl+[a-z] keys so I edited it and added my own. I also added some AltGr+[a-z] (well not all of those) for accented characters. You may find this keymap useful as a starting point to create your own if you cannot find a more suitable one. Have a look through the comments and the codes and you should pick up the method.&lt;br /&gt;
	To add your own combinations you will need to know the correct codes for the characters you need. You can find a table of utf-8 characters here:&lt;br /&gt;
&lt;br /&gt;
[http://home.tiscali.nl/t876506/utf8tbl.html]http://home.tiscali.nl/t876506/utf8tbl.html&lt;br /&gt;
&lt;br /&gt;
Look up the code in that table and convert it to hex. E.G.&lt;br /&gt;
è is 232 in decimal, E8 in hex; é is code 233 in decimal, E9 in hex, so the entry in your keymap should be:&lt;br /&gt;
&lt;br /&gt;
  # key      = normal   shifted   AltGr+e   AltGr+shift+e&lt;br /&gt;
  keycode 18 = e        E         U+00E8    U+00E9&lt;br /&gt;
  # prints:    e        E         è         é  &lt;br /&gt;
&lt;br /&gt;
You can find the keycodes with the '''showkey''' program. Once edited you can load the map with the '''loadkeys''' program. Loadkeys will update /etc/rc.d/rc.keymap but you will need to copy the keymap to /usr/share/kbd/keymaps/i386/qwerty/ so it is found on bootup. Here is a link to my updated uk-utf8 map:&lt;br /&gt;
&lt;br /&gt;
[http://www.unrealize.co.uk/scripts/misc/uk-utf.map.gz]http://www.unrealize.co.uk/scripts/misc/uk-utf.map.gz&lt;br /&gt;
&lt;br /&gt;
You can load this ungzipped but it's better to gzip it back after editing to keep things consistent.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	By now you should have a fully usable keyboard/console correctly printing unicode characters. You will probably need to tell some programs like mutt and irrsi that you are using a utf-8 system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: There exists two shell scripts - '''unicode_start''' and '''unicode_stop'''. Typing '''unicode_start [font]''' will load the required font and set up keyboard correctly for unicode input.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bye for now,&lt;br /&gt;
&lt;br /&gt;
[[User:Dive|Dive]] 02:33, 20 March 2009 (UTC)&lt;/div&gt;</description>
			<pubDate>Mon, 01 Mar 2010 13:37:50 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Utf-8_linux_console</comments>
		</item>
		<item>
			<title>Utf-8 linux console</title>
			<link>https://www.slackwiki.com/index.php?title=Utf-8_linux_console&amp;diff=228</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Utf-8_linux_console&amp;diff=228</guid>
			<description>&lt;p&gt;Dive: /* A Quick Look at Using UTF-8 in the Linux Console (without X) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Tutorials]]&lt;br /&gt;
''by Dive''&lt;br /&gt;
&lt;br /&gt;
== A Quick Look at Using UTF-8 in the Linux Console (without X) ==&lt;br /&gt;
&lt;br /&gt;
	A few people have asked about this in #slackware lately so I though I'd put down a few notes on how I got utf-8 up and running. Feel free to add any further info. &lt;br /&gt;
&lt;br /&gt;
	In these days of high powered X desktop environments with all their flashy composite bells and whistles it may seem strange to worry about how the plain Linux console behaves, but we need to remember that there are some very nice applications that live in the console and can be just as (or even more) productive than the X Windows counterparts. I'm thinking of screen, irssi, mutt, elinks, vim/vi, mplayer (using svga), links, zgv and slrn to name but a few. And of course we have to mention Slackware tools like pgktool, slackpkg and sbopkg. Once you get hooked on using the console it is hard to go back.&lt;br /&gt;
	Anyway here we go ...&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	The first thing to do is configure the console. There is a kernel parameter we can add to &lt;br /&gt;
/etc/lilo.conf to do this:&lt;br /&gt;
&lt;br /&gt;
append=&amp;quot;vt.default_utf8=1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Here's an example from mine:&lt;br /&gt;
&lt;br /&gt;
  # Linux bootable partition config begins&lt;br /&gt;
  image = /boot/vmlinuz-2.6.27.7-custom&lt;br /&gt;
  root = /dev/hda1&lt;br /&gt;
  label = Linux-custom&lt;br /&gt;
  append=&amp;quot;resume=/dev/hda2 vt.default_utf8=1&amp;quot;&lt;br /&gt;
  read-only&lt;br /&gt;
  # Linux bootable partition config ends&lt;br /&gt;
&lt;br /&gt;
Once you have saved lilo.conf and run '''lilo''' a quick reboot is needed.&lt;br /&gt;
&lt;br /&gt;
== Fonts ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	After that we need to find a font that actually contains the characters you want to see. My 'font of the moment' is lat9w-16. This contains the British £ (pound) and € (euro) symbols that I need, plus a lot of useful accented characters. But what is just as important are the correct drawing characters so that curses programs like pkgtool and sbopkg are printed on the screen correctly. If you experiment with the '''setconsolefont''' command you will find that some fonts draw curses box borders as squares or question marks, so check out some fonts and see which ones work and which don't.&lt;br /&gt;
	The '''setconsolefont''' command will put your chosen font into /etc/rc.d/rc.font so it will load at bootup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Keyboard ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	Ok, great you can now read characters correctly, but you need the correct keymap to be able to type them. That's a little harder. If you can find a utf-8 keymap for your locale/hardware then that's fine. Personally I didn't find any of the installed keymaps suitable so I looked around for an alternative. I found a uk-utf8 keymap on the intertubes, but this was unfortunately missing all the Ctrl+[a-z] keys so I edited it and added my own. I also added some AltGr+[a-z] (well not all of those) for accented characters. You may find this keymap useful as a starting point to create your own if you cannot find a more suitable one. Have a look through the comments and the codes and you should pick up the method.&lt;br /&gt;
	To add your own combinations you will need to know the correct codes for the characters you need. You can find a table of utf-8 characters here:&lt;br /&gt;
&lt;br /&gt;
[http://www.tony-franks.co.uk/UTF-8.htm]http://www.tony-franks.co.uk/UTF-8.htm&lt;br /&gt;
&lt;br /&gt;
Look up the code in that table and convert it to hex. E.G.&lt;br /&gt;
è is 232 in decimal, E8 in hex; é is code 233 in decimal, E9 in hex, so the entry in your keymap should be:&lt;br /&gt;
&lt;br /&gt;
  # key      = normal   shifted   AltGr+e   AltGr+shift+e&lt;br /&gt;
  keycode 18 = e        E         U+00E8    U+00E9&lt;br /&gt;
  # prints:    e        E         è         é  &lt;br /&gt;
&lt;br /&gt;
You can find the keycodes with the '''showkey''' program. Once edited you can load the map with the '''loadkeys''' program. Loadkeys will update /etc/rc.d/rc.keymap but you will need to copy the keymap to /usr/share/kbd/keymaps/i386/qwerty/ so it is found on bootup. Here is a link to my updated uk-utf8 map:&lt;br /&gt;
&lt;br /&gt;
[http://www.unrealize.co.uk/scripts/misc/uk-utf.map.gz]http://www.unrealize.co.uk/scripts/misc/uk-utf.map.gz&lt;br /&gt;
&lt;br /&gt;
You can load this ungzipped but it's better to gzip it back after editing to keep things consistent.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	By now you should have a fully usable keyboard/console correctly printing unicode characters. You will probably need to tell some programs like mutt and irrsi that you are using a utf-8 system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: There exists two shell scripts - '''unicode_start''' and '''unicode_stop'''. Typing '''unicode_start [font]''' will load the required font and set up keyboard correctly for unicode input.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bye for now,&lt;br /&gt;
&lt;br /&gt;
[[User:Dive|Dive]] 02:33, 20 March 2009 (UTC)&lt;/div&gt;</description>
			<pubDate>Sat, 08 Aug 2009 18:33:56 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Utf-8_linux_console</comments>
		</item>
		<item>
			<title>Utf-8 linux console</title>
			<link>https://www.slackwiki.com/index.php?title=Utf-8_linux_console&amp;diff=226</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Utf-8_linux_console&amp;diff=226</guid>
			<description>&lt;p&gt;Dive: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Tutorials]]&lt;br /&gt;
== A Quick Look at Using UTF-8 in the Linux Console (without X) ==&lt;br /&gt;
&lt;br /&gt;
	A few people have asked about this in #slackware lately so I though I'd put down a few notes on how I got utf-8 up and running. Feel free to add any further info. &lt;br /&gt;
&lt;br /&gt;
	In these days of high powered X desktop environments with all their flashy composite bells and whistles it may seem strange to worry about how the plain Linux console behaves, but we need to remember that there are some very nice applications that live in the console and can be just as (or even more) productive than the X Windows counterparts. I'm thinking of screen, irssi, mutt, elinks, vim/vi, mplayer (using svga), links, zgv and slrn to name but a few. And of course we have to mention Slackware tools like pgktool, slackpkg and sbopkg. Once you get hooked on using the console it is hard to go back.&lt;br /&gt;
	Anyway here we go ...&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	The first thing to do is configure the console. There is a kernel parameter we can add to &lt;br /&gt;
/etc/lilo.conf to do this:&lt;br /&gt;
&lt;br /&gt;
append=&amp;quot;vt.default_utf8=1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Here's an example from mine:&lt;br /&gt;
&lt;br /&gt;
  # Linux bootable partition config begins&lt;br /&gt;
  image = /boot/vmlinuz-2.6.27.7-custom&lt;br /&gt;
  root = /dev/hda1&lt;br /&gt;
  label = Linux-custom&lt;br /&gt;
  append=&amp;quot;resume=/dev/hda2 vt.default_utf8=1&amp;quot;&lt;br /&gt;
  read-only&lt;br /&gt;
  # Linux bootable partition config ends&lt;br /&gt;
&lt;br /&gt;
Once you have saved lilo.conf and run '''lilo''' a quick reboot is needed.&lt;br /&gt;
&lt;br /&gt;
== Fonts ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	After that we need to find a font that actually contains the characters you want to see. My 'font of the moment' is lat9w-16. This contains the British £ (pound) and € (euro) symbols that I need, plus a lot of useful accented characters. But what is just as important are the correct drawing characters so that curses programs like pkgtool and sbopkg are printed on the screen correctly. If you experiment with the '''setconsolefont''' command you will find that some fonts draw curses box borders as squares or question marks, so check out some fonts and see which ones work and which don't.&lt;br /&gt;
	The '''setconsolefont''' command will put your chosen font into /etc/rc.d/rc.font so it will load at bootup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Keyboard ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	Ok, great you can now read characters correctly, but you need the correct keymap to be able to type them. That's a little harder. If you can find a utf-8 keymap for your locale/hardware then that's fine. Personally I didn't find any of the installed keymaps suitable so I looked around for an alternative. I found a uk-utf8 keymap on the intertubes, but this was unfortunately missing all the Ctrl+[a-z] keys so I edited it and added my own. I also added some AltGr+[a-z] (well not all of those) for accented characters. You may find this keymap useful as a starting point to create your own if you cannot find a more suitable one. Have a look through the comments and the codes and you should pick up the method.&lt;br /&gt;
	To add your own combinations you will need to know the correct codes for the characters you need. You can find a table of utf-8 characters here:&lt;br /&gt;
&lt;br /&gt;
[http://www.tony-franks.co.uk/UTF-8.htm]http://www.tony-franks.co.uk/UTF-8.htm&lt;br /&gt;
&lt;br /&gt;
Look up the code in that table and convert it to hex. E.G.&lt;br /&gt;
è is 232 in decimal, E8 in hex; é is code 233 in decimal, E9 in hex, so the entry in your keymap should be:&lt;br /&gt;
&lt;br /&gt;
  # key      = normal   shifted   AltGr+e   AltGr+shift+e&lt;br /&gt;
  keycode 18 = e        E         U+00E8    U+00E9&lt;br /&gt;
  # prints:    e        E         è         é  &lt;br /&gt;
&lt;br /&gt;
You can find the keycodes with the '''showkey''' program. Once edited you can load the map with the '''loadkeys''' program. Loadkeys will update /etc/rc.d/rc.keymap but you will need to copy the keymap to /usr/share/kbd/keymaps/i386/qwerty/ so it is found on bootup. Here is a link to my updated uk-utf8 map:&lt;br /&gt;
&lt;br /&gt;
[http://www.unrealize.co.uk/scripts/misc/uk-utf.map.gz]http://www.unrealize.co.uk/scripts/misc/uk-utf.map.gz&lt;br /&gt;
&lt;br /&gt;
You can load this ungzipped but it's better to gzip it back after editing to keep things consistent.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	By now you should have a fully usable keyboard/console correctly printing unicode characters. You will probably need to tell some programs like mutt and irrsi that you are using a utf-8 system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: There exists two shell scripts - '''unicode_start''' and '''unicode_stop'''. Typing '''unicode_start [font]''' will load the required font and set up keyboard correctly for unicode input.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bye for now,&lt;br /&gt;
&lt;br /&gt;
[[User:Dive|Dive]] 02:33, 20 March 2009 (UTC)&lt;/div&gt;</description>
			<pubDate>Mon, 27 Jul 2009 20:15:47 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Utf-8_linux_console</comments>
		</item>
		<item>
			<title>Utf-8 linux console</title>
			<link>https://www.slackwiki.com/index.php?title=Utf-8_linux_console&amp;diff=225</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Utf-8_linux_console&amp;diff=225</guid>
			<description>&lt;p&gt;Dive: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Tutorials]]&lt;br /&gt;
== A Quick Look at Using UTF-8 in the Linux Console (without X) ==&lt;br /&gt;
&lt;br /&gt;
	A few people have asked about this in #slackware lately so I though I'd put down a few notes on how I got utf-8 up and running. Feel free to add any further info. &lt;br /&gt;
&lt;br /&gt;
	In these days of high powered X desktop environments with all their flashy composite bells and whistles it may seem strange to worry about how the plain Linux console behaves, but we need to remember that there are some very nice applications that live in the console and can be just as (or even more) productive than the X Windows counterparts. I'm thinking of screen, irssi, mutt, elinks, vim/vi, mplayer (using svga), links, zgv and slrn to name but a few. And of course we have to mention Slackware tools like pgktool, slackpkg and sbopkg. Once you get hooked on using the console it is hard to go back.&lt;br /&gt;
	Anyway here we go ...&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	The first thing to do is configure the console. There is a kernel parameter we can add to &lt;br /&gt;
/etc/lilo.conf to do this:&lt;br /&gt;
&lt;br /&gt;
append=&amp;quot;vt.default_utf8=1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Here's an example from mine:&lt;br /&gt;
&lt;br /&gt;
  # Linux bootable partition config begins&lt;br /&gt;
  image = /boot/vmlinuz-2.6.27.7-custom&lt;br /&gt;
  root = /dev/hda1&lt;br /&gt;
  label = Linux-custom&lt;br /&gt;
  append=&amp;quot;resume=/dev/hda2 vt.default_utf8=1&amp;quot;&lt;br /&gt;
  read-only&lt;br /&gt;
  # Linux bootable partition config ends&lt;br /&gt;
&lt;br /&gt;
Once you have saved lilo.conf and run '''lilo''' a quick reboot is needed.&lt;br /&gt;
&lt;br /&gt;
== Fonts ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	After that we need to find a font that actually contains the characters you want to see. My 'font of the moment' is lat9w-16. This contains the British £ (pound) and € (euro) symbols that I need, plus a lot of useful accented characters. But what is just as important are the correct drawing characters so that curses programs like pkgtool and sbopkg are printed on the screen correctly. If you experiment with the '''setconsolefont''' command you will find that some fonts draw curses box borders as squares or question marks, so check out some fonts and see which ones work and which don't.&lt;br /&gt;
	The '''setconsolefont''' command will put your chosen font into /etc/rc.d/rc.font so it will load at bootup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Keyboard ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	Ok, great you can now read characters correctly, but you need the correct keymap to be able to type them. That's a little harder. If you can find a utf-8 keymap for your locale/hardware then that's fine. Personally I didn't find any of the installed keymaps suitable so I looked around for an alternative. I found a uk-utf8 keymap on the intertubes, but this was unfortunately missing all the Ctrl+[a-z] keys so I edited it and added my own. I also added some AltGr+[a-z] (well not all of those) for accented characters. You may find this keymap useful as a starting point to create your own if you cannot find a more suitable one. Have a look through the comments and the codes and you should pick up the method.&lt;br /&gt;
	To add your own combinations you will need to know the correct codes for the characters you need. You can find a table of utf-8 characters here:&lt;br /&gt;
&lt;br /&gt;
[http://www.tony-franks.co.uk/UTF-8.htm]http://www.tony-franks.co.uk/UTF-8.htm&lt;br /&gt;
&lt;br /&gt;
Look up the code in that table and convert it to hex. E.G.&lt;br /&gt;
è is 232 in decimal, E8 in hex; é is code 233 in decimal, E9 in hex, so the entry in your keymap should be:&lt;br /&gt;
&lt;br /&gt;
  # key      = normal   shifted   AltGr+e   AltGr+shift+e&lt;br /&gt;
  keycode 18 = e        E         U+00E8    U+00E9&lt;br /&gt;
  # prints:    e        E         è         é  &lt;br /&gt;
&lt;br /&gt;
You can find the keycodes with the '''showkey''' program. Once edited you can load the map with the '''loadkeys''' program. Loadkeys will update /etc/rc.d/rc.keymap but you will need to copy the keymap to /usr/share/kbd/keymaps/i386/qwerty/ so it is found on bootup. Here is a link to my updated uk-utf8 map:&lt;br /&gt;
&lt;br /&gt;
[http://www.unrealize.co.uk/scripts/misc/uk-utf.map.gz]http://www.unrealize.co.uk/scripts/misc/uk-utf.map.gz&lt;br /&gt;
&lt;br /&gt;
You can load this ungzipped but it's better to gzip it back after editing to keep things consistent.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	By now you should have a fully usable keyboard/console correctly printing unicode characters. You will probably need to tell some programs like mutt and irrsi that you are using a utf-8 system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: There exists two shell scripts - '''unicode_start''' and '''unicode_stop'''. Typing unicode_start [font] will load the required font and set up keyboard correctly for unicode input.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bye for now,&lt;br /&gt;
&lt;br /&gt;
[[User:Dive|Dive]] 02:33, 20 March 2009 (UTC)&lt;/div&gt;</description>
			<pubDate>Mon, 27 Jul 2009 20:15:19 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Utf-8_linux_console</comments>
		</item>
		<item>
			<title>Utf-8 linux console</title>
			<link>https://www.slackwiki.com/index.php?title=Utf-8_linux_console&amp;diff=224</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Utf-8_linux_console&amp;diff=224</guid>
			<description>&lt;p&gt;Dive: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Tutorials]]&lt;br /&gt;
== A Quick Look at Using UTF-8 in the Linux Console (without X) ==&lt;br /&gt;
&lt;br /&gt;
	A few people have asked about this in #slackware lately so I though I'd put down a few notes on how I got utf-8 up and running. Feel free to add any further info. &lt;br /&gt;
&lt;br /&gt;
	In these days of high powered X desktop environments with all their flashy composite bells and whistles it may seem strange to worry about how the plain Linux console behaves, but we need to remember that there are some very nice applications that live in the console and can be just as (or even more) productive than the X Windows counterparts. I'm thinking of screen, irssi, mutt, elinks, vim/vi, mplayer (using svga), links, zgv and slrn to name but a few. And of course we have to mention Slackware tools like pgktool, slackpkg and sbopkg. Once you get hooked on using the console it is hard to go back.&lt;br /&gt;
	Anyway here we go ...&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	The first thing to do is configure the console. There is a kernel parameter we can add to &lt;br /&gt;
/etc/lilo.conf to do this:&lt;br /&gt;
&lt;br /&gt;
append=&amp;quot;vt.default_utf8=1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Here's an example from mine:&lt;br /&gt;
&lt;br /&gt;
  # Linux bootable partition config begins&lt;br /&gt;
  image = /boot/vmlinuz-2.6.27.7-custom&lt;br /&gt;
  root = /dev/hda1&lt;br /&gt;
  label = Linux-custom&lt;br /&gt;
  append=&amp;quot;resume=/dev/hda2 vt.default_utf8=1&amp;quot;&lt;br /&gt;
  read-only&lt;br /&gt;
  # Linux bootable partition config ends&lt;br /&gt;
&lt;br /&gt;
Once you have saved lilo.conf and run '''lilo''' a quick reboot is needed.&lt;br /&gt;
&lt;br /&gt;
== Fonts ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	After that we need to find a font that actually contains the characters you want to see. My 'font of the moment' is lat9w-16. This contains the British £ (pound) and € (euro) symbols that I need, plus a lot of useful accented characters. But what is just as important are the correct drawing characters so that curses programs like pkgtool and sbopkg are printed on the screen correctly. If you experiment with the '''setconsolefont''' command you will find that some fonts draw curses box borders as squares or question marks, so check out some fonts and see which ones work and which don't.&lt;br /&gt;
	The '''setconsolefont''' command will put your chosen font into /etc/rc.d/rc.font so it will load at bootup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Keyboard ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	Ok, great you can now read characters correctly, but you need the correct keymap to be able to type them. That's a little harder. If you can find a utf-8 keymap for your locale/hardware then that's fine. Personally I didn't find any of the installed keymaps suitable so I looked around for an alternative. I found a uk-utf8 keymap on the intertubes, but this was unfortunately missing all the Ctrl+[a-z] keys so I edited it and added my own. I also added some AltGr+[a-z] (well not all of those) for accented characters. You may find this keymap useful as a starting point to create your own if you cannot find a more suitable one. Have a look through the comments and the codes and you should pick up the method.&lt;br /&gt;
	To add your own combinations you will need to know the correct codes for the characters you need. You can find a table of utf-8 characters here:&lt;br /&gt;
&lt;br /&gt;
[http://www.tony-franks.co.uk/UTF-8.htm]http://www.tony-franks.co.uk/UTF-8.htm&lt;br /&gt;
&lt;br /&gt;
Look up the code in that table and convert it to hex. E.G.&lt;br /&gt;
è is 232 in decimal, E8 in hex; é is code 233 in decimal, E9 in hex, so the entry in your keymap should be:&lt;br /&gt;
&lt;br /&gt;
  # key      = normal   shifted   AltGr+e   AltGr+shift+e&lt;br /&gt;
  keycode 18 = e        E         U+00E8    U+00E9&lt;br /&gt;
  # prints:    e        E         è         é  &lt;br /&gt;
&lt;br /&gt;
You can find the keycodes with the '''showkey''' program. Once edited you can load the map with the '''loadkeys''' program. Loadkeys will update /etc/rc.d/rc.keymap but you will need to copy the keymap to /usr/share/kbd/keymaps/i386/qwerty/ so it is found on bootup. Here is a link to my updated uk-utf8 map:&lt;br /&gt;
&lt;br /&gt;
[http://www.unrealize.co.uk/scripts/misc/uk-utf.map.gz]http://www.unrealize.co.uk/scripts/misc/uk-utf.map.gz&lt;br /&gt;
&lt;br /&gt;
You can load this ungzipped but it's better to gzip it back after editing to keep things consistent.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	By now you should have a fully usable keyboard/console correctly printing unicode characters. You will probably need to tell some programs like mutt and irrsi that you are using a utf-8 system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: There exists two applications - '''unicode_start''' and '''unicode_stop'''. Typing unicode_start [font] will load the required font and set up keyboard correctly for unicode input.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bye for now,&lt;br /&gt;
&lt;br /&gt;
[[User:Dive|Dive]] 02:33, 20 March 2009 (UTC)&lt;/div&gt;</description>
			<pubDate>Mon, 27 Jul 2009 20:14:35 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Utf-8_linux_console</comments>
		</item>
		<item>
			<title>Utf-8 linux console</title>
			<link>https://www.slackwiki.com/index.php?title=Utf-8_linux_console&amp;diff=223</link>
			<guid isPermaLink="false">https://www.slackwiki.com/index.php?title=Utf-8_linux_console&amp;diff=223</guid>
			<description>&lt;p&gt;Dive: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Tutorials]]&lt;br /&gt;
== A Quick Look at Using UTF-8 in the Linux Console (without X) ==&lt;br /&gt;
&lt;br /&gt;
	A few people have asked about this in #slackware lately so I though I'd put down a few notes on how I got utf-8 up and running. Feel free to add any further info. &lt;br /&gt;
&lt;br /&gt;
	In these days of high powered X desktop environments with all their flashy composite bells and whistles it may seem strange to worry about how the plain Linux console behaves, but we need to remember that there are some very nice applications that live in the console and can be just as (or even more) productive than the X Windows counterparts. I'm thinking of screen, irssi, mutt, elinks, vim/vi, mplayer (using svga), links, zgv and slrn to name but a few. And of course we have to mention Slackware tools like pgktool, slackpkg and sbopkg. Once you get hooked on using the console it is hard to go back.&lt;br /&gt;
	Anyway here we go ...&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	The first thing to do is configure the console. There is a kernel parameter we can add to &lt;br /&gt;
/etc/lilo.conf to do this:&lt;br /&gt;
&lt;br /&gt;
append=&amp;quot;vt.default_utf8=1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Here's an example from mine:&lt;br /&gt;
&lt;br /&gt;
  # Linux bootable partition config begins&lt;br /&gt;
  image = /boot/vmlinuz-2.6.27.7-custom&lt;br /&gt;
  root = /dev/hda1&lt;br /&gt;
  label = Linux-custom&lt;br /&gt;
  append=&amp;quot;resume=/dev/hda2 vt.default_utf8=1&amp;quot;&lt;br /&gt;
  read-only&lt;br /&gt;
  # Linux bootable partition config ends&lt;br /&gt;
&lt;br /&gt;
Once you have saved lilo.conf and run '''lilo''' a quick reboot is needed.&lt;br /&gt;
&lt;br /&gt;
== Fonts ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	After that we need to find a font that actually contains the characters you want to see. My 'font of the moment' is lat9w-16. This contains the British £ (pound) and € (euro) symbols that I need, plus a lot of useful accented characters. But what is just as important are the correct drawing characters so that curses programs like pkgtool and sbopkg are printed on the screen correctly. If you experiment with the '''setconsolefont''' command you will find that some fonts draw curses box borders as squares or question marks, so check out some fonts and see which ones work and which don't.&lt;br /&gt;
	The '''setconsolefont''' command will put your chosen font into /etc/rc.d/rc.font so it will load at bootup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Keyboard ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	Ok, great you can now read characters correctly, but you need the correct keymap to be able to type them. That's a little harder. If you can find a utf-8 keymap for your locale/hardware then that's fine. Personally I didn't find any of the installed keymaps suitable so I looked around for an alternative. I found a uk-utf8 keymap on the intertubes, but this was unfortunately missing all the Ctrl+[a-z] keys so I edited it and added my own. I also added some AltGr+[a-z] (well not all of those) for accented characters. You may find this keymap useful as a starting point to create your own if you cannot find a more suitable one. Have a look through the comments and the codes and you should pick up the method.&lt;br /&gt;
	To add your own combinations you will need to know the correct codes for the characters you need. You can find a table of utf-8 characters here:&lt;br /&gt;
&lt;br /&gt;
[http://www.tony-franks.co.uk/UTF-8.htm]http://www.tony-franks.co.uk/UTF-8.htm&lt;br /&gt;
&lt;br /&gt;
Look up the code in that table and convert it to hex. E.G.&lt;br /&gt;
è is 232 in decimal, E8 in hex; é is code 233 in decimal, E9 in hex, so the entry in your keymap should be:&lt;br /&gt;
&lt;br /&gt;
  # key      = normal   shifted   AltGr+e   AltGr+shift+e&lt;br /&gt;
  keycode 18 = e        E         U+00E8    U+00E9&lt;br /&gt;
  # prints:    e        E         è         é  &lt;br /&gt;
&lt;br /&gt;
You can find the keycodes with the '''showkey''' program. Once edited you can load the map with the '''loadkeys''' program. Loadkeys will update /etc/rc.d/rc.keymap but you will need to copy the keymap to /usr/share/kbd/keymaps/i386/qwerty/ so it is found on bootup. Here is a link to my updated uk-utf8 map:&lt;br /&gt;
&lt;br /&gt;
[http://www.unrealize.co.uk/scripts/misc/uk-utf.map.gz]http://www.unrealize.co.uk/scripts/misc/uk-utf.map.gz&lt;br /&gt;
&lt;br /&gt;
You can load this ungzipped but it's better to gzip it back after editing to keep things consistent.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	By now you should have a fully usable keyboard/console correctly printing unicode characters. You will probably need to tell some programs like mutt and irrsi that you are using a utf-8 system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: There exists two applications - '''unicode_start''' and '''unicode_stop'''. Typing unicode_start &amp;lt;font&amp;gt; will load the required font and set up keyboard correctly for unicode input.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bye for now,&lt;br /&gt;
&lt;br /&gt;
[[User:Dive|Dive]] 02:33, 20 March 2009 (UTC)&lt;/div&gt;</description>
			<pubDate>Mon, 27 Jul 2009 20:13:53 GMT</pubDate>
			<dc:creator>Dive</dc:creator>
			<comments>https://www.slackwiki.com/Talk:Utf-8_linux_console</comments>
		</item>
</channel></rss>