fix: initialize boot assets with defaults early

The problem was that bootloaders were correctly picking up defaults for
`installer` mode (vs. `imager` mode), but DTB and other SBC stuff wasn't
properly initialized, so installing on SBC fails.

Now all options are properly initialized with defaults early in the
process.

Fixes #8009

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
This commit is contained in:
Andrey Smirnov 2023-12-01 17:24:34 +04:00
parent c6835de17a
commit d8a435f0e4
No known key found for this signature in database
GPG Key ID: FE042E3D4085A811
3 changed files with 2 additions and 4 deletions

View File

@ -151,6 +151,8 @@ func NewInstaller(ctx context.Context, cmdline *procfs.Cmdline, mode Mode, opts
}
}
i.options.BootAssets.FillDefaults(opts.Arch)
bootLoaderPresent := i.bootloader != nil
if !bootLoaderPresent {
if mode.IsImage() {

View File

@ -31,8 +31,6 @@ func (c *Config) Install(options options.InstallOptions) error {
return err
}
options.BootAssets.FillDefaults(options.Arch)
if err := utils.CopyFiles(
options.Printf,
utils.SourceDestination(

View File

@ -165,8 +165,6 @@ func (c *Config) Install(options options.InstallOptions) error {
}
}
options.BootAssets.FillDefaults(options.Arch)
if err := utils.CopyFiles(
options.Printf,
utils.SourceDestination(