summaryrefslogtreecommitdiff
path: root/sys-firmware/seabios
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-firmware/seabios
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-firmware/seabios')
-rw-r--r--sys-firmware/seabios/Manifest20
-rw-r--r--sys-firmware/seabios/files/seabios/README1
-rw-r--r--sys-firmware/seabios/files/seabios/config.seabios-128k12
-rw-r--r--sys-firmware/seabios/files/seabios/config.seabios-256k3
-rw-r--r--sys-firmware/seabios/files/seavgabios/README1
-rw-r--r--sys-firmware/seabios/files/seavgabios/config.vga-cirrus3
-rw-r--r--sys-firmware/seabios/files/seavgabios/config.vga-isavga3
-rw-r--r--sys-firmware/seabios/files/seavgabios/config.vga-qxl6
-rw-r--r--sys-firmware/seabios/files/seavgabios/config.vga-stdvga3
-rw-r--r--sys-firmware/seabios/files/seavgabios/config.vga-virtio6
-rw-r--r--sys-firmware/seabios/files/seavgabios/config.vga-vmware6
-rw-r--r--sys-firmware/seabios/metadata.xml20
-rw-r--r--sys-firmware/seabios/seabios-1.10.1.ebuild142
-rw-r--r--sys-firmware/seabios/seabios-1.10.2.ebuild140
14 files changed, 366 insertions, 0 deletions
diff --git a/sys-firmware/seabios/Manifest b/sys-firmware/seabios/Manifest
new file mode 100644
index 000000000000..509bb42eae0f
--- /dev/null
+++ b/sys-firmware/seabios/Manifest
@@ -0,0 +1,20 @@
+AUX seabios/README 56 SHA256 d4e1b5815b0166c52f5fdfd7ac8db2fd1398cf530394bf5937dfbda55135db21 SHA512 910bc29b89fd0821c9be7d60742ce80fd62194d78fd50902e1ba93a7322c897518ee606c76e39c71489f48c890e50d07aedd3ec059a9e3632eafdd7ebcea8074 WHIRLPOOL 6e928e7dbe1afbfd1a5ccb1009c0d98081cd099cf79b8eea067011e942ed7f6f5f3bca65e5a8cd38f0b786d7fca11aa8b51f7f1c1b11bc3879914a3facbf48ba
+AUX seabios/config.seabios-128k 272 SHA256 1d1bb7722077ac7e2d85dd190392638ce7c4d08b74f1d0cd3530e563d0d6b789 SHA512 8fe1496de0410b0f0c1a9d5af7d28c667eb31a0f8bc5374e73ebac9e136494056add96b1f0cceee681a4b6635d8ca9b36d941b04af78f43b558dfb53ff0479ae WHIRLPOOL 4231e2420b45531cc413b6f658554e803aacf2829eeee6f3ff572cd80b3b983d52ec5a1cb26495a1827e4a3749b7fedf087ad527982f81094a972249b4864361
+AUX seabios/config.seabios-256k 71 SHA256 8b14f70d5cf5e9fbe3b81a051149bb6d89e1786bae7fb6e6ed78bbe699a30834 SHA512 3d41739944da088edafb3ea298c0d3db59ed638b614c258209a30635caccf86a284f03492612694e3a56f40357743a0a36053e8ec11b7d93853b91ba9e5a502f WHIRLPOOL b994adf83032690fc6a4a32e080ba4a49c9f78cc44d4f25a45ffed936709d98ec6c8105f762c6be4d29cbbeee7f346420d879c6efe817eacbee54de6fd01321a
+AUX seavgabios/README 56 SHA256 d4e1b5815b0166c52f5fdfd7ac8db2fd1398cf530394bf5937dfbda55135db21 SHA512 910bc29b89fd0821c9be7d60742ce80fd62194d78fd50902e1ba93a7322c897518ee606c76e39c71489f48c890e50d07aedd3ec059a9e3632eafdd7ebcea8074 WHIRLPOOL 6e928e7dbe1afbfd1a5ccb1009c0d98081cd099cf79b8eea067011e942ed7f6f5f3bca65e5a8cd38f0b786d7fca11aa8b51f7f1c1b11bc3879914a3facbf48ba
+AUX seavgabios/config.vga-cirrus 60 SHA256 888ad874052d301981a8cc6fa4bc72b1edd14ba937e7de113f71ce3fd2f8c253 SHA512 e9ef2d6bec9419e69bc90adf1a4bb7c174284cd722e53903deea0411f88074cc247069116e03e124715072ec82f153cf6014168febba41369a2569983d3265b6 WHIRLPOOL 6bc9abab432867d2d229f489e1f65471133c2bb6960d1d7e8523f6257f9abf1fbf43dd00054308235ae0a3162b359739ba4e903dba5758fed9b65d8ae482fc0a
+AUX seavgabios/config.vga-isavga 59 SHA256 5826ec704d4e4bb57089e0cbb72e7e5ccd31b7192d81084665cd4faeecb60b04 SHA512 aada61232f4834c1e9bec921b1e1365ce5ecb4adf42c659f34cdf051efb56f0ec2e62f0ccf66bb25d9bb0b8601e2df49b712265f19185068d45353c3aacf1cd9 WHIRLPOOL 41c5c36a610f04ffe56213e330d6a84be5c76811d25edbf2e4d1d33a74e75cc3aacb9c59bf0e78fc094876c6a436145efd97929a8bdb660677fd4d5caf1cfff9
+AUX seavgabios/config.vga-qxl 128 SHA256 26e43ea5e98615d11573b2619f3fb3c1933d5f810e6a2c44218d99465cc3ae77 SHA512 9ebcb6702cf28685daf1821be26bab8ddc791ef2c118217c984c03c5fb77c8b9691c0fa6931367a63b8d97d67c973cd4b620fe9ca9c76da51a9b2ab3b4b5653b WHIRLPOOL 6e38c9e5f91279694de4204abd1de16b2ef1c5f239df110151caa876cbdb6fb48148912e4c4f7952bea18e56c09a875e7062e8f27eabeb7e500480f6d2183000
+AUX seavgabios/config.vga-stdvga 59 SHA256 ca7367ae57665fa01e0ebb741ba5823d646f4b65a9a87657ea163cc9f362a8a8 SHA512 4a1b7fcc729d78dc8fd4e73d1cb6258ed9d49f8a91e6e00cc184e07c89a304f8d38ef5446d1c4ba5e8e929c82693d82c21526e42992ad6e1a008f39bb7c90448 WHIRLPOOL 51413383c35f77abd179050b86b6e84edf0a14e3b6ecb9d60521f9ff0cad0cd5059e10d8fbfed7084b628957e2871d9ae6addc6e5e24d8ff16bc9ab5b32c809d
+AUX seavgabios/config.vga-virtio 128 SHA256 afa7d59e1c18ed770cf0e83e3d5dc70866f75fdde83064fbea6e115f79504066 SHA512 4d627be11d79f0b8bd814a49e608826375aba6b59a0189dcba9afe24a181347b92e6ab18e0d9199e2f7a78f8fb02f03dad84c63fbbc2ffe9af76777ef28c5f8a WHIRLPOOL 5ba65918c8034bbece5a8d2ac166a446ba0b608ef393f4d85654a56fb1b95e0d92604cadf75a4eeaa20b93b22be51d10b0e6aadc56ce77e40fd19eddc245d324
+AUX seavgabios/config.vga-vmware 128 SHA256 1bd31f16dd43fb25aa92f9816cbfaae4a19a8faf29ff52bd02429fbaafb78f57 SHA512 2a82f75ca6dbf48546ffa5a756136dd7085855d9411c3b37a74cc53281027b4916cf628dba784bcad915682d94705b5f8116f7a1b7ec6a99d9b2fb3fffba01c0 WHIRLPOOL 9b6b82f0b27d41a6cb5ef66c13f4c45559471f894a93be60f67d560f3adc8fe2fae062a5d41b7d437eafaaf0bba12488d33db6b7192ab73a1901ab4618a887d6
+DIST bios.bin-1.10.1.xz 63668 SHA256 39d39cfa8166d947439081dedebb8c79a159de9b8b5447afb4876416fcf17d9d SHA512 9e3ba9c7dac3f03f9c57898a993eab34f8f3fecb0ac4718f6d4d6b1a825651a255e48fb7dc29a339249f42668469946f238674cb1f8308cf9b4a3e1e82c346d3 WHIRLPOOL 1208730ef4ee8455fe1e051b3350463d458ccf734c0fdd12d06b91dd0edbb96b2e6ec7bcc5b37902a98465c73bbf327fc3c42b7f1587bae1871d4ab9a70f5e50
+DIST seabios-1.10.1.tar.gz 588092 SHA256 5063ddbac61ec4e61a12daa83931c37e5629b1c18502f7c00ed4e696c2a1d2cb SHA512 b2f1c2b15853b1cc949f741ae13f32fd133efb0d0917e1cdfb253f9cd0bc9bb0b42c592cdd87bc74ccbb12a4301c102ae723ccdb490ea4716e0c9dca3dd3fead WHIRLPOOL 723d4835288566bbb6a3c3b7df2486c0a7f949590404230667a4e4490317591bcdb99dd9b0933770d8c1416c25f6a8d20b153d7410787e19d8ecbd92a7312af9
+DIST seabios-1.10.2-bin.tar.xz 121172 SHA256 d32e349fcd865d447856be7d7034f47f1e1d11b413d4158f747d68d03175792b SHA512 a46ce389b8b0fe7182a3dc2954fab7e0ef27ac65823e3785c247ccf77c37eaa746d94f74a4a29a221aa16ab508cf07ec8d399aa612d5c0184b48bce24c663b69 WHIRLPOOL 17eaa7ecd4a126e4b021728ab5136d4a918e1ba413a8c56416eeb7202c9d5b1c3439ef2c528e8be3f863b3a218bcb2ffded0b1a037eee0eaf1fc52cb04f228c8
+DIST seabios-1.10.2.tar.gz 589283 SHA256 89c70b70fa7ab179694efb95c2c89d4f50a39381321cbed5d8302cb9b25e953d SHA512 ea8396fe247a3bd16b43ab775cf8e23f139673b94e83f450cadb094cc8117ca7e9ef518162d965209d5ab091c96f70ec5cc8ec8d15b638e06c4c8f7a0e1609dc WHIRLPOOL 1df63d9b5940d8e1b099f75ff090505088104dc0d599ba9403c5ceb2caabf0f92023ae5bebe06ee5ad95d44e22ae540b0c9d9000fa7859801044ccd999d6efce
+DIST seavgabios-bin-1.10.1.tar.xz 20408 SHA256 88c310f2f1ddbbca3e00f8895706b3df718046bd729ab719c4e4bd01f502bd6d SHA512 7fe97efaf61c2d1e72c8df27b5108c80f6a51f5a7370de68720b0f71abe05ae5765dd867d127df2fa6182b5d4702a9ef7549e7170fec5071b31a6066db20c219 WHIRLPOOL 484c2f0302bf232e8065ec8cc1566731a962a2f76e01df2b7b21611b3c3ab47b04f1de192a3675130942a42c97f78e210d14ac2e36a7c36d8c28eff4e1618abc
+EBUILD seabios-1.10.1.ebuild 3444 SHA256 6e7a454cbb307700e190cd0e4506460ee9e4d075d4a231d91828ef2f9bc9b9fc SHA512 6344ad74bebcb1752221d26fd22905a37ed3e4e70836f2916677088dc3add02546a423f4e97b49d9a837de9882d888dfb3dd5b49f249c2e0e0f9bff62fda7b69 WHIRLPOOL 1b62a53a58d627eba7e38bf9b1e889ebbcfc17a54c51812453e2162cc2dfa0e8fd790475115a198d4e14c3ed224fbd378672c2a09b3a4d043ebd008d6a73b08c
+EBUILD seabios-1.10.2.ebuild 3409 SHA256 304de4704c3fc62fc3214ff5c3d5822e86131fca2426256a7d3b95582cb29b8f SHA512 256ea6d7a2ebd861affe1f9dc5f8e02b7e0fd90cfb82433bcf24e419e2644a540d9b51d8ecc1db3e659b7bbe0170f58f6c878436214c32c04710fd055dd8dbfe WHIRLPOOL f60d8de718cfb38fd38f62a937655c50d11cf24bb7d043d19323d342243f967353e29577fc764f78ae95ce7fbb881990c2f3a9b78df0bcbece7b6cab34db0241
+MISC ChangeLog 5067 SHA256 6288193e8f1466e9c49191c07c159d70c1dd4fe6618a402632460e7b75aa6e2f SHA512 9a5f148a05d9c2e921c2b63380458e56459d7f4253efd93040e6c75181244004813a77a8baa6bca96a5d51f64bdffec4f73ff8ec2acab42af81eb7a431ef50ea WHIRLPOOL cf85fac3fe221f6b074c2f0bbac2fe0952302f2e1607297e53f8291e71520835df14c4bc4f72f8e133755185c5687d2588e446125b5f3b4eb1129e16eb3db9f5
+MISC ChangeLog-2015 8390 SHA256 530d9871189cee67fdaddbd80e05173b54c461296a692bcc51d87a46d54ab1f8 SHA512 c04a589afbf87445abe1935c9a9bbad8b759d68c1b3d38ee9ccaac2625c0520072b3e12277fa43562d0b7f95957500a784c8126dde4440fa5fee8922ccec8429 WHIRLPOOL 5adf523f244a96c2bee80bc1f13102584e3a928108e929fe76b2212504a6dcefeac7c5872c4e9d2eae4a9fabeb37519fa7182c2c5b4c6516b15822748e6f40d2
+MISC metadata.xml 663 SHA256 602c6f6301147529642acfd8e289b411cb64ebe0e38d0b5c4d0a8207817a5720 SHA512 a3b306f0cfc8d0c2f31757b3b141c532dc5ee1fea7c01b7d23e6643977e63aee90a007875f1e34fb3f212c2dc1e23e4400f092b1d288f325abead33a9cfa66fa WHIRLPOOL abbd51716806d0fe649100b7abfbc5c237983cea5f73f28fa98d190527b6e5293171e6e0efb5304a3cbf8febbe470f4de943574959820604e4ab4f1b87ce9fba
diff --git a/sys-firmware/seabios/files/seabios/README b/sys-firmware/seabios/files/seabios/README
new file mode 100644
index 000000000000..7030949c1810
--- /dev/null
+++ b/sys-firmware/seabios/files/seabios/README
@@ -0,0 +1 @@
+The config.vga-xxx files come from the qemu/roms/ tree.
diff --git a/sys-firmware/seabios/files/seabios/config.seabios-128k b/sys-firmware/seabios/files/seabios/config.seabios-128k
new file mode 100644
index 000000000000..93203af0ded7
--- /dev/null
+++ b/sys-firmware/seabios/files/seabios/config.seabios-128k
@@ -0,0 +1,12 @@
+# for qemu machine types 1.7 + older
+# need to turn off features (xhci,uas) to make it fit into 128k
+CONFIG_QEMU=y
+CONFIG_ROM_SIZE=128
+CONFIG_BOOTSPLASH=n
+CONFIG_XEN=n
+CONFIG_USB_OHCI=n
+CONFIG_USB_XHCI=n
+CONFIG_USB_UAS=n
+CONFIG_SDCARD=n
+CONFIG_TCGBIOS=n
+CONFIG_MPT_SCSI=n
diff --git a/sys-firmware/seabios/files/seabios/config.seabios-256k b/sys-firmware/seabios/files/seabios/config.seabios-256k
new file mode 100644
index 000000000000..65e5015c2f14
--- /dev/null
+++ b/sys-firmware/seabios/files/seabios/config.seabios-256k
@@ -0,0 +1,3 @@
+# for qemu machine types 2.0 + newer
+CONFIG_QEMU=y
+CONFIG_ROM_SIZE=256
diff --git a/sys-firmware/seabios/files/seavgabios/README b/sys-firmware/seabios/files/seavgabios/README
new file mode 100644
index 000000000000..7030949c1810
--- /dev/null
+++ b/sys-firmware/seabios/files/seavgabios/README
@@ -0,0 +1 @@
+The config.vga-xxx files come from the qemu/roms/ tree.
diff --git a/sys-firmware/seabios/files/seavgabios/config.vga-cirrus b/sys-firmware/seabios/files/seavgabios/config.vga-cirrus
new file mode 100644
index 000000000000..c8fe58239f84
--- /dev/null
+++ b/sys-firmware/seabios/files/seavgabios/config.vga-cirrus
@@ -0,0 +1,3 @@
+CONFIG_BUILD_VGABIOS=y
+CONFIG_VGA_CIRRUS=y
+CONFIG_VGA_PCI=y
diff --git a/sys-firmware/seabios/files/seavgabios/config.vga-isavga b/sys-firmware/seabios/files/seavgabios/config.vga-isavga
new file mode 100644
index 000000000000..e55e294a0c0a
--- /dev/null
+++ b/sys-firmware/seabios/files/seavgabios/config.vga-isavga
@@ -0,0 +1,3 @@
+CONFIG_BUILD_VGABIOS=y
+CONFIG_VGA_BOCHS=y
+CONFIG_VGA_PCI=n
diff --git a/sys-firmware/seabios/files/seavgabios/config.vga-qxl b/sys-firmware/seabios/files/seavgabios/config.vga-qxl
new file mode 100644
index 000000000000..d393f0c34fd2
--- /dev/null
+++ b/sys-firmware/seabios/files/seavgabios/config.vga-qxl
@@ -0,0 +1,6 @@
+CONFIG_BUILD_VGABIOS=y
+CONFIG_VGA_BOCHS=y
+CONFIG_VGA_PCI=y
+CONFIG_OVERRIDE_PCI_ID=y
+CONFIG_VGA_VID=0x1b36
+CONFIG_VGA_DID=0x0100
diff --git a/sys-firmware/seabios/files/seavgabios/config.vga-stdvga b/sys-firmware/seabios/files/seavgabios/config.vga-stdvga
new file mode 100644
index 000000000000..7d063b787cd9
--- /dev/null
+++ b/sys-firmware/seabios/files/seavgabios/config.vga-stdvga
@@ -0,0 +1,3 @@
+CONFIG_BUILD_VGABIOS=y
+CONFIG_VGA_BOCHS=y
+CONFIG_VGA_PCI=y
diff --git a/sys-firmware/seabios/files/seavgabios/config.vga-virtio b/sys-firmware/seabios/files/seavgabios/config.vga-virtio
new file mode 100644
index 000000000000..aa7a15ba1172
--- /dev/null
+++ b/sys-firmware/seabios/files/seavgabios/config.vga-virtio
@@ -0,0 +1,6 @@
+CONFIG_BUILD_VGABIOS=y
+CONFIG_VGA_BOCHS=y
+CONFIG_VGA_PCI=y
+CONFIG_OVERRIDE_PCI_ID=y
+CONFIG_VGA_VID=0x1af4
+CONFIG_VGA_DID=0x1050
diff --git a/sys-firmware/seabios/files/seavgabios/config.vga-vmware b/sys-firmware/seabios/files/seavgabios/config.vga-vmware
new file mode 100644
index 000000000000..eb10427afdd3
--- /dev/null
+++ b/sys-firmware/seabios/files/seavgabios/config.vga-vmware
@@ -0,0 +1,6 @@
+CONFIG_BUILD_VGABIOS=y
+CONFIG_VGA_BOCHS=y
+CONFIG_VGA_PCI=y
+CONFIG_OVERRIDE_PCI_ID=y
+CONFIG_VGA_VID=0x15ad
+CONFIG_VGA_DID=0x0405
diff --git a/sys-firmware/seabios/metadata.xml b/sys-firmware/seabios/metadata.xml
new file mode 100644
index 000000000000..584d4b560568
--- /dev/null
+++ b/sys-firmware/seabios/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>cardoe@gentoo.org</email>
+ <name>Doug Goldstein</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>qemu@gentoo.org</email>
+ <name>Gentoo QEMU Project</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>virtualization@gentoo.org</email>
+ <name>Gentoo Virtualization Project</name>
+ </maintainer>
+ <use>
+ <flag name="binary">Use official upstream pre-built binaries</flag>
+ <flag name="seavgabios">Include SeaVGABIOS binaries (replacement for vgabios)</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-firmware/seabios/seabios-1.10.1.ebuild b/sys-firmware/seabios/seabios-1.10.1.ebuild
new file mode 100644
index 000000000000..c430395a16f8
--- /dev/null
+++ b/sys-firmware/seabios/seabios-1.10.1.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PYTHON_COMPAT=( python{2_7,3_{4,5}} )
+
+inherit eutils toolchain-funcs python-any-r1
+
+# SeaBIOS maintainers sometimes don't release stable tarballs or stable
+# binaries to generate the stable tarball the following is necessary:
+# git clone git://git.seabios.org/seabios.git && cd seabios
+# git archive --output seabios-${PV}.tar.gz --prefix seabios-${PV}/ rel-${PV}
+
+if [[ ${PV} == *9999* || -n "${EGIT_COMMIT}" ]] ; then
+ EGIT_REPO_URI="git://git.seabios.org/seabios.git"
+ inherit git-2
+else
+ KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd"
+ # Upstream hasn't released a new binary. We snipe ours from Fedora for now.
+ # https://code.coreboot.org/p/seabios/downloads/get/bios.bin-${PV}.gz
+ # http://fedora.mirror.lstn.net/
+ # http://download.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/Packages/s/
+ # seabios-bin-1.10.1-1.fc26.noarch.rpm
+ # seavgabios-bin-1.10.1-1.fc26.noarch.rpm
+ SRC_URI="!binary? ( https://code.coreboot.org/p/seabios/downloads/get/${P}.tar.gz )
+ binary? (
+ mirror://gentoo/bios.bin-${PV}.xz
+ seavgabios? ( mirror://gentoo/seavgabios-bin-${PV}.tar.xz )
+ )"
+fi
+
+DESCRIPTION="Open Source implementation of a 16-bit x86 BIOS"
+HOMEPAGE="https://www.seabios.org/"
+
+LICENSE="LGPL-3 GPL-3"
+SLOT="0"
+IUSE="+binary debug +seavgabios"
+
+REQUIRED_USE="debug? ( !binary )
+ !amd64? ( !x86? ( binary ) )"
+
+# The amd64/x86 check is needed to workaround #570892.
+SOURCE_DEPEND="
+ >=sys-power/iasl-20060912
+ ${PYTHON_DEPS}"
+DEPEND="
+ !binary? (
+ amd64? ( ${SOURCE_DEPEND} )
+ x86? ( ${SOURCE_DEPEND} )
+ )"
+RDEPEND=""
+
+pkg_pretend() {
+ if ! use binary; then
+ ewarn "You have decided to compile your own SeaBIOS. This is not"
+ ewarn "supported by upstream unless you use their recommended"
+ ewarn "toolchain (which you are not)."
+ elog
+ ewarn "If you are intending to use this build with QEMU, realize"
+ ewarn "you will not receive any support if you have compiled your"
+ ewarn "own SeaBIOS. Virtual machines subtly fail based on changes"
+ ewarn "in SeaBIOS."
+ fi
+}
+
+pkg_setup() {
+ use binary || python-any-r1_pkg_setup
+}
+
+src_unpack() {
+ default
+
+ # This simplifies the logic between binary & source builds.
+ mkdir -p "${S}"
+}
+
+src_prepare() {
+ use binary && return
+
+ epatch_user
+}
+
+src_configure() {
+ use binary && return
+
+ tc-ld-disable-gold #438058
+
+ if use debug ; then
+ echo "CONFIG_DEBUG_LEVEL=8" >.config
+ fi
+ _emake config
+}
+
+_emake() {
+ LANG=C \
+ emake V=1 \
+ CC="$(tc-getCC)" \
+ LD="$(tc-getLD)" \
+ AR="$(tc-getAR)" \
+ OBJCOPY="$(tc-getOBJCOPY)" \
+ RANLIB="$(tc-getRANLIB)" \
+ OBJDUMP="$(tc-getOBJDUMP)" \
+ HOST_CC="$(tc-getBUILD_CC)" \
+ VERSION="Gentoo/${EGIT_COMMIT:-${PVR}}" \
+ "$@"
+}
+
+src_compile() {
+ use binary && return
+
+ _emake out/bios.bin
+ mv out/bios.bin ../bios.bin
+
+ if use seavgabios ; then
+ local config t targets=(
+ cirrus
+ isavga
+ qxl
+ stdvga
+ virtio
+ vmware
+ )
+ for t in "${targets[@]}" ; do
+ emake clean distclean
+ cp "${FILESDIR}/seavgabios/config.vga-${t}" .config || die
+ _emake oldnoconfig
+ _emake out/vgabios.bin
+ cp out/vgabios.bin ../vgabios-${t}.bin || die
+ done
+ fi
+}
+
+src_install() {
+ insinto /usr/share/seabios
+ newins ../bios.bin* bios.bin
+
+ if use seavgabios ; then
+ insinto /usr/share/seavgabios
+ doins ../vgabios*.bin
+ fi
+}
diff --git a/sys-firmware/seabios/seabios-1.10.2.ebuild b/sys-firmware/seabios/seabios-1.10.2.ebuild
new file mode 100644
index 000000000000..d1513a29956f
--- /dev/null
+++ b/sys-firmware/seabios/seabios-1.10.2.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python{2_7,3_{4,5}} )
+
+inherit eutils toolchain-funcs python-any-r1
+
+# SeaBIOS maintainers sometimes don't release stable tarballs or stable
+# binaries to generate the stable tarball the following is necessary:
+# git clone git://git.seabios.org/seabios.git && cd seabios
+# git archive --output seabios-${PV}.tar.gz --prefix seabios-${PV}/ rel-${PV}
+
+if [[ ${PV} == *9999* || -n "${EGIT_COMMIT}" ]] ; then
+ EGIT_REPO_URI="git://git.seabios.org/seabios.git"
+ inherit git-r3
+else
+ KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd"
+
+ # Binary versions taken from fedora:
+ # http://download.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/Packages/s/
+ # seabios-bin-1.10.2-1.fc27.noarch.rpm
+ # seavgabios-bin-1.10.2-1.fc27.noarch.rpm
+ SRC_URI="
+ !binary? ( https://code.coreboot.org/p/seabios/downloads/get/${P}.tar.gz )
+ binary? ( https://dev.gentoo.org/~tamiko/distfiles/${P}-bin.tar.xz )"
+fi
+
+DESCRIPTION="Open Source implementation of a 16-bit x86 BIOS"
+HOMEPAGE="https://www.seabios.org/"
+
+LICENSE="LGPL-3 GPL-3"
+SLOT="0"
+IUSE="+binary debug +seavgabios"
+
+REQUIRED_USE="debug? ( !binary )
+ !amd64? ( !x86? ( binary ) )"
+
+# The amd64/x86 check is needed to workaround #570892.
+SOURCE_DEPEND="
+ >=sys-power/iasl-20060912
+ ${PYTHON_DEPS}"
+DEPEND="
+ !binary? (
+ amd64? ( ${SOURCE_DEPEND} )
+ x86? ( ${SOURCE_DEPEND} )
+ )"
+RDEPEND=""
+
+pkg_pretend() {
+ if ! use binary; then
+ ewarn "You have decided to compile your own SeaBIOS. This is not"
+ ewarn "supported by upstream unless you use their recommended"
+ ewarn "toolchain (which you are not)."
+ elog
+ ewarn "If you are intending to use this build with QEMU, realize"
+ ewarn "you will not receive any support if you have compiled your"
+ ewarn "own SeaBIOS. Virtual machines subtly fail based on changes"
+ ewarn "in SeaBIOS."
+ fi
+}
+
+pkg_setup() {
+ use binary || python-any-r1_pkg_setup
+}
+
+src_unpack() {
+ default
+
+ # This simplifies the logic between binary & source builds.
+ mkdir -p "${S}"
+}
+
+src_configure() {
+ use binary && return
+
+ tc-ld-disable-gold #438058
+
+ if use debug ; then
+ echo "CONFIG_DEBUG_LEVEL=8" >.config
+ fi
+ _emake config
+}
+
+_emake() {
+ LANG=C \
+ emake V=1 \
+ CC="$(tc-getCC)" \
+ LD="$(tc-getLD)" \
+ AR="$(tc-getAR)" \
+ OBJCOPY="$(tc-getOBJCOPY)" \
+ RANLIB="$(tc-getRANLIB)" \
+ OBJDUMP="$(tc-getOBJDUMP)" \
+ HOST_CC="$(tc-getBUILD_CC)" \
+ VERSION="Gentoo/${EGIT_COMMIT:-${PVR}}" \
+ "$@"
+}
+
+src_compile() {
+ use binary && return
+
+ for t in 128k 256k ; do
+ cp "${FILESDIR}/seabios/config.seabios-${t}" .config || die
+ _emake oldnoconfig
+ _emake out/bios.bin
+ mv out/bios.bin ../bios-${t}.bin || die
+ done
+
+ if use seavgabios ; then
+ local config t targets=(
+ cirrus
+ isavga
+ qxl
+ stdvga
+ virtio
+ vmware
+ )
+ for t in "${targets[@]}" ; do
+ emake clean distclean
+ cp "${FILESDIR}/seavgabios/config.vga-${t}" .config || die
+ _emake oldnoconfig
+ _emake out/vgabios.bin
+ cp out/vgabios.bin ../vgabios-${t}.bin || die
+ done
+ fi
+}
+
+src_install() {
+
+ insinto /usr/share/seabios
+ use binary && doins ../bios.bin
+ use !binary && newins ../bios-128k.bin bios.bin
+ doins ../bios-256k.bin
+
+ if use seavgabios ; then
+ insinto /usr/share/seavgabios
+ doins ../vgabios*.bin
+ fi
+}