FYI, I am testing this, not in the same location. I downloaded “public_sources.tbz2
” from R35.3.1. I placed this at:
~/Downloads/deleteme/R35.3.1/
(that’s the name I use for content I intend to delete! 😀)
(Note: The parent directory is empty)
From there:
tar xvfj public_sources.tbz2
After that unpacks:
cd Linux_for_Tegra/source/public/
Now I unpack kernel source:
tar xvfj kernel_src.tbz2
This now allows me to go here:
`cd kernel/kernel-5.10/
I set this to my build source location:
export TOP=$(pwd)
(I used that syntax due to difficulty excaping single backquotes in the forum)
Now I set up some convenience temp locations:
mkdir -p "${HOME}/build/kernel"
mkdir -p "${HOME}/build/modules"
export ARCH=arm64
export CROSS_COMPILE=/usr/bin/aarch64-linux-gnu-
# Note: "${CROSS_COMPILE}gcc --version":
# aarch64-linux-gnu-gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
# The TEGRA_BUILD is just for my convenience. I sometimes script custom steps.
export TEGRA_KERNEL_OUT="${HOME}/build/kernel"
export TEGRA_MODULES_OUT="${HOME}/build/modules"
export TEGRA_BUILD="${HOME}/build"
# Note: Needed install "sudo apt-get install python3-sphinxcontrib.apidoc".
make mrproper
Note: In the following configuration I don’t know what modifications you made. I could add that if you mention what config changes you made. This is the default config though, and normally, if not changing integrated features, one would set CONFIG_LOCALVERSION
to “=-tegra
”.
Actual build of Image
:
# Default config:
make O=$TEGRA_KERNEL_OUT tegra_defconfig
# From here you could edit `CONFIG_LOCALVERSION`.
# Note: Next step required "sudo apt-get install libssl-dev".
# I'm building Image so I don't need "modules_prepare", but I will do it anyway:
make O=$TEGRA_KERNEL_OUT modules_prepare
# Now build Image (previous step unnecessary if building Image):
make O=$TEGRA_KERNEL_OUT -j 12 Image
# Now modules:
make O=$TEGRA_KERNEL_OUT -j 12 modules
# Now device tree:
make O=$TEGRA_KERNEL_OUT -j 12 dtbs
# So far no errors. Installing to temp locations in $TEGRA_BUILD:
make O=$TEGRA_KERNEL_OUT modules_install INSTALL_MOD_PATH=$TEGRA_MODULES_OUT
All steps completed. Recall that I originally unpacked in “~/Downloads/deleteme/R35.3.1
”. You mentioned “/home/bsp/Desktop/Workspace_5_1_1
”, which might be the same for your case, but I don’t know if this is the “kernel-5.10/
” equivalent, or if that is where you unpacked from. What directory is the parent to “public/kernel/kernel-5.10/
”?
I ask about that specific directory tree fragment because I have no content added to “sources/
”. The “public/
”, after checking timestamps, has no content which was not from unpacking; subdirectories “kernel/
” and “hardware/
” did have timestamp updates. The rest of those subdirectories are part of the build source for the kernel.
Note that I did not unpack the driver package, which is what populates the other parts of “Linux_for_Tegra/
”, but so far as I can tell, this is also somewhere within your “/home/bsp/Desktop/Workspace_5_1_1/
”.
Whenever JetPack/SDK Manager adds the driver package it puts it in “~/nvidia/nvidia_sdk/JetPack_...version.../Linux_for_Tegra/
”; manual unpack is “Linux_for_Tegra/
” wherever you want it to be.
If there is an error in a script, and if that error adds an extra “../
” into a path (that’s the “_ddot_
” macro you see in some build steps), then this would cause output to go somewhere not intended. An example error:
- After descending lower in the directory tree, the ascending location does not exist.
- After descending lower in the directory tree, the ascending location exists, but has inaccessible permissions.
- One of the parent directories is missing, e.g., “
public/kernel/
” or “public/hardware/
” is not present.