[FS#515] (x86_64) No support for generic EFI framebuffer

LEDE Bugs lede-bugs at lists.infradead.org
Tue Feb 14 11:32:56 PST 2017


A new Flyspray task has been opened.  Details are below. 

User who did this - alive4ever (alive4ever) 

Attached to Project - LEDE Project
Summary - (x86_64) No support for generic EFI framebuffer
Task Type - Bug Report
Category - Kernel
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - Low
Priority - Very Low
Reported Version - Trunk
Due in Version - Undecided
Due Date - Undecided
Details - There is no display on the vga console when booting LEDE x86/64 generic on UEFI - chainloaded via grubx64-standalone.efi - on Qemu with EDK II OVMF.

To reproduce this, manual steps are needed, since LEDE image for x86_64 doesn't support native UEFI boot.
1. Create a disk image:
$ qemu-img create -f raw lede-test.img 512M
2. Setup the disk image as loop device.
# losetup -f lede-test.img
3. Create 2 partitions, a 100MB vfat partition to hold efi files and an ext3 partition to hold root filesystem. MBR is assumed. parted/gparted can be used in place of fdisk.
# fdisk /dev/loop0
# mkfs.vfat /dev/loop0p1
# mkfs.ext3 /dev/loop0p2
4. Mount vfat partition somewhere, for example on /mnt/boot
# mkdir /mnt/boot && mount /dev/loop0p1 /mnt/boot
5. Create EFI directory inside /mnt/boot
# mkdir -p /mnt/boot/EFI/BOOT
6. Mount ext3 partition somewhere, such as /mnt/rootfs
# mkdir /mnt/rootfs && mount /dev/loop0p2 /mnt/rootfs
7. Generate a standalone grub efi image.
grub2-mkstandalone --modules="part_msdos part_gpt" --format=x86_64-efi --output=/mnt/boot/EFI/BOOT/BOOTX64.EFI
5. Put LEDE kernel on the boot partition.
/mnt/boot/lede-x86-64-vmlinuz
6. Extract LEDE rootfs on the rootfs partition.
# tar -C /mnt/rootfs -xf lede-x86-64-generic-rootfs.tar.gz
7. Unmount the directories.
# umount -v /mnt/rootfs /mnt/boot
8. Detach the disk image from loop device.
# losetup -d /dev/loop0
9. Launch QEMU with UEFI firmware (OVMF_CODE.fd can be extracted from rpm file on https://www.kraxel.org/repos/jenkins/edk2/)
$ qemu-system-x86_64 -enable-kvm -m 512M -drive file=lede-test.img,format=raw -bios /usr/share/edk2/ovmf/OVMF_CODE.fd -serial stdio
10. On the grub prompt, type the following

insmod efi_gop
insmod efi_uga
insmod video_bochs
insmod video_cirrus
insmod gfxterm
terminal_input console
terminal_output console gfxterm
set gfxpayload=keep

linux (hd0,msdos1)/lede-x86_64-vmlinuz root=/dev/sda2 rootfstype=ext3 rootwait noinitrd console=tty0 console=ttyS0,115200n8

boot

LEDE will boot, but no output shown on the VGA display. The only output is shown on the serial console.

Enabling CONFIG_FB_EFI for x86/64 target is needed to display graphical output on the EFI framebuffer.



More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=515



More information about the lede-bugs mailing list