Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 34215 - Suggestions related to keeping the kernel sizes within specified limits
Summary: Suggestions related to keeping the kernel sizes within specified limits
Status: RESOLVED FIXED
Alias: None
Product: [OLD] Docs-user
Classification: Unclassified
Component: Gentoo Linux Sparc Installation Guide (show other bugs)
Hardware: Sparc Linux
: High enhancement (vote)
Assignee: Sven Vermeulen (RETIRED)
URL: http://www.gentoo.org/doc/en/gentoo-s...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-23 13:44 UTC by Chris Baker
Modified: 2003-11-25 18:42 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Tail end of errors likely resulting from "make image" (make_image_err,4.21 KB, text/plain)
2003-11-24 22:32 UTC, Chris Baker
Details
Patch to gentoo-sparc-install.xml (gentoo-sparc-install.diff-34215,1.22 KB, patch)
2003-11-25 10:06 UTC, Sven Vermeulen (RETIRED)
Details | Diff
Patch to hb-install-kernel.xml (hb-install-kernel.diff-34215,787 bytes, patch)
2003-11-25 10:07 UTC, Sven Vermeulen (RETIRED)
Details | Diff
Patch to gentoo-sparc-install.xml (gentoo-sparc-install.diff-34215,1.22 KB, patch)
2003-11-25 10:45 UTC, Sven Vermeulen (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Baker 2003-11-23 13:44:20 UTC
Section 19 specifies that the SPARC64 kernel must be smaller than 3.6 MB and 
the SPARC32 must not exceed 2.5 MB.  I have several recommendations for 
additional information:

In code listing 19.5 (Checking vmlinux's size):

# ls -alh vmlinux

will produce "human-readable" size output, assisting users in verifying size 
requirements when it is close to the limit.

The Warning below that directs the user to "...return to "Configuring the 
Linux Kernel" above. Reconfigure and recompile your kernel until it is within 
the specified limits."  However, new users might not be aware that they can 
accomplish this, in part, by building more of the kernel as modules, and I 
think this should be noted.  Also, you might want to re-iterate that some of 
the support *must*, however, be built-in, as is previously-stated in the 
section.

Finally, there is no mention of performing a:

# strip vmlinux

before verifying its size.  On my Ultra 5, I was, I thought, extremely 
selective in including only features that were necessary and matched up to 
specific hardware in my system (I un-checked *a lot* of stuff that was enabled 
by default), and about making as many of them as modules as possible.  
Nonetheless, I ended up with a kernel that was just shy of the 3.6 MB limit, 
but "strip vmlinux" shrank it to 3.0 MB.  This might be an invaluable tool to 
mention, especially for a noob working on older, slower hardware, where the 
kernel size limit is 2.5 MB and the re-compile time might be measured in hours 
or (*gulp*) days.

Finally, a minor typographical issue.  The heading of Section 19 
is "Installing the kernel *and a System Logger*" but installing a system 
logger is actually covered in Section 20: Installing a System Logger, and ssh.

Reproducible: Always
Steps to Reproduce:
Comment 1 Ciaran McCreesh 2003-11-23 21:15:39 UTC
Unfortunately, 'strip vmlinux' will quite often make your kernel unbootable...
Comment 2 Joshua Kinard gentoo-dev 2003-11-23 21:58:06 UTC
"strip -R .comment -R .note vmlinux" works better and won't smoke your kernel either.  I've done it enough times making cobalt kernels to know this.
Comment 3 Sven Vermeulen (RETIRED) gentoo-dev 2003-11-24 01:28:21 UTC
Can I use that strip command in the guide then? 
Comment 4 Sven Blumenstein (RETIRED) gentoo-dev 2003-11-24 02:07:18 UTC
As a side note, striping is known to be dangerous on sparc32 but quite safe on sparc64.
Comment 5 Jason Wever (RETIRED) gentoo-dev 2003-11-24 03:09:25 UTC
The more recent kernels have a "make image" option which will do all of the safe stripping of the image and leave the output in the file arch/sparc/boot/image or arch/sparc64/boot/image depending on the arch..  Not sure when this started showing up.
Comment 6 Chris Baker 2003-11-24 03:22:54 UTC
FWIW, the Gentoo Handbook uses the "vmlinux-2.4.22" format, so it might not be a bad idea to make that consistent between the two, one way or another.  :)
Comment 7 Sven Vermeulen (RETIRED) gentoo-dev 2003-11-24 05:25:36 UTC
What is "more recent kernels"?
Comment 8 Jason Wever (RETIRED) gentoo-dev 2003-11-24 11:52:25 UTC
At least the 2.4.21 and 2.4.22 kernels.  I'd have to ask to find out how far back it goes.  This should be fine for sparc as both sparc-sources and vanilla-sources have >=2.4.21 marked as stable.

As a side note, make image is make vmlinux + safe stripping of vmlinux.
Comment 9 Chris Baker 2003-11-24 22:32:13 UTC
Created attachment 21243 [details]
Tail end of errors likely resulting from "make image"

Sorry I don't have more of a backbuffer for you--let me know if you want me to 

try anything further.  I think that "make image" failed on my machine, but I 
don't have much experience with make, so let me know what your impression is.  

The command I issued was "make dep && make clean image modules 
modules_install" so I can't be certain what phase of that was executing at the 

time of the error, but I think the results are indicating "make image" was the 

culprit.

If you need further info/testing, just let me know.  Thanks for all the hard 
work.
Comment 10 Chris Baker 2003-11-24 23:19:42 UTC
BTW, this compiled completely using the same config file and "make dep && make 
clean vmlinux modules modules_install"
Comment 11 Sven Vermeulen (RETIRED) gentoo-dev 2003-11-25 10:06:59 UTC
Created attachment 21269 [details, diff]
Patch to gentoo-sparc-install.xml
Comment 12 Sven Vermeulen (RETIRED) gentoo-dev 2003-11-25 10:07:24 UTC
Created attachment 21270 [details, diff]
Patch to hb-install-kernel.xml
Comment 13 Sven Vermeulen (RETIRED) gentoo-dev 2003-11-25 10:08:07 UTC
Okay, these two patches add information regarding this issue to the sparc-install and handbook. However, before getting this in them, I need the consent of a sparc devel on this.
Comment 14 Ciaran McCreesh 2003-11-25 10:24:16 UTC
Looks good to me. For the non-handbook patch, I believe s/therefor/therefore/ (without the e is a legalese word) is correct. For the handbook, is 'Mb' consistent with the rest of the handbook? I'd be inclined to go for 'MBytes' for clarity.
Comment 15 Sven Vermeulen (RETIRED) gentoo-dev 2003-11-25 10:44:15 UTC
There isn't a real consistency yet, perhaps I'll update the guide when I know which way is the best (MByte, Mbyte, Mb, MB, Megabyte, megabyte, mebibytes, MiB, Mib, ...).
Comment 16 Sven Vermeulen (RETIRED) gentoo-dev 2003-11-25 10:45:04 UTC
Created attachment 21273 [details, diff]
Patch to gentoo-sparc-install.xml
Comment 17 Sven Vermeulen (RETIRED) gentoo-dev 2003-11-25 10:54:30 UTC
Okay, committed.
Comment 18 Joe Kallar (RETIRED) gentoo-dev 2003-11-25 18:42:11 UTC
I've always understood and seen:
MB = megabytes = Mbytes
Mb = megabits

As far as kernel config and *must* be built-in, it's really up to the user. However it's probably conservative for anything marked "Required for Gentoo linux" to be compiled into the kernel and not as modules.