Dear Ben, and other arm/kernel folks,
On Wed, Jan 24, 2018 at 3:30 AM, Ben Hutchings 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
From 713af1924e35a0587da2aa22d2d538b424955524 Mon Sep 17 00:00:00 2001
From: Roger Shimizu
Date: Sun, 1 Apr 2018 00:27:00 +0900
Subject: [PATCH 1/3] Bring back qnap support by a new armel flavour: mini
[armel/marvell] For flavour marvell, set CC_OPTIMIZE_FOR_PERFORMANCE,
which is default for other Arch.
[armel/mini] Add a new flavour mini to bring back qnap support, which
uses config.marvell as base, with some additional settings in
config-reduced:
- Set CC_OPTIMIZE_FOR_SIZE, which as set in config.marvell before
- Change CRYPTO_MANAGER as module
- Set CRYPTO_MANAGER_DISABLE_TESTS=y
- Disable ZSWAP
- Disable WIRELESS
- Disable RD_BZIP2 and RD_LZMA
---
debian/changelog | 11 +++
debian/config/armel/config-reduced | 33 +
debian/config/armel/config.marvell | 3 ---
debian/config/armel/defines| 29 +++--
4 files changed, 67 insertions(+), 9 deletions(-)
create mode 100644 debian/config/armel/config-reduced
diff --git a/debian/changelog b/debian/changelog
index a30befbd9..7a0f7f7df 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,17 @@ linux (4.16~rc6-1~exp2) UNRELEASED; urgency=medium
Also revert two commits that disabled armel previously:
- [2ed70eb] "Add empty featuresets for armel to help abiupdate script"
- [5f62872] "(Temporarily) disable armel kernel image build"
+ * [armel/marvell] For flavour marvell, set CC_OPTIMIZE_FOR_PERFORMANCE,
+which is default for other Arch.
+ * [armel/mini] Add a new flavour mini to bring back qnap support, which
+uses config.marvell as base, with some additional settings in
+config-reduced:
+- Set CC_OPTIMIZE_FOR_SIZE, which as set in config.marvell before
+- Change CRYPTO_MANAGER as module
+- Set CRYPTO_MANAGER_DISABLE_TESTS=y
+- Disable ZSWAP
+- Disable WIRELESS
+- Disable RD_BZIP2 and RD_LZMA
-- Roger Shimizu Fri, 23 Mar 2018 21:10:34 +0900
diff --git a/debian/config/armel/config-reduced b/debian/config/armel/config-reduced
new file mode 100644
index 0..3d6e3bfbc
--- /dev/null
+++ b/debian/config/armel/config-reduced
@@ -0,0 +1,33 @@
+##
+## file: crypto/Kconfig
+##
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y