xilinx-kernel.bbclass: Fix support for binary device tree generation.
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
@@ -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
Adrian Alonso
AppliedApplied.
Thanks!
Quoted 54 lines · Elvis Dowson
This commit fixes support for binary device tree generation, which was broken as a result of commit
8c904eb643ad8ca1bc29cb2d870a80b355dcb341in oe-core:linux-dtb: add multi-dtb build support
including following enhancement:
* support multi-dtb build
* skip dtb build and install whenKERNEL_DEVICETREEis empty
* print a warning message when specified dts file is not availableSigned-off-by Elvis Dowson <[email protected]>--- classes/xilinx-kernel.bbclass | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)classes/xilinx-kernel.bbclass +4
-7@@ -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