Commit Graph

249 Commits

Author SHA1 Message Date
Matt Madison
d97fb6fd40 image_types_tegra.bbclass: add fuse burning script
when an odmfuse_pkc.xml file is availble.  Currently
limited to tegra186 (Jetson TX2) platforms.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-04-28 08:24:00 -07:00
Matt Madison
61724c9cf8 meta: use PARTITION_LAYOUT_TEMPLATE to name flash layout file
when installing into the sysroot, instead of fixing the name
based on MACHINE.  This allows for the possibility of having
multiple flash layouts apply to a single MACHINE.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-04-28 08:24:00 -07:00
Matt Madison
439923a15d classes: add l4t_deb_pkgfeed.bbclass
For fetching packages available from NVIDIA's package
feeds.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-04-26 08:42:42 -07:00
Matt Madison
24722eaa3d meta: begin update from 32.3.1 to 32.4.2
First stage focuses on getting downloads working:
- rename recipes
- update for URI change
- update checksums
- refresh/add patches for native tools

Signed-off-by: Matt Madison <matt@madison.systems>
2020-04-26 08:42:05 -07:00
Matt Madison
fa3eeafc3e image_types_tegra.bbclass: add boardcfg setting to BUP payload generator
The tegra210 flash helper takes a 'board config' parameter, and
if we send off binaries to a signing server that makes use of the
flash helper script, we need to provide that file (for TX1 targets,
at least).

Signed-off-by: Matt Madison <matt@madison.systems>
2020-04-05 09:39:56 -07:00
Matt Madison
4cace17f11 cuda.bbclass: update to align with SDK builds
This is mostly cleanup to align with the CUDA language
support that has been in CMake since version 3.8 - setting
the correct environment variables with the correct values
makes CMake's auto-discovery work better, so we can
remove much of the toolchain config file settings that
were there as workarounds.

The settings related to using FindCUDA are kept, for now.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-04-01 08:11:33 -07:00
Matt Madison
f5620a144f image_types_tegra.bbclass: update tegra-redundant-boot dependency
The build-time files are now provided by tegra-redundant-boot-base.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-03-25 14:40:57 -07:00
Matt Madison
af4492634b meta: use bundled initramfs instead of initrd on tegra186/194
cboot appears to mangle the initrd at boot time when it
exceeds a couple of MiB in size, but only if it has
been built separately and combined with the kernel using
mkbootimg.  This does not happen when the initrd is
built into the kernel directly, so work around the cboot
issue by switching to bundling the initramfs into the
kernel on the non-u-boot platforms.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-03-22 08:12:58 -07:00
Matt Madison
27dbbeca3a image_types_tegra.bbclass: add default IMAGE_ROOTFS_SIZE setting
to fill the entire rootfs partition.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-03-21 06:05:57 -07:00
Matt Madison
2f087d5451 container-runtime-csv.bbclass: add bbclass to generate container CSVs
* Have packages RDEPEND on csv packages when 'virtualization' is present
  in DISTRO_FEATURES

* CSV_CONTAINER_FILES enumerates the files/directories for inclusion
  in the CSV file, using glob patterns

* CSV_CONTAINER_EXTRA enumerates additional hard-coded lines in the CSV
2020-03-21 06:05:57 -07:00
Matt Madison
66077edf51 cuda.bbclass: use RRECOMMENDS for kernel-module-nvgpu
It is possible to build the nvgpu driver into the kernel,
instead of leaving it as a separate module, so don't cause
build failures in that case.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-03-13 08:27:41 -07:00
Matt Madison
6112c82e9b cuda.bbclass: replace hard-coded 'lib' with ${baselib}
The recipes use ${baselib} when installing the libraries,
so stick with that.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-02-07 04:22:43 -08:00
Matt Madison
d50bf91610 image_types_tegra.bbclass: add "bupgen" parameter to flash config generation
and remove any APPFILE references from the flash config for
BUP payload generation.  For some of the platforms, the NV
tools will try to access the files named in the
config file and will fail if they aren't present.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-01-27 06:22:13 -08:00
Matt Madison
874ce5f48b image_types_tegra.bbclass: bump LNXSIZE to match L4T
The LNXSIZE setting in L4T's flash.sh script was
evidently raised from 64MiB to 80 MiB in R32.3.1,
so update our setting to match.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-01-22 13:50:35 -08:00
Matt Madison
8d0d87b2d2 image_types_tegra.bbclass: change pythonnative -> python3native
Signed-off-by: Matt Madison <matt@madison.systems>
2020-01-22 10:35:25 -08:00
Matt Madison
a80264bc3a image_types_tegra.bbclass: include all DTBs in BUP payload generation
As different board versions may use different device trees.
Currently this only happens on tegra210 platforms.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-01-21 04:22:57 -08:00
Matt Madison
68088dedc6 meta: build multi-spec BUP payloads for bootloader updates
A single BUP payload can have multiple copies of boot files
for different revisions of a SoM, so to support proper updates,
a pre-built payload should support all SoM revisions that might
be present.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-01-20 15:42:30 -08:00
Matt Madison
ff3fbe24e1 image_types_tegra.bbclass: improve code signing server integration
Added settings:

TEGRA_SIGNING_EXCLUDE_TOOLS: when set to "1", the host-side
tools will not be copied into the working directory for signing,
to reduce the size of the package sent to the code signing server.
A signing server shouldn't be executing scripts or programs sent
to it anyway.

TEGRA_SIGNING_EXTRA_DEPS: for including additional dependencies
that might be required by the code signing client.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-01-20 15:28:07 -08:00
Matt Madison
8e69242f9e meta: build bootloader update payloads for tegra210 platforms
* Pull in needed tools from the L4T kit
* Revise the flash helper script handle BUP payloads
* Single function in image_types_tegra.bbclass to build
  BUP payloads for all platforms

Signed-off-by: Matt Madison <matt@madison.systems>
2020-01-08 15:15:10 -08:00
Matt Madison
c1fc75538f tegra-binaries: refactor redundant-boot recipes
- tegra186-redundant-boot -> tegra-redundant-boot
  since we now include support for tegra210
- move the creation the nv_boot_control.conf file
  to a separate recipe

Signed-off-by: Matt Madison <matt@madison.systems>
2020-01-08 15:15:10 -08:00
Matt Madison
da4524ebbe meta: update tegraflash packaging for Nano platforms
- Defer DTBFILE processing until flashing time, since
  there are multiple board versions for Nano
- Have the helper script emit the board ID, version,
  and SKU settings to use with the dosdcard.sh script,
  to make it easier to create an SDcard without putting
  the device back into recovery mode.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-01-08 15:15:10 -08:00
Matt Madison
d9132f05c8 meta: rework SDcard creation for jetson-nano boards
With L4T R32.3.1, NVIDIA replaced their SDcard image
generation script, which had hard-coded partition info
in it, with a pair of scripts that parse the partition
info from the XML layout file and generate the image
from that data.

We'll follow suit here, and instead of generating the
SDcard image directly during the bitbake build, the
tegraflash package for Nano devices now includes both
a doflash.sh script and a dosdcard.sh script. The
doflash.sh script still flashes the boot partitions
stored in the SPI flash on the module; the dosdcard.sh
script is used to generate either an SDcard image, or
can be used to image an SDcard device directly.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-01-08 15:15:10 -08:00
Matt Madison
f1c5004705 meta: remove obsolete mesa-stubs hacks
which haven't been needed for a while.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-01-08 15:10:15 -08:00
Matt Madison
aaa54b2009 meta: update L4T BSP from R32.2.3 to R32.3.1
Signed-off-by: Matt Madison <matt@madison.systems>
2020-01-08 15:10:15 -08:00
Matt Madison
0e6ff00294 image_types_tegra.bbclass: rework tegra210 config scriptlet logic
so it does not exit early for non-SPIFLASH platforms. The
early exit prevents others from adding an _append that works
for TX1 platforms.

Signed-off-by: Matt Madison <matt@madison.systems>
2019-12-30 05:13:20 -08:00
Matt Madison
8c53f2e8f2 image_types_*.bbclass: use IMAGE_SUFFIX
instead of hard-coding 'rootfs' in the image names.

Signed-off-by: Matt Madison <matt@madison.systems>
2019-12-28 08:42:02 -08:00
Matt Madison
89e54927f8 image_types_tegra.bbclass: add missing dependency
Need the TOS deployed on tegra186 and tegra194.
2019-12-26 15:06:58 -08:00
Etienne Cordonnier
074eaaa5c3 image_types_tegra.bbclass: convert tabs to spaces
Signed-off-by: Etienne Cordonnier <etienne.cordonnier@taurob.com>
2019-12-11 06:05:03 +11:00
Matt Madison
ce1e2d3779 image_types_tegra.bbclass: guard against fdtput errors
fdtput -d reports an error if the property being deleted
doesn't exist, so when we're deleting /chosen/bootargs,
make sure it's present before trying to delete it.

Also use `cp -L` when copying in the DTB file for
changes, just to make sure that we're working on an
actual local copy and not copying a symlink to another
file.

Signed-off-by: Matt Madison <matt@madison.systems>
2019-11-28 10:14:01 -08:00
Matt Madison
246fce3e9f meta: add tos-trusty-prebuilt recipe
Similar to what was done for cboot, break the extraction of
the TOS image from the BSP out to a separate recipe, to allow
for the possibility of building one from source instead.

For now, the preferred copy is the prebuilt one from the
BSP.

Signed-off-by: Matt Madison <matt@madison.systems>
2019-11-28 10:05:31 -08:00
Matt Madison
34db3661d5 meta: update L4T from R32.2.1 to R32.2.3
Note that the kernel and U-Boot branch names show
"32.2.2" instead of "32.2.3," but this corresponds
to the latest branches in NVIDIA's repositories.

The BSP update appears to be the ony change from
JetPack 4.2.2 to JetPack 4.2.3.

Signed-off-by: Matt Madison <matt@madison.systems>
2019-11-23 09:14:06 -08:00
Leon Anavi
bd89aa4474 image_types_tegra.bbclass: Deploy cboot.bin
For Jetson TX2, the default configuration uses cboot to load
U-Boot. Script doflash.sh requires cboot.bin. If it is not
present the scripts fails with:

Error: Return value 4

This fix ensures that task do_deploy of cboot will be executed
and cboot.bin will be present even if U-Boot has been selected
as a bootloader.

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2019-11-21 07:37:48 -08:00
Matt Madison
f04da20a43 image_types_tegra.bbclass: add signed image support
Add functions for signing the tegraflash package and for
signing BUP packages. If TEGRA_SIGNING_ARGS is defined,
the signing functions will run the scripts with the
additional arguments (which should be -u <file> for the
PKC key, -v <file> for the SBK key) to generate the
signed files.

Alternatively, the signing functions can be overridden
in another layer to send the files to a code signing
server.

If TEGRA_SIGNING_ARGS is not defined, no signing will
be performed for tegraflash packages; the -u/-v options
can be specified when invoking doflash.sh to have the
images signed during flashing. (BUP packages will be
signed with the all-zeros key.)

Signed-off-by: Matt Madison <matt@madison.systems>
2019-10-27 14:24:30 -07:00
Matt Madison
91738f36c2 image_types_tegra.bbclass: flatten tegraflash output
Some of the secure boot tools assume that everything resides
in the same directory. Since that can't easily be fixed or
worked around, remove the subdirectory we used to create to
put the tools in, and just glom everything together.

Signed-off-by: Matt Madison <matt@madison.systems>
2019-10-27 14:12:34 -07:00
Matt Madison
b85374459b image_types_tegra.bbclass: support empty and/or zero-filled SDcard partitions
Make it easier to add other partitions to the SDcard image for
Nano platforms by allowing the filename field in the sdcard-layout
file to be either null or '/dev/zero'. When the filename is not
specified, nothing will be written to the partition; if /dev/zero
is specified, the dd command will get a count= argument to
fill the partition with zeroes.

(for #188)

Signed-off-by: Matt Madison <matt@madison.systems>
2019-10-22 06:06:22 -07:00
Matt Madison
f8e3ee117f image_types_tegra.bbclass: add bsp_version to tegraflash package
for tegra210, since it's used when flashing Jetson Nano.

Signed-off-by: Matt Madison <matt@madison.systems>
2019-10-13 10:46:21 -07:00
Matt Madison
d94f2edc39 image_types_tegra.bbclass: remove tegra124 support
Signed-off-by: Matt Madison <matt@madison.systems>
2019-09-08 07:37:42 -07:00
Matt Madison
a6931b9060 meta: update L4T from R32.2.0 to R32.2.1
Signed-off-by: Matt Madison <matt@madison.systems>
2019-09-01 07:30:57 -07:00
Matt Madison
97749c7a44 image_types_tegra.bbclass: update for R32.2
Signed-off-by: Matt Madison <matt@madison.systems>
2019-08-17 09:18:33 -07:00
Matt Madison
d7123350f9 Initial R32.2 update
Signed-off-by: Matt Madison <matt@madison.systems>
2019-08-17 09:16:57 -07:00
Leon Anavi
d42699d38a cuda.bbclass: Add kernel-module-nvgpu to RDEPENDS
Add kernel-module-nvgpu to CUDA run-time dependencies. Without
it CUDA 10 is not properly working and CUDA-capable devices are
NOT detected.

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2019-07-18 04:44:10 -07:00
Matt Madison
b07f9f5ad9 cuda.bbclass: add cmake CUDA language support
cmake 3.8 and later have built-in language support for CUDA,
replacing the FindCUDA package finder. Add settings to support
this for Tegra cross-compilation.

[For #83 and #138]

Signed-off-by: Matt Madison <matt@madison.systems>
2019-06-15 11:32:50 -07:00
Matt Madison
702d0dc3b5 image_types_tegra.bbclass: more devicetree bootargs fixes
- only set bootargs in the devicetree if using cboot
  instead of U-Boot, since U-Boot's extlinux.conf will
  add them
- apply the same fix for BUP generation

Signed-off-by: Matt Madison <matt@madison.systems>
2019-05-05 06:13:52 -07:00
Matt Madison
5f904d946e image_types_tegra.bbclass: clear devicetree-resident bootargs
to match what L4T's flash.sh script does.

Signed-off-by: Matt Madison <matt@madison.systems>
2019-05-04 07:23:05 -07:00
Matt Madison
e3a0ceea94 nvidia_devnet_downloads.bbclass: expand filenames
and trim off any fetcher parameters from them before
trying to match them in the file-checksums list.

Signed-off-by: Matt Madison <matt@madison.systems>
2019-04-20 09:17:12 -07:00
Matt Madison
f5b88a973e nvidia_devnet_downloads.bbclass: avoid task signature mismatches
when switching from a remote to a local mirror.

Signed-off-by: Matt Madison <matt@madison.systems>
2019-04-20 05:13:16 -07:00
Matt Madison
68de1cb1ad meta: provide tegraflash+SDcard support for Jetson-nano
The jetson-nano tegraflash package now flashes *only*
the QSPI boot flash. This should only need to be done
once, unless there is a BSP update.

The rootfs, U-boot, etc. get placed in an SDcard image
that should be copied onto a suitable SDcard and inserted
into the nano for booting. The full SDcard image only needs
to be copied if there is a BSP update or you update U-Boot.
The ext4 rootfs image can be copied onto partition 1 of the
SDcard if you are only updating the kernel and/or the rootfs.

Signed-off-by: Matt Madison <matt@madison.systems>
2019-04-07 10:07:40 -07:00
Matt Madison
af59216bd3 image_types_tegra.bbclass: updates for jetson-nano
- switch to using the tegra210-flash-helper script
- setup for the flashed version file
- add in some new boot binaries

Signed-off-by: Matt Madison <matt@madison.systems>
2019-04-07 10:07:40 -07:00
Matt Madison
0212383335 image_types_tegra.bbclass: BPFFILE name change for tegra210
Signed-off-by: Matt Madison <matt@madison.systems>
2019-04-07 10:07:40 -07:00
Matt Madison
ad08c9f107 image_types_tegra.bbclass: bootfiles fixups for Xavier
Signed-off-by: Matt Madison <matt@madison.systems>
2019-04-07 10:07:40 -07:00