Meta-tegra: removing CUDA from build process - centos bitbake server

Hey everyone,

I have a bitbake server installed on a headless CentOS 7 host. Obviously, this doesn’t play well with bitbake as the nvidia dev account is required for any downloads. With that in mind, I have two questions:

  1. How should I go about remove CUDA from the build?
  2. If I were to keep CUDA, what do I need to do to get this working on my CentOS host?

Initial though on 2. was to just spin up an ubuntu VM, download the SDK manager and get the files I need, and then just send them over to a specified directory for the CentOS bitbake server to use.

So, I was banging my head up against the wall for a while on this. Everything SDK manager downloads can be obtained through this page. The BSP tarball will give you the Linux_for_Tegra folder and the rootfs tarball will give you everything else.

You can proot or chroot into the rootfs and build your thing and package, but you’ll probably want to run tests on actual hardware. To enable apt sources on the rootfs, which you’ll need for some things, you will need to modify rootfs/etc/apt/sources.list.d/nvidia-l4t-apt-source.list so it looks something like this:

deb https://repo.download.nvidia.com/jetson/common r32 main
deb https://repo.download.nvidia.com/jetson/t210 r32 main

You may need to also install the key (i don’t remmber yes or no). “instructions” for all of this can be found in the Dockerfile here. That builds a l4t-base image that has the apt sources enabled. You should be able to install cuda (or anything). I have not tested the resulting image on x86 with a qemu static binary binary bind mounted but it might work (the chroot/proot does).

I also have a python package that does a lot of this.

(after installing it)
cd .../Linux_for_Tegra
tegrity-qemu --enter rootfs

You may want the dev branch of that repo since it supports proot as well (no need for root). On dev it’s also the default when you run tegrity-qemu in Docker. There is also an example Dockerfile on dev that gets qemu, the BSP, the rootfs, enables apt sources on the rootfs, and patches some nvidia scripts to use proot and other usermode tools instead of chroot, etc. It is verified to work with rootless docker so you don’t need root at all for any of this.

1 Like