diff --git a/.gitattributes b/.gitattributes index bbec9b8..6a5c57a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,3 +2,4 @@ *.xz filter=lfs diff=lfs merge=lfs -text *.mbn filter=lfs diff=lfs merge=lfs -text *.bin filter=lfs diff=lfs merge=lfs -text +*.dtb filter=lfs diff=lfs merge=lfs -text diff --git a/flake.nix b/flake.nix index 798dd55..38a196d 100644 --- a/flake.nix +++ b/flake.nix @@ -94,38 +94,42 @@ # BUILT-IN HARDWARE DRIVERS FOR INITRD-LESS BOOT # --------------------------------------------------------- - # 0. Core Subsystems (Forced to override NixOS defaults) + # 0. Core Storage & Security Subsystems SCSI = pkgs.lib.mkForce yes; BLK_DEV_SD = pkgs.lib.mkForce yes; - EXTCON = pkgs.lib.mkForce yes; + RPMB = pkgs.lib.mkForce yes; - # USB Frameworks - USB_XHCI_HCD = pkgs.lib.mkForce yes; - USB_XHCI_PLATFORM = pkgs.lib.mkForce yes; - USB_ROLE_SWITCH = pkgs.lib.mkForce yes; - USB_GADGET = pkgs.lib.mkForce yes; + # Master Physical Layer Framework + PHY_QCOM_QMP = pkgs.lib.mkForce yes; - # 1. UFS Storage Stack + # 1. UFS Storage Stack (Mounts the root disk) SCSI_UFSHCD = yes; SCSI_UFSHCD_PLATFORM = yes; SCSI_UFS_QCOM = yes; PHY_QCOM_QMP_UFS = yes; - # 2. Display Subsystem - DRM_MSM = yes; + # 2. Qualcomm SoC Subsystems (Required for Display) + QCOM_OCMEM = pkgs.lib.mkForce yes; + QCOM_LLCC = pkgs.lib.mkForce yes; + QCOM_COMMAND_DB = pkgs.lib.mkForce yes; - # 3. USB Host & Recovery Stack - USB_DWC3 = yes; - USB_DWC3_QCOM = yes; - PHY_QCOM_QMP_USB = yes; - USB_STORAGE = yes; - USB_UAS = yes; + # 3. Display Subsystem (Turns on the screen) + DRM_MSM = yes; }; }; in lib.recurseIntoAttrs (pkgs.linuxPackagesFor customKernel); + # ------------------------------------------------------------------- + # 4. Hardware & Device Tree Override + # ------------------------------------------------------------------- hardware.deviceTree.enable = true; + + # Point Nix directly to your known-working binary DTB file + hardware.deviceTree.package = lib.mkForce (pkgs.runCommand "pipa-working-dtb" {} '' + mkdir -p $out/qcom + cp ${./sm8250-xiaomi-pipa.dtb} $out/qcom/sm8250-xiaomi-pipa.dtb + ''); hardware.deviceTree.name = "qcom/sm8250-xiaomi-pipa.dtb"; # ------------------------------------------------------------------- diff --git a/sm8250-xiaomi-pipa.dtb b/sm8250-xiaomi-pipa.dtb new file mode 100644 index 0000000..60f7362 --- /dev/null +++ b/sm8250-xiaomi-pipa.dtb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:914201acdfe44d173d157383943bd302b6d631c5008d2d3796ca3448e9a11301 +size 136398