Enable SPI-NOR module in Linux

This commit is contained in:
Daniel Fullmer 2020-11-24 15:33:56 -08:00
parent e4727b47f7
commit cf432910a4
2 changed files with 5 additions and 1 deletions

View File

@ -76,9 +76,12 @@ $ cat /sys/class/gpio/gpio199/value
```
## SPI NOR
In Linux, dmesg error: `spi-nor spi0.0: unrecognized JEDEC id bytes: 0b 40 18 0b 40 18`
The published schematic says it's a `GD5F4GQ4UCYIG`, however the label on the pinecube I have is for an `XT25F128B`.
And this matches the JEDEC bytes reported in Linux.
```shell
$ sudo modprobe spi-nor
```
The device is accessible at `/dev/mtd0`.
### SPI Boot
Run `nix-build -A firmware-installer`. Then,

View File

@ -47,6 +47,7 @@ in
}
];
boot.kernelModules = [ "spi-nor" ]; # Not sure why this doesn't autoload. Provides SPI NOR at /dev/mtd0
boot.extraModulePackages = [ config.boot.kernelPackages.rtl8189es ];
zramSwap.enable = true; # 128MB is not much to work with