summaryrefslogtreecommitdiff
path: root/packages/linux/linux.inc
diff options
context:
space:
mode:
Diffstat (limited to 'packages/linux/linux.inc')
-rw-r--r--packages/linux/linux.inc30
1 files changed, 28 insertions, 2 deletions
diff --git a/packages/linux/linux.inc b/packages/linux/linux.inc
index ad7071c405..2757ad520d 100644
--- a/packages/linux/linux.inc
+++ b/packages/linux/linux.inc
@@ -18,6 +18,23 @@ CMDLINE_at91sam9263ek = "mem=64M console=ttyS0,115200 root=/dev/mmcblk0p1 rootfs
CMDLINE_DEBUG ?= '${@base_conditional("DISTRO_TYPE", "release", "quiet", "debug",d)}'
CMDLINE_append = " ${CMDLINE_DEBUG} "
+# Support for binary device tree generation
+
+KERNEL_DEVICETREE_mpc8313e-rdb = "arch/${ARCH}/boot/dts/mpc8313erdb.dts"
+KERNEL_DEVICETREE_FLAGS_mpc8313e-rdb = "-R 8 -S 0x3000"
+KERNEL_DEVICETREE_mpc8323e-rdb = "arch/${ARCH}/boot/dts/mpc832x_rdb.dts"
+
+python __anonymous () {
+
+ import bb
+
+ devicetree = bb.data.getVar('KERNEL_DEVICETREE', d, 1) or ''
+ if devicetree:
+ depends = bb.data.getVar("DEPENDS", d, 1)
+ depends = "%s dtc-native" % depends
+ bb.data.setVar("DEPENDS", depends, d)
+}
+
do_configure_prepend() {
echo "" > ${S}/.config
@@ -106,5 +123,14 @@ do_compile_append() {
fi
}
-KERNEL_IMAGE_BASE_NAME = "${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}"
-KERNEL_IMAGE_SYMLINK_NAME = "${KERNEL_IMAGETYPE}-${MACHINE}"
+do_devicetree_image() {
+ if test -n "${KERNEL_DEVICETREE}" ; then
+ dtc -I dts -O dtb ${KERNEL_DEVICETREE_FLAGS} -o ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.dtb ${KERNEL_DEVICETREE}
+
+ cd ${DEPLOY_DIR_IMAGE}
+ rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.dtb
+ ln -sf ${KERNEL_IMAGE_BASE_NAME}.dtb ${KERNEL_IMAGE_SYMLINK_NAME}.dtb
+ fi
+}
+
+addtask devicetree_image after do_deploy before do_package