From c219350d7cd4c2965d7a689f81f94bc86461bd9f Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Tue, 23 Jan 2024 11:55:59 +0000 Subject: [PATCH] add usb storage for turris omnia ideally we would make this a module instead of compiling in directly --- devices/turris-omnia/default.nix | 3 +++ examples/recovery.nix | 1 + modules/usb.nix | 31 +++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 modules/usb.nix diff --git a/devices/turris-omnia/default.nix b/devices/turris-omnia/default.nix index 9bc4b4d..c146212 100644 --- a/devices/turris-omnia/default.nix +++ b/devices/turris-omnia/default.nix @@ -132,6 +132,9 @@ PHY_MVEBU_A38X_COMPHY = "y"; # for eth2 MARVELL_PHY = "y"; + USB_XHCI_MVEBU = "y"; + USB_XHCI_HCD = "y"; + MVPP2 = "y"; MV_XOR = "y"; diff --git a/examples/recovery.nix b/examples/recovery.nix index 8519776..ea742fb 100644 --- a/examples/recovery.nix +++ b/examples/recovery.nix @@ -9,6 +9,7 @@ in rec { imports = [ ../modules/network ../modules/ssh + ../modules/usb.nix ../modules/schnapps ../modules/outputs/mtdimage.nix ../modules/outputs/mbrimage.nix diff --git a/modules/usb.nix b/modules/usb.nix new file mode 100644 index 0000000..93a4506 --- /dev/null +++ b/modules/usb.nix @@ -0,0 +1,31 @@ +# support for USB block devices and the common filesystems +# they're likely to provide + +{lib, config, ... }: +{ + kernel = { + config = { + USB = "y"; + USB_EHCI_HCD = "y"; + USB_EHCI_HCD_PLATFORM = "y"; + USB_OHCI_HCD = "y"; + USB_OHCI_HCD_PLATFORM = "y"; + USB_SUPPORT = "y"; + USB_COMMON = "y"; + USB_STORAGE = "y"; + USB_STORAGE_DEBUG = "n"; + USB_UAS = "y"; + USB_ANNOUNCE_NEW_DEVICES = "y"; + SCSI = "y"; + BLK_DEV_SD = "y"; + USB_PRINTER = "y"; + MSDOS_PARTITION = "y"; + EFI_PARTITION = "y"; + EXT4_FS = "y"; + EXT4_USE_FOR_EXT2 = "y"; + FS_ENCRYPTION = "y"; + + + }; + }; +}