commit:     0cabaf7900fbb79457d8de6d2bdb26b245b21bab
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 24 00:27:03 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Oct 24 00:27:03 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0cabaf79

sys-kernel/gentoo-kernel-bin: add 5.4.155-r1 for arm64

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-kernel/gentoo-kernel-bin/Manifest              |   1 +
 .../gentoo-kernel-bin-5.4.155-r1.ebuild            | 113 +++++++++++++++++++++
 2 files changed, 114 insertions(+)

diff --git a/sys-kernel/gentoo-kernel-bin/Manifest 
b/sys-kernel/gentoo-kernel-bin/Manifest
index 14666c0b986..6b4fe2acfdf 100644
--- a/sys-kernel/gentoo-kernel-bin/Manifest
+++ b/sys-kernel/gentoo-kernel-bin/Manifest
@@ -119,6 +119,7 @@ DIST gentoo-kernel-5.4.154-1.amd64.xpak 61399049 BLAKE2B 
1cd9dfa937e87a8e1ec35a2
 DIST gentoo-kernel-5.4.154-1.arm64.xpak 58059965 BLAKE2B 
434c37aaba83a7eaa88804b0d912e6a5ca6e4cf3b3c3a7c3096c5363471c6bda6b541c6d8aec8541bf3740c532fe75b4b4b80076cde642c813a82b18be6140b0
 SHA512 
24a064e19a267d5db1426f7484ec0210baaef5343f507a037cd8dc01977612878d1ddf9c0c9c953aef5761ae06c716390d77ce9a86c181db6ad8a7a89fe6d510
 DIST gentoo-kernel-5.4.154-1.x86.xpak 53175292 BLAKE2B 
e6a37169fd36a40f766c3f45f1a85033dda4113bbd7167d7946dafc9f92ecb4393609466dc8f338c9ca3fdcb18c82210e9506a677bcd8f46bb3bb1b5cae427d1
 SHA512 
8e88fcf1201db8df51268fd1ce13cf0b534919c12426f1754d140d950a7b87b726d44d03782f3bb32738ae638c35290bda4ba682d788e90798694ba9ba135bc0
 DIST gentoo-kernel-5.4.155-1.amd64.xpak 61371926 BLAKE2B 
364a34d96863cb9dd697e12fff4cf9a81cfe83e11f8f07267bdcb8c43689535455961579651ec79d93f48747e1a7dd2efe81ddec4119091e93ecbbf53c418e63
 SHA512 
be177c4f0871bdff50fc6a61403b56bd01db1a5cefb4a489c50484e20d131d292924f734d66ecc1cd4284095b3867b19298b49fe0c3e05373a67100182ab2f36
+DIST gentoo-kernel-5.4.155-1.arm64.xpak 57596314 BLAKE2B 
d6c1d72d619cf66048928d3c901765a3443170ae7e77e0d444bc7cad30b0d985a90e056f45d1a50b3a942006c9a8770bd652ea787f22807813dc142712dc8861
 SHA512 
6cb7c28bd18e2a34d2cf316dbd5a09a066877151717beb25efbf386e50cbda1540e041b201286771ce4d7a814cc3f4f0e1442b67d3212213b047590a4176e023
 DIST gentoo-kernel-5.4.155-1.x86.xpak 53166974 BLAKE2B 
635e9b254ad3393c546e8b7dc2934aae87f9dbe99faac2bf6852cfb1a15fd9dbd1c8149fbf07a008eecf5bd07ad5f3fac11621c2cab20f265f0966a887d25cd0
 SHA512 
ee47f76adf7658ae9154c12f499f58c8caff80f89b0dc9a1d0ea7a5c547d0fefb4779d4a99c3808010a25e0e04dc4facc3ae71d2c46515d690a5fb026695e1e3
 DIST linux-5.10.tar.xz 116606704 BLAKE2B 
b923d7b66309224f42f35f8a5fa219421b0a9362d2adacdadd8d96251f61f7230878ea297a269a7f3b3c56830f0b177e068691e1d7f88501a05653b0a13274d1
 SHA512 
95bc137d0cf9148da6a9d1f1a878698dc27b40f68e22c597544010a6c591ce1b256f083489d3ff45ff77753289b535135590194d88ef9f007d0ddab3d74de70e
 DIST linux-5.13.tar.xz 119297284 BLAKE2B 
9c4c12e2394dec064adff51f7ccdf389192eb27ba7906db5eda543afe3d04afca6b9ea0848a057571bf2534eeb98e1e3a67734deff82c0d3731be205ad995668
 SHA512 
a8edf97e9d38a49f1be2bde1e29ad96274bb2c6f7e8a2bebaa1161dd4df9cabcbaec4ff644c45bee94f86ae47725087d6deed0cd954209cec717621d137db85e

diff --git a/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-5.4.155-r1.ebuild 
b/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-5.4.155-r1.ebuild
new file mode 100644
index 00000000000..fe6e6023d32
--- /dev/null
+++ b/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-5.4.155-r1.ebuild
@@ -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##*.} + 4 ))
+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
+}

Reply via email to