fix build
This commit is contained in:
parent
f1988c52ee
commit
94c6e6e22f
2 changed files with 56 additions and 44 deletions
|
@ -9,18 +9,26 @@
|
|||
networking.hostName = "devterm";
|
||||
imports = [
|
||||
./desktop.nix
|
||||
nixos-hardware.nixosModules.raspberry-pi-4
|
||||
];
|
||||
hardware = {
|
||||
raspberry-pi."4" = {
|
||||
#apply-overlays-dtmerge.enable = true;
|
||||
#fkms-3d.enable = true;
|
||||
#audio.enable = true;
|
||||
};
|
||||
deviceTree = {
|
||||
enable = true;
|
||||
#filter = "*rpi-4-*.dtb";
|
||||
};
|
||||
boot.loader = {
|
||||
grub.enable = lib.mkDefault false;
|
||||
generic-extlinux-compatible.enable = lib.mkDefault true;
|
||||
};
|
||||
boot.initrd = {
|
||||
includeDefaultModules = false;
|
||||
availableKernelModules = [
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"vc4"
|
||||
"pcie_brcmstb" # required for the pcie bus to work
|
||||
"reset-raspberrypi" # required for vl805 firmware to load
|
||||
"mmc_block"
|
||||
"usbhid"
|
||||
"hid_generic"
|
||||
"panel_cwd686"
|
||||
"ocp8178_bl"
|
||||
"ti_adc081c"
|
||||
];
|
||||
};
|
||||
console.enable = false;
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
|
|
@ -2,38 +2,42 @@
|
|||
callPackage,
|
||||
buildLinux,
|
||||
lib,
|
||||
}: let
|
||||
...
|
||||
} @ args: let
|
||||
devterm = callPackage ./devterm.nix {};
|
||||
in
|
||||
buildLinux {
|
||||
src = callPackage ./kernel-source.nix {};
|
||||
version = "5.10.17-v8";
|
||||
defconfig = "bcm2711_defconfig";
|
||||
autoModules = false;
|
||||
kernelPatches = [
|
||||
{
|
||||
name = "devterm";
|
||||
patch = "${devterm}/Code/patch/cm4/cm4_kernel_0704.patch";
|
||||
extraStructuredConfig = with lib.kernel; {
|
||||
AXP20X_ADC = module;
|
||||
AXP20X_POWER = module;
|
||||
BATTERY_AXP20X = module;
|
||||
CHARGER_AXP20X = module;
|
||||
INPUT_AXP20X_PEK = yes;
|
||||
MFD_AXP20X = yes;
|
||||
MFD_AXP20X_I2C = yes;
|
||||
REGULATOR_AXP20X = yes;
|
||||
BACKLIGHT_OCP8178 = module;
|
||||
DRM_PANEL_CWD686 = module;
|
||||
TI_ADC081C = module;
|
||||
I2C_BCM2835 = yes;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "subcmd-util";
|
||||
patch = ./subcmd-util.patch;
|
||||
extraConfig = "";
|
||||
}
|
||||
];
|
||||
enableCommonConfig = false;
|
||||
}
|
||||
buildLinux (
|
||||
args
|
||||
// {
|
||||
src = callPackage ./kernel-source.nix {};
|
||||
version = "5.10.17-v8";
|
||||
defconfig = "bcm2711_defconfig";
|
||||
autoModules = false;
|
||||
kernelPatches = [
|
||||
{
|
||||
name = "devterm";
|
||||
patch = "${devterm}/Code/patch/cm4/cm4_kernel_0704.patch";
|
||||
extraStructuredConfig = with lib.kernel; {
|
||||
AXP20X_ADC = module;
|
||||
AXP20X_POWER = module;
|
||||
BATTERY_AXP20X = module;
|
||||
CHARGER_AXP20X = module;
|
||||
INPUT_AXP20X_PEK = yes;
|
||||
MFD_AXP20X = yes;
|
||||
MFD_AXP20X_I2C = yes;
|
||||
REGULATOR_AXP20X = yes;
|
||||
BACKLIGHT_OCP8178 = module;
|
||||
DRM_PANEL_CWD686 = module;
|
||||
TI_ADC081C = module;
|
||||
I2C_BCM2835 = yes;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "subcmd-util";
|
||||
patch = ./subcmd-util.patch;
|
||||
extraConfig = "";
|
||||
}
|
||||
];
|
||||
enableCommonConfig = false;
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue