Discussion:
armel/marvell kernel size
Roger Shimizu
2018-03-22 11:40:10 UTC
Permalink
Dear Rogério,

Good to hear from you again!
Hi, all (and sorry for jumping in a bit late).
There's an upstream change in cfg80211 that enables direct-loading of
wireless rules, which requires public key crypto in the kernel. There
doesn't appear to be any option to disable that mode, even though we
don't need it because crda still works. Maybe you could disable
wireless networking completely?
- I2C, I2C_CHARDEV, I2C_MV64XXX. initramfs-tools should include I2C
drivers to the initramfs if needed, but I'm not certain.
- MTD, MTD_CMDLINE_PARTS, etc. But I'm pretty sure this will break
some systems unless initramfs-tools is updated to include and load the
cmdlinepart module.
- RTC_DRV_MV (and disable RTC_HCTOSYS). There's a udev rule that
should load the system clock from the first RTC if its driver is a
module.
- SPI_ORION. initramfs-tools should include this in the initramfs if
needed, but I'm not certain.
- AUDIT. This is quite a niche feature.
Also try comparing the complete configs over time and looking for
symbols newly set to y.
Did you had a chance to look at Ben's suggestions or ideas?
If nobody is working on getting a new kernel working on armel, I would
like to (at least, unsuccessfully) try to get it to compile.
At worst, I believe, I can gain some knowledge and compare what I get from
this armel kernel with a Kurobox HD (powerpc-based; see some notes at [0])...
[0]: http://cynic.cc/blog/posts/simple-annotations-on-compiling-a-linux-kernel-for-an-embedded-platform/
I have a wiki entry to help you:
- https://wiki.debian.org/HowToCrossBuildAnOfficialDebianKernelPackage

However, Kurobox HD is not armel, so you need to use Kurobox Pro, if
you still have it.

Cheers,
--
Roger Shimizu, GMT +9 Tokyo
PGP/GPG: 4096R/6C6ACD6417B3ACB1
Rogério Brito
2018-03-22 17:55:50 UTC
Permalink
Dear Roger and other people!
Post by Roger Shimizu
Good to hear from you again!
Thank you very much. Glad to hear from you again, keeping the armel flame lit!

First of all, it seems weird that my previous message didn't get to
the lists. I find this very strange, but who knows? I'm now sending it
through gmail instead of via my usual relay. I hope that this gets
through.
Post by Roger Shimizu
There's an upstream change in cfg80211 that enables direct-loading of
wireless rules, which requires public key crypto in the kernel. There
doesn't appear to be any option to disable that mode, even though we
don't need it because crda still works. Maybe you could disable
wireless networking completely?
- I2C, I2C_CHARDEV, I2C_MV64XXX. initramfs-tools should include I2C
drivers to the initramfs if needed, but I'm not certain.
- MTD, MTD_CMDLINE_PARTS, etc. But I'm pretty sure this will break
some systems unless initramfs-tools is updated to include and load the
cmdlinepart module.
- RTC_DRV_MV (and disable RTC_HCTOSYS). There's a udev rule that
should load the system clock from the first RTC if its driver is a
module.
- SPI_ORION. initramfs-tools should include this in the initramfs if
needed, but I'm not certain.
- AUDIT. This is quite a niche feature.
Also try comparing the complete configs over time and looking for
symbols newly set to y.
Did you had a chance to look at Ben's suggestions or ideas?
If nobody is working on getting a new kernel working on armel, I would
like to (at least, unsuccessfully) try to get it to compile.
At worst, I believe, I can gain some knowledge and compare what I get from
this armel kernel with a Kurobox HD (powerpc-based; see some notes at [0])...
[0]: http://cynic.cc/blog/posts/simple-annotations-on-compiling-a-linux-kernel-for-an-embedded-platform/
- https://wiki.debian.org/HowToCrossBuildAnOfficialDebianKernelPackage
Thank you very much for the link. It will be highly useful for experimenting.
Post by Roger Shimizu
However, Kurobox HD is not armel, so you need to use Kurobox Pro, if
you still have it.
Oh, sure. I do have the Kurobox Pro and that's the one which I am
planning to keep alive as much as I can (well, not that I don't plan
on keeping the other ones not alive... It's just that I am quite short
on time and that I plan on keeping the Kurobox Pro churning as it is
the one that is already well set up and so on).

The notes that I presented on the link above are explicitly for
powerpc (BTW, it seems like my ikiwiki setup is foo-barred and ate a
large part of what I wrote in that article).

As I said before, I hope to have some time before Easter to work on
getting the kernel smaller and back being produced.

Oh, just to reiterate a part from my previous email (the one that
Post by Roger Shimizu
3 - Besides the points listed above, what else can usually be disabled, if they don't pertain/make sense in a system like a small armel box?
If anybody could comment on that, it would be very good to know, so as
to have some slack to prevent these problems from happening in the
near future.


Thanks,

Rogério Brito.
--
Rogério Brito : rbrito@{ime.usp.br,gmail.com} : GPG key 4096R/BCFCAAAA
http://cynic.cc/blog/ : github.com/rbrito : profiles.google.com/rbrito
DebianQA: http://qa.debian.org/developer.php?login=rbrito%40ime.usp.br
Ben Hutchings
2018-03-22 23:05:53 UTC
Permalink
On Thu, 2018-03-22 at 00:12 -0300, Rogério Brito wrote:
[...]
If nobody is working on getting a new kernel working on armel, I would
like to (at least, unsuccessfully) try to get it to compile.
At worst, I believe, I can gain some knowledge and compare what I get from
this armel kernel with a Kurobox HD (powerpc-based; see some notes at [0])...
[0]: http://cynic.cc/blog/posts/simple-annotations-on-compiling-a-linux-kernel-for-an-embedded-platform/
1 - To get up to speed, is there any recommended way of cross-compiling
the kernels, before I try it on bare-metal? When I compiled my own
kernels, I used to use a cross-compiler that I compiled myself and it
was using a very non-methodological way...
Cross-compiling works well. For the Debian package, use:

dpkg-buildpackage -aarmel -Pcross,pkg.linux.notools

If you want to work with the upstream source, use:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-

[...]
3 - Besides the points listed above, what else can usually be disabled,
if they don't pertain/make sense in a system like a small armel box?
If I knew that I'd have already done it (or suggested it).
4 - What is the preferred tree to be used for Debian's kernel
development? I am used to compile kernels from Linus's git tree with no
patches, but I know that Debian carries a sizable amount of patches...
Clone the kernel team's git repository and use whatever upstream
version we are using.
I may have some free time after Easter to have some trial and errors, but it
may even be the case that some free time becomes available before that...
We would like to ideally upload a 4.15.x based version to unstable
(currently imported 4.15.4).
I now see that there were some 4.16rc's uploaded to the archive... I guess
that this is tied with my 4th point above, right?
You can work on either the sid branch (currently 4.15.y) or master
(4.16-rcN, for experimental). But in a few weeks 4.16 will be ready
for unstable and it will probably result in further code growth, so you
might as well work on master.

Ben.
Hope to have some luck with my 1st armel adventures,
Rogério Brito.
--
Ben Hutchings
This sentence contradicts itself - no actually it doesn't.
Ben Hutchings
2018-03-24 01:50:48 UTC
Permalink
On Fri, 2018-03-23 at 18:15 -0300, Rogério Brito wrote:
[...]
HOLY MOLY! THIS THING IS SLOW on my Core 2 Duo notebook... Granted, I only
have 4 GB of RAM, but the amount of modules that it compiles is
HUGE... Quite different from a "regular" kernel that I used to compile...
Don't you have access to something faster you can work on?

You should be able to save time and disk space by disabling debug info,
as that won't make any difference to the eventual kernel size. You can
do that by adding "debug-info: false" to the [build] section in
debian/config/armel/defines. ccache can also be useful, though it
doesn't help if you change a config symbol that affects some widely
used header file.
I will see if all the modules make sense for an embedded system like this
and I will send a list of options for opinions by others...
[...]

As I see it, the point of installing Debian on little NAS boxes is to
break out of the restrictions of an embedded system. We try to
provide, so far as possible, the same features across all
architectures.

Ben.
--
Ben Hutchings
Man invented language to satisfy his deep need to complain.
- Lily Tomlin
Rogério Brito
2018-03-27 05:30:56 UTC
Permalink
Hi Ben and others.
Post by Ben Hutchings
[...]
HOLY MOLY! THIS THING IS SLOW on my Core 2 Duo notebook... Granted, I only
have 4 GB of RAM, but the amount of modules that it compiles is
HUGE... Quite different from a "regular" kernel that I used to compile...
Don't you have access to something faster you can work on?
Unfortunately, not at this moment. My desktop (a Phenon II X4) was
fried during a power outage. :-(
Post by Ben Hutchings
You should be able to save time and disk space by disabling debug info,
as that won't make any difference to the eventual kernel size. You can
do that by adding "debug-info: false" to the [build] section in
debian/config/armel/defines.
I did that and it seems to help a bit.
Post by Ben Hutchings
ccache can also be useful, though it doesn't help if you change a config symbol that affects some widely
used header file.
Yes, I was already using ccache and I find it invaluable.
Post by Ben Hutchings
I will see if all the modules make sense for an embedded system like this
and I will send a list of options for opinions by others...
[...]
As I see it, the point of installing Debian on little NAS boxes is to
break out of the restrictions of an embedded system. We try to
provide, so far as possible, the same features across all
architectures.
It sure makes sense to provide a lot more than some kernels, but I am
curious about some features that end up as modules like some
framebuffer like the following:

(...)
# CONFIG_FB_MATROX is not set
# CONFIG_FB_RADEON is not set
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_ATY is not set
CONFIG_FB_S3=m
CONFIG_FB_S3_DDC=y
# CONFIG_FB_SAVAGE is not set
# CONFIG_FB_SIS is not set
# CONFIG_FB_NEOMAGIC is not set
# CONFIG_FB_KYRO is not set
CONFIG_FB_3DFX=m
# CONFIG_FB_3DFX_ACCEL is not set
CONFIG_FB_3DFX_I2C=y
# CONFIG_FB_VOODOO1 is not set
(...)

Is there any reason why, say, a driver for an S3 card is enabled while
not for a Matrox? Are there real users for those? I know that, as
modules, they don't make the kernel bigger, but they sit there on
disk, doing nothing (right?).

Similarly for wifi cards like those Intel ones like iwlwifi (which is
the one that I have in this Core 2 Duo here)...

OK, now to the real meat of my message. Regarding shrinking the
kernel image, I was able to tweak things slightly (drop from 101% down
to 98%) by disabling APPARMOR, YAMA, AUDIT, making the kernel use the
deadline IO scheduler instead of the CFQ and making as modules the
ones that you suggested in the original message... Is that acceptable?
If so, then I will test them on my Kurobox Pro and report what works
and what breaks. I just wanted to get things smaller by tackling some
lower hanging fruit...

Another point: from what I saw in the Debian scripts, not all
armel/marvell systems are limited to 2MB (in particular, the Kurobox
Pro with which I am most concerned still has 630KB of room)... In the
very worst case (of course, this is not what we want), if the kernel
actually gets much bigger in time for the buster release, we could
selectively drop some systems (like what was done with the DNS323)
instead of dropping an entire arch... I even think that a new,
smaller, alternative flavor of the kernel is possible to provide to
support those systems that are limited to 2MB of kernel image... (I
can commit to support that, if my initial ideas work and people accept
them).

Of course, if we could make some real magic and make our kernels much,
much smaller to support back the DNS323, that would be amazing... :-)

I guess that I will look into those LTO patches in the future...

OK, I am sending this to see if those ideas make sense, to offer my
help and, of course, to get some feedback.


Thanks,
--
Rogério Brito : rbrito@{ime.usp.br,gmail.com} : GPG key 4096R/BCFCAAAA
http://cynic.cc/blog/ : github.com/rbrito : profiles.google.com/rbrito
DebianQA: http://qa.debian.org/developer.php?login=rbrito%40ime.usp.br
Stefan Monnier
2018-03-27 12:34:49 UTC
Permalink
Post by Rogério Brito
Similarly for wifi cards like those Intel ones like iwlwifi (which is
the one that I have in this Core 2 Duo here)...
I can answer this part: yes, you can definitely put an Intel wifi card
in the mini-pcie slot of an ARM box.


Stefan
Rogério Brito
2018-03-27 20:04:25 UTC
Permalink
Hi,Stefan.
Post by Stefan Monnier
Post by Rogério Brito
Similarly for wifi cards like those Intel ones like iwlwifi (which is
the one that I have in this Core 2 Duo here)...
I can answer this part: yes, you can definitely put an Intel wifi card
in the mini-pcie slot of an ARM box.
Yes, thanks for that hint (which Ben also replied to)...

This means that, in principle, we should enable many modules more to get
as full support as desired in Debian on each and every arch...

OTOH, if nobody has asked for that before, maybe there's nobody missing
such support (or they are compiling their own kernels).

As a related subject, I could compile a more stripped down version of
the armel kernel, put it for people to download and ask people to
comment if it works for them, so that we can gauge what people actually
need from such a kernel...


Thanks for your input,

Rogério.
--
Rogério Brito : rbrito@{ime.usp.br,gmail.com} : GPG key 4096R/BCFCAAAA
http://cynic.cc/blog/ : github.com/rbrito : profiles.google.com/rbrito
DebianQA: http://qa.debian.org/developer.php?login=rbrito%40ime.usp.br
Rick Thomas
2018-03-27 20:29:54 UTC
Permalink
Post by Rogério Brito
As a related subject, I could compile a more stripped down version of
the armel kernel, put it for people to download and ask people to
comment if it works for them, so that we can gauge what people actually
need from such a kernel...
Please do! I have an OpenRD box and a SheevaPlug that I’ll be happy to test on.

Thanks for keeping these old boxes alive!
Rick
Rogério Brito
2018-03-27 21:08:24 UTC
Permalink
Post by Rick Thomas
Post by Rogério Brito
As a related subject, I could compile a more stripped down version of
the armel kernel, put it for people to download and ask people to
comment if it works for them, so that we can gauge what people actually
need from such a kernel...
Please do! I have an OpenRD box and a SheevaPlug that I’ll be happy to test on.
You're welcome. I don't know much about the OpenRD nor about the
SheevaPlug, but are they able to run the -marvell kernels? What was the
last version of the kernel that worked for you?

What filesystems do you use? Do you use any (para)virtualization? What
about addon hardware that you have? Any USB dongles? Anything that you
can think of? Sound?

Do you use NFS? (I do) What kind of compressed ramdisk do you use? The
loaded modules that you have with lsmod would be nice to know.
Post by Rick Thomas
Thanks for keeping these old boxes alive!
There's no guarantee, but I may try. Very low probability, but not zero
probability...


Regards,
--
Rogério Brito : rbrito@{ime.usp.br,gmail.com} : GPG key 4096R/BCFCAAAA
http://cynic.cc/blog/ : github.com/rbrito : profiles.google.com/rbrito
DebianQA: http://qa.debian.org/developer.php?login=rbrito%40ime.usp.br
Rick Thomas
2018-03-28 09:22:35 UTC
Permalink
Post by Rogério Brito
Post by Rick Thomas
Post by Rogério Brito
As a related subject, I could compile a more stripped down version of
the armel kernel, put it for people to download and ask people to
comment if it works for them, so that we can gauge what people actually
need from such a kernel...
Please do! I have an OpenRD box and a SheevaPlug that I’ll be happy to test on.
You're welcome. I don't know much about the OpenRD nor about the
SheevaPlug, but are they able to run the -marvell kernels? What was the
last version of the kernel that worked for you?
What filesystems do you use? Do you use any (para)virtualization? What
about addon hardware that you have? Any USB dongles? Anything that you
can think of? Sound?
Do you use NFS? (I do) What kind of compressed ramdisk do you use? The
loaded modules that you have with lsmod would be nice to know.
A lot of questions… I’ll do my best to answer them as best I can sometime this weekend (There are an equally large lot of things on my to-do list this week! /-: )

In the mean time here’s a start:

OpenRD Client
Post by Rogério Brito
Linux client 4.9.0-6-marvell #1 Debian 4.9.82-1+deb9u3 (2018-03-02) armv5tel GNU/Linux
SheevaPlug
Post by Rogério Brito
Linux sheeva 4.9.0-6-marvell #1 Debian 4.9.82-1+deb9u3 (2018-03-02) armv5tel GNU/Linux
Both are running the latest Stretch.

Rick
Federico Pietro Briata
2018-03-28 12:22:46 UTC
Permalink
Hello guys,
I believe the problem we are facing on Kirkwood with stretch is the same I
had with iop32 and other folks with ixp4xx.
As the support for iop32 on Wheezy is under EOL, do we have any hopes to
solve the kernel size issue common for all this architectures or it's time
to replace our nas?

best regards
federico
Post by Rick Thomas
Post by Rogério Brito
Post by Rogério Brito
As a related subject, I could compile a more stripped down version of
the armel kernel, put it for people to download and ask people to
comment if it works for them, so that we can gauge what people actually
need from such a kernel...
Please do! I have an OpenRD box and a SheevaPlug that I’ll be happy to
test on.
Post by Rogério Brito
You're welcome. I don't know much about the OpenRD nor about the
SheevaPlug, but are they able to run the -marvell kernels? What was the
last version of the kernel that worked for you?
What filesystems do you use? Do you use any (para)virtualization? What
about addon hardware that you have? Any USB dongles? Anything that you
can think of? Sound?
Do you use NFS? (I do) What kind of compressed ramdisk do you use? The
loaded modules that you have with lsmod would be nice to know.
A lot of questions
 I’ll do my best to answer them as best I can sometime
this weekend (There are an equally large lot of things on my to-do list
this week! /-: )
OpenRD Client
Post by Rogério Brito
Linux client 4.9.0-6-marvell #1 Debian 4.9.82-1+deb9u3 (2018-03-02)
armv5tel GNU/Linux
SheevaPlug
Post by Rogério Brito
Linux sheeva 4.9.0-6-marvell #1 Debian 4.9.82-1+deb9u3 (2018-03-02)
armv5tel GNU/Linux
Both are running the latest Stretch.
Rick
Roger Shimizu
2018-04-01 13:25:40 UTC
Permalink
Dear Ben, and other arm/kernel folks,
There's an upstream change in cfg80211 that enables direct-loading of
wireless rules, which requires public key crypto in the kernel. There
doesn't appear to be any option to disable that mode, even though we
don't need it because crda still works. Maybe you could disable
wireless networking completely?
I finally settled a solution, by introducing a new armel flavour:
mini, which doesn't support wireless.
There're still some users that need wireless, so I didn't remove
wireless from armel/marvell directly.

So here I propose to have:
- marvell to support all generic feature and being able to tuned for
performance.
- mini without wireless and being minimum.

Patches are all enclosed, and pushed to salsa rosh/armel_mini branch.
- 0001: Bring back qnap support by a new armel flavour: mini (Disable
WIRELESS, WLAN, etc)
- 0002: [armel/mini] Add flavour mini to installer
- 0003: [armel/mini] Further change a few features as module (I2C,
I2C_CHARDEV, I2C_MV64XXX,
MTD, MTD_CMDLINE_PARTS, RTC_DRV_MV, and SPI_ORION)

I tested on stretch by cross compiling, here's generated kernel size.
- original 4.16~rc6-1~exp2: 2142704
- After patch 0001: 2017088
- After patch 0002: 2017088
- After patch 0003: 1985896

Here's my testing result regarding those features that changed to module:
(tested under stretch)
- I2C, I2C_CHARDEV, I2C_MV64XXX. initramfs-tools should include I2C
drivers to the initramfs if needed, but I'm not certain.
No, i2c nor i2c_mv64xxx will be loaded. But my armel box seems fine
without them.
Of course, manually "modprobe i2c_mv64xxx" will load the module well.
- MTD, MTD_CMDLINE_PARTS, etc. But I'm pretty sure this will break
some systems unless initramfs-tools is updated to include and load the
cmdlinepart module.
- RTC_DRV_MV (and disable RTC_HCTOSYS). There's a udev rule that
should load the system clock from the first RTC if its driver is a
module.
- SPI_ORION. initramfs-tools should include this in the initramfs if
needed, but I'm not certain.
Yes, above 3 modules are loaded without glitch.
- AUDIT. This is quite a niche feature.
I tried, but couldn't. Maybe next time.

So armel/mini image now reduced 150KB compared to marvell, which now
has enough room for Buster.

Any concern for merging these patches?

Cheers,
--
Roger Shimizu, GMT +9 Tokyo
PGP/GPG: 4096R/6C6ACD6417B3ACB1
Rogério Brito
2018-04-03 05:37:00 UTC
Permalink
Dear Roger, Ben and others.
Post by Roger Shimizu
There's an upstream change in cfg80211 that enables direct-loading of
wireless rules, which requires public key crypto in the kernel. There
doesn't appear to be any option to disable that mode, even though we
don't need it because crda still works. Maybe you could disable
wireless networking completely?
mini, which doesn't support wireless.
There're still some users that need wireless, so I didn't remove
wireless from armel/marvell directly.
I think that we should still strive to pretend that there's a hard 2MB
limit and to shave some parts that can before we start creating a new
flavor of the kernel... This would force us to think harder about
disabling things in general... In general, I think that we can discuss
a little bit more about what to include/exclude from such smaller
kernels and which flavors to have.

In other words, I agree with your end goal, but, perhaps, we can plan
this a bit more...
Post by Roger Shimizu
- marvell to support all generic feature and being able to tuned for
performance.
- mini without wireless and being minimum.
Patches are all enclosed, and pushed to salsa rosh/armel_mini branch.
- 0001: Bring back qnap support by a new armel flavour: mini (Disable
WIRELESS, WLAN, etc)
- 0002: [armel/mini] Add flavour mini to installer
- 0003: [armel/mini] Further change a few features as module (I2C,
I2C_CHARDEV, I2C_MV64XXX,
MTD, MTD_CMDLINE_PARTS, RTC_DRV_MV, and SPI_ORION)
I would make your commits more granular, with one semantic change per
commit, to revert and or/bisect in an easier fashion...
Post by Roger Shimizu
I tested on stretch by cross compiling, here's generated kernel size.
- original 4.16~rc6-1~exp2: 2142704
- After patch 0001: 2017088
- After patch 0002: 2017088
- After patch 0003: 1985896
(tested under stretch)
I'm doing my tests under testing (buster). See more below.
Post by Roger Shimizu
- I2C, I2C_CHARDEV, I2C_MV64XXX. initramfs-tools should include I2C
drivers to the initramfs if needed, but I'm not certain.
No, i2c nor i2c_mv64xxx will be loaded. But my armel box seems fine
without them.
Of course, manually "modprobe i2c_mv64xxx" will load the module well.
While I have compiled a kernel with those options all enabled as
modules, I have not yet had time to boot it (in fact, I created a lot
of kernels that I want to test all in one sitting), but I agree with
the principle of your testing, Roger and, in the worst case, we can
instruct the users to add those to /etc/modules if they absolutely
need them.

I would not qualify this as a change for only a new kernel flavor,
that is, I would make this change in general...
Post by Roger Shimizu
- MTD, MTD_CMDLINE_PARTS, etc. But I'm pretty sure this will break
some systems unless initramfs-tools is updated to include and load the
cmdlinepart module.
- RTC_DRV_MV (and disable RTC_HCTOSYS). There's a udev rule that
should load the system clock from the first RTC if its driver is a
module.
- SPI_ORION. initramfs-tools should include this in the initramfs if
needed, but I'm not certain.
Yes, above 3 modules are loaded without glitch.
All those are generic material that I would also make generic instead
of only particular to a given flavor.
Post by Roger Shimizu
- AUDIT. This is quite a niche feature.
I tried, but couldn't. Maybe next time.
You probably missed this, but I said in a previous message that AUDIT
is automatically selected by AppArmor. In other words, you can have
only the following options:

* with AppArmor (and AUDIT)
* without AppArmor (but with AUDIT)
* without AppArmor and without AUDIT
Post by Roger Shimizu
From my perception, Ben was mildly opposed to having AppArmor disabled
by default and wanted to have the kernel as close as possible to other
arches...

For that reason, I would still keep AppArmor in the big, reference
armel kernel, but opt to create a flavor without AppArmor (and without
AUDIT) for the people that may want to use a small kernel or for those
(like me) that never use AppArmor (or that have not yet seen the light
with the benefits of a MAC module).

Besides your proposed changes, I have some other things in mind that I
have in patches here and that I will send after I get access to the
notebook where I compiled things:

1 - I would change from the CFQ to the DEADLINE governors *in the
general kernel*, as it makes the kernel slightly smaller, but, in my
experience, working as well as a CFQ in practice.
2 - Another excellent option is CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
suggested by Leigh Brown (taken from
https://lists.debian.org/debian-arm/2018/03/msg00035.html). The amount
of reduction in size with my system was surprising (much smaller than
what I expected by changing the governors or when changing some
options from y to m).

Since I mentioned my environment, please, keep in mind that:

* The compiler that I am using for everything here is the one from
testing (buster) and it is GCC 7 at the moment (have not tried using
GCC 8 to see the differences yet)
* I am optimizing things for size (which, in some cases, may be
beneficial for machines with small L1/L2 caches too)

I would change the default from optimizing for size (-Os) to
optimizing for speed (-O2) only after all the low-hanging fruit with
kernel options were decided and, then, I would think hard if it makes
sense to have -O2 with a small kernel or with the full blown kernel.

Another option suggested by Leigh in that message was that

+# CONFIG_CRC32_SLICEBY8 is not set
+CONFIG_CRC32_SLICEBY4=y

can make the kernel smaller and, if I remember the descriptions of the
options, it made sense that those would reduce the size of the kernel
both compressed and uncompressed... This would be something that I
would suggest for a general kernel also...

I am not sure about disabling the VT option as Leight suggested... I
don't think that I have ever used one of those...

I think that we can compile out YAMA from the general kernel, since, I
would believe that it is less frequently used (we can upload a kernel
with this disabled to experimental or to a personal space and ask
people to experiment it) and it is disabled by default in Debian's
kernel...

For a -mini kernel, some of the first things that come to my mind
would be to disable:

* some hardware framebuffers like the S3 and similar ones, even if
build as modules.
* your suggestion of disabling wifi drivers and the wifi subsystem
* disabling some less commonly used local or distributed filesystems
(some of which are large or demand many other options to be enabled)
or that have better functionality in userspace (like the NTFS read
support in the kernel being disabled and recommend ntfs3g to the
users), but keeping popular ones and services like ext2/3/4, XFS, NFS,
Mounting CIFS is probably a good idea, but having OCFS or other
systems, I don't know.
* disabling some partition types for the smaller kernels, after
benchmarking them...
* disabling joystick/video/audio capture etc drivers.
* disabling yama/apparmor/audit.
* disabling unused kernel algorithms or those that aren't pulled in by
any modules (I remember at least one that said: don't enable this one
unless you have an out-of-tree module that needs it).

Oh, I would *not* disable zswap from the smaller kernel, since I would
plan on going not only with zbud but also with z3fold and test the
stability and performance of the kernel with it, as machines that are
memory-starved can benefit from a higher density of compression...

When introducing a new flavor, I guess that we could make the current
flavor, instead of none, being -standard, a new one called -mini
(similar in spirit to yours) and, potentially, another called -micro
to users of DNS323 (if the -mini flavor does not fit in the 1.5MB
after all these changes)...

Furthermore, with the LTO work on the kernel, I am hopeful that
if/when it gets merged, we can make everything even smaller and be
much happier... :-) OK, I'm excited to have very small kernels despite
the kernel in general growing from version to version with more and
more features being integrated...

Please, let me know your opinions.

I will now go to bed, but I will send my patches as soon as I wake up
and deal with morning stuff. In the end, I intend to enable support
for as many things are available in the mainline (even the DNS323, for
which I don't have the hardware, but since we are with our hands
dirty, let us extend the value of those machines for the users of such
hardware...)

Thanks,

Rogério Brito.

P.S.: Only now I saw that one of your patches already implement the
option that Leigh suggested... But I think that we can use more
modular options both in the "main" kernel and in the smaller flavors.

P.P.S.: Sorry if this message is badly composed, if there are
unfinished sentences or if something doesn't make sense, but I just
wanted to make sure that the thoughts that I have here in my head get
discussed with others and not only confined to myself.
--
Rogério Brito : rbrito@{ime.usp.br,gmail.com} : GPG key 4096R/BCFCAAAA
http://cynic.cc/blog/ : github.com/rbrito : profiles.google.com/rbrito
DebianQA: http://qa.debian.org/developer.php?login=rbrito%40ime.usp.br
Roger Shimizu
2018-04-07 14:16:57 UTC
Permalink
Dear Rogério,

I'll reply to you later, in a separate email.


Dear kernel folks,

After all kinda tests recently, together with the patch from Leigh
Brown (CC-ed) that disabled VT, finally the armel/marvell can be
reduced under 2MB again, without introducing a new flavour.
So I already pushed the changes to master and sid branch in salsa.
qnap support will be back in next debian kernel release.

Cheers,
Roger
Post by Rogério Brito
Dear Roger, Ben and others.
Post by Roger Shimizu
There's an upstream change in cfg80211 that enables direct-loading of
wireless rules, which requires public key crypto in the kernel. There
doesn't appear to be any option to disable that mode, even though we
don't need it because crda still works. Maybe you could disable
wireless networking completely?
mini, which doesn't support wireless.
There're still some users that need wireless, so I didn't remove
wireless from armel/marvell directly.
I think that we should still strive to pretend that there's a hard 2MB
limit and to shave some parts that can before we start creating a new
flavor of the kernel... This would force us to think harder about
disabling things in general... In general, I think that we can discuss
a little bit more about what to include/exclude from such smaller
kernels and which flavors to have.
In other words, I agree with your end goal, but, perhaps, we can plan
this a bit more...
Post by Roger Shimizu
- marvell to support all generic feature and being able to tuned for
performance.
- mini without wireless and being minimum.
Patches are all enclosed, and pushed to salsa rosh/armel_mini branch.
- 0001: Bring back qnap support by a new armel flavour: mini (Disable
WIRELESS, WLAN, etc)
- 0002: [armel/mini] Add flavour mini to installer
- 0003: [armel/mini] Further change a few features as module (I2C,
I2C_CHARDEV, I2C_MV64XXX,
MTD, MTD_CMDLINE_PARTS, RTC_DRV_MV, and SPI_ORION)
I would make your commits more granular, with one semantic change per
commit, to revert and or/bisect in an easier fashion...
Post by Roger Shimizu
I tested on stretch by cross compiling, here's generated kernel size.
- original 4.16~rc6-1~exp2: 2142704
- After patch 0001: 2017088
- After patch 0002: 2017088
- After patch 0003: 1985896
(tested under stretch)
I'm doing my tests under testing (buster). See more below.
Post by Roger Shimizu
- I2C, I2C_CHARDEV, I2C_MV64XXX. initramfs-tools should include I2C
drivers to the initramfs if needed, but I'm not certain.
No, i2c nor i2c_mv64xxx will be loaded. But my armel box seems fine
without them.
Of course, manually "modprobe i2c_mv64xxx" will load the module well.
While I have compiled a kernel with those options all enabled as
modules, I have not yet had time to boot it (in fact, I created a lot
of kernels that I want to test all in one sitting), but I agree with
the principle of your testing, Roger and, in the worst case, we can
instruct the users to add those to /etc/modules if they absolutely
need them.
I would not qualify this as a change for only a new kernel flavor,
that is, I would make this change in general...
Post by Roger Shimizu
- MTD, MTD_CMDLINE_PARTS, etc. But I'm pretty sure this will break
some systems unless initramfs-tools is updated to include and load the
cmdlinepart module.
- RTC_DRV_MV (and disable RTC_HCTOSYS). There's a udev rule that
should load the system clock from the first RTC if its driver is a
module.
- SPI_ORION. initramfs-tools should include this in the initramfs if
needed, but I'm not certain.
Yes, above 3 modules are loaded without glitch.
All those are generic material that I would also make generic instead
of only particular to a given flavor.
Post by Roger Shimizu
- AUDIT. This is quite a niche feature.
I tried, but couldn't. Maybe next time.
You probably missed this, but I said in a previous message that AUDIT
is automatically selected by AppArmor. In other words, you can have
* with AppArmor (and AUDIT)
* without AppArmor (but with AUDIT)
* without AppArmor and without AUDIT
From my perception, Ben was mildly opposed to having AppArmor disabled
by default and wanted to have the kernel as close as possible to other
arches...
For that reason, I would still keep AppArmor in the big, reference
armel kernel, but opt to create a flavor without AppArmor (and without
AUDIT) for the people that may want to use a small kernel or for those
(like me) that never use AppArmor (or that have not yet seen the light
with the benefits of a MAC module).
Besides your proposed changes, I have some other things in mind that I
have in patches here and that I will send after I get access to the
1 - I would change from the CFQ to the DEADLINE governors *in the
general kernel*, as it makes the kernel slightly smaller, but, in my
experience, working as well as a CFQ in practice.
2 - Another excellent option is CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
suggested by Leigh Brown (taken from
https://lists.debian.org/debian-arm/2018/03/msg00035.html). The amount
of reduction in size with my system was surprising (much smaller than
what I expected by changing the governors or when changing some
options from y to m).
* The compiler that I am using for everything here is the one from
testing (buster) and it is GCC 7 at the moment (have not tried using
GCC 8 to see the differences yet)
* I am optimizing things for size (which, in some cases, may be
beneficial for machines with small L1/L2 caches too)
I would change the default from optimizing for size (-Os) to
optimizing for speed (-O2) only after all the low-hanging fruit with
kernel options were decided and, then, I would think hard if it makes
sense to have -O2 with a small kernel or with the full blown kernel.
Another option suggested by Leigh in that message was that
+# CONFIG_CRC32_SLICEBY8 is not set
+CONFIG_CRC32_SLICEBY4=y
can make the kernel smaller and, if I remember the descriptions of the
options, it made sense that those would reduce the size of the kernel
both compressed and uncompressed... This would be something that I
would suggest for a general kernel also...
I am not sure about disabling the VT option as Leight suggested... I
don't think that I have ever used one of those...
I think that we can compile out YAMA from the general kernel, since, I
would believe that it is less frequently used (we can upload a kernel
with this disabled to experimental or to a personal space and ask
people to experiment it) and it is disabled by default in Debian's
kernel...
For a -mini kernel, some of the first things that come to my mind
* some hardware framebuffers like the S3 and similar ones, even if
build as modules.
* your suggestion of disabling wifi drivers and the wifi subsystem
* disabling some less commonly used local or distributed filesystems
(some of which are large or demand many other options to be enabled)
or that have better functionality in userspace (like the NTFS read
support in the kernel being disabled and recommend ntfs3g to the
users), but keeping popular ones and services like ext2/3/4, XFS, NFS,
Mounting CIFS is probably a good idea, but having OCFS or other
systems, I don't know.
* disabling some partition types for the smaller kernels, after
benchmarking them...
* disabling joystick/video/audio capture etc drivers.
* disabling yama/apparmor/audit.
* disabling unused kernel algorithms or those that aren't pulled in by
any modules (I remember at least one that said: don't enable this one
unless you have an out-of-tree module that needs it).
Oh, I would *not* disable zswap from the smaller kernel, since I would
plan on going not only with zbud but also with z3fold and test the
stability and performance of the kernel with it, as machines that are
memory-starved can benefit from a higher density of compression...
When introducing a new flavor, I guess that we could make the current
flavor, instead of none, being -standard, a new one called -mini
(similar in spirit to yours) and, potentially, another called -micro
to users of DNS323 (if the -mini flavor does not fit in the 1.5MB
after all these changes)...
Furthermore, with the LTO work on the kernel, I am hopeful that
if/when it gets merged, we can make everything even smaller and be
much happier... :-) OK, I'm excited to have very small kernels despite
the kernel in general growing from version to version with more and
more features being integrated...
Please, let me know your opinions.
I will now go to bed, but I will send my patches as soon as I wake up
and deal with morning stuff. In the end, I intend to enable support
for as many things are available in the mainline (even the DNS323, for
which I don't have the hardware, but since we are with our hands
dirty, let us extend the value of those machines for the users of such
hardware...)
Thanks,
Rogério Brito.
P.S.: Only now I saw that one of your patches already implement the
option that Leigh suggested... But I think that we can use more
modular options both in the "main" kernel and in the smaller flavors.
P.P.S.: Sorry if this message is badly composed, if there are
unfinished sentences or if something doesn't make sense, but I just
wanted to make sure that the thoughts that I have here in my head get
discussed with others and not only confined to myself.
--
http://cynic.cc/blog/ : github.com/rbrito : profiles.google.com/rbrito
DebianQA: http://qa.debian.org/developer.php?login=rbrito%40ime.usp.br
Roger Shimizu
2018-04-07 14:38:24 UTC
Permalink
Post by Roger Shimizu
Dear kernel folks,
After all kinda tests recently, together with the patch from Leigh
Brown (CC-ed) that disabled VT, finally the armel/marvell can be
reduced under 2MB again, without introducing a new flavour.
Sorry, I forgot to mention the post that Leigh Brown provided the patch:
- https://lists.debian.org/debian-kernel/2018/03/msg00223.html

And the patch, reducing armel image size under 2MB, and pushed to
master branch is:
- https://salsa.debian.org/kernel-team/linux/commit/a4fdfa09

Cheers,
--
Roger Shimizu, GMT +9 Tokyo
PGP/GPG: 4096R/6C6ACD6417B3ACB1
Roger Shimizu
2018-04-12 23:49:23 UTC
Permalink
Post by Roger Shimizu
Post by Roger Shimizu
Dear kernel folks,
After all kinda tests recently, together with the patch from Leigh
Brown (CC-ed) that disabled VT, finally the armel/marvell can be
reduced under 2MB again, without introducing a new flavour.
- https://lists.debian.org/debian-kernel/2018/03/msg00223.html
And the patch, reducing armel image size under 2MB, and pushed to
- https://salsa.debian.org/kernel-team/linux/commit/a4fdfa09
Well done!
Dear Ben,

Unfortunately, armel FTBFS on buildd due to udeb [0][1].

[0] https://buildd.debian.org/status/package.php?p=linux&suite=experimental
[1] https://buildd.debian.org/status/fetch.php?pkg=linux&arch=armel&ver=4.16-1~exp1&stamp=1523350611

Neither the cross build wiki entry [2], nor the kernel handbook [3]
mentions how to build udeb.
So could you kindly tell me how to confirm the udeb build?

[2] https://wiki.debian.org/HowToCrossBuildAnOfficialDebianKernelPackage
[3] https://kernel-handbook.debian.net

BTW. I think the udeb breaks because I removed RD_BZIP2 and RD_LZMA.
So if you know how to fix the config under debian/installer, please
kindly help to do.
I don't have enough knowledge to touch stuff under that directory. Thank you!

Cheers,
--
Roger Shimizu, GMT +9 Tokyo
PGP/GPG: 4096R/6C6ACD6417B3ACB1
Roger Shimizu
2018-04-15 16:04:01 UTC
Permalink
Dear Ian, Ben,
For the lzo_decompress ones I think you need to add it to
installer/modules/lzo-modules and perhaps add one or two more
dependencies based on what the errors are at that point.
Let's not introduce more packages. I would be tempted to put it in
kernel-image, which all other udeb packages should depend on.
I thought lzo-modules already existed, but perhaps my tree was out of
date. If it doesn't then you are right that kernel-image would be a
find choice.
You're right, I just didn't remember it existing.
Thanks for your hints!
I also find the thread [0] that had the similar problem before.
So I learned how to fix the problem, and now the fix is in master [1]
and sid branch on salsa.

[0] https://lists.debian.org/debian-kernel/2014/02/msg00341.html
[1] https://salsa.debian.org/kernel-team/linux/commit/175171d4

I also find the target binary-arch_armel_real of makefile fails in my
cross compiling environment, which is the reason why I couldn't build
udeb.
There's a workaround for this:
$ sed -i 's/binary-arch_armel:: binary-arch_armel_extra
binary-arch_armel_none binary-arch_armel_real/binary-arch_armel::
binary-arch_armel_extra binary-arch_armel_none/' debian/rules.gen

After that, the udeb command can be built by ($ARCH is armel for my case):
$ fakeroot make -f debian/rules.gen binary-arch_${ARCH}

Maybe it's kinda dirty hack, but works for me. I also realized that I
never used the binary-arch_armel_real target before.

Cheers,
--
Roger Shimizu, GMT +9 Tokyo
PGP/GPG: 4096R/6C6ACD6417B3ACB1
Rick Thomas
2018-04-01 23:40:51 UTC
Permalink
Post by Rogério Brito
What filesystems do you use? Do you use any (para)virtualization? What
about addon hardware that you have? Any USB dongles? Anything that you
can think of? Sound?
Do you use NFS? (I do) What kind of compressed ramdisk do you use? The
loaded modules that you have with lsmod would be nice to know.
Filesystems: ext2 and ext4

Vitrualization: Nope. These are way too small for anything fancy like that.

Addon hardware:
USB2 ports useful for disk and/or flash drives and other stuff (I don’t do the “other stuff” myself but I suppose there are folks who might).
They have 1000BaseT ports. Two ports on the OpenRD Client, one on the SheevaPlug.
They each have a mini-USB serial port that they use for serial console.
The Client has a headphone jack. I’ve used it in the past for listening to streaming radio. The SheevaPlug has no audio i/o.
Both machines have SD-card slots that can be used in booting or as aux data storage.
Both get their uboot from mtd, not mmc, so updating uboot requires re-flashing.
The Client has 512MB RAM. The SheevaPlug has the same.

CPU info for SheevaPlug —
processor : 0
model name : Feroceon 88FR131 rev 1 (v5l)
BogoMIPS : 1185.79
Features : swp half thumb fastmult edsp
CPU implementer : 0x56
CPU architecture: 5TE
CPU variant : 0x2
CPU part : 0x131
CPU revision : 1
Hardware : Marvell Kirkwood (Flattened Device Tree)
Revision : 0000
Serial : 0000000000000000
CPU info for OpenRD Client —
processor : 0
model name : Feroceon 88FR131 rev 1 (v5l)
BogoMIPS : 1191.93
Features : swp half thumb fastmult edsp
CPU implementer : 0x56
CPU architecture: 5TE
CPU variant : 0x2
CPU part : 0x131
CPU revision : 1
Hardware : Marvell Kirkwood (Flattened Device Tree)
Revision : 0000
Serial : 0000000000000000
Uboot details on SheevaPlug —
U-Boot 2016.01-rc3+dfsg1-3 (Jan 02 2016 - 23:19:11 +0000)
Marvell-Sheevaplug
SoC: Kirkwood 88F6281_A0
DRAM: 512 MiB (ECC not enabled)
WARNING: Caches not enabled
NAND: 512 MiB
MMC: MVEBU_MMC: 0
In: serial
Out: serial
Err: serial
Net: egiga0
and on OpenRD Client —
U-Boot 2016.11+dfsg1-4~20170308~1 (Mar 09 2017 - 01:27:49 +0000)
OpenRD-Client
SoC: Kirkwood 88F6281_A0
DRAM: 512 MiB
WARNING: Caches not enabled
NAND: 512 MiB
MMC: MVEBU_MMC: 0
In: serial
Out: serial
Err: serial
Net: egiga0, egiga1
I use the SheevaPlug as a backup DHCP/DNS server for my home network. The Client is reserved for experimenting.

I don’t currently use NFS on either, but I have in the past.

I’m not sure what you mean by “What kind of compressed ramdisk do you use?”. As a stab in the dark —
/boot/initrd.img-4.9.0-6-marvell: gzip compressed data, last modified: Sun Mar 4 14:29:43 2018, from Unix
and
/boot/initrd.img-4.9.0-6-marvell: gzip compressed data, last modified: Sat Mar 10 10:12:39 2018, from Unix
In other words, nothing fancy!

Does that help?
Rick
Ben Hutchings
2018-03-27 19:01:07 UTC
Permalink
On Tue, 2018-03-27 at 02:30 -0300, Rogério Brito wrote:
[...]
Post by Rogério Brito
Post by Ben Hutchings
I will see if all the modules make sense for an embedded system like this
and I will send a list of options for opinions by others...
[...]
As I see it, the point of installing Debian on little NAS boxes is to
break out of the restrictions of an embedded system. We try to
provide, so far as possible, the same features across all
architectures.
It sure makes sense to provide a lot more than some kernels, but I am
curious about some features that end up as modules like some
(...)
# CONFIG_FB_MATROX is not set
# CONFIG_FB_RADEON is not set
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_ATY is not set
CONFIG_FB_S3=m
CONFIG_FB_S3_DDC=y
# CONFIG_FB_SAVAGE is not set
# CONFIG_FB_SIS is not set
# CONFIG_FB_NEOMAGIC is not set
# CONFIG_FB_KYRO is not set
CONFIG_FB_3DFX=m
# CONFIG_FB_3DFX_ACCEL is not set
CONFIG_FB_3DFX_I2C=y
# CONFIG_FB_VOODOO1 is not set
(...)
Is there any reason why, say, a driver for an S3 card is enabled while
not for a Matrox?
I don't know; that doesn't make a lot of sense.

The Kirkwood SoCs have external PCIe links and some of the supported
devices (like OpenRD) provide PCIe expansion slots, so most PCIe device
drivers should be enabled.
Post by Rogério Brito
Are there real users for those? I know that, as
modules, they don't make the kernel bigger, but they sit there on
disk, doing nothing (right?).
They probably don't make a difference. However there are some cases
where a modular driver may require (and select) a feature that is
always built-in.
Post by Rogério Brito
Similarly for wifi cards like those Intel ones like iwlwifi (which is
the one that I have in this Core 2 Duo here)...
Prepare to be amazed: https://www.amazon.com/dp/B00OM0L9ZO
Post by Rogério Brito
OK, now to the real meat of my message. Regarding shrinking the
kernel image, I was able to tweak things slightly (drop from 101% down
to 98%) by disabling APPARMOR, YAMA, AUDIT, making the kernel use the
deadline IO scheduler instead of the CFQ and making as modules the
ones that you suggested in the original message... Is that acceptable?
I would really rather we avoided disabling AppArmor, since it is not
only built-in but also enabled by default on all other architectures.
Still, as armel will not be a release architecture any more, I suppose
it can diverge further from the normal configuration.
Post by Rogério Brito
If so, then I will test them on my Kurobox Pro and report what works
and what breaks. I just wanted to get things smaller by tackling some
lower hanging fruit...
Another point: from what I saw in the Debian scripts, not all
armel/marvell systems are limited to 2MB (in particular, the Kurobox
Pro with which I am most concerned still has 630KB of room)...
Roger has increased the size limit to 2729712 on the sid branch, which
is the limit on the Buffalo Linkstation devices. Check whether that
matches the Kurobox Pro too.
Post by Rogério Brito
In the
very worst case (of course, this is not what we want), if the kernel
actually gets much bigger in time for the buster release, we could
selectively drop some systems (like what was done with the DNS323)
instead of dropping an entire arch... I even think that a new,
smaller, alternative flavor of the kernel is possible to provide to
support those systems that are limited to 2MB of kernel image... (I
can commit to support that, if my initial ideas work and people accept
them).
Either of those seem like reasonable options.

Ben.
Post by Rogério Brito
Of course, if we could make some real magic and make our kernels much,
much smaller to support back the DNS323, that would be amazing... :-)
I guess that I will look into those LTO patches in the future...
OK, I am sending this to see if those ideas make sense, to offer my
help and, of course, to get some feedback.
--
Ben Hutchings
For every complex problem
there is a solution that is simple, neat, and wrong.
Ben Hutchings
2018-03-27 19:29:03 UTC
Permalink
Post by Ben Hutchings
Still, as armel will not be a release architecture any more, I suppose
it can diverge further from the normal configuration.
I didn't know, that this already has been decided.
Could you point to the emails about this? Thanks!
I don't know about emails, but the status page says it is not a
candidate: https://release.debian.org/buster/arch_qualify.html

Ben.
--
Ben Hutchings
For every complex problem
there is a solution that is simple, neat, and wrong.
Rogério Brito
2018-03-27 20:29:02 UTC
Permalink
Hi, Ben and others following the discussion.
Post by Ben Hutchings
[...]
Post by Rogério Brito
Post by Ben Hutchings
I will see if all the modules make sense for an embedded system like this
and I will send a list of options for opinions by others...
[...]
As I see it, the point of installing Debian on little NAS boxes is to
break out of the restrictions of an embedded system. We try to
provide, so far as possible, the same features across all
architectures.
It sure makes sense to provide a lot more than some kernels, but I am
curious about some features that end up as modules like some
(...)
Is there any reason why, say, a driver for an S3 card is enabled while
not for a Matrox?
I don't know; that doesn't make a lot of sense.
Running make menuconfig, I can disable it without any visible loss (not
yet run it, but I don't have such hardware on my Kurobox Pro).

If the kernel were only for me, then I would simply kill it, and be done
with it, but, as I wrote to Stefan, the logical consequence would be to
enable everything that could plausibly be used... OTOH, if people
haven't noticed by this time that we need some drivers, perhaps we
shouldn't be enabling such a thing...

(Yes, I know that enabling a given driver can, say, enable some data
structure implementation from the core of the kernel and/or some crypto
algorithm, which would make the kernel potentially bigger).
Post by Ben Hutchings
The Kirkwood SoCs have external PCIe links and some of the supported
devices (like OpenRD) provide PCIe expansion slots, so most PCIe device
drivers should be enabled.
Post by Rogério Brito
Are there real users for those? I know that, as
modules, they don't make the kernel bigger, but they sit there on
disk, doing nothing (right?).
They probably don't make a difference.
Right. I suspected this much.
Post by Ben Hutchings
However there are some cases
where a modular driver may require (and select) a feature that is
always built-in.
Oh, yes this I knew.
Post by Ben Hutchings
Post by Rogério Brito
Similarly for wifi cards like those Intel ones like iwlwifi (which is
the one that I have in this Core 2 Duo here)...
Prepare to be amazed: https://www.amazon.com/dp/B00OM0L9ZO
This I didn't know. :-)
Post by Ben Hutchings
Post by Rogério Brito
OK, now to the real meat of my message. Regarding shrinking the
kernel image, I was able to tweak things slightly (drop from 101% down
to 98%) by disabling APPARMOR, YAMA, AUDIT, making the kernel use the
deadline IO scheduler instead of the CFQ and making as modules the
ones that you suggested in the original message... Is that acceptable?
I would really rather we avoided disabling AppArmor, since it is not
only built-in but also enabled by default on all other architectures.
OK, I will reenable apparmor and see what size I get before sending patches.
Post by Ben Hutchings
Still, as armel will not be a release architecture any more, I suppose
it can diverge further from the normal configuration.
I saw your other email. I would like to revert this and I don't know if
(finally, after more than a decade contributing to Debian as a Debian
Maintainer) it is time to step up and become a Debian Developer and
commit to maintain some parts of the kernel...

Yes, that means that if this excursion of mine is fruitful, I will
volunteer... :-) If not, then I just get the learning experience. :-)

Actually, if I succeed, I would be interested in also working to get
powerpc revived, since I have an iBook G3, an iBook G4 and two ppc-based
kuroboxes (but one of them has only 64MB of RAM and I still have to
learn this device tree syntax)...
Post by Ben Hutchings
Post by Rogério Brito
If so, then I will test them on my Kurobox Pro and report what works
and what breaks. I just wanted to get things smaller by tackling some
lower hanging fruit...
Another point: from what I saw in the Debian scripts, not all
armel/marvell systems are limited to 2MB (in particular, the Kurobox
Pro with which I am most concerned still has 630KB of room)...
Roger has increased the size limit to 2729712 on the sid branch, which
is the limit on the Buffalo Linkstation devices. Check whether that
matches the Kurobox Pro too.
I didn't know that. I guess that I cloned the repository after he made
that change... Anyway, I will check it, but the kurobox Pro is (in my
understanding) very close to a linkstation...
Post by Ben Hutchings
Post by Rogério Brito
In the
very worst case (of course, this is not what we want), if the kernel
actually gets much bigger in time for the buster release, we could
selectively drop some systems (like what was done with the DNS323)
instead of dropping an entire arch... I even think that a new,
smaller, alternative flavor of the kernel is possible to provide to
support those systems that are limited to 2MB of kernel image... (I
can commit to support that, if my initial ideas work and people accept
them).
Either of those seem like reasonable options.
For the moment, I will try to work with the 2MB limit in mind, since I
want the QNAP boxes also working...

BTW, I think that my idea of supplying an alternate flavor was in the
mind of other people simultaneously (that is it is the zeitgeist), since
I see many other people talking about this on the other thread...

Perhaps the assumption that the current kernel needs all the bells and
whistles is being challenged...

Anyway, back to the apparmor test now...


Thanks,
--
Rogério Brito : rbrito@{ime.usp.br,gmail.com} : GPG key 4096R/BCFCAAAA
http://cynic.cc/blog/ : github.com/rbrito : profiles.google.com/rbrito
DebianQA: http://qa.debian.org/developer.php?login=rbrito%40ime.usp.br
Paul Wise
2018-03-28 04:32:20 UTC
Permalink
Post by Ben Hutchings
Still, as armel will not be a release architecture any more, I suppose
it can diverge further from the normal configuration.
I didn't know, that this already has been decided.
Could you point to the emails about this? Thanks!
https://lists.debian.org/msgid-search/***@betterave.cristau.org
https://lists.debian.org/msgid-search/***@tack.einval.com
--
bye,
pabs

https://wiki.debian.org/PaulWise
Loading...