distro: use new GenImageKernelOptions in ostreeDeployPipeline

The new `GenImageKernelOptions` will retrun all needed kernel options
that are derived from the partition table. The only case - for now -
is if the partition table contains a LUKS decice, where the uuid of it
needs to be passed to the on the kernel command line so that it will
get unlocked.

Co-Authored-By: Achilleas Koutsou <achilleas@koutsou.net>
This commit is contained in:
Christian Kellner 2022-02-11 17:42:00 +00:00 committed by Tom Gundersen
parent 2c6e726c94
commit 34924c7af4
3 changed files with 18 additions and 12 deletions

View file

@ -1102,6 +1102,11 @@ func ostreeDeployPipeline(
))
p.AddStage(osbuild.NewOSTreeConfigStage(ostreeConfigStageOptions(repoPath, true)))
p.AddStage(osbuild.NewMkdirStage(efiMkdirStageOptions()))
kernelOpts := []string{
"console=tty0",
"console=ttyS0",
}
kernelOpts = append(kernelOpts, osbuild.GenImageKernelOptions(pt)...)
p.AddStage(osbuild.NewOSTreeDeployStage(
&osbuild.OSTreeDeployStageOptions{
OsName: osname,
@ -1110,10 +1115,7 @@ func ostreeDeployPipeline(
Rootfs: osbuild.Rootfs{
Label: "root",
},
KernelOpts: []string{
"console=tty0",
"console=ttyS0",
},
KernelOpts: kernelOpts,
},
))
p.AddStage(osbuild.NewOSTreeFillvarStage(

View file

@ -802,6 +802,11 @@ func ostreeDeployPipeline(
))
p.AddStage(osbuild.NewOSTreeConfigStage(ostreeConfigStageOptions(repoPath, true)))
p.AddStage(osbuild.NewMkdirStage(efiMkdirStageOptions()))
kernelOpts := []string{
"console=tty0",
"console=ttyS0",
}
kernelOpts = append(kernelOpts, osbuild.GenImageKernelOptions(pt)...)
p.AddStage(osbuild.NewOSTreeDeployStage(
&osbuild.OSTreeDeployStageOptions{
OsName: osname,
@ -811,10 +816,7 @@ func ostreeDeployPipeline(
Rootfs: osbuild.Rootfs{
Label: "root",
},
KernelOpts: []string{
"console=tty0",
"console=ttyS0",
},
KernelOpts: kernelOpts,
},
))

View file

@ -802,6 +802,11 @@ func ostreeDeployPipeline(
))
p.AddStage(osbuild.NewOSTreeConfigStage(ostreeConfigStageOptions(repoPath, true)))
p.AddStage(osbuild.NewMkdirStage(efiMkdirStageOptions()))
kernelOpts := []string{
"console=tty0",
"console=ttyS0",
}
kernelOpts = append(kernelOpts, osbuild.GenImageKernelOptions(pt)...)
p.AddStage(osbuild.NewOSTreeDeployStage(
&osbuild.OSTreeDeployStageOptions{
OsName: osname,
@ -811,10 +816,7 @@ func ostreeDeployPipeline(
Rootfs: osbuild.Rootfs{
Label: "root",
},
KernelOpts: []string{
"console=tty0",
"console=ttyS0",
},
KernelOpts: kernelOpts,
},
))