summaryrefslogtreecommitdiff
path: root/recipes-kernel/linux/linux-tsd_4.4.bb
blob: 1d9256c39a48cd43f5412b364306a60cacbc864f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Copyright (C) 2021 Quentin Schulz <quentin.schulz@theobroma-systems.com>
# Released under the MIT license (see COPYING.MIT for the terms)

SUMMARY = "Theobroma Systems Rockchip Android Vendor Linux kernel"
LICENSE = "GPL-2.0"
SECTION = "kernel"

LIC_FILES_CHKSUM = "file://${WORKDIR}/git/COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"

SRC_GIT_REPO = "git://git.theobroma-systems.com/puma-linux.git"
SRC_GIT_REPO_PROTO = ";protocol=https"
SRC_GIT_BRANCH = ";branch=stable-4.4-rk3399-linux-v2.1x-20190705-som"

SRC_URI = " \
	${SRC_GIT_REPO}${SRC_GIT_REPO_PROTO}${SRC_GIT_BRANCH} \
	${SRC_URI_PATCHES} \
"
SRCREV = "7f582a02c1845430123928ab0b5342153060dde6"

inherit kernel

S = "${WORKDIR}/git"

SRC_URI_PATCHES ?= " \
	file://0001-scripts-dtc-Remove-redundant-YYLOC-global-declaratio.patch \
"

DEFCONFIG ?= "puma-rk3399_defconfig"

BUILD_CFLAGS += "-Wno-stringop-overflow"

# Borrowed from kernel-yocto.bbclass:do_kernel_metadata()
do_configure:prepend () {
	if [ -n "${DEFCONFIG}" ]; then
		if [ -f "${S}/arch/${ARCH}/configs/${DEFCONFIG}" ]; then
			if [ -f "${WORKDIR}/defconfig" ]; then
				# If the two defconfig's are different, warn that we overwrote the
				# one already placed in WORKDIR
				cmp "${WORKDIR}/defconfig" "${S}/arch/${ARCH}/configs/${DEFCONFIG}"
				if [ $? -ne 0 ]; then
					bbdebug 1 "detected SRC_URI or unpatched defconfig in WORKDIR. ${DEFCONFIG} copied over it"
				fi
				cp -f ${S}/arch/${ARCH}/configs/${DEFCONFIG} ${WORKDIR}/defconfig
			else
				cp -f ${S}/arch/${ARCH}/configs/${DEFCONFIG} ${WORKDIR}/defconfig
			fi
		fi
	fi
}

COMPATIBLE_MACHINE = "puma-haikou"