On Sun, Nov 03, 2024 at 05:38:11PM +0100, Tobias Alexandra Platen wrote:
> I am currently trying to build a virtual machine image for powerpc64le.
> So I intend to fix known errors, starting with the bootloader:
> configure: error: platform "efi" is not supported for target CPU
> "powerpc64le". The right bootloader variant for anything powerpc,
> starting from G4 is openfirmware. Here is some part of my config:
> 
> (bootloader (bootloader-configuration
>                 (bootloader grub-bootloader)
>                 (targets '("/dev/sda"))))
> 
> Now I am trying to understand where guix selects BIOS/UEFI for a VM
> when using grub-bootloader.

From there I'd search in Guix for the code for bootloader-configuration.

I would also start by looking at grub's configure.ac to see what options
exist:

# Specify the platform (such as firmware).
AC_ARG_WITH([platform],
            AS_HELP_STRING([--with-platform=PLATFORM],
                           [select the host platform [[guessed]]]))

# Guess the platform if not specified.
if test "x$with_platform" = x; then
  case "$target_cpu"-"$target_vendor" in
    i386-apple) platform=efi ;;
    i386-*) platform=pc ;;
    x86_64-apple) platform=efi ;;
    x86_64-*) platform=pc ;;
    powerpc-*) platform=ieee1275 ;;
    powerpc64-*) platform=ieee1275 ;;
    powerpc64le-*) platform=ieee1275 ;;
    sparc64-*) platform=ieee1275 ;;
    mipsel-*) platform=loongson ;;
    mips-*) platform=arc ;;
    ia64-*) platform=efi ;;
    arm-*) platform=uboot ;;
    arm64-*) platform=efi ;;
    loongarch64-*) platform=efi;;
    riscv32-*) platform=efi ;;
    riscv64-*) platform=efi ;;
    *)
      AC_MSG_WARN([unsupported CPU: "$target_cpu" - only building utilities])
      platform=none
      ;;
  esac
else
  platform="$with_platform"
fi

I'm pretty sure grub-efi builds for ppc64le, but it looks like you've
selected grub above.

-- 
Efraim Flashner   <efr...@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

Attachment: signature.asc
Description: PGP signature

Reply via email to