microchip icicle-kit: Fixes to kernel
* Improve by changing from legacy extraConfig to the structuredExtraConfig style kerenl configuration. * Remove few unneeded kernel modules from default configuration. * Make kernelPatches, structuredExtraConfig and extraMeta overrideable. * Change callPackage-style function to actually take the individual attributes from pkgs. * Get rid of recursive syntax. Signed-off-by: Mika Tammi <mika.tammi@unikie.com>
This commit is contained in:
parent
03e0033603
commit
1723853180
|
@ -1,64 +1,60 @@
|
||||||
{ pkgs, ... } @ args:
|
{ lib, buildLinux, fetchFromGitHub
|
||||||
|
, kernelPatches ? []
|
||||||
|
, structuredExtraConfig ? {}
|
||||||
|
, extraMeta ? {}
|
||||||
|
, argsOverride ? {}
|
||||||
|
, ... } @ args:
|
||||||
|
|
||||||
with pkgs;
|
let
|
||||||
|
|
||||||
buildLinux (args // rec {
|
|
||||||
version = "6.1.43-linux4microchip+fpga-2023.09";
|
version = "6.1.43-linux4microchip+fpga-2023.09";
|
||||||
|
in buildLinux (args // {
|
||||||
|
inherit version kernelPatches extraMeta;
|
||||||
|
|
||||||
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
|
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
|
||||||
modDirVersion = version;
|
modDirVersion = version;
|
||||||
|
|
||||||
defconfig = "mpfs_defconfig";
|
defconfig = "mpfs_defconfig";
|
||||||
|
|
||||||
kernelPatches = [
|
|
||||||
];
|
|
||||||
|
|
||||||
autoModules = false;
|
autoModules = false;
|
||||||
|
|
||||||
extraConfig = ''
|
structuredExtraConfig = with lib.kernel; {
|
||||||
OF_OVERLAY y
|
OF_OVERLAY = yes;
|
||||||
OF_CONFIGFS y
|
OF_CONFIGFS = yes;
|
||||||
MFD_SENSEHAT_CORE m
|
MFD_SENSEHAT_CORE = module;
|
||||||
INPUT_JOYDEV m
|
INPUT_JOYDEV = module;
|
||||||
INPUT_JOYSTICK y
|
INPUT_JOYSTICK = yes;
|
||||||
JOYSTICK_SENSEHAT m
|
JOYSTICK_SENSEHAT = module;
|
||||||
AUXDISPLAY y
|
AUXDISPLAY = yes;
|
||||||
SENSEHAT_DISPLAY m
|
SENSEHAT_DISPLAY = module;
|
||||||
HTS221 m
|
HTS221 = module;
|
||||||
IIO_ST_PRESS m
|
IIO_ST_PRESS = module;
|
||||||
IIO_ST_LSM6DSX m
|
IIO_ST_LSM6DSX = module;
|
||||||
IIO_ST_MAGN_3AXIS m
|
IIO_ST_MAGN_3AXIS = module;
|
||||||
POLARFIRE_SOC_DMA_NONCOHERENT y
|
POLARFIRE_SOC_DMA_NONCOHERENT = yes;
|
||||||
MTD_SPI_NOR_USE_4K_SECTORS n
|
MTD_SPI_NOR_USE_4K_SECTORS = no;
|
||||||
MTD_UBI y
|
MTD_UBI = yes;
|
||||||
MTD_CMDLINE_PARTS y
|
MTD_CMDLINE_PARTS = yes;
|
||||||
UBIFS_FS y
|
UBIFS_FS = yes;
|
||||||
USB_UAS m
|
USB_UAS = module;
|
||||||
CRYPTO_TLS m
|
EFI_STUB = yes;
|
||||||
TLS y
|
EFI = yes;
|
||||||
MD y
|
USBIP_CORE = module;
|
||||||
BLK_DEV_MD m
|
USBIP_VHCI_HCD = module;
|
||||||
MD_AUTODETECT y
|
USBIP_HOST = module;
|
||||||
MD_RAID0 m
|
USBIP_VUDC = module;
|
||||||
MD_RAID1 m
|
CRYPTO_TLS = module;
|
||||||
MD_RAID10 m
|
MD = yes;
|
||||||
MD_RAID456 m
|
BLK_DEV_MD = module;
|
||||||
DM_VERITY m
|
MD_LINEAR = module;
|
||||||
LOGO y
|
MD_RAID0 = module;
|
||||||
FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER n
|
MD_RAID1 = module;
|
||||||
FB_EFI n
|
MD_RAID10 = module;
|
||||||
EFI_STUB y
|
MD_RAID456 = module;
|
||||||
EFI y
|
|
||||||
VIRTIO y
|
# This device doesn't have any kind of display output at all
|
||||||
VIRTIO_PCI y
|
FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER = lib.mkForce no;
|
||||||
VIRTIO_BLK y
|
FB_EFI = lib.mkForce no;
|
||||||
DRM_VIRTIO_GPU y
|
} // structuredExtraConfig;
|
||||||
EXT4_FS y
|
|
||||||
USBIP_CORE m
|
|
||||||
USBIP_VHCI_HCD m
|
|
||||||
USBIP_HOST m
|
|
||||||
USBIP_VUDC m
|
|
||||||
'';
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "linux4microchip";
|
owner = "linux4microchip";
|
||||||
|
@ -66,4 +62,4 @@ buildLinux (args // rec {
|
||||||
rev = "25e35c7c54ad853d03c14a02b189b408cb5b5eb3";
|
rev = "25e35c7c54ad853d03c14a02b189b408cb5b5eb3";
|
||||||
sha256 = "sha256-wj7lz247MkhxmhSHUcNeWmcZK+DL+5PAnLwTmALD97M=";
|
sha256 = "sha256-wj7lz247MkhxmhSHUcNeWmcZK+DL+5PAnLwTmALD97M=";
|
||||||
};
|
};
|
||||||
} // (args.argsOverride or { }))
|
} // argsOverride)
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
{ pkgs, lib, ... }: {
|
{ pkgs, lib, config, ... }: {
|
||||||
boot = {
|
boot = {
|
||||||
kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/linux-icicle-kit.nix { });
|
kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/linux-icicle-kit.nix {
|
||||||
initrd.includeDefaultModules = lib.mkForce false;
|
inherit (config.boot) kernelPatches;
|
||||||
|
});
|
||||||
|
initrd.includeDefaultModules = lib.mkDefault false;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue