commit | 9d4124b2fe8318ac5ccd82402d1106127aa2b1b9 | [log] [tgz] |
---|---|---|
author | Robert Kolchmeyer <rkolchmeyer@google.com> | Tue Oct 05 18:38:57 2021 -0700 |
committer | Robert Kolchmeyer <rkolchmeyer@google.com> | Wed Oct 06 17:17:26 2021 +0000 |
tree | 852461250e014d833285e3ec1906fe544e6dc43b | |
parent | e63e27b501bd7a7c0da8c7dab458f5376016cd1d [diff] |
Link nvidia drivers explicitly. It turns out that the nvidia-installer does not link the drivers correctly, because linking the drivers needs the kernel's module.lds linker script. Nvidia recommended to us that we link the modules explicitly. Doing this requires also having the kernel headers installed (which includes module.lds). To simplify, we install the kernel headers in the same directory structure as the standalone toolchain. This means that no additional changes are needed for correct dependency caching to work. Since we are installing the kernel headers as part of the toolchain installation, we remove the existing function for installing the kernel headers, which was dead code anyway (nothing called that function). Furthermore, the kernel headers have no value without the toolchain (the only use case for the kernel headers is to compile code that targets COS). One complication here is that this change introduces an incompatibility between the cos-gpu-installer and the driver signatures. Signatures produced by the new linking procedure cannot be consumed by old versions of cos-gpu-installer. To help with this, we still keep the old linking behavior as a fallback functionality. If GKE, for example, happens to deploy a new cos-gpu-installer on an old COS version, nothing bad will happen. The fallback behavior also allows the timing to be less strict when we update images vs when we update the signer. We also enable installation on beta images now, since we expect that to work now. Since github.com/pkg/errors is deprecated, new code uses the standard library errors package instead. BUG=b/200957688 TEST=Manually ran the following test scenarios: - Tested with live cos-85 and cos-89 versions, using production drivers - Tested with live cos-93, using unsigned drivers - Signed live driver with new cos-gpu-installer, installed on live cos-85 with new cos-gpu-installer - Signed live driver with new cos-gpu-installer, installed on live cos-89 with new cos-gpu-installer - Signed pre-release driver with new cos-gpu-installer, installed on live cos-93 with new cos-gpu-installer Change-Id: I1451694fd3d41c9c04f08023291e1cdb6413fd8c Reviewed-on: https://cos-review.googlesource.com/c/cos/tools/+/23430 Cloud-Build: GCB Service account <228075978874@cloudbuild.gserviceaccount.com> Reviewed-by: Ke Wu <mikewu@google.com> Tested-by: Robert Kolchmeyer <rkolchmeyer@google.com>
This is a repository of various tools developed for Container-Optimized OS. Examples include cos-gpu-installer, cos-toolbox, etc.
See CONTRIBUTING.md for how to contribute.