56 lines
1.4 KiB
Nix
Executable File
56 lines
1.4 KiB
Nix
Executable File
{
|
|
pkgs,
|
|
lib,
|
|
namespace,
|
|
...
|
|
}:
|
|
{
|
|
boot = {
|
|
kernelPackages = pkgs.${namespace}.linuxPackages_rpi5-latest;
|
|
initrd = {
|
|
availableKernelModules = lib.mkForce [ ];
|
|
kernelModules = {
|
|
bcachefs = lib.mkForce false;
|
|
};
|
|
};
|
|
supportedFilesystems = lib.mkForce [ ];
|
|
};
|
|
|
|
nixpkgs = {
|
|
overlays = [
|
|
(_self: _super: {
|
|
linuxPackages_pi5-16k = pkgs.linuxPackagesFor (
|
|
pkgs.linux_6_19.override {
|
|
structuredExtraConfig = with lib.kernel; {
|
|
CONFIG_ARM64_4K_PAGES = lib.mkForce no;
|
|
CONFIG_ARM64_64K_PAGES = lib.mkForce no;
|
|
CONFIG_ARM64_16K_PAGES = lib.mkForce yes;
|
|
CONFIG_OF = yes;
|
|
CONFIG_OF_CONFIGFS = yes;
|
|
CONFIG_CONFIGFS_FS = yes;
|
|
CONFIG_OF_OVERLAY = yes;
|
|
};
|
|
ignoreConfigErrors = true;
|
|
}
|
|
);
|
|
})
|
|
];
|
|
};
|
|
|
|
specialisation = {
|
|
"linux-stable".configuration = {
|
|
boot.kernelPackages = lib.mkOverride 90 pkgs.${namespace}.linuxPackages_rpi5-lts;
|
|
};
|
|
};
|
|
|
|
${namespace}.hardware.raspberry-pi.config.all.base-dt-params = {
|
|
# https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#enable-pcie
|
|
pciex1.enable = true;
|
|
pciex1.value = "on";
|
|
# PCIe Gen 3.0
|
|
# https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#pcie-gen-3-0
|
|
pciex1_gen.enable = true;
|
|
pciex1_gen.value = "3";
|
|
};
|
|
}
|