Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-kernel/gentoo-kernel-bin/
Date: Sat, 04 Sep 2021 04:40:36
Message-Id: 1630730396.22d3e46447e71e43ff849e30bc1c8f97bff8d0fd.sam@gentoo
1 commit: 22d3e46447e71e43ff849e30bc1c8f97bff8d0fd
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 4 04:39:56 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 4 04:39:56 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22d3e464
7
8 sys-kernel/gentoo-kernel-bin: add 5.4.144-r1 for arm64
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 sys-kernel/gentoo-kernel-bin/Manifest | 1 +
13 .../gentoo-kernel-bin-5.4.144-r1.ebuild | 113 +++++++++++++++++++++
14 2 files changed, 114 insertions(+)
15
16 diff --git a/sys-kernel/gentoo-kernel-bin/Manifest b/sys-kernel/gentoo-kernel-bin/Manifest
17 index 83249976ba1..75f48a5dd2c 100644
18 --- a/sys-kernel/gentoo-kernel-bin/Manifest
19 +++ b/sys-kernel/gentoo-kernel-bin/Manifest
20 @@ -39,6 +39,7 @@ DIST gentoo-kernel-5.4.143-1.amd64.xpak 61390242 BLAKE2B ad507c5506cbeb4b00d26e3
21 DIST gentoo-kernel-5.4.143-1.arm64.xpak 58039783 BLAKE2B 09c6215854947eaf3a45c6d2e64d910d39c98a55710d7c4289e346c77d1a3b61caeaf15c0a8f57504e566f9ce7efd84c971d11d530986d5ff3febe6c83692723 SHA512 40bee6436a9bb02819e936232134dd9c686dadec07ae5c8af4e70061e89371d83e1820285470800d19b383c7ad960c28d2bc0709eff566f7042ca7f4b7eeee22
22 DIST gentoo-kernel-5.4.143-1.x86.xpak 53174505 BLAKE2B 04e4ce00d2630e4893d4948a0cd27f394f97c1ce73a031a8f0da8cd232bfdd1058f4796c030e51c8be0cbaaf7587cd7101ec111e239636b4a07b9790134599a3 SHA512 e95c37baed7912873dd524e930c2f5b443c3f320e2d6b4536926feb9d0450b282c527a6ee95c3fb1c59cbb535b8e404de9bb45e88492e161c05edd42c71429eb
23 DIST gentoo-kernel-5.4.144-1.amd64.xpak 61366776 BLAKE2B 24745e27ead7e35eab3cbf2ae4217b47cc522aec6db999bd2d44da9b575568c9e8e45ee37e922d15ccf86739772baf30416a9d35a24af989263ff11bb6e80fa6 SHA512 f80f858569ab847e0e45b5cca7be3cfc4cf1ddad17da213d608cd0bb2dc60e28b5066d5dcb1f96c644cc6ae696ca8a0f15b109a6dcd12a08410f629dafc7617f
24 +DIST gentoo-kernel-5.4.144-1.arm64.xpak 57983262 BLAKE2B 473427e2370a3e05fabf0a4364c3e9946322d0340c7ac1335184aa737cc5476147a95c14fa9c1cc36e60ab4420f7dc0df85d99576ff88d7a6647094fe29af3a6 SHA512 7001a486a41c2d18f899b64f9b75d1d7e4b9fe202af07099fe9523122c05620c00bfb66d253457e8c5e6417f7885ebdefc78df9ffeecf2ff2fbf8aa76926493f
25 DIST gentoo-kernel-5.4.144-1.x86.xpak 53171435 BLAKE2B 188f4ca01ebec91a21c3bc4f6d5f3c65ae84c97b06e077f9b2f75d070b50d92d91a3586783b65b72097b03d7d4cace451e51592fd970126bfb77e7fcc34becad SHA512 5f6536748b67944e007b0f84cfa493cfa70159a134840962db92cd092c15a29a0116b64011b932871909055b11dd6b693a61c4c2210a9ab97041ff396219b93f
26 DIST linux-5.10.tar.xz 116606704 BLAKE2B b923d7b66309224f42f35f8a5fa219421b0a9362d2adacdadd8d96251f61f7230878ea297a269a7f3b3c56830f0b177e068691e1d7f88501a05653b0a13274d1 SHA512 95bc137d0cf9148da6a9d1f1a878698dc27b40f68e22c597544010a6c591ce1b256f083489d3ff45ff77753289b535135590194d88ef9f007d0ddab3d74de70e
27 DIST linux-5.12.tar.xz 118112412 BLAKE2B 842d921b9a73d2aaade763dbd2ec67bdfe0275baa6d628b775f5c87574ad7dc86f0419afcd48c10c1235f4bffa16084243f2cf4556e6afcd391e975fe8ba530b SHA512 be03b6fee1d1ea8087b09874d27c0a602c0b04fd90ad38b975bd2c8455a07e83c29b56814aaf1389e82305fae0e4c2d1701075a7f0a7295dd28149f967ec5b3d
28
29 diff --git a/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-5.4.144-r1.ebuild b/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-5.4.144-r1.ebuild
30 new file mode 100644
31 index 00000000000..fe6e6023d32
32 --- /dev/null
33 +++ b/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-5.4.144-r1.ebuild
34 @@ -0,0 +1,113 @@
35 +# Copyright 2020-2021 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=7
39 +
40 +inherit kernel-install toolchain-funcs
41 +
42 +MY_P=linux-${PV%.*}
43 +GENPATCHES_P=genpatches-${PV%.*}-$(( ${PV##*.} + 4 ))
44 +BINPKG=${P/-bin/}-1
45 +
46 +DESCRIPTION="Pre-built Linux kernel with genpatches"
47 +HOMEPAGE="https://www.kernel.org/"
48 +SRC_URI+="
49 + https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.xz
50 + https://dev.gentoo.org/~mpagano/dist/genpatches/${GENPATCHES_P}.base.tar.xz
51 + https://dev.gentoo.org/~mpagano/dist/genpatches/${GENPATCHES_P}.extras.tar.xz
52 + arm64? (
53 + https://dev.gentoo.org/~sam/binpkg/arm64/kernel/sys-kernel/gentoo-kernel/${BINPKG}.xpak
54 + -> ${BINPKG}.arm64.xpak
55 + )"
56 +S=${WORKDIR}
57 +
58 +LICENSE="GPL-2"
59 +KEYWORDS="~arm64"
60 +
61 +RDEPEND="
62 + !sys-kernel/gentoo-kernel:${SLOT}"
63 +PDEPEND="
64 + >=virtual/dist-kernel-${PV}"
65 +BDEPEND="
66 + sys-devel/bc
67 + sys-devel/flex
68 + virtual/libelf
69 + virtual/yacc"
70 +
71 +QA_PREBUILT='*'
72 +
73 +KV_LOCALVERSION='-gentoo-dist'
74 +KPV=${PV}${KV_LOCALVERSION}
75 +
76 +src_unpack() {
77 + default
78 + ebegin "Unpacking ${BINPKG}.${ARCH}.xpak"
79 + tar -x < <(xz -c -d --single-stream "${DISTDIR}/${BINPKG}.${ARCH}.xpak")
80 + eend ${?} || die "Unpacking ${BINPKG} failed"
81 +}
82 +
83 +src_prepare() {
84 + local PATCHES=(
85 + # meh, genpatches have no directory
86 + "${WORKDIR}"/*.patch
87 + )
88 + cd "${MY_P}" || die
89 + default
90 +}
91 +
92 +src_configure() {
93 + # force ld.bfd if we can find it easily
94 + local LD="$(tc-getLD)"
95 + if type -P "${LD}.bfd" &>/dev/null; then
96 + LD+=.bfd
97 + fi
98 +
99 + tc-export_build_env
100 + local makeargs=(
101 + V=1
102 +
103 + HOSTCC="$(tc-getBUILD_CC)"
104 + HOSTCXX="$(tc-getBUILD_CXX)"
105 + HOSTCFLAGS="${BUILD_CFLAGS}"
106 + HOSTLDFLAGS="${BUILD_LDFLAGS}"
107 +
108 + CROSS_COMPILE=${CHOST}-
109 + AS="$(tc-getAS)"
110 + CC="$(tc-getCC)"
111 + LD="${LD}"
112 + AR="$(tc-getAR)"
113 + NM="$(tc-getNM)"
114 + STRIP=":"
115 + OBJCOPY="$(tc-getOBJCOPY)"
116 + OBJDUMP="$(tc-getOBJDUMP)"
117 +
118 + # we need to pass it to override colliding Gentoo envvar
119 + ARCH=$(tc-arch-kernel)
120 +
121 + O="${WORKDIR}"/modprep
122 + )
123 +
124 + mkdir modprep || die
125 + cp "usr/src/linux-${KPV}/.config" modprep/ || die
126 + emake -C "${MY_P}" "${makeargs[@]}" modules_prepare
127 +}
128 +
129 +src_test() {
130 + kernel-install_test "${KPV}" \
131 + "${WORKDIR}/usr/src/linux-${KPV}/$(dist-kernel_get_image_path)" \
132 + "lib/modules/${KPV}"
133 +}
134 +
135 +src_install() {
136 + mv lib usr "${ED}"/ || die
137 +
138 + # strip out-of-source build stuffs from modprep
139 + # and then copy built files
140 + find modprep -type f '(' \
141 + -name Makefile -o \
142 + -name '*.[ao]' -o \
143 + '(' -name '.*' -a -not -name '.config' ')' \
144 + ')' -delete || die
145 + rm modprep/source || die
146 + cp -p -R modprep/. "${ED}/usr/src/linux-${KPV}"/ || die
147 +}