import orangepi5
From https://gitlab.com/K900/nix.git/ aea8b7d06dceb9a72d38219d424967ef091d4827
This commit is contained in:
69
shared/platform/orangepi5.nix
Normal file
69
shared/platform/orangepi5.nix
Normal file
@@ -0,0 +1,69 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
pkgsHost,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
crossPkgs = pkgsHost.pkgsCross.aarch64-multiplatform;
|
||||
in {
|
||||
boot = {
|
||||
kernelPackages = crossPkgs.linuxPackagesFor (crossPkgs.buildLinux {
|
||||
version = "6.8.0-rc1";
|
||||
modDirVersion = "6.8.0-rc1";
|
||||
|
||||
src = inputs.linux-rockchip-collabora;
|
||||
kernelPatches = [];
|
||||
|
||||
extraMeta.branch = "6.8";
|
||||
});
|
||||
|
||||
loader = {
|
||||
grub.enable = false;
|
||||
generic-extlinux-compatible.enable = true;
|
||||
};
|
||||
|
||||
initrd.kernelModules = ["ahci_dwc" "phy_rockchip_naneng_combphy"];
|
||||
consoleLogLevel = 7;
|
||||
};
|
||||
|
||||
hardware = {
|
||||
deviceTree.name = "rockchip/rk3588s-orangepi-5.dtb";
|
||||
|
||||
opengl.package = let
|
||||
mesa = pkgs.callPackage ../../hacks/orangepi5/mesa {
|
||||
galliumDrivers = ["panfrost"];
|
||||
vulkanDrivers = ["panfrost"];
|
||||
OpenGL = null;
|
||||
Xplugin = null;
|
||||
enableGalliumNine = false;
|
||||
enableOSMesa = false;
|
||||
enableVaapi = false;
|
||||
enableVdpau = false;
|
||||
enableXa = false;
|
||||
};
|
||||
mesa-panthor = mesa.overrideAttrs (_: {
|
||||
src = inputs.mesa-panthor;
|
||||
});
|
||||
in
|
||||
mesa-panthor.drivers;
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-label/nixos";
|
||||
fsType = "ext4";
|
||||
options = ["noatime"];
|
||||
};
|
||||
};
|
||||
|
||||
system.build = {
|
||||
sdImage = import "${inputs.nixpkgs}/nixos/lib/make-disk-image.nix" {
|
||||
name = "orangepi5-sd-image";
|
||||
copyChannel = false;
|
||||
inherit config lib pkgs;
|
||||
};
|
||||
uboot = crossPkgs.callPackage ../../hacks/orangepi5/uboot {};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user