Diff gentoo-kernel-5.4.257 with a gentoo-kernel-5.10.197

/usr/portage/sys-kernel/gentoo-kernel/gentoo-kernel-5.10.197.ebuild 2023-10-09 14:52:35.528368502 +0300
3 3

  
4 4
EAPI=8
5 5

  
6
inherit kernel-build
6
inherit kernel-build toolchain-funcs
7 7

  
8 8
MY_P=linux-${PV%.*}
9
GENPATCHES_P=genpatches-${PV%.*}-$(( ${PV##*.} + 7 ))
9
GENPATCHES_P=genpatches-${PV%.*}-$(( ${PV##*.} + 10 ))
10 10
# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
11
CONFIG_VER=5.4.21
12
CONFIG_HASH=2809b7faa6a8cb232cd825096c146b7bdc1e08ea
11
CONFIG_VER=5.10.12
12
CONFIG_HASH=836165dd2dff34e4f2c47ca8f9c803002c1e6530
13 13
GENTOO_CONFIG_VER=g9
14 14

  
15 15
DESCRIPTION="Linux kernel built with Gentoo patches"
......
24 24
	https://github.com/projg2/gentoo-kernel-config/archive/${GENTOO_CONFIG_VER}.tar.gz
25 25
		-> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz
26 26
	amd64? (
27
		https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-x86_64.config
28
			-> kernel-x86_64.config.${CONFIG_VER}
27
		https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-x86_64-fedora.config
28
			-> kernel-x86_64-fedora.config.${CONFIG_VER}
29 29
	)
30 30
	arm64? (
31
		https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-aarch64.config
32
			-> kernel-aarch64.config.${CONFIG_VER}
31
		https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-aarch64-fedora.config
32
			-> kernel-aarch64-fedora.config.${CONFIG_VER}
33 33
	)
34 34
	ppc64? (
35
		https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-ppc64le.config
36
			-> kernel-ppc64le.config.${CONFIG_VER}
35
		https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-ppc64le-fedora.config
36
			-> kernel-ppc64le-fedora.config.${CONFIG_VER}
37 37
	)
38 38
	x86? (
39
		https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-i686.config
40
			-> kernel-i686.config.${CONFIG_VER}
39
		https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-i686-fedora.config
40
			-> kernel-i686-fedora.config.${CONFIG_VER}
41 41
	)
42 42
"
43 43
S=${WORKDIR}/${MY_P}
44 44

  
45 45
LICENSE="GPL-2"
46
KEYWORDS="amd64 arm64 ~ppc ppc64 x86"
47
IUSE="debug"
46
KEYWORDS="amd64 ~arm arm64 ~hppa ~ppc ppc64 x86"
47
IUSE="debug hardened"
48
REQUIRED_USE="arm? ( savedconfig )"
48 49

  
49 50
RDEPEND="
50 51
	!sys-kernel/gentoo-kernel-bin:${SLOT}
......
56 57
	>=virtual/dist-kernel-${PV}
57 58
"
58 59

  
60
QA_FLAGS_IGNORED="
61
	usr/src/linux-.*/scripts/gcc-plugins/.*.so
62
	usr/src/linux-.*/vmlinux
63
"
64

  
59 65
src_prepare() {
60 66
	local PATCHES=(
61 67
		# meh, genpatches have no directory
......
63 69
	)
64 70
	default
65 71

  
72
	local biendian=false
73

  
66 74
	# prepare the default config
67 75
	case ${ARCH} in
68 76
		amd64)
69
			cp "${DISTDIR}/kernel-x86_64.config.${CONFIG_VER}" .config || die
77
			cp "${DISTDIR}/kernel-x86_64-fedora.config.${CONFIG_VER}" .config || die
78
			;;
79
		arm)
80
			return
70 81
			;;
71 82
		arm64)
72
			cp "${DISTDIR}/kernel-aarch64.config.${CONFIG_VER}" .config || die
83
			cp "${DISTDIR}/kernel-aarch64-fedora.config.${CONFIG_VER}" .config || die
84
			biendian=true
85
			;;
86
		hppa)
87
			return
73 88
			;;
74 89
		ppc)
75 90
			# assume powermac/powerbook defconfig
......
77 92
			cp "${WORKDIR}/${MY_P}/arch/powerpc/configs/pmac32_defconfig" .config || die
78 93
			;;
79 94
		ppc64)
80
			cp "${DISTDIR}/kernel-ppc64le.config.${CONFIG_VER}" .config || die
95
			cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die
96
			biendian=true
81 97
			;;
82 98
		x86)
83
			cp "${DISTDIR}/kernel-i686.config.${CONFIG_VER}" .config || die
99
			cp "${DISTDIR}/kernel-i686-fedora.config.${CONFIG_VER}" .config || die
84 100
			;;
85 101
		*)
86 102
			die "Unsupported arch ${ARCH}"
87 103
			;;
88 104
	esac
89 105

  
90
	echo 'CONFIG_LOCALVERSION="-gentoo-dist"' > "${T}"/version.config || die
106
	local myversion="-gentoo-dist"
107
	use hardened && myversion+="-hardened"
108
	echo "CONFIG_LOCALVERSION=\"${myversion}\"" > "${T}"/version.config || die
109
	local dist_conf_path="${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"
110

  
91 111
	local merge_configs=(
92 112
		"${T}"/version.config
93
		"${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"/base.config
113
		"${dist_conf_path}"/base.config
94 114
	)
95 115
	use debug || merge_configs+=(
96
		"${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"/no-debug.config
97
	)
98
	[[ ${ARCH} == x86 ]] && merge_configs+=(
99
		"${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"/32-bit.config
116
		"${dist_conf_path}"/no-debug.config
100 117
	)
118
	if use hardened; then
119
		merge_configs+=( "${dist_conf_path}"/hardened-base.config )
120

  
121
		tc-is-gcc && merge_configs+=( "${dist_conf_path}"/hardened-gcc-plugins.config )
122

  
123
		if [[ -f "${dist_conf_path}/hardened-${ARCH}.config" ]]; then
124
			merge_configs+=( "${dist_conf_path}/hardened-${ARCH}.config" )
125
		fi
126
	fi
127

  
128
	# this covers ppc64 and aarch64_be only for now
129
	if [[ ${biendian} == true && $(tc-endian) == big ]]; then
130
		merge_configs+=( "${dist_conf_path}/big-endian.config" )
131
	fi
101 132

  
102 133
	kernel-build_merge_configs "${merge_configs[@]}"
103 134
}
Thank you!