If you just want use SDKM device, then Ubuntu 18.04 or Ubuntu 20.04 are fine.
But if you want to do the cross compilation, then they have different tool chan ad requirements.
For JP5.1/R34.1/K5.1, please have host with Ubuntu 20.04.
For JP4.x/R32.x, please have host with Ubuntu 18.04.
In this case, I can only cross compile R35.1/R34.1 on the host of ubuntu20.04, and flash Xavier NX;
If I cross compile R35.1/R34.1 with ubuntu18.04 host, will there be any problem? Failed to flash the NX? Or?
The reason why I ask this is because the current host is ubuntu18.04. If I can only use ubuntu20.04, I must prepare another computer in advance.
Do note that if in NVIDIA downloads for a given release a certain cross compiler release is provided that the odds of it working go up by using the release cross-gcc named there. It isn’t guaranteed that other compilers will fail, but sometimes newer or older gcc will not handle a given situation the same (warnings might be errors, or errors might be warnings, or assembler might change in incompatible ways).