LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   SMP Kernel Packages for Slackware ? (http://www.linuxquestions.org/questions/slackware-14/smp-kernel-packages-for-slackware-306974/)

Grunthos 03-28-2005 08:08 AM

SMP Kernel Packages for Slackware ?
 
Just wondering ... are there "trusted" sources of SMP kernel packages for slackware. I am starting to see Slack in the workplace which is great but Slack doesn't seem to have the SMP thing going .,.. which for me at least .. is bad.

While I am not too troubled by compiling a kernel ... I think a kernel compile on install would look bad to others monitoring the progress and their wallets....

If not from the Slack gods themselves .. are there any others ?

-Grunthos (I have been searching .. either it's been badly of there isn't much out there) :)

APB_4 03-28-2005 08:32 AM

You could just compile the module.

Oderus 03-28-2005 01:56 PM

Slack SMP
 
Slackware 10.0 does support SMP, you just have to re-compile the kernel.

I've got it running on my Proliant 2500 with 2 x 200 Pentium Pro's and it's a lovely sight.

Grunthos 03-28-2005 03:49 PM

hi,

just to be a bit clearer .... I was looking for pre compiled kernels with SMP support ... I am able to do the compile but was hoping not to have to do it .."On site" with an install.

I guess I am going to have to learn how to create my own kernel packages :)


As for modules ... I didn't think SMP could be compiled as a module ?

Cheers

-Grunthos

APB_4 03-28-2005 03:53 PM

Possibly I wasn't sure whether it could be a module. You don't have to do it "on site" you could compile a kernel with SMP support and the stick it on some floppies or a CD or whatever and just boot it up.

Grunthos 03-28-2005 04:16 PM

Having looked over the possible SMP configurations ... namely the number of CPUs put together with type of disk ide/scsi... I can see why the Slack gods have given it a miss ...

It might be just as easy to get machine info before going on site and pre compiling myself for best results :)

Cheers ... If I get a nice list of packages I may well post them somewhere for others to enjoy :P

-Grunthos

Oderus 03-31-2005 09:55 AM

I would take the working kernal for that system with the .config file and then re-compile it after making the change /wrt SMP. I think you were eluding to that fact but I thought I'd say it all the same.

I had some hiccups getting my kernel to work properly and once I got it working, I never looked back on why I had issues to begin with. :D

Grunthos 03-31-2005 09:59 PM

yes indeed .....

The most popular one will probably be the adaptec scsi kernel with SMP ...

Still need to figure out how to make a safe kernel + modules pkg so the install is easy on site ..... time to RTFM i guess

-Grunthos

Oderus 04-01-2005 09:10 AM

RTFM and trial by error is always the best answer when there isn't anyone that can do it for you. =)

jong357 04-01-2005 01:03 PM

Funny... I do the SAME EXACT thing at work. Only I hacked the install disk to include my packages right from the get-go. Here's my "SlackBuild" script if your interested. The only thing you are missing is your .config file and the kernel source package. Those 2 along with this script in the same directory will build your packages.

Using Pat's method of preping the kernel source is much easier for 2.6.x than it is for 2.4.x

ftp://distro.ibiblio.org/pub/Linux/d...ource/k/README

This script assumes your using a 2.6 kernel. Wouldn't be hard at all to replace those commands with the 2.4.x commands from the above link, if you are indeed using a 2.4.x kernel. Change the VERSION variable as well.

Code:

#!/bin/sh

CWD=`pwd`
TMP=/tmp
BUILDDIR=/usr/src
PKGKERNEL=$TMP/package-kernel+
PKGSOURCE=$TMP/package-source
VERSION=2.6.8.1
SOURCEBUILD=1
KERNELBUILD=1
SOURCEARCH=noarch
# I have my CFLAGS defined globally in /etc/bashrc
KERNELARCH=i486
# This is where we retrieve your bzImage from:
# $BUILDDIR/linux-$VERSION/arch/$KERNELPLATFORM/boot
KERNELPLATFORM=i386

rm -rf $PKGKERNEL
rm -rf $PKGSOURCE
mkdir -p $PKGKERNEL/{boot,install,lib/modules}
mkdir -p $PKGSOURCE/{install,usr/src}

if [ -a /usr/src/linux-$VERSION ]; then
  mv $BUILDDIR/linux-$VERSION $BUILDDIR/linux-$VERSION.orig
fi

if [ -a /lib/modules/$VERSION ]; then
  mv /lib/modules/$VERSION /lib/modules/$VERSION.orig
fi

cd $BUILDDIR
echo
echo "linux-$VERSION.tar.bz2 is now extracting..."
echo
tar -xjf $CWD/linux-$VERSION.tar.bz2
cd linux-$VERSION
# Only root users should be messing with the kernel
chown -R root.root .
chmod -R 744 .

echo "Making the kernel source package..."
echo
sleep 2
# Make sure your .config is setup for SMP
install -m 0744 $CWD/.config        $BUILDDIR/linux-$VERSION
# These commands are for a 2.6 kernel
make oldconfig > /dev/null
make bzImage
make clean
rm -f .version
echo
echo "Moving source into package..."
echo
cd $PKGSOURCE/usr/src
cp -Ra $BUILDDIR/linux-$VERSION $PKGSOURCE/usr/src
ln -sf linux-$VERSION linux

# Make the kernel-source slack-desc:
cat << EOF > $PKGSOURCE/install/slack-desc
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|' on
# the right side marks the last column you can put a character in.  You must make
# exactly 11 lines for the formatting to be correct.  It's also customary to
# leave one space after the ':'.

            |-----handy-ruler------------------------------------------------------|
kernel-source: linux-$VERSION (kernel source)
kernel-source:
kernel-source: Source code for Linus Torvalds' Linux kernel.
kernel-source:
kernel-source: This is the complete and unmodified source code
kernel-source: for the Linux kernel.
kernel-source:
kernel-source:
kernel-source:
kernel-source:
kernel-source:
EOF

cd $PKGSOURCE
makepkg -l y -c n $TMP/kernel-source-$VERSION-$SOURCEARCH-$SOURCEBUILD.tgz

echo
echo "Making the kernel+ package..."
echo
sleep 2

cd $BUILDDIR/linux-$VERSION
make bzImage
make modules
make modules_install
rm -rf /lib/modules/$VERSION/{build,source}
mv /lib/modules/$VERSION $PKGKERNEL/lib/modules/$VERSION
cat System.map > $PKGKERNEL/boot/System.map-smp-$VERSION
cat arch/$KERNELPLATFORM/boot/bzImage > $PKGKERNEL/boot/vmlinuz-smp-$VERSION
cd $PKGKERNEL/boot
ln -sf System.map-smp-$VERSION System.map
ln -sf vmlinuz-smp-$VERSION vmlinuz
cat $CWD/.config $PKGKERNEL/boot/config-smp-$VERSION
ln -sf config-smp-$VERSION config

# Make the doinst.sh for the kernel+ package
cat << EOF > $PKGKERNEL/install/doinst.sh
( cd lib/modules/$VERSION ; rm -rf build )
( cd lib/modules/$VERSION ; ln -sf ../../../usr/src/linux-$VERSION build )
( cd lib/modules/$VERSION ; rm -rf source )
( cd lib/modules/$VERSION ; ln -sf ../../../usr/src/linux-$VERSION source )
# A good idea whenever kernel modules are added or changed:
if [ -x sbin/depmod ]; then
  chroot . /sbin/depmod -a 1> /dev/null 2> /dev/null
fi
EOF

# Make the kernel+ slack-desc:
cat << EOF > $PKGKERNEL/install/slack-desc
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in.  You must
# make exactly 11 lines for the formatting to be correct.  It's also
# customary to leave one space after the ':'.

      |-----handy-ruler------------------------------------------------------|
kernel+: kernel+ (kernel and modules)
kernel+:
kernel+: A kernel module is a piece of object code that can be dynamically
kernel+: loaded into the Linux kernel to provide new kernel functions.
kernel+: Most of these modules provide support for devices such as CD-ROM
kernel+: drives, tape drives, and ethernet cards.
kernel+:
kernel+: This package also contains the built kernel or bzImage that is
kernel+: used to boot your system.
kernel+:
kernel+:
EOF

cd $PKGKERNEL
makepkg -l y -c n $TMP/kernel+-$VERSION-$KERNELARCH-$KERNELBUILD.tgz

echo
echo "Cleaning up..."

# Restore the original directories
rm -rf $BUILDDIR/linux-$VERSION
if [ -a $BUILDDIR/linux-$VERSION.orig ]; then
  mv $BUILDDIR/linux-$VERSION.orig $BUILDDIR/linux-$VERSION
fi
if [ -a /lib/modules/$VERSION.orig ]; then
  mv /lib/modules/$VERSION.orig /lib/modules/$VERSION
fi

cd $TMP
rm -rf $PKGKERNEL
rm -rf $PKGSOURCE

echo
echo "All Done!"
echo "Your packages are in $TMP"
echo

Not sure why your worried about doing this in front of people at work.. ;) Windows, or any other OS for that matter, NEVER comes pre-configured exactally how you want it out-of-the box. Slackware is no exception... I'd probably tell people to piss off if they got judgemental.. Linux techs are in high demand. Most people in the work place know better than to irritate you, else you just might decide to not come in anymore.... :D It's especially that way out in California.

Grunthos 04-01-2005 08:33 PM

Only thing that worries me is having to sit and wait for a kernel compile ... when other distros have SMP support already there ... granted, they probably support a ridiculous amount of CPUs but they work out of the box in that respect ... (even with the extra overhead of too many CPUs accounted for:P)

When corporate types see an installation they don't expect to have to recompile a kernel to get SMP up ... Is what I guess I am saying :)


btw ... thanks for the info ... it is fantastic :)

-Grunthos

Itzac 04-01-2005 08:55 PM

Were it windows you'd still have to sit and wait for the install to go. And then there's windows update. I have no idea why installing 3MB worth of updates takes 20 minutes. It just sits and churns until finally it decides it's made you wait long enough and it can finish. Besides, I would expect people to be impressed by your kernel compiling prowess more than disappointed because it wasn't configured right out of the box.

Grunthos 04-01-2005 09:00 PM

hehehh ... not when they can install with another distro an not have to recompile it :P

I just personally prefere slackware to the "other" distros :P I like simple ... stable ... secure :P

-Grunthos

APB_4 04-02-2005 05:05 AM

Can't you just switch to another terminal and do some setting up while it's compiling?

Grunthos 04-02-2005 05:34 AM

Quote:

Originally posted by APB_4
Can't you just switch to another terminal and do some setting up while it's compiling?
I'm sure I could think of better things to be waiting for .... In any case ... Having RTFM, pre made packages are the absolute way to go ... and it is dead simple. *8)

-Grunthos


All times are GMT -5. The time now is 06:47 AM.