@@ -385,40 +385,18 @@ func manifestForDiskImage(c *ManifestConfig, rng *rand.Rand) (*manifest.Manifest
385
385
"console=ttyS0" ,
386
386
}
387
387
388
+ img .Platform = & platform.Data {
389
+ Arch : c .Architecture ,
390
+ UEFIVendor : c .SourceInfo .UEFIVendor ,
391
+ QCOW2Compat : "1.1" ,
392
+ }
388
393
switch c .Architecture {
389
394
case arch .ARCH_X86_64 :
390
- img .Platform = & platform.X86 {
391
- BasePlatform : platform.BasePlatform {},
392
- BIOS : true ,
393
- }
394
- case arch .ARCH_AARCH64 :
395
- img .Platform = & platform.Aarch64 {
396
- UEFIVendor : "fedora" ,
397
- BasePlatform : platform.BasePlatform {
398
- QCOW2Compat : "1.1" ,
399
- },
400
- }
401
- case arch .ARCH_S390X :
402
- img .Platform = & platform.S390X {
403
- BasePlatform : platform.BasePlatform {
404
- QCOW2Compat : "1.1" ,
405
- },
406
- Zipl : true ,
407
- }
395
+ img .Platform .(* platform.Data ).BIOSPlatform = "i386-pc"
408
396
case arch .ARCH_PPC64LE :
409
- img .Platform = & platform.PPC64LE {
410
- BasePlatform : platform.BasePlatform {
411
- QCOW2Compat : "1.1" ,
412
- },
413
- BIOS : true ,
414
- }
415
- case arch .ARCH_RISCV64 :
416
- img .Platform = & platform.RISCV64 {
417
- UEFIVendor : "fedora" ,
418
- BasePlatform : platform.BasePlatform {
419
- QCOW2Compat : "1.1" ,
420
- },
421
- }
397
+ img .Platform .(* platform.Data ).BIOSPlatform = "powerpc-ieee1275"
398
+ case arch .ARCH_S390X :
399
+ img .Platform .(* platform.Data ).ZiplSupport = true
422
400
}
423
401
424
402
if kopts := customizations .GetKernel (); kopts != nil && kopts .Append != "" {
@@ -559,48 +537,26 @@ func manifestForISO(c *ManifestConfig, rng *rand.Rand) (*manifest.Manifest, erro
559
537
}
560
538
img .InstallerCustomizations .UseRHELLoraxTemplates = needsRHELLoraxTemplates (c .SourceInfo .OSRelease )
561
539
540
+ img .Platform = & platform.Data {
541
+ Arch : c .Architecture ,
542
+ ImageFormat : platform .FORMAT_ISO ,
543
+ UEFIVendor : c .SourceInfo .UEFIVendor ,
544
+ }
562
545
switch c .Architecture {
563
546
case arch .ARCH_X86_64 :
564
- img .Platform = & platform.X86 {
565
- BasePlatform : platform.BasePlatform {
566
- ImageFormat : platform .FORMAT_ISO ,
567
- },
568
- BIOS : true ,
569
- UEFIVendor : c .SourceInfo .UEFIVendor ,
570
- }
547
+ img .Platform .(* platform.Data ).BIOSPlatform = "i386-pc"
571
548
img .InstallerCustomizations .ISOBoot = manifest .Grub2ISOBoot
572
549
case arch .ARCH_AARCH64 :
573
550
// aarch64 always uses UEFI, so let's enforce the vendor
574
551
if c .SourceInfo .UEFIVendor == "" {
575
552
return nil , fmt .Errorf ("UEFI vendor must be set for aarch64 ISO" )
576
553
}
577
- img .Platform = & platform.Aarch64 {
578
- BasePlatform : platform.BasePlatform {
579
- ImageFormat : platform .FORMAT_ISO ,
580
- },
581
- UEFIVendor : c .SourceInfo .UEFIVendor ,
582
- }
583
554
case arch .ARCH_S390X :
584
- img .Platform = & platform.S390X {
585
- Zipl : true ,
586
- BasePlatform : platform.BasePlatform {
587
- ImageFormat : platform .FORMAT_ISO ,
588
- },
589
- }
555
+ img .Platform .(* platform.Data ).ZiplSupport = true
590
556
case arch .ARCH_PPC64LE :
591
- img .Platform = & platform.PPC64LE {
592
- BIOS : true ,
593
- BasePlatform : platform.BasePlatform {
594
- ImageFormat : platform .FORMAT_ISO ,
595
- },
596
- }
557
+ img .Platform .(* platform.Data ).BIOSPlatform = "powerpc-ieee1275"
597
558
case arch .ARCH_RISCV64 :
598
- img .Platform = & platform.RISCV64 {
599
- BasePlatform : platform.BasePlatform {
600
- ImageFormat : platform .FORMAT_ISO ,
601
- },
602
- UEFIVendor : c .SourceInfo .UEFIVendor ,
603
- }
559
+ // nothing special needed
604
560
default :
605
561
return nil , fmt .Errorf ("unsupported architecture %v" , c .Architecture )
606
562
}
0 commit comments