Skip to content

Commit

Permalink
fix: initialize boot assets with defaults early
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
smira committed Dec 1, 2023
1 parent c6835de commit d8a435f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 2 additions & 0 deletions cmd/installer/pkg/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit d8a435f

Please sign in to comment.