Store the default kernel modules
This commit is contained in:
parent
3ec919abc1
commit
668bc1e391
@ -252,6 +252,8 @@ type KernelInfo struct {
|
||||
// Runtime information
|
||||
KernelPath string
|
||||
InitrdPath string
|
||||
ModulesPath string
|
||||
|
||||
RootFS string
|
||||
|
||||
// Debug symbols
|
||||
|
@ -482,6 +482,13 @@ func copyKernels(name string) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
cmd = exec.Command("docker", "cp", containerID+":/lib/modules", target)
|
||||
rawOutput, err = cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
log.Println(string(rawOutput))
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
@ -660,6 +667,8 @@ func genDockerKernels(dii dockerImageInfo, newkcfg *config.KernelConfig,
|
||||
|
||||
KernelPath: kernelsBase + genKernelPath(files, k),
|
||||
InitrdPath: kernelsBase + genInitrdPath(files, k),
|
||||
ModulesPath: kernelsBase + "modules/" + k,
|
||||
|
||||
RootFS: rootfs,
|
||||
}
|
||||
newkcfg.Kernels = append(newkcfg.Kernels, ki)
|
||||
|
Loading…
Reference in New Issue
Block a user