summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYogesh Siraswar <yogeshs@ti.com>2021-05-21 04:51:08 -0500
committerYogesh Siraswar <yogeshs@ti.com>2021-07-13 17:39:04 +0000
commit1f0e915356fbe9504350427373d67682656e54ff (patch)
treef3a8f8500f02431215c8fe2c42d248adcf4c7e9b
parent9ada213d1e7ad90e5a3b73c21fec24f57e6b0601 (diff)
downloadmeta-ti-1f0e915356fbe9504350427373d67682656e54ff.tar.gz
linux-ti-staging: Add extra dtc flags to support dtb overlays
Added KERNEL_DTB_OVERLAY_SUPPORT to common ti-soc include. This fixes the issue where the dtbs are build without symbols causing issue with overlays. Please note this increases the size of the dtb for all platform derived from ti-soc. So for custom boards disable it from local.conf to reduce size. Signed-off-by: Yogesh Siraswar <yogeshs@ti.com>
-rw-r--r--conf/machine/include/ti-soc.inc1
-rw-r--r--recipes-kernel/linux/linux-ti-mainline_git.bb6
-rw-r--r--recipes-kernel/linux/linux-ti-staging_5.10.bb6
-rw-r--r--recipes-kernel/linux/ti-kernel.inc9
4 files changed, 18 insertions, 4 deletions
diff --git a/conf/machine/include/ti-soc.inc b/conf/machine/include/ti-soc.inc
index 227d8972..2792d2a0 100644
--- a/conf/machine/include/ti-soc.inc
+++ b/conf/machine/include/ti-soc.inc
@@ -1,4 +1,5 @@
1# This is a generic TI SOC family. It is a superset of all other SOCs 1# This is a generic TI SOC family. It is a superset of all other SOCs
2# and platforms defined in meta-ti to allow BSP-level overrides. 2# and platforms defined in meta-ti to allow BSP-level overrides.
3SOC_FAMILY = "ti-soc" 3SOC_FAMILY = "ti-soc"
4KERNEL_DTB_OVERLAY_SUPPORT ?= "1"
4require conf/machine/include/soc-family.inc 5require conf/machine/include/soc-family.inc
diff --git a/recipes-kernel/linux/linux-ti-mainline_git.bb b/recipes-kernel/linux/linux-ti-mainline_git.bb
index fc16485d..6770adca 100644
--- a/recipes-kernel/linux/linux-ti-mainline_git.bb
+++ b/recipes-kernel/linux/linux-ti-mainline_git.bb
@@ -8,10 +8,12 @@ inherit kernel
8DEFCONFIG_BUILDER = "${WORKDIR}/ti-upstream-tools/config/defconfig_builder.sh" 8DEFCONFIG_BUILDER = "${WORKDIR}/ti-upstream-tools/config/defconfig_builder.sh"
9require recipes-kernel/linux/setup-defconfig.inc 9require recipes-kernel/linux/setup-defconfig.inc
10require recipes-kernel/linux/kernel-rdepends.inc 10require recipes-kernel/linux/kernel-rdepends.inc
11require recipes-kernel/linux/ti-kernel.inc
11 12
12DEPENDS += "gmp-native" 13DEPENDS += "gmp-native"
13 14
14KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}" 15KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT} \
16 ${EXTRA_DTC_ARGS}"
15 17
16S = "${WORKDIR}/git" 18S = "${WORKDIR}/git"
17 19
@@ -23,7 +25,7 @@ SRCREV = "9f4ad9e425a1d3b6a34617b8ea226d56a119a717"
23PV = "5.12+git${SRCPV}" 25PV = "5.12+git${SRCPV}"
24 26
25# Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild 27# Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild
26MACHINE_KERNEL_PR_append = "a" 28MACHINE_KERNEL_PR_append = "b"
27PR = "${MACHINE_KERNEL_PR}" 29PR = "${MACHINE_KERNEL_PR}"
28 30
29KERNEL_GIT_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git" 31KERNEL_GIT_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git"
diff --git a/recipes-kernel/linux/linux-ti-staging_5.10.bb b/recipes-kernel/linux/linux-ti-staging_5.10.bb
index 4ec19af7..0a134f93 100644
--- a/recipes-kernel/linux/linux-ti-staging_5.10.bb
+++ b/recipes-kernel/linux/linux-ti-staging_5.10.bb
@@ -11,11 +11,13 @@ require recipes-kernel/linux/cmem.inc
11require recipes-kernel/linux/ti-uio.inc 11require recipes-kernel/linux/ti-uio.inc
12require recipes-kernel/linux/bundle-devicetree.inc 12require recipes-kernel/linux/bundle-devicetree.inc
13require recipes-kernel/linux/kernel-rdepends.inc 13require recipes-kernel/linux/kernel-rdepends.inc
14require recipes-kernel/linux/ti-kernel.inc
14 15
15# Look in the generic major.minor directory for files 16# Look in the generic major.minor directory for files
16FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-5.10:" 17FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-5.10:"
17 18
18KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}" 19KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT} \
20 ${EXTRA_DTC_ARGS}"
19 21
20S = "${WORKDIR}/git" 22S = "${WORKDIR}/git"
21 23
@@ -25,7 +27,7 @@ SRCREV = "d85aee3e19aa7403bd157d2ae30917e736096a7f"
25PV = "5.10.30+git${SRCPV}" 27PV = "5.10.30+git${SRCPV}"
26 28
27# Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild 29# Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild
28MACHINE_KERNEL_PR_append = "a" 30MACHINE_KERNEL_PR_append = "b"
29PR = "${MACHINE_KERNEL_PR}" 31PR = "${MACHINE_KERNEL_PR}"
30 32
31KERNEL_GIT_URI = "git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git" 33KERNEL_GIT_URI = "git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git"
diff --git a/recipes-kernel/linux/ti-kernel.inc b/recipes-kernel/linux/ti-kernel.inc
new file mode 100644
index 00000000..a7eb476e
--- /dev/null
+++ b/recipes-kernel/linux/ti-kernel.inc
@@ -0,0 +1,9 @@
1# Add DTC FLAGS -@ when KERNEL_DTB_OVERLAY_SUPPORT is enabled
2
3def get_extra_dtc_args(d):
4 if d.getVar('KERNEL_DTB_OVERLAY_SUPPORT') == "1":
5 return "DTC_FLAGS=-@"
6 else:
7 return ""
8
9EXTRA_DTC_ARGS += "${@get_extra_dtc_args(d)}"