Copy grub+shim from the rootfs especific paths (#189)

This commit is contained in:
Itxaka
2024-01-11 11:24:43 +01:00
committed by GitHub
parent 845b9b1e3b
commit ae41cbf34e
3 changed files with 109 additions and 48 deletions

View File

@@ -17,7 +17,6 @@ limitations under the License.
package constants
import (
"fmt"
"os"
)
@@ -105,8 +104,8 @@ const (
Archx86 = "x86_64"
ArchArm64 = "arm64"
SignedShim = "shim.efi"
Rsync = "rsync"
SignedGrub = "grub.efi"
Rsync = "rsync"
UkiSource = "/run/install/uki"
UkiCdromSource = "/run/install/cdrom"
@@ -128,20 +127,6 @@ func GetDefaultSquashfsCompressionOptions() []string {
return []string{"-comp", "gzip"}
}
func GetGrubFilePaths(arch string) []string {
var archPath string
switch arch {
case ArchArm64:
archPath = "aarch64"
default:
archPath = Archx86
}
return []string{
fmt.Sprintf("/usr/share/efi/%s/grub.efi", archPath),
fmt.Sprintf("/usr/share/efi/%s/%s", archPath, SignedShim),
}
}
func GetFallBackEfi(arch string) string {
switch arch {
case ArchArm64: