Skip to content

Commit

Permalink
sys-kernel/gentoo-kernel-bin: bump to 5.4.105 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 Mar 20, 2021
1 parent 3cbd2a2 commit 681182a
Show file tree
Hide file tree
Showing 2 changed files with 114 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 @@ -88,6 +88,7 @@ DIST gentoo-kernel-5.4.104-1.amd64.xpak 61168729 BLAKE2B f4035929ec0ae6f975b6a1f
DIST gentoo-kernel-5.4.104-1.arm64.xpak 56426355 BLAKE2B bf76ddf35a3a1406299161ac32fdf233ed87273e840d4c3c72e0fff0769f7e6706bc38ea9fb0aff3ae728343cf3586c337862ef625034ff3572ddb4616f148ce SHA512 98cd8c677f763b41517a09e5d5d2fbbf18b8a30deb1ab0b4821f4486edcf29ad46c29a1caad34f1218a97a1fa60cdf7ac06614a7c5c47669d0209f6bf76d46af
DIST gentoo-kernel-5.4.104-1.x86.xpak 52994991 BLAKE2B e96911371fea462e94128a7790b089a5e1357b74b30d9b649097c7b295d8534195f4f98579a07f151e068d0a05d92cd181ab824cea181cd927457d36c8f84a6c SHA512 0715b8858ffd473bc694ae0f8ff79eae13d6849226424d56d5c20657116732d49571ac9b5434674c8db3e5765761f3f03372e1d5decb15ed723b42053888a0e8
DIST gentoo-kernel-5.4.105-1.amd64.xpak 61143714 BLAKE2B 7b404897b1da5790dae7990a35d1ce8b041989d958a9ac9eb974b2e7dfcb5ffac177d1055bf6a228530c35e7d5471a946f38650633d7ffb6a5a3a61c15b1bd0c SHA512 73502f24aa6de2b31002e37c638fdfe16ad990666c76221766240ddba7da2e902caa609a6bede8f0832bd7c14b56df440c210890c16c36194471b9b36403e7b1
DIST gentoo-kernel-5.4.105-1.arm64.xpak 56446869 BLAKE2B d57f6477484329e5d04be009cd240902f1c259f584b6c522d52b993ad8fe02a7448f578bbd77a3079f3d616f51306f2d9774b813904e173b18f2c9726cb90c26 SHA512 927aba91a3debebdc61ad20be444681b701a3892f39f6db0bcf1cc8bf8d3dc989f6ddad3c8b49d17486bc217e90c24394f11a8119ba6ede01f8771b78b79edcf
DIST gentoo-kernel-5.4.105-1.x86.xpak 52996400 BLAKE2B 13dd3bfb78f48560ca8716f0baa2d5c30c4505c95dae85c2c5b2e7b116da182945ce878a7b7e451a23ce528b8dfa222ca485271c4c040b7dad0befababb78e01 SHA512 0841f2fe7f0910952b880dd5652934a8aa64a7dcae56dfcbf4a97ac0647ef750645f1b83e161f2db1c351a909d6e7a60c6228ba129366adf6f036ed1390f3e18
DIST gentoo-kernel-5.4.106-1.amd64.xpak 61146719 BLAKE2B eb8ae4d9042e3ad9e69a5fae488763964c257e7a78f3b08b8d7b8a313bcdb48e975c4116c9b8e68be42c45351e7035e6ab892e155600a0ac3560ae54f84f6170 SHA512 b823ec881b83f42e54e2b393ed5060d84a7dcf9b7ed3967dc43124a88548f834c3eab56a679b8277d3427e9e05601ea3b06e218fc9923b5aa39bac09774194e1
DIST gentoo-kernel-5.4.106-1.x86.xpak 52989825 BLAKE2B fbcb31f68a1a03d1395e66c5491e35006ef642090d1c4b14892eb43d56b818663e40666ead8dcda0c0b7814739b41e3c4fa27c3d9a7ddee05a652f3560a1e3a2 SHA512 ad9c927f9b4311921de6c59706c84872a7d3955dbea393c11179504a730a1495981b473483e44ea204b003e6b8fd11b7bb6198c642b79191d39d04dc2878147d
Expand Down
113 changes: 113 additions & 0 deletions sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-5.4.105-r1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# 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/~alicef/dist/genpatches/${GENPATCHES_P}.base.tar.xz
https://dev.gentoo.org/~alicef/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}
!sys-kernel/vanilla-kernel:${SLOT}
!sys-kernel/vanilla-kernel-bin:${SLOT}"
PDEPEND="
>=virtual/dist-kernel-${PV}"
BDEPEND="
sys-devel/bc
sys-devel/flex
virtual/libelf
virtual/yacc"

QA_PREBUILT='*'

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-${PV}/.config" modprep/ || die
emake -C "${MY_P}" "${makeargs[@]}" modules_prepare
}

src_test() {
kernel-install_test "${PV}" \
"usr/src/linux-${PV}/$(dist-kernel_get_image_path)" \
"lib/modules/${PV}"
}

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-${PV}"/ || die
}

0 comments on commit 681182a

Please sign in to comment.