Commit Graph

2680 Commits

Author SHA1 Message Date
Austin Schuh
0a2689bde3 conf/machine: add configuration for Orin Nano SKU 0003
Note, this is different than the SOM in the orin nano developer kit.

Signed-off-by: Austin Schuh <austin.linux@gmail.com>
2025-01-22 06:29:28 -08:00
Matt Madison
30217c6fc3 meta: switch from virtual/XXX-gcc to virtual/cross-XXX
OE-Core master has udpated how the toolchain virtual providers
are handled, so update the layer accordingly.

This affects the gcc-for-nvcc extra toolchain build we have for
CUDA builds, and a few other recipes that have some explicit
references to the old toolchain virtual/<something> names.

Signed-off-by: Matt Madison <matt@madison.systems>
2025-01-22 06:05:38 -08:00
Matt Madison
afce451aaa tegra-helper-scripts: disable initrd-flash USB instance check
USB instances might not be consistent between the Jetson boot ROM
and the mass storage USB gadget in the running OS, so make the
cross-check of the instance ID optional, and off by default.

This means that when flashing secureboot-enabled devices using
pre-signed binaries, only one target can be flashed at a time
from a given host.

Signed-off-by: Matt Madison <matt@madison.systems>
2025-01-21 04:04:46 -08:00
Matt Madison
65b8d6e0d5 sbsigntool: update from 0.9.4 to 0.9.5
* Drop OpenSSL 3 support patch now included upstream
* Rework OE build integration to be a bit cleaner
* Update to use BBCLASSEXTEND for native, instead of
  having a direct -native recipe

Signed-off-by: Matt Madison <matt@madison.systems>
2025-01-20 07:32:45 -08:00
Pavel Löbl
e65f3be370 espimage: make image size configurable
Signed-off-by: Pavel Löbl <pavel@loebl.cz>
2025-01-19 07:41:42 -08:00
Matt Madison
9083cca978 optee-os: fix buildpaths warning
Fix the change introduced in ff0795338b
to use a relative path, rather than an absolute path, so the full
build path doesn't get embedded in any of OP-TEE packages.

Signed-off-by: Matt Madison <matt@madison.systems>
2025-01-19 07:01:43 -08:00
Matt Madison
18d621753f tegra-helper-scripts: let initrd-flash use USB instance for storage check
Since we can't get the target's serial number out of the CVM EEPROM when
using pre-signed binaries, look for the USB instance in the device path
as a way of cross-checking that a storage device matches the target we're
trying to flash.

Signed-off-by: Matt Madison <matt@madison.systems>
2025-01-19 07:01:43 -08:00
Matt Madison
b84d637a5c tegra-helper-scripts: fix initrd-flash handling of pre-signed binaries
* Tweak the flashing script and XML file naming for the pre-signed case
  as is done when the script runs the signing itself.  Note that external
  flash layouts are assumed not to require any tegrasign-type signing, which
  should always be the case for R36.x and later.
* Make the script tolerant of not being able to fetch the target's serial
  number from the CVM EEPROM. There doesn't appear to be a way to fetch
  the CVM contents with pre-signed boot firmware.

With these changes, when using pre-signed binaries, only one target can
be flashed at a time from a given host.

Signed-off-by: Matt Madison <matt@madison.systems>
2025-01-19 07:01:43 -08:00
Matt Madison
f4fd64504f tegra-helper-scripts: restore main files after RCM boot signing
The odmsign functions do the same post-processing for RCM boot signing
as they do for main signing, so be sure to save and restore the main
files after the second call for signing the RCM boot blob.

Signed-off-by: Matt Madison <matt@madison.systems>
2025-01-19 07:01:43 -08:00
Matt Madison
8b776e1eb0 tegra-helper-scripts: correct typo in tegra-flash-helper
Missed an underscore in a variable name.

Signed-off-by: Matt Madison <matt@madison.systems>
2025-01-19 07:01:43 -08:00
Pavel Löbl
ff0795338b optee-os: make build work in devtool
Make sure we have proper path to MM even when building
from devtool workspace.

Signed-off-by: Pavel Löbl <pavel@loebl.cz>
2025-01-17 12:39:31 -08:00
Matt Madison
652714f9d8 Revert "linux-yocto: import recipe for 6.10"
This reverts commit e563e7860f.

Signed-off-by: Matt Madison <matt@madison.systems>
2025-01-12 09:17:15 -08:00
Matt Madison
1a2a086ed6 linux-yocto: update bbappend for version 6.12
Now that we have patched the NVIDIA out-of-tree drivers to
be compatible with this version, we can update.

Signed-off-by: Matt Madison <matt@madison.systems>
2025-01-12 09:17:15 -08:00
Matt Madison
9d8e6a201d nvidia-kernel-oot: add recipe for using git-hosted repos
With the repos hosted or mirrored on Github so we can more
easily manage patch additions for kernel versions beyond what
NVIDIA provides in a given Jetson Linux release.

Signed-off-by: Matt Madison <matt@madison.systems>
2025-01-12 09:17:15 -08:00
Matt Madison
1a91c5168d tegra-helper-scripts: fix RCM boot blob signing
With L4T R36.4, the odmsign.func script now supports signing
the RCM boot blob used for the initrd-based flashing process.
While the initrd-flash script was updated to handle this, more
changes are needed to handle signing all binaries during the
build.

* Update the flash helper script to run signing on the RCM
  boot blob when needed.

* Update the initrd-flash script to drop the extra helper
  invocation for signing the RCM boot blob, since that is
  now covered with the normal signing step for the internal
  flash. And when pre-signed, initrd-flash just looks for
  the RCM boot blob in the subdirectory now created during
  build-time signing.

Signed-off-by: Matt Madison <matt@madison.systems>
2025-01-12 04:37:59 -08:00
Dan Walkes
09fdbac034 tegra-sources: update public_sources.tbz2 hash
It seems the public_sources.tbz2 tarball hash has changed
without content change, which causes builds to fail due to
checksum mismatch.

Resolves https://github.com/OE4T/meta-tegra/issues/1798

Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
2025-01-10 09:59:55 -08:00
Kurt Kiefer
06c060aa8e nvidia-drm-loadconf: changes to play nicely with x11
We want to be able to pull in the module load configuration by default
but need to be careful to not enable the 'modeset' parameter on the
driver unless we won't be using x11 in the image. We can't check
distro features, so we make the modprobe conf RCONFLICT with x11, and
don't allow it to be pulled in if 'modeset' is enabled.

Also add variables to allow overriding the setting for the 'modeset'
and 'fbdev' parameters in a bbappend, local.conf file, or similar.

Signed-off-by: Kurt Kiefer <kekiefer@gmail.com>
2025-01-09 05:55:45 -08:00
Kurt Kiefer
2842745dec libdrm: move dependency on nvidia-drm out of weston-init
The nvidia-drm kernel module and associated load config are needed
by libdrm but were only getting picked up by weston-init.

There are valid configurations (headless, egl-only) that need
libdrm but do not pull in weston, so the runtime recommendation
is moved to the libdrm bbappend.

Signed-off-by: Kurt Kiefer <kekiefer@gmail.com>
2025-01-09 05:55:45 -08:00
Logan Gallois
630c21757c cuda-cupti: fix DEVSUM for x86-64
Signed-off-by: Logan Gallois <logan.gallois@hotmail.fr>
2025-01-09 05:32:50 -08:00
Khem Raj
3c0d8bed93 cuda-compatibility-workarounds: Fix build with upcoming glibc 2.41
sinpi/cospi/sinpif/cospif are now defined in glibc as part of C23 extentions
but they conflict with CUDA declrations, therefore use the glibc definitions
when its provided by glibc

Fixes https://github.com/OE4T/meta-tegra/issues/1784

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-12-17 09:27:11 -08:00
Andrew Bradford
c523c2f938 tegra-flash-helper: Allow PKC-only secure boot flashing
When flashing a board fused with PKC hash but no SBK, we should not
supply a SBK key as that would encrypt the flash contents which would
then not be able to be read by the board when booting, as the board
won't know the SBK key.

Signed-off-by: Andrew Bradford <andrew.bradford@konsulko.com>
2024-12-16 13:51:22 -08:00
Matt Madison
e563e7860f linux-yocto: import recipe for 6.10
Temporarily pull in the 6.10 recipe, until we can sort out
an update to 6.12.

Signed-off-by: Matt Madison <matt@madison.systems>
2024-12-16 13:35:09 -08:00
Hugo Serrat
12df4c3236 linux-yocto: add patch to fix compatibility with nvbootctrl
Signed-off-by: Hugo Serrat <hu.serrat@gmail.com>
2024-12-10 07:16:49 -08:00
Matt Madison
7ca22f4bd1 edk2-firmware-tegra: add backported patch for cpp issue
when building on Fedora 40, and probably other newer-vintage
distros.

Signed-off-by: Matt Madison <matt@madison.systems>
2024-12-07 08:53:54 -08:00
Matt Madison
7f44cec67e tegra-binaries: refactor per-SoC vs. common deb package handling
With the R36 series, the nvidia-l4t-gstreamer package now comes off
the 'common' feed instead of the per-SoC feed, which affects multiple
recipes.

Add a new variable, L4T_DEB_IS_COMMON, to the include file we use for
the BSP recipes, to let them specify that the main package should come
from the common feed. Update the recipes for the binary-only gstreamer
plugins, nvdsseimeta, and the DLA compiler to use this new mechanism.

Signed-off-by: Matt Madison <matt@madison.systems>
2024-12-07 08:18:56 -08:00
Matt Madison
55708dbcda l4t-graphics-demos: refresh weston-dmabuf-formats build patch
for the upgrade of weston to version 14.

Signed-off-by: Matt Madison <matt@madison.systems>
2024-11-29 04:14:11 -08:00
Matt Madison
acb5907d2c Add SECURITY.md file
now required by yocto-checklayer.

Signed-off-by: Matt Madison <matt@madison.systems>
2024-11-28 06:05:17 -08:00
Sid-Ali Teir
602a51557c nvidia-l4t-optee: update libteec version
Signed-off-by: Sid-Ali Teir <sidali.teir@wavelit.io>
2024-11-22 04:54:00 -08:00
Ming Liu
f3770ccd46 nvidia-kernel-oot: fix a wrong variable
Commit 9fa8701606dffc7153e7593f817e8ef8f56d335e:
[ nvidia-kernel-oot: fix a build issue ]

intended to pass ${STAGING_KERNEL_BUILDDIR} to make but mistakenly
passed ${STAGING_KERNEL_DIR} which still referring to kernel source but
not kernel builddir, fix that.

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
2024-11-12 04:32:50 -08:00
Matt Madison
2b64044bc8 linux-yocto_6.10: add config fragment for R8169
The OOT R8168 driver does not get built for 6.10 kernels,
so add the R8169 driver (which also covers the 8168) to
to the kernel build, so we have a driver available for
the Ethernet interface on the Orin Nano dev kit carrier.

Signed-off-by: Matt Madison <matt@madison.systems>
2024-11-11 10:01:23 -08:00
Matt Madison
e1b28ba995 nvidia-kernel-oot: fix build failure with 6.10 kernel
Add a patch for the conftest script so it correctly detects one
of the 6.10 changes even when 'linux' appears in the directory path
during a build, as ours usually do.

Also renumber the patches so the order of application is clearer.

Signed-off-by: Matt Madison <matt@madison.systems>
2024-11-11 09:02:14 -08:00
Matt Madison
a42af820e4 image_types_tegra: make the ESP partition optional
With the Jetson minimal UEFI, no application is loaded from the
ESP partition by the bootloader, so allow for the possibility
that someone has removed the ESP from the storage layout.

Signed-off-by: Matt Madison <matt@madison.systems>
2024-11-11 07:06:40 -08:00
Matt Madison
2b18e164e9 tegra-common: add TEGRA_UEFI_MINIMAL support
- Default to off
- Add the needed boot control overlay when enabled

Signed-off-by: Matt Madison <matt@madison.systems>
2024-11-11 07:06:40 -08:00
Matt Madison
70f85df34b edk2-firmware-tegra: add support for JetsonMinimal builds
The AGX Orin platform supports a minimal UEFI for booting
off its internal eMMC. Add support for a TEGRA_UEFI_MINIMAL
variable, which when set to a boolean true value, builds
this minimal configuration instead of the normal UEFI.

See the "miniUEFI Support" section in the Jetson Linux developer
guide for more information about support, restrictions, etc.

Signed-off-by: Matt Madison <matt@madison.systems>
2024-11-11 07:06:40 -08:00
Matt Madison
b26b6ff09b setup-nv-boot-control: remove ESP mount dependency
The ESP partition is no longer required for setting up the
boot control configuration, so we can remove that dependency.
We may also want to remove the esp.mount unit, or move that
to an optional fstab addition, at some point in the future.

Signed-off-by: Matt Madison <matt@madison.systems>
2024-11-11 07:06:40 -08:00
Matt Madison
0a367f0b53 tegra-helper-scripts: use 'sparse update' of SPI flash by default
The tegraflash.py script takes a '--sparseupdate' option that causes
it to update only changed partitions in the SPI flash. Enable that
by default in the flash helper script, and add an --erase-spi option
to force full erasure of the SPI flash, in case that's needed.

Signed-off-by: Matt Madison <matt@madison.systems>
2024-11-11 07:06:40 -08:00
Ming Liu
cfe0220947 nvidia-kernel-oot: fix a build issue
A build issue was observed as follows:
| .../kernel-source/Makefile:672: include/config/auto.conf: No such file or directory
| make[1]: *** [Makefile:226: __sub-make] Error 2
| make[1]: Leaving directory '.../kernel-source'
| make: *** [Makefile:63: hwpm] Error 2

it's not always reproduced, but occasionally happens when we add
patches to nvidia-kernel-oot.

The root cause of this problem is in nvidia-kernel-oot's Makefile, it
goes into ${KERNEL_SRC} instead of ${STAGING_KERNEL_DIR} to build,
which is wrong when building modules/dtbs, because there are no config
files generated in kernel source.

Let's change ${KERNEL_SRC} to ${STAGING_KERNEL_DIR}.

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
2024-11-11 06:36:05 -08:00
Chad McQuillen
67637b4a0d tegra-kernel: fix sign_bootimg
- This matches the behavior in classes/image_types_cboot.bbclass
  whereby the signed kernel image is copied over the top of the
  original unsigned kernel image.

Signed-off-by: Chad McQuillen <chad.mcquillen@lexmark.com>
Signed-off-by: Matt Madison <matt@madison.systems>
2024-11-10 06:29:34 -08:00
Matt Madison
4910dd248b tegra-common: add TEGRA_FLASH_CHECK variables
Starting with the BOARDID and BOARDSKU variables.
For our purposes, they need to be fixed at build time,
and if they don't match the actual target machine, we'll
get difficult-to-diagnose boot failures.

Signed-off-by: Matt Madison <matt@madison.systems>
2024-11-10 06:16:36 -08:00
Matt Madison
ffd3942f6b tegra-flashvars: add support for TEGRA_FLASH_CHECK variables
which we can use to prevent mis-flashing when the selected
machine configuration doesn't match the actual target hardware.

Signed-off-by: Matt Madison <matt@madison.systems>
2024-11-10 06:16:36 -08:00
Matt Madison
3e0d4933d6 tegra-helper-scripts: add board ID and SKU checks to flash helper
Have the helper script cross-check the build-time board ID and SKU
settings, if available, against the actuals read from the CVM EEPROM,
and error out, rather than flashing the wrong boot firmware.

Signed-off-by: Matt Madison <matt@madison.systems>
2024-11-10 06:16:36 -08:00
Matt Madison
c7fc26f983 tegra-helper-scripts: do not set default chip SKU in tegra-flash-helper
The default chip SKU should now be getting passed via the
TEGRA_FLASHVAR_CHIP_SKU setting in the machine configuration,
so do not supply a probably-incorrect default  in the helper
script. Instead, report an error and exit.

Signed-off-by: Matt Madison <matt@madison.systems>
2024-11-10 06:16:36 -08:00
Matt Madison
de2553df58 conf/machine: refactor and add CHIP_SKU defaults
* Move the mostly-common Orin NX settings to a new orin-nx.inc file
* Set TEGRA_FLASHVAR_CHIP_SKU for machines that differ from the
  common default, derived from the chip SKU referenced in the
  TEGRA_BUPGEN_SPECS setting
* Convert jetson-agx-orin-devkit-industrial config to using the
  agx-orin.inc include file

Signed-off-by: Matt Madison <matt@madison.systems>
2024-11-10 06:16:36 -08:00
Matt Madison
20da6a250b tegra-common: add CHIP_SKU to TEGRA_FLASHVARS
so we can add a default setting for this variable into
machine configuration files.

Signed-off-by: Matt Madison <matt@madison.systems>
2024-11-10 06:16:36 -08:00
Matt Madison
009e202587 tegra-common: fix TEGRA_FLASHVARS setting
* Drop obsolete (t19x-specific) entries
* Add missing RAMCODE entry

Signed-off-by: Matt Madison <matt@madison.systems>
2024-11-10 06:16:36 -08:00
Martin Jansa
11772a0f60 tegra-uefi-capsules: add dependency on lz4-native
* HOSTTOOLS is now using lz4 instead of lz4c since:
  https://git.openembedded.org/openembedded-core/commit/?id=fe167e082cbde1c6d186ecdda531abef610ac2ac
  and tegra-uefi-capsules do_compile is failing with:
  tegra-uefi-capsules/35.6.0/recipe-sysroot-native/usr/lib/python3.13/subprocess.py", line 1966, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
  FileNotFoundError: [Errno 2] No such file or directory: 'lz4c'
  tegra-uefi-capsules/35.6.0/temp/run.do_compile.2229307:369 exit 1 from './doflash.sh'

* I've seen this only with scarthgap-l4t-r35.x branch modified to build
  for walnascar (master), but it looks like the same is needed in master
  branch (which has surprisingly to me older version 36.4.0 while
  scarthgap-l4t-r35.x has 36.6.0, but I don't really use any nvidia
  MACHINEs, only sometimes building world for them, so maybe it's
  expected)

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
2024-11-09 06:25:05 -08:00
Martin Jansa
76bc8e302b sbsigntool: Fix Upstream-Status format
* drop the one which says 'Inappropriate [Backport]'
  as it's either Backport or Inappropriate, but cannot be both

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
2024-11-06 06:16:01 -08:00
William Cheng
605e62d288 Fix device tree file check in nvidia-kernel-oot-dtb
Signed-off-by: William Cheng <shihuac@amazon.com>
2024-11-02 05:34:40 -07:00
Kurt Kiefer
87a914b530 linux-yocto: add tegra support for version 6.10
Signed-off-by: Kurt Kiefer <kekiefer@gmail.com>
2024-10-29 12:03:41 -07:00
Kurt Kiefer
48dd43b15c linux: linux-yocto: move patches into version-specific directory
Signed-off-by: Kurt Kiefer <kekiefer@gmail.com>
2024-10-29 12:03:41 -07:00