| package dkms |
| |
| // Options is the set of options which can be used to control the behavior |
| // of various DKMS commands. Keeping these in one struct is simpler and |
| // easier to work with than breaking them down by command, since most DKMS |
| // commands will directly call another and need to pass along the arguments |
| // for that command as well (for instance, Install calls Build and needs to |
| // pass all corresponding Build options). |
| type Options struct { |
| // Version tells cos-dkms to print out the version, then exit. |
| Version bool |
| // Latest tells cos-dkms to use the latest compatible version of the |
| // package that is available in the DKMS tree. |
| Latest bool |
| // KernelConfig tells Build where to find the kernel .config file |
| // when preparing the kernel, if it is not in the standard COS location. |
| Force bool |
| // ForceVersionOverride tells Install to skip the version check when |
| // installing modules which already have a potentially newer version |
| // installed. |
| ForceVersionOverride bool |
| // InsertOnInstall tells Install to insert each kernel module into the |
| // running kernel after it has been installed. This will take into |
| // account dependencies on any modules in the install tree and the |
| // built-in modules tree. |
| InsertOnInstall bool |
| // ModprobeOnInstall tells Install to modprobe each kernel module after |
| // it has been installed, thus inserting it into the running kernel. |
| // Note that a very specific set of mounts is required for this to work |
| // on COS instances because the default kernel modules tree is read-only. |
| ModprobeOnInstall bool |
| // NoDepmod tells install not to run depmod before modprobe, if |
| // ModprobeOnInstall is specified. This can save time if module |
| // dependencies don't need to be recalculated. |
| NoDepmod bool |
| // Jobs tells Build how many parallel jobs should be used when running |
| // the MAKE command for each module. |
| Jobs int |
| // GCSBucket is the name of the GCS bucket to use as a cache. This will |
| // be used during: |
| // Add - to download module sources if they are not present locally and |
| // to upload module sources if Upload is specified and they are not |
| // present in the cache. |
| // Build and Install - to download built modules if they are present in |
| // the cache and to upload built modules if Upload is specified and |
| // they are not present in the cache. |
| // Remove - to remove module sources and built modules if they are present |
| // in the cache. |
| // Unbuild - to remove built modules if they are present in the cache. |
| // |
| // If the bucket includes a path, that path will be used as the prefix |
| // for cache operations. For instance, if the value of GCSBucket is |
| // gs://my-bucket/my-dkms-root/, then all operations will be relative |
| // to my-dkms-root/ within the bucket. |
| GCSBucket string |
| // Upload determines whether or not to upload module sources or built |
| // modules to the GCSBucket during Add, Build, and Install. |
| Upload bool |
| // DownloadWorkers is the maximum number of workers which will be used |
| // when downloading sources and built modules from a cache. If the number |
| // of workers is negative or 0, one download worker will be created per |
| // object to be downloaded. If the number of workers is 1 (default), then |
| // the downloads will be performed serially in the main thread. |
| DownloadWorkers int |
| // MakeVariables is a string containing variables which will be passed |
| // to the MAKE command when building modules in Build. |
| MakeVariables string |
| // InstallBuildDependencies tells Build and Install to build the COS |
| // compiler toolchain and kernel headers before running a build. |
| InstallBuildDependencies bool |
| // LSBReleasePath is the path to the LSB Release file that will be used |
| // to fill in the package Build and Board values if they are not otherwise |
| // specified. |
| LSBReleasePath string |
| } |