diff --git a/cmd/certs.go b/cmd/certs.go index 98a8fc2f7..f3e98c2af 100644 --- a/cmd/certs.go +++ b/cmd/certs.go @@ -20,7 +20,7 @@ func newCertsCmd(cfg *openevec.EdenSetupArgs) *cobra.Command { Short: "manage certs", Long: `Managed certificates for Adam and EVE.`, Run: func(cmd *cobra.Command, args []string) { - if err := eden.GenerateEveCerts(cfg.Eden.CertsDir, cfg.Adam.CertsDomain, cfg.Adam.CertsIP, cfg.Adam.CertsEVEIP, cfg.Eve.CertsUUID, cfg.Eve.DevModel, cfg.Eve.Ssid, cfg.Eve.Password, grubOptions, cfg.Adam.APIv1); err != nil { + if err := eden.GenerateEveCerts(cfg.Eden.CertsDir, cfg.Adam.CertsDomain, cfg.Adam.CertsIP, cfg.Adam.CertsEVEIP, cfg.Eve.CertsUUID, cfg.Eve.DevModel, cfg.Eve.Ssid, cfg.Eve.Arch, cfg.Eve.Password, grubOptions, cfg.Adam.APIv1); err != nil { log.Errorf("cannot GenerateEveCerts: %s", err) } else { log.Info("GenerateEveCerts done") diff --git a/pkg/eden/eden.go b/pkg/eden/eden.go index 40e0f72ce..7d8d8d435 100644 --- a/pkg/eden/eden.go +++ b/pkg/eden/eden.go @@ -385,7 +385,7 @@ func StatusEServer() (status string, err error) { } // GenerateEveCerts function generates certs for EVE -func GenerateEveCerts(certsDir, domain, ip, eveIP, uuid, devModel, ssid, password string, grubOptions []string, apiV1 bool) (err error) { +func GenerateEveCerts(certsDir, domain, ip, eveIP, uuid, devModel, ssid, arch, password string, grubOptions []string, apiV1 bool) (err error) { model, err := models.GetDevModelByName(devModel) if err != nil { return fmt.Errorf("GenerateEveCerts: %s", err) @@ -495,7 +495,7 @@ func GenerateEveCerts(certsDir, domain, ip, eveIP, uuid, devModel, ssid, passwor } } } - if model.DevModelType() == defaults.DefaultQemuModel && viper.GetString("eve.arch") == "arm64" { + if model.DevModelType() == defaults.DefaultQemuModel && arch == "arm64" { // we need to properly set console for qemu arm64 grubOptions = append(grubOptions, "set_global dom0_console \"console=ttyAMA0,115200 $dom0_console\"") } diff --git a/pkg/openevec/eden.go b/pkg/openevec/eden.go index 3ae55b73f..75dbb5ba3 100644 --- a/pkg/openevec/eden.go +++ b/pkg/openevec/eden.go @@ -376,7 +376,7 @@ func setupConfigDir(cfg EdenSetupArgs, eveConfigDir, softSerial, zedControlURL s } if zedControlURL == "" { if err := eden.GenerateEveCerts(cfg.Eden.CertsDir, cfg.Adam.CertsDomain, cfg.Adam.CertsIP, cfg.Adam.CertsEVEIP, cfg.Eve.CertsUUID, - cfg.Eve.DevModel, cfg.Eve.Ssid, wifiPSK, grubOptions, cfg.Adam.APIv1); err != nil { + cfg.Eve.DevModel, cfg.Eve.Ssid, cfg.Eve.Arch, wifiPSK, grubOptions, cfg.Adam.APIv1); err != nil { return fmt.Errorf("cannot GenerateEveCerts: %w", err) } log.Info("GenerateEveCerts done")