-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UBUNTU: [Packaging] Initialize noble:linux-nvidia-adv
Ignore: yes Signed-off-by: Jacob Martin <[email protected]>
- Loading branch information
1 parent
b31b11a
commit 151a70a
Showing
18 changed files
with
2,567 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
Name: linux | ||
Version: 6.1.0 | ||
Series: 23.04 (lunar) | ||
Name: linux-nvidia-adv | ||
Version: 6.8.0 | ||
Series: 24.04 (noble) | ||
Description: | ||
This is the source code for the Ubuntu linux kernel for the 23.04 series. This | ||
source tree is used to produce the flavours: generic, generic-64k, generic-lpae. | ||
This kernel is configured to support the widest range of desktop, laptop and | ||
server configurations. | ||
This is the source code for the Ubuntu Nvidia Tech Preview linux kernel for | ||
the 24.04 series. This source tree is used to produce the flavours: nvidia-adv, | ||
nvidia-adv-64k. This kernel is configured for use with Nvidia Tech Preview | ||
images. |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,185 @@ | ||
================== | ||
Config Annotations | ||
================== | ||
|
||
:Author: Andrea Righi | ||
|
||
Overview | ||
======== | ||
|
||
Each Ubuntu kernel needs to maintain its own .config for each supported | ||
architecture and each flavour. | ||
|
||
Every time a new patch is applied or a kernel is rebased on top of a new | ||
one, we need to update the .config's accordingly (config options can be | ||
added, removed and also renamed). | ||
|
||
So, we need to make sure that some critical config options are always | ||
matching the desired value in order to have a functional kernel. | ||
|
||
State of the art | ||
================ | ||
|
||
At the moment configs are maintained as a set of Kconfig chunks (inside | ||
`debian.<kernel>/config/`): a global one, plus per-arch / per-flavour | ||
chunks. | ||
|
||
In addition to that, we need to maintain also a file called | ||
'annotations'; the purpose of this file is to make sure that some | ||
critical config options are not silently removed or changed when the | ||
real .config is re-generated (for example after a rebase or after | ||
applying a new set of patches). | ||
|
||
The main problem with this approach is that, often, we have duplicate | ||
information that is stored both in the Kconfig chunks *and* in the | ||
annotations files and, at the same time, the whole .config's information | ||
is distributed between Kconfig chunks and annotations, making it hard to | ||
maintain, review and manage in general. | ||
|
||
Proposed solution | ||
================= | ||
|
||
The proposed solution is to store all the config information into the | ||
"annotations" format and get rid of the config chunks (basically the | ||
real .config's can be produced "compiling" annotations). | ||
|
||
Implementation | ||
============== | ||
|
||
To help the management of the annotations an helper script is provided | ||
(`debian/scripts/misc/annotations`): | ||
|
||
``` | ||
usage: annotations [-h] [--version] [--file FILE] [--arch ARCH] [--flavour FLAVOUR] [--config CONFIG] | ||
(--query | --export | --import FILE | --update FILE | --check FILE) | ||
|
||
Manage Ubuntu kernel .config and annotations | ||
|
||
options: | ||
-h, --help show this help message and exit | ||
--version, -v show program's version number and exit | ||
--file FILE, -f FILE Pass annotations or .config file to be parsed | ||
--arch ARCH, -a ARCH Select architecture | ||
--flavour FLAVOUR, -l FLAVOUR | ||
Select flavour (default is "generic") | ||
--config CONFIG, -c CONFIG | ||
Select a specific config option | ||
|
||
Action: | ||
--query, -q Query annotations | ||
--export, -e Convert annotations to .config format | ||
--import FILE, -i FILE | ||
Import a full .config for a specific arch and flavour into annotations | ||
--update FILE, -u FILE | ||
Import a partial .config into annotations (only resync configs specified in FILE) | ||
--check FILE, -k FILE | ||
Validate kernel .config with annotations | ||
``` | ||
|
||
This script allows to query config settings (per arch/flavour/config), | ||
export them into the Kconfig format (generating the real .config files) | ||
and check if the final .config matches the rules defined in the | ||
annotations. | ||
|
||
Examples (annotations is defined as an alias to `debian/scripts/annotations`): | ||
|
||
- Show settings for `CONFIG_DEBUG_INFO_BTF` for master kernel across all the | ||
supported architectures and flavours: | ||
|
||
``` | ||
$ annotations --query --config CONFIG_DEBUG_INFO_BTF | ||
{ | ||
"policy": { | ||
"amd64": "y", | ||
"arm64": "y", | ||
"armhf": "n", | ||
"ppc64el": "y", | ||
"riscv64": "y", | ||
"s390x": "y" | ||
}, | ||
"note": "'Needs newer pahole for armhf'" | ||
} | ||
``` | ||
|
||
- Dump kernel .config for arm64 and flavour generic-64k: | ||
|
||
``` | ||
$ annotations --arch arm64 --flavour generic-64k --export | ||
CONFIG_DEBUG_FS=y | ||
CONFIG_DEBUG_KERNEL=y | ||
CONFIG_COMPAT=y | ||
... | ||
``` | ||
|
||
- Update annotations file with a new kernel .config for amd64 flavour | ||
generic: | ||
|
||
``` | ||
$ annotations --arch amd64 --flavour generic --import build/.config | ||
``` | ||
|
||
Moreover, an additional kernelconfig commands are provided | ||
(via debian/rules targets): | ||
- `migrateconfigs`: automatically merge all the previous configs into | ||
annotations (local changes still need to be committed) | ||
|
||
Annotations headers | ||
=================== | ||
|
||
The main annotations file should contain a header to define the architectures | ||
and flavours that are supported. | ||
|
||
Here is the format of the header for the generic kernel: | ||
``` | ||
# Menu: HEADER | ||
# FORMAT: 4 | ||
# ARCH: amd64 arm64 armhf ppc64el riscv64 s390x | ||
# FLAVOUR: amd64-generic arm64-generic arm64-generic-64k armhf-generic armhf-generic-lpae ppc64el-generic riscv64-generic s390x-generic | ||
|
||
``` | ||
|
||
Example header of a derivative (linux-aws): | ||
``` | ||
# Menu: HEADER | ||
# FORMAT: 4 | ||
# ARCH: amd64 arm64 | ||
# FLAVOUR: amd64-aws arm64-aws | ||
# FLAVOUR_DEP: {'amd64-aws': 'amd64-generic', 'arm64-aws': 'arm64-generic'} | ||
|
||
include "../../debian.master/config/annotations" | ||
|
||
# Below you can define only the specific linux-aws configs that differ from linux generic | ||
|
||
``` | ||
|
||
Pros and Cons | ||
============= | ||
|
||
Pros: | ||
- avoid duplicate information in .config's and annotations | ||
- allow to easily define groups of config settings (for a specific | ||
environment or feature, such as annotations.clouds, annotations.ubuntu, | ||
annotations.snapd, etc.) | ||
- config options are more accessible, easy to change and review | ||
- we can easily document how config options are managed (and external | ||
contributors won't be discouraged anymore when they need to to change a | ||
config option) | ||
|
||
Cons: | ||
- potential regressions: the new tool/scripts can have potential bugs, | ||
so we could experience regressions due to some missed config changes | ||
- kernel team need to understand the new process (even if everything | ||
is transparent, kernel cranking process is the same, there might be | ||
corner cases that need to be addressed and resolved manually) | ||
|
||
TODO | ||
==== | ||
|
||
- Migrate all flavour and arch definitions into annotations (rather | ||
than having this information defined in multiple places inside | ||
debian/scripts); right now this information is "partially" migrated, | ||
meaning that we need to define arches and flavours in the headers | ||
section of annotations (so that the annotations tool can figure out | ||
the list of supported arches and flavours), but arches and flavours | ||
are still defined elsewhere, ideally we would like to have arches and | ||
flavours defined only in one place: annotations. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
# Menu: HEADER | ||
# FORMAT: 4 | ||
# ARCH: amd64 arm64 | ||
# FLAVOUR: amd64-nvidia-adv arm64-nvidia-adv arm64-nvidia-adv-64k | ||
# FLAVOUR_DEP: {'amd64-nvidia-adv': 'amd64-generic', 'arm64-nvidia-adv': 'arm64-generic', 'arm64-nvidia-adv-64k': 'arm64-generic-64k'} | ||
|
||
include "../../debian.master/config/annotations" | ||
|
||
CONFIG_AAEON_IWMI_WDT policy<{'amd64': '-'}> | ||
CONFIG_AAEON_IWMI_WDT note<'{Disable all Ubuntu ODM drivers}'> | ||
|
||
CONFIG_ARM64_ERRATUM_1902691 policy<{'arm64': 'y'}> | ||
CONFIG_ARM64_ERRATUM_1902691 note<'{Required for Grace enablement}'> | ||
|
||
CONFIG_ARM64_ERRATUM_2038923 policy<{'arm64': 'y'}> | ||
CONFIG_ARM64_ERRATUM_2038923 note<'{Required for Grace enablement}'> | ||
|
||
CONFIG_ARM64_ERRATUM_2064142 policy<{'arm64': 'y'}> | ||
CONFIG_ARM64_ERRATUM_2064142 note<'{Required for Grace enablement}'> | ||
|
||
CONFIG_ARM64_ERRATUM_2119858 policy<{'arm64': 'y'}> | ||
CONFIG_ARM64_ERRATUM_2119858 note<'{Required for Grace enablement}'> | ||
|
||
CONFIG_ARM64_ERRATUM_2139208 policy<{'arm64': 'y'}> | ||
CONFIG_ARM64_ERRATUM_2139208 note<'{Required for Grace enablement}'> | ||
|
||
CONFIG_ARM64_ERRATUM_2224489 policy<{'arm64': 'y'}> | ||
CONFIG_ARM64_ERRATUM_2224489 note<'{Required for Grace enablement}'> | ||
|
||
CONFIG_ARM64_ERRATUM_2253138 policy<{'arm64': 'y'}> | ||
CONFIG_ARM64_ERRATUM_2253138 note<'{Required for Grace enablement}'> | ||
|
||
CONFIG_ARM64_WORKAROUND_TRBE_OVERWRITE_FILL_MODE policy<{'arm64': 'y'}> | ||
CONFIG_ARM64_WORKAROUND_TRBE_OVERWRITE_FILL_MODE note<'{Required for Grace enablement}'> | ||
|
||
CONFIG_ARM64_WORKAROUND_TRBE_WRITE_OUT_OF_RANGE policy<{'arm64': 'y'}> | ||
CONFIG_ARM64_WORKAROUND_TRBE_WRITE_OUT_OF_RANGE note<'{Required for Grace enablement}'> | ||
|
||
CONFIG_CORESIGHT policy<{'arm64': 'm'}> | ||
CONFIG_CORESIGHT note<'{Required for Grace enablement}'> | ||
|
||
CONFIG_CORESIGHT_CATU policy<{'arm64': 'm'}> | ||
CONFIG_CORESIGHT_CATU note<'{Required for Grace enablement}'> | ||
|
||
CONFIG_CORESIGHT_CPU_DEBUG policy<{'arm64': 'm'}> | ||
CONFIG_CORESIGHT_CPU_DEBUG note<'{Required for Grace enablement}'> | ||
|
||
CONFIG_CORESIGHT_CPU_DEBUG_DEFAULT_ON policy<{'arm64': 'n'}> | ||
CONFIG_CORESIGHT_CPU_DEBUG_DEFAULT_ON note<'{Required for Grace enablement}'> | ||
|
||
CONFIG_CORESIGHT_CTI policy<{'arm64': 'm'}> | ||
CONFIG_CORESIGHT_CTI note<'{Required for Grace enablement}'> | ||
|
||
CONFIG_CORESIGHT_CTI_INTEGRATION_REGS policy<{'arm64': 'n'}> | ||
CONFIG_CORESIGHT_CTI_INTEGRATION_REGS note<'{Required for Grace enablement}'> | ||
|
||
CONFIG_CORESIGHT_DUMMY policy<{'arm64': 'n'}> | ||
CONFIG_CORESIGHT_DUMMY note<'{Required for Grace enablement}'> | ||
|
||
CONFIG_CORESIGHT_LINKS_AND_SINKS policy<{'arm64': 'm'}> | ||
CONFIG_CORESIGHT_LINKS_AND_SINKS note<'{Required for Grace enablement}'> | ||
|
||
CONFIG_CORESIGHT_LINK_AND_SINK_TMC policy<{'arm64': 'm'}> | ||
CONFIG_CORESIGHT_LINK_AND_SINK_TMC note<'{Required for Grace enablement}'> | ||
|
||
CONFIG_CORESIGHT_SINK_ETBV10 policy<{'arm64': 'm'}> | ||
CONFIG_CORESIGHT_SINK_ETBV10 note<'{Required for Grace enablement}'> | ||
|
||
CONFIG_CORESIGHT_SINK_TPIU policy<{'arm64': 'm'}> | ||
CONFIG_CORESIGHT_SINK_TPIU note<'{Required for Grace enablement}'> | ||
|
||
CONFIG_CORESIGHT_SOURCE_ETM4X policy<{'arm64': 'm'}> | ||
CONFIG_CORESIGHT_SOURCE_ETM4X note<'{Required for Grace enablement}'> | ||
|
||
CONFIG_CORESIGHT_STM policy<{'arm64': 'm'}> | ||
CONFIG_CORESIGHT_STM note<'{Required for Grace enablement}'> | ||
|
||
CONFIG_CORESIGHT_TPDA policy<{'arm64': 'n'}> | ||
CONFIG_CORESIGHT_TPDA note<'{Required for Grace enablement}'> | ||
|
||
CONFIG_CORESIGHT_TPDM policy<{'arm64': 'n'}> | ||
CONFIG_CORESIGHT_TPDM note<'{Required for Grace enablement}'> | ||
|
||
CONFIG_CORESIGHT_TRBE policy<{'arm64': 'm'}> | ||
CONFIG_CORESIGHT_TRBE note<'{Required for Grace enablement}'> | ||
|
||
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND policy<{'arm64': 'n'}> | ||
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND note<'{required for nvidia workloads}'> | ||
|
||
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE policy<{'amd64': 'n', 'arm64': 'y'}> | ||
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE note<'{required for nvidia workloads}'> | ||
|
||
CONFIG_DRM_NOUVEAU policy<{'amd64': 'n', 'arm64': 'm'}> | ||
CONFIG_DRM_NOUVEAU note<'{Disable NOUVEAU driver}'> | ||
|
||
CONFIG_DRM_NOUVEAU_BACKLIGHT policy<{'amd64': '-', 'arm64': 'y'}> | ||
CONFIG_DRM_NOUVEAU_BACKLIGHT note<'{Disable NOUVEAU driver}'> | ||
|
||
CONFIG_DRM_NOUVEAU_GSP_DEFAULT policy<{'amd64': '-', 'arm64': 'n'}> | ||
CONFIG_DRM_NOUVEAU_GSP_DEFAULT note<'{Disable NOUVEAU driver}'> | ||
|
||
CONFIG_DRM_NOUVEAU_SVM policy<{'amd64': '-', 'arm64': 'n'}> | ||
CONFIG_DRM_NOUVEAU_SVM note<'{Disable NOUVEAU driver}'> | ||
|
||
CONFIG_ETM4X_IMPDEF_FEATURE policy<{'arm64': 'n'}> | ||
CONFIG_ETM4X_IMPDEF_FEATURE note<'{Required for Grace enablement}'> | ||
|
||
CONFIG_GPIO_AAEON policy<{'amd64': '-'}> | ||
CONFIG_GPIO_AAEON note<'{Disable all Ubuntu ODM drivers}'> | ||
|
||
CONFIG_LEDS_AAEON policy<{'amd64': '-'}> | ||
CONFIG_LEDS_AAEON note<'{Disable all Ubuntu ODM drivers}'> | ||
|
||
CONFIG_MFD_AAEON policy<{'amd64': '-'}> | ||
CONFIG_MFD_AAEON note<'{Disable all Ubuntu ODM drivers}'> | ||
|
||
CONFIG_MTD policy<{'amd64': 'm', 'arm64': 'y'}> | ||
CONFIG_MTD note<'boot essential on arm'> | ||
|
||
CONFIG_NOUVEAU_DEBUG policy<{'amd64': '-', 'arm64': '5'}> | ||
CONFIG_NOUVEAU_DEBUG note<'{Disable NOUVEAU driver}'> | ||
|
||
CONFIG_NOUVEAU_DEBUG_DEFAULT policy<{'amd64': '-', 'arm64': '3'}> | ||
CONFIG_NOUVEAU_DEBUG_DEFAULT note<'{Disable NOUVEAU driver}'> | ||
|
||
CONFIG_NOUVEAU_DEBUG_MMU policy<{'amd64': '-', 'arm64': 'n'}> | ||
CONFIG_NOUVEAU_DEBUG_MMU note<'{Disable NOUVEAU driver}'> | ||
|
||
CONFIG_NOUVEAU_DEBUG_PUSH policy<{'amd64': '-', 'arm64': 'n'}> | ||
CONFIG_NOUVEAU_DEBUG_PUSH note<'{Disable NOUVEAU driver}'> | ||
|
||
CONFIG_NR_CPUS policy<{'amd64': '8192', 'arm64': '512'}> | ||
CONFIG_NR_CPUS note<'LP: #1864198'> | ||
|
||
CONFIG_PID_IN_CONTEXTIDR policy<{'arm64': 'y'}> | ||
CONFIG_PID_IN_CONTEXTIDR note<'{Required for Grace enablement}'> | ||
|
||
CONFIG_PREEMPT_NONE policy<{'amd64': 'n', 'arm64': 'y'}> | ||
CONFIG_PREEMPT_NONE note<'required for nvidia workloads'> | ||
|
||
CONFIG_PREEMPT_VOLUNTARY policy<{'amd64': 'y', 'arm64': 'n'}> | ||
CONFIG_PREEMPT_VOLUNTARY note<'required for nvidia workloads'> | ||
|
||
CONFIG_RUST policy<{'amd64': 'n', 'arm64': '-'}> | ||
CONFIG_RUST note<'Rust is disabled in derivatives'> | ||
|
||
CONFIG_RUST_IS_AVAILABLE policy<{'amd64': 'y', 'arm64': 'y'}> | ||
CONFIG_RUST_IS_AVAILABLE note<'Rust is disabled in derivatives'> | ||
|
||
CONFIG_SAMPLE_CORESIGHT_SYSCFG policy<{'arm64': 'n'}> | ||
CONFIG_SAMPLE_CORESIGHT_SYSCFG note<'{Required for Grace enablement}'> | ||
|
||
CONFIG_SENSORS_AAEON policy<{'amd64': '-'}> | ||
CONFIG_SENSORS_AAEON note<'{Disable all Ubuntu ODM drivers}'> | ||
|
||
CONFIG_SPI_TEGRA210_QUAD policy<{'arm64': 'y'}> | ||
CONFIG_SPI_TEGRA210_QUAD note<'ensures the TPM is available before the IMA driver initializes'> | ||
|
||
CONFIG_TCG_TIS_SPI policy<{'amd64': 'm', 'arm64': 'y'}> | ||
CONFIG_TCG_TIS_SPI note<'ensures the TPM is available before the IMA driver initializes'> | ||
|
||
CONFIG_UBUNTU_ODM_DRIVERS policy<{'amd64': 'n', 'arm64': 'n'}> | ||
CONFIG_UBUNTU_ODM_DRIVERS note<'{Disable all Ubuntu ODM drivers}'> | ||
|
||
CONFIG_ULTRASOC_SMB policy<{'arm64': 'n'}> | ||
CONFIG_ULTRASOC_SMB note<'{Required for Grace enablement}'> | ||
|
||
|
||
# ---- Annotations without notes ---- | ||
|
||
CONFIG_AX88796B_RUST_PHY policy<{'amd64': '-'}> | ||
CONFIG_BCH policy<{'amd64': 'm', 'arm64': 'y'}> | ||
CONFIG_BINDGEN_VERSION_TEXT policy<{'amd64': '-'}> | ||
CONFIG_CONSTRUCTORS policy<{'amd64': '-'}> | ||
CONFIG_EFI_CAPSULE_LOADER policy<{'amd64': 'm', 'arm64': 'y'}> | ||
CONFIG_MTD_NAND_CORE policy<{'amd64': 'm', 'arm64': 'y'}> | ||
CONFIG_RUSTC_VERSION_TEXT policy<{'amd64': '-'}> | ||
CONFIG_RUST_BUILD_ASSERT_ALLOW policy<{'amd64': '-'}> | ||
CONFIG_RUST_DEBUG_ASSERTIONS policy<{'amd64': '-'}> | ||
CONFIG_RUST_OVERFLOW_CHECKS policy<{'amd64': '-'}> | ||
CONFIG_RUST_PHYLIB_ABSTRACTIONS policy<{'amd64': '-'}> | ||
CONFIG_SAMPLES_RUST policy<{'amd64': '-'}> |
Oops, something went wrong.