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

View File

@@ -667,19 +667,16 @@ linux.override {
name = "enable options for Pinephone"; name = "enable options for Pinephone";
patch = null; patch = null;
extraStructuredConfig = with lib.kernel; { extraStructuredConfig = with lib.kernel; {
# borrowed from postmarketOS, "to enable libcamera development" # VIDEO_SUNXI defaults to `n` since the driver is in staging (as of 2024-09-18)
# pmaports commit f18c7210ab VIDEO_SUNXI = yes;
# DMABUF_HEAPS = yes; # VIDEO_SUNXI_CEDRUS = module; #< implied by VIDEO_SUNXI
# DMABUF_HEAPS_CMA = yes;
# borrowed from postmarketOS, speculatively, as i debug megapixels camera BACKLIGHT_CLASS_DEVICE = yes; #< required for display initialization (adding "backlight" to initrd does not fix display)
# CMA_AREAS = "CMA allows to create CMA areas for particular purpose, mainly, used as device private area." # AXP20X_ADC = yes; #< required for display initialization (or add "axp20x_adc" to `boot.initrd.availableKernelModules`)
# "If unsure, leave the default value "8" in UMA and "20" in NUMA."
# - pinephone in mainline linux, postmarketOS, defaults to 7 # XXX(2024-09-18): megapixels(-next) fails to open the camera without this option:
# - nixos defaults to ... 19? 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_AREAS = freeform "7";
# DRM_ACCEL = lib.mkForce no;
# 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` # #vvv aside from SUN50I_IOMMU, this is just upgrading modules to `y`
# DMA_SUN6I = yes; # DMA_SUN6I = yes;
@@ -689,11 +686,6 @@ linux.override {
# VIDEOBUF2_MEMOPS = yes; # VIDEOBUF2_MEMOPS = yes;
# VIDEOBUF2_DMA_CONTIG = 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; # MFD_SUN6I_PRCM = yes;
# allow kernel modules to read the device tree at runtime # 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?) # some or all of this is required for `megapixels`(-next) to operate the camera (possibly CMA/DMA related?)
# ARM64_LPA2 = yes; # 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_VA_BITS = freeform "48";
# ARM64_PA_BITS_48 = yes; # ARM64_PA_BITS_48 = yes;
# ARM64_PA_BITS = freeform "48"; # ARM64_PA_BITS = freeform "48";
@@ -764,7 +756,6 @@ linux.override {
# TOUCHSCREEN_GOODIX = yes; # TOUCHSCREEN_GOODIX = yes;
# some or all of these are required for display initialization. # 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; # INPUT_AXP20X_PEK = yes;
# CHARGER_AXP20X = yes; # CHARGER_AXP20X = yes;
# BATTERY_AXP20X = yes; # BATTERY_AXP20X = yes;
@@ -806,7 +797,7 @@ linux.override {
# DRM_LIMA = yes; # DRM_LIMA = yes;
# DRM_PANFROST = yes; # DRM_PANFROST = yes;
BACKLIGHT_CLASS_DEVICE = yes; #< required for display initialization # BACKLIGHT_CLASS_DEVICE = yes;
# LCD_CLASS_DEVICE = yes; # LCD_CLASS_DEVICE = yes;
# BACKLIGHT_PWM = yes; # BACKLIGHT_PWM = yes;
# DMA_SUN6I = yes; # DMA_SUN6I = yes;
@@ -831,11 +822,29 @@ linux.override {
# USB_SERIAL = lib.mkForce module; # USB_SERIAL = lib.mkForce module;
# ZSWAP = lib.mkForce no; # ZSWAP = lib.mkForce no;
# # ZPOOL = 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) [ ] ++ lib.optionals (!withFullConfig) [
{ {
name = "enable-rtw88-wifi-drivers"; name = "enable-rtw88-wifi-drivers";