Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 762766 | Differences between
and this patch

Collapse All | Expand All

(-)/var/db/repos/gentoo/sys-kernel/raspberrypi-sources/raspberrypi-sources-5.4.79_p20201201.ebuild.orig (-8 / +60 lines)
Lines 1-26 Link Here
1
# Copyright 1999-2020 Gentoo Authors
1
# Copyright 1999-2020 Gentoo Authors
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
3
4
EAPI=6
4
# Note: BOARD variable can be passed by /etc/portage/make.conf,
5
#	like BOARD="pi4-64", otherwise `cat /proc/cpuinfo` will be used.
5
6
7
EAPI=6
6
ETYPE=sources
8
ETYPE=sources
7
K_DEFCONFIG="bcmrpi_defconfig"
8
K_SECURITY_UNSUPPORTED=1
9
EXTRAVERSION="-${PN}/-*"
10
9
11
inherit kernel-2 eapi7-ver
10
inherit kernel-2 eapi7-ver
12
detect_version
11
detect_version
13
detect_arch
12
detect_arch
14
13
15
MY_PV=$(ver_cut 4-)
14
MY_PV=$(ver_cut 4-)
16
MY_PV=${MY_PV/p/}
15
KV_FULL="raspberrypi-kernel_1.${MY_PV/p/}-1"
17
DESCRIPTION="Raspberry Pi kernel sources"
16
DESCRIPTION="Raspberry Pi kernel sources"
18
HOMEPAGE="https://github.com/raspberrypi/linux"
17
HOMEPAGE="https://github.com/raspberrypi/linux"
19
SRC_URI="https://github.com/raspberrypi/linux/archive/raspberrypi-kernel_1.${MY_PV}-1.tar.gz"
18
SRC_URI="https://github.com/raspberrypi/linux/archive/${KV_FULL}.tar.gz"
20
S="${WORKDIR}/linux-raspberrypi-kernel_1.${MY_PV}-1"
19
S="${WORKDIR}/linux-${KV_FULL}"
21
20
22
KEYWORDS="~arm ~arm64"
21
KEYWORDS="arm ~arm arm64 ~arm64"
23
22
24
src_unpack() {
23
src_unpack() {
25
	default
24
	default
25
	# Setup xmakeopts and cd into sourcetree.
26
	echo ">>> env_setup_xmakeopts"
27
	env_setup_xmakeopts
28
	cd "${S}"
29
}
30
31
src_prepare() {
32
	default
33
	echo ">>> make mrproper"
34
	make mrproper
35
}
36
37
src_configure() {
38
	default
39
	if [[ ! -v BOARD ]]; then
40
	  BOARD=$(cat /proc/cpuinfo | grep "Revision" | cut -d " " -f2 | awk '{print$1}')
41
	fi
42
	echo ">>>   board tis $BOARD"
43
#rpi
44
  if [ "$(cat /proc/cpuinfo | grep "Hardware" | cut -d " " -f2 | awk '{print$1}')" = "BCM2708" ]; then
45
    K_DEFCONFIG="bcmrpi_defconfig"
46
  else
47
	case ${BOARD} in
48
	  900021|900032|900092|900093|900061|9000c1|pi)
49
	    K_DEFCONFIG="bcmrpi_defconfig"
50
	    ;;
51
	  a01040|a21041|p2)
52
	    K_DEFCONFIG="bcm2708_defconfig"
53
	    ;;
54
	  9020e0|a02042|a22042|a22082|a220a0|a020d3|a32082|a020d3|a22083|a02100|pi3|pi3-64)
55
	    arm?
56
	      K_DEFCONFIG="bcm2709_defconfig"
57
	    arm64?
58
	      K_DEFCONFIG="bcmrpi3_defconfig"
59
	    ;;
60
	  a03111|b03111|b03112|c03111|c03112|c03114|d03114|c03130|pi4|pi4-64)
61
	    K_DEFCONFIG="bcm2711_defconfig"
62
	    ;;
63
	  *)
64
	    echo "So, So, Sorry, Unknown pi"
65
	    exit 3
66
	    ;;
67
	  esac
68
  fi
69
}
70
71
src_compile() {
72
	echo ">>> make $K_DEFCONFIG"
73
	make $K_DEFCONFIG
74
	echo ">>> make prepare"
75
	make prepare
76
	echo ">>> make oldconfig"
77
	make oldconfig
26
}
78
}

Return to bug 762766