New paste Repaste Download
diff --git a/flake.nix b/flake.nix
index 8409ab0..b07905b 100644
--- a/flake.nix
+++ b/flake.nix
@@ -14,7 +14,7 @@
       # Modify this of you want to attempt using a different device.
       # See the `arch/arm64/boot/dts/qcom` directory in the Linux
       # kernel source tree for available device trees.
-      deviceTreeName = "qcom/x1e80100-lenovo-yoga-slim7x.dtb";
+      deviceTreeName = "qcom/x1e78100-lenovo-thinkpad-t14s.dtb";
       nixpkgs-patched =
         let
@@ -31,7 +31,7 @@
           { allowSubstitutes = true; };
       pkgs-cross = import nixpkgs-patched {
-        overlays = [ (import ./packages/overlay.nix) ];
+        overlays = [ (import ./packages/overlay.nix) (import ./packages/overlay-grub.nix) ];
         localSystem.system = buildSystem;
         crossSystem.system = "aarch64-linux";
         allowUnsupportedSystem = true;
diff --git a/packages/grub.patch b/packages/grub.patch
new file mode 100644
index 0000000..4ec1109
--- /dev/null
+++ b/packages/grub.patch
@@ -0,0 +1,26 @@
+diff --git a/debian/patches/0128-4GB-memory-limit-to-fix-T14s-with-64GB-of-ram-dying.patch b/debian/patches/0128-4GB-memory-limit-to-fix-T14s-with-64GB-of-ram-dying.patch
+new file mode 100644
+index 000000000..7339e7abc
+--- /dev/null
++++ b/debian/patches/0128-4GB-memory-limit-to-fix-T14s-with-64GB-of-ram-dying.patch
+@@ -0,0 +1,20 @@
++From: Tobias Heider <me@tobhe.de>
++Date: Sat, 7 Sep 2024 22:31:38 +0200
++Subject: 4GB memory limit to fix T14s with 64GB of ram dying
++
++---
++ include/grub/arm64/efi/memory.h | 2 +-
++ 1 file changed, 1 insertion(+), 1 deletion(-)
++
++diff --git a/include/grub/arm64/efi/memory.h b/include/grub/arm64/efi/memory.h
++index c6cb324..eb6f1bb 100644
++--- a/include/grub/arm64/efi/memory.h
+++++ b/include/grub/arm64/efi/memory.h
++@@ -1,6 +1,6 @@
++ #ifndef GRUB_MEMORY_CPU_HEADER
++ #include <grub/efi/memory.h>
++
++-#define GRUB_EFI_MAX_USABLE_ADDRESS 0xffffffffffffULL
+++#define GRUB_EFI_MAX_USABLE_ADDRESS 0xffffffffULL
++
++ #endif /* ! GRUB_MEMORY_CPU_HEADER */
diff --git a/packages/overlay-grub.nix b/packages/overlay-grub.nix
new file mode 100644
index 0000000..b0018f4
--- /dev/null
+++ b/packages/overlay-grub.nix
@@ -0,0 +1,9 @@
+final: prev: {
+  grub2 = prev.grub2.overrideAttrs (old: {
+    patches =
+      (old.patches or [])
+      ++ [
+        ./grub.patch
+      ];
+  });
+}
Filename: None. Size: 2kb. View raw, , hex, or download this file.

This paste expires on 2025-04-24 22:23:37.656881. Pasted through web.