public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Matthias Maier" <tamiko@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-firmware/seabios/
Date: Sun, 11 Nov 2018 21:14:08 +0000 (UTC)	[thread overview]
Message-ID: <1541970765.76f01453cc239c92f2ed624c02302a109f371e00.tamiko@gentoo> (raw)

commit:     76f01453cc239c92f2ed624c02302a109f371e00
Author:     Luke Dashjr <luke-jr+git <AT> utopios <DOT> org>
AuthorDate: Wed Jun 27 08:57:05 2018 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Sun Nov 11 21:12:45 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76f01453

sys-firmware/seabios: Actually use iasl to rebuild hex files

Fixed build to actually use sys-power/iasl (rather than using bundled
pre-compiled hex files). Generated hex files do not match, so to be sure,
I revbumped the ebuild version.

Closes: https://github.com/gentoo/gentoo/pull/9182
Signed-off-by: Luke Dashjr <luke-jr+git <AT> utopios.org>
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 sys-firmware/seabios/seabios-1.11.0-r1.ebuild | 145 ++++++++++++++++++++++++++
 1 file changed, 145 insertions(+)

diff --git a/sys-firmware/seabios/seabios-1.11.0-r1.ebuild b/sys-firmware/seabios/seabios-1.11.0-r1.ebuild
new file mode 100644
index 00000000000..ea838ed955e
--- /dev/null
+++ b/sys-firmware/seabios/seabios-1.11.0-r1.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python{2_7,3_{4,5,6}} )
+
+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_prepare() {
+	default
+
+	# Ensure precompiled iasl files are never used
+	find "${WORKDIR}" -name '*.hex' -delete || die
+}
+
+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)" \
+		AS="$(tc-getAS)" \
+		OBJCOPY="$(tc-getOBJCOPY)" \
+		RANLIB="$(tc-getRANLIB)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		HOST_CC="$(tc-getBUILD_CC)" \
+		VERSION="Gentoo/${EGIT_COMMIT:-${PVR}}" \
+		"$@"
+}
+
+src_compile() {
+	use binary && return
+
+	cp "${FILESDIR}/seabios/config.seabios-256k" .config || die
+	_emake oldnoconfig
+	_emake iasl
+	_emake out/bios.bin
+	mv out/bios.bin ../bios-256k.bin || die
+
+	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
+	doins ../bios-256k.bin
+
+	if use seavgabios ; then
+		insinto /usr/share/seavgabios
+		doins ../vgabios*.bin
+	fi
+}


             reply	other threads:[~2018-11-11 21:14 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-11 21:14 Matthias Maier [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-04-10  9:56 [gentoo-commits] repo/gentoo:master commit in: sys-firmware/seabios/ Sam James
2025-01-06  3:24 Sam James
2025-01-06  3:24 Sam James
2025-01-06  3:24 Sam James
2025-01-06  3:24 Sam James
2024-09-10 11:30 James Le Cuirot
2024-09-10 11:30 James Le Cuirot
2024-09-10 11:30 James Le Cuirot
2024-09-10 11:30 James Le Cuirot
2024-07-31  9:24 Pacho Ramos
2024-07-03 21:08 Matthias Maier
2022-12-05 19:48 Arthur Zamarin
2022-12-02 19:27 Arthur Zamarin
2022-12-02 18:50 Arthur Zamarin
2022-12-02 18:50 Arthur Zamarin
2022-09-27  3:27 John Helmert III
2022-09-27  3:27 John Helmert III
2022-09-27  3:27 John Helmert III
2022-05-19 12:19 WANG Xuerui
2022-01-23  8:05 Yixun Lan
2022-01-04 12:37 Matthias Maier
2021-10-01  7:14 Sam James
2021-07-12 22:38 Sam James
2021-06-30 10:55 Agostino Sarubbo
2021-06-28  1:36 Sam James
2021-06-28  1:35 Sam James
2021-06-28  1:35 Sam James
2021-05-17  7:49 Agostino Sarubbo
2021-05-17  7:47 Agostino Sarubbo
2021-05-17  3:03 Sam James
2021-05-16 23:43 Sam James
2021-05-16  0:03 Sam James
2021-04-30 21:44 Sergei Trofimovich
2021-04-05  1:06 Matthias Maier
2021-04-05  1:06 Matthias Maier
2021-01-04 21:22 Matthias Maier
2020-12-28 17:29 Matthias Maier
2020-11-07  3:49 Georgy Yakovlev
2020-08-19 22:40 Sam James
2020-02-10 13:26 Michał Górny
2019-08-19 11:37 Agostino Sarubbo
2019-08-18 21:51 Agostino Sarubbo
2019-07-28 20:20 Matthias Maier
2018-06-23 13:48 Mikle Kolyada
2018-06-17 23:29 Thomas Deutschmann
2018-06-10  3:41 Matthias Maier
2018-02-11 21:30 Matthias Maier
2018-02-11 21:30 Matthias Maier
2017-12-10 10:17 Pacho Ramos
2017-09-01  1:09 Matthias Maier
2017-01-22 19:23 Alon Bar-Lev
2017-01-21 17:27 Agostino Sarubbo
2017-01-21 17:16 Agostino Sarubbo
2017-01-02 18:53 Alon Bar-Lev
2016-12-29 20:09 Mike Frysinger
2016-11-11  0:37 Mike Frysinger
2016-03-17 23:47 Patrice Clement
2016-01-04 22:26 Mike Frysinger
2016-01-04 19:27 Mike Frysinger
2015-09-08  7:20 Agostino Sarubbo
2015-09-08  7:19 Agostino Sarubbo
2015-08-30  0:27 Mike Frysinger
2015-08-30  0:16 Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1541970765.76f01453cc239c92f2ed624c02302a109f371e00.tamiko@gentoo \
    --to=tamiko@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox