diff options
-rw-r--r-- | sys-kernel/gentoo-kernel-bin/Manifest | 1 | ||||
-rw-r--r-- | sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-5.4.131-r1.ebuild | 114 |
2 files changed, 115 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel-bin/Manifest b/sys-kernel/gentoo-kernel-bin/Manifest index 513c24f6435b..92bcba37f7d8 100644 --- a/sys-kernel/gentoo-kernel-bin/Manifest +++ b/sys-kernel/gentoo-kernel-bin/Manifest @@ -40,6 +40,7 @@ DIST gentoo-kernel-5.4.130-1.amd64.xpak 61373618 BLAKE2B 4431a12633d68d87e95826f DIST gentoo-kernel-5.4.130-1.arm64.xpak 56048219 BLAKE2B 72e54faf0ed99e570e71504afe5b721875fc4d491d73cff91c6534abd612962d9360c1efb01c0757ba9764211b3030b5c6032d63106b7eee9d8fb9d55683da36 SHA512 4b7cab1a6fd68b9c46cf4f4d5d78eb6d66bff424af9c3d2a844a072ee2578f679d636c2f185b033a55ae12ee3d7cfec5aeb2accb87a3a5e6ae1e19601c620374 DIST gentoo-kernel-5.4.130-1.x86.xpak 53128397 BLAKE2B a4183f65fe7bc2b869b3556342434b90f577c88266a4462cfe4fd080584c333b7c934649894d9c570f1949b018614b96e17cd6b118aad08fd22e48d3a44515ea SHA512 2ec7337c2ca20eb43c0423318199e36b8d64454d0594910d84d965d725ac416509f8be2b60d70f76f8a8d40a8c17b0d928f6cf8e20b8271d3f7008921d4ca10d DIST gentoo-kernel-5.4.131-1.amd64.xpak 61358364 BLAKE2B 198334bf55e0b55316d6e0373a5cfbcd707a7cae0492b5dd72befd10dac53bc9369dc85f47483e79abf4d8db0a56ccc79ee47b55ebcae49c3df93882a3c13db3 SHA512 2c4b41fa72283ba2d09d09254141e3f1b5aa1cfdf80d84efde927a54a0ce1b3d911cfdbbe065ad3983134eee8f68c3656a722b5236edd7cc5295fdd02f339bb4 +DIST gentoo-kernel-5.4.131-1.arm64.xpak 56106784 BLAKE2B 927c175773ca2897140764a5d5558818b51de95596c7a87f8cf42127f0698735e06e34458537d334810287d020aba039fe57863d2f78691de5caa90f031cca9b SHA512 205fd52209234d26857eb962e1ea956ea5e7c44852663cb1e0a63a095e35f30a0448eb15c8a5ebda53129b4054c5172fe9db88c544ab842c5611dc4150d535a4 DIST gentoo-kernel-5.4.131-1.x86.xpak 53137168 BLAKE2B 3b7a631de49d5ba7de28e839bb5c67218b7e2f13ad051efde3d9b70142be81636e21d0d3cf48b94911851e5dab38db523e552a52034aa8901bc331fea86127ae SHA512 49a7e2eef8572a51c9cdf24f16908d4527fa5d27db4a673fcea03277864fde724d92e667d4cb4ae0dea0d92a783720c19d5a5160439dcbe404694236a02a5b90 DIST linux-5.10.tar.xz 116606704 BLAKE2B b923d7b66309224f42f35f8a5fa219421b0a9362d2adacdadd8d96251f61f7230878ea297a269a7f3b3c56830f0b177e068691e1d7f88501a05653b0a13274d1 SHA512 95bc137d0cf9148da6a9d1f1a878698dc27b40f68e22c597544010a6c591ce1b256f083489d3ff45ff77753289b535135590194d88ef9f007d0ddab3d74de70e DIST linux-5.12.tar.xz 118112412 BLAKE2B 842d921b9a73d2aaade763dbd2ec67bdfe0275baa6d628b775f5c87574ad7dc86f0419afcd48c10c1235f4bffa16084243f2cf4556e6afcd391e975fe8ba530b SHA512 be03b6fee1d1ea8087b09874d27c0a602c0b04fd90ad38b975bd2c8455a07e83c29b56814aaf1389e82305fae0e4c2d1701075a7f0a7295dd28149f967ec5b3d diff --git a/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-5.4.131-r1.ebuild b/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-5.4.131-r1.ebuild new file mode 100644 index 000000000000..b63276300c50 --- /dev/null +++ b/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-5.4.131-r1.ebuild @@ -0,0 +1,114 @@ +# Copyright 2020-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit kernel-install toolchain-funcs + +MY_P=linux-${PV%.*} +GENPATCHES_P=genpatches-${PV%.*}-$(( ${PV##*.} + 3 )) +BINPKG=${P/-bin/}-1 + +DESCRIPTION="Pre-built Linux kernel with genpatches" +HOMEPAGE="https://www.kernel.org/" +SRC_URI+=" + https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.xz + https://dev.gentoo.org/~mpagano/dist/genpatches/${GENPATCHES_P}.base.tar.xz + https://dev.gentoo.org/~mpagano/dist/genpatches/${GENPATCHES_P}.extras.tar.xz + arm64? ( + https://dev.gentoo.org/~sam/binpkg/arm64/kernel/sys-kernel/gentoo-kernel/${BINPKG}.xpak + -> ${BINPKG}.arm64.xpak + ) +" +S=${WORKDIR} + +LICENSE="GPL-2" +KEYWORDS="~arm64" + +RDEPEND=" + !sys-kernel/gentoo-kernel:${SLOT}" +PDEPEND=" + >=virtual/dist-kernel-${PV}" +BDEPEND=" + sys-devel/bc + sys-devel/flex + virtual/libelf + virtual/yacc" + +QA_PREBUILT='*' + +KV_LOCALVERSION='-gentoo-dist' +KPV=${PV}${KV_LOCALVERSION} + +src_unpack() { + default + ebegin "Unpacking ${BINPKG}.${ARCH}.xpak" + tar -x < <(xz -c -d --single-stream "${DISTDIR}/${BINPKG}.${ARCH}.xpak") + eend ${?} || die "Unpacking ${BINPKG} failed" +} + +src_prepare() { + local PATCHES=( + # meh, genpatches have no directory + "${WORKDIR}"/*.patch + ) + cd "${MY_P}" || die + default +} + +src_configure() { + # force ld.bfd if we can find it easily + local LD="$(tc-getLD)" + if type -P "${LD}.bfd" &>/dev/null; then + LD+=.bfd + fi + + tc-export_build_env + local makeargs=( + V=1 + + HOSTCC="$(tc-getBUILD_CC)" + HOSTCXX="$(tc-getBUILD_CXX)" + HOSTCFLAGS="${BUILD_CFLAGS}" + HOSTLDFLAGS="${BUILD_LDFLAGS}" + + CROSS_COMPILE=${CHOST}- + AS="$(tc-getAS)" + CC="$(tc-getCC)" + LD="${LD}" + AR="$(tc-getAR)" + NM="$(tc-getNM)" + STRIP=":" + OBJCOPY="$(tc-getOBJCOPY)" + OBJDUMP="$(tc-getOBJDUMP)" + + # we need to pass it to override colliding Gentoo envvar + ARCH=$(tc-arch-kernel) + + O="${WORKDIR}"/modprep + ) + + mkdir modprep || die + cp "usr/src/linux-${KPV}/.config" modprep/ || die + emake -C "${MY_P}" "${makeargs[@]}" modules_prepare +} + +src_test() { + kernel-install_test "${KPV}" \ + "${WORKDIR}/usr/src/linux-${KPV}/$(dist-kernel_get_image_path)" \ + "lib/modules/${KPV}" +} + +src_install() { + mv lib usr "${ED}"/ || die + + # strip out-of-source build stuffs from modprep + # and then copy built files + find modprep -type f '(' \ + -name Makefile -o \ + -name '*.[ao]' -o \ + '(' -name '.*' -a -not -name '.config' ')' \ + ')' -delete || die + rm modprep/source || die + cp -p -R modprep/. "${ED}/usr/src/linux-${KPV}"/ || die +} |