Discussion:
`all_video.mod` missing loading `grub.cfg` generated by grub-pc in GRUB payload (coreboot)
(too old to reply)
Paul Menzel
2017-04-15 10:25:54 UTC
Permalink
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
Andrei Borzenkov
2017-04-15 11:22:51 UTC
Permalink
Post by Paul Menzel
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.
...
Post by Paul Menzel
Do you know of a way to make that compatible with grub-pc and GRUB
payload?
Include all_video in coreboot payload?
Paul Menzel
2017-04-16 19:31:30 UTC
Permalink
Dear Andrei,
Post by Andrei Borzenkov
Post by Paul Menzel
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.
...
Post by Paul Menzel
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
Paul Menzel
2017-04-16 21:45:05 UTC
Permalink
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(-)

diff --git a/Makefile.am b/Makefile.am
index 7795baeb6..80a787e57 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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
--
2.11.0
Paul Menzel
2018-03-21 08:28:01 UTC
Permalink
From a199bc1f64e33aa942b23fe6d16670cc6002bb6c Mon Sep 17 00:00:00 2001
From: Paul Menzel <***@users.sourceforge.net>
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(-)

diff --git a/Makefile.am b/Makefile.am
index 7795baeb6..80a787e57 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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
--
2.16.2
Paul Menzel
2018-04-23 19:45:02 UTC
Permalink
Dear GRUB folks,
Post by Paul Menzel
From a199bc1f64e33aa942b23fe6d16670cc6002bb6c Mon Sep 17 00:00:00 2001
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(-)
diff --git a/Makefile.am b/Makefile.am
index 7795baeb6..80a787e57 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -424,7 +424,7 @@ bootcheck: $(BOOTCHECKS)
if COND_i386_coreboot
default_payload.elf: grub-mkstandalone grub-mkimage FORCE
endif
endif
Can you please commit this to the master branch?


Thanks,

Paul
Daniel Kiper
2018-04-24 10:20:06 UTC
Permalink
Post by Paul Menzel
Dear GRUB folks,
Post by Paul Menzel
From a199bc1f64e33aa942b23fe6d16670cc6002bb6c Mon Sep 17 00:00:00 2001
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(-)
diff --git a/Makefile.am b/Makefile.am
index 7795baeb6..80a787e57 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -424,7 +424,7 @@ bootcheck: $(BOOTCHECKS)
if COND_i386_coreboot
default_payload.elf: grub-mkstandalone grub-mkimage FORCE
endif
endif
Can you please commit this to the master branch?
LGTM. Could you rebase and repost it?

Daniel
Paul Menzel
2018-08-09 06:20:07 UTC
Permalink
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(-)

diff --git a/Makefile.am b/Makefile.am
index 7795baeb6..80a787e57 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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
--
2.18.0
Daniel Kiper
2018-09-06 12:58:19 UTC
Permalink
Post by 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.
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
Vladimir 'phcoder' Serbinenko
2018-09-06 13:07:57 UTC
Permalink
Unfortunately this pulls in some problematic graphics drivers that
shouldn't be in default payload
Post by Daniel Kiper
Post by 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.
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
https://lists.gnu.org/mailman/listinfo/grub-devel
Daniel Kiper
2018-09-06 13:21:24 UTC
Permalink
Post by Vladimir 'phcoder' Serbinenko
Unfortunately this pulls in some problematic graphics drivers that
shouldn't be in default payload
Which ones?

Daniel
Daniel Kiper
2018-09-19 16:12:18 UTC
Permalink
Post by Daniel Kiper
Post by 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
Daniel Kiper
2018-09-27 16:52:30 UTC
Permalink
Post by Daniel Kiper
Post by Daniel Kiper
Post by 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
Paul Menzel
2018-10-01 09:00:51 UTC
Permalink
Dear Daniel,
Post by Daniel Kiper
Post by Daniel Kiper
Post by Daniel Kiper
Post by 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.
Post by Daniel Kiper
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

Continue reading on narkive:
Loading...