Discussion:
[lfs-support] Culling the kernel and broken links. LFS-8.3-rc2
rhubarbpieguy
2018-08-29 21:51:35 UTC
Permalink
I've just built LFS-8.3-rc2 and would like to cull unnecessary items
from my kernel.  I tried 'make defconfig' as described in 8.3.
Linux-4.18.1.  Unfortunately, that made my kernel larger, not smaller. 
Ah well ...

Regardless,
http://www.linuxfromscratch.org/blfs/view/8.3-rc2/longindex.html#kernel-config-index
in the documentation returns Page not found! for me. _Contact the
webmaster_. returns the same.
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikip
Bruce Dubbs
2018-08-30 00:18:26 UTC
Permalink
Post by rhubarbpieguy
I've just built LFS-8.3-rc2 and would like to cull unnecessary items
from my kernel.  I tried 'make defconfig' as described in 8.3.
Linux-4.18.1.  Unfortunately, that made my kernel larger, not smaller.
Ah well ...
Regardless,
http://www.linuxfromscratch.org/blfs/view/8.3-rc2/longindex.html#kernel-config-index
in the documentation returns Page not found! for me. _Contact the
webmaster_. returns the same.
There is no -rc2 for blfs. Only lfs. The link will be straightened out
at release. For now, use:

http://www.linuxfromscratch.org/blfs/view/svn/longindex.html#kernel-config-index

-- Bruce
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thin
DJ Lucas
2018-09-06 23:56:11 UTC
Permalink
Post by rhubarbpieguy
I've just built LFS-8.3-rc2 and would like to cull unnecessary items
from my kernel.  I tried 'make defconfig' as described in 8.3.
Linux-4.18.1.  Unfortunately, that made my kernel larger, not
smaller. Ah well ...
Looking for lazy kernel config? For a monolith kernel tailored for the
running machine, boot to a distro (which likely has everything and the
kitchen sink available as a module), plug in everything you will ever
use, use everything to make sure it all works, and run 'make
localyesconfig'. There is also a "localmodconfig" target, which will
make the smallest kernel possible for your hardware, but it would also
likely not be bootable without an initrd (as everything would be
tucked away in modules).
HTH
--DJ
I tested localyesconfig but found no improvement in kernel size.  I
believe I followed your instructions correctly.
my LFS kernel - 5,828,560 (I build very few modules so it it should be
an accurate comparison > defconfig kernel - 8,314,92> localyesconfig kernel - 7,644,112
The defconfig note make sense in the LFS documentation.  But I was
surprised it doesn't seem to recognize the file system.  I use JFS, but
my box wouldn't boot initially until I examined the .config to find File
Systems  --->/< > JFS filesystem support wasn't selected.  Perhaps I did
something wrong, but it seems defconfig should determine that.  After
changing only the file system in the defconfig-generated .config my box
booted.
The defconfig target doesn't *determine* anything other than the
currently running CPU architecture. It is a default configuration file
that ships with the kernel. The exact file used is determined in a way
similar to this (I don't have kernel source in front of me ATM so this
is likely close, but probably not exactly how it's done):
echo "arch/$(uname -m | sed ***@_64@@ | grep x86 || uname
-m)/configs/$(uname -m)_defconfig"

The localyesconfig target builds everything in that the currently
running kernel knows about, zero modules. If you are trying to shrink
the kernel binary size, but don't care about size of /lib/modules, then
start there and put everything that is not required to get / and /usr
mounted as a module (or the reverse with the localmodconfig target),
then remove anything you have that you don't care if it works.

After that, you can use alternate compression algorithms, kill off most
of the crypto routines, IP Tables stuff, built-in charsets, etc.
Alternately, gradually tweak your existing kernel config using the
output of either of the local{mod,yes}config targets.

--DJ
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

htt
Loading...