LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-18-2006, 08:14 AM   #1
Anonymo
Member
 
Registered: Dec 2004
Location: The Woodlands, Texas
Distribution: Slackware, Archlinux, CentOS
Posts: 196

Rep: Reputation: 40
Checkinstall Kernel


Can I use checkinstall to compile a new kernel? That way it makes a .tgz package that I can install or remove whenever I want with pkgtool
 
Old 05-18-2006, 09:22 AM   #2
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
The kernel is just one file; why use Checkinstall? I doubt it could even be used for this...
 
Old 05-18-2006, 09:27 AM   #3
Linux~Powered
Member
 
Registered: Jan 2004
Location: /lost+found
Distribution: Slackware 14.2
Posts: 849

Rep: Reputation: 33
I'm pretty sure checkinstall can be used for that. Seems pointless though. All you need to do is delete the old kernel in /usr/src, your modules in /lib/modules and kernel in /boot directory.
 
Old 05-18-2006, 12:07 PM   #4
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
Assuming you're using a nice 2.6 kernel ...

You could try running something like:

Code:
checkinstall "make modules_install && make install"
After you've built your modules and you *should* get one package that contains the kernel & the modules. Running checkinstall with arguments, checkinstall will execute the arguments passed to it instead of running (by default) `make install`.

Have a look at some of the docs on the checkinstall site ( http://asic-linux.com.mx/~izto/checkinstall/ ), you'll find all sorts of information there!

- Piete.
 
Old 05-18-2006, 01:12 PM   #5
Anonymo
Member
 
Registered: Dec 2004
Location: The Woodlands, Texas
Distribution: Slackware, Archlinux, CentOS
Posts: 196

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by piete
Assuming you're using a nice 2.6 kernel ...

You could try running something like:

Code:
checkinstall "make modules_install && make install"
After you've built your modules and you *should* get one package that contains the kernel & the modules. Running checkinstall with arguments, checkinstall will execute the arguments passed to it instead of running (by default) `make install`.

Have a look at some of the docs on the checkinstall site ( http://asic-linux.com.mx/~izto/checkinstall/ ), you'll find all sorts of information there!

- Piete.
Dude no way, thanks

think i found it

Quote:
== 2.6 == Package creation

o You normally would su and make install. Now it's only su:

su
password: xxxxx

o Run checkinstall:

checkinstall

NOTE: If you give no arguments to checkinstall it will run a "make install".
If you give arguments, the first non-option argument will be used as the
install command. This is useful when the install command is not "make install"
but something else like "make install_packages" or "setup" or whatever, i.e.

checkinstall make install_packages
checkinstall make modules_install
checkinstall install.sh
checkinstall setup
checkinstall rpm -i my-package-1.0.i386-1.rpm


== 2.6.1 == Slackware packages

o checkinstall will ask if you want to see the installation results, then run
the modified Slackware package maker "makepak". If you want checkinstall to
use the original Slackware's "makepkg" then change the MAKEPKG variable
inside the checkinstall script and read this:

makepkg will ask you a couple of questions:

If there are any symbolic links in the installed package it will ask you
to remove them and make an installation script to re-create them whenever
you install the package. This is a GOOD THING, so answer YES. --> BTW,
makepkg doesn't always ask you this (depending on whether you have symbolic
links or not) so be careful and read before you answer, you could be
answering the wrong question. Read on:

makepkg will *always* ask if you want to change the owner, group and
permissions of EVERY file in the package to root:root:755. This is BAD most
of the times, always answer NO to that question, unless you know
what you are doing, of course


o In the end, checkinstall will install the package with installpkg so you
can remove it later with Slackware's removepkg (Our initial intention ).
Additionally, it will leave a copy of the package in the source directory,
the package's name will be name-version-architecture-release.tgz. Using the
Afterstep example, the file would be named Afterstep-1.8.4-i386-1.tgz.

Starting with checkinstall-1.5.1, the created packages will be named
using the new (post-Slackware 8.0) Slackware package naming scheme.

o You can add a customized installation script which will be run by "installpkg"
every time you use it to install your new package.

Write it and name it "install-pak" or "postinstall-pak" and checkinstall will
include it for you.

This script can be useful to set up the system to fit the newly installed
package: create new users, set permissions, initialize databases, rcscripts,
etc.
 
Old 05-18-2006, 01:16 PM   #6
Anonymo
Member
 
Registered: Dec 2004
Location: The Woodlands, Texas
Distribution: Slackware, Archlinux, CentOS
Posts: 196

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by Linux~Powered
I'm pretty sure checkinstall can be used for that. Seems pointless though. All you need to do is delete the old kernel in /usr/src, your modules in /lib/modules and kernel in /boot directory.
Why?

Because maybe I can use this to make a pkg that will install with pkgtools and not have to do all the steps you just describes. Also I am very meticulous about everything. It all needs to be registered with pkgtools and I am going to do this for all my programs. It is just new to me and I wanted to know if it could be done. I guess you could say it is pointless, but not to me since I asked. This might seem a like a mean response, but it isn't. I am in a happy mood and appreciate every comment.
 
Old 05-19-2006, 03:11 AM   #7
wchild
Member
 
Registered: Mar 2006
Distribution: Slackware
Posts: 63

Rep: Reputation: 15
Quote:
Originally Posted by mdarby
The kernel is just one file; why use Checkinstall? I doubt it could even be used for this...
Not quite a single file. Usually you also would need System.map too. Also even now one can choose to include config.gz to the compiled kernel, it is a good habit (an a Slackware tradition) to have a copy of the kernel config in the /boot directory.
 
Old 05-19-2006, 09:33 AM   #8
zariweb
LQ Newbie
 
Registered: Dec 2005
Posts: 2

Rep: Reputation: 0
IMO, the best way to install a new kernel is by creating a package, so it's easier to remove. That's the way Slackware does it.

The best way to build the package is by using the same build scripts used by Slackware. If you are compiling a 2.6.x kernel you can get them from:

ftp://ftp.slackware.com/pub/slackwar...nux-2.6.16.16/

You'll see that Slackware uses a package for the kernel, and another for the kernel modules.

BTW, alsa drivers are compiled and packaged separatedly in Slack.

Checkinstall is great for building packages for software that don't honor the DESTDIR in make but I really prefer building them manually when I can.

Hope that helps.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Does anyone have checkinstall?? Synt4x_3rr0r Linux - Software 3 01-15-2006 01:08 PM
./configure, CFLAGS, checkinstall, and kernel arch type rgiggs Slackware 3 12-28-2004 01:39 AM
compiling kernel & checkinstall Fascistchicken Slackware 2 10-14-2004 05:03 AM
Using 'checkinstall' gonzalo76 Slackware 20 05-20-2004 06:09 PM
Checkinstall ... durden2.0 Linux - Software 1 07-02-2003 02:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration