Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 452252

Summary: Ebuild providing UEFI shell binary (from tianocore) would be useful
Product: Gentoo Linux Reporter: Martin Pluskal <martin>
Component: New packagesAssignee: Default Assignee for New Packages <maintainer-wanted>
Status: UNCONFIRMED ---    
Severity: enhancement CC: nikoli, spookyghost
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=ShellPkg
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: 2014 sp1 p1 ebuild
live ebuild
uefi-shell-2017.ebuild

Description Martin Pluskal 2013-01-15 13:07:14 UTC
UEFI shell, which provides ability to access/configure uefi is already provided by other distributions (see https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface#UEFI_Shell).
Comment 1 Spooky Ghost 2015-03-21 21:42:25 UTC
Created attachment 399418 [details]
2014 sp1 p1 ebuild
Comment 2 Spooky Ghost 2015-03-21 21:42:44 UTC
Created attachment 399420 [details]
live ebuild
Comment 3 Spooky Ghost 2015-03-21 21:54:41 UTC
Status:

The ebuilds compile and install a shellx64.efi / shellia32.efi file to /boot/efi.  I have not:

- tested the resulting binaries
- adapted the ebuild for alternate supported architectures (arm / arm64) but this should be straightforward.

Since /boot/efi must be a separate file system from / the mount-boot eclass should be modified to ensure it is present or a new eclass introduced to help.
Comment 4 Spooky Ghost 2015-03-24 12:02:08 UTC
I have tested the resulting file in a xen virtual machine with USE="ovmf".  My system has xen-4.5 installed.  The virtual disk has a gpt partition table with one partition of type EF00 formatted with mkfs -t vfat.  The shellx64.efi file is copied on to this partition as EFI/Boot/bootx64.efi.

The xen config is:

name = "efihvm"
builder = "hvm"
disk = [
  "file:/tmp/xentest/efihvm.img,hda,w"
]
boot = "c"
memory = 1024
vcpus = 2
vfb = [
    "vnc=true"
]
device_model_override = "/usr/bin/qemu-system-x86_64"
device_model_version = "qemu-xen"
bios = "ovmf"
vnc = 1
vnclisten = "0.0.0.0"
vncunused = 1
keymap = "en-gb"
serial = "pty"

Now I just need to get my physical hardware to work with it...
Comment 5 charles17 2017-08-30 07:43:35 UTC

(In reply to Spooky Ghost from comment #2)
> Created attachment 399420 [details]
> live ebuild

Could you please update according to the new url?
https://github.com/tianocore/edk2/tree/master/ShellBinPkg
https://github.com/tianocore/edk2/tree/master/ShellPkg
Comment 6 Spooky Ghost 2017-09-17 07:59:17 UTC
Created attachment 494806 [details]
uefi-shell-2017.ebuild

Updated to new url as per comment #5.  Combined live and release ebuilds in a style similar to other packages.  Also modified some of the src_prepare steps to suit GCC 5.