1
0

Standard modules dependencies

This commit is contained in:
2023-02-15 11:48:25 +00:00
parent 3d6961dfd7
commit 3f79c8e461
3 changed files with 30 additions and 0 deletions

18
pew.go
View File

@@ -403,6 +403,15 @@ func copyTest(q *qemu.System, testPath string, ka config.Artifact) (
return
}
func copyStandardModules(q *qemu.System, ki config.KernelInfo) (err error) {
_, err = q.Command("root", "mkdir -p /lib/modules")
if err != nil {
return
}
return q.CopyDirectory("root", ki.ModulesPath, "/lib/modules/")
}
func whatever(swg *sizedwaitgroup.SizedWaitGroup, ka config.Artifact,
ki config.KernelInfo, binaryPath, testPath string,
qemuTimeout, dockerTimeout time.Duration, dist, tag string,
@@ -498,6 +507,15 @@ func whatever(swg *sizedwaitgroup.SizedWaitGroup, ka config.Artifact,
return
}
if ka.StandardModules {
// Module depends on one of the standard modules
err = copyStandardModules(q, ki)
if err != nil {
log.Println(err)
return
}
}
err = preloadModules(q, ka, ki, dockerTimeout)
if err != nil {
log.Println(err)