unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Understanding how guix selects a bootloader variant
@ 2024-11-03 16:38 Tobias Alexandra Platen
  2024-11-03 18:23 ` Efraim Flashner
  2024-11-04 20:02 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
  0 siblings, 2 replies; 4+ messages in thread
From: Tobias Alexandra Platen @ 2024-11-03 16:38 UTC (permalink / raw)
  To: guix-devel

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Understanding how guix selects a bootloader variant
  2024-11-03 16:38 Understanding how guix selects a bootloader variant Tobias Alexandra Platen
@ 2024-11-03 18:23 ` Efraim Flashner
  2024-11-04 16:59   ` Tobias Alexandra Platen
  2024-11-04 20:02 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
  1 sibling, 1 reply; 4+ messages in thread
From: Efraim Flashner @ 2024-11-03 18:23 UTC (permalink / raw)
  To: Tobias Alexandra Platen; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 2148 bytes --]

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   <efraim@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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Understanding how guix selects a bootloader variant
  2024-11-03 18:23 ` Efraim Flashner
@ 2024-11-04 16:59   ` Tobias Alexandra Platen
  0 siblings, 0 replies; 4+ messages in thread
From: Tobias Alexandra Platen @ 2024-11-04 16:59 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

Thats the one I was looking for
On Sun, 2024-11-03 at 20:23 +0200, Efraim Flashner wrote:
> powerpc-*) platform=ieee1275 ;;
>     powerpc64-*) platform=ieee1275 ;;
>     powerpc64le-*) platform=ieee1275 ;;



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Understanding how guix selects a bootloader variant
  2024-11-03 16:38 Understanding how guix selects a bootloader variant Tobias Alexandra Platen
  2024-11-03 18:23 ` Efraim Flashner
@ 2024-11-04 20:02 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
  1 sibling, 0 replies; 4+ messages in thread
From: Felix Lechner via Development of GNU Guix and the GNU System distribution. @ 2024-11-04 20:02 UTC (permalink / raw)
  To: Tobias Alexandra Platen; +Cc: guix-devel

Hi Tobias Alexandra,

On Sun, Nov 03 2024, Tobias Alexandra Platen wrote:

> where guix selects BIOS/UEFI for a VM when using grub-bootloader.

I believe it happens here [1] but via "bootloader-configuration".

I personally find Guix's bootloader code convoluted.

Kind regards
Felix

P.S. I referred to my clone on Codeberg because I do not know how to
generate Permalinks for Savannah.

[1] https://codeberg.org/lechner/guix/src/commit/5f4ba1c09fa0fba1ed230b80bae9f6a4d0d2d303/gnu/bootloader/grub.scm#L905


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-11-04 20:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-03 16:38 Understanding how guix selects a bootloader variant Tobias Alexandra Platen
2024-11-03 18:23 ` Efraim Flashner
2024-11-04 16:59   ` Tobias Alexandra Platen
2024-11-04 20:02 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).