diff --git a/starfive/visionfive/v2/README.md b/starfive/visionfive/v2/README.md index 4dea95f..d6655ce 100644 --- a/starfive/visionfive/v2/README.md +++ b/starfive/visionfive/v2/README.md @@ -3,9 +3,7 @@ Create and configure the `flake.nix` file: ``` nix { - # Kernel is broken on riscv64 see https://github.com/NixOS/nixpkgs/issues/225756 - inputs.nixpkgs.url = - "github:nixos/nixpkgs/c3e12e57c3e3d5c84cc500420be4507b3de33e90"; + inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; inputs.nixos-hardware.url = "github:nixos/nixos-hardware"; inputs.flake-utils.url = "github:numtide/flake-utils"; outputs = { self, nixpkgs, nixos-hardware, flake-utils }: diff --git a/starfive/visionfive/v2/default.nix b/starfive/visionfive/v2/default.nix index 91a7645..ffe6a68 100644 --- a/starfive/visionfive/v2/default.nix +++ b/starfive/visionfive/v2/default.nix @@ -5,7 +5,7 @@ lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ]; consoleLogLevel = lib.mkDefault 7; kernelPackages = - lib.mkDefault (pkgs.callPackage ./linux_6_3.nix { inherit (config.boot) kernelPatches; }); + lib.mkDefault (pkgs.callPackage ./linux-6.3.nix { inherit (config.boot) kernelPatches; }); kernelParams = lib.mkDefault [ "console=tty0" "console=ttyS0,115200n8" "earlycon=sbi" ]; diff --git a/starfive/visionfive/v2/linux_6_3.nix b/starfive/visionfive/v2/linux-6.3.nix similarity index 70% rename from starfive/visionfive/v2/linux_6_3.nix rename to starfive/visionfive/v2/linux-6.3.nix index 88c7887..f35c071 100644 --- a/starfive/visionfive/v2/linux_6_3.nix +++ b/starfive/visionfive/v2/linux-6.3.nix @@ -14,7 +14,16 @@ let }; inherit modDirVersion; - kernelPatches = [{ patch = ./fix-memory-size.patch; }] ++ kernelPatches; + kernelPatches = [ + { patch = ./fix-memory-size.patch; } + { + patch = fetchpatch { + url = + "https://github.com/torvalds/linux/commit/d83806c4c0cccc0d6d3c3581a11983a9c186a138.diff"; + hash = "sha256-xUnEJkzQRIIBF/0GIpS0Cd+h6OdSiJlyva5xwxtleE0="; + }; + } + ] ++ kernelPatches; structuredExtraConfig = with lib.kernel; { PL330_DMA = no;