250 Commits

Author SHA1 Message Date
Ilies CHERGUI
820100bd70 meta: update recipes R36.4.0/JetPack 6.1 -> 36.4.3/JetPack 6.2
Signed-off-by: Ilies CHERGUI <ichergui@nvidia.com>
2025-04-19 04:26:13 -07:00
Ilies CHERGUI
aa7546af8b meta: update recipes R36.3.0/JetPack 6 -> R36.4.0/JetPack 6.1
Signed-off-by: Ilies CHERGUI <ichergui@nvidia.com>
Signed-off-by: Matt Madison <matt@madison.systems>
2024-10-26 08:15:33 -07:00
Matt Madison
814a256f34 l4t_version: move L4T_VERSION to global scope
The global tegra-mender-setup.bbclass from the meta-mender-community
layer uses the L4T_VERSION variable to define a `l4t-mender-<version>`
machine override, so that variable also needs to be available globally.

Signed-off-by: Zachary T Welch <zach@aquabyte.ai>
Signed-off-by: Matt Madison <matt@madison.systems>
2024-08-16 13:02:37 -07:00
Matt Madison
24fd0c6845 classes: move all bbclass files to classes-recipe
All of our bbclasses are per-recipe, rather than global.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-10-07 03:39:50 -07:00
Matt Madison
392742e130 image_types_tegra.bbclass: reduce duplicate code
* Add a tegraflash_populate_package function that has the
  common code for tegraflash and BUP generation.
* Combine the create_tegraflash_pkg functions that had
  been SoC-specific into a single function

Signed-off-by: Matt Madison <matt@madison.systems>
2023-10-07 03:39:50 -07:00
Matt Madison
b3195bdb50 meta: rework storage layout XML file handling
1. Move the staging of storage layout XML files from the L4T kit out
   of the tegra-bootfiles recipe to a new pair of recipes, one to
   fetch the base files out of the L4T kit, and a second one to
   process the base files for use in BUP generation and tegraflash
   packages.

2. Move the SoC-specific sed expressions from the tegraflash_create_flash_config
   functions in image_types_tegra.bbclass to a function in the new
   tegra-storage-layout recipe. These rewrites are for static boot firmware
   filenames that are not affected by the build itself, so they can
   be applied early.

3. Use fixed names for the staged layout files - internal, bup-internal,
   and (optionally) external, to reduce the exposure of the variable, since
   only one of each will be used for any build.

This reduces the code size in the bbclass and should make it easier for
users to provide custom layouts in place of the L4T originals.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-10-07 03:39:50 -07:00
Matt Madison
4708f57c0f image_types_tegra.bbclass: remove fuselevel settings/defaults
The updated flash helper always uses fuselevel_production, so we no
longer need to set fuselevel in the environment.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-10-07 03:39:50 -07:00
Matt Madison
12f7a59061 meta: consolidate flash helper logic into one script
While some of the initial discovery/setup logic varies between the t194 and t234
chips, a lot of what the two flash helper scripts do is the same.  To simplify
future BSP updates, and prevent the duplicate logic from accidentally getting out
of sync over time, this commit switches to using a single script to support both SoCs:

1. tegra{194,234}-flash-helper.sh merged into tegra-flash-helper.sh
2. image_types_tegra.bbclass updated to reference the new script
3. CHIPID= setting added in appropriate places so the script knows which SoC to expect
4. Eliminate fuselevel variable checking in helper script, since we can only
   support production chips anyway
5. New script has uniform 4-space indentation, no hard tabs

Signed-off-by: Matt Madison <matt@madison.systems>
2023-10-07 03:39:50 -07:00
Matt Madison
edeba22222 image_types_tegra.bbclass: switch to TEGRA_BOOT_FIRMWARE_FILES
which is now defined in the machine config to enumerate the
boot firmware files, rather than having a duplicate list in
the bbclass.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-10-07 03:39:50 -07:00
Matt Madison
1e75857201 image_types_tegra.bbclass: update copy_dtb_overlays function
to take the list of boot control overlays as arguments rather than
using the TEGRA_BOOTCONTROL_OVERLAYS variable directly, and update
the invocations to use the Python function that adds in the appropriate
overlay for UEFI keys when UEFI secure boot is in use.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-09-24 05:28:50 -07:00
Matt Madison
f86a68bf5a image_types_tegra.bbclass: correct typo in copy_dtbs function
When copying out of ${DEPLOY_DIR_IMAGE}, use the basename of the
DTB file.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-09-05 13:26:20 -07:00
Ilies CHERGUI
81092d743f conf/machine: add Jetson Orin AGX Industrial support
Signed-off-by: Ilies CHERGUI <ilies.chergui@gmail.com>
2023-09-02 05:04:12 -07:00
Matt Madison
c0e618acc6 image_types_tegra.bbclass: updates for L4T R35.4.1
* Stock L4T external flash layouts now use a rewrite
  for inserting the size, in sectors of the external
  device
* Adjust the boot control overlays when UEFI signing
  is enabled so that BUP payloads use the update keys
  instead of the default keys
* Add rewrites for flash layout fields added for Orin
  industrial modules
* Add firmware new for Orin industrial modules to the
  BOOTFILES list

Signed-off-by: Matt Madison <matt@madison.systems>
2023-09-02 05:04:12 -07:00
Matt Madison
d90c9aea71 meta: update BSP recipes from L4T R35.3.1 -> R35.4.1
Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Ilies CHERGUI <ilies.chergui@gmail.com>
2023-09-02 05:04:12 -07:00
Matt Madison
ec47fbe6ac cuda.bbclass: remove -fcanon-prefix-map from DEBUG_PREFIX_MAP
That's the variable that includes it, while DEBUG_FLAGS gets it
indirectly.  So do other variables that might get used with the
older compiler, so removing it from the original source variable
will fix those cases, too.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-08-23 10:52:27 -07:00
Matt Madison
b6f194a761 cuda.bbclass: update EXTRA_OECMAKE setting
to define CUDA_NVCC_FLAGS as a list, since the old-school FindCUDA
module treats that variable as a list.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-08-23 10:51:17 -07:00
Matt Madison
52f994fbb3 classes: update cuda bbclasses for nvcc/glibc 2.38 workaround
* Add flags for pointing to the compatibility/workaround header tree
  to CUDA_NVCC_PATH_FLAGS in cuda.bbclass
* Add the dependency on cuda-compatibility-workaround in cuda-gcc.bbclass

Signed-off-by: Matt Madison <matt@madison.systems>
2023-08-20 05:43:14 -07:00
Chad McQuillen
e7a0c101cd tegra-bup.bbclass: move logic to bbclass for reuse
Signed-off-by: Chad McQuillen <chad.mcquillen@lexmark.com>
2023-08-04 04:56:17 -07:00
Matt Madison
56e0e9ba94 gcc-for-nvcc: update to gcc 10.3.0
imported from OE-Core hardknott, and rename the
recipes to be 'gcc-for-nvcc' instead of including
a repeat of the major version number.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-07-22 09:31:47 -07:00
Matt Madison
75960efc44 meta: rework image name usage for IMAGE_NAME_SUFFIX changes
OE-Core has reworked how the IMAGE_NAME and IMAGE_NAME_SUFFIX
variables are used - the suffix now gets embedded in IMAGE_NAME.
To account for this, adjust the tegra-specific image bbclasses
to drop ${IMAGE_NAME_SUFFIX} references, and adjust the recipes
for the ESP and initrd images to nullify IMAGE_NAME_SUFFIX, since
we don't really want '.rootfs' in the resultant artifact names
in those cases.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-07-04 07:51:51 -07:00
Matt Madison
80ba0cd590 meta: go back to hyphenated suffix name for BUP payloads
for consistency with the earlier naming we used.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-06-26 09:42:45 -07:00
Matt Madison
b2074dc365 meta: fix further bup payload naming inconsistencies
Signed-off-by: Matt Madison <matt@madison.systems>
2023-06-26 09:35:50 -07:00
Chad McQuillen
3428cbd7a7 Fix naming convention of bup payload
- bbclass and tegra-bup-payload recipe naming convention must match.
2023-06-26 09:33:16 -07:00
Matt Madison
8dfb2d6be7 cuda.bbclass: strip -fcanon-prefix-map from DEBUG_FLAGS for cuda builds
Unfortunately, we don't have a good way of stripping that flag just
from the nvcc/gcc-8 invocations.  For now, at least, just remove it
entirely for all cuda builds.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-05-27 07:17:46 -07:00
Joost Baars
c2a3481a4d Added support for the Jetson AGX Xavier Industrial variant
Signed-off-by: Joost Baars <joost.baars@prodrive-technologies.com>
2023-05-27 04:28:13 -07:00
Matt Madison
6ebddcb75e l4t_bsp.bbclass: add L4T_OVERLAY_URI_BASE variable
which does not add the '/release' subdirectory to the path.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-05-05 05:48:44 -07:00
Matt Madison
df97cf1ef9 image_types_tegra: update TEGRAFLASH_ROOTFS_EXTERNAL setting
to compare the TNSPEC_BOOTDEV value against the per-platform default
value.  This improves support for the jetson-orin-nano-devkit-nvme
configuration, using the same flash layout for both normal flashing
and initrd flashing.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-04-09 07:48:19 -07:00
Matt Madison
acd3a40a34 image_types_tegra.bbclass: add dosdcard.sh script to t234 tegraflash packages
All of the t234 platforms have SPI flash, so remove the conditional logic in
the t234 tegraflash package generator and always create a dosdcard.sh script.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-04-09 04:23:07 -07:00
Matt Madison
b28462f16d image_types_tegra: disable metadata_csum_seed for ext4 by default
The ext4 implementation in UEFI can't handle that feature,
and e2fsprogs 1.71 and later enables it by default.  Users that
will never make use of L4TLauncher's extlinux.conf support can
override the setting if they need the feature enabled.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-04-09 04:23:07 -07:00
Matt Madison
cb3fb1dec0 meta: updates for BUP generation changes in R35.3.1
The combined bl + kernel payload is no longer generated; remove
references to that and instead deploy the individual bl_only and
kernel_only payloads.  Also update the BUP generator script to
allow the bupgen spec to explicitly name the type of payload to
generate, another feature on R35.3.1.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-04-09 04:23:07 -07:00
Matt Madison
07a46ecca4 meta: update recipe names and checksums for L4T R35.3.1/JP5.1.1
Signed-off-by: Matt Madison <matt@madison.systems>
2023-04-09 04:23:07 -07:00
Matt Madison
202af166e4 image_types_tegra: update for UEFI signing
* Package signed kernel DTB files
* Add UefiDefaultSecurityKeys overlay when signing is enabled

Signed-off-by: Matt Madison <matt@madison.systems>
2023-02-08 03:14:00 -08:00
Matt Madison
66cb7f5032 l4t-extlinux-config: pad extlinux.conf file
to an even multiple of 16 bytes, to avoid padding
with unprintable characters if the file gets signed.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-02-08 03:14:00 -08:00
Matt Madison
a9d1a6847e image_types_cboot: support UEFI signing
Signed-off-by: Matt Madison <matt@madison.systems>
2023-02-08 03:14:00 -08:00
Matt Madison
2134e512c1 classes: add tegra-uefi-signing.bbclass
For implementing the common functions and variables
needed for signing files/binaries validated by the
UEFI bootloader.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-02-08 03:14:00 -08:00
Matt Madison
c3a340d41e image_types_tegra.bbclass: clean up DTB overlay copies
Copy just the overlays enumerated in OVERLAY_DTB_FILE into
the tegraflash package/BUP workspace, and allow for those
files to come from the virtual/dtb provider, just as we do
for plain DTB files.

Also prepare for retirement of the use of OVERLAY_DTB_FILE
as bitbake variable, which was a bit awkward to manage.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-02-08 03:14:00 -08:00
Matt Madison
7c8c20c72c image_types_tegra: add NO_INTERNAL_STORAGE support
to pass to initrd-flash for Orin NX (and possibly other
future targets) that have no internal storage.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-02-08 03:14:00 -08:00
Matt Madison
5a80754557 image_types_tegra: pass chip ID to initrd-flash script in environment
Unfortunately, some chip-specific additions are needed in the initrd
flashing script.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-02-08 03:14:00 -08:00
Matt Madison
c12a215210 l4t_deb_pkgfeed: switch x86-64 feed from bionic to focal
Signed-off-by: Matt Madison <matt@madison.systems>
2023-02-08 03:14:00 -08:00
Matt Madison
86f524782d image_types_tegra.bbclass: updates for L4T R35.2.1
Signed-off-by: Matt Madison <matt@madison.systems>
2023-02-08 03:14:00 -08:00
Matt Madison
1bc2aa053d l4t_bsp.bbclass: update for L4T R35.2.1
Signed-off-by: Matt Madison <matt@madison.systems>
2023-02-08 03:14:00 -08:00
Matt Madison
f3f993663d image_types_tegra: make initrd-flash support configurable
Make the image dependencies and inclusion of the initrd-flash
image conditional on whether TEGRAFLASH_INITRD_FLASH_IMAGE is
non-null.  This allows users to exclude initrd-flash support
from their builds, if desired.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-01-17 07:56:09 -08:00
Matt Madison
b2dae6c574 image_types_tegra: add support for BUP-specific flash layouts
Signed-off-by: Matt Madison <matt@madison.systems>
2023-01-16 08:49:59 -08:00
Matt Madison
d111128487 image_types_tegra: update __pycache__ cleanup after signing
The NVIDIA signing tools added a pyfdt package, so we need to
clean up the __pycache__ created for that as well as the
top-level one.

Signed-off-by: Matt Madison <matt@madison.systems>
2022-12-30 03:20:20 -08:00
Matt Madison
40b259e8d8 image_types_tegra: updates for initrd flashing
* Support separate internal and external flash layouts
* Unify the post-signing function, which is the same
  across the two Soc types, and populate a '.presigning-vars'
  file there to be used by the initrd flashing script
* Populate a '.env.initrd-flash' file to set environment
  variables needed by the initrd flashing script

Signed-off-by: Matt Madison <matt@madison.systems>
2022-12-30 03:20:20 -08:00
Matt Madison
fac8404660 image_types_tegra: update recovery kernel partition size for R35.1
and use a variable to make it easier to customize (or to update it
if NVIDIA changes the default again).

Signed-off-by: Matt Madison <matt@madison.systems>
2022-12-30 03:20:20 -08:00
Ian Stewart
cfaca74dd0 l4t_deb_pkgfeed.bbclass: Add SKIP_POOL_APPEND option
This adds an L4T_DEB_FEED_SKIP_POOL_APPEND option
that can be enabled to skip appending the
'/pool/group/pkg/etc' suffix to the deb feed for
additional components that are hosted outside of
the L4T deb repos.

Signed-off-by: Ian Stewart <istewart@nvidia.com>
2022-12-28 03:45:27 -08:00
Matt Madison
e754f97f79 image_types_tegra.bbclass: add fuselevel setting to dosdcard.sh
The recent changes to the helper scripts added a check on
'fuselevel' being set for fetching the chip ID from the device,
so we need to make sure that variable is set when creating
an SDcard image.

Signed-off-by: Matt Madison <matt@madison.systems>
2022-11-10 10:37:18 -08:00
Matt Madison
9f816cabdf image_types_tegra: remove BOARDID/FAB/etc settings for t234 flashing
The doflash.sh script generated for t234 devices was erroneously
including environment variable settings for BOARDID, FAB, etc.,
bypassing the fuse/EEPROM read logic in the helper script, probably
because the script was broken. Now that the script has been fixed, remove
those settings so the actual values are queried from the device
during flashing.

Signed-off-by: Matt Madison <matt@madison.systems>
2022-11-06 07:42:53 -08:00
Ricardo Salveti
1331d6b8d5 image_types_tegra.bbclass: allow TEGRA_ESP_IMAGE to be empty
Allow the user to replace the standard TEGRA_ESP_IMAGE image by not
depending on the respective do_image_complete task.

The preferred image can be set via IMAGE_TEGRAFLASH_ESPIMG, after
setting TEGRA_ESP_IMAGE to empty.

Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2022-10-19 03:11:46 -07:00