Skip to contentSkip to conversation

`all_video.mod` missing loading `grub.cfg` generated by grub-pc in GRUB payload (coreboot)

PATCH Superseded Paul Menzel 5 participants 14 messages Apr 15, 2017 – Oct 1, 2018 Kbuild

lore
Share & tools
lore
#0 lore raw

Dear GRUB folks,

When using GRUB as a coreboot payload, that means passing --with- platform=coreboot to configure, and configuring it to load the GRUB configuration file from disk, /boot/grub/grub.cfg in Debian 8.7 (Jessie/stable) and 9 (Stretch/testing), generated by GRUB shipped by the GNU/Linux distribution, I get a warning about the missing module all_video.mod, and the enter key has to be pressed to continue booting.

The function load_video in /boot/grub/grub.cfg is causing this.

```
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}
```

This get added by update-grub from /etc/grub.d/00_header.

```
cat <<EOF
function load_video {
EOF
if [ -n "${GRUB_VIDEO_BACKEND}" ]; then
    cat <<EOF
  insmod ${GRUB_VIDEO_BACKEND}
EOF
else
# If all_video.mod isn't available load all modules available
# with versions prior to introduction of all_video.mod
cat <<EOF
  if [ x\$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
EOF
fi
```

Do you know of a way to make that compatible with grub-pc and GRUB payload? That’s useful, as the hard disk can be connected to a system running coreboot with SeaBIOS or GRUB as a payload, or a proprietary vendor firmware.

Kind regards,

Paul

#1 lore raw

15.04.2017 13:25, Paul Menzel пишет:

Quoted 11 lines

Dear GRUB folks,

When using GRUB as a coreboot payload, that means passing --with- platform=coreboot to configure, and configuring it to load the GRUB configuration file from disk, /boot/grub/grub.cfg in Debian 8.7 (Jessie/stable) and 9 (Stretch/testing), generated by GRUB shipped by the GNU/Linux distribution, I get a warning about the missing module all_video.mod, and the enter key has to be pressed to continue booting.

...

Quoted 3 lines

Do you know of a way to make that compatible with grub-pc and GRUB payload?

Include all_video in coreboot payload?

#2 lore raw

Dear Andrei,

Am Samstag, den 15.04.2017, 14:22 +0300 schrieb Andrei Borzenkov:

Quoted 10 lines

15.04.2017 13:25, Paul Menzel пишет:

Quoted 7 lines

When using GRUB as a coreboot payload, that means passing --with- platform=coreboot to configure, and configuring it to load the GRUB configuration file from disk, /boot/grub/grub.cfg in Debian 8.7 (Jessie/stable) and 9 (Stretch/testing), generated by GRUB shipped by the GNU/Linux distribution, I get a warning about the missing module all_video.mod, and the enter key has to be pressed to continue booting.

Quoted 6 lines

...

Quoted 2 lines

Do you know of a way to make that compatible with grub-pc and GRUB payload?

Include all_video in coreboot payload?

Thank you. That indeed works. I thought, it wouldn’t be available for that platform, and it is. I’ll send a patch to add it by default.

Thanks,

Paul

#3 lore raw

PATCH 1/1 Makefile.am: Add `all_video` to `default_payload.elf`

Date: Sun, 16 Apr 2017 21:02:58 +0200

The module all_video is used in util/grub.d/00_header.in, and included for grub-pc by default.

To make it easier to load such a GRUB configuration from disk for a GRUB coreboot payload, add this module also to default_payload.elf by default. That avoids aa missing module error by GRUB, forcing the user to hit enter during the start process.

---
 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile.am +1 -1
index 7795baeb6..80a787e57 100644
@@ -424,7 +424,7 @@ bootcheck: $(BOOTCHECKS)
 if COND_i386_coreboot
 default_payload.elf: grub-mkstandalone grub-mkimage FORCE
 	test -f $@ && rm $@ || true
-	pkgdatadir=. ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o $@ --modules='ahci pata ehci uhci ohci usb_keyboard usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs' --install-modules='ls linux search configfile normal cbtime cbls memrw iorw minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu $(shell cat grub-core/fs.lst) password_pbkdf2 $(EXTRA_PAYLOAD_MODULES)' --fonts= --themes= --locales= -d grub-core/ /boot/grub/grub.cfg=$(srcdir)/coreboot.cfg
+	pkgdatadir=. ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o $@ --modules='ahci pata ehci uhci ohci usb_keyboard usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs' --install-modules='ls linux search configfile normal cbtime cbls memrw iorw minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu all_video $(shell cat grub-core/fs.lst) password_pbkdf2 $(EXTRA_PAYLOAD_MODULES)' --fonts= --themes= --locales= -d grub-core/ /boot/grub/grub.cfg=$(srcdir)/coreboot.cfg
 endif
 
 endif
Signature · 1 line
2.11.0
#4 lore raw

PATCH v2 1/1 Makefile.am: Add `all_video` to `default_payload.elf`

From a199bc1f64e33aa942b23fe6d16670cc6002bb6c Mon Sep 17 00:00:00 2001
From: Paul Menzel <[email protected]>
Date: Sun, 16 Apr 2017 21:02:58 +0200
Subject: [PATCH] Makefile.am: Add all_video to default_payload.elf

The module all_video is used in util/grub.d/00_header.in, and included for grub-pc by default.

To make it easier to load such a GRUB configuration from disk with a GRUB coreboot payload, add this module also to default_payload.elf by default. That avoids a missing module error by GRUB, forcing the user to hit enter during the start process.
---
v2: Resend and fix typo in commit message.

 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile.am +1 -1
index 7795baeb6..80a787e57 100644
@@ -424,7 +424,7 @@ bootcheck: $(BOOTCHECKS)
 if COND_i386_coreboot
 default_payload.elf: grub-mkstandalone grub-mkimage FORCE
 	test -f $@ && rm $@ || true
-	pkgdatadir=. ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o $@ --modules='ahci pata ehci uhci ohci usb_keyboard usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs' --install-modules='ls linux search configfile normal cbtime cbls memrw iorw minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu $(shell cat grub-core/fs.lst) password_pbkdf2 $(EXTRA_PAYLOAD_MODULES)' --fonts= --themes= --locales= -d grub-core/ /boot/grub/grub.cfg=$(srcdir)/coreboot.cfg
+	pkgdatadir=. ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o $@ --modules='ahci pata ehci uhci ohci usb_keyboard usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs' --install-modules='ls linux search configfile normal cbtime cbls memrw iorw minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu all_video $(shell cat grub-core/fs.lst) password_pbkdf2 $(EXTRA_PAYLOAD_MODULES)' --fonts= --themes= --locales= -d grub-core/ /boot/grub/grub.cfg=$(srcdir)/coreboot.cfg
 endif
 
 endif
Signature · 1 line
2.16.2
#5 lore raw

Re: [PATCH v2] Makefile.am: Add `all_video` to `default_payload.elf`

Dear GRUB folks,

Am Mittwoch, den 21.03.2018, 09:28 +0100 schrieb Paul Menzel:

Quoted 23 lines

From a199bc1f64e33aa942b23fe6d16670cc6002bb6c Mon Sep 17 00:00:00 2001
From: Paul Menzel <[email protected]>
Date: Sun, 16 Apr 2017 21:02:58 +0200
Subject: [PATCH] Makefile.am: Add all_video to default_payload.elf

The module all_video is used in util/grub.d/00_header.in, and included for grub-pc by default.

To make it easier to load such a GRUB configuration from disk with a GRUB coreboot payload, add this module also to default_payload.elf by default. That avoids a missing module error by GRUB, forcing the user to hit enter during the start process.
---
v2: Resend and fix typo in commit message.

 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile.am +0 -0
index 7795baeb6..80a787e57 100644

Makefile.am bootcheck: $(BOOTCHECKS) · line 430

Quoted 8 lines
Makefile.am +1 -1
@@ -424,7 +424,7 @@ bootcheck: $(BOOTCHECKS)
 if COND_i386_coreboot
 default_payload.elf: grub-mkstandalone grub-mkimage FORCE
 	test -f $@ && rm $@ || true
-	pkgdatadir=. ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o $@ --modules='ahci pata ehci uhci ohci usb_keyboard usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs' --install-modules='ls linux search configfile normal cbtime cbls memrw iorw minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu $(shell cat grub-core/fs.lst) password_pbkdf2 $(EXTRA_PAYLOAD_MODULES)' --fonts= --themes= --locales= -d grub-core/ /boot/grub/grub.cfg=$(srcdir)/coreboot.cfg
+	pkgdatadir=. ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o $@ --modules='ahci pata ehci uhci ohci usb_keyboard usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs' --install-modules='ls linux search configfile normal cbtime cbls memrw iorw minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu all_video $(shell cat grub-core/fs.lst) password_pbkdf2 $(EXTRA_PAYLOAD_MODULES)' --fonts= --themes= --locales= -d grub-core/ /boot/grub/grub.cfg=$(srcdir)/coreboot.cfg
 endif
 
 endif

Can you please commit this to the master branch?

Thanks,

Paul

#6 lore raw

Re: [PATCH v2] Makefile.am: Add `all_video` to `default_payload.elf`

Quoted 34 lines · Paul Menzel

Dear GRUB folks,

Am Mittwoch, den 21.03.2018, 09:28 +0100 schrieb Paul Menzel:

Quoted 30 lines

From a199bc1f64e33aa942b23fe6d16670cc6002bb6c Mon Sep 17 00:00:00 2001
From: Paul Menzel <[email protected]>
Date: Sun, 16 Apr 2017 21:02:58 +0200
Subject: [PATCH] Makefile.am: Add all_video to default_payload.elf

The module all_video is used in util/grub.d/00_header.in, and included for grub-pc by default.

To make it easier to load such a GRUB configuration from disk with a GRUB coreboot payload, add this module also to default_payload.elf by default. That avoids a missing module error by GRUB, forcing the user to hit enter during the start process.
---
v2: Resend and fix typo in commit message.

 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile.am +1 -1
index 7795baeb6..80a787e57 100644
@@ -424,7 +424,7 @@ bootcheck: $(BOOTCHECKS)
 if COND_i386_coreboot
 default_payload.elf: grub-mkstandalone grub-mkimage FORCE
 	test -f $@ && rm $@ || true
-	pkgdatadir=. ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o $@ --modules='ahci pata ehci uhci ohci usb_keyboard usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs' --install-modules='ls linux search configfile normal cbtime cbls memrw iorw minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu $(shell cat grub-core/fs.lst) password_pbkdf2 $(EXTRA_PAYLOAD_MODULES)' --fonts= --themes= --locales= -d grub-core/ /boot/grub/grub.cfg=$(srcdir)/coreboot.cfg
+	pkgdatadir=. ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o $@ --modules='ahci pata ehci uhci ohci usb_keyboard usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs' --install-modules='ls linux search configfile normal cbtime cbls memrw iorw minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu all_video $(shell cat grub-core/fs.lst) password_pbkdf2 $(EXTRA_PAYLOAD_MODULES)' --fonts= --themes= --locales= -d grub-core/ /boot/grub/grub.cfg=$(srcdir)/coreboot.cfg
 endif
 
Quoted 3 lines

Makefile.am bootcheck: $(BOOTCHECKS) · line 430

Quoted 1 line
Makefile.am +0 -0
 endif

Can you please commit this to the master branch?

LGTM. Could you rebase and repost it?

Daniel

#7 lore raw

PATCH v3 1/1 Makefile.am: Add `all_video` to `default_payload.elf`

Date: Sun, 16 Apr 2017 21:02:58 +0200

The module all_video is used in util/grub.d/00_header.in, and included for grub-pc by default.

To make it easier to load such a GRUB configuration from disk with a GRUB built as a coreboot payload, add this module also to default_payload.elf by default. That avoids a missing module error by GRUB, forcing the user to hit enter during the start process.

error: file `/boot/grub/i386-coreboot/all_video.mod' not found.

---
 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile.am +1 -1
index 7795baeb6..80a787e57 100644
@@ -424,7 +424,7 @@ bootcheck: $(BOOTCHECKS)
 if COND_i386_coreboot
 default_payload.elf: grub-mkstandalone grub-mkimage FORCE
 	test -f $@ && rm $@ || true
-	pkgdatadir=. ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o $@ --modules='ahci pata ehci uhci ohci usb_keyboard usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs' --install-modules='ls linux search configfile normal cbtime cbls memrw iorw minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu $(shell cat grub-core/fs.lst) password_pbkdf2 $(EXTRA_PAYLOAD_MODULES)' --fonts= --themes= --locales= -d grub-core/ /boot/grub/grub.cfg=$(srcdir)/coreboot.cfg
+	pkgdatadir=. ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o $@ --modules='ahci pata ehci uhci ohci usb_keyboard usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs' --install-modules='ls linux search configfile normal cbtime cbls memrw iorw minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu all_video $(shell cat grub-core/fs.lst) password_pbkdf2 $(EXTRA_PAYLOAD_MODULES)' --fonts= --themes= --locales= -d grub-core/ /boot/grub/grub.cfg=$(srcdir)/coreboot.cfg
 endif
 
 endif
Signature · 1 line
2.18.0
#8 lore raw

Re: [PATCH v3] Makefile.am: Add `all_video` to `default_payload.elf`

Quoted 5 lines · Paul Menzel

Date: Sun, 16 Apr 2017 21:02:58 +0200

The module all_video is used in util/grub.d/00_header.in, and included for grub-pc by default.

Quoted 7 lines

To make it easier to load such a GRUB configuration from disk with a GRUB built as a coreboot payload, add this module also to default_payload.elf by default. That avoids a missing module error by GRUB, forcing the user to hit enter during the start process.

error: file `/boot/grub/i386-coreboot/all_video.mod' not found.

Lack of of SOB... :-((( Otherwise LGTM. If I get your SOB in a reply to this email or something like that then I will get this patch...

Daniel

#9 lore raw

Re: [PATCH v3] Makefile.am: Add `all_video` to `default_payload.elf`

Unfortunately this pulls in some problematic graphics drivers that shouldn't be in default payload

Quoted 24 lines · On Thu, 6 Sep 2018, 14:59 Daniel Kiper, <[email protected]> wrote:
Quoted 5 lines · Paul Menzel

Date: Sun, 16 Apr 2017 21:02:58 +0200

The module all_video is used in util/grub.d/00_header.in, and included for grub-pc by default.

Quoted 7 lines

To make it easier to load such a GRUB configuration from disk with a GRUB built as a coreboot payload, add this module also to default_payload.elf by default. That avoids a missing module error by GRUB, forcing the user to hit enter during the start process.

error: file `/boot/grub/i386-coreboot/all_video.mod' not found.

Lack of of SOB... :-((( Otherwise LGTM. If I get your SOB in a reply to this email or something like that then I will get this patch...

Daniel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#10 lore raw

Re: [PATCH v3] Makefile.am: Add `all_video` to `default_payload.elf`

Quoted 2 lines · Vladimir 'phcoder' Serbinenko

Unfortunately this pulls in some problematic graphics drivers that shouldn't be in default payload

Which ones?

Daniel

#11 lore raw

Re: [PATCH v3] Makefile.am: Add `all_video` to `default_payload.elf`

Quoted 5 lines · Daniel Kiper
Quoted 2 lines · Vladimir 'phcoder' Serbinenko

Unfortunately this pulls in some problematic graphics drivers that shouldn't be in default payload

Which ones?

I have vbe, vga, video_bochs and video_cirrus for i386-pc and efi_gop, efi_uga, video_bochs and video_cirrus for x86_64-efi. I do not see anything scary. Do you?

Daniel

#12 lore raw

Re: [PATCH v3] Makefile.am: Add `all_video` to `default_payload.elf`

Quoted 10 lines · Daniel Kiper
Quoted 5 lines · Daniel Kiper
Quoted 2 lines · Vladimir 'phcoder' Serbinenko

Unfortunately this pulls in some problematic graphics drivers that shouldn't be in default payload

Which ones?

I have vbe, vga, video_bochs and video_cirrus for i386-pc and efi_gop, efi_uga, video_bochs and video_cirrus for x86_64-efi. I do not see anything scary. Do you?

If I get SOB for the patch, Paul?, and there are no objections in a week or so I will apply it. In the worst case we can revert it.

Daniel

#13 lore raw

Re: [PATCH v3] Makefile.am: Add `all_video` to `default_payload.elf`

Dear Daniel,

Quoted 11 lines · Daniel Kiper
Quoted 10 lines · Daniel Kiper
Quoted 5 lines · Daniel Kiper
Quoted 2 lines · Vladimir 'phcoder' Serbinenko

Unfortunately this pulls in some problematic graphics drivers that shouldn't be in default payload

Which ones?

I have vbe, vga, video_bochs and video_cirrus for i386-pc and efi_gop, efi_uga, video_bochs and video_cirrus for x86_64-efi. I do not see anything scary. Do you?

It looks like there are no video modes displayed when using GRUB as a coreboot payload.

Quoted 2 lines

If I get SOB for the patch, Paul?, and there are no objections in a week or so I will apply it. In the worst case we can revert it.

I’ll try to reproduce my issue with QEMU, and post the instructions here.

Kind regards,

Paul