Skip to content

Commit

Permalink
sys-kernel/gentoo-kernel-bin: bump to 5.4.122-r1 for arm64
Browse files Browse the repository at this point in the history
Signed-off-by: Sam James <[email protected]>
  • Loading branch information
thesamesam committed May 28, 2021
1 parent bffa0d1 commit a87836f
Show file tree
Hide file tree
Showing 2 changed files with 115 additions and 0 deletions.
1 change: 1 addition & 0 deletions sys-kernel/gentoo-kernel-bin/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ DIST gentoo-kernel-5.4.121-1.amd64.xpak 61386605 BLAKE2B 5d2c2b8f2428df3583d90f3
DIST gentoo-kernel-5.4.121-1.arm64.xpak 56389127 BLAKE2B 373f582e13179d9e124a6f619eef1855d7aed83119f4d7baa6f7acd8f31e15944f23faefe67a2949287e1578d156c15efc39be6e8619ffff409bb6bec1f89ae0 SHA512 7914d087c381fe99e2be9864e89f960fd46f8f0a51970b01fecd65c263f26d7008e80ca14a988d57b8a0ad04d28e09853bcda0fe6c36444b3c3a0204a026a11b
DIST gentoo-kernel-5.4.121-1.x86.xpak 53175663 BLAKE2B 30a6edf57b7eb172194aaa40b6bb1b7bb05ebe1b13a775de55d75c53c1fba45288505650cb2fc8320db65cc16bc5d5bedc24a0bdcc50ea00d36a2a66ee4b1b8b SHA512 e15e53668a755f427d1fd16a8db84af6e1714bcf9e635a22053743d64ee81e2a1e320fad5b418a95ebc0b02463b272df6eba169048749cb3113c73e461436fe6
DIST gentoo-kernel-5.4.122-1.amd64.xpak 61399307 BLAKE2B 2b92ac919e0cf3f55127906d85628f827de20950fabe6772c39b496befa9372c81db9dab76bc208ce4a373d632975f837deee8b926d7e458d581e399dcc99b2c SHA512 6ff66518517bb163721bdc1bb9912e93f2ebe1f7df3411c3fcef2404df2b86a1162183db538b50fadcfd5edc744b249409b80fa411745e0a10e1ffb0f4192a12
DIST gentoo-kernel-5.4.122-1.arm64.xpak 56363698 BLAKE2B ce3e2142ed6630cb0cdf274709bed8ca9177af9df78ed50a743bb2535a8a926f31b7fe173c2b303d1929e1232eaaffab08317881a37d640e5bb6355c0d796888 SHA512 877abb1511e96406a6befcaa20e893cd1ce38949f6d67962cbf76c5bf4839d8ba1f174997a6d62e69074637f187ff2177956f5269771c93936e65b18b0cf6f89
DIST gentoo-kernel-5.4.122-1.x86.xpak 53177302 BLAKE2B b71a2918e7f4bbafd2e01bde3dcdc7c143f8604fb374b310f22ba54d41047b1273998a23bdce5547dbcfe273a049551bf812e8ac2412810e3bffb03c94fb2606 SHA512 73064f5b903de74b3466191175cb0100db0b347449f46c9ea899be2e69632c3eeda14eaee6b919e069071829a77039752af903603c969e0978f71e580b51d088
DIST linux-5.10.tar.xz 116606704 BLAKE2B b923d7b66309224f42f35f8a5fa219421b0a9362d2adacdadd8d96251f61f7230878ea297a269a7f3b3c56830f0b177e068691e1d7f88501a05653b0a13274d1 SHA512 95bc137d0cf9148da6a9d1f1a878698dc27b40f68e22c597544010a6c591ce1b256f083489d3ff45ff77753289b535135590194d88ef9f007d0ddab3d74de70e
DIST linux-5.11.tar.xz 117619104 BLAKE2B 81300c27bd5476387a83123aaeb4163c73eb61e9245806c23660cb5e6a4fa88ffc9def027031335fa0270fc4080506cd415990014364e3a98b9d2e8c58a29524 SHA512 a567ec133018bb5ec00c60281479b466c26e02137a93a9c690e83997947df02b6fd94e76e8df748f6d70ceb58a19bacc3b1467de10b7a1fad2763db32b3f1330
Expand Down
114 changes: 114 additions & 0 deletions sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-5.4.122-r1.ebuild
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit a87836f

Please sign in to comment.