moby: tidy up the initrd kernel modules

This commit is contained in:
Colin 2024-05-23 02:07:02 +00:00
parent c51dcb30a2
commit d9922f8aa8

View File

@ -40,16 +40,23 @@ let
'';
in
{
# kernel compatibility (2024/05/21: ea8eaaa91ad0b5a1716e69aad65d61e7cb2e7353)
# kernel compatibility (2024/05/22: 03dab630)
# - linux-megous: boots to ssh, desktop
# - linux-postmarketos: boots to ssh, no graphics
# boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux-postmarketos;
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux-megous;
# - camera apps: megapixels (no cameras found), snapshot (no cameras found)
# - linux-postmarketos: boots to ssh. desktop ONLY if "anx7688" is in the initrd.availableKernelModules.
# - camera apps: megapixels (both rear and front cameras work), `cam -l` (finds only the rear camera), snapshot (no cameras found)
# - linux-megous.override { withMegiPinephoneConfig = true; }: NO SSH, NO SIGNS OF LIFE
# - linux-megous.override { withFullConfig = false; }: boots to ssh, no desktop
#
boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.linux-postmarketos.override {
withModemPower = true;
});
# boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux-megous;
# boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.linux-megous.override {
# withMegiPinephoneConfig = true; #< TODO: untested!
# withFullConfig = false;
# });
# boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.linux-megous.override {
# withFullConfig = false; #< TODO: untested!
# withMegiPinephoneConfig = true; #< N.B.: does not boot as of 2024/05/22!
# });
# boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux-manjaro;
# boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_latest;
@ -77,19 +84,18 @@ in
# "drm" #< force drm to be plugged
# ];
boot.initrd.availableKernelModules = [
# these aren't (likely) all needed, however without at least the display-related modules then display initialization is unpredictable.
# without this, linux-megous with autoModules and preferBuiltin initializes the display fine, but linux-postmarketos fails.
# either way, providing display modules in initrd allows the display to be initialized much earlier in boot (like 20s earlier).
# megous/nixpkgs modules:
# 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:
# - `lsmod | sort | cut -d ' ' -f 1`
#"8723cs"
"anx7688"
"axp20x_adc"
"axp20x_battery"
"axp20x_pek"
"axp20x_usb_power"
"backlight"
"blake2b_generic"
# "8723cs"
# "axp20x_adc" #< NOT FOUND in megous-no-autoModules
# "axp20x_battery"
# "axp20x_pek"
# "axp20x_usb_power"
# "backlight"
# "blake2b_generic"
# "bluetooth"
# "bridge"
# "btbcm"
@ -103,26 +109,26 @@ in
# "crct10dif_ce"
# "crypto_engine"
# "display_connector" #< NOT FOUND in pmos
"drm"
"drm_display_helper"
"drm_dma_helper"
"drm_kms_helper"
"drm_shmem_helper"
"dw_hdmi"
# "drm"
# "drm_display_helper"
# "drm_dma_helper"
# "drm_kms_helper"
# "drm_shmem_helper"
# "dw_hdmi"
# "dw_hdmi_cec" #< NOT FOUND in pmos
"dw_hdmi_i2s_audio"
# "dw_hdmi_i2s_audio"
# "ecc"
# "ecdh_generic"
"fuse"
"gc2145"
"goodix_ts"
"gpio_vibra"
"gpu_sched"
"hci_uart"
"i2c_gpio"
"inv_mpu6050"
"inv_mpu6050_i2c"
"inv_sensors_timestamp"
# "fuse"
# "gc2145" #< NOT FOUND in megous-no-autoModules
# "goodix_ts"
# "gpio_vibra" #< NOT FOUND in megous-no-autoModules
# "gpu_sched"
# "hci_uart"
# "i2c_gpio"
# "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"
# "ip_set"
@ -130,19 +136,19 @@ in
# "ip_tables"
# "ipt_rpfilter"
# "joydev"
"led_class_flash"
"leds_sgm3140"
"ledtrig_pattern"
# "led_class_flash" #< NOT FOUND in megous-no-autoModules
# "leds_sgm3140" #< NOT FOUND in megous-no-autoModules
# "ledtrig_pattern" #< NOT FOUND in megous-no-autoModules
# "libarc4"
# "libchacha"
# "libchacha20poly1305"
# "libcrc32c"
# "libcurve25519_generic"
"lima"
# "lima"
# "llc"
# "mac80211"
# "macvlan"
"mc"
# "mc"
# "modem_power"
# "mousedev"
# "nf_conntrack"
@ -157,17 +163,17 @@ in
# "nls_cp437"
# "nls_iso8859_1"
# "nvmem_reboot_mode"
"ov5640"
"panel_sitronix_st7703"
"phy_sun6i_mipi_dphy"
# "ov5640"
# "panel_sitronix_st7703"
# "phy_sun6i_mipi_dphy"
# "pinctrl_axp209" #< NOT FOUND in pmos
"pinephone_keyboard"
# "pinephone_keyboard" #< NOT FOUND in megous-no-autoModules
# "poly1305_neon"
# "polyval_ce"
# "polyval_generic"
"ppkb_manager"
"pwm_bl"
"pwm_sun4i"
# "ppkb_manager" #< NOT FOUND in megous-no-autoModules
# "pwm_bl"
# "pwm_sun4i"
# "qrtr"
# "raid6_pq"
# "rfkill"
@ -178,54 +184,54 @@ in
# "rtw88_sdio"
# "sch_fq_codel"
# "sm4"
"snd_soc_bt_sco"
"snd_soc_ec25"
"snd_soc_hdmi_codec"
"snd_soc_simple_amplifier"
"snd_soc_simple_card"
"snd_soc_simple_card_utils"
"stk3310"
"st_magn"
"st_magn_i2c"
# "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"
# "st_sensors_i2c"
# "st_sensors_spi" #< NOT FOUND in pmos
"sun4i_drm"
"sun4i_i2s"
"sun4i_lradc_keys"
"sun4i_tcon"
"sun50i_codec_analog"
"sun6i_csi"
"sun6i_dma"
"sun6i_mipi_dsi"
"sun8i_a33_mbus"
"sun8i_adda_pr_regmap"
# "sun4i_drm"
# "sun4i_i2s"
# "sun4i_lradc_keys" #< NOT FOUND in megous-no-autoModules
# "sun4i_tcon"
# "sun50i_codec_analog"
# "sun6i_csi"
# "sun6i_dma"
# "sun6i_mipi_dsi"
# "sun8i_a33_mbus" #< NOT FOUND in megous-no-autoModules
# "sun8i_adda_pr_regmap"
# "sun8i_ce" #< NOT FOUND in pmos
"sun8i_codec"
"sun8i_di"
"sun8i_drm_hdmi"
"sun8i_mixer"
"sun8i_rotate"
"sun8i_tcon_top"
"sun9i_hdmi_audio"
# "sun8i_codec" #< NOT FOUND in megous-no-autoModules
# "sun8i_di" #< NOT FOUND in megous-no-autoModules
# "sun8i_drm_hdmi"
# "sun8i_mixer"
# "sun8i_rotate" #< NOT FOUND in megous-no-autoModules
# "sun8i_tcon_top"
# "sun9i_hdmi_audio" #< NOT FOUND in megous-no-autoModules
# "sunxi_wdt" #< NOT FOUND in pmos
# "tap"
# "typec" #< NOT FOUND in pmos
# "udp_tunnel"
# "uio" #< NOT FOUND in pmos
# "uio_pdrv_genirq"
"v4l2_async"
# "v4l2_async"
# "v4l2_cci" #< NOT FOUND in pmos
"v4l2_flash_led_class"
"v4l2_fwnode"
"v4l2_mem2mem"
"videobuf2_common"
"videobuf2_dma_contig"
"videobuf2_memops"
"videobuf2_v4l2"
"videodev"
# "v4l2_flash_led_class" #< NOT FOUND in megous-no-autoModules
# "v4l2_fwnode"
# "v4l2_mem2mem"
# "videobuf2_common"
# "videobuf2_dma_contig"
# "videobuf2_memops"
# "videobuf2_v4l2"
# "videodev"
# "wireguard"
# "xor"
# "x_tables"
@ -236,72 +242,6 @@ in
# "xt_set"
# "xt_tcpudp"
# "zram"
# # postmarketOS modules
# # - `lsmod | sort | cut -d ' ' -f 1`
# # "8723cs"
# "anx7688"
# # "bluetooth"
# # "bnep"
# # "bridge"
# "btbcm"
# "btrfs"
# "btrtl"
# # "ecc"
# # "ecdh_generic"
# "gc2145"
# "gpio_vibra"
# "hci_uart"
# "i2c_algo_bit"
# "i2c_gpio"
# "industrialio_triggered_buffer"
# "inv_mpu6050"
# "inv_mpu6050_i2c"
# "inv_sensors_timestamp"
# # "ip6_udp_tunnel"
# "kfifo_buf"
# # "libchacha20poly1305"
# # "libcurve25519_generic"
# "llc"
# # "macvlan"
# # "nf_tables"
# # "nft_chain_nat"
# # "nft_compat"
# "ov5640"
# "pinephone_keyboard"
# "ppkb_manager"
# "raid6_pq"
# "snd"
# "snd_pcm"
# "snd_pcm_dmaengine"
# "snd_soc_bt_sco"
# "snd_soc_core"
# "snd_soc_ec25"
# "snd_soc_simple_amplifier"
# "snd_soc_simple_card"
# "snd_soc_simple_card_utils"
# "snd_timer"
# "soundcore"
# "stk3310"
# "st_magn"
# "st_magn_i2c"
# # "stp"
# "st_sensors"
# "st_sensors_i2c"
# "sun4i_i2s"
# "sun4i_lradc_keys"
# "sun50i_codec_analog"
# "sun8i_a33_mbus"
# "sun8i_adda_pr_regmap"
# "sun8i_codec"
# "sun9i_hdmi_audio"
# # "udp_tunnel"
# # "wireguard"
# # "xor"
# # "zram"
# # "zsmalloc"
# # "zstd"
# # "zstd_compress"
];
# disable proximity sensor.