diff --git a/TODO.md b/TODO.md index bda7b7e7a..57c250519 100644 --- a/TODO.md +++ b/TODO.md @@ -34,7 +34,6 @@ ## REFACTORING: - fold hosts/modules/ into toplevel modules/ -- define moby kernel via the nixpkgs options instead of `linux-armbian` package. - add import checks to my Python nix-shell scripts - consolidate ~/dev and ~/ref - ~/dev becomes a link to ~/ref/cat/mine diff --git a/hosts/modules/hal/pine64-pinephone-pro/default.nix b/hosts/modules/hal/pine64-pinephone-pro/default.nix index 66f58ebef..d8f19bb7c 100644 --- a/hosts/modules/hal/pine64-pinephone-pro/default.nix +++ b/hosts/modules/hal/pine64-pinephone-pro/default.nix @@ -28,10 +28,29 @@ in # - cameras, sound, etc untested # - linux-sane-pinephonepro (6.11.0; pmos config + nixpkgs config): FAILS TO BOOT # boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux-postmarketos-pinephonepro; - boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux-sane-pinephonepro; + # boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux-sane-pinephonepro; # boot.kernelPackages = pkgs.linuxPackagesFor myCustomKernel; # boot.initrd.extraFiles."/lib".source = "${config.system.modulesTree}/lib"; + boot.kernelPatches = [ + { + # TODO: upstream into nixpkgs. + name = "fix-module-builtin-mismatch"; + patch = null; + extraStructuredConfig = with lib.kernel; { + # nixpkgs specifies `SUN8I_DE2_CCU = yes`, but that in turn requires `SUNXI_CCU = yes` and NOT `= module` + # symptom: config fails to eval + SUNXI_CCU = yes; + # nixpkgs specifies `DRM = yes`, which causes `DRM_PANEL=y`. + # in they branch based on if `CONFIG_BACKLIGHT_DEVICE` is a *builtin*, + # hence we need to build it as a builtin to actually have a backlight! + # same logic happens with nixpkgs `DRM_FBDEV_EMULATION = yes` => implies `CONFIG_DRM_KMS_HELPER=y` + # and + BACKLIGHT_CLASS_DEVICE = yes; + }; + } + ]; + hardware.deviceTree.overlays = [ { name = "rk3399-pinephone-pro";