Skip to content

Commit

Permalink
Toshiba and Alvium Camera Support
Browse files Browse the repository at this point in the history
Signed-off-by: Emrah Billur <emrah.billur@unikie.com>

Format fix

Signed-off-by: Emrah Billur <emrah.billur@unikie.com>

Camera Module Fix

Signed-off-by: Emrah Billur <emrah.billur@unikie.com>

Final Fix for camera modules

Signed-off-by: Emrah Billur <emrah.billur@unikie.com>
  • Loading branch information
emrahbillur committed Apr 24, 2024
1 parent 770d204 commit 22387df
Show file tree
Hide file tree
Showing 7 changed files with 19,223 additions and 0 deletions.
18 changes: 18 additions & 0 deletions modules/common/virtualization/docker.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,23 @@ in
enable = true;
setSocketVariable = true;
};
# Add user to docker group and dialout group for access to serial ports
users.users."ghaf".extraGroups = ["docker" "dialout"];
# Adjust ulimits for containers
virtualisation.docker.daemon.settings = {
default-ulimits = {
nofile = {
Name = "nofile";
Hard = 1024;
Soft = 1024;
};
nproc = {
Name = "nproc";
Soft = 65536;
Hard = 65536;
};
};
};
};
}

49 changes: 49 additions & 0 deletions modules/jetpack-camera/agx-camera.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright 2022-2024 TII (SSRC) and the Ghaf contributors
# SPDX-License-Identifier: Apache-2.0
{
lib,
config,
...
}: let
cfg = config.ghaf.hardware.nvidia.orin.agx;
in {
options.ghaf.hardware.nvidia.orin.agx.camera =
lib.mkEnableOption
"Enabling E-con camera driver for Orin AGX ";
config = lib.mkIf cfg.camera {
# Orin AGX camera driver

boot.kernelPatches = [
#Toshiba - Alvium Kernel Patch
{
name = "nx-camera-kernel-patch";
# This patch is for Toshiba HDMI camera and Alvium CSI2 camera patch
patch = ./alvium_toshiba_kernel.patch;
# For Alvium Kernel configuration changes
extraStructuredConfig = with lib.kernel; {
CONFIG_LOCALVERSION_AUTO = yes;
CONFIG_FB_EFI = lib.mkForce unset;
CONFIG_PCI_SERIAL_CH384 = lib.mkForce unset;
CONFIG_SENSORS_F75308 = lib.mkForce unset;
CONFIG_USB_NET_CDC_MBIM = lib.mkForce unset;
CONFIG_TEGRA23X_OC_EVENT = lib.mkForce unset;
CONFIG_TEGRA19X_OC_EVENT = lib.mkForce unset;
CONFIG_VIDEO_ECAM = lib.mkForce unset;
CONFIG_VIDEO_AVT_CSI2 = lib.mkForce unset;
CONFIG_NV_VIDEO_HAWK_OWL = lib.mkForce unset;
CONFIG_HID_SHIELD_REMOTE = lib.mkForce unset;
CONFIG_USB_WDM = module;
CONFIG_TYPEC_FUSB301 = lib.mkForce unset;
CONFIG_ISO9660_FS = lib.mkForce unset;
CONFIG_SECURITY_DMESG_RESTRICT = lib.mkForce unset;
};
}
#Toshiba - Alvium DTB Patch
{
name = "nx-camera-dtb-patch";
# This patch is for Toshiba HDMI camera and Alvium CSI2 camera patch
patch = ./alvium_toshiba_dtb.patch;
}
];
};
}

0 comments on commit 22387df

Please sign in to comment.