PDA

View Full Version : kernel


phe
28th June 2008, 09:43 AM
Hello,

I have F8 running with a "standard" kernel 2.6.24.4-64.
I now want to build one of my own.
Who can help/guide me in this process ?

I have read already a lot of docs on the web.
But the whole process is not clear to me.
DO I REALLY NEED RPMBUILD to build my kernel? (I only need this new kernel for testing on 1 machine)

Before start, source rpm must be installed.
How can I check if these are already present?
When I do "$ rpm -qa | grep kernel" I do not get any line with kernel-sources . . . . .

I have installed them with "$ rpm -ivh kernel-2.6.24.4-64.fc8.src.rpm"
Afterwards I checked again with "$ rpm -qa | grep kernel", and I still do not get any line with "kernel-sources . . .".
Are my kernels-sources now installed? How to check this?

I wanted to do $make menuconfig" but I also got errors.
=> Must this command started in fix directory?
=> Can I run this command as a regular user? Or must this be done as root ?


Phe

markkuk
28th June 2008, 10:18 AM
Source RPMs aren't registered in the RPM database, that's why they never show up in "rpm -q". If the source tarball, patches and the .spec file appear under your RPM build directory, then the source RPM was installed.
"make menuconfig" must be run in the kernel source directory, and you should do it as a regular user.

ppesci
28th June 2008, 12:26 PM

I disagree. If you have a package kernel-devel, that package has the sources.

HTH

phe
28th June 2008, 12:33 PM
Source RPMs aren't registered in the RPM database, that's why they never show up in "rpm -q".
. . . .

OK
This is clear to me.

. . . . If the source tarball, patches and the .spec file appear under your RPM build directory, then the source RPM was installed. . . . .

RPM build directory ?
Do I need to build a RPM for a new kernel ? ?


Is this a STANDARD place and name ?
/usr/src/kernels/2.6.24.3-50.fc8-i686 , /usr/src/kernels/2.6.24.4-64.fc8-i686 . . . .
or
/usr/src/redhat/ (here I have SOURCES and SPECS)
or
/lib/kernel
or
. . . .

? ?? ? ?


.spec file ? (/usr/src/redhat/SPECES/kernel.spec )
What is this? What is it good for ?


. . . . .
"make menuconfig" must be run in the kernel source directory, and you should do it as a regular user.

Kernel source directory :
I guess this is in function of the kernel-version, or not ?

(= /usr/src/redhat/SOURCES ) ? ?
But : is there a standard place where Fedora put its kernel sources ?


When I am as a regular user, in /usr/src/redhat/SOURCES, and I type in
"make menuconfig"
I get :
make: *** No rule to make target 'menuconfig'. Stop.

Why? What is wrong?
:mad:

Regards,

phe

ppesci
29th June 2008, 07:26 AM
If you wan to compile your own kernel, see:

http://fedoraproject.org/wiki/Docs/CustomKernel

I think is very complete.

HTH

phe
29th June 2008, 08:43 AM
If you wan to compile your own kernel, see:

http://fedoraproject.org/wiki/Docs/CustomKernel

I think is very complete.

HTH



Before starting, make sure the system has all the necessary packages installed, including the following:

* rpmdevtools
* yum-utils
. . . .


What is this good for?

I want to make 1 simple new kernel?
I do not need to redistribute the kernel.

ppesci
29th June 2008, 09:38 AM
This is if you want to make kernel a package for install in your system.

if you only want to compile and install without package, you can compile directly. Last time I did, there was the method:

1) you must be root
2) go to kernel source directory, something like: /usr/src/kernel/2.6.24-92
3) execute the commands:
make xconfig
make
make modules
make install
make modules_install


HTH

markkuk
29th June 2008, 11:09 AM
RPM build directory ?
Do I need to build a RPM for a new kernel ? ?
Source RPMs are used to build RPMs. If you don't want to build a kernel RPM, don't use the src.rpm package. Download a tarball from kernel.org instead.



.spec file ? (/usr/src/redhat/SPECES/kernel.spec )
What is this? What is it good for ?

The .spec file tells the rpmbuild command how to build the RPM package.



Kernel source directory :
I guess this is in function of the kernel-version, or not ?

It's the place where you unpacked the kernel sources and can be in any directory where you have write access.


When I am as a regular user, in /usr/src/redhat/SOURCES, and I type in
"make menuconfig"
I get :
make: *** No rule to make target 'menuconfig'. Stop.

Why? What is wrong?
First of all, if you are a regular user you should build the kernel in a directory under your $HOME or in /tmp, not in a system directory. Second, you gave the command in a place that doesn't contain the kernel sources (and the Makefile).

phe
29th June 2008, 11:44 AM
Hi Markkuk,

Thanks for your feedback.

It becomes step by step more clear.
Bust there are still questions :

Source RPMs are used to build RPMs. If you don't want to build a kernel RPM, don't use the src.rpm package. Download a tarball from kernel.org instead.



The .spec file tells the rpmbuild command how to build the RPM package.



It's the place where you unpacked the kernel sources and can be in any directory where you have write access.


First of all, if you are a regular user you should build the kernel in a directory under your $HOME or in /tmp, not in a system directory. Second, you gave the command in a place that doesn't contain the kernel sources (and the Makefile).

Regular user : how to build kernel in $HOME or /tmp ?

Is it enough to enter the command "$make menuconfig" in $HOME ? or /tmp ?
Must kernelsources not be located there ?


Where are my kernelsources located ?
In /usr/src/kernels/2.6.24.3-50.fc8-i686
or
/usr/src/redhat/SOURCES


Would it be better to do #make menuconfig as root in /usr/src/redhat/SOURCES ?
Or must it be in /usr/src/kernels/2.6.24.3-50.fc8-i686 ?

SteveGYBE
29th June 2008, 12:01 PM
phe - SOURCES contain the Linux 2.6.24 kernel source code as a tarball (linux-2.6.24.tar.bz2) and a patch file to raise it to kernel 2.6.24.4 (patch-2.6.24.4.bz2). All the other linux*.patch files are Fedora patches raise the kernel to Fedora 2.6.24.4-64.fc8. You will need to untar the actual Linux source before anything else.

It does depend on what sort of kernel you want to build. If you want to build a version of the Fedora kernel, then it is easiest to use "rpmbuild" to unpack and patch your source tree -

Create a "BUILD" directory alongside your SOURCES and SPECS directories,
CD to SPECS
Run rpmbuild -bp --target i686 kernel.spec

When (if??) this succeeds, go to /BUILD/kernel-2.6.24/linux-2.6.24.i686, and you can start with your "make menuconfig"...

phe
29th June 2008, 01:40 PM
Hello Steve,

So when I resume :

I have the kernel sources installed (from "$ rpm -ivh kernel-2.6.24.4-64.fc8.src.rpm")

and I have
/usr/src/kernels/2.6.24.4-64.fc8-i686
/usr/src/redhat/SOURCES
/usr/src/redhat/SPECS



It does depend on what sort of kernel you want to build. If you want to build a version of the Fedora kernel, then it is easiest to use "rpmbuild" to unpack and patch your source tree -

Create a "BUILD" directory alongside your SOURCES and SPECS directories,
CD to SPECS
Run rpmbuild -bp --target i686 kernel.spec

When (if??) this succeeds, go to /BUILD/kernel-2.6.24/linux-2.6.24.i686, and you can start with your "make menuconfig"...


There is something that I do not understand : Why using rpmbuild ?
I thought that a kernel could be build/configured only with "make menuconfig". ? ? ?

My first goal is to build a new kernel for my actual running version (so I will not change version !)
I want to get some experiances in creating kernels.
I want to go step by step (small step by small step).
And . . .

I want to understand each step I do (yes, sorry, this is somethings the most difficult)
(That is the reason why I go on on the rpmbuild).

regards,

SteveGYBE
29th June 2008, 02:57 PM
OK - without rpmbuild, all you need to do is:

- Untar the base kernel files: "tar xvf linux-2.6.24.tar.bz2"
- Change to the Linux 2.6.24 directory "cd linux-2.6.24"
- Patch kernel source to 2.6.24.4: "bunzip2 < ../patch-2.6.24.4.bz2 | patch -p1 -F1 -s"
- Apply 147 Fedora patches in the correct sequence (as specified by the ApplyPatch lines in SPECS/kernel.spec): "patch -p1 -F1 -s < ../<xxxxxx>.patch"
(replacing "../<xxxxxx>.patch" with the path and name of each actual patch.)
- Construct the i686 .config file from the relevant bits - config-generic, config-nodebug, config-x86-generic, config-i686 (See Makefile.config)
- Move your .config file to the source root linux-2.6.24
- Run "make oldconfig" to check .config and supply initial values of any new parameters.

Sorry, but at this point I am wondering whether a computer would be able to help with all this (e.g. rpmbuild -bp ...) :D

markkuk
29th June 2008, 07:00 PM
Regular user : how to build kernel in $HOME or /tmp ?

Is it enough to enter the command "$make menuconfig" in $HOME ? or /tmp ?
Must kernelsources not be located there ?
You must run the "make menuconfig" or other "make" commands in the directory containing the uncompressed kernel sources. Unpacking a kernel tarball creates a subdirectory, change to that directory and run "make menuconfig" there. See the Kernel Rebuild Guide (http://www.digitalhermit.com/linux/Kernel-Build-HOWTO.html)

Where are my kernelsources located ?
They are located in the place where you put them.

phe
29th June 2008, 07:37 PM
Hi Steve,

Thanks for you explanation.

I seen you start from the vary basic ! (nice !)
OK I am agree with you that rpmbuild could be helpfull for patching.

But what do you say what I have a source kernel of Fedora installed with rpm?
($ rpm -ivh kernel-2.6.24.4-64.fc8.src.rpm")


/usr/src/kernels/2.6.24.4-64.fc8-i686
/usr/src/redhat/SOURCES

phe

SteveGYBE
29th June 2008, 08:30 PM
phe -

kernel-2.6.24.4-64.fc8.src.rpm will try to install its files in /usr/src/redhat/SOURCES (if you haven't used "rpmdev-setuptree" to set up another area). This is where you find the Linux tarball and all the patches to bring the source up to the level required to build the Linux kernel for Fedora 2.6.24.4-64.fc8.

/usr/src/kernels/2.6.24.4-64.fc8-i686 is where the kernel-devel RPM flle puts its files - these are just those required to build kernel modules, not the full source code of the kernel. If you look in the "include/linux" subdirectory you will see these are the header files which describe the data structures used by the kernel which may need to be accessed by a kernel module.

However, the files in /usr/src/redhat/SOURCES will include these header files plus all the C code required to build the kernel itself.

phe
29th June 2008, 09:04 PM
Steve,

Do I understand it well that :

it must be possible to do $make menuconfig when I am in /usr/src/redhat/SOURCES (when I have installed kernel-2.6.24.4-64.fc8.src.rpm - with rpm. I have not used "tpmdev-setuptree")?

When I am as a regular user, in /usr/src/redhat/SOURCES, and I type in
"make menuconfig"


I get :
make: *** No rule to make target 'menuconfig'. Stop.



Thanks for helping me to understand how kerneling building/compiling works with Fedora.

regards,

phe

SteveGYBE
29th June 2008, 09:34 PM
phe -

Remember kernel-2.6.24.4-64.fc8.src.rpm has just dumped the b2zipped Linux 2.6.24 kernel tarball, the b2zipped Linux 2.6.24.4 patch, the Fedora patches and a load of .config file fragments in /usr/src/redhat/SOURCES and instructions on how rpmbuild should build the source tree and apply the patches.etc in the SPECS directory.

You need to extract the kernel source and patch it before you can start building kernels - see post #10 - the "-bp" option of rpmbuild means just carry out the Build Preparation stage, meaning set up the patched source tree under the /usr/src/redhat/BUILD directory (which you will need to create first).

Once this has been done you can start with your "make menuconfig" in /usr/src/redhat/BUILD/kernel-2.6.24/linux-2.6.24.i686.

phe
29th June 2008, 09:45 PM
Steve,

OK.

so it means I NEED to do rpmbuild ! before I can start to do make menuconfig.

I will this give a try tomorrow ! (I am not able to do this today)
I will keep you informed in this topic.

Thanks for your help !

phe

phe
30th June 2008, 07:16 AM
Hello Steve,


I will back on what you have said in post 15 (http://forums.fedoraforum.org/showpost.php?p=1038659&postcount=15)

This is for myself, so confirm that I have understood what you have explained.

. . . .
/usr/src/kernels/2.6.24.4-64.fc8-i686 is where the kernel-devel RPM flle puts its files - these are just those required to build kernel modules, not the full source code of the kernel. . . .

Does this mean that the info in post 3 :
http://forums.fedoraforum.org/showpost.php?p=1038092&postcount=3

. . If you have a package kernel-devel, that package has the sources

is wrong ?

(kernel-devel has only a part of the source code ? - only part for building the modules, not that part for building the kernel ? )

regards,

phe

SteveGYBE
30th June 2008, 08:59 AM
phe - that is the case, kernel-devel has the source required to build (3rd-party) kernel modules against the corresponding kernel - it contains mostly header files (*.h) and almost no actual code (*.c files).

To recompile the kernel itself you need the full kernel source from the source package which includes all the C code and all the header files.

phe
1st July 2008, 07:08 AM
Steve,

I am one step further.

I installed rpmdevtools first.
[phe@localhost ~]$ su -c "yum install rpmdevtools"

and afterwarts I did a rpmbuild
[phe@localhost ~]$ su -c "rpmbuild -bp --target=i686 /usr/src/redhat/SPECS/kernel.spec"


Now I can go on with the "make menuconfig" I think.
(This is for this night)

Regards,

phe
7th September 2008, 10:44 AM
Hello Steve,

Here I am back.
during my holiday I hav had the occasion to test something, and to analyse the procedure.
I think the origine of my problem lies in the "rpmbuild".
I tought that this command was ONLY used for building RPM's. but this seams not to be the case. You als need it to set up the source tree to build for building/configuring the kernel.

Am I right ?


Next step :

When I have a (new) kernel, I also need a root file system. (isn't it ?)
Can you help me to this? Give me some guidelines as for kernel building.

Thanks,

Phe

SteveGYBE
7th September 2008, 09:50 PM
Hi Phe - you're right about rpmbuild - the "-bp" option instructs it only to carry out the "%prep" step from the "spec" file. With the kernel source RPM, this is just to set up and patch the kernel source tree, ready for you to do "make menuconfig", etc.

If you are just tweaking the kernel of an existing Fedora installation, then you should be able to use the root file system that you used for the kernel as distributed by with Fedora - this is, after all, what happens if you get a kernel update from Fedora. You don't receive the entire set of GNU utilities and X environments along with each kernel update and (depending on your yum settings) you will still be able to boot a previous version of kernel after update.

phe
8th September 2008, 05:36 PM
Hi Steve,


If you are just tweaking the kernel of an existing Fedora installation, then you should be able to use the root file system that you used for the kernel as distributed by with Fedora - this is, after all, what happens if you get a kernel update from Fedora. You don't receive the entire set of GNU utilities and X environments along with each kernel update and (depending on your yum settings) you will still be able to boot a previous version of kernel after update.


I got an old protable. I want to run it as a "thin client".
I want to boot it via pxe.
That is the reason why I ask such questions.

I am now aible to build a new kernel (for my working station F8).
But next step is : to have it working for that portable.

PXE works ! (I am aible to start a DOS-image via a "memdisk - kernel")
I want to replace dos with a Linux one.

what is your idea of it? Would I continu with Fedora kernel, or build an other on my fedora 8 system (how must I do that than? )

regards,

phe

cicatrix1
8th September 2008, 08:47 PM
I wouldn't even bother with RPMs unless you intend to redistribute the kernel or you want Fedora's kernel modifications. If you want a stock/vanilla kernel (to which you can apply custom patches you make or download), I would just get the source tarball from kernel.org.

phe
9th September 2008, 06:30 AM
I wouldn't even bother with RPMs unless you intend to redistribute the kernel or you want Fedora's kernel modifications. If you want a stock/vanilla kernel (to which you can apply custom patches you make or download), I would just get the source tarball from kernel.org.

Initially I had the same idea. But it seams that rpmbuild is needed to "unpack" the tarball sources and to build a source tree and to apply the patches (kernel and fedora patches). Otherwise it is not possible to do "make config" (for Fedora).

Is it possibile to build a "non fedora" kernel, on a running Fedora system? How? What a re the steps to follow?
Unpack sources, creation source tree, appling patches . . . .

phe

cicatrix1
10th September 2008, 05:13 PM
Installing a vanilla/stock kernel has been well documented over the years. Try finding a HOWTO :) It'll probably answer some of your other questions as well. I'd search for "how do I compile a kernel?"

phe
11th September 2008, 08:02 PM
Installing a vanilla/stock kernel has been well documented over the years. Try finding a HOWTO :) It'll probably answer some of your other questions as well. I'd search for "how do I compile a kernel?"

Can I install vanilla/stock kernel the same way as a Fedora Kernel ?

rpmbuild -bp . . .

? ? ?

Are there advantages to use vanilla/stock kernel instead of the Fedora ?

regards,

phe

cicatrix1
11th September 2008, 08:46 PM
A vanilla kernel would come from a tarball. It's been a while since I've done it, but you untar the kernel into usr/src (I think), then do some make commands, which include 'make xconfig' where you can specify the things you want to compile in or compile as modules.

The advantages are you can tailor it a bit to your system so it's not as bloated as a fedora kernel and might be a little bit faster. On the other hand, Fedora likely has a bunch of custom patches to make things faster or integrate better with some software? I'm not entirely sure what all they add.

phe
13th September 2008, 09:58 AM
Installing a vanilla/stock kernel has been well documented over the years. Try finding a HOWTO :) It'll probably answer some of your other questions as well. I'd search for "how do I compile a kernel?"


Look what I have found !

http://www.andrewd18.com/guidetolinux/index.php?chapter=16

This explains that there is a difference between stock kernel and Vanilla kernel.

I guess there is also a diff in procedure to build and compile. (isn't it?)

I am looking in a simple document that explains me the essential differences (OK there will be also diff between the diff distro's). But let start to mention the diff between Fedora and a Vanilla.

Who can help ?

regards,

phe
20th September 2008, 08:51 PM
Hello,

I am reading for weeks several documents about building a kernel.
I am running fedora 8. So I read also about "building a kernel on the Fedora" way.

When you build a kernel on the Fedora way, you are using rpm, an the result is a kernelpackage .rpm.

So this package can only be used to be installed on an "already" working system.

I want to build a new (small) system that can be run (and started) from a pxe-server.
I want to run it on a thin client.
I think to build a monolithic kernel. (Start from Vanilla ?) (how can I start from my Fedora kernel source?)
Is there a way to "check-out" out of this rpm : the kernel and initrd. ?
Who can guide me how I can build a small rootfs? (in ram)

I have found an interesting article : (on kernel 2.4)

http://www.linuxfocus.org/English/July2002/article252.shtml

Does someone know such an article for 2.6?

Who can help me to understand/build a initrd? and a rootfs ?

thanks,

phe

forkbomb
21st September 2008, 12:57 AM
I don't know about your specific questions, but respinning Fedora is relatively easy with Revisor:
http://revisor.fedoraunity.org/

phe
21st September 2008, 08:35 AM
Maybe I can resume my question as :

How to build my own Linux for an embedded system?

Demz
21st September 2008, 08:37 AM
might wanna google that one or search the forum there might be some answers

phe
29th September 2008, 06:18 PM
After a lot of reading, I finally started to do some tests.

I followed the doc as described in :
http://fedoraproject.org/wiki/Docs/CustomKernel

When I do rpmbuild I get :[phe@fc8 SPECS]$ rpmbuild -bp --target i686 kernel.spec
================================================== ======

Building target platforms: i686
Building for target i686
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.38749
+ umask 022
+ cd /home/phe/rpmbuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ '[' '!' -d kernel-2.6.26/vanilla ']'
+ cd kernel-2.6.26
+ '[' -d linux-2.6.26.i686 ']'
+ rm -rf deleteme.i686
+ mv linux-2.6.26.i686 deleteme.i686
+ rm -rf deleteme.i686
+ cp -rl vanilla linux-2.6.26.i686
+ cd linux-2.6.26.i686
+ cp /home/phe/rpmbuild/SOURCES/config-debug . . . . .
. . .
+ cp /home/phe/rpmbuild/SOURCES/merge.pl .
+ make -f /home/phe/rpmbuild/SOURCES/Makefile.config VERSION=2.6.26.3 configs
cat config-generic config-nodebug > temp-generic
perl merge.pl config-x86-generic temp-generic > temp-x86-generic
perl merge.pl config-i586 temp-x86-generic i386 > kernel-2.6.26.3-i586.config
. . . .
++ echo kernel-2.6.26.3-i586.config kernel-2.6.26.3-i686-PAE-debug.config kernel-2.6.26.3-i686-PAE.config kernel-2.6.26.3-i686-debug.config kernel-2.6.26.3-i686-xen.config kernel-2.6.26.3-i686.config
++ grep -c kernel-2.6.26.3-x86_64.config
+ '[' 0 -eq 0 ']'
+ rm -f kernel-2.6.26.3-x86_64.config
+ for i in '*.config'
+ mv kernel-2.6.26.3-i586.config .config
++ head -1 .config
++ cut -b 3-
+ Arch=i386
+ make ARCH=i386 nonint_oldconfig
.config:53:warning: trying to assign nonexistent symbol PREEMPT_BKL
.config:211:warning: trying to assign nonexistent symbol MTD_PNC2000
.config:338:warning: trying to assign nonexistent symbol BLK_DEV_RAM_BLOCKSIZE
.config:361:warning: trying to assign nonexistent symbol BLK_DEV_HD_IDE
. . . .
.config:3510:warning: trying to assign nonexistent symbol CGROUP_MEM_CONT
+ echo '# i386'
+ cat .config
+ for i in '*.config'
+ mv kernel-2.6.26.3-i686-PAE-debug.config .config
++ head -1 .config
++ cut -b 3-
+ Arch=i386
+ make ARCH=i386 nonint_oldconfig
.config:53:warning: trying to assign nonexistent symbol PREEMPT_BKL
.config:211:warning: trying to assign nonexistent symbol MTD_PNC2000
.config:338:warning: trying to assign nonexistent symbol BLK_DEV_RAM_BLOCKSIZE
. . . .
.config:3510:warning: trying to assign nonexistent symbol CGROUP_MEM_CONT
+ echo '# i386'
+ cat .config
+ for i in '*.config'
+ mv kernel-2.6.26.3-i686-PAE.config .config
++ head -1 .config
++ cut -b 3-
+ Arch=i386
+ make ARCH=i386 nonint_oldconfig
.config:53:warning: trying to assign nonexistent symbol PREEMPT_BKL
.config:211:warning: trying to assign nonexistent symbol MTD_PNC2000
. . . .
.config:3510:warning: trying to assign nonexistent symbol CGROUP_MEM_CONT
+ echo '# i386'
+ cat .config
+ for i in '*.config'
+ mv kernel-2.6.26.3-i686-debug.config .config
++ head -1 .config
++ cut -b 3-
+ Arch=i386
+ make ARCH=i386 nonint_oldconfig
.config:53:warning: trying to assign nonexistent symbol PREEMPT_BKL
.config:211:warning: trying to assign nonexistent symbol MTD_PNC2000
. . . .
.config:3496:warning: trying to assign nonexistent symbol ACPI_CUSTOM_DSDT_INITRD
.config:3510:warning: trying to assign nonexistent symbol CGROUP_MEM_CONT
+ echo '# i386'
+ cat .config
+ for i in '*.config'
+ mv kernel-2.6.26.3-i686-xen.config .config
++ head -1 .config
++ cut -b 3-
+ Arch=i386
+ make ARCH=i386 nonint_oldconfig
.config:53:warning: trying to assign nonexistent symbol PREEMPT_BKL
.config:211:warning: trying to assign nonexistent symbol MTD_PNC2000
. . .
.config:3863:warning: trying to assign nonexistent symbol XEN_SMPBOOT
.config:3867:warning: trying to assign nonexistent symbol X86_XEN
+ echo '# i386'
+ cat .config
+ for i in '*.config'
+ mv kernel-2.6.26.3-i686.config .config
++ head -1 .config
++ cut -b 3-
+ Arch=i386
+ make ARCH=i386 nonint_oldconfig
.config:53:warning: trying to assign nonexistent symbol PREEMPT_BKL
.config:211:warning: trying to assign nonexistent symbol MTD_PNC2000
. . .
.config:3496:warning: trying to assign nonexistent symbol ACPI_CUSTOM_DSDT_INITRD
.config:3510:warning: trying to assign nonexistent symbol CGROUP_MEM_CONT
+ echo '# i386'
+ cat .config
+ find . '(' -name '*.orig' -o -name '*~' ')' -exec rm -f '{}' ';'
+ cd ..
+ exit 0


Anyone a n idea why ?

And when I do make xconfig :
[phe@fc8 linux-2.6.26.i686]$ make xconfig
CHECK qt
*
* Unable to find the QT3 installation. Please make sure that
* the QT3 development package is correctly installed and
* either install pkg-config or set the QTDIR environment
* variable to the correct location.
*
make[1]: *** No rule to make target `scripts/kconfig/.tmp_qtcheck', needed by `scripts/kconfig/qconf.o'. Stop.
make: *** [xconfig] Error 2
[phe@fc8 linux-2.6.26.i686]$
[phe@fc8 linux-2.6.26.i686]$ rpm -qa | grep qt
pinentry-qt-0.7.4-1.fc8
qt4-4.4.1-2.fc8
avahi-qt3-0.6.21-8.fc8
dbus-qt-0.70-2.fc8
poppler-qt-0.6.2-2.fc8
poppler-qt-0.6.2-1.fc8
qtparted-0.4.5-15.fc8
qt4-x11-4.4.1-2.fc8
qt-3.3.8b-2.fc8
[phe@fc8 linux-2.6.26.i686]$


Who can help me further ?

I am running F8 2.6.26.3-14

Thanks,

phe
29th September 2008, 08:29 PM
On te web is a lot of information.
But the question is : What is the value of it ?
I have read already a lot, and I saw that some information is not (more) up to date or even wrong.

regards,

phe

Shadowmeph
29th September 2008, 09:19 PM
I brought a similar question up at Linux.org I asked if it was possible to build your own kernel that could be used on any linux os just as long as it was on the same pc and allot of people sad that it was possible .
I think that the article that you are talking about ( the fedora way) can be done you just have to replace the Kernel version in the article with the vanilla kernel of your choice.

markkuk
29th September 2008, 10:05 PM
You need the qt-devel package for "make xconfig".

Silpheed2K
29th September 2008, 11:18 PM
I wonder where the term "Roll your own" comes from.. I keep thinking it's a drug reference every time I hear it.
On a lighter note I would eventually like my own customized distro so I think this is great info.

Shadowmeph
29th September 2008, 11:32 PM
I wonder where the term "Roll your own" comes from.. I keep thinking it's a drug reference every time I hear it.
On a lighter note I would eventually like my own customized distro so I think this is great info.

What you could do is try Arch Linux that was the second distro I tried but I couldn't get the FGLRX video drivers to install properly I think it was because I was using 64bit also I am still pretty new to Linux

w5set
30th September 2008, 02:56 AM
"Roll yer own" probably started back in the loose tobacco days.
It's still referred to doing that (and it's not necessarily "drug rlated" outside of nicotine.) :)

As far as a mini-Fedora "roll-up"....:D
http://forums.fedoraforum.org/showthread.php?t=190084&highlight=%22small+footprint%22+fedora

phe
30th September 2008, 07:17 AM
You need the qt-devel package for "make xconfig".

Thanks Markkuk.

I did not noticed it in the error-message. I tought I need only (?) QT3 .

I will give it a try (installing qt-devel)

regards,

phe
30th September 2008, 03:39 PM
Hi,

I installed qt-devel as menionned by Markkuk : su -c "yum install qt-devel"

It installed qt-devel with all it dependencies (+/- 14 Meg)

When I try to start make xconfig, I get the same error :

[phe@fc8 linux-2.6.26.i686]$ make xconfig
CHECK qt
/usr/lib/qt-3.3/bin/moc -i scripts/kconfig/qconf.h -o scripts/kconfig/qconf.moc
HOSTCXX scripts/kconfig/qconf.o
HOSTLD scripts/kconfig/qconf
/usr/bin/ld: cannot find -lXi
collect2: ld returned 1 exit status
make[1]: *** [scripts/kconfig/qconf] Error 1
make: *** [xconfig] Error 2
[phe@fc8 linux-2.6.26.i686]$ [phe@fc8 linux-2.6.26.i686]$ pwd
/home/phe/rpmbuild/BUILD/kernel-2.6.26/linux-2.6.26.i686


Now I have :

[phe@fc8 linux-2.6.26.i686]$ rpm -qa | grep "^qt"
qt4-4.4.1-2.fc8
qtparted-0.4.5-15.fc8
qt4-x11-4.4.1-2.fc8
qt-devel-3.3.8b-2.fc8
qt-3.3.8b-2.fc8
[phe@fc8 linux-2.6.26.i686]$





Who can help me further ?

stevea
30th September 2008, 03:57 PM
I disagree. If you have a package kernel-devel, that package has the sources.

HTH

WRONG !
kernel-devel only has the includes and the makefile so you can make an external module - IT DOES NOT include kernel sources. Also NEVER build a kernel down the /usr/source path - that is NOT what it is there for.

Use the link above. Here is a script that may require a few tweaks ....
#!/bin/bash

#just in case ...
yum -y groupinstall "Development Tools"
yum -y install rpmdevtools

#setup a local tree in ~
rpmdev-setuptree

# ** adjust the URL **
REPO_URL="http://download.fedora.redhat.com/pub/fedora/linux/updates/8/SRPMS"
rpm -Uhv $REPO_URL/kernel-`uname -r`.src.rpm

# ** select the arch **
#ARCH="i686"
#ARCH="x86_64"
ARCH="`arch`"
rpmbuild -bp --target=$ARCH ~/rpmbuild/SPECS/kernel.spec

cd ~/rpmbuild/BUILD/kernel*/linux*
make menunconfig
make
sudo make modules_install
sudo make install

stevea
30th September 2008, 04:05 PM
/usr/bin/ld: cannot find -lXi
yum provides */libXi*
...
libXi-1.1.3-1.fc8.i386 : X.Org X11 libXi runtime library
Matched from:
Filename : /usr/lib/libXi.so.6
Filename : /usr/share/doc/libXi-1.1.3/ChangeLog
Filename : /usr/share/doc/libXi-1.1.3/AUTHORS
Filename : /usr/share/doc/libXi-1.1.3/COPYING
Filename : /usr/share/doc/libXi-1.1.3
Filename : /usr/lib/libXi.so.6.0.0
Filename : /usr/share/doc/libXi-1.1.3/README


So
yum -y install libXi

and iterate.

phe
30th September 2008, 06:45 PM
Use the link above.


I have don it.
But I do not remember if I did

yum -y groupinstall "Development Tools"

How can I check this? (if it was done before?)
If it is not installed complet, what to do? Remove it? or install again?


But I get the error above.

Do I need to remove the sourcetree build before?
And start over the whole process with your script ?

Or yust "yum install libXi"


regards,

phe

[QUOTE]Here is a script that may require a few tweaks ....
#!/bin/bash

#just in case ...
yum -y groupinstall "Development Tools"
yum -y install rpmdevtools

#setup a local tree in ~
rpmdev-setuptree

# ** adjust the URL **
REPO_URL="http://download.fedora.redhat.com/pub/fedora/linux/updates/8/SRPMS"
rpm -Uhv $REPO_URL/kernel-`uname -r`.src.rpm

# ** select the arch **
#ARCH="i686"
#ARCH="x86_64"
ARCH="`arch`"
rpmbuild -bp --target=$ARCH ~/rpmbuild/SPECS/kernel.spec

cd ~/rpmbuild/BUILD/kernel*/linux*
make menunconfig
make
sudo make modules_install
sudo make install

phe
30th September 2008, 07:30 PM
Additional info :

[phe@fc8 ~]$ yum provides */libXi*
Error: Caching enabled but no local cache of //var/cache/yum/updates-newkey/filelists.sqlite.bz2 from updates-newkey
[phe@fc8 ~]$



[phe@fc8 ~]$ yum grouplist "Development Tools"
Setting up Group Process
Installed Groups:
Administration Tools
Authoring and Publishing
Base (RPM Fusion Free)
Base (RPM Fusion Nonfree)
Editors
Educational Software
Engineering and Scientific
FTP Server
Fonts
Games and Entertainment
Graphical Internet
Graphics
Hardware Support
KDE (K Desktop Environment)
Legacy Fonts
Legacy Network Server
Legacy Software Development
Mail Server
Network Servers
Office/Productivity
Printing Support
Server Configuration Tools
Sound and Video
System Tools
Text-based Internet
Web Server
Windows File Server
X Window System
Available Groups:
Clustering
DNS Name Server
Development Libraries
Development Tools
Fedora Eclipse
Fedora Packager
GNOME Desktop Environment
GNOME Desktop Environment (RPM Fusion Free)
GNOME Software Development
Games and Entertainment (RPM Fusion Free)
Games and Entertainment (RPM Fusion Nonfree)
Hardware Support (RPM Fusion Free)
Hardware Support (RPM Fusion Nonfree)
Internet (RPM Fusion Free)
Java Development
KDE (K Desktop Environment) (RPM Fusion Free)
KDE Software Development
Miscellaneous command line tools (RPM Fusion Free)
MySQL Database
News Server
PostgreSQL Database
Sound and Video (RPM Fusion Free)
System Tools (RPM Fusion Free)
Virtualization
Web Development
Window Managers
X Software Development
XFCE
XFCE Software Development
Done
[phe@fc8 ~]$




[phe@fc8 ~]$ uname -a
Linux fc8.home.net 2.6.26.3-14.fc8 #1 SMP Wed Sep 3 03:40:05 EDT 2008 i686 athlon i386 GNU/Linux
[phe@fc8 ~]$

[phe@fc8 ~]$ yum provides * /libXi*
kernel-2.6.26.3-14.fc8.i586 : The Linux kernel
Matched from:



kernel-2.6.26.3-14.fc8.i686 : The Linux kernel
Matched from:



kernel-PAE-debug-2.6.26.3-14.fc8.i686 : The Linux kernel compiled with extra debugging enabled for PAE capable machines
Matched from:
Other : kernel



kernel-debug-2.6.26.3-14.fc8.i686 : The Linux kernel compiled with extra debugging enabled
Matched from:
Other : kernel



kernel-xen-2.6.21.7-5.fc8.i686 : The Linux kernel compiled for Xen VM operations
Matched from:
Other : kernel



kernel-PAE-2.6.26.3-14.fc8.i686 : The Linux kernel compiled for PAE capable machines
Matched from:
Other : kernel



kernel-xen-2.6.21-2950.fc8.i686 : The Linux kernel compiled for Xen VM operations
Matched from:
Other : kernel



kernel-2.6.23.1-42.fc8.i586 : The Linux kernel (the core of the Linux operating system)
Matched from:



kernel-2.6.23.1-42.fc8.i686 : The Linux kernel (the core of the Linux operating system)
Matched from:



kernel-PAE-2.6.23.1-42.fc8.i686 : The Linux kernel compiled for PAE capable machines
Matched from:
Other : kernel



kernel-PAE-debug-2.6.23.1-42.fc8.i686 : The Linux kernel compiled with extra debugging enabled for PAE capable machines
Matched from:
Other : kernel



kernel-debug-2.6.23.1-42.fc8.i686 : The Linux kernel compiled with extra debugging enabled
Matched from:
Other : kernel



Error: Caching enabled but no local cache of //var/cache/yum/updates-newkey/filelists.sqlite.bz2 from updates-newkey
[phe@fc8 ~]$

phe
30th September 2008, 08:32 PM
I do now a

[phe@fc8 ~]$ su -c 'yum groupupdate "Development Tools"'
Password:
Setting up Group Process
Package flex-2.5.33-14.fc8.i386 already installed and latest version
Package gcc-4.1.2-33.i386 already installed and latest version
Package redhat-rpm-config-9.0.1-1.fc8.noarch already installed and latest version
Package rpm-build-4.4.2.2-7.fc8.i386 already installed and latest version
Package 1:make-3.81-11.fc8.i386 already installed and latest version
Package 1:pkgconfig-0.22-4.fc8.i386 already installed and latest version
Package gettext-0.16.1-12.fc8.i386 already installed and latest version
Package automake-1.10-6.noarch already installed and latest version
Package gdb-6.6-45.fc8.i386 already installed and latest version
Package libtool-1.5.24-3.fc8.i386 already installed and latest version
Package autoconf-2.61-9.fc8.noarch already installed and latest version
Package gcc-c++-4.1.2-33.i386 already installed and latest version
Package binutils-2.17.50.0.18-1.i386 already installed and latest version
Package texinfo-4.11-5.fc8.i386 already installed and latest version
Package elfutils-0.135-1.fc8.i386 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package swig.i386 0:1.3.33-1.fc8 set to be updated
---> Package python-ldap.i386 0:2.3.1-1.fc8 set to be updated
---> Package valgrind.i386 1:3.2.3-7 set to be updated
---> Package pstack.i386 0:1.2-7.2.2 set to be updated
---> Package cvs.i386 0:1.11.22-13.fc8 set to be updated
---> Package byacc.i386 0:1.9.20050813-2.fc8 set to be updated
---> Package automake16.noarch 0:1.6.3-14 set to be updated
---> Package ccache.i386 0:2.4-11.fc8 set to be updated
---> Package gcc-gfortran.i386 0:4.1.2-33 set to be updated
--> Processing Dependency: libgfortran = 4.1.2-33 for package: gcc-gfortran
--> Processing Dependency: libgfortran.so.1 for package: gcc-gfortran
--> Processing Dependency: libmpfr.so.1 for package: gcc-gfortran
---> Package frysk.i386 0:0.4-0.fc8 set to be updated
---> Package doxygen.i386 1:1.5.6-1.fc8 set to be updated
---> Package automake17.noarch 0:1.7.9-11 set to be updated
---> Package oprofile-gui.i386 0:0.9.3-18.fc8 set to be updated
---> Package subversion.i386 0:1.4.4-7 set to be updated
---> Package diffstat.i386 0:1.43-6.fc8 set to be updated
---> Package automake15.noarch 0:1.5-22 set to be updated
---> Package patchutils.i386 0:0.2.31-3.fc8 set to be updated
---> Package systemtap.i386 0:0.6.2-1.fc8 set to be updated
--> Processing Dependency: systemtap-runtime = 0.6.2-1.fc8 for package: systemtap
---> Package indent.i386 0:2.2.9-16.fc7 set to be updated
---> Package ctags.i386 0:5.6-1.1 set to be updated
---> Package automake14.noarch 0:1.4p6-15.fc7 set to be updated
---> Package rcs.i386 0:5.7-31 set to be updated
---> Package ltrace.i386 0:0.5-9.45svn.fc8 set to be updated
---> Package oprofile.i386 0:0.9.3-18.fc8 set to be updated
---> Package cscope.i386 0:15.5-15.4.fc7 set to be updated
---> Package bison.i386 0:2.3-4.fc8 set to be updated
---> Package strace.i386 0:4.5.16-2.fc8 set to be updated
--> Running transaction check
---> Package mpfr.i386 0:2.3.0-1.fc8 set to be updated
---> Package systemtap-runtime.i386 0:0.6.2-1.fc8 set to be updated
---> Package libgfortran.i386 0:4.1.2-33 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================== ==============================
Package Arch Version Repository Size
================================================== ==============================
Installing:
automake14 noarch 1.4p6-15.fc7 fedora 243 k
automake15 noarch 1.5-22 fedora 283 k
automake16 noarch 1.6.3-14 fedora 297 k
automake17 noarch 1.7.9-11 fedora 359 k
bison i386 2.3-4.fc8 fedora 528 k
byacc i386 1.9.20050813-2.fc8 fedora 44 k
ccache i386 2.4-11.fc8 fedora 52 k
cscope i386 15.5-15.4.fc7 fedora 137 k
ctags i386 5.6-1.1 fedora 127 k
cvs i386 1.11.22-13.fc8 updates-newkey 726 k
diffstat i386 1.43-6.fc8 fedora 19 k
doxygen i386 1:1.5.6-1.fc8 updates-newkey 2.6 M
frysk i386 0.4-0.fc8 updates-newkey 29 M
gcc-gfortran i386 4.1.2-33 fedora 3.0 M
indent i386 2.2.9-16.fc7 fedora 94 k
ltrace i386 0.5-9.45svn.fc8 fedora 60 k
oprofile i386 0.9.3-18.fc8 updates-newkey 2.1 M
oprofile-gui i386 0.9.3-18.fc8 updates-newkey 85 k
patchutils i386 0.2.31-3.fc8 fedora 110 k
pstack i386 1.2-7.2.2 fedora 4.6 k
python-ldap i386 2.3.1-1.fc8 fedora 130 k
rcs i386 5.7-31 fedora 333 k
strace i386 4.5.16-2.fc8 fedora 163 k
subversion i386 1.4.4-7 fedora 2.3 M
swig i386 1.3.33-1.fc8 updates-newkey 3.1 M
systemtap i386 0.6.2-1.fc8 updates-newkey 981 k
valgrind i386 1:3.2.3-7 fedora 11 M
Installing for dependencies:
libgfortran i386 4.1.2-33 fedora 230 k
mpfr i386 2.3.0-1.fc8 fedora 142 k
systemtap-runtime i386 0.6.2-1.fc8 updates-newkey 48 k

Transaction Summary
================================================== ==============================
Install 30 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 58 M
Is this ok [y/N]: y
Downloading Packages:


Do I also need a 'yum groupupdate "Development Libraries"' ?

When i try to do this I get :
--> Processing Conflict: python-devel conflicts python < 2.5.1-26.fc8.2
--> Finished Dependency Resolution
python-devel-2.5.1-26.fc8.2.i386 from updates-newkey has depsolving problems
--> python-devel conflicts with python
Error: python-devel conflicts with python


[phe@fc8 ~]$ su -c 'yum update python-devel'
Password:
Setting up Update Process
No Packages marked for Update
[phe@fc8 ~]$ su -c 'yum install python-devel'
Password:
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package python-devel.i386 0:2.5.1-26.fc8.2 set to be updated
--> Processing Conflict: python-devel conflicts python < 2.5.1-26.fc8.2
--> Finished Dependency Resolution
python-devel-2.5.1-26.fc8.2.i386 from updates-newkey has depsolving problems
--> python-devel conflicts with python
Error: python-devel conflicts with python


[phe@fc8 ~]$ rpm -qa | grep "^python" | sort
python-2.5.1-15.fc8
python-2.5.1-26.fc8.2
python-crypto-2.0.1-9.1
python-exif-1.0.8-1.fc8
python-genshi-0.5-1.fc8
python-imaging-1.1.6-4.fc8
python-iniparse-0.2.3-3.fc8
python-libs-2.5.1-15.fc8
python-libs-2.5.1-26.fc8.2
python-numeric-24.2-6.fc8
python-paste-1.6-1.fc8
python-reportlab-2.1-1.fc8
python-setuptools-0.6c8-1.fc8
python-sexy-0.1.9-3.fc7
python-urlgrabber-3.0.0-9.fc8


What do I need to remove ?

regards,

phe
12th October 2008, 08:11 AM
Hello,

I study the process of building a custom kernel.
I follow the documentation of http://fedoraproject.org/wiki/Docs/CustomKernel

There in point 1.1 "get the source" http://fedoraproject.org/wiki/Docs/CustomKernel#Get_the_Source
is stated : Install build dependencies for the kernel source with the yum-builddep command (root is required to install these packages):

su -c 'yum-builddep kernel-<version>.src.rpm'

Can someone explain me why this is good for ?
I do not understand this.

I have done this an the output was :
[phe@f9 temp]$ su -c "yum-builddep kernel-2.6.26.5-45.fc9.src.rpm"
Password:
Loaded plugins: refresh-packagekit
module-init-tools-3.4-13.fc9.i386
patch-2.5.4-35.fc9.i386
bash-3.2-22.fc9.i386
coreutils-6.10-30.fc9.i386
2:tar-1.19-4.fc9.i386
bzip2-1.0.5-2.fc9.i386
1:findutils-4.2.33-3.fc9.i386
gzip-1.3.12-6.fc9.i386
m4-1.4.10-3.fc9.i386
4:perl-5.10.0-34.fc9.i386
1:make-3.81-12.fc9.i386
diffutils-2.8.1-21.fc9.i386
gawk-3.1.5-17.fc9.i386
gcc-4.3.0-8.i386
binutils-2.18.50.0.6-5.fc9.i386
redhat-rpm-config-9.0.2-1.fc9.noarch
rpm-build-4.4.2.3-2.fc9.i386
No uninstalled build requires
[phe@f9 temp]$

Thanks,

leigh123linux
12th October 2008, 09:14 AM
Threads merged , Please keep you kernel building posts limited to one thread only .

phe
12th October 2008, 11:43 AM
Threads merged , Please keep you kernel building posts limited to one thread only .

OK. Sorry,

phe
15th October 2008, 10:30 AM
Has nobody this done before ?

Building a "minimal" kernel ?