DSBOX Kernel & DeviceTree Development
WHAT YOU WILL LEARN?
1- Installing the development packages
2- Creating the environment file
3- Compiling the Kernel
ENVIRONMENT
Operating System: Ubuntu 18.04.3 LTS
CPU: AMD Ryzen 9 3900X 12-Core Processor
RAM: 8 GB DDR4 - 3200MHz
In this blog post we will explain how to develop custom kernel and “.dtb” file for Forecr DSBOX models.
First of all, you must have some development packages installed on your host PC(git, build-essential, ncurses-dev, xz-utils, bzip2, libssl-dev, bc, flex, libelf-dev, bison).
Other things you must have are the toolchains for L4T and L4T sources. To get those, visit https://developer.nvidia.com/embedded/jetson-linux address then download toolchains and source files depending on your DSBOX model.
In your download folder open a terminal and copy them to location which you want to develop BSP.
Go to your BSP development location and extract them.
After extracting them go inside "public_sources>Linux_for_Tegra>source>public" folder and copy kernel_src.tbz2 file to your working directory.
Extract it.
I created backup folder and moved unnecessary files inside it because I prefer to work in clean work environment. Basically it is up to you.
In next step, go "kernel_src>kernel>kernel-4.9" path and create environment file which will specify our compiler path inside toolchain.
You have to use that environment file everytime when you open new terminal to compile kernel. So open new terminal at kernel directory and use environment.
Now we can compile the kernel. First create .config file from "tegra_defconfig" file then start compilation with "make" command.
When the process ends, you can find your kernel image file on "arch>arm64>boot" path.
You can find compiled device tree file on "arch>arm64>boot>dts" path.
If you want to change active drivers of kernel, you can always use "make menuconfig" command.
Also you can change the device tree file on hardware>nvidia>platform>t210>porg>kernel-dts path.
You can compile modules and out them to specific folder. If this specific folder is the same folder with rootfs of NVIDIA JetPack which used by SDK Manager, this could help us a lot.
Lastly, if you also want to install them to your DSBOX check out our DSBOX Kernel & DeviceTree Update post.
Thank you for reading our blog post.