diff options
author | John Klug <john.klug@multitech.com> | 2018-05-08 10:14:30 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2018-05-08 10:14:30 -0500 |
commit | 611bae8532480c04598d0884360fee797289a6f4 (patch) | |
tree | a73d1b609e53493afe83a2377ddd7bd821710195 /recipes-kernel/linux/linux_3.12.70.bb | |
parent | 041ba09b3af4a46f8f4ad9e2506f01e5e3ad72fa (diff) | |
download | meta-multitech-611bae8532480c04598d0884360fee797289a6f4.tar.gz meta-multitech-611bae8532480c04598d0884360fee797289a6f4.tar.bz2 meta-multitech-611bae8532480c04598d0884360fee797289a6f4.zip |
Yocto 2.2 ignores kernel-image-uimage postinst routine
Diffstat (limited to 'recipes-kernel/linux/linux_3.12.70.bb')
-rw-r--r-- | recipes-kernel/linux/linux_3.12.70.bb | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux_3.12.70.bb b/recipes-kernel/linux/linux_3.12.70.bb index 87e5fbe..7d64f36 100644 --- a/recipes-kernel/linux/linux_3.12.70.bb +++ b/recipes-kernel/linux/linux_3.12.70.bb @@ -59,3 +59,36 @@ DTB_APPEND_mtcap = "mtcap" do_rm_work() { echo "skipping" } + + +pkg_preinst_kernel-image-uimage() { + set -x + mkdir -m 0755 /var/volatile/boot 2>/dev/null || true + ls /boot || true + ls -l /boot | true + rm -rf /boot + ln -sf /var/volatile/boot /boot 2>/dev/null || true +} + +pkg_prerm_kernel-image-uimage() { + rm -rf /var/volatile/boot || true + rm -rf /boot || true +} + +PACKAGES =+ "kernel-image-uimage-inst" +RDEPENDS_kernel-image-uimage-inst += "kernel-image-uimage-${PV}" +ALLOW_EMPTY_kernel-image-uimage-inst = "1" + +pkg_postinst_kernel-image-uimage-inst() { + # Only installs all the kernel on the device (D is defined in bitbake) + if [[ -z "$D" ]] ; then + logger -s -p user.info -t opkg "Upgrading kernel ${PV} -- poweroff will create an unbootable device" + set -x + kernel_mtd="/dev/$(cat /proc/mtd | grep '\"uImage\"' | cut -d : -f 1)" + flash_erase ${kernel_mtd} 0 0 + if nandwrite -p ${kernel_mtd} /boot/uImage-${PV} ; then + echo 'Kernel image update is successful' + fi + set +x + fi +} |