Skip to contentSkip to conversation

linux-dtb.inc: overlay the latest version from oe-core/master

PATCH In review Denys Dmytriyenko 2 participants 4 messages Aug 26, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 linux-dtb.inc: overlay the latest version from oe-core/master

From: Denys Dmytriyenko <[email protected]>

With recent kernel versions now using CPP and kernel headers, it's better to use kernel's in-tree DTB compilation instead of building and using our own DTC compiler externally. This overlays the changed approach from latest oe-core/master into Dylan.

---
 recipes-kernel/linux/linux-dtb.inc | 69 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 69 insertions(+)
 create mode 100644 recipes-kernel/linux/linux-dtb.inc
recipes-kernel/linux/linux-dtb.inc new file +69 -0
new file mode 100644
index 0000000..6b8f1a5
@@ -0,0 +1,69 @@
+# Support for device tree generation
+FILES_kernel-devicetree = "/${KERNEL_IMAGEDEST}/devicetree*"
+
+python __anonymous () {
+    d.appendVar("PACKAGES", " kernel-devicetree")
+}
+
+do_install_append() {
+	if test -n "${KERNEL_DEVICETREE}"; then
+		for DTB in ${KERNEL_DEVICETREE}; do
+			if echo ${DTB} | grep -q '/dts/'; then
+				bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."
+				DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
+			fi
+			DTB_BASE_NAME=`basename ${DTB} .dtb`
+			DTB_NAME=`echo ${KERNEL_IMAGE_BASE_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
+			DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
+			DTB_PATH="${B}/arch/${ARCH}/boot/dts/${DTB}"
+			oe_runmake ${DTB}
+			if [ ! -e "${DTB_PATH}" ]; then
+				DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}"
+			fi
+			install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.dtb
+		done
+	fi
+}
+
+do_deploy_append() {
+	if test -n "${KERNEL_DEVICETREE}"; then
+		for DTB in ${KERNEL_DEVICETREE}; do
+			if echo ${DTB} | grep -q '/dts/'; then
+				bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."
+				DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
+			fi
+			DTB_BASE_NAME=`basename ${DTB} .dtb`
+			DTB_NAME=`echo ${KERNEL_IMAGE_BASE_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
+			DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
+			DTB_PATH="${B}/arch/${ARCH}/boot/dts/${DTB}"
+			if [ ! -e "${DTB_PATH}" ]; then
+				DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}"
+			fi
+			install -d ${DEPLOYDIR}
+			install -m 0644 ${DTB_PATH} ${DEPLOYDIR}/${DTB_NAME}.dtb
+			cd ${DEPLOYDIR}
+			ln -sf ${DTB_NAME}.dtb ${DTB_SYMLINK_NAME}.dtb
+			cd -
+		done
+	fi
+}
+
+pkg_postinst_kernel-devicetree () {
+	cd /${KERNEL_IMAGEDEST}
+	for DTB_FILE in ${KERNEL_DEVICETREE}
+	do
+		DTB_BASE_NAME=`basename ${DTB_FILE} | awk -F "." '{print $1}'`
+		DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
+		update-alternatives --install /${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.dtb ${DTB_BASE_NAME}.dtb devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true
+	done
+}
+
+pkg_postrm_kernel-devicetree () {
+	cd /${KERNEL_IMAGEDEST}
+	for DTB_FILE in ${KERNEL_DEVICETREE}
+	do
+		DTB_BASE_NAME=`basename ${DTB_FILE} | awk -F "." '{print $1}'`
+		DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
+		update-alternatives --remove ${DTB_BASE_NAME}.dtb devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true
+	done
+}
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH 2/2 linux-ti-staging/linux-ti-glsdk: adjust DTB handling to new syntax

From: Denys Dmytriyenko <[email protected]>

---
 recipes-kernel/linux/linux-ti-glsdk_3.8.bb   |  6 +++---
 recipes-kernel/linux/linux-ti-staging_3.8.bb | 12 ++++++------
 recipes-kernel/linux/linux-ti-staging_git.bb | 14 +++++++-------
 3 files changed, 16 insertions(+), 16 deletions(-)
recipes-kernel/linux/linux-ti-glsdk_3.8.bb +3 -3
index 9e3e499..5fd17f8 100644
@@ -9,8 +9,8 @@ inherit kernel
 require recipes-kernel/linux/linux-dtb.inc
 require recipes-kernel/linux/setup-defconfig.inc
 
-KERNEL_DEVICETREE_omap5-evm = "arch/arm/boot/dts/omap5-sevm.dts arch/arm/boot/dts/omap5-uevm.dts"
-KERNEL_DEVICETREE_dra7xx-evm = "arch/arm/boot/dts/dra7-evm.dts"
+KERNEL_DEVICETREE_omap5-evm = "omap5-sevm.dtb omap5-uevm.dtb"
+KERNEL_DEVICETREE_dra7xx-evm = "dra7-evm.dtb"
 
 COMPATIBLE_MACHINE = "omap-a15"
 
@@ -24,7 +24,7 @@ SRCREV = "6076e6882d1d6a64b104e42e56a3eada36605cb3"
 PV = "3.8.13"
 
 # Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild
-MACHINE_KERNEL_PR_append = "b+gitr${SRCPV}"
+MACHINE_KERNEL_PR_append = "c+gitr${SRCPV}"
 
 SRC_URI = "git://git.ti.com/ti-linux-kernel/ti-linux-3-8-y-kernel.git;protocol=git;branch=${BRANCH} \
            file://defconfig \
recipes-kernel/linux/linux-ti-staging_3.8.bb +6 -6
index 29ffebc..fd7b671 100644
@@ -13,12 +13,12 @@ require recipes-kernel/linux/setup-defconfig.inc
 # on the target file system.
 RDEPENDS_kernel-base_ti33x += "am33x-cm3 am33x-cm3-initscript"
 
-# Default is to package all dts files for ti33x devices unless building
+# Default is to package all dtb files for ti33x devices unless building
 # for the specific beaglebone machine.
-KERNEL_DEVICETREE_ti33x = "arch/arm/boot/dts/am335x-evm.dts arch/arm/boot/dts/am335x-evmsk.dts arch/arm/boot/dts/am335x-bone.dts"
-KERNEL_DEVICETREE_beaglebone = "arch/arm/boot/dts/am335x-bone.dts"
-KERNEL_DEVICETREE_omap5-evm = "arch/arm/boot/dts/omap5-sevm.dts arch/arm/boot/dts/omap5-uevm.dts"
-KERNEL_DEVICETREE_dra7xx-evm = "arch/arm/boot/dts/dra7-evm.dts"
+KERNEL_DEVICETREE_ti33x = "am335x-evm.dtb am335x-evmsk.dtb am335x-bone.dtb"
+KERNEL_DEVICETREE_beaglebone = "am335x-bone.dtb"
+KERNEL_DEVICETREE_omap5-evm = "omap5-sevm.dtb omap5-uevm.dtb"
+KERNEL_DEVICETREE_dra7xx-evm = "dra7-evm.dtb"
 
 COMPATIBLE_MACHINE = "ti33x|omap-a15"
 
@@ -31,7 +31,7 @@ SRCREV = "f3cb62a800ae37f17a3382b10d155ee02dbc83fc"
 PV = "3.8.13"
 
 # Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild
-MACHINE_KERNEL_PR_append = "f+gitr${SRCPV}"
+MACHINE_KERNEL_PR_append = "g+gitr${SRCPV}"
 
 SRC_URI = "git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git;protocol=git;branch=${BRANCH} \
            file://defconfig \
recipes-kernel/linux/linux-ti-staging_git.bb +7 -7
index cb59dbb..7d84cc4 100644
@@ -13,13 +13,13 @@ require recipes-kernel/linux/setup-defconfig.inc
 # on the target file system.
 RDEPENDS_kernel-base_ti33x += "am33x-cm3 am33x-cm3-initscript"
 
-# Default is to package all dts files for ti33x devices unless building
+# Default is to package all dtb files for ti33x devices unless building
 # for the specific beaglebone machine.
-KERNEL_DEVICETREE_ti33x = "arch/arm/boot/dts/am335x-evm.dts arch/arm/boot/dts/am335x-evmsk.dts arch/arm/boot/dts/am335x-bone.dts"
-KERNEL_DEVICETREE_am437x-evm = "arch/arm/boot/dts/am43x-epos-evm.dts"
-KERNEL_DEVICETREE_beaglebone = "arch/arm/boot/dts/am335x-bone.dts"
-KERNEL_DEVICETREE_omap5-evm = "arch/arm/boot/dts/omap5-sevm.dts arch/arm/boot/dts/omap5-uevm.dts"
-KERNEL_DEVICETREE_dra7xx-evm = "arch/arm/boot/dts/dra7-evm.dts"
+KERNEL_DEVICETREE_ti33x = "am335x-evm.dtb am335x-evmsk.dtb am335x-bone.dtb"
+KERNEL_DEVICETREE_am437x-evm = "am43x-epos-evm.dtb"
+KERNEL_DEVICETREE_beaglebone = "am335x-bone.dtb"
+KERNEL_DEVICETREE_omap5-evm = "omap5-sevm.dtb omap5-uevm.dtb"
+KERNEL_DEVICETREE_dra7xx-evm = "dra7-evm.dtb"
 
 KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
 
@@ -35,7 +35,7 @@ SRCREV = "b36f4be3de1b123d8601de062e7dbfc904f305fb"
 PV = "3.10+3.11-rc6"
 
 # Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild
-MACHINE_KERNEL_PR_append = "a+gitr${SRCPV}"
+MACHINE_KERNEL_PR_append = "b+gitr${SRCPV}"
 
 SRC_URI = "git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git;protocol=git;branch=${BRANCH} \
            file://defconfig \
Signature · 1 line
1.8.3.2
#2 lore raw

Re: [PATCH 2/2] linux-ti-staging/linux-ti-glsdk: adjust DTB handling to new syntax

Quoted 8 lines

-----Original Message-----
From: [email protected] [mailto:meta-ti- [email protected]] On Behalf Of Denys Dmytriyenko
Sent: Monday, August 26, 2013 11:27 AM
To: [email protected]
Subject: [meta-ti] [PATCH 2/2] linux-ti-staging/linux-ti-glsdk:
adjust DTB handling to new syntax

Quoted 6 lines

From: Denys Dmytriyenko <[email protected]>

---
recipes-kernel/linux/linux-ti-glsdk_3.8.bb | 6 +++---
recipes-kernel/linux/linux-ti-staging_3.8.bb | 12 ++++++------

Maybe this answers my previous question about older kernels.

Quoted 128 lines

recipes-kernel/linux/linux-ti-staging_git.bb | 14 +++++++-------

3 files changed, 16 insertions(+), 16 deletions(-)
recipes- renamed from recipes-kernel/linux/linux-ti-glsdk_3.8.bb +0 -0

kernel/linux/linux-ti-glsdk_3.8.bb
index 9e3e499..5fd17f8 100644

recipes-kernel/linux/linux-ti-glsdk_3.8.bb +0 -0
@@ -9,8 +9,8 @@ inherit kernel

require recipes-kernel/linux/linux-dtb.inc
require recipes-kernel/linux/setup-defconfig.inc

-KERNEL_DEVICETREE_omap5-evm = "arch/arm/boot/dts/omap5-sevm.dts arch/arm/boot/dts/omap5-uevm.dts"

recipes-kernel/linux/linux-ti-glsdk_3.8.bb +2 -1
-KERNEL_DEVICETREE_dra7xx-evm = "arch/arm/boot/dts/dra7-evm.dts"
+KERNEL_DEVICETREE_omap5-evm = "omap5-sevm.dtb omap5-uevm.dtb"
+KERNEL_DEVICETREE_dra7xx-evm = "dra7-evm.dtb"

COMPATIBLE_MACHINE = "omap-a15"

recipes-kernel/linux/linux-ti-glsdk_3.8.bb +0 -0
@@ -24,7 +24,7 @@ SRCREV =

"6076e6882d1d6a64b104e42e56a3eada36605cb3"
PV = "3.8.13"

# Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild

recipes-kernel/linux/linux-ti-glsdk_3.8.bb +1 -1
-MACHINE_KERNEL_PR_append = "b+gitr${SRCPV}"
+MACHINE_KERNEL_PR_append = "c+gitr${SRCPV}"

SRC_URI = "git://git.ti.com/ti-linux-kernel/ti-linux-3-8-y-

kernel.git;protocol=git;branch=${BRANCH} \
           file://defconfig \
recipes-kernel/linux/linux-ti-staging_3.8.bb +0 -0
index 29ffebc..fd7b671 100644
@@ -13,12 +13,12 @@ require recipes-kernel/linux/setup-

defconfig.inc

# on the target file system.
RDEPENDS_kernel-base_ti33x += "am33x-cm3 am33x-cm3-initscript"

-# Default is to package all dts files for ti33x devices unless building
+# Default is to package all dtb files for ti33x devices unless building

# for the specific beaglebone machine.
-KERNEL_DEVICETREE_ti33x = "arch/arm/boot/dts/am335x-evm.dts
arch/arm/boot/dts/am335x-evmsk.dts arch/arm/boot/dts/am335x-
bone.dts"
-KERNEL_DEVICETREE_beaglebone = "arch/arm/boot/dts/am335x-
bone.dts"
-KERNEL_DEVICETREE_omap5-evm = "arch/arm/boot/dts/omap5-sevm.dts
arch/arm/boot/dts/omap5-uevm.dts"
recipes-kernel/linux/linux-ti-staging_3.8.bb +1 -1
-KERNEL_DEVICETREE_dra7xx-evm = "arch/arm/boot/dts/dra7-evm.dts"
+KERNEL_DEVICETREE_ti33x = "am335x-evm.dtb am335x-evmsk.dtb

am335x-bone.dtb"

recipes-kernel/linux/linux-ti-staging_3.8.bb +3 -0
+KERNEL_DEVICETREE_beaglebone = "am335x-bone.dtb"
+KERNEL_DEVICETREE_omap5-evm = "omap5-sevm.dtb omap5-uevm.dtb"
+KERNEL_DEVICETREE_dra7xx-evm = "dra7-evm.dtb"

COMPATIBLE_MACHINE = "ti33x|omap-a15"

recipes-kernel/linux/linux-ti-staging_3.8.bb +0 -0
@@ -31,7 +31,7 @@ SRCREV =

"f3cb62a800ae37f17a3382b10d155ee02dbc83fc"
PV = "3.8.13"

# Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild

recipes-kernel/linux/linux-ti-staging_3.8.bb +1 -1
-MACHINE_KERNEL_PR_append = "f+gitr${SRCPV}"
+MACHINE_KERNEL_PR_append = "g+gitr${SRCPV}"

SRC_URI = "git://git.ti.com/ti-linux-kernel/ti-linux-

kernel.git;protocol=git;branch=${BRANCH} \
           file://defconfig \
recipes-kernel/linux/linux-ti-staging_git.bb +0 -0
index cb59dbb..7d84cc4 100644
@@ -13,13 +13,13 @@ require recipes-kernel/linux/setup-

defconfig.inc

# on the target file system.
RDEPENDS_kernel-base_ti33x += "am33x-cm3 am33x-cm3-initscript"

-# Default is to package all dts files for ti33x devices unless building
+# Default is to package all dtb files for ti33x devices unless building

# for the specific beaglebone machine.
-KERNEL_DEVICETREE_ti33x = "arch/arm/boot/dts/am335x-evm.dts
arch/arm/boot/dts/am335x-evmsk.dts arch/arm/boot/dts/am335x-
bone.dts"
-KERNEL_DEVICETREE_am437x-evm = "arch/arm/boot/dts/am43x-epos-
evm.dts"
-KERNEL_DEVICETREE_beaglebone = "arch/arm/boot/dts/am335x-
bone.dts"
-KERNEL_DEVICETREE_omap5-evm = "arch/arm/boot/dts/omap5-sevm.dts
arch/arm/boot/dts/omap5-uevm.dts"
recipes-kernel/linux/linux-ti-staging_git.bb +1 -1
-KERNEL_DEVICETREE_dra7xx-evm = "arch/arm/boot/dts/dra7-evm.dts"
+KERNEL_DEVICETREE_ti33x = "am335x-evm.dtb am335x-evmsk.dtb

am335x-bone.dtb"

recipes-kernel/linux/linux-ti-staging_git.bb +4 -0
+KERNEL_DEVICETREE_am437x-evm = "am43x-epos-evm.dtb"
+KERNEL_DEVICETREE_beaglebone = "am335x-bone.dtb"
+KERNEL_DEVICETREE_omap5-evm = "omap5-sevm.dtb omap5-uevm.dtb"
+KERNEL_DEVICETREE_dra7xx-evm = "dra7-evm.dtb"

KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"

recipes-kernel/linux/linux-ti-staging_git.bb +0 -0
@@ -35,7 +35,7 @@ SRCREV =

"b36f4be3de1b123d8601de062e7dbfc904f305fb"
PV = "3.10+3.11-rc6"

# Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild

recipes-kernel/linux/linux-ti-staging_git.bb +1 -1
-MACHINE_KERNEL_PR_append = "a+gitr${SRCPV}"
+MACHINE_KERNEL_PR_append = "b+gitr${SRCPV}"

SRC_URI = "git://git.ti.com/ti-linux-kernel/ti-linux-

kernel.git;protocol=git;branch=${BRANCH} \
           file://defconfig \

--
1.8.3.2

_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti

#3 lore raw
In reply to Denys Dmytriyenko
Quoted 10 lines

-----Original Message-----
From: [email protected] [mailto:meta-ti- [email protected]] On Behalf Of Denys Dmytriyenko
Sent: Monday, August 26, 2013 11:27 AM
To: [email protected]
Subject: [meta-ti] [dylan][PATCH 1/2] linux-dtb.inc: overlay the latest version from oe-core/master

From: Denys Dmytriyenko <[email protected]>

Quoted 7 lines

With recent kernel versions now using CPP and kernel headers, it's better
to use kernel's in-tree DTB compilation instead of building and using our
own DTC compiler externally. This overlays the changed approach from latest
oe-core/master into Dylan.

Do we need to worry about this not working for older DT kernels like the ti-linux-staging_3.8 kernel?

Quoted 110 lines

---
recipes-kernel/linux/linux-dtb.inc | 69
++++++++++++++++++++++++++++++++++++++

1 file changed, 69 insertions(+)

create mode 100644 recipes-kernel/linux/linux-dtb.inc

recipes- renamed from recipes-kernel/linux/linux-dtb.inc +0 -0

kernel/linux/linux-dtb.inc
new file mode 100644
index 0000000..6b8f1a5

recipes-kernel/linux/linux-dtb.inc new file +12 -0
@@ -0,0 +1,69 @@
+# Support for device tree generation
+FILES_kernel-devicetree = "/${KERNEL_IMAGEDEST}/devicetree*"
+
+python __anonymous () {
+    d.appendVar("PACKAGES", " kernel-devicetree")
+}
+
+do_install_append() {
+	if test -n "${KERNEL_DEVICETREE}"; then
+		for DTB in ${KERNEL_DEVICETREE}; do
+			if echo ${DTB} | grep -q '/dts/'; then
+				bbwarn "${DTB} contains the full path to

the the dts file, but only the dtb name should be used."

recipes-kernel/linux/linux-dtb.inc new file +1 -0
+				DTB=`basename ${DTB} | sed

's,\.dts$,.dtb,g'`

recipes-kernel/linux/linux-dtb.inc new file +3 -0
+			fi
+			DTB_BASE_NAME=`basename ${DTB} .dtb`
+			DTB_NAME=`echo ${KERNEL_IMAGE_BASE_NAME} | sed

"s/${MACHINE}/${DTB_BASE_NAME}/g"`

recipes-kernel/linux/linux-dtb.inc new file +1 -0
+			DTB_SYMLINK_NAME=`echo

${KERNEL_IMAGE_SYMLINK_NAME} | sed
"s/${MACHINE}/${DTB_BASE_NAME}/g"`

recipes-kernel/linux/linux-dtb.inc new file +6 -0
+			DTB_PATH="${B}/arch/${ARCH}/boot/dts/${DTB}"
+			oe_runmake ${DTB}
+			if [ ! -e "${DTB_PATH}" ]; then
+				DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}"
+			fi
+			install -m 0644 ${DTB_PATH}

${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.dtb

recipes-kernel/linux/linux-dtb.inc new file +9 -0
+		done
+	fi
+}
+
+do_deploy_append() {
+	if test -n "${KERNEL_DEVICETREE}"; then
+		for DTB in ${KERNEL_DEVICETREE}; do
+			if echo ${DTB} | grep -q '/dts/'; then
+				bbwarn "${DTB} contains the full path to

the the dts file, but only the dtb name should be used."

recipes-kernel/linux/linux-dtb.inc new file +1 -0
+				DTB=`basename ${DTB} | sed

's,\.dts$,.dtb,g'`

recipes-kernel/linux/linux-dtb.inc new file +3 -0
+			fi
+			DTB_BASE_NAME=`basename ${DTB} .dtb`
+			DTB_NAME=`echo ${KERNEL_IMAGE_BASE_NAME} | sed

"s/${MACHINE}/${DTB_BASE_NAME}/g"`

recipes-kernel/linux/linux-dtb.inc new file +1 -0
+			DTB_SYMLINK_NAME=`echo

${KERNEL_IMAGE_SYMLINK_NAME} | sed
"s/${MACHINE}/${DTB_BASE_NAME}/g"`

recipes-kernel/linux/linux-dtb.inc new file +6 -0
+			DTB_PATH="${B}/arch/${ARCH}/boot/dts/${DTB}"
+			if [ ! -e "${DTB_PATH}" ]; then
+				DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}"
+			fi
+			install -d ${DEPLOYDIR}
+			install -m 0644 ${DTB_PATH}

${DEPLOYDIR}/${DTB_NAME}.dtb

recipes-kernel/linux/linux-dtb.inc new file +12 -0
+			cd ${DEPLOYDIR}
+			ln -sf ${DTB_NAME}.dtb ${DTB_SYMLINK_NAME}.dtb
+			cd -
+		done
+	fi
+}
+
+pkg_postinst_kernel-devicetree () {
+	cd /${KERNEL_IMAGEDEST}
+	for DTB_FILE in ${KERNEL_DEVICETREE}
+	do
+		DTB_BASE_NAME=`basename ${DTB_FILE} | awk -F "."

'{print $1}'`

recipes-kernel/linux/linux-dtb.inc new file +1 -0
+		DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} |

sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`

recipes-kernel/linux/linux-dtb.inc new file +1 -0
+		update-alternatives --install

/${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.dtb ${DTB_BASE_NAME}.dtb devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true

recipes-kernel/linux/linux-dtb.inc new file +8 -0
+	done
+}
+
+pkg_postrm_kernel-devicetree () {
+	cd /${KERNEL_IMAGEDEST}
+	for DTB_FILE in ${KERNEL_DEVICETREE}
+	do
+		DTB_BASE_NAME=`basename ${DTB_FILE} | awk -F "."

'{print $1}'`

recipes-kernel/linux/linux-dtb.inc new file +1 -0
+		DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} |

sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`

recipes-kernel/linux/linux-dtb.inc new file +1 -0
+		update-alternatives --remove ${DTB_BASE_NAME}.dtb

devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true

recipes-kernel/linux/linux-dtb.inc new file +2 -1
+	done
+}
--

1.8.3.2

_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti