LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 09-22-2005, 05:04 PM   #1
dvbm
LQ Newbie
 
Registered: Sep 2005
Posts: 2

Rep: Reputation: 0
kernel compile mandriva way ?


lo

i've installed mandriva 2005 le in order to test it.

i'm a debian user and used to do things the debian way (dpkg, make-kpkg and all)..

i'd like to get some tips and links in order to compile a kernel on my "fresh" mandriva properly so it can be packaged, installed and removed at will.. and most important keep the default mandriva config..

i just want to patch that 2.6 kernel with the software suspend patch in order to use the hibernate script..

my kernel sources are already installed thru urpmi..

If mandriva is already able to go to S4 suspend (to disk aka hibernate) please le me know how it works..

anyways i'll be quite interested in understanding the kernel ways of rpm

thx

.dvbm
 
Old 09-22-2005, 07:05 PM   #2
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
Mandriva compiles the suspend functionality into the kernel by default so you don't need to recompile it.
http://www.thinkwiki.org/wiki/Instal...e_Thinkpad_T20 might help. If you don't have the suspend stuff installed then you can get it through urpmi (go to http://easyurpmi.zarb.org first and get all the repositories).

Quote:
anyways i'll be quite interested in understanding the kernel ways of rpm
If you want to see how they package the kernel in an RPM download the kernel source RPM (SRPM) from one of the mirrors. Note that this is different from the kernel-source RPM.
 
Old 09-23-2005, 03:50 AM   #3
dvbm
LQ Newbie
 
Registered: Sep 2005
Posts: 2

Original Poster
Rep: Reputation: 0
thx for the links

i'll check that /etc/sysconfig/suspend file when i reboot on mandriva

first thing i had to do after installing mandriva was to cleanup the urpmi config using that website you linked, and add pfl sources in order to install VLC

the only package i found and installed is "suspend-script", not that i know where it comes from but anyways i read about it in some mandriva laptop user experience but i couldn't do what i wanted with it.. seems to suspend to a "not so supended" mode and can be only brought back with the mouse or kbd and not with wol magic packets as i want it to wake up from..

anyways as i'm using regular desktop PC without any specific buttons to suspend the system so i guess it didn't detect those "devices" as it does on laptops and so i don't have any menus or options to put the PC on suspend manually thru KDE/KDM interfaces, logout and so on..
That's why i first tought suspend wasn't available with my install..

I was wondering if maybe i needed to load some modules to have access to the suspend functions of the kernel..

Thx again, i'll also try to take a look at your SRPM thing, i don't quite understand why it would be different fro the kernel source package but well i'll check it out..

.dvbm
 
Old 09-23-2005, 08:40 AM   #4
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
Quote:
That's why i first tought suspend wasn't available with my install..

I was wondering if maybe i needed to load some modules to have access to the suspend functions of the kernel..
Unfortunately all I know is that its there, I've never tried to use it Good luck w/ it

Quote:
Thx again, i'll also try to take a look at your SRPM thing, i don't quite understand why it would be different fro the kernel source package but well i'll check it out..
The whole kernel-source thing is a bit confusing when it comes to SRPMs because kernel-source is a special case. When you build an RPM you take the source code of the program and any patches you want to apply to it and write an RPM spec file. The spec file is basically an install script that describes how to build the application from source (the configure && make part) and also how to install the compiled files.

Now you point the rpmbuild program at that spec file and it creates 2 files - an RPM and an SRPM. The SRPM contains the source code and you configure script packaged up. The RPM is the result of building the SRPM, it contains the compiled files that will actually be installed on the user's system along with just the parts of the spec file which list the files installed and the details about the package. So if you download the SRPM for the kernel that is what Mandriva used to actually compile the kernel.

Now the distro makers found that a lot of people needed the kernel source in order to install drivers. If you start to play around with SRPMs you'll soon see why it would be impractical to have the user install the kernel SRPM to get the source code. SRPMs are designed for dumping the source of a package into a specific directory structure in a way that's useful for packagers, not for distributing software onto end-user's systems.

So instead of trying to hack the whole RPM system to allow the installation of kernel SRPMs in a clean way the distro makers simply started making a separate package called kernel-source. There's no compulsory requirement that RPMs include a compilation step (think about all the RPMs out there for programs written in non-compiled languages like perl and python). So in effect the kernel-source RPM is an RPM where the compile section in the spec file is not specified. Its just basically an install script to dump all the thousands of files making up the kernel source code into a nice, convenient directory structure that can be used to compile drivers.

Last edited by tkedwards; 09-23-2005 at 08:51 AM.
 
Old 09-25-2005, 07:11 PM   #5
sekelsenmat
Member
 
Registered: Apr 2005
Location: São Paulo - Brazil
Distribution: Mageia Linux 1
Posts: 353

Rep: Reputation: 30
Re: kernel compile mandriva way ?

Quote:
Originally posted by dvbm
lo

i've installed mandriva 2005 le in order to test it.

i'd like to get some tips and links in order to compile a kernel on my "fresh" mandriva properly so it can be packaged, installed and removed at will.. and most important keep the default mandriva config..
When I recompiled my kernel on mandriva 2005 I just followed precesely the instructions on:

http://wiki.linuxquestions.org/wiki/Compiling_a_kernel

It's a normal kernel compile without use of rpm source packages. Uses the makemenu to configure the modules.

I'm pretty sure I did not use the default mandriva config because I downloaded the kernel from www.kernel.org so I can say that you don't need to compile your kernel as the guys on Mandriva do. In fact I got a much much faster kernel recompiling because the default kernel comes with a lot of stuff that only work on certain PCs and you can shut them down.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Mandriva Kernel of the Day batorma Linux - Newbie 3 11-02-2005 10:44 PM
Wrong Mandriva Kernel hkctr Mandriva 3 09-18-2005 10:10 PM
Kernel compile on Mandriva. lilo.conf only shows Windows listing for boot? Kramer Mandriva 2 08-20-2005 06:03 PM
Cannot compile kernel in Mandriva 10.1 JLQ Mandriva 1 06-29-2005 04:40 PM
Mandriva 10.2... where's my kernel?? simkin101 Mandriva 5 06-08-2005 06:41 PM

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

All times are GMT -5. The time now is 01:17 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration