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 - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-27-2012, 04:30 AM   #1
rasidrasid
Member
 
Registered: Jan 2012
Posts: 101

Rep: Reputation: Disabled
kernel-config file and new build


Hello,

I want to rebuild my kernel and change it a little bit. Which config option I have to compile in addition to get chroot and kexec access? Is there anyone who can give me a link to a pdf-book or howto for all config-options? Where can I find suitable kernel-config files?
I have now the kernel 2.4 and want to upgrade to 2.6.

Kind regards
Rasid
 
Old 06-27-2012, 05:57 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
AFAIK there is no such book or how-to.

As 2.4 to 2.6 is a big jump, it is very possible that you would need to upgrade other components of your system as well.

As for config files, the general recommendation is to take as a basis one of the config files shipped with your distribution then run "make odconfig", but I wouldn't do that to jump from 2.4 to 2.6.

And if you have a distribution old enough to include a 2.4 kernel, it would probably be simpler to upgrade the distribution itself if at all possible, or install a newer one.

Telling us which are your distribution and version could help us to give you a more precise advise.

Last edited by Didier Spaier; 06-27-2012 at 05:59 AM.
 
Old 06-27-2012, 06:13 AM   #3
rasidrasid
Member
 
Registered: Jan 2012
Posts: 101

Original Poster
Rep: Reputation: Disabled
Hello Didier Spaier,

Thank you. It’s an old thin client and I want to flash the rom. I have a howto to do that but not for compiling. I would prefer to do it in ubuntu. I can’t upgrade like normal distros.

regards
 
Old 06-27-2012, 07:59 AM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Then I will give you some hints (I suppose that you are going to compile on Ubuntu).

I would first gather as much information as possible on the thin client with following commands.

First plug in to the thin client all removable devices you will want to use in order to have the modules for it loaded.
You can safely remove a device to plug in another as all modules will stay loaded.
Code:
uname -a # Will get you information about the machine's architecture, the processor type and the hardware platform, among others
lsmod # you will certainly need these drivers, preferably configured as modules
lspci -k #idem
usb-devices # probably will confirm the information gathered with "lsmod"
Before going further, please send exact output of 'uname -a' run:
- in your Ubuntu
- in the thin client

With that information it will be possible go give you more precise advise, among which the necessity or not to make a cross compilation.

kexec is easy to include in the kernel; chroot is a program provided nowadays by coreutils, not part of the kernel.

Last edited by Didier Spaier; 06-27-2012 at 08:43 AM.
 
Old 06-27-2012, 08:51 AM   #5
rasidrasid
Member
 
Registered: Jan 2012
Posts: 101

Original Poster
Rep: Reputation: Disabled
Thank you Didier Spaier.

At home I will send you the information’s.

When I understand you right, I have to install only coreutils to let work chroot…..that would be nice.
Which CONFIG in the kernel-config I have to flag for kexec, you said it would be easy.

CU :-)
 
Old 06-27-2012, 03:22 PM   #6
rasidrasid
Member
 
Registered: Jan 2012
Posts: 101

Original Poster
Rep: Reputation: Disabled
Hello Didier Spaier,

These are the uname –a results:
For the thinclient:
Code:
uname -a
Linux box 2.4.31-wyse #24 Fri Nov 18 23:02:28 CET 2005 i586 GNU/Linux
For my ubuntu:
Code:
uname -a
Linux linux3 2.6.24-28-generic #1 SMP Thu May 27 00:16:49 UTC 2010 i586 GNU/Linux


I installed coreutils but I got this message:
Code:
chroot /Debian/ /bin/bash
FATAL: kernel too old

Regards
Rasid
 
Old 06-27-2012, 04:35 PM   #7
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
For your "kernel too old" problem, see this thread. So yes, you should try to use a 2.6 kernel.

Whilst running "make xconfig" (or make menuconfig), look for kexec system call under "processor type and features"; check it to have this feature buit-in.

To easily find a feature you can type "Ctl+F" in "make xconfig" (or "/" without the quotes in "make menuconfig") then type its name in the search field (e.g. kexec).

This way you can as well select the device drivers needed for your hardware and deselect the drivers you don't need, according to your knowledge of your hardware and the results of the commands I mentioned in my last post.

But beware that to upgrade from 2.4 to 2.6 you probably will need to upgrade some other components of your system.

I have never done that thus can't give you more guidance, however searching in Google gave me some results. You could have a look at this one for instance.

Last edited by Didier Spaier; 06-27-2012 at 05:21 PM.
 
Old 06-28-2012, 03:29 AM   #8
rasidrasid
Member
 
Registered: Jan 2012
Posts: 101

Original Poster
Rep: Reputation: Disabled
Hello Didier Spaier.

First of all thank you. I will check out the guidance’s. Could it be helpful to take the kernel-config of the 2.4 as reference and guidance? I want to do that so and select even more or less according to my hardware and needs. This is very exciting ;-)

I will write you possibly for more help by the work.

Thank you in advance.
Rasid
 
Old 06-28-2012, 03:37 AM   #9
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Hello Rasid

Quote:
Originally Posted by rasidrasid View Post
Could it be helpful to take the kernel-config of the 2.4 as reference and guidance?
Yes, renamed as .config in the kernel source top directory. And I would use the same kernel version so that "make oldconfig" don't ask me too many questions

Best regards,
 
Old 07-12-2012, 03:45 AM   #10
rasidrasid
Member
 
Registered: Jan 2012
Posts: 101

Original Poster
Rep: Reputation: Disabled
Hello Didier Spaier,

back to my compiling. I did it, but got this message, any idea:

Code:
CC fs/sysfs/group.o
LD fs/sysfs/built-in.o
LD fs/built-in.o
LD ipc/built-in.o
CC security/commoncap.o
LD security/built-in.o
CC crypto/api.o
CC crypto/cipher.o
CC crypto/digest.o
CC crypto/compress.o
CC crypto/algapi.o
CC crypto/scatterwalk.o
CC crypto/proc.o
LD crypto/crypto_algapi.o
CC crypto/blkcipher.o
CC crypto/cryptomgr.o
CC crypto/sha1_generic.o
CC crypto/sha256_generic.o
CC crypto/ecb.o
CC crypto/arc4.o
LD crypto/built-in.o
CC block/elevator.o
CC block/ll_rw_blk.o
block/ll_rw_blk.c: In Funktion »ll_back_merge_fn«:
block/ll_rw_blk.c:1452: interner Compiler-Fehler: Segmentation fault
Bitte senden Sie einen vollständigen Fehlerbericht auf Englisch ein;
bearbeiten Sie die Quellen zunächst mit einem Präprozessor, wenn es
dienlich ist.
Fehler in der deutschen Ăbersetzung sind an 
translation-team-de@lists.sourceforge.net zu melden.

Gehen Sie gemäà den Hinweisen in <URL:http://gcc.gnu.org/bugs.html> vor.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.2/README.Bugs>.
make[1]: *** [block/ll_rw_blk.o] Fehler 1
make: *** [block] Fehler 2
Thank you.
 
Old 07-12-2012, 04:21 AM   #11
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Maybe there is a misfit between the gcc version you are using and the kernel version.

Maybe reuse the .config of a 2.4 kernel to configure a 2.6 one could be a cause of that.

Is there any way you can upgrade the whole OS on the thin client?
 
Old 07-12-2012, 06:33 AM   #12
rasidrasid
Member
 
Registered: Jan 2012
Posts: 101

Original Poster
Rep: Reputation: Disabled
This was made on an ubutu machine. There is ubuntu 8.04 on it and the kernel I tried was exact the original kernel-source of 8.04 (2.6.24).

For the thin client I can’t upgrade the os, because the next upgrade needs a kernel-2.6 and the kernel in the firmware is 2.4, which I can’t flash.

I tried to compile a new kernel on another pc, because I never did before. If I succeed, I will try the same steps for the client.

Should I change the gcc compiler and if yes where?

Thank you.
 
Old 07-12-2012, 05:16 PM   #13
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Quote:
Originally Posted by rasidrasid View Post
This was made on an ubutu machine. There is ubuntu 8.04 on it and the kernel I tried was exact the original kernel-source of 8.04 (2.6.24).
Then my idea of re-using the config file for the 2.4 kernel to compile a 2.6 one was probably bad...

Quote:
Originally Posted by rasidrasid View Post
For the thin client I can’t upgrade the os, because the next upgrade needs a kernel-2.6 and the kernel in the firmware is 2.4, which I can’t flash.
But I thought you wanted to upgrade the kernel of the thin client to 2.6? Maybe I didn't understand what you wanted to do from the beginning

Quote:
Should I change the gcc compiler and if yes where?
No, as the same gcc version (on your Ubuntu machine) was successfully used already to compile the distribution's kernel.
 
Old 07-13-2012, 03:39 AM   #14
rasidrasid
Member
 
Registered: Jan 2012
Posts: 101

Original Poster
Rep: Reputation: Disabled
Hello Didier Spaier.
Maybe I explained it not correct. This thin client doesn’t have a bios in the literal sense. There is a WindowsCE firmware who will be flashed with a kernel and an initrd. Only the Windows part will be flashed. After flashing you don’t have any chance to upgrade it without re-flashing at all. This means, that you have to work with this kernel and initrd. This wouldn’t be a matter, if the kernel isn’t so old. It is 2.4.31.
Then you prepare an usb-stick with a root directory of the installed linux. Everything under / . But this is Debian woody…really really old thing. So I thought, I can flash the client with a newer kernel and a newer distribution, but not the newest. I prefer ubuntu and I thought I take ubuntu8.04-server, because this is not very very new but it’s a LTS-version and you can even do everything with it. I have a pc with ubuntu8.04 and I thought I compile the kernel at first there and learn, because I did this never before. Therefore this approach.
After all, when it done without mistakes, I will install ubuntu8.04-server on a stick and compile a new kernel and initrd with all the demands for the thin client step by step I learned before. Therefore I can certainly use the kernel-config file of the 2.4.31 and look for needed hardware demands. After all I will create a firmware with this kernel and initrd, the usb-stick with the root folder is present, so maybe it works and I get ubuntu on it
 
  


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
How to change config settings and build Kernel with bitbake? leiphasw Linux - Software 1 01-20-2011 03:51 AM
Finding config options for modues found by lsmod to build custom kernel jiobo Linux - Kernel 0 01-02-2009 12:08 AM
Kernel Build config file Igor007 Programming 1 08-14-2005 02:39 PM
RH9 - did 2.6.x kernel build and probs with .config stardotstar Red Hat 5 09-15-2004 06:21 PM
Config File in build directory dwessell Mandriva 1 05-08-2004 07:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:12 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