LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-22-2003, 11:06 AM   #1
tecknojunky
LQ Newbie
 
Registered: Mar 2002
Location: Montreal
Posts: 7

Rep: Reputation: 0
bzImage is too small


Sound funny hey?

I'm trying to build a kernel from a chrooted uClibc's root_fs. Altough it does compile all the way, the bzImage end up being a tiny 18k, which I know is and impossible size.

I knew uClibc is good for producing small binaries, but this is too good. Isn't the kernel supposed to be self contained (not relying on external libraries)?. Of course, the kernel does not boot (magic number error).

My goal is to build a booting floppy that will establish a network link, configure the hard drives and download and install a minimalistic system from the web.

I got kind of there using preconpiled binaries from different places, I now wish to consolidate all this by bootstraping my system to recompile itself, but I can't get the compiled kernel to boot.

I guess my questions are:

- Is the root_fs from uClibc adequat for compiling a 2.4.20 kernel?.
- I'm I forgetting something?
- Does kernel comiling needs thing not on the root_fs?
- Any alternative i could try?

Thanks.
 
Old 05-03-2003, 08:35 AM   #2
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
Re: bzImage is too small

Quote:
Originally posted by tecknojunky
Sound funny hey?

I'm trying to build a kernel from a chrooted uClibc's root_fs. Altough it does compile all the way, the bzImage end up being a tiny 18k, which I know is and impossible size.

I knew uClibc is good for producing small binaries, but this is too good. Isn't the kernel supposed to be self contained (not relying on external libraries)?. Of course, the kernel does not boot (magic number error).

My goal is to build a booting floppy that will establish a network link, configure the hard drives and download and install a minimalistic system from the web.

I got kind of there using preconpiled binaries from different places, I now wish to consolidate all this by bootstraping my system to recompile itself, but I can't get the compiled kernel to boot.

I guess my questions are:

- Is the root_fs from uClibc adequat for compiling a 2.4.20 kernel?.
- I'm I forgetting something?
- Does kernel comiling needs thing not on the root_fs?
- Any alternative i could try?

Thanks.
first thing first uClibc is a C library for developing embedded Linux systems. Many functions in glibc contain functionality which is not wanted in embedded systems.So uClibc is targetted for embedded systems with limited functionability.
In other cases, uClibc leaves certain features (such as full C99 Math library support, IPV6, and RPC support) disabled by default.Glibc is a general purpose C library, and so as policy things are optimized for speed. Most of uClibc's routines have been very carefully written to optimize them for size instead.
The end result is a C library that will compile just about everything(doesnot mean that it will run it) you throw at it, that looks like glibc to application programs when you compile, but is many times smaller.
Quote:
There is an unwholesomely huge amount of code out there
that depends on the presence of GNU libc header files.
We have GNU libc header files. So we have committed a
horrible sin in uClibc. We _lie_ and claim to be GNU
libc in order to force these applications to work as their
developers intended. This is IMHO, pardonable, since
these defines are not really intended to check for the
presence of a particular library, but rather are used to
define an _interface_. Some programs are especially
chummy with glibc, and may need this behavior disabled
by adding CFLAGS+=-D__FORCE_NOGLIBC
--Erik Andersen
Incidentally why are you using uClibc in your system
(it is not adequate as it lacks many features- i talked about some above -remove the things that uClibc doesnot support and you may get a working kernel -but so few features that you may not wish to run in your pc)
Well you could stick with glibc -it is big -but it works magnificantly
keep posted
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bzImage!!! BattleAxe_19 Linux - General 2 12-22-2003 09:57 AM
Openldap with small directory very small iholdap Linux - Networking 5 10-04-2003 08:09 AM
3 small problems in 1 small post vzzt! Linux - Software 10 02-27-2003 07:40 PM
bzImage.. help unmada Linux - Software 2 06-13-2002 11:59 PM
bzimage jnsc Linux From Scratch 13 04-16-2002 02:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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