Skip to content

Commit

Permalink
Move kernel config into nix
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbaur committed May 11, 2024
1 parent c09526c commit 1aca4b0
Show file tree
Hide file tree
Showing 45 changed files with 765 additions and 837 deletions.
19 changes: 4 additions & 15 deletions boards/asurada-spherion/config.nix
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
{ pkgs, lib, ... }:
{
platforms = [ "aarch64-linux" ];
linux = {
configFile =
with pkgs.tinybootKernelConfigs;
lib.mkDefault (
pkgs.concatText "asurada-spherion-kernel.config" [
generic
video
aarch64
chromebook
mediatek
]
);
dtbPattern = "mt8192-asurada-spherion*";
};
platform.mediatek = true;
video = true;
chromebook = true;
linux.dtbPattern = "mt8192-asurada-spherion*";
coreboot.kconfig = with lib.kernel; {
ARM64_BL31_EXTERNAL_FILE = freeform "${pkgs.armTrustedFirmwareMT8192}/libexec/bl31.elf";
BOARD_GOOGLE_SPHERION = yes;
Expand Down
17 changes: 4 additions & 13 deletions boards/brya-banshee/config.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
{ pkgs, lib, ... }:
{ lib, ... }:
{
platforms = [ "x86_64-linux" ];
linux.configFile =
with pkgs.tinybootKernelConfigs;
lib.mkDefault (
pkgs.concatText "brya-banshee-kernel.config" [
generic
video
x86_64
alderlake
chromebook
]
);
platform.alderlake = true;
video = true;
chromebook = true;
coreboot = {
# start=0x01800000 length=0x00800000 (upper 1/4)
wpRange.start = "0x01800000";
Expand Down
20 changes: 7 additions & 13 deletions boards/fizz-fizz/config.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
{ pkgs, lib, ... }:
{ lib, ... }:
{
platforms = [ "x86_64-linux" ];
network = true;
chromebook = true;
linux = {
configFile =
with pkgs.tinybootKernelConfigs;
lib.mkDefault (
pkgs.concatText "fizz-fizz-kernel.config" [
generic
x86_64
network
chromebook
./kernel.config
]
);
kconfig = with lib.kernel; {
NET_VENDOR_REALTEK = yes;
R8169 = yes;
};
firmware = [
{
dir = "rtl_nic";
Expand Down
2 changes: 0 additions & 2 deletions boards/fizz-fizz/kernel.config

This file was deleted.

23 changes: 4 additions & 19 deletions boards/kukui-fennel/config.nix
Original file line number Diff line number Diff line change
@@ -1,24 +1,9 @@
{ pkgs, lib, ... }:
{
platforms = [ "aarch64-linux" ];
linux = {
configFile =
with pkgs.tinybootKernelConfigs;
lib.mkDefault (
pkgs.concatText "kukui-fennel-kernel.config" [
generic
video
aarch64
chromebook
mediatek
]
);
commandLine = [
"console=ttyS0,115200"
"console=tty1"
];
dtbPattern = "mt8183-kukui-jacuzzi-fennel*";
};
platform.mediatek = true;
video = true;
chromebook = true;
linux.dtbPattern = "mt8183-kukui-jacuzzi-fennel*";
coreboot.kconfig = with lib.kernel; {
ARM64_BL31_EXTERNAL_FILE = freeform "${pkgs.armTrustedFirmwareMT8183}/libexec/bl31.elf";
BOARD_GOOGLE_FENNEL = yes;
Expand Down
15 changes: 3 additions & 12 deletions boards/octopus-meep/config.nix
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
{ pkgs, lib, ... }:
{ lib, ... }:
{
platforms = [ "x86_64-linux" ];
linux.configFile =
with pkgs.tinybootKernelConfigs;
lib.mkDefault (
pkgs.concatText "octopus-meep-kernel.config" [
generic
video
x86_64
chromebook
]
);
chromebook = true;
video = true;
coreboot = {
# start=0x00000000 length=0x00800000 (lower 1/2)
wpRange.start = "0x00000000";
Expand Down
15 changes: 3 additions & 12 deletions boards/poppy-atlas/config.nix
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
{ pkgs, lib, ... }:
{ lib, ... }:
{
platforms = [ "x86_64-linux" ];
linux.configFile =
with pkgs.tinybootKernelConfigs;
lib.mkDefault (
pkgs.concatText "poppy-atlas-kernel.config" [
generic
video
x86_64
chromebook
]
);
chromebook = true;
video = true;
coreboot.kconfig = with lib.kernel; {
BOARD_GOOGLE_ATLAS = yes;
FMDFILE = freeform ./layout.fmd;
Expand Down
29 changes: 16 additions & 13 deletions boards/qemu-aarch64/config.nix
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
# TODO(jared): vboot not tested on this platform
{ pkgs, lib, ... }:
{
platforms = [ "aarch64-linux" ];
platform.qemu = true;
network = true;
debug = true;
linux = {
configFile =
with pkgs.tinybootKernelConfigs;
lib.mkDefault (
pkgs.concatText "qemu-aarch64-kernel.config" [
debug
generic
aarch64
qemu
network
./kernel.config
]
);
kconfig = with lib.kernel; {
GPIOLIB = yes;
GPIO_PL061 = yes;
MEMORY_HOTPLUG = yes;
MEMORY_HOTREMOVE = yes;
MIGRATION = yes;
PCI_HOST_GENERIC = yes;
PCI_PRI = yes;
PL330_DMA = yes;
RTC_DRV_PL031 = yes;
SERIAL_AMBA_PL011 = yes;
SERIAL_AMBA_PL011_CONSOLE = yes;
};
dtb = lib.mkDefault (
pkgs.buildPackages.runCommand "qemu-aarch64.dtb" { depsBuildBuild = [ pkgs.pkgsBuildBuild.qemu ]; }
''
Expand Down
12 changes: 0 additions & 12 deletions boards/qemu-aarch64/kernel.config

This file was deleted.

25 changes: 10 additions & 15 deletions boards/qemu-x86_64/config.nix
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
{ pkgs, lib, ... }:
{ lib, ... }:
{
platforms = [ "x86_64-linux" ];
linux.configFile =
with pkgs.tinybootKernelConfigs;
lib.mkDefault (
pkgs.concatText "qemu-x86_64-kernel.config" [
generic
debug
network
qemu
x86_64
video
./kernel.config
]
);
platform.qemu = true;
network = true;
video = true;
debug = true;
linux.kconfig = with lib.kernel; {
FB_VESA = yes;
FB_VGA16 = yes;
VGA_ARB = yes;
};
coreboot.kconfig = with lib.kernel; {
BOARD_EMULATION_QEMU_X86_Q35 = yes;
VENDOR_EMULATION = yes;
Expand Down
3 changes: 0 additions & 3 deletions boards/qemu-x86_64/kernel.config

This file was deleted.

33 changes: 13 additions & 20 deletions boards/trogdor-wormdingler/config.nix
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
{ pkgs, lib, ... }:
# TODO(jared): https://gitlab.freedesktop.org/drm/msm/-/issues/13
{ lib, ... }:
{
platforms = [ "aarch64-linux" ];
platform.qualcomm = true;
chromebook = true;
video = true;
linux = {
configFile =
with pkgs.tinybootKernelConfigs;
lib.mkDefault (
pkgs.concatText "trogdor-wormdingler-kernel.config" [
generic
video
aarch64
chromebook
qcom
sc7180
./kernel.config
]
);
# https://gitlab.freedesktop.org/drm/msm/-/issues/13
commandLine = [
"pd_ignore_unused"
"clk_ignore_unused"
];
kconfig = with lib.kernel; {
HID_GOOGLE_HAMMER = yes;
I2C_CROS_EC_TUNNEL = yes;
I2C_HID_OF = yes;
KEYBOARD_CROS_EC = yes;
LEDS_CLASS = yes;
NEW_LEDS = yes;
};
dtbPattern = "sc7180-trogdor-wormdingler*";
};
coreboot.kconfig = with lib.kernel; {
Expand Down
6 changes: 0 additions & 6 deletions boards/trogdor-wormdingler/kernel.config

This file was deleted.

17 changes: 4 additions & 13 deletions boards/volteer-elemi/config.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
{ pkgs, lib, ... }:
{ lib, ... }:
{
platforms = [ "x86_64-linux" ];
linux.configFile =
with pkgs.tinybootKernelConfigs;
lib.mkDefault (
pkgs.concatText "volteer-elemi-kernel.config" [
generic
video
x86_64
tigerlake
chromebook
]
);
platform.tigerlake = true;
chromebook = true;
video = true;
coreboot = {
# start=0x01800000 length=0x00800000 (upper 1/4)
wpRange.start = "0x01800000";
Expand Down
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

65 changes: 0 additions & 65 deletions kernel-configs/aarch64

This file was deleted.

Loading

0 comments on commit 1aca4b0

Please sign in to comment.