Skip to content

Commit

Permalink
A couple of fixes for kernel in models
Browse files Browse the repository at this point in the history
Rpi3+4 on debian needs a workaround before install
Rpi3+4 on suse needs to have the kernel-default package

Signed-off-by: Itxaka <[email protected]>
  • Loading branch information
Itxaka committed Feb 7, 2025
1 parent 0ca6f43 commit e6e0854
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pkg/stages/stages.go
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,19 @@ func RunInstallStage(logger types.KairosLogger) (schema.YipConfig, error) {
data := schema.YipConfig{Stages: map[string][]schema.Stage{}}
// Run things before we install packages and framework
data.Stages["before-install"] = []schema.Stage{}

// On Rpi3 and Rpi4 we need to enable the non-free repository for Debian to get the firmware
if config.DefaultConfig.Model == values.Rpi3.String() || config.DefaultConfig.Model == values.Rpi4.String() {
data.Stages["before-install"] = append(data.Stages["before-install"], []schema.Stage{
{
Name: "Enable non-free repository",
OnlyIfOs: "Debian.*",
Commands: []string{
"sed -i 's/^Components: main.*$/& non-free-firmware/' /etc/apt/sources.list.d/debian.sources",
},
},
}...)
}
// Add packages install
installStage, err := GetInstallStage(sis, logger)
if err != nil {
Expand Down
2 changes: 2 additions & 0 deletions pkg/values/packagemaps.go
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,7 @@ var KernelPackagesModels = ModelPackageMap{
ArchARM64: {
Rpi3: {
Common: {
"kernel-default",
"raspberrypi-eeprom",
"raspberrypi-firmware",
"raspberrypi-firmware-dt",
Expand All @@ -617,6 +618,7 @@ var KernelPackagesModels = ModelPackageMap{
},
Rpi4: {
Common: {
"kernel-default",
"raspberrypi-eeprom",
"raspberrypi-firmware",
"raspberrypi-firmware-dt",
Expand Down

0 comments on commit e6e0854

Please sign in to comment.