3 |
3 |
|
4 |
4 |
EAPI=8
|
5 |
5 |
|
6 |
|
inherit git-r3 kernel-build toolchain-funcs
|
|
6 |
KERNEL_IUSE_MODULES_SIGN=1
|
|
7 |
inherit kernel-build toolchain-funcs verify-sig
|
7 |
8 |
|
|
9 |
MY_P=linux-${PV}
|
8 |
10 |
# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
|
9 |
11 |
# forked to https://github.com/projg2/fedora-kernel-config-for-gentoo
|
10 |
|
CONFIG_VER=6.1.7-gentoo
|
11 |
|
GENTOO_CONFIG_VER=g7
|
|
12 |
CONFIG_VER=6.5.4-gentoo
|
|
13 |
GENTOO_CONFIG_VER=g9
|
12 |
14 |
|
13 |
15 |
DESCRIPTION="Linux kernel built from vanilla upstream sources"
|
14 |
16 |
HOMEPAGE="
|
... | ... | |
16 |
18 |
https://www.kernel.org/
|
17 |
19 |
"
|
18 |
20 |
SRC_URI+="
|
|
21 |
https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.xz
|
19 |
22 |
https://github.com/projg2/gentoo-kernel-config/archive/${GENTOO_CONFIG_VER}.tar.gz
|
20 |
23 |
-> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz
|
|
24 |
verify-sig? (
|
|
25 |
https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.sign
|
|
26 |
)
|
21 |
27 |
amd64? (
|
22 |
28 |
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-x86_64-fedora.config
|
23 |
29 |
-> kernel-x86_64-fedora.config.${CONFIG_VER}
|
... | ... | |
35 |
41 |
-> kernel-i686-fedora.config.${CONFIG_VER}
|
36 |
42 |
)
|
37 |
43 |
"
|
38 |
|
|
39 |
|
EGIT_REPO_URI=(
|
40 |
|
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
|
41 |
|
https://github.com/gregkh/linux/
|
42 |
|
)
|
43 |
|
EGIT_BRANCH="linux-${PV/.9999/.y}"
|
|
44 |
S=${WORKDIR}/${MY_P}
|
44 |
45 |
|
45 |
46 |
LICENSE="GPL-2"
|
46 |
|
KEYWORDS=""
|
|
47 |
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86"
|
47 |
48 |
IUSE="debug hardened"
|
48 |
49 |
REQUIRED_USE="arm? ( savedconfig )"
|
49 |
50 |
|
50 |
51 |
BDEPEND="
|
51 |
52 |
debug? ( dev-util/pahole )
|
|
53 |
verify-sig? ( sec-keys/openpgp-keys-kernel )
|
52 |
54 |
"
|
53 |
55 |
PDEPEND="
|
54 |
|
>=virtual/dist-kernel-$(ver_cut 1-2)
|
|
56 |
>=virtual/dist-kernel-${PV}
|
55 |
57 |
"
|
56 |
58 |
|
|
59 |
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/kernel.org.asc
|
|
60 |
|
57 |
61 |
src_unpack() {
|
58 |
|
git-r3_src_unpack
|
59 |
|
default
|
|
62 |
if use verify-sig; then
|
|
63 |
einfo "Unpacking linux-${PV}.tar.xz ..."
|
|
64 |
verify-sig_verify_detached - "${DISTDIR}"/linux-${PV}.tar.sign \
|
|
65 |
< <(xz -cd "${DISTDIR}"/linux-${PV}.tar.xz | tee >(tar -x))
|
|
66 |
assert "Unpack failed"
|
|
67 |
unpack "gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz"
|
|
68 |
else
|
|
69 |
default
|
|
70 |
fi
|
60 |
71 |
}
|
61 |
72 |
|
62 |
73 |
src_prepare() {
|
... | ... | |
123 |
134 |
merge_configs+=( "${dist_conf_path}/big-endian.config" )
|
124 |
135 |
fi
|
125 |
136 |
|
|
137 |
use secureboot && merge_configs+=( "${dist_conf_path}/secureboot.config" )
|
|
138 |
|
126 |
139 |
kernel-build_merge_configs "${merge_configs[@]}"
|
127 |
140 |
}
|