diff options
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-kernel/linux/linux-dtb.inc')
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-kernel/linux/linux-dtb.inc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-dtb.inc b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-dtb.inc index 2f378a1db..0174c80d8 100644 --- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-dtb.inc +++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-dtb.inc @@ -1,6 +1,8 @@ # Support for device tree generation FILES_kernel-devicetree = "/${KERNEL_IMAGEDEST}/devicetree*" +PACKAGE_WRITE_DEPS += "virtual/update-alternatives-native" + python __anonymous () { d.appendVar("PACKAGES", " kernel-devicetree") } @@ -70,7 +72,7 @@ pkg_postinst_kernel-devicetree () { DTB_EXT=${DTB##*.} DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"` DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` - update-alternatives --install /${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.${DTB_EXT} ${DTB_BASE_NAME}.${DTB_EXT} /boot/devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} ${KERNEL_PRIORITY} || true + update-alternatives --install /${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.${DTB_EXT} ${DTB_BASE_NAME}.${DTB_EXT} devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} ${KERNEL_PRIORITY} || true done done } @@ -83,7 +85,7 @@ pkg_postrm_kernel-devicetree () { DTB_EXT=${DTB##*.} DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"` DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` - update-alternatives --remove ${DTB_BASE_NAME}.${DTB_EXT} /boot/devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} ${KERNEL_PRIORITY} || true + update-alternatives --remove ${DTB_BASE_NAME}.${DTB_EXT} devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} ${KERNEL_PRIORITY} || true done done } |