radxa/rock-pi-4: init

This commit is contained in:
ZHANG Yuntian 2025-02-06 18:46:31 +08:00 committed by mergify[bot]
parent 80340dcf86
commit 79bc209be8
3 changed files with 33 additions and 0 deletions

View file

@ -348,6 +348,7 @@ See code for all available configurations.
| [Purism Librem 15v3](purism/librem/13v3) | `<nixos-hardware/purism/librem/15v3>` | | [Purism Librem 15v3](purism/librem/13v3) | `<nixos-hardware/purism/librem/15v3>` |
| [Purism Librem 5r4](purism/librem/5r4) | `<nixos-hardware/purism/librem/5r4>` | | [Purism Librem 5r4](purism/librem/5r4) | `<nixos-hardware/purism/librem/5r4>` |
| [Radxa ROCK 4C+](radxa/rock-4c-plus) | `<nixos-hardware/radxa/rock-4c-plus>` | | [Radxa ROCK 4C+](radxa/rock-4c-plus) | `<nixos-hardware/radxa/rock-4c-plus>` |
| [Radxa ROCK Pi 4](radxa/rock-pi-4) | `<nixos-hardware/radxa/rock-pi-4>` |
| [Raspberry Pi 2](raspberry-pi/2) | `<nixos-hardware/raspberry-pi/2>` | | [Raspberry Pi 2](raspberry-pi/2) | `<nixos-hardware/raspberry-pi/2>` |
| [Raspberry Pi 3](raspberry-pi/3) | `<nixos-hardware/raspberry-pi/3>` | | [Raspberry Pi 3](raspberry-pi/3) | `<nixos-hardware/raspberry-pi/3>` |
| [Raspberry Pi 4](raspberry-pi/4) | `<nixos-hardware/raspberry-pi/4>` | | [Raspberry Pi 4](raspberry-pi/4) | `<nixos-hardware/raspberry-pi/4>` |

View file

@ -300,6 +300,7 @@
raspberry-pi-4 = import ./raspberry-pi/4; raspberry-pi-4 = import ./raspberry-pi/4;
raspberry-pi-5 = import ./raspberry-pi/5; raspberry-pi-5 = import ./raspberry-pi/5;
rock-4c-plus = import ./radxa/rock-4c-plus; rock-4c-plus = import ./radxa/rock-4c-plus;
rock-pi-4 = import ./radxa/rock-pi-4;
kobol-helios4 = import ./kobol/helios4; kobol-helios4 = import ./kobol/helios4;
samsung-np900x3c = import ./samsung/np900x3c; samsung-np900x3c = import ./samsung/np900x3c;
slimbook-hero-rpl-rtx = import ./slimbook/hero/rpl-rtx; slimbook-hero-rpl-rtx = import ./slimbook/hero/rpl-rtx;

View file

@ -0,0 +1,31 @@
{ lib
, pkgs
, config
, ...
}:
let
cfg = config.hardware.radxa.rock-pi-4;
rkCfg = config.hardware.rockchip;
in {
imports = [
../.
../../rockchip
];
options.hardware.radxa.rock-pi-4 = {
platformFirmware = lib.mkPackageOption pkgs "ubootRockPi4" { };
};
config = {
hardware = {
radxa.enable = true;
rockchip = {
rk3399.enable = true;
diskoExtraPostVM = ''
dd conv=notrunc,fsync if=${cfg.platformFirmware}/idbloader.img of=$out/${rkCfg.diskoImageName} bs=512 seek=64
dd conv=notrunc,fsync if=${cfg.platformFirmware}/u-boot.itb of=$out/${rkCfg.diskoImageName} bs=512 seek=16384
'';
};
};
};
}