moby: clean up kernel config

This commit is contained in:
2024-09-19 08:25:40 +00:00
parent 3c660df817
commit 717af4e5ff
2 changed files with 56 additions and 32 deletions

View File

@@ -71,11 +71,15 @@ in
boot.initrd.availableKernelModules = [
# see <repo:postmarketOS/pmaports:device/main/device-pine64-pinephone/modules-initfs>
# - they include sun6i_mipi_dsi sun4i_drm pwm_sun4i sun8i_mixer anx7688 gpio_vibra pinephone_keyboard
"anx7688" #< required for display initialization and functional cameras
# full list of modules active post-boot with the linux-megous kernel + autoModules=true:
# "anx7688" #< historically required for display initialization and functional cameras (pre-2024-09-18)
"axp20x_adc" #< required for display initialization (if not compiled in)
# full list of modules active post-boot with EITHER of:
# - the linux-megous kernel + autoModules=true:
# - mainline 6.11.0 + autoModules=true
# - `lsmod | sort | cut -d ' ' -f 1`
# "8723cs"
"axp20x_adc" #< NOT FOUND in megous-no-autoModules
# "axp20x_adc"
# "axp20x_battery"
# "axp20x_pek"
# "axp20x_usb_power"
@@ -87,6 +91,7 @@ in
# "btqca"
# "btrfs"
# "btrtl"
# "cdc_ether"
# "cec"
# "cfg80211"
# "chacha_neon"
@@ -114,14 +119,16 @@ in
# "inv_mpu6050" #< NOT FOUND in megous-no-autoModules
# "inv_mpu6050_i2c" #< NOT FOUND in megous-no-autoModules
# "inv_sensors_timestamp" #< NOT FOUND in megous-no-autoModules
# "ip6t_rpfilter"
# "ip6_udp_tunnel"
# "ip6t_rpfilter"
# "ip_set"
# "ip_set_hash_ipport"
# "ip_tables"
# "ipt_rpfilter"
# "joydev"
# "led_class_flash" #< NOT FOUND in megous-no-autoModules
# "led_class_multicolor"
# "leds_group_multicolor"
# "leds_sgm3140" #< NOT FOUND in megous-no-autoModules
# "ledtrig_pattern" #< NOT FOUND in megous-no-autoModules
# "libarc4"
@@ -141,8 +148,8 @@ in
# "nf_defrag_ipv6"
# "nf_log_syslog"
# "nf_nat"
# "nfnetlink"
# "nf_tables"
# "nfnetlink"
# "nft_chain_nat"
# "nft_compat"
# "nls_cp437"
@@ -169,20 +176,24 @@ in
# "rtw88_sdio"
# "sch_fq_codel"
# "sm4"
# "snd_hrtimer"
# "snd_seq"
# "snd_seq_device"
# "snd_seq_dummy"
# "snd_soc_bt_sco"
# "snd_soc_ec25" #< NOT FOUND in megous-no-autoModules
# "snd_soc_hdmi_codec"
# "snd_soc_simple_amplifier"
# "snd_soc_simple_card"
# "snd_soc_simple_card_utils"
# "stk3310" #< NOT FOUND in megous-no-autoModules
# "st_magn"
# "st_magn_i2c"
# "st_magn_spi" #< NOT FOUND in pmos
# "stp"
# "st_sensors"
# "st_sensors_i2c"
# "st_sensors_spi" #< NOT FOUND in pmos
# "stk3310" #< NOT FOUND in megous-no-autoModules
# "stp"
# "sun4i_drm"
# "sun4i_i2s"
# "sun4i_lradc_keys" #< NOT FOUND in megous-no-autoModules
@@ -201,12 +212,14 @@ in
# "sun8i_rotate" #< NOT FOUND in megous-no-autoModules
# "sun8i_tcon_top"
# "sun9i_hdmi_audio" #< NOT FOUND in megous-no-autoModules
# "sunxi_cedrus"
# "sunxi_wdt" #< NOT FOUND in pmos
# "tap"
# "typec" #< NOT FOUND in pmos
# "udp_tunnel"
# "uio" #< NOT FOUND in pmos
# "uio_pdrv_genirq"
# "usbnet"
# "v4l2_async"
# "v4l2_cci" #< NOT FOUND in pmos
# "v4l2_flash_led_class" #< NOT FOUND in megous-no-autoModules
@@ -218,10 +231,12 @@ in
# "videobuf2_v4l2"
# "videodev"
# "wireguard"
# "xor"
# "x_tables"
# "xt_conntrack"
# "xor"
# "xor_neon"
# "xt_LOG"
# "xt_conntrack"
# "xt_iprange"
# "xt_nat"
# "xt_pkttype"
# "xt_set"

View File

@@ -667,19 +667,16 @@ linux.override {
name = "enable options for Pinephone";
patch = null;
extraStructuredConfig = with lib.kernel; {
# borrowed from postmarketOS, "to enable libcamera development"
# pmaports commit f18c7210ab
# DMABUF_HEAPS = yes;
# DMABUF_HEAPS_CMA = yes;
# borrowed from postmarketOS, speculatively, as i debug megapixels camera
# CMA_AREAS = "CMA allows to create CMA areas for particular purpose, mainly, used as device private area."
# "If unsure, leave the default value "8" in UMA and "20" in NUMA."
# - pinephone in mainline linux, postmarketOS, defaults to 7
# - nixos defaults to ... 19?
# CMA_AREAS = freeform "7";
# DRM_ACCEL = lib.mkForce no;
# VIDEO_SUNXI defaults to `n` since the driver is in staging (as of 2024-09-18)
VIDEO_SUNXI = yes;
# VIDEO_SUNXI_CEDRUS = module; #< implied by VIDEO_SUNXI
BACKLIGHT_CLASS_DEVICE = yes; #< required for display initialization (adding "backlight" to initrd does not fix display)
# AXP20X_ADC = yes; #< required for display initialization (or add "axp20x_adc" to `boot.initrd.availableKernelModules`)
# XXX(2024-09-18): megapixels(-next) fails to open the camera without this option:
ARM64_VA_BITS_48 = yes; #< 48 (not 52) bits for virtual addresses. the other bit widths (ARM64_VA*, ARM64_PA_*, PGTABLE_LEVELS) are then derived/implied same as pmos config
# CMA_SIZE_MBYTES = lib.mkForce (freeform "256"); #< also available at boot time via `cma=256M` CLI
# #vvv aside from SUN50I_IOMMU, this is just upgrading modules to `y`
# DMA_SUN6I = yes;
@@ -689,11 +686,6 @@ linux.override {
# VIDEOBUF2_MEMOPS = yes;
# VIDEOBUF2_DMA_CONTIG = yes;
# VIDEO_SUNXI defaults to `n` since the driver is in staging (as of 2024-09-18)
VIDEO_SUNXI = yes;
# VIDEO_SUNXI_CEDRUS = yes;
# # VIDEO_SUNXI_CEDRUS = module; #< implied by VIDEO_SUNXI
# MFD_SUN6I_PRCM = yes;
# allow kernel modules to read the device tree at runtime
@@ -732,7 +724,7 @@ linux.override {
# some or all of this is required for `megapixels`(-next) to operate the camera (possibly CMA/DMA related?)
# ARM64_LPA2 = yes;
ARM64_VA_BITS_48 = yes; #< 48 (not 52) bits for virtual addresses. the other bit widths are then derived same as pmos config
# ARM64_VA_BITS_48 = yes;
# ARM64_VA_BITS = freeform "48";
# ARM64_PA_BITS_48 = yes;
# ARM64_PA_BITS = freeform "48";
@@ -764,7 +756,6 @@ linux.override {
# TOUCHSCREEN_GOODIX = yes;
# some or all of these are required for display initialization.
# removing these, and adding their modules to initrd, still results in no display.
# INPUT_AXP20X_PEK = yes;
# CHARGER_AXP20X = yes;
# BATTERY_AXP20X = yes;
@@ -806,7 +797,7 @@ linux.override {
# DRM_LIMA = yes;
# DRM_PANFROST = yes;
BACKLIGHT_CLASS_DEVICE = yes; #< required for display initialization
# BACKLIGHT_CLASS_DEVICE = yes;
# LCD_CLASS_DEVICE = yes;
# BACKLIGHT_PWM = yes;
# DMA_SUN6I = yes;
@@ -831,11 +822,29 @@ linux.override {
# USB_SERIAL = lib.mkForce module;
# ZSWAP = lib.mkForce no;
# # ZPOOL = lib.mkForce no;
# see: <https://gitlab.com/postmarketOS/pmaports/-/merge_requests/5541/>
# UDMABUF = yes; #< not needed (nixos default)
};
}
# {
# name = "enable options for libcamera development";
# patch = null;
# extraStructuredConfig = with lib.kernel; {
# # borrowed from postmarketOS, "to enable libcamera development"
# # pmaports commit f18c7210ab
# # DMABUF_HEAPS = yes;
# # DMABUF_HEAPS_CMA = yes;
# # borrowed from postmarketOS, speculatively, as i debug megapixels camera
# # CMA_AREAS = "CMA allows to create CMA areas for particular purpose, mainly, used as device private area."
# # "If unsure, leave the default value "8" in UMA and "20" in NUMA."
# # - pinephone in mainline linux, postmarketOS, defaults to 7
# # - nixos defaults to ... 19?
# # CMA_AREAS = freeform "7";
# # DRM_ACCEL = lib.mkForce no;
# # CMA_SIZE_MBYTES = lib.mkForce (freeform "256"); #< also available at boot time via `cma=256M` CLI
# # see: <https://gitlab.com/postmarketOS/pmaports/-/merge_requests/5541/>
# # UDMABUF = yes; #< not needed (nixos default)
# }
] ++ lib.optionals (!withFullConfig) [
{
name = "enable-rtw88-wifi-drivers";