Hi.
I tried to rebuild the kernel to add KVM and NFS v4 support. I followed the official guides and compiled the kernel on a UbuntuVM with the recommended linaro toolchain.
I then rebuilt the currently used kernel packages by pulling them and modifying them with the following script:
Linux_for_Tegra/my_debs/build_kernel_debs.sh
#!/bin/sh
export injection_filelist="my_debs/.tmp_kernel_inject.txt"
# Build injection file
rm -f $injection_filelist
find rootfs/lib/modules/4.9.201-tegra/ -type f -exec bash -c '
for filepath do
#echo "showing $filename"
debpath=$(echo "$filepath" | sed "s|^rootfs||")
# Ignore lib/modules/*/(build|source)
if echo $debpath | grep -q "^lib/modules/(build|source)"; then continue; fi
perms=$(stat "$filepath" -c "%a")
echo "$filepath:$debpath:$perms" >> $injection_filelist
done
' {} +
echo "rootfs/boot/Image:/boot/Image" >> $injection_filelist
original=$(dpkg --info my_debs/deb_origin/nvidia-l4t-kernel_*_arm64.deb | grep "Version:" | cut -d' ' -f3)
custom_version="rebuild0"
#echo "my_debs/deb_origin/nvidia-l4t-kernel_${original}_arm64.deb"
tools/Debian/nvdebrepack.sh \
-v $custom_version \
-f $injection_filelist \
-m "Replace kernel image." \
-n "Linus <linus@cosmos-ink.net>" \
my_debs/deb_origin/nvidia-l4t-kernel_${original}_arm64.deb
# Patch deps on child packages
tools/Debian/nvdebrepack.sh \
-d nvidia-l4t-kernel=${original}+$custom_version \
-v $custom_version \
-n "NVIDIA Corporation <linux-tegra-bugs@nvidia.com>" \
my_debs/deb_origin/nvidia-l4t-kernel-dtbs_${original}_arm64.deb
tools/Debian/nvdebrepack.sh \
-d nvidia-l4t-kernel=${original}+$custom_version \
-v $custom_version \
-n "NVIDIA Corporation <linux-tegra-bugs@nvidia.com>" \
my_debs/deb_origin/nvidia-l4t-kernel-headers_${original}_arm64.deb
As you see above, I also replaced all the modules in rootfs/lib/modules
with the newly built ones. I did some checks to ensure everything is more or less the same and then installed my new kernel, kernel-headers and kernel-dbts packages and rebooted it afterwards.
scrnlog (197.8 KB)
On restart, the kernel didn’t boot at first. After booting it with a custom entry (just without the -quiet
kernel option) I got the errors starting at 1676.
I never built a lot of kernels and am not sure what the issues is here. It says “Not tainted” and something about “invalid cgroup_subsys …”. I’m really not sure if this is some licensing issue or something else (“Boot logo display failed…” is normal since I’m using it without a monitor).
I build the kernel from the tag tegra-l4t-r32.5
and used the commended tegra_defconfig
with the addition of KVM and NVFs v4. I’m not sure whether the officially distributed kernel has some missing options. .config (163.5 KB)
The output of /proc/config.gz
of my last booting (official) kernel:
config.gz (37.1 KB)
Can anyone lead me in the right direction here? I’m rolling back the kernel rn but would still like to have the ability to configure the kernel myself for additional features.