@AastaLLL Thanks for your reply.
We want to use JetPack Cross Compilation container to develop applications. However, the rootfs /l4t/targetfs may lack of several software. So, we try to:
install the software in /l4t/targetfs directly. Or
make a custom rootfs by cloning the image from device and mount it in the docker.
Q1: Which is the recommended method?
Q2: I’ve tried method 2 and found the symbol links are all broken after mounted the image. So I posted another topic here.
Sorry, we will need more info to provide further info.
Do you want a custom cross-compile environment?
Or you want to build an app for Jetson via a cross-compiling toolkit.
You don’t need to install software into the rootfs for a custom building environment.
Please create a Dockerfile using jetpack-linux-aarch64-crosscompile-x86 as the base and install the library you need.
But it doesn’t look like you want to build “applications”.
Do you want a custom Jetson build, like a custom kernel or device tree?
Hi @AastaLLL
Thanks for your reply.
We want to build Qt for Jetson via jetpack-linux-aarch64-crosscompile-x86 docker. And building Qt needs more libraries in /l4t/targetfs. These libraries can be install by running apt get install on Jetson device.
To cross compile Qt in jetpack-linux-aarch64-crosscompile-x86 docker, it seems that I need to install these libraries in /l4t/targets too. Right?
If so, how can I install them in /l4t/targetfs?
I have the same question - not specifically for building qt but for other applications/libraries I intend to run on a jetson that have additional dependencies that are not in the targetfs.
For instance I need libpng.so in order to build an application. On a jetson I could get that by running apt install libpng-dev
and that would install libpng.so to /usr/lib/aarch64-linux-gnu/
On the docker image running apt install libpng-dev installs
/usr/lib/x86_64-linux-gnu/libpng.so
which is not useful for building a aarch64 application.
Can a person update the dpkg architecure and sources in a way to get the libraries and headers needed to compile for aarch64, installed to the targetfs?
Do I need to download the debian packages and install them manually using dpkg?
If you just want to cross-compile a QT app, you don’t need to add the dependencies in the /l4t/targetfs.
Instead, please install the cross-compiling libs for QT to the jetpack-linux-aarch64-crosscompile-x86 base image.
But you will need to check with the QT team to see if they provide the tool for cross-compile an ARM app.
It looks like that you want a custom build with all dependencies pre-installed.
The simplest way is to flash a clean build and install all the dependencies you need.
Sorry, we want to cross-compile Qt for Jetson device (aarch64), not a Qt app. And to cross-compile Qt from source, we need to install some more dependencies. It’s better that these dependencies can be installed in docker image by using apt install command.
If I clone the image and mount it in docker container, the symbolic links are all broken, like this.
What I have started to do to install those dependencies to the targetfs is do a chroot /l4t/targetfs bash and then do a couple things to create a tmp and dev dir with the correct permissions and then ‘apt-get update’ and from there do ‘apt install ’ worked.
Could you share why you need the cross-compile dependencies installed in the /l4t/targetfs.
Cross-compiling is running on an x86 device so the OS is standard Ubuntu rather than L4T.
A common way is to write a custom Dockerfile and install the dependencies.
I want to build Qt with desktop-opengl/xcb supported. It needs many dependencies: libfontconfig1-dev libdbus-1-dev libfreetype6-dev libicu-dev libinput-dev libxkbcommon-dev libsqlite3-dev libssl-dev libpng-dev libjpeg-dev libglib2.0-dev libpulse-dev libasound2-dev libcups2-dev libegl1-mesa-dev libvulkan-dev libxcb1-dev libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev and so on.
It’s very convenient to install these dependencies by apt install command. So if I use the method shared by @scott.pfeifer , I can install all these dependencies in /l4t/targetfs and then Qt can be built.
These dependencies should be built in aarch64 but not x64. So how can I write a custom Dockerfile and install the dependencies with aarch64 version?