Commit graph

114 commits

Author SHA1 Message Date
Herman Rimm
38cb6dee66
gnu: bootloader: grub: Define grub-menu-entry configuration.
* gnu/bootloader/grub.scm (serialize-grub-theme, serialize-string,
normalize-file, serialize-file-like, string-list?, file-like-list?,
serialize-string-list, serialize-file-like-list, grub-device?,
serialize-grub-device, serialize-linux-directive,
serialize-multiboot-directive, directive-or-file-like?,
serialize-directive-or-file-like, menu-entry->grub-menu-entry,
serialize-grub-menu-entry): Add procedures.
(make-grub.cfg): Use really-mixed-text-file to reduce indentation.
(%boot): Add variable.  Define maybe-string.
(linux-directive, multiboot-directive, grub-menu-entry): Add records.

Change-Id: Ie1e56e04d5c8ae7ab07741ef7b6909f306398f28
2024-10-08 10:36:40 -04:00
Lilah Tascheter
d43e1a34ad
gnu: bootloader: Add Raspberry Pi bootloader.
Less adding and more making it an actual bootloader rather than some
weirdly specified packages.  The GRUB EFI bootloader can be recreated by
combining a Raspberry Pi bootloader with grub-efi.

* gnu/bootloader.scm (efi-bootloader-profile, efi-bootloader-chain):
Delete procedures.
* gnu/bootloader/u-boot.scm (rpi-config, install-rpi,
make-u-boot-rpi-bootloader): New procedures.
(u-boot-rpi-2-bootloader, u-boot-rpi-3-bootloader,
u-boot-rpi-4-bootloader, u-boot-rpi-bootloader): New variables.
* gnu/packages/bootloaders.scm (make-u-boot-bin-package): Delete
procedure.
(%u-boot-rpi-efi-description, %u-boot-rpi-efi-description-32-bit,
u-boot-rpi-2-efi, u-boot-rpi-3-32b-efi, u-boot-rpi-4-32b-efi,
u-boot-rpi-arm64-efi, u-boot-rpi-2-bin, u-boot-rpi-3_32b-bin,
u-boot-rpi-4_32b-bin, u-boot-rpi-arm64-bin, u-boot-rpi-2-efi-bin,
u-boot-rpi-3-32b-efi-bin, u-boot-rpi-4-32b-efi-bin,
u-boot-rpi-arm64-efi-bin): Delete variables.
* gnu/packages/raspberry-pi.scm (grub-efi-bootloader-chain-raspi-64):
Delete procedure.
* gnu/system/examples/raspberry-pi-64-nfs-root.tmpl (bootloader),
gnu/system/examples/raspberry-pi-64.tmpl (bootloader): Use new target
system.

Change-Id: I5139a0b00ec89189e8e7c84e06a7a3b7240259cd
2024-10-08 10:36:39 -04:00
Lilah Tascheter
e12dd189e8
gnu: bootloader: u-boot: Rewrite completely.
* gnu/bootloader/u-boot.scm (u-boot-bootloader): Delete variable.
(make-install-u-boot): Add procedure.
(define-u-bootloader): Add macro.
(u-boot-*-bootloader): Use define-u-bootloader.
(install-*u-boot): Remove variables.
* gnu/system/install.scm (os-with-u-boot): Remove procedure.
* doc/guix.texi (System Installation)[Building the Installation Image]:
Use beaglebone as the example.

Change-Id: I3654d160f7306bb45a78b82ea6b249ff4281f739
2024-10-08 10:36:39 -04:00
Lilah Tascheter
a0a99c446b
gnu: bootloader: extlinux: Rewrite completely.
* gnu/bootloader/extlinux.scm (install-extlinux-config): Add procedure.
(extlinux-configuration-file): Delete procedure.
(install-extlinux): Use install-extlinux-config.
(install-extlinux-mbr, install-extlinux-gpt): Delete variables.
(extlinux-bootloader): Update to new bootloader record.
(extlinux-gpt-bootloader): Update extlinux-bootloader-gpt to this.
(extlinux-bootloader-gpt): Deprecate variable.
* gnu/tests/install.scm (%minimal-extlinux-os)[bootloader]: Use proper
extlinux variable.

Change-Id: I3654d160f7306bb45a78b82ea6b249ff4281f739
2024-10-08 10:36:39 -04:00
Lilah Tascheter
f171385ab4
gnu: bootloader: depthcharge: Rewrite completely.
* gnu/bootloader/depthcharge (install-depthcharge): Add procedure.
(signed-kernel, depthcharge-configuration-file): Remove procedures.
(depthcharge-veyron-speedy-bootloader): Update depthcharge-bootloader.
(depthcharge-bootloader): Deprecate variable.
* doc/guix.texi (Bootloader Configuration): Document bootloader.

Change-Id: I3654d160f7306bb45a78b82ea6b249ff4281f739
2024-10-08 10:36:39 -04:00
Lilah Tascheter
5a6f0fbc58
gnu: bootloader: grub: Rewrite entirely.
* gnu/bootloader.scm (bootloader-configuration)[terminal-outputs,
terminal-inputs]: Don't assume grub.
[%bootloader-configuration-targets]: Rename to the below.
(bootloader-configuration-targets): Delete procedure.
* gnu/bootloader/grub.scm (normalize-file, bootloader-theme, image->png,
grub-background-image, grub-locale-directory, eye-candy,
keyboard-layout-file, grub-setup-io, grub-root-search,
make-grub-configuration, grub-configuration-file,
grub-efi-configuration-file, install-grub, install-grub-disk-image,
install-grub-efi, install-grub-efi-removable, install-grub-efi32,
make-grub-efi-netboot-installer, make-grub-efi-netboot-bootloader):
Remove procedures.
(grub-cfg, grub-mkrescue-bootloader): Remove variables.
(grub-efi-removable-bootloader, grub-efi32-bootloader,
grub-efi-netboot-bootloader, grub-efi-netboot-removable-bootloader):
Deprecate variables.
(grub-configuration): Remove macro.
(sanitize, search/target, search/menu-entry, when-list, grub-theme-png,
core.cfg->core.img, core.cfg, core.img, menu-entry->gexp, make-grub.cfg,
grub.cfg, grub.dir, install-grub.dir, install-grub-bios,
install-grub-efi, deprecated-installer): Add procedures.
(%grub-default-targets, %netboot-targets): Add variables.
(keyboard-layout-file): Return computed file.
* gnu/packages/bootloaders.scm (make-grub-efi-netboot): Delete
procedure.
* doc/guix.texi (system Configuration)[Bootloader Configuration]: Update
terminal-outputs and terminal-inputs to not be GRUB-specific.

Change-Id: I3654d160f7306bb45a78b82ea6b249ff4281f739
2024-10-08 10:36:38 -04:00
Herman Rimm
f321a5022d
gnu: bootloader: Add orangepi-zero2w bootloader.
* gnu/bootloader/u-boot.scm (u-boot-orangepi-zero2w-bootloader): Add
variable.
* gnu/packages/bootloaders.scm (u-boot-orangepi-zero2w): Add variable.
* gnu/packages/firmware.scm (arm-trusted-firmware-sun50i-h616): Add
variable.

Change-Id: Idb43fdabac51b3301f3bea24fec72bfa29636489
2024-10-08 10:36:34 -04:00
Herman Rimm
4164ff51a9
gnu: bootloader: Add nanopi-r4s-rk3399 bootloader.
* gnu/bootloader/u-boot.scm (install-nanopi-r4s-rk3399-u-boot,
u-boot-nanopi-r4s-rk3399-bootloader): Add variable.
* gnu/packages/bootloaders.scm (u-boot-nanopi-r4s-rk3399): Add variable.

Change-Id: I6d4cb098727fe4027aea33a39c59d34000dfc4db
2024-10-08 10:36:33 -04:00
Zheng Junjie
c7aec90a91
bootloader: Add u-boot-starfive-visionfive2-bootloader.
* gnu/bootloader/u-boot.scm (u-boot-starfive-visionfive2-bootloader): New variable.

Change-Id: I4b73906fe18d481644102c271f5e0883167b3a50
2024-05-22 11:15:30 +08:00
Zheng Junjie
64187b65d3
bootloader: Add u-boot-qemu-riscv64-bootloader.
* gnu/bootloader/u-boot.scm (u-boot-qemu-riscv64-bootloader): New variable.

Change-Id: If6622838d2250c90a26380849b92387aa7122fbb
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-03-31 22:26:21 +02:00
Tomas Volf
086850e5b2
bootloader: grub: Add support for loading an additional initrd.
In order to be able to provide decryption keys for the LUKS device, they need
to be available in the initial ram disk.  However they cannot be stored inside
the usual initrd, since it is stored in the store and being a
world-readable (as files in the store are) is not a desired property for a
initrd containing decryption keys.  This commit adds an option to load
additional initrd during the boot, one that is not stored inside the store and
therefore can contain secrets.

Since only grub supports encrypted /boot, only grub is modified to use the
extra-initrd.  There is no use case for the other bootloaders.

* doc/guix.texi (Bootloader Configuration): Describe the new extra-initrd
field.
* gnu/bootloader.scm (<bootloader-configuration>): Add extra-initrd field.
* gnu/bootloader/grub.scm (make-grub-configuration): Use the extra-initrd
field.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Change-Id: I995989bb623bb594ccdafbf4a1a6de941bd4189f
2024-01-14 23:00:03 +01:00
Herman Rimm
88fb95903c
gnu: bootloader: Add orangepi-r1-plus-lts-rk3328 bootloader.
* gnu/bootloader/u-boot.scm (install-orangepi-r1-plus-lts-rk3328-u-boot,
  u-boot-orangepi-r1-plus-lts-rk3328-bootloader): New variables.
* gnu/packages/bootloaders.scm (u-boot-orangepi-r1-plus-lts-rk3328): New
  variable.

Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
2023-12-22 16:06:03 -08:00
Janneke Nieuwenhuizen
c22c29b0c4
bootloader: grub: Use rumpdisk-style root when booting with "noide".
* gnu/bootloader/grub.scm (make-grub-configuration): When "noide" is in
arguments, use device name "wd0" rather than "hd0".

Signed-off-by: Josselin Poiret <dev@jpoiret.xyz>
2023-07-13 18:59:13 +02:00
Efraim Flashner
39250fc622
gnu: bootloader: Add u-boot-sifive-unmatched-bootloader.
* gnu/bootloader/u-boot.scm (install-sifive-unmatched-u-boot,
u-boot-sifive-unmatched-bootloader): New variables.
2023-06-14 14:52:21 +03:00
Maxim Cournoyer
9530ee9f9c
gnu: Add u-boot-ts7970-q-2g-1000mhz-c-bootloader.
* gnu/bootloader/u-boot.scm (u-boot-ts7970-q-2g-1000mhz-c-bootloader): New
variable.
2023-01-18 21:25:25 -05:00
Maxim Cournoyer
d6ea9f8b38
gnu: u-boot-am335x-boneblack: Revert to old name.
This reverts to the name this package had previous to commit
c2c1dfdf57 ("gnu: bootloader: Add U-Boot
packages for Raspberry Pi models."), which caused the package name to be
derived from the board name.

* gnu/packages/bootloaders.scm (u-boot-am335x-evm-boneblack): Remove the
NAME-SUFFIX keyword argument.  Specify the full name via the name field.
* gnu/bootloader/u-boot.scm (u-boot-beaglebone-black-bootloader): Adjust to
the renamed package.

Reported-by: Vagrant Cascadian <vagrant@debian.org>
2022-12-28 22:14:16 -05:00
Maxim Cournoyer
c04528d2a2
gnu: u-boot-am335x-evm-boneblack: Fix variable name.
* gnu/packages/bootloaders.scm (u-boot-am335x-boneblack): Rename to...
(u-boot-am335x-evm-boneblack), to match the package name.
* gnu/bootloader/u-boot.scm (u-boot-beaglebone-black-bootloader): Adjust
accordingly.
2022-12-20 21:29:25 -05:00
Maxim Cournoyer
f76ed96f93
bootloaders: grub: Fix comment.
* gnu/bootloader/grub.scm (make-grub-configuration): Refer to the correct
argument in comment.
2022-12-07 23:19:56 -05:00
Stefan
a9acbf919a
gnu: bootloader: Rework chaining, add grub-efi-netboot-removable-bootloader.
This rework allows to use an (efi-bootloader-chain) like this, which is able
to boot over network or local storage, depending on whether the bootloader
target has support for symbolic links:

   (operating-system
    (bootloader
      (bootloader-configuration
        (bootloader
          (efi-bootloader-chain
            grub-efi-netboot-removable-bootloader
            #:packages (list my-firmware-package
                             my-u-boot-package)
            #:files (list (plain-file "config.txt"
                                      "kernel=u-boot.bin"))
            #:hooks my-special-bootloader-profile-manipulator))
        (targets '("/booti/efi"))
        …))
    …)

* doc/guix.texi (Bootloader Configuration): Describe the new
‘grub-efi-netboot-removable-bootloader’.  Mention the file names used and that
the UEFI Boot Manager is not modified.  Advise to disable write-access over
TFTP.
* gnu/bootloader.scm (efi-bootloader-profile): Allow a list of packages and
collect everything directly in the profile, avoiding a separate collection
directory.  Renamed the profile from "bootloader-profile" to
"efi-bootloader-profile".
[bootloader-collection]: Rename to...
[efi-bootloader-profile-hook]: ... this and remove unused modules.  Do not
create the now extraneous collection directory.
(efi-bootloader-chain): Add PACKAGES and DISK-IMAGE-INSTALLER arguments.
Remove handling of the collection directory, now only calling the given
installer procedure.
* gnu/bootloader/grub.scm (make-grub-efi-netboot-installer): New helper.
(make-grub-configuration): New helper based on (grub-configuration-file).  Add
a GRUB argument, fix indentation, remove previous code retrieving GRUB from
CONFIG.
(grub-configuration-file): Make use of make-grub-configuration.
(grub-efi-configuration-file): New procedure.
(grub-cfg): New variable to replace "/boot/grub/grub.cfg".
(install-grub-efi-netboot): Remove, splitting logic to...
(make-grub-efi-netboot-installer): ... this new helper procedure, as well as
to make-grub-efi-netboot, added below.
(grub-bootloader): Adjust to use the GRUB-CFG.
(grub-efi-bootloader): Likewise.  Removed inheritance and declare all fields
explicitly.
(make-grub-efi-netboot-bootloader): New procedure.
(grub-efi-netboot-bootloader): Use it.
(grub-efi-netboot-removable-bootloader): New variable.
* gnu/packages/bootloaders.scm (make-grub-efi-netboot): New procedure.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2022-12-01 14:31:28 -05:00
tiantian
1fc20e4c86
gnu: bootloader: grub: Add support for chain-loader.
* gnu/bootloader/grub.scm (grub-configuration-file): Add support for
chain-loader.

Signed-off-by: Julien Lepiller <julien@lepiller.eu>
2022-09-08 22:30:09 +02:00
Reza Alizadeh Majd
f126f23b13
bootloader: Add device-tree-support? option.
In some specific cases where the device tree file is already loaded in RAM, it
can be preferable that the bootloader does not try to use a device tree from
the Linux kernel tree.

* gnu/bootloader.scm (<bootloader-configuration>)[device-tree-support?]: New field.
* gnu/bootloader/extlinux.scm (extlinux-configuration-file): Add FDTDIR line
based on <device-tree-support?> field of <bootloader-configuration>.
* doc/guix.texi (Bootloader Configuration)[device-tree-support?]: Add
documentation for the new field.
2022-08-30 08:50:44 +02:00
Denis 'GNUtoo' Carikli
62c86c8391
image: Add support for 32bit UEFI.
* gnu/bootloader/grub.scm (grub-efi32-bootloader): New variable.
(install-grub-efi32): New variable.
* gnu/build/bootloader.scm (install-efi): Add a 'targets' keyword
argument.
(install-efi-loader): Likewise.
* gnu/build/image.scm (initialize-efi32-partition): New procedure.
* gnu/packages/bootloaders.scm (grub-efi32): New variable.
* gnu/system/image.scm (esp32-partition): New variable
(efi32-disk-image): New variable.
(efi32-raw-image-type): New variable.
(system-disk-image)[partition-image]: Set '#:grub-efi32' when
calling the partition initializer.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2022-06-24 10:21:06 +02:00
Karl Hallsby
618f665a5f
bootloader: grub: Add removable grub-efi bootloader option.
For single-disk installs (external USBs) and for amnesiac UEFIs, Guix is not
found using its default Grub EFI bootloader location of
/boot/efi/EFI/Guix/grubx64.efi means the Guix install will not be found.

To handle this, we can place the bootloader file in the UEFI specification
location, overwriting any other OS that may have placed a file there. This
location is namely /boot/efi/EFI/BOOT/BOOTX64.efi. Grub has explicit support
for this location/situation with the `--removable` flag.

* gnu/bootloader/grub.scm (install-grub-efi-removable)
(grub-efi-removable-bootloader): New variables.
* doc/guix.texi (Bootloader Configuration): Document it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-06-06 22:43:30 +02:00
Mathieu Othacehe
ea71ec1630
bootloader: grub: Fix serial mode.
* gnu/bootloader/grub.scm (grub-setup-io): Fix serial mode display by
declaring the serial property before the terminal_input and terminal_output
properties.
2022-01-13 11:11:02 +01:00
Josselin Poiret
adce91a3ec
gnu: system: Add LUKS2 support for the root file system.
* gnu/bootloader/grub.scm (grub-configuration-file): Add 'insmod
luks2'.
* gnu/system/mapped-devices.scm (open-luks-device): Create
'/run/cryptsetup/' directory.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-12-01 17:51:37 +01:00
Maxim Cournoyer
da4e409483
Migrate to the new 'targets' field of bootloader-configuration.
The old 'target' field is deprecated; adjust the sources to use the new
'targets' one instead.

* doc/guix-cookbook.texi<target>: Replace by 'targets'.
* gnu/bootloader/grub.scm: Likewise.
* gnu/installer/parted.scm: Likewise.
* gnu/machine/digital-ocean.scm: Likewise.
* gnu/system/examples/asus-c201.tmpl: Likewise
* gnu/system/examples/bare-bones.tmpl: Likewise
* gnu/system/examples/bare-hurd.tmpl: Likewise
* gnu/system/examples/beaglebone-black.tmpl: Likewise
* gnu/system/examples/desktop.tmpl: Likewise
* gnu/system/examples/docker-image.tmpl: Likewise
* gnu/system/examples/lightweight-desktop.tmpl: Likewise
* gnu/system/examples/vm-image.tmpl: Likewise
* gnu/system/examples/yggdrasil.tmpl: Likewise
* gnu/system/hurd.scm: Likewise
* gnu/system/images/hurd.scm: Likewise
* gnu/system/images/novena.scm: Likewise
* gnu/system/images/pine64.scm: Likewise
* gnu/system/images/pinebook-pro.scm: Likewise
* gnu/system/images/rock64.scm: Likewise
* gnu/system/install.scm: Likewise
* gnu/system/vm.scm: Likewise
* gnu/tests.scm: Likewise
* gnu/tests/ganeti.scm: Likewise
* gnu/tests/install.scm: Likewise
* gnu/tests/nfs.scm: Likewise
* gnu/tests/telephony.scm: Likewise
* tests/boot-parameters.scm: Likewise
* tests/system.scm: Likewise
2021-08-29 01:05:26 -04:00
Vagrant Cascadian
d7d6c9e4e6
gnu: bootloader: Fix install-allwinner64-u-boot.
This fixes boot breakage introduced in commit:

  a65c935e29

Multiple files were still needed, but the filenames changed.

* gnu/bootloader/u-boot.scm (install-allwinner64-u-boot): Update to
  use both SPL and u-boot files with new filenames.
2021-05-29 21:25:13 -07:00
Tobias Geerinckx-Rice
816a5ecdc8
bootloader: grub: Fix typo in docstring.
* gnu/bootloader/grub.scm (install-grub-efi-netboot): Fix typo.
2021-04-10 14:11:33 +02:00
Vagrant Cascadian
a65c935e29
gnu: bootloader: Update install-allwinner64-u-boot.
* gnu/bootloader/u-boot.scm (install-allwinner64-u-boot): Update to
  use a single file to install.
2021-02-08 17:21:34 -08:00
Vagrant Cascadian
15990546a5
gnu: u-boot-puma-rk3399: Switch to using arm-trusted-firmware-rk3399.
* gnu/packages/bootloaders.scm (u-boot-puma-rk3399)[native-inputs]:
  Add arm-trusted-firmware-rk3399.
  Remove arm-trusted-firmware-puma-rk3399 and rk3399-cortex-m0.
* gnu/packages/firmware.scm (arm-trusted-firmware-puma-rk3399,
  rk3399-cortex-m0): Remove obsolete variables.
* gnu/bootloader/u-boot.scm (install-puma-rk3399-u-boot): Install
  idbloader.img.
2021-02-08 07:18:41 -08:00
Stefan
b57056a9fd
gnu: grub: Use installed unicode font.
* gnu/bootloader/grub.scm (setup-gfxterm): Remove parameter font-file.
Refer to the installed font in /boot, not in the store.
(font-file): Delete obsolete function.
(install-grub): When populating a disk-image, install the unicode font, too.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2021-01-17 15:47:59 +01:00
Miguel Ángel Arruga Vivas
f00e68ace0
system: Allow separated /boot and encrypted root.
* gnu/bootloader/grub.scm (grub-configuration-file): New parameter
store-crypto-devices.
[crypto-devices]: New helper function.
[builder]: Use crypto-devices.
* gnu/machine/ssh.scm (roll-back-managed-host): Use
boot-parameters-store-crypto-devices to provide its contents to the
bootloader configuration generation process.
* gnu/tests/install.scm (%encrypted-root-not-boot-os,
%encrypted-root-not-boot-os): New os declaration.
(%encrypted-root-not-boot-installation-script): New script, whose contents
were initially taken from %encrypted-root-installation-script.
(%test-encrypted-root-not-boot-os): New test.
* gnu/system.scm (define-module): Export
operating-system-bootoader-crypto-devices and
boot-parameters-store-crypto-devices.
(<boot-parameters>): Add field store-crypto-devices.
(read-boot-parameters): Parse store-crypto-devices field.
[uuid-sexp->uuid]: New helper function extracted from
device-sexp->device.
(operating-system-bootloader-crypto-devices): New function.
(operating-system-bootcfg): Use
operating-system-bootloader-crypto-devices to provide its contents to
the bootloader configuration generation process.
(operating-system-boot-parameters): Add store-crypto-devices to the
generated boot-parameters.
(operating-system-boot-parameters-file): Likewise to the file with
the serialized structure.
* guix/scripts/system.scm (reinstall-bootloader): Use
boot-parameters-store-crypto-devices to provide its contents to the
bootloader configuration generation process.
* tests/boot-parameters.scm (%default-store-crypto-devices): New
variable.
(%grub-boot-parameters, test-read-boot-parameters): Use
%default-store-crypto-devices.
(tests store-crypto-devices): New tests.
2020-12-21 18:41:11 +01:00
Ludovic Courtès
7a2897149d
Revert "gnu: grub: Fix unicode font loading when booting over TFTP."
This reverts commit 03fb57ff77, which
breaks most system tests.  Specifically, grub.cfg.drv fails to build:

  ERROR: In procedure canonicalize-path:
  In procedure canonicalize-path: No such file or directory
2020-12-15 17:32:09 +01:00
Stefan
03fb57ff77
gnu: grub: Fix unicode font loading when booting over TFTP.
* gnu/bootloader/grub.scm (eye-candy)(font-file): Fix unicode font loading
when booting over TFTP.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2020-12-14 23:33:22 +01:00
Maxim Cournoyer
b0afa3c5f6
bootloader: grub: Skip install-grub-efi when producing a disk image.
Fixes <http://issues.guix.gnu.org/44353>.

Every bootloader should try their best to install themselves using only the
MOUNT-POINT and otherwise do nothing.  This requirement comes from the
necessity to call INSTALL-GRUB when installing the (non-EFI) GRUB bootloader,
which needs to populate the root file system with extra modules that cannot be
fit in the core.img file, limited in size to 491520 bytes (by the i386-pc
format required for legacy BIOS compatibility).

As introducing bootloader knowledge at the level of the image code is
undesirable, every bootloader should be adapted to support this fall-back for
their installation procedure (TODO).

* gnu/bootloader/grub.scm (install-grub-efi)[efi-dir]: Skip when the EFI-DIR
argument is set to #f.
2020-11-17 15:20:03 -05:00
Miguel Ángel Arruga Vivas
f445bc6576
system: Generate grub locale directory for grub.cfg.
* gnu/bootloader/grub.scm (grub-locale-directory): New function.
(grub-configuration-file)[locale-config]: Use grub-locale-directory and
avoid the extra search when eye-candy have performed it.
2020-11-01 01:14:36 +01:00
Miguel Ángel Arruga Vivas
222a630e9e
system: Fix dependency for grub.cfg generation.
* gnu/bootloader/grub.scm (eye-candy)[font-file]: Use the bootloader
package provided with the configuration.
2020-10-30 22:34:03 +01:00
Miguel Ángel Arruga Vivas
c69a1c27ee
system: Fix grub keymap with store in btrfs subvolume.
* gnu/bootloader/grub.scm (grub-configuration-file)
[keyboard-layout-config]: Use normalize-file.
2020-10-30 22:33:58 +01:00
Miguel Ángel Arruga Vivas
cfe9c7eceb
system: Use locale information in grub.cfg.
* gnu/bootloader/grub.scm (define-module): Add new dependency.
(grub-configuration-file): Add locale keyword.
(grub-configuration-file)[locale-config]: New variable with generated
locale configuration when locale parameter has been provided.
[builder]: Add locale-config.
2020-10-18 15:33:05 +02:00
Mathieu Othacehe
b97b423e3f
bootloader: Fix u-boot installation.
This is a follow-up of f19cf27c2b. The
bootloader installation must be done on the final disk-image, hence using
"disk-image-installer" instead of "installer" callback.

* gnu/bootloader/u-boot.scm: Turn all installer callbacks into
disk-image-installer callbacks.
* gnu/build/bootloader.scm (write-file-on-device): Open the output file with
'no-truncate and 'no-create options.
* gnu/system/image.scm (with-imported-modules*): Add (gnu build bootloader)
module.
2020-10-05 11:10:35 +02:00
Stefan
c85f316ae9
gnu: grub: Support for network boot via TFTP.
* gnu/bootloader/grub.scm (grub-efi-netboot-bootloader): New variable.
(install-grub-efi-netboot): New procedure.
(grub-root-search): Update comment.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2020-09-27 13:38:35 +02:00
Stefan
8c4f1aa85f
gnu: grub: Support loading files from TFTP if the root filesystem is NFS.
* gnu/bootloader/grub.scm (grub-root-search): Set the root to "(tftp)" if
the searched-for file is stored on NFS.
2020-09-14 14:25:04 +02:00
Stefan
f70c2bd900
bootloader: Use "define" instead of "define*" for all records.
* gnu/bootloader/grub.scm (grub-minimal-bootloader): Use "define".
(grub-efi-bootloader): Use "define".
(grub-mkrescue-bootloader): Use "define".

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2020-09-07 00:19:54 +02:00
Stefan
3f2bd9df41
bootloader: Add comment about grub configuration files.
* gnu/bootloader/grub.scm: Add comment about grub configuration files.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2020-09-06 15:55:10 +02:00
Mathieu Othacehe
80352a2f68
bootloader: grub: Fix cross-compilation.
This is a follow-up of 536c53d347, that do not
use the native version of "font-file", breaking cross-compilation.

* gnu/bootloader/grub.scm (eye-candy): Use the native version of "font-file".
2020-06-09 18:49:36 +02:00
Stefan
536c53d347
gnu: grub: Support graphical gfxterm on all systems.
* gnu/bootloaders/grub.scm (eye-candy): Use gfxterm depending only on
(bootloader-configuration (terminal-outputs …)), which defaults to '(gfxterm).
This makes the system argument obsolete.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2020-06-09 17:18:21 +02:00
Jan (janneke) Nieuwenhuizen
1244491a0d
bootloader: grub: Add support for multiboot.
* gnu/bootloader/grub.scm (grub-configuration-file): Add support for
multiboot.
2020-06-08 13:51:18 +02:00
Maxim Cournoyer
e7b86a0d88
bootloader: grub: Rename the btrfs-subvolume-file-name parameter.
Following discussion in <https://issues.guix.gnu.org/37305>, it seems more
appropriate to give the parameter a more generic name that better describes
what it does.

* gnu/bootloader/grub.scm (normalize-file): Rename the
BTRFS-SUBVOLUME-FILE-NAME parameter to STORE-DIRECTORY-PREFIX, and always
assume this argument to be a string.
(eye-candy): Likewise.  Default STORE-DIRECTORY-PREFIX to "".
(grub-configuration-file): Likewise.
* gnu/system.scm (operating-system-bootcfg): Adapt.
2020-05-29 21:48:59 -04:00
Mathieu Othacehe
7202895e5a
bootloader: grub: Use inheritance to define grub-minimal-bootloader.
* gnu/bootloader/grub.scm (grub-minimal-bootloader): Inherit from
grub-bootloader to avoid field redefinition.
2020-05-29 08:40:03 +02:00
Mathieu Othacehe
7e6a42f215
bootloader: grub: Do not run grub-install when creating a disk-image.
* gnu/bootloader/grub.scm (install-grub): When creating a disk-image,
grub-install will fail because it lacks root permissions. In that case, do not
run grub-install and only copy Grub modules to the /boot directory.
2020-05-29 08:40:00 +02:00