FS#69479 - [linux,linux-hardened,linux-lts,linux-zen] Remove non-x86 stuff from config

Attached to Project: Arch Linux
Opened by Pascal Ernster (hardfalcon) - Sunday, 31 January 2021, 00:17 GMT
Last edited by Andreas Radke (AndyRTR) - Sunday, 19 September 2021, 08:45 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Andreas Radke (AndyRTR)
Jan Alexander Steffens (heftig)
Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

The current compile-time configs for the linux, linux-hardened, linux-lts, and linux-zen kernel packages enable building some modules for which there is no use at all on x86 machines.

I've first noticed this with "lantiq" modules (which are only useful if you're using Lantiq SoCs - but those are MIPS and not x86, they're used in some DSL routers), but there seems to be a lot more of these cases, so perhaps this bug report should be kept open as some sort of "meta bug" to track these unneeded modules/compile-time options in one place.

For a start, the following entries can be removed from the kernel configs:

# MIPS SoCs by Lantiq (used in DSL routers)
CONFIG_NET_DSA_LANTIQ_GSWIP
CONFIG_SERIAL_LANTIQ
CONFIG_SPI_LANTIQ_SSC

# ARM64 SoCs by Rockchip (used in some SBCs and Chromebooks)
CONFIG_ROCKCHIP_PHY
CONFIG_SPI_ROCKCHIP

# 20 year old StrongARM CPUs by Intel (used in Sharp Zaurus PDAs)
CONFIG_SPI_PXA2XX
CONFIG_SPI_PXA2XX_PCI

# non-x86 XZ BCJ filter decoder
CONFIG_XZ_DEC_POWERPC
CONFIG_XZ_DEC_IA64
CONFIG_XZ_DEC_ARM
CONFIG_XZ_DEC_ARMTHUMB
CONFIG_XZ_DEC_SPARC
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Sunday, 19 September 2021, 08:45 GMT
Reason for closing:  Fixed
Comment by Pascal Ernster (hardfalcon) - Sunday, 31 January 2021, 00:32 GMT
I'm also wondering if PCMCIA stuff can be used at all on x86_64:

CONFIG_PCMCIA
CONFIG_PCMCIA_LOAD_CIS
CONFIG_CAN_PEAK_PCMCIA
CONFIG_MTD_PCMCIA
CONFIG_PARPORT_PC_PCMCIA
CONFIG_SCSI_LOWLEVEL_PCMCIA
CONFIG_PCMCIA_AHA152X
CONFIG_PCMCIA_FDOMAIN
CONFIG_PCMCIA_QLOGIC
CONFIG_PCMCIA_SYM53C500
CONFIG_PATA_PCMCIA
CONFIG_PCMCIA_3C574
CONFIG_PCMCIA_3C589
CONFIG_PCMCIA_NMCLAN
CONFIG_PCMCIA_XIRCOM
CONFIG_PCMCIA_FMVJ18X
CONFIG_PCMCIA_AXNET
CONFIG_PCMCIA_PCNET
CONFIG_PCMCIA_SMC91C92
CONFIG_PCMCIA_XIRC2PS
CONFIG_PCMCIA_ATMEL
CONFIG_PCMCIA_HERMES
CONFIG_PCMCIA_SPECTRUM
CONFIG_PCMCIA_RAYCS
CONFIG_PCMCIA_WL3501
CONFIG_COMEDI_PCMCIA_DRIVERS
Comment by loqs (loqs) - Tuesday, 02 February 2021, 00:05 GMT
disabling
CONFIG_XZ_DEC_POWERPC
CONFIG_XZ_DEC_IA64
CONFIG_XZ_DEC_ARM
CONFIG_XZ_DEC_ARMTHUMB
CONFIG_XZ_DEC_SPARC
would require enabling CONFIG_EXPERT which is only set on linux-lts to be able to disable or carrying a custom patch to remove the CONFIG_EXPERT dependency or change the default to n.
Comment by Jan Alexander Steffens (heftig) - Wednesday, 03 February 2021, 16:13 GMT
SPI_PXA2XX is required by SND_SOC_INTEL_BDW_RT5677_MACH which sounds decidedly newer than "20 years old".
Comment by Emil (xexaxo) - Wednesday, 03 February 2021, 17:05 GMT
Fwiw the dependency does seem very odd and the commit which introduced it [1] does not mention why.
People willing to get to the bottom, do reach out to the respective kernel developer/maintainer/mailing list.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.11-rc6&id=630db1549356f64424b8f532c028e7894df8e40b
Comment by Gunnar Bretthauer (Taijian) - Tuesday, 16 February 2021, 01:09 GMT
Something else that is unlikely to be usefull to regular Arch users seems to be the whole CAN code path [1]. From what I understand, this is mostly used in embedded systems and in the automotive industry to connect various systems inside a car on a common bus - so not the kind of hardware the typical Arch user is likely to use.

This would encompass the whole of
CONFIG_CAN=m
CONFIG_CAN_*=

[1] https://www.kernel.org/doc/html/latest/networking/can.html
Comment by loqs (loqs) - Tuesday, 16 February 2021, 01:15 GMT
CONFIG_CAN was requested in  FS#43209 
Comment by Gunnar Bretthauer (Taijian) - Tuesday, 16 February 2021, 11:08 GMT
OK, I looked at https://bugs.archlinux.org/task/43209 and there does not seem to be a reason given for the request for inclusion, beyond the fact that Debian does?
Comment by Emil (xexaxo) - Tuesday, 16 February 2021, 11:39 GMT
Archlinux is used by a handful of kernel developers and embedded hackers, which can benefit from the CAN bus/drivers.

Regardless, the original request is well and clearly defined. Adding more (CAN or otherwise) simply distracts from the original point. Feel free to keep those separate bug reports.
Comment by Gunnar Bretthauer (Taijian) - Tuesday, 16 February 2021, 11:44 GMT
OK, then I stand corrected and beg for forgiveness!
Comment by Pascal Ernster (hardfalcon) - Sunday, 14 March 2021, 03:51 GMT
I think the following two could also be removed, since BCM63xx is a family of MIPS-based SoCs used in DSL and GPON modems:

CONFIG_SERIAL_BCM63XX
CONFIG_SND_BCM63XX_I2S_WHISTLER

The configs of linux, linux-hardened and linux-zen 5.11.6.*1-1 have both modules enabled, while linux-lts 5.10.23-1 only has CONFIG_SND_BCM63XX_I2S_WHISTLER enabled.
Comment by Jan Alexander Steffens (heftig) - Sunday, 14 March 2021, 14:40 GMT
Disabled in trunk; thanks.
Comment by Andreas Radke (AndyRTR) - Monday, 15 March 2021, 06:22 GMT
Fixed in trunk for -lts as well.

Loading...