The new(ish) 36.2 OS needs several kernel features/modules enabled in order to work with Kubernetes.
I’d prefer not to have to modify the kernel after the flash, since it’s a bit of a process, and I always feel like I mess something up. I tried recently with nvbuild, and it seems to only want to take the default .config instead of the modifications I make with nconfig beforehand…
Is there a way to pass a .config file to the installation process? Or prepare the OS within the sample file system so that the flash installs the features I want ahead of time? I’d love to have something reproducible so that I can just re-flash if necessary, and have all my flags set.
I’m doing the flashing manually via this process:
wget -O bsp.tbz2 -L https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v2.0/release/jetson_linux_r36.2.0_aarch64.tbz2
wget -O rootfs.tbz2 -L https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v2.0/release/tegra_linux_sample-root-filesystem_r36.2.0_aarch64.tbz2
tar -xvpf bsp.tbz2
sudo tar -xvpf rootfs.tbz2 -C Linux_for_Tegra/rootfs/
### I'm thinking I can modify the source to use my custom .config at this point?
cd Linux_for_Tegra
sudo ./apply_binaries.sh
sudo ./tools/l4t_flash_prerequisites.sh
sudo ./tools/l4t_create_default_user.sh ...
sudo ./tools/kernel_flash/l4t_initrd_flash.sh ...
This is the content of Linux_for_Tegra/source/kernel/Makefile.
You just run these comnmands separately when you want to customize the kernel:
(Like menuconfig after defconfig and before Image.)
You’d better wait for JetPack 6 GA so the kernel compilation process is fixed, or you need to know how to update the initrd to include newly compiled drivers, or NVMe and USB cannot be mounted as rootfs upon booting:
I do see that Makefile. Does that get invoked sometime during l4t_initrd_flash? Would I just prep my “golden image” where I was thinking originally (before running apply_binaries)?
Thanks for the heads up about JetPack - any sense on when that will be release? I’m not sure I understand, though - is that for when you want to modify an existing distro, or is that a bug during pre-flash, too?
Kernel compilation has nothing to do with flashing.
You just make sure the kernel image/modules are there before flashing.
Usually when you build kernel natively on an x86 machine, many distros like Ubuntu offer a tool for updating the initramfs, or initrd, so appropriate drivers can be loaded upon boot: https://manpages.ubuntu.com/manpages/focal/en/man8/update-initramfs.8.html
Basically we are making a replicate of this tool so it can be run on the host PC when you do cross compilation. Or drivers for NVMe/USB in the vanilla initrd will fail to get loaded because the kernel version does not match.
Ok, so it seems like my original intuition wasn’t too far off.
Fetch source
Modify source via existing Makefile. If there are files present, they carry over to the board. Would it behoove me to just edit the kernel command, to include nconfig? then just make kernel before flashing?
a. defconfig
b. nconfig
c. Image
Execute flashing scripts
I’m still not following you on the JetPack bits. I’ve successfully flashed 36.2 from a ubuntu x86 to my Orin on NVMe storage. Is this only a problem when modifying the kernel beforehand?
Will the update be in the form of a 36.3, or what should I be on the lookout for?
You run defconfig to populate the initial .config file, then you run nconfig/menuconfig to customize it, then finally you run Image to actually build it.
Nothing difficult.
YES, whenever the kernel image changes.
If you don’t what I’m talking about with initramfs/initrd, then you’d better just stop here and go no further.
You don’t really need to care about what this file does.
It’s totally fine if you run every commands separately. We just make this Makefile for simplicity, and you don’t necessarily need to follow it.