summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Mayo <aklhfex@gmail.com>2024-09-01 19:24:03 +0100
committerJames Le Cuirot <chewi@gentoo.org>2024-09-10 12:30:15 +0100
commitcfcbbb8b65b937fc5a04a2d213158674758adb6a (patch)
treec5f469b369f99e877cbcf884ac9fefbef3f9f435 /sys-firmware
parentapp-text/crqt-ng: fix a typo (diff)
downloadgentoo-cfcbbb8b65b937fc5a04a2d213158674758adb6a.tar.gz
gentoo-cfcbbb8b65b937fc5a04a2d213158674758adb6a.tar.bz2
gentoo-cfcbbb8b65b937fc5a04a2d213158674758adb6a.zip
sys-firmware/seabios: add 1.16.3
Bug: https://bugs.gentoo.org/933284 Signed-off-by: Chris Mayo <aklhfex@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/38372 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'sys-firmware')
-rw-r--r--sys-firmware/seabios/Manifest1
-rw-r--r--sys-firmware/seabios/seabios-1.16.3.ebuild142
2 files changed, 143 insertions, 0 deletions
diff --git a/sys-firmware/seabios/Manifest b/sys-firmware/seabios/Manifest
index 8eda39382f89..debc5efd5e00 100644
--- a/sys-firmware/seabios/Manifest
+++ b/sys-firmware/seabios/Manifest
@@ -1,3 +1,4 @@
DIST seabios-1.14.0-r2-bin.tar.xz 132256 BLAKE2B 7d38949de254d6e3699d463a66c363156aa36bfe16c18bea48c55a61bdc423184175fd5427d3246a78d9c6335e61e5baa982f67e7406c5525e405b4383530d41 SHA512 5ce0e407b97e878842fbd7ad2f9e8a65f2565a5aa43d08e01cff024352780f55f8669958c58d20770db7f90e87cc52c860af831cefe3846227e7b45cd9dc33ee
DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c386500d1ee4df9e1a99403b4c5bc6a66c2cc5ef58b4c3d6d7226f35007506a6a1855c2cf2742469dcb7aba05bb SHA512 215c42f59425f8abd062be7b11fc0e39c977cee5001a2381551b0f851ac337d0dd53c065267e6dee0e710ffd700fa635f9007b89da8dfce0f47122c984ee8146
DIST seabios-1.16.0.tar.gz 635419 BLAKE2B b645f20bae341d56ce4fc4a7044446050d8490c6c136377f6dccf02c88100b0644bc13d210b4a517a8be6002d5671b0fba77120a2aca3a9bafbad5e88d037e40 SHA512 9daefcfb1c9edda4462a4b080c9bac552154d577ae19703a914928e43005e7a52edd86869c6507e94a7f0c61ce8b3e6f5dea38cd5146628cb138a130947c522f
+DIST seabios-1.16.3.tar.gz 637076 BLAKE2B 8b7c574bf8b0d3b02ea3127dabacda5ddc39c159f17a3a474b76ca79f3ec637ed5571f0d485712b5f9dc68d46db5b2b2c1e018ff63ae0206ca6354bccb714c6c SHA512 103aac0a7a890a681edb8950fee72d419899e20e8b06e2dd382987f98d3faf362789fca5aa4efabe27c4720e53ee19e0ae246d7aca2482b6661fa119efac648c
diff --git a/sys-firmware/seabios/seabios-1.16.3.ebuild b/sys-firmware/seabios/seabios-1.16.3.ebuild
new file mode 100644
index 000000000000..eaaa72c37fa1
--- /dev/null
+++ b/sys-firmware/seabios/seabios-1.16.3.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit 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
+ SRC_URI="https://www.seabios.org/downloads/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm64 ~loong ~m68k ~mips ~ppc ~ppc64 ~x86"
+fi
+
+DESCRIPTION="Open Source implementation of a 16-bit x86 BIOS"
+HOMEPAGE="https://www.seabios.org/"
+
+LICENSE="LGPL-3 GPL-3"
+SLOT="0"
+IUSE="debug +seavgabios"
+
+BDEPEND="
+ >=sys-power/iasl-20060912
+ ${PYTHON_DEPS}"
+RDEPEND="!sys-firmware/seabios-bin"
+
+choose_target_chost() {
+ if [[ -n "${CC}" ]]; then
+ ${CC} -dumpmachine
+ return
+ fi
+
+ if use amd64 || use x86; then
+ # Use the native compiler
+ echo "${CHOST}"
+ return
+ fi
+
+ local i
+ for i in x86_64 i686 i586 i486 i386 ; do
+ i=${i}-pc-linux-gnu
+ type -P ${i}-gcc > /dev/null && echo ${i} && return
+ done
+}
+
+pkg_pretend() {
+ 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."
+ if [[ -z "$(choose_target_chost)" ]]; then
+ elog
+ eerror "Before you can compile ${PN}, you need to install a x86 cross-compiler"
+ eerror "Run the following commands:"
+ eerror " emerge crossdev"
+ eerror " crossdev --stable -t x86_64-pc-linux-gnu"
+ die "cross-compiler is needed"
+ fi
+}
+
+src_prepare() {
+ default
+
+ # Ensure precompiled iasl files are never used
+ find "${WORKDIR}" -name '*.hex' -delete || die
+}
+
+src_configure() {
+ tc-ld-disable-gold #438058
+
+ if use debug ; then
+ echo "CONFIG_DEBUG_LEVEL=8" >.config
+ fi
+ _emake config
+}
+
+_emake() {
+ LANG=C \
+ emake V=1 \
+ CPP="$(tc-getPROG CPP cpp)" \
+ CC="$(tc-getCC)" \
+ LD="$(tc-getLD)" \
+ AR="$(tc-getAR)" \
+ AS="$(tc-getAS)" \
+ OBJCOPY="$(tc-getOBJCOPY)" \
+ RANLIB="$(tc-getRANLIB)" \
+ OBJDUMP="$(tc-getOBJDUMP)" \
+ STRIP="$(tc-getSTRIP)" \
+ HOST_CC="$(tc-getBUILD_CC)" \
+ VERSION="Gentoo/${EGIT_COMMIT:-${PVR}}" \
+ "$@"
+}
+
+src_compile() {
+ local TARGET_CHOST=$(choose_target_chost)
+
+ cp "${FILESDIR}/seabios/config.seabios-256k" .config || die
+ _emake oldnoconfig
+ CHOST="${TARGET_CHOST}" _emake iasl
+ CHOST="${TARGET_CHOST}" _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
+ CHOST="${TARGET_CHOST}" _emake out/vgabios.bin
+ cp out/vgabios.bin ../vgabios-${t}.bin || die
+ done
+ fi
+}
+
+src_install() {
+ insinto /usr/share/seabios
+ doins ../bios-256k.bin
+
+ if use seavgabios ; then
+ insinto /usr/share/seavgabios
+ doins ../vgabios*.bin
+ fi
+}