1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-23 19:39:42 +01:00

stray away from defconfig hack

add all directly nessesairy modules
This commit is contained in:
zimward 2024-08-12 15:31:29 +02:00
parent 0b82ff9b47
commit 96687127e0
No known key found for this signature in database
GPG key ID: 4CAC61D6A482FCD9
2 changed files with 132 additions and 2 deletions

View file

@ -0,0 +1,121 @@
{ lib, version }:
with lib.kernel;
with (lib.kernel.whenHelpers version);
{
ARCH_ROCKCHIP = yes;
#charger, should always be included
CHARGER_RK818 = yes;
#needed for networking via modem as it is connected via usb
USB_USBNET = module;
USB_NET_QMI_WWAN = module;
DRM_ROCKCHIP = yes;
#gpu
DRM_PANFROST = module;
TOUCHSCREEN_GOODIX = module;
#display
DRM_PANEL_HIMAX_HX8394 = module;
#WiFi
BRCMFMAC = module;
#bluetooth
BT_HCIBTSDIO = module;
#adc
ROCKCHIP_SARADC = module;
#IMU (also covers the MPU6500)
INV_MPU6050_IIO = module;
#magnetometer
AF8133J = whenAtLeast "6.9" module;
#ambient light sensor
STK3310 = module;
#cameras
VIDEO_OV8858 = module;
VIDEO_IMX258 = module;
#flash
LEDS_SGM3140 = module;
#notification LED
LEDS_GPIO = module;
#vibrator
INPUT_GPIO_VIBRA = module;
#audio
SND_SOC_RT5616 = module;
SND_SOC_RT5640 = module;
SND_SOC_RK3399_GRU_SOUND = module;
SND_SOC_ROCKCHIP = module;
#rk video decoder
VIDEO_ROCKCHIP_VDEC = module;
#buttons
KEYBOARD_ADC = module;
KEYBOARD_PINEPHONE = module;
#Uneeded Platforms
ARCH_ACTIONS = no;
ARCH_SUNXI = no;
ARCH_ALPINE = no;
ARCH_APPLE = no;
ARCH_BCM = no;
ARCH_BERLIN = no;
ARCH_BITMAN = no;
ARCH_EXYNOS = no;
ARCH_SPARX5 = no;
ARCH_K3 = no;
ARCH_LG1k = no;
ARCH_HISI = no;
ARCH_KEEMBAY = no;
ARCH_MEDIATEK = no;
ARCH_MESON = no;
ARCH_MVEBU = no;
ARCH_NXP = no;
ARCH_MA35 = no;
ARCH_NPCM = no;
ARCH_QCOM = no;
ARCH_REALTEK = no;
ARCH_RENESAS = no;
ARCH_SEATTLE = no;
ARCH_SOCFPGA = no;
ARCH_STM32 = no;
ARCH_SYNQUACER = no;
ARCH_TEGRA = no;
ARCH_SPRD = no;
ARCH_THUNDER = no;
ARCH_THUNDER2 = no;
ARCH_UNIPHIER = no;
ARCH_VEXPRESS = no;
ARCH_VISCONTI = no;
ARCH_XGENE = no;
ARCH_ZYNQMP = no;
#Modules that are probably not needed by anyone
DRM_NOUVEAU = no;
DRM_AMDGPU = no;
#fix btf info missing from vmlinux
CONFIG_BPF = yes;
BPF_SYSCALL = yes;
BPF_JIT = yes;
# BPF_JIT_ALWAYS_ON = yes;
BPF_JIT_DEFAULT_ON = yes;
PAHOLE_HAS_BTF_TAG = yes;
DEBUG_INFO_BTF = yes;
DEBUG_INFO_BTF_MODULES = yes;
}

View file

@ -30,7 +30,8 @@ let
patch = path; patch = path;
} }
); );
patches = [ ./pinephonepro_defconfig.patch ]; # patches = [ ./pinephonepro_defconfig.patch ];
patches = [ ];
in in
buildLinux ( buildLinux (
args args
@ -42,7 +43,15 @@ buildLinux (
inherit pver upstream_patch; inherit pver upstream_patch;
src = src_pine64; src = src_pine64;
}; };
defconfig = "pinephonepro_defconfig"; features = {
debug = true; # needed for BTF generation
};
structuredExtraConfig = import ./config.nix {
inherit lib;
version = pver;
};
autoModules = false;
kernelPatches = kernelPatches ++ map apply_patch patches; kernelPatches = kernelPatches ++ map apply_patch patches;
extraMeta = { extraMeta = {
platforms = lib.platforms.aarch64; platforms = lib.platforms.aarch64;