diff options
author | Jeremy Laine <jeremy.laine@m4x.org> | 2008-06-06 17:44:53 +0000 |
---|---|---|
committer | Jeremy Laine <jeremy.laine@m4x.org> | 2008-06-06 17:44:53 +0000 |
commit | b71963c0c81d848211433ca1987ad1eef5448e21 (patch) | |
tree | 0759c2e2e569e789a4b0c19ed4d39458a1c8e59d /packages | |
parent | 93ab68d1eed431458cc603f5440274789ba10972 (diff) |
linux.inc: optionally generate a kernel-devicetree package
* if KERNEL_DEVICETREE is set, the devicetree will get shipped in a package
called "kernel-devicetree" as /boot/devicetree-${KERNEL_VERSION}
Diffstat (limited to 'packages')
-rw-r--r-- | packages/linux/linux.inc | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/packages/linux/linux.inc b/packages/linux/linux.inc index e3814070ea..679f73a7f4 100644 --- a/packages/linux/linux.inc +++ b/packages/linux/linux.inc @@ -20,6 +20,8 @@ CMDLINE_append = " ${CMDLINE_DEBUG} " # Support for binary device tree generation +FILES_kernel-devicetree = "/boot/devicetree*" + KERNEL_DEVICETREE_mpc8313e-rdb = "arch/${ARCH}/boot/dts/mpc8313erdb.dts" KERNEL_DEVICETREE_mpc8315e-rdb = "arch/${ARCH}/boot/dts/mpc8315erdb.dts" KERNEL_DEVICETREE_mpc8323e-rdb = "arch/${ARCH}/boot/dts/mpc832x_rdb.dts" @@ -35,8 +37,9 @@ python __anonymous () { 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) + bb.data.setVar("DEPENDS", "%s dtc-native" % depends, d) + packages = bb.data.getVar("PACKAGES", d, 1) + bb.data.setVar("PACKAGES", "%s kernel-devicetree" % packages, d) } do_configure_prepend() { @@ -128,13 +131,14 @@ do_compile_append() { } 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 + if test -n "${KERNEL_DEVICETREE}" ; then + dtc -I dts -O dtb ${KERNEL_DEVICETREE_FLAGS} -o devicetree ${KERNEL_DEVICETREE} + install -m 0644 devicetree ${D}/boot/devicetree-${KERNEL_VERSION} + install -m 0644 devicetree ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.dtb + 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 |