diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2017-09-05 03:04:44 -0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-09-11 17:30:28 +0100 |
commit | cb91b0eacd833b801732e177b734a756d9e0ae8f (patch) | |
tree | e7b422b25cfbfd81c1255e82c294c7ccb0b78d0c /meta/recipes-kernel | |
parent | ee9db1a9152e8757ce4d831ff9f4472ff5a57dad (diff) | |
download | poky-cb91b0eacd833b801732e177b734a756d9e0ae8f.tar.gz |
kernel: Stop using update-alternatives
The update-alternatives where using relative links so not being really
in use since December 2016 (see OE-Core:c7bc46b9 "kernel: Fix
symlinks") so instead we now generate the relative symlinks during the
do_install task and drop the update-alternatives use at all.
Acked-by: Saul Wold <sgw@linux.intel.com>
(From OE-Core rev: 10a1b293191268e6792ac8e27bd6427f1974c7ce)
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel')
-rw-r--r-- | meta/recipes-kernel/linux/linux-dtb.inc | 36 |
1 files changed, 5 insertions, 31 deletions
diff --git a/meta/recipes-kernel/linux/linux-dtb.inc b/meta/recipes-kernel/linux/linux-dtb.inc index 0174c80d85..ca92822d25 100644 --- a/meta/recipes-kernel/linux/linux-dtb.inc +++ b/meta/recipes-kernel/linux/linux-dtb.inc | |||
@@ -1,7 +1,5 @@ | |||
1 | # Support for device tree generation | 1 | # Support for device tree generation |
2 | FILES_kernel-devicetree = "/${KERNEL_IMAGEDEST}/devicetree*" | 2 | FILES_kernel-devicetree = "/${KERNEL_IMAGEDEST}/*.dtb /${KERNEL_IMAGEDEST}/*.dtbo" |
3 | |||
4 | PACKAGE_WRITE_DEPS += "virtual/update-alternatives-native" | ||
5 | 3 | ||
6 | python __anonymous () { | 4 | python __anonymous () { |
7 | d.appendVar("PACKAGES", " kernel-devicetree") | 5 | d.appendVar("PACKAGES", " kernel-devicetree") |
@@ -36,12 +34,13 @@ do_install_append() { | |||
36 | for DTB in ${KERNEL_DEVICETREE}; do | 34 | for DTB in ${KERNEL_DEVICETREE}; do |
37 | DTB=`normalize_dtb "${DTB}"` | 35 | DTB=`normalize_dtb "${DTB}"` |
38 | DTB_EXT=${DTB##*.} | 36 | DTB_EXT=${DTB##*.} |
37 | DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"` | ||
39 | DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"` | 38 | DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"` |
39 | install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.${DTB_EXT} | ||
40 | for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do | 40 | for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do |
41 | symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME} | 41 | symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME} |
42 | DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` | 42 | DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` |
43 | DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"` | 43 | ln -sf ${DTB_BASE_NAME}.${DTB_EXT} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} |
44 | install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} | ||
45 | done | 44 | done |
46 | done | 45 | done |
47 | } | 46 | } |
@@ -60,32 +59,7 @@ do_deploy_append() { | |||
60 | install -d ${DEPLOYDIR} | 59 | install -d ${DEPLOYDIR} |
61 | install -m 0644 ${DTB_PATH} ${DEPLOYDIR}/${DTB_NAME}.${DTB_EXT} | 60 | install -m 0644 ${DTB_PATH} ${DEPLOYDIR}/${DTB_NAME}.${DTB_EXT} |
62 | ln -sf ${DTB_NAME}.${DTB_EXT} ${DEPLOYDIR}/${DTB_SYMLINK_NAME}.${DTB_EXT} | 61 | ln -sf ${DTB_NAME}.${DTB_EXT} ${DEPLOYDIR}/${DTB_SYMLINK_NAME}.${DTB_EXT} |
63 | done | 62 | ln -sf ${DTB_NAME}.${DTB_EXT} ${DEPLOYDIR}/${DTB_BASE_NAME}.${DTB_EXT} |
64 | done | ||
65 | } | ||
66 | |||
67 | pkg_postinst_kernel-devicetree () { | ||
68 | cd /${KERNEL_IMAGEDEST} | ||
69 | for DTB in ${KERNEL_DEVICETREE}; do | ||
70 | for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do | ||
71 | symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME} | ||
72 | DTB_EXT=${DTB##*.} | ||
73 | DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"` | ||
74 | DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` | ||
75 | update-alternatives --install /${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.${DTB_EXT} ${DTB_BASE_NAME}.${DTB_EXT} devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} ${KERNEL_PRIORITY} || true | ||
76 | done | ||
77 | done | ||
78 | } | ||
79 | |||
80 | pkg_postrm_kernel-devicetree () { | ||
81 | cd /${KERNEL_IMAGEDEST} | ||
82 | for DTB in ${KERNEL_DEVICETREE}; do | ||
83 | for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do | ||
84 | symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME} | ||
85 | DTB_EXT=${DTB##*.} | ||
86 | DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"` | ||
87 | DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` | ||
88 | update-alternatives --remove ${DTB_BASE_NAME}.${DTB_EXT} devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} ${KERNEL_PRIORITY} || true | ||
89 | done | 63 | done |
90 | done | 64 | done |
91 | } | 65 | } |