Updated: Feb 10
On 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 toolchains for L4T and L4T sources. To get those visit https://developer.nvidia.com/embedded/linux-tegra address then download toolchains and source files depending on your DSBox model.
On 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.
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.
On 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.
Thanks for reading.