diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-06-19 09:03:42 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-06-19 09:09:58 +0200 |
commit | 2ccdea4788a273f8b70b6748f9e1c7bb6f7914c7 (patch) | |
tree | a088bd8ca5c6c388f0a8673c7f14b98db6c50e41 /sys-kernel/gentoo-kernel-bin | |
parent | sys-kernel/gentoo-kernel: Fix x32 support on 5.18.5 (diff) | |
download | gentoo-2ccdea4788a273f8b70b6748f9e1c7bb6f7914c7.tar.gz gentoo-2ccdea4788a273f8b70b6748f9e1c7bb6f7914c7.tar.bz2 gentoo-2ccdea4788a273f8b70b6748f9e1c7bb6f7914c7.zip |
sys-kernel/gentoo-kernel-bin: Fix x32 support on 5.18.5
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-kernel/gentoo-kernel-bin')
-rw-r--r-- | sys-kernel/gentoo-kernel-bin/Manifest | 1 | ||||
-rw-r--r-- | sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-5.18.5-r1.ebuild | 123 |
2 files changed, 124 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel-bin/Manifest b/sys-kernel/gentoo-kernel-bin/Manifest index e92e07f4658d..29129c32a8ea 100644 --- a/sys-kernel/gentoo-kernel-bin/Manifest +++ b/sys-kernel/gentoo-kernel-bin/Manifest @@ -18,6 +18,7 @@ DIST gentoo-kernel-5.18.5-1.amd64.xpak 71624251 BLAKE2B 906903314080f075709b091c DIST gentoo-kernel-5.18.5-1.arm64.xpak 65223184 BLAKE2B 9b54ac0556c6515a9303f6c636cc32c78c8c2b5a0afa03ee7f1ab627a6cc51847d2e606d4beedeb0373ce00d87f7b41b49c8f6173d9154721113051e6b335f6a SHA512 109860d371ddfc7f17c3ff0d41e683f9adf8213aa880f8171e212b7d5a4109098f6ea2cb51355de0622ace8c3c69f094ff12331f230b618d912e85e4b1944f4b DIST gentoo-kernel-5.18.5-1.ppc64le.xpak 59550570 BLAKE2B d22a29421f489f9e27018b166801fb039b7a7c58e45efad3eb2841a2e9bc2e554da116c469db7ac0845debd86969ce975ed5c5a4392e33aa8b3a626882a52fc4 SHA512 005450035299a52699bee929bc7135a25536f633ebf23cee71ef771760c93104fe8ea63016e367fa7ffdf7d1b42b8f173b8a87c6a2aed7b868ff4bf35bfdf767 DIST gentoo-kernel-5.18.5-1.x86.xpak 61833886 BLAKE2B b793e517ac55a2b493e20b4ebd7dd77adeacd2a8d43b5a5e8dfb4af7cfe1498872c9477866f84f0d17cf80b69666aebc8fde8e2a1a037c4d584d4d24cf7203bd SHA512 07e1b5181e424e970788584239a1ad4177de37900e748b0b431a63938a2592364733b0a856a6c839c0631a5566f53d9d5a6bebd03715fd1c0809605c700eaac4 +DIST gentoo-kernel-5.18.5-r1-1.amd64.xpak 71567319 BLAKE2B 2eb9f64b4071279834426f79aa818c78a167cb1c2b9672bbe6c87d761ea2a1620259726ce5e7a781deeae2281108a520e44d6d28bc37246738851fb9e8bd958b SHA512 82ac49a67cc1fc863baf205362d64419f13be31f0e16c427d1d48e434284a07ade0933e97b8725053d23ec31490d3b28312e8e7469e250a670bf9d4de25dff79 DIST gentoo-kernel-5.4.199-1.amd64.xpak 61557691 BLAKE2B ca249eb416d775e208023e555d6064f06b92ceebc765807faa9789a2a79d00670b95e7c6ac1c635f131e5b8c8dd38b47a98666b1cfcf9a0b8dcd7b5ab3212332 SHA512 51d3a1978088f3932127d10fd91e6219ccf2bebc17963751b57977c036f878aa13ba6d55abca167966f3061b5f0e6aacf71ae2096e5d6dfbf3c5fba6da3c2aa1 DIST gentoo-kernel-5.4.199-1.arm64.xpak 57705946 BLAKE2B 882c6b7b3444c2acc04379cfdf9d70d373c04496f9c16788e1b150851c7f64b76bb02e1fa5b77051ad50eca623e0bebc3066fa398622d82b24b6535158817cc7 SHA512 625852a1a45afdf0436025fd1984a243ab4b2de1e49bdfc323b568f7c7e0798d4e88677fff90cb83b4ab25cf311cd7d2cd818484880c9e64dbaae414495235ab DIST gentoo-kernel-5.4.199-1.ppc64le.xpak 55122976 BLAKE2B 75bd061e50e6528beb4436072b4d13c9f224ff56e05c08ec971af8d03a4b8a0e93bf1654eb82e78403af7e247d532a707fb5a8af9c47aa4b7996d5ee839a8ad0 SHA512 d10eacc72d067ed7546c6622248e2dba8a713794457cfa1b2e1ff318fe8d48793c3e6e46cf78101191677ac656e5d9960620bbe0ac4d721a36111d9f9bfe8de5 diff --git a/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-5.18.5-r1.ebuild b/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-5.18.5-r1.ebuild new file mode 100644 index 000000000000..0ecebbb3a988 --- /dev/null +++ b/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-5.18.5-r1.ebuild @@ -0,0 +1,123 @@ +# Copyright 2020-2022 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/}-r1-1 + +DESCRIPTION="Pre-built Linux kernel with Gentoo patches" +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 + amd64? ( + https://dev.gentoo.org/~mgorny/binpkg/amd64/kernel/sys-kernel/gentoo-kernel/${BINPKG}.xpak + -> ${BINPKG}.amd64.xpak + ) +" +S=${WORKDIR} + +LICENSE="GPL-2" +KEYWORDS="~amd64" + +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 + # ARCH=ppc64, but tarball is ppc64le. Update if we ever introduce ppc64be binpkg. + ebegin "Unpacking ${BINPKG}.${ARCH/%ppc64/ppc64le}.xpak" + tar -x < <(xz -c -d --single-stream "${DISTDIR}/${BINPKG}.${ARCH/%ppc64/ppc64le}.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 + + # FIXME: requires proper mount-boot + if [[ -d boot/dtbs ]]; then + mv boot "${ED}"/ || die + fi + + # 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 +} |