Skip to content

Conversation

@mauromorales
Copy link
Member

@mauromorales mauromorales commented Oct 28, 2025

relates to kairos-io/kairos#3667

Fixes #62

@codecov
Copy link

codecov bot commented Oct 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.66%. Comparing base (30cd29e) to head (8d497f5).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #229   +/-   ##
=======================================
  Coverage   66.66%   66.66%           
=======================================
  Files           1        1           
  Lines         168      168           
=======================================
  Hits          112      112           
  Misses         39       39           
  Partials       17       17           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- Move all NVIDIA L4T packages from NvidiaPackages to KernelPackagesModels for AgxOrin and OrinNX models
- Add CUDA, Jetson GPIO, OpenCV, and NVIDIA Container Toolkit packages to kernel packages
- Remove NvidiaPackages struct entirely as all packages are now kernel-related
- Update GetPackages function to remove NVIDIA-specific logic
- Fix cross-compilation by ensuring ARM64 packages are selected for NVIDIA models
- All NVIDIA packages are now properly categorized as kernel/firmware packages
- Add command to remove existing NVIDIA repository files prior to creating the L4T packages directory in the installation stage.
- Remove hardcoded ARM64 architecture handling for NVIDIA Jetson devices.
- Update logic to use the system's architecture directly when filtering kernel packages.
- This change improves cross-compilation support and streamlines package retrieval.
- Introduced BasePackagesModels to define model-specific base packages for Ubuntu on ARM64 architecture.
- Updated GetPackages function to include these model-specific packages when a non-generic model is specified.
…tu ARM64

- Expanded BasePackagesModels to include a new entry for AgxOrin with essential packages such as bridge-utils, efibootmgr, and vim.
- This update enhances the package management for specific models, improving usability for users of the AgxOrin platform.
- Changed model checks from generic identifiers to full model names for NVIDIA Jetson devices in the installation stage.
- This ensures accurate execution of commands specific to the nvidia-jetson-agx-orin and nvidia-jetson-orin-nx models.
// Dockerfile.nvidia-orin-nx it says 36 :shrug:, do we actually need a
// default or should the user always set it? if we have a default, should it
// ever change?
nvidiaRelease = "35"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jordankrp I see that the default here is 35, but in https://github.com/kairos-io/kairos/blob/master/images/Dockerfile.nvidia-orin-nx#L11 it's 36, do you know why there's a difference?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were in the midst of upgrading our JetPack version from L4T 35.3.1 to 36.4.4. So the former variables are probably leftovers from our initial setup. We re now using nvidiaRelease = "36" and nvidiaVersion = "4.4" which we can update here.

// Dockerfile.nvidia-orin-nx it says 4.4 :shrug:, do we actually need a
// default or should the user always set it? if we have a default, should it
// ever change?
nvidiaVersion = "3.1"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jordankrp I see that the default here is 3.1 but in https://github.com/kairos-io/kairos/blob/c3011d352d0648df6829352a06eb9e4b96ff1892/images/Dockerfile.nvidia-orin-nx#L12 it's 4.4, do you know why there's a difference?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, see my comment above.

},
},
{
Name: "Setup NVIDIA L4T repositories",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Itxaka I'm not sure if I'm doing this properly, can you validate? Basically, I'm trying to mimic the steps in https://github.com/kairos-io/kairos/blob/master/images/Dockerfile.nvidia-orin-nx but I couldn't find a way to say e.g.

  1. rm -rf /etc/apt/sources.list.d/nvidia-l4t-apt-source.list
  2. install base packages
  3. set nvidia repos
  4. install kernel packages in that order

nevertheless this seems to build, so maybe it's ok?

@jordankrp how strict does the order in that dockerfile need to be? 😅

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the order is more about optimising docker caching when building a new OS image.

type VersionMap map[string][]string

// BasePackagesModels allows model-specific base packages per distro/arch/model
var BasePackagesModels = ModelPackageMap{
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Itxaka I added these to follow a similar approach to KernelPackagesModels, but I don't understand why we have to distinguish from Generic, IMO it would be better to be able already in KernelPackages, or BasePackages to have this granularity

Comment on lines +67 to +74
"bridge-utils",
"efibootmgr",
"fuse",
"git",
"grub2-common",
"libssl-dev",
"policykit-1",
"vim",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably not all these packages are needed and probably some can be installed based on the previous stages like GrubPackages for example

Can you validate what is a must here? @mudler

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove "git" and "vim" here, but I would keep the rest as kinda of useful.

Note the list was pulled directly from the images from nvidia.

Comment on lines +79 to +196
"bc",
"binutils",
"bluez",
"bridge-utils",
"bzip2",
"ca-certificates",
"can-utils",
"cloud-guest-utils",
"conntrack",
"console-data",
"console-setup",
"coreutils",
"cron",
"cryptsetup",
"curl",
"debianutils",
"default-jdk",
"dirmngr",
"dmsetup",
"dosfstools",
"dracut",
"dracut-live",
"dracut-network",
"e2fsprogs",
"efibootmgr",
"ethtool",
"fail2ban",
"fdisk",
"file",
"fuse3",
"gawk",
"gdisk",
"gettext",
"gnupg",
"gnupg1-l10n",
"gpg-agent",
"grub2-common",
"grub-efi-arm64",
"grub-efi-arm64-bin",
"grub-efi-arm64-signed",
"haveged",
"iproute2",
"iptables",
"iputils-ping",
"isc-dhcp-client",
"isc-dhcp-common",
"isc-dhcp-server",
"jq",
"kbd",
"kmod",
"lbzip2",
"less",
"libatm1",
"libglib2.0-data",
"libgpm2",
"libldap-common",
"libnss-systemd",
"libopencv-dev",
"libpam-cap",
"libqt5core5a",
"libsasl2-modules",
"libssl-dev",
"lldpd",
"logrotate",
"lvm2",
"mdadm",
"modemmanager",
"mtd-utils",
"nano",
"nbd-client",
"ncurses-term",
"netplan.io",
"net-tools",
"networkd-dispatcher",
"network-manager",
"nfs-client",
"nfs-common",
"nftables",
"open-iscsi",
"openssh-server",
"open-vm-tools",
"os-prober",
"packagekit-tools",
"parted",
"passwd",
"patch",
"pigz",
"pkg-config",
"policykit-1",
"psmisc",
"publicsuffix",
"qemu-user-static",
"rsync",
"shared-mime-info",
"shim-signed",
"snmpd",
"software-properties-common",
"squashfs-tools",
"ssh",
"sudo",
"systemd",
"systemd-container",
"systemd-sysv",
"systemd-timesyncd",
"tar",
"tpm2-tools",
"ubuntu-advantage-tools",
"udev",
"unzip",
"vim",
"wget",
"wireless-tools",
"wpasupplicant",
"xxd",
"xz-utils",
"zerofree",
"zfsutils-linux",
"zstd",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this are all the packages in https://github.com/kairos-io/kairos/blob/master/images/Dockerfile.nvidia-orin-nx I assume it can be stripped down to only the necessary ones, but I'm not sure what would those be 😅 ... I just know we probably don't need nano and vim there hehe

Opinions @jordankrp @mudler ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed this is a mix of fairly needed packages and setup-specific ones. Off the top of my head the setup-specific ones in our case (which you probably don't need here) are can-utils, default-jdk, jq, modemmanager, logrotate, zstd and parted.

@mauromorales mauromorales marked this pull request as ready for review October 30, 2025 20:57
@mauromorales mauromorales requested a review from a team as a code owner October 30, 2025 20:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the naming convention for NVIDIA Jetson board models from short names (agx-orin, orin-nx) to fully qualified names (nvidia-jetson-agx-orin, nvidia-jetson-orin-nx), and adds comprehensive support for these NVIDIA boards including L4T packages, CUDA configuration, and repository setup.

Key Changes:

  • Renamed model constants to use fully qualified NVIDIA board names
  • Added extensive NVIDIA L4T and CUDA package lists for both AGX Orin and Orin NX models
  • Added install stage steps for NVIDIA repository setup, CUDA path configuration, and device-specific configurations
  • Extended CI test matrix to include NVIDIA Jetson board builds

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
pkg/values/values.go Updated model constant names from short form to fully qualified NVIDIA board names
pkg/values/packagemaps.go Added BasePackagesModels map with NVIDIA-specific packages and extensive L4T/CUDA package lists for both board types
pkg/stages/steps_install.go Added environment variable handling for L4T/board configuration and multiple install steps for NVIDIA repository setup and device configuration
.github/workflows/test.yml Extended test matrix to include ARM64 builds for both NVIDIA Jetson board models

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mauromorales mauromorales changed the title [WIP] Handle nvidia boards Handle nvidia boards in kairos-init Oct 30, 2025
},
},
OrinNX: {
Common: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the packages are the same across all the L4T stack - would make sense to have a common piece for both the flavors (OrinNX and AGX Orin) to improve maintenance

"grub2-common",
"libssl-dev",
"policykit-1",
"vim",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"vim",

"bridge-utils",
"efibootmgr",
"fuse",
"git",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"git",

// Get board model from environment or config
boardModel := os.Getenv("BOARD_MODEL")
if boardModel == "" {
// Does it make sense that both AGX Orin and Orin NX use the same board model?
Copy link
Contributor

@jordankrp jordankrp Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eventually the main difference is how we flash and the partition layout, so it probably wouldn't matter to use the same at this stage, as long as the URL request later on doesn't complain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Under review 🔍

Development

Successfully merging this pull request may close these issues.

support nvidia models out of the box

4 participants