Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #60019 > unrolled thread

Re: armel/marvell kernel size

Started byBen Hutchings <ben@decadent.org.uk>
First post2018-01-18 05:30 +0100
Last post2018-03-27 22:50 +0200
Articles 20 on this page of 31 — 11 participants

Back to article view | Back to linux.debian.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: armel/marvell kernel size Ben Hutchings <ben@decadent.org.uk> - 2018-01-18 05:30 +0100
    Re: armel/marvell kernel size Roger Shimizu <rogershimizu@gmail.com> - 2018-01-22 15:00 +0100
      Re: armel/marvell kernel size Ben Hutchings <ben@decadent.org.uk> - 2018-01-23 19:40 +0100
        Re: armel/marvell kernel size Ben Hutchings <ben@decadent.org.uk> - 2018-01-26 19:00 +0100
        Re: armel/marvell kernel size Salvatore Bonaccorso <carnil@debian.org> - 2018-02-17 13:50 +0100
          Re: armel/marvell kernel size Bastian Blank <waldi@debian.org> - 2018-02-17 14:20 +0100
            Re: armel/marvell kernel size Roger Shimizu <rogershimizu@gmail.com> - 2018-03-22 13:00 +0100
          Re: armel/marvell kernel size Roger Shimizu <rogershimizu@gmail.com> - 2018-03-22 13:00 +0100
            Re: armel/marvell kernel size Rogério Brito <rbrito@gmail.com> - 2018-03-22 19:20 +0100
          Re: armel/marvell kernel size Ben Hutchings <ben@decadent.org.uk> - 2018-03-23 00:10 +0100
          Re: armel/marvell kernel size Ben Hutchings <ben@decadent.org.uk> - 2018-03-24 03:00 +0100
            Re: armel/marvell kernel size Rogério Brito <rbrito@gmail.com> - 2018-03-27 07:50 +0200
              Re: armel/marvell kernel size Stefan Monnier <monnier@iro.umontreal.ca> - 2018-03-27 14:40 +0200
                Re: armel/marvell kernel size Rogério Brito <rbrito@ime.usp.br> - 2018-03-27 22:30 +0200
                  Re: armel/marvell kernel size Rick Thomas <rbthomas@pobox.com> - 2018-03-27 22:50 +0200
                    Re: armel/marvell kernel size Rogério Brito <rbrito@ime.usp.br> - 2018-03-27 23:30 +0200
                      Re: armel/marvell kernel size Rick Thomas <rbthomas@pobox.com> - 2018-03-28 11:30 +0200
                        Re: armel/marvell kernel size Federico Pietro Briata <federico@briata.org> - 2018-03-28 14:30 +0200
                          Re: armel/marvell kernel size Roger Shimizu <rogershimizu@gmail.com> - 2018-04-01 15:30 +0200
                            Re: armel/marvell kernel size Rogério Brito <rbrito@ime.usp.br> - 2018-04-03 08:00 +0200
                              Re: armel/marvell kernel size Roger Shimizu <rogershimizu@gmail.com> - 2018-04-07 16:20 +0200
                                Re: armel/marvell kernel size Roger Shimizu <rogershimizu@gmail.com> - 2018-04-07 17:00 +0200
                                  Re: armel/marvell kernel size Roger Shimizu <rogershimizu@gmail.com> - 2018-04-13 02:10 +0200
                                    Re: armel/marvell kernel size Roger Shimizu <rogershimizu@gmail.com> - 2018-04-15 18:30 +0200
                        Re: armel/marvell kernel size Rick Thomas <rbthomas@pobox.com> - 2018-04-02 01:50 +0200
                  Re: armel/marvell kernel size Stefan Monnier <monnier@iro.umontreal.ca> - 2018-03-27 23:30 +0200
              Re: armel/marvell kernel size Ben Hutchings <ben@decadent.org.uk> - 2018-03-27 21:10 +0200
                Re: armel not to be released anymore? (was: armel/marvell kernel  size) Ben Hutchings <ben@decadent.org.uk> - 2018-03-27 21:30 +0200
                armel not to be released anymore? (was: armel/marvell kernel size) "W. Martin Borgert" <debacle@debian.org> - 2018-03-27 21:40 +0200
                  Re: armel not to be released anymore? (was: armel/marvell kernel size) Paul Wise <pabs@debian.org> - 2018-03-28 06:40 +0200
                Re: armel/marvell kernel size Rogério Brito <rbrito@ime.usp.br> - 2018-03-27 22:50 +0200

Page 1 of 2  [1] 2  Next page →


#60019 — Re: armel/marvell kernel size

FromBen Hutchings <ben@decadent.org.uk>
Date2018-01-18 05:30 +0100
SubjectRe: armel/marvell kernel size
Message-ID<v99ZT-mH-5@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

On Fri, 2017-10-20 at 15:07 +0100, Ben Hutchings wrote:
> Sadly, linux has again failed to build on armel in experimental due to
> the image size growing too large.

It's happened again.  The compressed image is 1% over the limit.

Ben.

-- 
Ben Hutchings
If at first you don't succeed, you're doing about average.

[toc] | [next] | [standalone]


#60045

FromRoger Shimizu <rogershimizu@gmail.com>
Date2018-01-22 15:00 +0100
Message-ID<vaKNH-5y0-13@gated-at.bofh.it>
In reply to#60019
Dear Ben,

Thanks for keeping armel things rolling for a few releases!

On Thu, Jan 18, 2018 at 1:22 PM, Ben Hutchings <ben@decadent.org.uk> wrote:
> On Fri, 2017-10-20 at 15:07 +0100, Ben Hutchings wrote:
>> Sadly, linux has again failed to build on armel in experimental due to
>> the image size growing too large.
>
> It's happened again.  The compressed image is 1% over the limit.

Yes, it's time again.

I tried the "CRYPTO_MANAGER2" stuff you mentioned before.
Unfortunately, I didn't make it built as module, except after
disabling CONFIG_NET, which seems quite ridiculous.

Do you know any other option, BTW?
I'll continue trying for a while.

Cheers,
-- 
Roger Shimizu, GMT +9 Tokyo
PGP/GPG: 4096R/6C6ACD6417B3ACB1

[toc] | [prev] | [next] | [standalone]


#60059

FromBen Hutchings <ben@decadent.org.uk>
Date2018-01-23 19:40 +0100
Message-ID<vbbEf-5Ms-25@gated-at.bofh.it>
In reply to#60045

[Multipart message — attachments visible in raw view] — view raw

On Mon, 2018-01-22 at 22:38 +0900, Roger Shimizu wrote:
> Dear Ben,
> 
> Thanks for keeping armel things rolling for a few releases!
> 
> On Thu, Jan 18, 2018 at 1:22 PM, Ben Hutchings <ben@decadent.org.uk> wrote:
> > On Fri, 2017-10-20 at 15:07 +0100, Ben Hutchings wrote:
> > > Sadly, linux has again failed to build on armel in experimental due to
> > > the image size growing too large.
> > 
> > It's happened again.  The compressed image is 1% over the limit.
> 
> Yes, it's time again.
> 
> I tried the "CRYPTO_MANAGER2" stuff you mentioned before.
> Unfortunately, I didn't make it built as module, except after
> disabling CONFIG_NET, which seems quite ridiculous.
> 
> Do you know any other option, BTW?
> I'll continue trying for a while.

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?

Some options that could possibly be changed from y to m:

- 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.

Some options that could possibly be disabled:

- AUDIT.  This is quite a niche feature.

Also try comparing the complete configs over time and looking for
symbols newly set to y.

Ben.

-- 
Ben Hutchings
Reality is just a crutch for people who can't handle science fiction.

[toc] | [prev] | [next] | [standalone]


#60079

FromBen Hutchings <ben@decadent.org.uk>
Date2018-01-26 19:00 +0100
Message-ID<vcgsa-6pV-9@gated-at.bofh.it>
In reply to#60059

[Multipart message — attachments visible in raw view] — view raw

Another possibility is to use LTO (Link-Time Optimisation):
https://lwn.net/SubscriberLink/744507/6489bc782122ca29/

However this is not yet supported in mainline, and it might require
more VM than is available on an armel buildd.

Ben.

-- 
Ben Hutchings
Unix is many things to many people,
but it's never been everything to anybody.

[toc] | [prev] | [next] | [standalone]


#60229

FromSalvatore Bonaccorso <carnil@debian.org>
Date2018-02-17 13:50 +0100
Message-ID<vka6d-72h-5@gated-at.bofh.it>
In reply to#60059
Hi Roger,

On Tue, Jan 23, 2018 at 06:30:23PM +0000, Ben Hutchings wrote:
> On Mon, 2018-01-22 at 22:38 +0900, Roger Shimizu wrote:
> > Dear Ben,
> > 
> > Thanks for keeping armel things rolling for a few releases!
> > 
> > On Thu, Jan 18, 2018 at 1:22 PM, Ben Hutchings <ben@decadent.org.uk> wrote:
> > > On Fri, 2017-10-20 at 15:07 +0100, Ben Hutchings wrote:
> > > > Sadly, linux has again failed to build on armel in experimental due to
> > > > the image size growing too large.
> > > 
> > > It's happened again.  The compressed image is 1% over the limit.
> > 
> > Yes, it's time again.
> > 
> > I tried the "CRYPTO_MANAGER2" stuff you mentioned before.
> > Unfortunately, I didn't make it built as module, except after
> > disabling CONFIG_NET, which seems quite ridiculous.
> > 
> > Do you know any other option, BTW?
> > I'll continue trying for a while.
> 
> 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?
> 
> Some options that could possibly be changed from y to m:
> 
> - 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.
> 
> Some options that could possibly be disabled:
> 
> - 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?

We would like to ideally upload a 4.15.x based version to unstable
(currently imported 4.15.4).

Regards,
Salvatore

[toc] | [prev] | [next] | [standalone]


#60230

FromBastian Blank <waldi@debian.org>
Date2018-02-17 14:20 +0100
Message-ID<vkazg-7va-13@gated-at.bofh.it>
In reply to#60229
On Sat, Feb 17, 2018 at 01:48:51PM +0100, Salvatore Bonaccorso wrote:
> Did you had a chance to look at Ben's suggestions or ideas?
> We would like to ideally upload a 4.15.x based version to unstable
> (currently imported 4.15.4).

I would start with disabling it. The armel architecture (not armhf) will
most likely not be part of Buster anyway.

For the current state see
https://release.debian.org/buster/arch_qualify.html

Bastian

-- 
War isn't a good life, but it's life.
		-- Kirk, "A Private Little War", stardate 4211.8

[toc] | [prev] | [next] | [standalone]


#60520

FromRoger Shimizu <rogershimizu@gmail.com>
Date2018-03-22 13:00 +0100
Message-ID<vw72W-85k-5@gated-at.bofh.it>
In reply to#60230
[ CC tbm ]

On Sat, Feb 17, 2018 at 9:57 PM, Bastian Blank <waldi@debian.org> wrote:
> On Sat, Feb 17, 2018 at 01:48:51PM +0100, Salvatore Bonaccorso wrote:
>> Did you had a chance to look at Ben's suggestions or ideas?
>> We would like to ideally upload a 4.15.x based version to unstable
>> (currently imported 4.15.4).
>
> I would start with disabling it. The armel architecture (not armhf) will
> most likely not be part of Buster anyway.

I'm sorry that I still didn't find a way to make armel kernel within 2MB.
So I will trigger the easy fix that increase the limit to 3MB, which
probably break quite a few qnap boxes.

Before Buster release, we still have chance to bring qnap support
back, if I or other maintainer find a way..

> For the current state see
> https://release.debian.org/buster/arch_qualify.html

Sorry to hear that.
But I think armel should share the same status with armhf.
Anyway, this is another topic to discuss, which is better shouting to
d-d in a new thread.

Cheers,
-- 
Roger Shimizu, GMT +9 Tokyo
PGP/GPG: 4096R/6C6ACD6417B3ACB1

[toc] | [prev] | [next] | [standalone]


#60521

FromRoger Shimizu <rogershimizu@gmail.com>
Date2018-03-22 13:00 +0100
Message-ID<vw6Tg-80p-3@gated-at.bofh.it>
In reply to#60229
Dear Rogério,

Good to hear from you again!

On Thu, Mar 22, 2018 at 12:12 PM, Rogério Brito <rbrito@ime.usp.br> wrote:
> Hi, all (and sorry for jumping in a bit late).
>
> On 2018-02-17 10:48, Salvatore Bonaccorso wrote:
>> On Tue, Jan 23, 2018 at 06:30:23PM +0000, Ben Hutchings wrote:
>>> 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?
>>>
>>> Some options that could possibly be changed from y to m:
>>>
>>> - 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.
>>>
>>> Some options that could possibly be disabled:
>>>
>>> - 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/
>
> For this task, I have some questions:

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

[toc] | [prev] | [next] | [standalone]


#60527

FromRogério Brito <rbrito@gmail.com>
Date2018-03-22 19:20 +0100
Message-ID<vwcYF-3Px-7@gated-at.bofh.it>
In reply to#60521
Dear Roger and other people!

On Thu, Mar 22, 2018 at 8:40 AM, Roger Shimizu <rogershimizu@gmail.com> wrote:
> 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.

> On Thu, Mar 22, 2018 at 12:12 PM, Rogério Brito <rbrito@ime.usp.br> wrote:
>> On 2018-02-17 10:48, Salvatore Bonaccorso wrote:
>>> On Tue, Jan 23, 2018 at 06:30:23PM +0000, Ben Hutchings wrote:
>>>> 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?
>>>>
>>>> Some options that could possibly be changed from y to m:
>>>>
>>>> - 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.
>>>>
>>>> Some options that could possibly be disabled:
>>>>
>>>> - 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/
>>
>> For this task, I have some questions:
>
> I have a wiki entry to help you:
> - https://wiki.debian.org/HowToCrossBuildAnOfficialDebianKernelPackage

Thank you very much for the link. It will be highly useful for experimenting.

> 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
didn't reach the mailing lists):

> 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

[toc] | [prev] | [next] | [standalone]


#60528

FromBen Hutchings <ben@decadent.org.uk>
Date2018-03-23 00:10 +0100
Message-ID<vwhvj-6Hl-1@gated-at.bofh.it>
In reply to#60229

[Multipart message — attachments visible in raw view] — view raw

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/
> 
> For this task, I have some questions:
> 
> 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.

[toc] | [prev] | [next] | [standalone]


#60543

FromBen Hutchings <ben@decadent.org.uk>
Date2018-03-24 03:00 +0100
Message-ID<vwGDo-6Sy-7@gated-at.bofh.it>
In reply to#60229

[Multipart message — attachments visible in raw view] — view raw

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

[toc] | [prev] | [next] | [standalone]


#60575

FromRogério Brito <rbrito@gmail.com>
Date2018-03-27 07:50 +0200
Message-ID<vxPEC-7UM-5@gated-at.bofh.it>
In reply to#60543
Hi Ben and others.

On Fri, Mar 23, 2018 at 10:50 PM, Ben Hutchings <ben@decadent.org.uk> wrote:
> 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?

Unfortunately, not at this moment. My desktop (a Phenon II X4) was
fried during a power outage. :-(

> 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.

> 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.

> > 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

[toc] | [prev] | [next] | [standalone]


#60577

FromStefan Monnier <monnier@iro.umontreal.ca>
Date2018-03-27 14:40 +0200
Message-ID<vxW3o-3UW-5@gated-at.bofh.it>
In reply to#60575
> 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

[toc] | [prev] | [next] | [standalone]


#60584

FromRogério Brito <rbrito@ime.usp.br>
Date2018-03-27 22:30 +0200
Message-ID<vy3od-VQ-1@gated-at.bofh.it>
In reply to#60577
Hi,Stefan.

On 2018-03-27 09:34, Stefan Monnier wrote:
>> 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

[toc] | [prev] | [next] | [standalone]


#60585

FromRick Thomas <rbthomas@pobox.com>
Date2018-03-27 22:50 +0200
Message-ID<vy3Hz-15Z-1@gated-at.bofh.it>
In reply to#60584
On Mar 27, 2018, at 1:04 PM, Rogério Brito <rbrito@ime.usp.br> wrote:
> 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

[toc] | [prev] | [next] | [standalone]


#60588

FromRogério Brito <rbrito@ime.usp.br>
Date2018-03-27 23:30 +0200
Message-ID<vy4ki-1A9-7@gated-at.bofh.it>
In reply to#60585
On 2018-03-27 17:29, Rick Thomas wrote:
> On Mar 27, 2018, at 1:04 PM, Rogério Brito <rbrito@ime.usp.br> wrote:
>> 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.

> 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

[toc] | [prev] | [next] | [standalone]


#60593

FromRick Thomas <rbthomas@pobox.com>
Date2018-03-28 11:30 +0200
Message-ID<vyfz3-1gO-1@gated-at.bofh.it>
In reply to#60588
On Mar 27, 2018, at 2:08 PM, Rogério Brito <rbrito@ime.usp.br> wrote:

> On 2018-03-27 17:29, Rick Thomas wrote:
>> On Mar 27, 2018, at 1:04 PM, Rogério Brito <rbrito@ime.usp.br> wrote:
>>> 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
> rbthomas@client:~$ uname -a
> Linux client 4.9.0-6-marvell #1 Debian 4.9.82-1+deb9u3 (2018-03-02) armv5tel GNU/Linux

SheevaPlug
> rbthomas@sheeva:~$ uname -a
> 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

[toc] | [prev] | [next] | [standalone]


#60596

FromFederico Pietro Briata <federico@briata.org>
Date2018-03-28 14:30 +0200
Message-ID<vyinf-33d-3@gated-at.bofh.it>
In reply to#60593

[Multipart message — attachments visible in raw view] — view raw

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

2018-03-28 11:22 GMT+02:00 Rick Thomas <rbthomas@pobox.com>:

>
> On Mar 27, 2018, at 2:08 PM, Rogério Brito <rbrito@ime.usp.br> wrote:
>
> > On 2018-03-27 17:29, Rick Thomas wrote:
> >> On Mar 27, 2018, at 1:04 PM, Rogério Brito <rbrito@ime.usp.br> wrote:
> >>> 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
> > rbthomas@client:~$ uname -a
> > Linux client 4.9.0-6-marvell #1 Debian 4.9.82-1+deb9u3 (2018-03-02)
> armv5tel GNU/Linux
>
> SheevaPlug
> > rbthomas@sheeva:~$ uname -a
> > 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
>

[toc] | [prev] | [next] | [standalone]


#60612

FromRoger Shimizu <rogershimizu@gmail.com>
Date2018-04-01 15:30 +0200
Message-ID<vzLdv-3F0-11@gated-at.bofh.it>
In reply to#60596

[Multipart message — attachments visible in raw view] — view raw

Dear Ben, and other arm/kernel folks,

On Wed, Jan 24, 2018 at 3:30 AM, Ben Hutchings <ben@decadent.org.uk> wrote:
> On Mon, 2018-01-22 at 22:38 +0900, Roger Shimizu wrote:
>
> 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)

> Some options that could possibly be changed from y to m:
>
> - 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.

> Some options that could possibly be disabled:
>
> - 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

[toc] | [prev] | [next] | [standalone]


#60620

FromRogério Brito <rbrito@ime.usp.br>
Date2018-04-03 08:00 +0200
Message-ID<vAn97-3IN-5@gated-at.bofh.it>
In reply to#60612
Dear Roger, Ben and others.

On Sun, Apr 1, 2018 at 10:25 AM, Roger Shimizu <rogershimizu@gmail.com> wrote:
> On Wed, Jan 24, 2018 at 3:30 AM, Ben Hutchings <ben@decadent.org.uk> wrote:
>> On Mon, 2018-01-22 at 22:38 +0900, Roger Shimizu wrote:
>> 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.

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...

> 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 would make your commits more granular, with one semantic change per
commit, to revert and or/bisect in an easier fashion...

> 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)

I'm doing my tests under testing (buster). See more below.

>> Some options that could possibly be changed from y to m:
>>
>> - 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...

>> - 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.

>> Some options that could possibly be disabled:
>>
>> - 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

>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

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | linux.debian.kernel


csiph-web