Skip to contentSkip to conversation

xilinx-kernel.bbclass: Fix support for binary device tree generation.

meta-xilinx Applied Elvis Dowson 2 participants 2 messages Jul 15, 2012 – Jul 17, 2012 Arm/Zynq architecture

lore
Share & tools
lore
#0 lore raw

This commit fixes support for binary device tree generation, which was broken as a result of commit 8c904eb643ad8ca1bc29cb2d870a80b355dcb341 in oe-core:

linux-dtb: add multi-dtb build support
including following enhancement:
* support multi-dtb build
* skip dtb build and install when KERNEL_DEVICETREE is empty
* print a warning message when specified dts file is not available

---
 classes/xilinx-kernel.bbclass |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
classes/xilinx-kernel.bbclass +4 -6
index 14f4c7d..7c51b3d 100644
@@ -22,16 +22,14 @@ def device_tree(a, d):
 
     board = bb.data.getVar('XILINX_BOARD', d, 1)
     cpu = bb.data.getVar('TARGET_CPU', d, 1)
-
     if re.match('powerpc', a):
         target = cpu + '-' + board
-        dts = 'arch/' + a + '/boot/dts/virtex' + target + '.dts'
+        dts = '${S}/arch/' + a + '/boot/dts/virtex' + target + '.dts'
     else:
         target = 'system'
-        dts = 'arch/' + a + '/boot/dts/' + target + '.dts'
+        dts = '${S}/arch/' + a + '/boot/dts/' + target + '.dts'
 
     bb.data.setVar('KERNEL_TARGET', target, d)
-
     return dts
 
 
@@ -44,10 +42,10 @@ if [ -n "${XILINX_BSP_PATH}" ]; then
 		if [ -e "$dts" ]; then
 			bbnote "Xilinx BSP device tree located in: ${dts}"
 			if [ "${TARGET_ARCH}" = "powerpc" ]; then
-				bbnote "Replacing linux kernel powerpc device tree to match located hardware model"
+				bbnote "Replacing linux kernel powerpc device tree to match located hardware model: virtex${KERNEL_TARGET}.dts"
 				cp -pP ${dts} ${S}/arch/powerpc/boot/dts/virtex${KERNEL_TARGET}.dts
 			else
-				bbnote "Replacing linux kernel microblaze device tree to match located hardware model"
+				bbnote "Replacing linux kernel microblaze device tree to match located hardware model: ${KERNEL_TARGET}.dts"
 				cp -pP ${dts} ${S}/arch/microblaze/platform/generic/${KERNEL_TARGET}.dts
 			fi
 		else
Signature · 1 line
1.7.9.5
#1 lore raw

Applied.

Thanks!

Quoted 54 lines · Elvis Dowson

This commit fixes support for binary device tree generation, which was broken as a result of commit 8c904eb643ad8ca1bc29cb2d870a80b355dcb341 in oe-core:

linux-dtb: add multi-dtb build support
including following enhancement:
* support multi-dtb build
* skip dtb build and install when KERNEL_DEVICETREE is empty
* print a warning message when specified dts file is not available

---
 classes/xilinx-kernel.bbclass |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
classes/xilinx-kernel.bbclass +4 -7
index 14f4c7d..7c51b3d 100644
@@ -22,16 +22,14 @@ def device_tree(a, d):
 
     board = bb.data.getVar('XILINX_BOARD', d, 1)
     cpu = bb.data.getVar('TARGET_CPU', d, 1)
-
     if re.match('powerpc', a):
         target = cpu + '-' + board
-        dts = 'arch/' + a + '/boot/dts/virtex' + target + '.dts'
+        dts = '${S}/arch/' + a + '/boot/dts/virtex' + target + '.dts'
     else:
         target = 'system'
-        dts = 'arch/' + a + '/boot/dts/' + target + '.dts'
+        dts = '${S}/arch/' + a + '/boot/dts/' + target + '.dts'
 
     bb.data.setVar('KERNEL_TARGET', target, d)
-
     return dts
 
 
@@ -44,10 +42,10 @@ if [ -n "${XILINX_BSP_PATH}" ]; then
                if [ -e "$dts" ]; then
                        bbnote "Xilinx BSP device tree located in: ${dts}"
                        if [ "${TARGET_ARCH}" = "powerpc" ]; then
-                               bbnote "Replacing linux kernel powerpc device tree to match located hardware model"
+                               bbnote "Replacing linux kernel powerpc device tree to match located hardware model: virtex${KERNEL_TARGET}.dts"
                                cp -pP ${dts} ${S}/arch/powerpc/boot/dts/virtex${KERNEL_TARGET}.dts
                        else
-                               bbnote "Replacing linux kernel microblaze device tree to match located hardware model"
+                               bbnote "Replacing linux kernel microblaze device tree to match located hardware model: ${KERNEL_TARGET}.dts"
                                cp -pP ${dts} ${S}/arch/microblaze/platform/generic/${KERNEL_TARGET}.dts
                        fi
                else
--

1.7.9.5

Signature · 3 lines
Saludos
Adrian Alonso
http://aalonso.wordpress.com