From a978c074e4272bb901fbe4a10de0a7b2af574f17 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 4 May 2021 22:28:33 +0100 Subject: gentoo resync : 04.05.2021 --- sys-firmware/Manifest.gz | Bin 5380 -> 5383 bytes sys-firmware/seabios/Manifest | 6 +- .../files/seabios-1.14.0-binutils-2.36.patch | 9 + .../seabios/files/seabios/config.seabios-128k | 6 +- sys-firmware/seabios/seabios-1.14.0-r1.ebuild | 172 +++++++++++++++++++ sys-firmware/seabios/seabios-1.14.0-r2.ebuild | 183 +++++++++++++++++++++ 6 files changed, 374 insertions(+), 2 deletions(-) create mode 100644 sys-firmware/seabios/files/seabios-1.14.0-binutils-2.36.patch create mode 100644 sys-firmware/seabios/seabios-1.14.0-r1.ebuild create mode 100644 sys-firmware/seabios/seabios-1.14.0-r2.ebuild (limited to 'sys-firmware') diff --git a/sys-firmware/Manifest.gz b/sys-firmware/Manifest.gz index f73ae5e0e064..fbbd212569f6 100644 Binary files a/sys-firmware/Manifest.gz and b/sys-firmware/Manifest.gz differ diff --git a/sys-firmware/seabios/Manifest b/sys-firmware/seabios/Manifest index 792af1c5dd45..bc05141818c2 100644 --- a/sys-firmware/seabios/Manifest +++ b/sys-firmware/seabios/Manifest @@ -1,5 +1,6 @@ AUX README 95 BLAKE2B 1b24d1199d9095bb7620c92be24990add23fa0667373ca1fa267da4ca8d7601250e22068aa572e38658049e150a3b2906849deb4393cbd2ce1ccb5cce994b7bc SHA512 60a67c0b57f8c36a266041d5307fcc8e1302660ffaf855e0f01f0ae8460843b0eeb336a78c48b59e7441738ac5cf9069c868d49daf3015ccf0fa72b8081e1c81 -AUX seabios/config.seabios-128k 272 BLAKE2B 692083da71e87909d542543ad16d99239afc75993c8bd57916f1d71f4ea34489dac243d9c62ba3cc9170187609371d1a653a4acab782d3e96bd0966dab05fb4d SHA512 8fe1496de0410b0f0c1a9d5af7d28c667eb31a0f8bc5374e73ebac9e136494056add96b1f0cceee681a4b6635d8ca9b36d941b04af78f43b558dfb53ff0479ae +AUX seabios-1.14.0-binutils-2.36.patch 401 BLAKE2B c9ae2113c1eaa9b99ec3c05d77e67a308ba86a6f9ba16691e50937f2fa10da730b3d270b20306b1505730cbb3c9fff0a1602ecc70de75d245986c1508c838a39 SHA512 be60c197071423aacd6d69f3e71223d57d5d740b0790f7b817653affe4489911493ea265ed1245a1960442aeefcd052abd576a8c87fd210d45f64d70c0157eb6 +AUX seabios/config.seabios-128k 358 BLAKE2B dc64c17aafbb52f88b0db80314b0b1aab31bdeb6fe692762afe9cf60f9f7868ee8cb65d402f9a4c04c0bf1bf891d566b773f1f4c30105a02e2074b36fd726962 SHA512 1428a05757313e7f5d57ed9e55b22dd74b864129b0a25bb69f83c949418b008984b932d433589220a1c8f68ebd5dbabedf668d230293bf7dc73d8107dbda117b AUX seabios/config.seabios-256k 71 BLAKE2B be5e2925d288cbec5fbcde43daa7f4429ad0e44ad242eefae7d4303b72d16df36654e461ae4ad9487045d66b56fd4739cb5686478dee349fd5d1e740e0391efd SHA512 3d41739944da088edafb3ea298c0d3db59ed638b614c258209a30635caccf86a284f03492612694e3a56f40357743a0a36053e8ec11b7d93853b91ba9e5a502f AUX seavgabios/config.vga-cirrus 60 BLAKE2B 24b655e5d66a4f7305afa4d7e92a4323279959e72d905aeeb15e3fe45e049609f625c7d6469b7d4bd387a83ac93c2f146b7857d80ce1d20febd001af50cb5a0e SHA512 e9ef2d6bec9419e69bc90adf1a4bb7c174284cd722e53903deea0411f88074cc247069116e03e124715072ec82f153cf6014168febba41369a2569983d3265b6 AUX seavgabios/config.vga-isavga 59 BLAKE2B dd3d8d0f86caa610c5f3833c4b17f7248dbe8ffff3f87a90ff42ead66a044a2d2a0a8330cfd9689379b8a2aa3797b258adddd9fee0978d2915ca02141c37ea14 SHA512 aada61232f4834c1e9bec921b1e1365ce5ecb4adf42c659f34cdf051efb56f0ec2e62f0ccf66bb25d9bb0b8601e2df49b712265f19185068d45353c3aacf1cd9 @@ -10,8 +11,11 @@ AUX seavgabios/config.vga-vmware 128 BLAKE2B 8ab374ee7b0ad5cd8f732ccc4983f2251a8 DIST seabios-1.12.0-bin.tar.xz 162492 BLAKE2B 9a5a349226ed7efbed328493dc057e232203b251677a23f1f09c133743ff0ca6b05270c9d27460be1d8897888fe23ff7bdfa122023fa8ddb23af03d5b9b6f8dd SHA512 f7a0395d621245093bb9a278d95ecc3d4e8d23f620058cd4fddaf885c8b86256f6258f3fd8173c1d24c03306f44d180e768bf8005ee123bc4b699b9f0ca371be DIST seabios-1.12.0.tar.gz 613542 BLAKE2B f145c2db716996bfa9e5c014086ccfaa8ae96ebc158f34303b122b7bf209408c567665d8691364df8d8e886f63e0e72a3f3cd319dfa86ef581023201b5d94e53 SHA512 e52c5363e5bb37b5286e55545aa06bd126218f9d0e3a06ac2e189de68fe3de3256c11ca1bb13357a9c384d7e3af6284083ff3aa587688b5de04ef11b97bdfa27 DIST seabios-1.14.0-bin.tar.xz 170160 BLAKE2B 1ab471ce0c6e27633ec42a66e3069496be84de713baab5de4f297821bd0da26404f7f70abc82e223ec5aa317a878889ae92b019988c72d24f77e7dcc5865f916 SHA512 7964e9bb7dff4fd6593f5d6d64efc4b1460750461b86635dbe5255d2086d619f51711d7a35e4dc20e556f705091c0950afabeddcd2e8876f05ce14f9ca73ed71 +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 EBUILD seabios-1.12.0-r1.ebuild 4058 BLAKE2B 960efadabb9000c6aecde46e41760d414f92f7b915ae546faf831cd52954b8f78e98419faeb54200189d0210c2d72057fa05997fa848fc10a42cbdff3d665a47 SHA512 9a9fe25e5766f9fc88fc22ac3fe796a3229a36bdba5c08a7648df8dcea0e8502fa9ada2ab3ab1aee2466f67bbb678e3e500ee99e2fe24b3e8b77c4bdded33a32 EBUILD seabios-1.12.0.ebuild 3439 BLAKE2B 4e88e25af3df5c52d44259b8078f2c6a7baf5d88dfd572ab7e25c1d0a35737eca941002fb2e111a70143d95af61b012bbeb1da7e33a1b900471a4c3720cd6f70 SHA512 7e9a0e45766736bfc4aa71736aeee1e5301a044cb84f0ea7060be4cfc2e6f7da97ca789d136b85911d05a25aa1abcc6f644ebdf2da3c5e7a4371171d18614423 +EBUILD seabios-1.14.0-r1.ebuild 3921 BLAKE2B a09d2c72a1403fd258a62e6b7af04efa19316ba3a9c042467ad1afba80176391c27b8e5f10d45ba7fa5894b541c3c7af1d4e4878d076a93ea530b96e14f26535 SHA512 8b9793cd7d7dada46e7b6e25c314e5227950e7eeed7608ecc2768b9f640c7d10a91db2b6e6d8b54e36c2c196ac907db781023b440ec360caf7dbeae6c6a9cff3 +EBUILD seabios-1.14.0-r2.ebuild 4305 BLAKE2B c7076b9093cbe51872db6bd06ae19b8cfd54375c975467594c78e2679a89f554cf0c905d5c1e3329be5d1d2952c0fa0f4066a0b263d39b62fbcf413095792c21 SHA512 48c4513833991f4ed1b3c40c4c1be88d668c8d19298bf5a6b6ba22868e85d120e4fa46ae798f3efb0fe91d8fbe3e97a79a0aabb62663e58f931671e7db3c2339 EBUILD seabios-1.14.0.ebuild 3777 BLAKE2B 8899319dd58141da3779c871730448e60ddbb459c8a6f3701a81eac4323795ed5e075bef3cd6f4ab805d4e7e5018934e6faee984b0c9ac5d315f62ea23b16cc4 SHA512 fd9383ca5a7bd2697e7ff81d17071771492a657d244b529ee580cba9ae02d978b38a3c71ece056b7003f7db549ea6980ef254f3f8f4aa96e45ff6644c6afe6ce MISC metadata.xml 551 BLAKE2B 1bc4f5bcc0dd85ff4e14ededc83e631c942995a8f0ba9534d72b6d5b671ad471eeb0c43a02ce4cf7c0b79d7f0d5583d419c46aaa8c297f1544353b8f42cdefa4 SHA512 5a580198036d96152d46c79b19317e35e5ba15f998ccaeade825189ee640a6ca50552a46f56f783ebba288df3953d461695039539c47baa27e3c9da1f8b1ccc0 diff --git a/sys-firmware/seabios/files/seabios-1.14.0-binutils-2.36.patch b/sys-firmware/seabios/files/seabios-1.14.0-binutils-2.36.patch new file mode 100644 index 000000000000..0453d203d4ae --- /dev/null +++ b/sys-firmware/seabios/files/seabios-1.14.0-binutils-2.36.patch @@ -0,0 +1,9 @@ +--- a/vgasrc/vgalayout.lds.S ++++ b/vgasrc/vgalayout.lds.S +@@ -19,5 +19,5 @@ SECTIONS + + // Discard regular data sections to force a link error if + // 16bit code attempts to access data not marked with VAR16. +- /DISCARD/ : { *(.text*) *(.rodata*) *(.data*) *(.bss*) *(COMMON) } ++ /DISCARD/ : { *(.text*) *(.rodata*) *(.data*) *(.bss*) *(COMMON) *(.note.gnu.property) } + } diff --git a/sys-firmware/seabios/files/seabios/config.seabios-128k b/sys-firmware/seabios/files/seabios/config.seabios-128k index 93203af0ded7..50dd75d5f303 100644 --- a/sys-firmware/seabios/files/seabios/config.seabios-128k +++ b/sys-firmware/seabios/files/seabios/config.seabios-128k @@ -1,5 +1,5 @@ # for qemu machine types 1.7 + older -# need to turn off features (xhci,uas) to make it fit into 128k +# need to turn off features (xhci,uas,achi,nvme,acpi_parse) to make it fit into 128k CONFIG_QEMU=y CONFIG_ROM_SIZE=128 CONFIG_BOOTSPLASH=n @@ -10,3 +10,7 @@ CONFIG_USB_UAS=n CONFIG_SDCARD=n CONFIG_TCGBIOS=n CONFIG_MPT_SCSI=n +CONFIG_ACPI_PARSE=n +CONFIG_NVME=n +CONFIG_AHCI=n +CONFIG_THREADS=n diff --git a/sys-firmware/seabios/seabios-1.14.0-r1.ebuild b/sys-firmware/seabios/seabios-1.14.0-r1.ebuild new file mode 100644 index 000000000000..f97b51857b56 --- /dev/null +++ b/sys-firmware/seabios/seabios-1.14.0-r1.ebuild @@ -0,0 +1,172 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +PYTHON_COMPAT=( python3_{7..9} ) + +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 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" + + SRC_URI=" + !binary? ( https://www.seabios.org/downloads/${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 )" + +SOURCE_DEPEND=" + >=sys-power/iasl-20060912 + ${PYTHON_DEPS}" +DEPEND=" + !binary? ( + ${SOURCE_DEPEND} + )" +RDEPEND="" + +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() { + 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." + if [[ -z "$(choose_target_chost)" ]]; then + elog + eerror "Before you can compile ${PN}[-binary], 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 + 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 + + if ! use binary; then + eapply "${FILESDIR}"/${PN}-1.14.0-binutils-2.36.patch + fi + + # 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 \ + 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() { + use binary && return + + 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 +} diff --git a/sys-firmware/seabios/seabios-1.14.0-r2.ebuild b/sys-firmware/seabios/seabios-1.14.0-r2.ebuild new file mode 100644 index 000000000000..1e33e9260a57 --- /dev/null +++ b/sys-firmware/seabios/seabios-1.14.0-r2.ebuild @@ -0,0 +1,183 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +PYTHON_COMPAT=( python3_{7..9} ) + +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} + +# To generate binary tarball you can run the following from fork tree: +# cd .../seabios-1.14.0-r2/image/usr/share +# $ tar cJf seabios-1.14.0-r2-bin.tar.xz *.bin + +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 ~sparc ~x86" + + SRC_URI=" + !binary? ( https://www.seabios.org/downloads/${P}.tar.gz ) + binary? ( https://dev.gentoo.org/~slyfox/distfiles/${P}-r2-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 )" + +SOURCE_DEPEND=" + >=sys-power/iasl-20060912 + ${PYTHON_DEPS}" +DEPEND=" + !binary? ( + ${SOURCE_DEPEND} + )" +RDEPEND="" + +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() { + 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." + if [[ -z "$(choose_target_chost)" ]]; then + elog + eerror "Before you can compile ${PN}[-binary], 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 + 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 + + if ! use binary; then + eapply "${FILESDIR}"/${PN}-1.14.0-binutils-2.36.patch + fi + + # 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 \ + 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() { + use binary && return + + local TARGET_CHOST=$(choose_target_chost) + + cp "${FILESDIR}/seabios/config.seabios-128k" .config || die + _emake oldnoconfig + CHOST="${TARGET_CHOST}" _emake iasl + CHOST="${TARGET_CHOST}" _emake out/bios.bin + mv out/bios.bin ../bios.bin || die + + 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.bin + doins ../bios-256k.bin + + if use seavgabios ; then + insinto /usr/share/seavgabios + doins ../vgabios*.bin + fi +} -- cgit v1.2.3