From c15d1493507e811a079ebe93f75ae455fe1de8f9 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 24 Sep 2022 00:59:28 -0700 Subject: [PATCH] move userspace to top level to facilitate overriding --- src/default.nix | 7 ++-- src/initramfs/default.nix | 1 - src/platform/kevin/default.nix | 66 +++++++++++++++++----------------- 3 files changed, 36 insertions(+), 38 deletions(-) diff --git a/src/default.nix b/src/default.nix index 7e8e1b2..f17130e 100644 --- a/src/default.nix +++ b/src/default.nix @@ -18,10 +18,11 @@ let initramfs_image = self.initramfs; }; kernel = self.callPackage ./kernel { }; + userspace = self.callPackage ./userspace { + kernelname = "${self.kernel.version}-${self.platform_name}"; + }; initramfs = self.callPackage ./initramfs { - userspace = self.callPackage ./userspace { - kernelname = "${self.kernel.version}-${self.platform_name}"; - }; + inherit (self) userspace; }; })) .overrideScope' overlay; diff --git a/src/initramfs/default.nix b/src/initramfs/default.nix index c865950..078769d 100644 --- a/src/initramfs/default.nix +++ b/src/initramfs/default.nix @@ -28,5 +28,4 @@ nixpkgsOnBuildForHost.stdenv.mkDerivation { popd ''; dontInstall = true; - passthru = { inherit userspace kernel; }; } diff --git a/src/platform/kevin/default.nix b/src/platform/kevin/default.nix index 7548295..876abff 100644 --- a/src/platform/kevin/default.nix +++ b/src/platform/kevin/default.nix @@ -24,40 +24,38 @@ ''; }); - initramfs = prev.initramfs.override { - userspace = prev.initramfs.passthru.userspace.override { - # order matters! this is also the order in which the modules are insmoded - modules_insmod = [ - "drivers/video/backlight/pwm_bl.ko" - "drivers/gpu/drm/panel/panel-simple.ko" - "drivers/gpu/drm/bridge/analogix/analogix_dp.ko" - "drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.ko" - "drivers/gpu/drm/bridge/synopsys/dw-hdmi.ko" - "drivers/gpu/drm/rockchip/rockchipdrm.ko" - "drivers/usb/dwc3/dwc3-of-simple.ko" - "drivers/usb/dwc3/dwc3.ko" - "drivers/usb/host/ehci-hcd.ko" - "drivers/usb/host/ehci-platform.ko" - "drivers/usb/host/ohci-hcd.ko" - "drivers/usb/host/ohci-platform.ko" - "drivers/usb/storage/usb-storage.ko" - "drivers/usb/storage/uas.ko" - "drivers/usb/host/xhci-hcd.ko" - "drivers/usb/host/xhci-plat-hcd.ko" - ]; - # FIXME: need firmware for mwifiex and ath9k as well. - modules_noinsmod = [ - "lib/crypto/libarc4.ko" - "net/mac80211/mac80211.ko" - "drivers/net/wireless/ath/ath9k/ath9k.ko" - "drivers/net/wireless/ath/ath9k/ath9k_common.ko" - "drivers/net/wireless/ath/ath9k/ath9k_htc.ko" - "drivers/net/wireless/ath/ath9k/ath9k_hw.ko" - "drivers/net/wireless/ath/ath.ko" - "drivers/net/wireless/marvell/mwifiex/mwifiex_pcie.ko" - "drivers/net/wireless/marvell/mwifiex/mwifiex.ko" - ]; - }; + userspace = prev.userspace.override { + # order matters! this is also the order in which the modules are insmoded + modules_insmod = [ + "drivers/video/backlight/pwm_bl.ko" + "drivers/gpu/drm/panel/panel-simple.ko" + "drivers/gpu/drm/bridge/analogix/analogix_dp.ko" + "drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.ko" + "drivers/gpu/drm/bridge/synopsys/dw-hdmi.ko" + "drivers/gpu/drm/rockchip/rockchipdrm.ko" + "drivers/usb/dwc3/dwc3-of-simple.ko" + "drivers/usb/dwc3/dwc3.ko" + "drivers/usb/host/ehci-hcd.ko" + "drivers/usb/host/ehci-platform.ko" + "drivers/usb/host/ohci-hcd.ko" + "drivers/usb/host/ohci-platform.ko" + "drivers/usb/storage/usb-storage.ko" + "drivers/usb/storage/uas.ko" + "drivers/usb/host/xhci-hcd.ko" + "drivers/usb/host/xhci-plat-hcd.ko" + ]; + # FIXME: need firmware for mwifiex and ath9k as well. + modules_noinsmod = [ + "lib/crypto/libarc4.ko" + "net/mac80211/mac80211.ko" + "drivers/net/wireless/ath/ath9k/ath9k.ko" + "drivers/net/wireless/ath/ath9k/ath9k_common.ko" + "drivers/net/wireless/ath/ath9k/ath9k_htc.ko" + "drivers/net/wireless/ath/ath9k/ath9k_hw.ko" + "drivers/net/wireless/ath/ath.ko" + "drivers/net/wireless/marvell/mwifiex/mwifiex_pcie.ko" + "drivers/net/wireless/marvell/mwifiex/mwifiex.ko" + ]; }; coreboot =