I have not tried this, but will in the future. A few notes maybe to add to this related to improving recovery when an upgrade goes wrong…
Some newer releases of Linux use 64-bit extensions in ext4 during format…these need to be blocked. To do this (and this won’t interfere on systems which don’t do it anyway), using “/dev/mmcblk1p1” as the example partition (you may need to change this):
sudo mkfs.ext4 -O ^metadata_csum,^64bit /dev/mmcblk1p1
You would also want to verify the NVIDIA-provided hardware accelerated drivers are in place…do this both before and after the updates:
sha1sum -c /etc/nv_tegra_release
The apply_binaries.sh script is what adds those hardware accelerated files. Normally it applies them to the rootfs subdirectory of the driver package. Assuming you have mounted your ext4 SD card on “/mnt”, here is a way to apply_binaries to your rescue SD card:
sudo ./apply_binaries.sh --root /mnt
# OR:
sudo ./apply_binaries.sh -r /mnt
The binaries which are related to hardware access (there are also files related to performance and applications), this driver package file is unpacked on the “/” of the SD card or sample rootfs:
nv_tegra/nvidia_drivers.tbz2
If you have this file in “/” of a running Jetson, then unpacking this will fix any failures of “sha1sum -c /etc/nv_tegra_release”:
Assumes nvidia_drivers.tbz2 is in “/” of the Jetson…
sudo tar xvfj nvidia_drivers.tbz2
From past experience, the only file which would need update (except under extraordinary failure) is:
/usr/lib/xorg/modules/extensions/libglx.so
…this particular file is a symbolic link, not a hard link. Normally this points at:
# Equal to "/usr/lib/<architecture info of compiler>/tegra/libglx.so",
# where on TK1 is "arm-linux-gnueabihf"...
# where on TX1 or TX2 is "aarch64-linux-gnu"...
/usr/lib/arm-linux-gnueabihf/tegra/libglx.so
If only “/usr/lib/arm-linux-gnueabihf/tegra/libglx.so” is bad, and not other files, then the symbolic link can be forcibly set back in place to get graphics running (it is rare that this happens…99% of graphics failures are unrelated to this…the tip is that the failure only occurs after an update):
[corrected]
sudo ln -sf /usr/lib/arm-linux-gnueabihf/tegra/libglx.so /usr/lib/xorg/modules/libglx.so
<s>sudo ln -sf /usr/lib/arm-linux-gnueabihf/tegra/libglx.so /usr/lib/arm-linux-gnueabihf/tegra/libglx.so</s>
(There are some apt-get upgrade operations which might do this…mostly those have been protected against, and doing “apt update” with “apt-get upgrade” is recommended)
If you fear this might happen you could just copy “nv_tegra/nvidia_drivers.tbz2” to “/” of the Jetson prior to doing anything risky. Then you just do the above mentioned steps with tar to unpack this and fix any missing drivers…this will fix all drivers, not just libglx.so. Having the file in place ahead of time is “pre-planning” recovery. The file is about half a MB, so it doesn’t take a lot of room. If you don’t want this used on the eMMC, it is a good idea to put it on any rescue SD card such as the one described in the original post.