Skip to content

Commit

Permalink
move hw definitions to reference folder
Browse files Browse the repository at this point in the history
Signed-off-by: kallem <[email protected]>
  • Loading branch information
kallem authored and brianmcgillion committed Sep 5, 2024
1 parent 7bb0c8e commit 3a1c5d7
Show file tree
Hide file tree
Showing 54 changed files with 36 additions and 34 deletions.
16 changes: 8 additions & 8 deletions REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ path = [
"assets/**/*.png", "assets/**/*.svg",
"modules/common/development/audio_test/test_file1.mp3",
"modules/hardware/x86_64-generic/kernel/configs/ghaf_host_hardened_baseline-x86",
"modules/jetpack/ghaf_host_hardened_baseline-jetson-orin",
"modules/reference/hardware/jetpack/ghaf_host_hardened_baseline-jetson-orin",
"modules/lanzaboote/demo-secure-boot-keys/**/*",
"modules/microvm/virtualization/microvm/idsvm/mitmproxy/mitmproxy-ca/*",
]
Expand Down Expand Up @@ -46,7 +46,7 @@ SPDX-FileCopyrightText = [
]
path = [
"overlays/custom-packages/qemu/*.patch",
"modules/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/overlays/qemu/patches/0001-qemu-v8.1.3_bpmp-virt.patch"
"modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/overlays/qemu/patches/0001-qemu-v8.1.3_bpmp-virt.patch"
]

[[annotations]]
Expand Down Expand Up @@ -99,24 +99,24 @@ SPDX-FileCopyrightText = [
"2022-2024 TII (SSRC) and the Ghaf contributors",
]
path = [
"modules/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/patches/*.patch",
"modules/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/patches/*.patch",
"modules/jetpack-microvm/*.patch",
"modules/jetpack/nvidia-jetson-orin/virtualization/passthrough/uarti-net-vm/patches/net_vm_dtb_with_uarti.patch",
"modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/common/bpmp-virt-common/patches/*.patch",
"modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/host/bpmp-virt-host/patches/*.patch",
"modules/reference/hardware/jetpack-microvm/*.patch",
"modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/passthrough/uarti-net-vm/patches/net_vm_dtb_with_uarti.patch",
"modules/common/virtualization/pkvm/0001-pkvm-enable-pkvm-on-intel-x86-6.1-lts.patch",
"modules/microvm/virtualization/microvm/0001-x86-gpu-Don-t-reserve-stolen-memory-for-GPU-passthro.patch",
]

[[annotations]]
SPDX-License-Identifier = "BSD-2-Clause-Patent"
SPDX-FileCopyrightText = "Copyright (c) 2021-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved."
path = "modules/jetpack/nvidia-jetson-orin/edk2-nvidia-always-reset-display.patch"
path = "modules/reference/hardware/jetpack/nvidia-jetson-orin/edk2-nvidia-always-reset-display.patch"

[[annotations]]
SPDX-License-Identifier = "LicenseRef-NvidiaProprietary"
SPDX-FileCopyrightText = "Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved."
path = [
"modules/jetpack/nvidia-jetson-orin/tegra2-mb2-bct-scr.patch",
"modules/reference/hardware/jetpack/nvidia-jetson-orin/tegra2-mb2-bct-scr.patch",
]


Expand Down
4 changes: 2 additions & 2 deletions docs/src/technologies/device_tree_overlays_pt.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ hardware.deviceTree.overlays = [
];
```

Also, in [jetson-orin.nix](../../../modules/jetpack/nvidia-jetson-orin/jetson-orin.nix) the
Also, in [jetson-orin.nix](../../../modules/reference/hardware/jetpack/nvidia-jetson-orin/jetson-orin.nix) the
*dtboBuildExtraIncludePaths* is defined with the path needed to include
the *tegra234-smmu-streamid.h* header file.

Expand All @@ -149,4 +149,4 @@ hardware.deviceTree =
```

You can find this full implementation in the Nix module:
[uarti-net-vm](../../../modules/jetpack/nvidia-jetson-orin/virtualization/passthrough/uarti-net-vm)
[uarti-net-vm](../../../modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/passthrough/uarti-net-vm)
2 changes: 1 addition & 1 deletion docs/src/technologies/nvidia_uarti_net_vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This section describes how the UARTI passthrough is configured in Ghaf for micro
We recommend to read [NVIDIA Jetson AGX Orin: UART Passthrough](nvidia_agx_pt_uart.md) before continuing.

The UARTI passthrough configuration declaration
[UARTI to netvm](../../../modules/jetpack/nvidia-jetson-orin/virtualization/passthrough/uarti-net-vm/default.nix)
[UARTI to netvm](../../../modules/reference/hardware/jetpack/nvidia-jetson-orin/virtualization/passthrough/uarti-net-vm/default.nix)
includes:


Expand Down
15 changes: 11 additions & 4 deletions modules/flake-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,21 @@
nixpkgs.overlays = [ inputs.ghafpkgs.overlays.default ];
}
];
laptop.imports = [
./hardware/definition.nix
./hardware/x86_64-generic
./reference/hardware/laptop.nix
./hardware/common
{ nixpkgs.overlays = [ inputs.ghafpkgs.overlays.default ]; }
];
desktop.imports = [ ./desktop ];
host.imports = [ ./host ];
imx8.imports = [ ./imx8 ];
jetpack.imports = [ ./jetpack ];
jetpack-microvm.imports = [ ./jetpack-microvm ];
lanzaboote.imports = [ ./lanzaboote ];
microvm.imports = [ ./microvm ];
polarfire.imports = [ ./polarfire ];
imx8.imports = [ ./reference/hardware/imx8 ];
jetpack.imports = [ ./reference/hardware/jetpack ];
jetpack-microvm.imports = [ ./reference/hardware/jetpack-microvm ];
polarfire.imports = [ ./reference/hardware/polarfire ];
reference-appvms.imports = [ ./reference/appvms ];
reference-personalize.imports = [ ./reference/personalize ];
reference-profiles.imports = [ ./reference/profiles ];
Expand Down
10 changes: 1 addition & 9 deletions modules/hardware/flake-module.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
# Copyright 2024 TII (SSRC) and the Ghaf contributors
# SPDX-License-Identifier: Apache-2.0
{ inputs, ... }:
{
_: {
flake.nixosModules = {
laptop.imports = [
./definition.nix
./x86_64-generic
./laptop.nix
./common
{ nixpkgs.overlays = [ inputs.ghafpkgs.overlays.default ]; }
];
hw-x86_64-generic.imports = [
./definition.nix
./x86_64-generic
Expand Down
3 changes: 3 additions & 0 deletions modules/reference/hardware/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copyright 2024 TII (SSRC) and the Ghaf contributors
# SPDX-License-Identifier: Apache-2.0
{ imports = [ ./laptop.nix ]; }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ in
};

firmware.uefi = {
logo = ../../../docs/src/img/1600px-Ghaf_logo.svg;
logo = ../../../../../docs/src/img/1600px-Ghaf_logo.svg;
edk2NvidiaPatches = [
# This effectively disables EFI FB Simple Framebuffer, which does
# not work properly but causes kernel panic during the boot if the
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ let
) deviceList;
in
{
imports = [ ./definition.nix ];
imports = [ ../../hardware/definition.nix ];

options.ghaf.hardware.definition.configFile = mkOption {
description = "Path to the hardware configuration file.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
{ lib, ... }:
{
imports = [
../../../../x86_64-generic/kernel/host/default.nix
../../../../x86_64-generic/kernel/guest/default.nix
../../../../../../hardware/x86_64-generic/kernel/host/default.nix
../../../../../../hardware/x86_64-generic/kernel/guest/default.nix
];

config = {
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions targets/laptop/flake-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ let
self.nixosModules.disko-basic-partition-v1
{
ghaf = {
hardware.definition.configFile = "/definitions/dell-latitude/dell-latitude-7230.nix";
hardware.definition.configFile = "/dell-latitude/definitions/dell-latitude-7230.nix";
reference.profiles.mvp-user-trial.enable = true;
};
}
Expand All @@ -55,7 +55,7 @@ let
self.nixosModules.disko-basic-partition-v1
{
ghaf = {
hardware.definition.configFile = "/definitions/dell-latitude/dell-latitude-7330.nix";
hardware.definition.configFile = "/dell-latitude/definitions/dell-latitude-7330.nix";
reference.profiles.mvp-user-trial.enable = true;
};
}
Expand Down Expand Up @@ -93,7 +93,7 @@ let
self.nixosModules.disko-basic-partition-v1
{
ghaf = {
hardware.definition.configFile = "/definitions/dell-latitude/dell-latitude-7230.nix";
hardware.definition.configFile = "/dell-latitude/definitions/dell-latitude-7230.nix";
reference.profiles.mvp-user-trial.enable = true;
};
}
Expand All @@ -102,7 +102,7 @@ let
self.nixosModules.disko-basic-partition-v1
{
ghaf = {
hardware.definition.configFile = "/definitions/dell-latitude/dell-latitude-7330.nix";
hardware.definition.configFile = "/dell-latitude/definitions/dell-latitude-7330.nix";
reference.profiles.mvp-user-trial.enable = true;
};
}
Expand Down
4 changes: 2 additions & 2 deletions targets/nvidia-jetson-orin/flake-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ let
netvmExtraModules = [
{
# The Nvidia Orin hardware dependent configuration is in
# modules/jetpack and modules/jetpack-microvm. Please refer to that
# modules/reference/hardware/jetpack and modules/reference/hardware/jetpack-microvm. Please refer to that
# section for hardware dependent netvm configuration.

# Wireless Configuration. Orin AGX has WiFi enabled where Orin NX does
Expand All @@ -45,7 +45,7 @@ let

modules = [
(nixos-generators + "/format-module.nix")
../../modules/jetpack/nvidia-jetson-orin/format-module.nix
../../modules/reference/hardware/jetpack/nvidia-jetson-orin/format-module.nix
jetpack-nixos.nixosModules.default
self.nixosModules.common
self.nixosModules.desktop
Expand Down

0 comments on commit 3a1c5d7

Please sign in to comment.