Merge #634
634: starfive visionfive2: replace 8GB memory patch with overlay r=Mic92 a=leifhelm Co-authored-by: Jakob Leifhelm <jakob.leifhelm@gmail.com>
This commit is contained in:
commit
f6792e7c7a
|
@ -31,10 +31,6 @@ Create and configure the `flake.nix` file:
|
|||
# networking.interfaces.end0.useDHCP = true;
|
||||
# networking.interfaces.end1.useDHCP = true;
|
||||
|
||||
# If you have the 2A variant uncomment the following line
|
||||
# hardware.deviceTree.name =
|
||||
# lib.mkDefault "starfive/jh7110-starfive-visionfive-2-v1.2a.dtb";
|
||||
|
||||
# Additional configuration goes here
|
||||
|
||||
sdImage.compressImage = false;
|
||||
|
@ -57,3 +53,33 @@ Build the sd image.
|
|||
``` sh
|
||||
nix build .#
|
||||
```
|
||||
|
||||
## Additional configuration
|
||||
Additional configuration may be needed depending on your specific hardware configuration.
|
||||
### Board rev 1.2A
|
||||
If you have the 1.2A board revision add the following to your config:
|
||||
``` nix
|
||||
hardware.deviceTree.name =
|
||||
lib.mkDefault "starfive/jh7110-starfive-visionfive-2-v1.2a.dtb";
|
||||
```
|
||||
|
||||
### 8GB memory
|
||||
If your board has 8GB of RAM add the following to your config:
|
||||
|
||||
#### Board rev 1.3B
|
||||
``` nix
|
||||
hardware.deviceTree.overlays = [{
|
||||
name = "8GB-patch";
|
||||
dtsFile =
|
||||
"${nixos-hardware}/starfive/visionfive/v2/visionfive-2-v1.3b-8GB.dts";
|
||||
}];
|
||||
```
|
||||
|
||||
#### Board rev 1.2A
|
||||
``` nix
|
||||
hardware.deviceTree.overlays = [{
|
||||
name = "8GB-patch";
|
||||
dtsFile =
|
||||
"${nixos-hardware}/starfive/visionfive/v2/visionfive-2-v1.2a-8GB.dts";
|
||||
}];
|
||||
```
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
|
||||
index 752bb0b6fd00..93670da6cabd 100644
|
||||
--- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
|
||||
+++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
|
||||
@@ -30,7 +30,7 @@ cpus {
|
||||
|
||||
memory@40000000 {
|
||||
device_type = "memory";
|
||||
- reg = <0x0 0x40000000 0x1 0x0>;
|
||||
+ reg = <0x0 0x40000000 0x2 0x0>;
|
||||
};
|
||||
|
||||
thermal-zones {
|
|
@ -15,7 +15,6 @@ let
|
|||
|
||||
inherit modDirVersion;
|
||||
kernelPatches = [
|
||||
{ patch = ./fix-memory-size.patch; }
|
||||
{
|
||||
patch = fetchpatch {
|
||||
url =
|
||||
|
|
11
starfive/visionfive/v2/visionfive-2-v1.2a-8GB.dts
Normal file
11
starfive/visionfive/v2/visionfive-2-v1.2a-8GB.dts
Normal file
|
@ -0,0 +1,11 @@
|
|||
/dts-v1/;
|
||||
/plugin/;
|
||||
/ {
|
||||
compatible = "starfive,visionfive-2-v1.2a", "starfive,jh7110";
|
||||
fragment@0 {
|
||||
target-path = "/memory@40000000";
|
||||
__overlay__ {
|
||||
reg = <0x0 0x40000000 0x2 0x0>;
|
||||
};
|
||||
};
|
||||
};
|
11
starfive/visionfive/v2/visionfive-2-v1.3b-8GB.dts
Normal file
11
starfive/visionfive/v2/visionfive-2-v1.3b-8GB.dts
Normal file
|
@ -0,0 +1,11 @@
|
|||
/dts-v1/;
|
||||
/plugin/;
|
||||
/ {
|
||||
compatible = "starfive,visionfive-2-v1.3b", "starfive,jh7110";
|
||||
fragment@0 {
|
||||
target-path = "/memory@40000000";
|
||||
__overlay__ {
|
||||
reg = <0x0 0x40000000 0x2 0x0>;
|
||||
};
|
||||
};
|
||||
};
|
Loading…
Reference in a new issue